diff --git a/zanata-war/src/main/webapp/app/config.json b/zanata-war/src/main/webapp/app/config.json index 73423ff7cb..0baa22b643 100644 --- a/zanata-war/src/main/webapp/app/config.json +++ b/zanata-war/src/main/webapp/app/config.json @@ -1,3 +1,4 @@ { + "appPath": "/app" } diff --git a/zanata-war/src/main/webapp/app/css/app.css b/zanata-war/src/main/webapp/app/css/app.css index 7943d94902..0efcfb3e7f 100644 --- a/zanata-war/src/main/webapp/app/css/app.css +++ b/zanata-war/src/main/webapp/app/css/app.css @@ -1 +1 @@ -.u-cf:before,.u-cf:after{content:" ";display:table}.u-cf:after{clear:both}.u-nbfc{overflow:hidden!important}.u-nbfcAlt{display:table-cell!important;width:10000px!important}.u-floatLeft{float:left!important}.u-floatRight{float:right!important}.u-bgFaint{opacity:.9}.u-bgHigh{background-color:#f6f7f8}.u-bgHigher{background-color:#fefefe}.u-bgHighest{background-color:#fff}.u-bgLow{background-color:#e7e9eb}.u-bgLower{background-color:#e0e2e3}.u-bgLowest{background-color:#d9dadc}.u-bgPop{border:1px solid rgba(65,105,136,.12);border-bottom-width:2px}.u-bgNeutral{background-color:#eef0f2}.u-bgPrimary{background-color:#4e9fdd}.u-bgSecondary{background-color:#416988}.u-bgDanger{background-color:#f9ddde}.u-bgWarning{background-color:#f9e6dc}.u-bgUnsure{background-color:#fcf9ee}.u-bgSuccess{background-color:#e2eee8}.u-bgHighlight{background-color:#dcecf8}.u-block{display:block!important}.u-hidden{display:none!important}.u-hiddenVisually{position:absolute!important;overflow:hidden!important;width:1px!important;height:1px!important;padding:0!important;border:0!important;clip:rect(1px,1px,1px,1px)!important}.u-inline{display:inline!important}.u-inlineBlock{display:inline-block!important;max-width:100%}.u-table{display:table!important}.u-tableCell{display:table-cell!important}.u-tableRow{display:table-row!important}.u-round{border-radius:1000px!important;overflow:hidden}@media (min-width:0) and (max-width:740px){.u-sm-hidden{display:none!important}}@media (min-width:741px) and (max-width:960px){.u-md-hidden{display:none!important}}@media (max-width:960px){.u-ltemd-hidden{display:none!important}}@media (min-width:741px){.u-gtemd-hidden{display:none!important}}@media (min-width:961px) and (max-width:1270px){.u-lg-hidden{display:none!important}}@media (min-width:961px){.u-gtelg-hidden{display:none!important}}.u-dlUnstyled>dd{margin-left:0}.u-dlInline dt,.u-dlInline dd{display:inline-block;margin-right:.1875rem;margin-left:0}.u-listUnstyled{margin-bottom:0;padding-left:0;list-style:none}.u-listUnstyled>li{margin-left:0;list-style:none}.u-listInline{margin-left:-.1875rem;padding-left:0;list-style:none}.u-listInline>li{display:inline-block;padding-right:.1875rem;padding-left:.1875rem}.u-listHorizontal{font-size:0;list-style:none}.u-listHorizontal>li{font-size:1rem;display:inline-block;vertical-align:top}.u-posAbsolute,.u-posAbsoluteCenter{position:absolute!important}.u-posAbsoluteCenter{bottom:0!important;left:0!important;margin:auto!important;right:0!important;top:0!important}.u-posFixed{position:fixed!important;-webkit-backface-visibility:hidden;backface-visibility:hidden}.u-posRelative{position:relative!important}.u-posStatic{position:static!important}.u-posAbsoluteLeft{left:0!important}.u-posAbsoluteLeft,.u-posAbsoluteRight{bottom:0!important;position:absolute!important;top:0!important}.u-posAbsoluteRight{right:0!important}.u-sizeFit{display:block!important;float:left!important;width:auto!important}.u-sizeFitAlt{float:right!important}.u-sizeFitAlt,.u-sizeFill{display:block!important;width:auto!important}.u-sizeFill{overflow:hidden!important}.u-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-size1of12{width:8.333333333333332%!important}.u-size1of10{width:10%!important}.u-size1of8{width:12.5%!important}.u-size1of6,.u-size2of12{width:16.666666666666664%!important}.u-size1of5,.u-size2of10{width:20%!important}.u-size1of4,.u-size2of8,.u-size3of12{width:25%!important}.u-size3of10{width:30%!important}.u-size1of3,.u-size2of6,.u-size4of12{width:33.33333333333333%!important}.u-size3of8{width:37.5%!important}.u-size2of5,.u-size4of10{width:40%!important}.u-size5of12{width:41.66666666666667%!important}.u-size1of2,.u-size2of4,.u-size3of6,.u-size4of8,.u-size5of10,.u-size6of12{width:50%!important}.u-size7of12{width:58.333333333333336%!important}.u-size3of5,.u-size6of10{width:60%!important}.u-size5of8{width:62.5%!important}.u-size2of3,.u-size4of6,.u-size8of12{width:66.66666666666666%!important}.u-size7of10{width:70%!important}.u-size3of4,.u-size6of8,.u-size9of12{width:75%!important}.u-size4of5,.u-size8of10{width:80%!important}.u-size5of6,.u-size10of12{width:83.33333333333334%!important}.u-size7of8{width:87.5%!important}.u-size9of10{width:90%!important}.u-size11of12{width:91.66666666666666%!important}@media (min-width:0) and (max-width:740px){.u-sm-sizeFit{display:block!important;float:left!important;width:auto!important}.u-sm-sizeFitAlt{float:right!important}.u-sm-sizeFitAlt,.u-sm-sizeFill{display:block!important;width:auto!important}.u-sm-sizeFill{overflow:hidden!important}.u-sm-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-sm-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-sm-size1of12{width:8.333333333333332%!important}.u-sm-size1of10{width:10%!important}.u-sm-size1of8{width:12.5%!important}.u-sm-size1of6,.u-sm-size2of12{width:16.666666666666664%!important}.u-sm-size1of5,.u-sm-size2of10{width:20%!important}.u-sm-size1of4,.u-sm-size2of8,.u-sm-size3of12{width:25%!important}.u-sm-size3of10{width:30%!important}.u-sm-size1of3,.u-sm-size2of6,.u-sm-size4of12{width:33.33333333333333%!important}.u-sm-size3of8{width:37.5%!important}.u-sm-size2of5,.u-sm-size4of10{width:40%!important}.u-sm-size5of12{width:41.66666666666667%!important}.u-sm-size1of2,.u-sm-size2of4,.u-sm-size3of6,.u-sm-size4of8,.u-sm-size5of10,.u-sm-size6of12{width:50%!important}.u-sm-size7of12{width:58.333333333333336%!important}.u-sm-size3of5,.u-sm-size6of10{width:60%!important}.u-sm-size5of8{width:62.5%!important}.u-sm-size2of3,.u-sm-size4of6,.u-sm-size8of12{width:66.66666666666666%!important}.u-sm-size7of10{width:70%!important}.u-sm-size3of4,.u-sm-size6of8,.u-sm-size9of12{width:75%!important}.u-sm-size4of5,.u-sm-size8of10{width:80%!important}.u-sm-size5of6,.u-sm-size10of12{width:83.33333333333334%!important}.u-sm-size7of8{width:87.5%!important}.u-sm-size9of10{width:90%!important}.u-sm-size11of12{width:91.66666666666666%!important}}@media (min-width:741px) and (max-width:960px){.u-md-sizeFit{display:block!important;float:left!important;width:auto!important}.u-md-sizeFitAlt{float:right!important}.u-md-sizeFitAlt,.u-md-sizeFill{display:block!important;width:auto!important}.u-md-sizeFill{overflow:hidden!important}.u-md-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-md-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-md-size1of12{width:8.333333333333332%!important}.u-md-size1of10{width:10%!important}.u-md-size1of8{width:12.5%!important}.u-md-size1of6,.u-md-size2of12{width:16.666666666666664%!important}.u-md-size1of5,.u-md-size2of10{width:20%!important}.u-md-size1of4,.u-md-size2of8,.u-md-size3of12{width:25%!important}.u-md-size3of10{width:30%!important}.u-md-size1of3,.u-md-size2of6,.u-md-size4of12{width:33.33333333333333%!important}.u-md-size3of8{width:37.5%!important}.u-md-size2of5,.u-md-size4of10{width:40%!important}.u-md-size5of12{width:41.66666666666667%!important}.u-md-size1of2,.u-md-size2of4,.u-md-size3of6,.u-md-size4of8,.u-md-size5of10,.u-md-size6of12{width:50%!important}.u-md-size7of12{width:58.333333333333336%!important}.u-md-size3of5,.u-md-size6of10{width:60%!important}.u-md-size5of8{width:62.5%!important}.u-md-size2of3,.u-md-size4of6,.u-md-size8of12{width:66.66666666666666%!important}.u-md-size7of10{width:70%!important}.u-md-size3of4,.u-md-size6of8,.u-md-size9of12{width:75%!important}.u-md-size4of5,.u-md-size8of10{width:80%!important}.u-md-size5of6,.u-md-size10of12{width:83.33333333333334%!important}.u-md-size7of8{width:87.5%!important}.u-md-size9of10{width:90%!important}.u-md-size11of12{width:91.66666666666666%!important}}@media (min-width:961px) and (max-width:1270px){.u-lg-sizeFit{display:block!important;float:left!important;width:auto!important}.u-lg-sizeFitAlt{float:right!important}.u-lg-sizeFitAlt,.u-lg-sizeFill{display:block!important;width:auto!important}.u-lg-sizeFill{overflow:hidden!important}.u-lg-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-lg-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-lg-size1of12{width:8.333333333333332%!important}.u-lg-size1of10{width:10%!important}.u-lg-size1of8{width:12.5%!important}.u-lg-size1of6,.u-lg-size2of12{width:16.666666666666664%!important}.u-lg-size1of5,.u-lg-size2of10{width:20%!important}.u-lg-size1of4,.u-lg-size2of8,.u-lg-size3of12{width:25%!important}.u-lg-size3of10{width:30%!important}.u-lg-size1of3,.u-lg-size2of6,.u-lg-size4of12{width:33.33333333333333%!important}.u-lg-size3of8{width:37.5%!important}.u-lg-size2of5,.u-lg-size4of10{width:40%!important}.u-lg-size5of12{width:41.66666666666667%!important}.u-lg-size1of2,.u-lg-size2of4,.u-lg-size3of6,.u-lg-size4of8,.u-lg-size5of10,.u-lg-size6of12{width:50%!important}.u-lg-size7of12{width:58.333333333333336%!important}.u-lg-size3of5,.u-lg-size6of10{width:60%!important}.u-lg-size5of8{width:62.5%!important}.u-lg-size2of3,.u-lg-size4of6,.u-lg-size8of12{width:66.66666666666666%!important}.u-lg-size7of10{width:70%!important}.u-lg-size3of4,.u-lg-size6of8,.u-lg-size9of12{width:75%!important}.u-lg-size4of5,.u-lg-size8of10{width:80%!important}.u-lg-size5of6,.u-lg-size10of12{width:83.33333333333334%!important}.u-lg-size7of8{width:87.5%!important}.u-lg-size9of10{width:90%!important}.u-lg-size11of12{width:91.66666666666666%!important}}.u-sizeWidth-1-4{width:.375rem!important}.u-sizeWidth-1-2{width:.75rem!important}.u-sizeWidth-3-4{width:1.125rem!important}.u-sizeWidth-1{width:1.5rem!important}.u-sizeWidth-1_1-2{width:2.25rem!important}.u-sizeWidth-2{width:3rem!important}.u-sizeHeight-1-4{height:.375rem!important}.u-sizeHeight-1-2{height:.75rem!important}.u-sizeHeight-3-4{height:1.125rem!important}.u-sizeHeight-1{height:1.5rem!important}.u-sizeHeight-1_1-4{height:1.875rem!important}.u-sizeHeight-1_1-2{height:2.25rem!important}.u-sizeHeight-2{height:3rem!important}.u-sizeLineHeight-1-4{line-height:.375rem!important}.u-sizeLineHeight-1-2{line-height:.75rem!important}.u-sizeLineHeight-3-4{line-height:1.125rem!important}.u-sizeLineHeight-1{line-height:1.5rem!important}.u-sizeLineHeight-1_1-2{line-height:2.25rem!important}.u-sizeLineHeight-2{line-height:3rem!important}.u-sM-1-4{margin:.375rem!important}.u-sM-1-2{margin:.75rem!important}.u-sM-3-4{margin:1.125rem!important}.u-sM-1{margin:1.5rem!important}.u-sM-1_1-2{margin:2.25rem!important}.u-sM-2{margin:3rem!important}.u-sMT-1-4{margin-top:.375rem!important}.u-sMT-1-2{margin-top:.75rem!important}.u-sMT-3-4{margin-top:1.125rem!important}.u-sMT-1{margin-top:1.5rem!important}.u-sMT-1_1-2{margin-top:2.25rem!important}.u-sMT-2{margin-top:3rem!important}.u-sMR-1-4{margin-right:.375rem!important}.u-sMR-1-2{margin-right:.75rem!important}.u-sMR-3-4{margin-right:1.125rem!important}.u-sMR-1{margin-right:1.5rem!important}.u-sMR-1_1-2{margin-right:2.25rem!important}.u-sMR-2{margin-right:3rem!important}.u-sMB-1-4{margin-bottom:.375rem!important}.u-sMB-1-2{margin-bottom:.75rem!important}.u-sMB-3-4{margin-bottom:1.125rem!important}.u-sMB-1{margin-bottom:1.5rem!important}.u-sMB-1_1-2{margin-bottom:2.25rem!important}.u-sMB-2{margin-bottom:3rem!important}.u-sML-1-4{margin-left:.375rem!important}.u-sML-1-2{margin-left:.75rem!important}.u-sML-3-4{margin-left:1.125rem!important}.u-sML-1{margin-left:1.5rem!important}.u-sML-1_1-2{margin-left:2.25rem!important}.u-sML-2{margin-left:3rem!important}.u-sMV-1-4{margin-top:.375rem!important;margin-bottom:.375rem!important}.u-sMV-1-2{margin-top:.75rem!important;margin-bottom:.75rem!important}.u-sMV-3-4{margin-top:1.125rem!important;margin-bottom:1.125rem!important}.u-sMV-1{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.u-sMV-1_1-2{margin-top:2.25rem!important;margin-bottom:2.25rem!important}.u-sMV-2{margin-top:3rem!important;margin-bottom:3rem!important}.u-sMH-1-4{margin-left:.375rem!important;margin-right:.375rem!important}.u-sMH-1-2{margin-left:.75rem!important;margin-right:.75rem!important}.u-sMH-3-4{margin-left:1.125rem!important;margin-right:1.125rem!important}.u-sMH-1{margin-left:1.5rem!important;margin-right:1.5rem!important}.u-sMH-1_1-2{margin-left:2.25rem!important;margin-right:2.25rem!important}.u-sMH-2{margin-left:3rem!important;margin-right:3rem!important}.u-sP-1-4{padding:.375rem!important}.u-sP-1-2{padding:.75rem!important}.u-sP-3-4{padding:1.125rem!important}.u-sP-1{padding:1.5rem!important}.u-sP-1_1-2{padding:2.25rem!important}.u-sP-2{padding:3rem!important}.u-sPT-1-4{padding-top:.375rem!important}.u-sPT-1-2{padding-top:.75rem!important}.u-sPT-3-4{padding-top:1.125rem!important}.u-sPT-1{padding-top:1.5rem!important}.u-sPT-1_1-2{padding-top:2.25rem!important}.u-sPT-2{padding-top:3rem!important}.u-sPR-1-4{padding-right:.375rem!important}.u-sPR-1-2{padding-right:.75rem!important}.u-sPR-3-4{padding-right:1.125rem!important}.u-sPR-1{padding-right:1.5rem!important}.u-sPR-1_1-2{padding-right:2.25rem!important}.u-sPR-2{padding-right:3rem!important}.u-sPB-1-4{padding-bottom:.375rem!important}.u-sPB-1-2{padding-bottom:.75rem!important}.u-sPB-3-4{padding-bottom:1.125rem!important}.u-sPB-1{padding-bottom:1.5rem!important}.u-sPB-1_1-2{padding-bottom:2.25rem!important}.u-sPB-2{padding-bottom:3rem!important}.u-sPL-1-4{padding-left:.375rem!important}.u-sPL-1-2{padding-left:.75rem!important}.u-sPL-3-4{padding-left:1.125rem!important}.u-sPL-1{padding-left:1.5rem!important}.u-sPL-1_1-2{padding-left:2.25rem!important}.u-sPL-2{padding-left:3rem!important}.u-sPV-1-4{padding-top:.375rem!important;padding-bottom:.375rem!important}.u-sPV-1-2{padding-top:.75rem!important;padding-bottom:.75rem!important}.u-sPV-3-4{padding-top:1.125rem!important;padding-bottom:1.125rem!important}.u-sPV-1{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.u-sPV-1_1-2{padding-top:2.25rem!important;padding-bottom:2.25rem!important}.u-sPV-2{padding-top:3rem!important;padding-bottom:3rem!important}.u-sPH-1-4{padding-left:.375rem!important;padding-right:.375rem!important}.u-sPH-1-2{padding-left:.75rem!important;padding-right:.75rem!important}.u-sPH-3-4{padding-left:1.125rem!important;padding-right:1.125rem!important}.u-sPH-1{padding-left:1.5rem!important;padding-right:1.5rem!important}.u-sPH-1_1-2{padding-left:2.25rem!important;padding-right:2.25rem!important}.u-sPH-2{padding-left:3rem!important;padding-right:3rem!important}.u-textBreak{word-wrap:break-word!important}.u-textCenter{text-align:center!important}.u-textLeft{text-align:left!important}.u-textRight{text-align:right!important}.u-textInheritColor{color:inherit!important}.u-textKern{text-rendering:optimizeLegibility;-webkit-font-feature-settings:"kern" 1;font-feature-settings:"kern" 1;-webkit-font-kerning:normal;font-kerning:normal}.u-textNoWrap,.u-textTruncate{white-space:nowrap!important}.u-textTruncate{max-width:100%;overflow:hidden!important;text-overflow:ellipsis!important;word-wrap:normal!important}.u-textUpper{text-transform:uppercase}.u-textLower{text-transform:lowercase}.u-textCapitalize{text-transform:capitalize}.u-textInvert{color:#f2f2f2}.u-textMuted{opacity:.6}.u-textMeta{font-size:.875rem;color:#a0b4c4}.u-textLead{font-size:1.5rem;font-weight:300}.u-textPrimary{color:#4e9fdd}.u-textSecondary{color:#416988}.u-textHighlight{color:#4e9fdd}.u-textSuccess{color:#70a98b}.u-textUnsure{color:#e0c350}.u-textNeutral{color:#bdcbd5}.u-textWarning{color:#e3824e}.u-textDanger{color:#e0575b}.u-textPilcrow:before{content:'\00b6';color:#bdcbd5;padding:0 .1875rem}.u-textTab{position:relative;display:inline-block;width:1.2em;text-align:center}.u-textTab:before{content:'\21E5';color:#bdcbd5}.u-textSpace{position:relative}.u-textSpace:before{position:absolute;content:'.';color:#bdcbd5}.Grid{display:block;font-size:0;margin:0;padding:0;text-align:left}.Grid--alignCenter{text-align:center}.Grid--alignRight{text-align:right}.Grid--alignMiddle>.Grid-cell{vertical-align:middle}.Grid--alignBottom>.Grid-cell{vertical-align:bottom}.Grid--withGutter{margin:0 -10px}.Grid--withGutter>.Grid-cell{padding:0 10px}.Grid-cell{box-sizing:border-box;display:inline-block;font-size:1rem;margin:0;padding:0;text-align:left;vertical-align:top;width:100%}.Grid-cell--center{display:block;margin:0 auto}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}hr{box-sizing:content-box;height:0}pre{overflow:auto}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}::-webkit-input-placeholder{color:#aab7c0}:-moz-placeholder,::-moz-placeholder{color:#aab7c0}:-ms-input-placeholder{color:#aab7c0}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:none}button{background:0 0;border:0;padding:0;text-align:inherit}button:focus{outline:none}fieldset{border:0;margin:0;padding:0}input[type="text"],input[type="password"],input[type="date"],input[type="datetime"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="time"],input[type="url"],textarea{-webkit-appearance:none;outline:none}@-ms-viewport{width:device-width}@viewport{width:device-width}html{font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;box-sizing:border-box;color:#444c54}*,*:before,*:after{box-sizing:inherit}body{min-width:320px;background:#eef0f2}h1,h2,h3,h4,h5,h6{font-size:16px;margin:0;color:#416988}a{color:#4e9fdd;text-decoration:none;cursor:pointer}a:hover,a:focus{color:#468fc7}a:active{color:#3e7fb1}ol,ul{list-style:none;margin:0;padding:0}ul:empty,ol:empty{display:none}img{max-width:100%}svg:not(:root){overflow:hidden}figure{margin:0}figcaption{color:gray}hr{width:100%;border-bottom:1px solid;border-color:rgba(65,105,136,.12);margin:rhythm(1)0;background:0 0}hr,iframe{border:0}[tabindex="-1"]:focus{outline:none!important}code{font-family:Monaco,Courier,monospace;margin:0;padding:0 .1875rem}code,kbd,pre{font-size:.8125rem;font-weight:400;color:#4d4d4d}pre,samp{font-family:Monaco,Courier,monospace;padding:0 .1875rem}samp{font-size:.8125rem;font-weight:400;color:#4d4d4d}samp,blockquote,dl,dd,p,pre{margin:0}kbd{margin:0 .1875rem;padding:.1875rem .5625rem;border:1px solid rgba(65,105,136,.07);border-bottom:3px solid rgba(65,105,136,.2);border-radius:.375rem;background-color:#fff;background-clip:padding;white-space:nowrap;display:inline-block;text-transform:uppercase;font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif}.ButtonGroup{display:block;font-size:0;margin:0;list-style:none;padding:0}.ButtonGroup-item{display:block;font-size:1rem}.ButtonGroup-item>.Button{display:block;width:100%}.ButtonGroup-item>.Button:hover,.ButtonGroup-item>.Button:focus,.ButtonGroup-item>.Button:active,.ButtonGroup-item>.Button.is-pressed{z-index:1}.ButtonGroup--hz>.ButtonGroup-item{display:inline-block}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item{margin-top:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:first-child{margin-top:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:not(:first-child):not(:last-child)>.Button{border-radius:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:first-child:not(:only-child)>.Button{border-bottom-left-radius:0;border-bottom-right-radius:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:last-child:not(:only-child)>.Button{border-top-left-radius:0;border-top-right-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item{margin-left:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:first-child{margin-left:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:not(:first-child):not(:last-child)>.Button{border-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:first-child:not(:only-child)>.Button{border-bottom-right-radius:0;border-top-right-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:last-child:not(:only-child)>.Button{border-bottom-left-radius:0;border-top-left-radius:0}.ButtonGroup--hz>.ButtonGroup-item{vertical-align:middle}.ButtonGroup--round .ButtonGroup-item:first-child .Button{border-top-left-radius:100px;border-bottom-left-radius:100px}.ButtonGroup--round .ButtonGroup-item:last-child .Button{border-top-right-radius:100px;border-bottom-right-radius:100px}.Button{-webkit-appearance:none;background:0 0;border-color:currentcolor;border-style:solid;border-width:0;box-sizing:border-box;color:transparent;cursor:pointer;display:inline-block;font:inherit;line-height:normal;margin:0;padding:.375rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:normal}.Button::-moz-focus-inner{border:0;padding:0}.Button:focus{outline:5px auto -webkit-focus-ring-color}.Button:hover,.Button:focus,.Button:active{text-decoration:none}.Button:disabled,.Button.is-disabled{cursor:default;opacity:.6}.Button{-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1)}.Button:focus{outline:none}.Button:disabled,.Button.is-disabled{pointer-events:none}.Button--default{background-color:#e3e9ed}.Button--default:hover,.Button--default:focus{background-color:#ccd2d5}.Button--default:active,.Button--default.is-active{background-color:#c1c6c9}.Button--primary{color:#fff;background-color:#4e9fdd}.Button--primary:hover,.Button--primary:focus{background-color:#468fc7}.Button--primary:active,.Button--primary.is-active{background-color:#4287bc}.Button--secondary{color:#fff;background-color:#416988}.Button--secondary:hover,.Button--secondary:focus{background-color:#3b5f7a}.Button--secondary:active,.Button--secondary.is-active{background-color:#375974}.Button--highlight{color:#fff;background-color:#4e9fdd}.Button--highlight:hover,.Button--highlight:focus{background-color:#468fc7}.Button--highlight:active,.Button--highlight.is-active{background-color:#4287bc}.Button--success{color:#fff;background-color:#70a98b}.Button--success:hover,.Button--success:focus{background-color:#65987d}.Button--success:active,.Button--success.is-active{background-color:#5f9076}.Button--unsure{color:#fff;background-color:#e0c350}.Button--unsure:hover,.Button--unsure:focus{background-color:#cab048}.Button--unsure:active,.Button--unsure.is-active{background-color:#bea644}.Button--neutral{color:#fff;background-color:#a0b4c4}.Button--neutral:hover,.Button--neutral:focus{background-color:#90a2b0}.Button--neutral:active,.Button--neutral.is-active{background-color:#8899a7}.Button--warning{color:#fff;background-color:#e3824e}.Button--warning:hover,.Button--warning:focus{background-color:#cc7546}.Button--warning:active,.Button--warning.is-active{background-color:#c16f42}.Button--danger{color:#fff;background-color:#e0575b}.Button--danger:hover,.Button--danger:focus{background-color:#ca4e52}.Button--danger:active,.Button--danger.is-active{background-color:#be4a4d}.Button--snug{padding:.1875rem .375rem}.Button--small{padding:.1875rem .75rem}.Dropdown{position:relative;z-index:100;display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Dropdown.is-active{z-index:900}.Dropdown-toggleIcon{display:inline-block;-webkit-transition:all .2s cubic-bezier(.175,.885,.32,1.275);transition:all .2s cubic-bezier(.175,.885,.32,1.275);text-align:center}.Dropdown.is-active .Dropdown-toggleIcon{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.Dropdown-content{position:absolute;z-index:800;top:100%;left:0;visibility:hidden;float:left;min-width:100%;margin:0;padding:0;-webkit-transition:all .2s cubic-bezier(.175,.885,.32,1.275);transition:all .2s cubic-bezier(.175,.885,.32,1.275);-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);text-align:left;opacity:0;background-color:#fff;background-clip:padding-box;box-shadow:0 0 1.5rem rgba(0,0,0,.1)}.Dropdown-content--Bordered{border:1px solid rgba(65,105,136,.12);border-bottom-width:2px}.Dropdown.is-active>.Dropdown-content{visibility:visible;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1}.Dropdown-title{font-size:.875rem;padding:.1875rem .375rem;background-color:transparent;border-bottom:1px solid rgba(65,105,136,.12);color:#8da5b8}.Dropdown-item{display:block;padding:.1875rem .375rem;-webkit-transition:all .2s ease-out;transition:all .2s ease-out;color:#4e9fdd}.Dropdown-item:hover{color:#fff;background-color:#4e9fdd}.Dropdown--right .Dropdown-content{left:auto;right:0}.Header{background-color:#4e9fdd;position:fixed;z-index:100;width:100%;top:0;box-shadow:0 .375rem 1.5rem rgba(0,0,0,.1)}.Header-item{height:3rem;display:inline-block;padding-top:.75rem;padding-bottom:.75rem}.Header-avatar{margin-top:.5625rem;margin-bottom:.5625rem;width:1.875rem;height:1.875rem;display:inline-block}.h1,.h2,.h3,.h4,.h5,.h6{font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;font-weight:600}.h1{font-size:36px}.h2{font-size:28px}.h3{font-size:24px}.h4{font-size:20px}.h5{font-size:18px}.h6{font-size:16px}.Icon{text-align:center;display:inline-block;-webkit-transition:.25s all cubic-bezier(.175,.885,.32,1.275);transition:.25s all cubic-bezier(.175,.885,.32,1.275)}.Icon.is-rotated{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.Icon-item{vertical-align:-25%;display:inline-block;width:1.5rem;height:1.5rem;fill:currentColor!important}.Icon--xlg .Icon-item{width:3rem;height:3rem}.Icon--lg .Icon-item{width:2.25rem;height:2.25rem}.Icon--sm .Icon-item{vertical-align:-15%;width:1.125rem;height:1.125rem}.Icon--xsm .Icon-item{vertical-align:-5%;width:.75rem;height:.75rem}.Icon--stroked .Icon-item{fill:none;stroke:currentColor;stroke-width:3}.Link{color:#4e9fdd;text-decoration:none;cursor:pointer}.Link:hover,.Link:focus{color:#468fc7}.Link:active{color:#3e7fb1}.Link--invert{opacity:.8}.Link--invert,.Link--invert:hover,.Link--invert:focus{color:#fff!important}.Link--invert:hover,.Link--invert:focus{opacity:1}.Link--invert:active,.Link--invert.is-active{opacity:.6}.Link--success{color:#70a98b!important}.Link--success:hover,.Link--success:focus{color:#4e7661 !important}.Link--success:active,.Link--success.is-active{color:#2d4438 !important}.Link--unsure{color:#e0c350!important}.Link--unsure:hover,.Link--unsure:focus{color:#9d8938 !important}.Link--unsure:active,.Link--unsure.is-active{color:#5a4e20 !important}.Link--neutral{color:#bdcbd5 !important}.Link--neutral:hover,.Link--neutral:focus{color:#848e95 !important}.Link--neutral:active,.Link--neutral.is-active{color:#4c5155 !important}.Link--warning{color:#e3824e!important}.Link--warning:hover,.Link--warning:focus{color:#9f5b37 !important}.Link--warning:active,.Link--warning.is-active{color:#5b341f !important}.Link--danger{color:#e0575b!important}.Link--danger:hover,.Link--danger:focus{color:#9d3d40 !important}.Link--danger:active,.Link--danger.is-active{color:#5a2324 !important}.LogoLoader{position:relative;display:inline-block;overflow:hidden;width:2.25rem;height:2.25rem;color:#4e9fdd;border-radius:100px;background-color:#fff}.LogoLoader--inverted{color:#fff;background-color:#4e9fdd}.LogoLoader.is-loading{-webkit-animation:rotate .3s infinite linear;animation:rotate .3s infinite linear;-webkit-animation-delay:.05s;animation-delay:.05s}.LogoLoader-logo{-ms-transform:scale(1,1)}.LogoLoader-logo,.LogoLoader-loader{position:absolute;top:0;left:0;-webkit-transition:all .25s cubic-bezier(.175,.885,.32,1.275);transition:all .25s cubic-bezier(.175,.885,.32,1.275);fill:currentColor}.LogoLoader-logo{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);opacity:1}.LogoLoader:hover .LogoLoader-logo{-webkit-animation:pop .3s cubic-bezier(.175,.885,.32,1.275);animation:pop .3s cubic-bezier(.175,.885,.32,1.275);-webkit-animation-iteration-count:2;animation-iteration-count:2;-webkit-animation-direction:alternate;animation-direction:alternate}.LogoLoader.is-loading .LogoLoader-logo{-webkit-transform:scale(0,0);-ms-transform:scale(0,0);transform:scale(0,0);opacity:0}.LogoLoader-loader{-webkit-transform:scale(2.5,2.5);-ms-transform:scale(2.5,2.5);transform:scale(2.5,2.5);opacity:0}.LogoLoader.is-loading .LogoLoader-loader{-webkit-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1);opacity:1}@-webkit-keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes pop{to{-webkit-transform:scale(1.2,1.2)rotate(15deg);transform:scale(1.2,1.2)rotate(15deg)}}@keyframes pop{to{-webkit-transform:scale(1.2,1.2)rotate(15deg);transform:scale(1.2,1.2)rotate(15deg)}}.Progressbar{position:relative;width:100%;margin:0;background-color:#bdcbd5}.Progressbar,.Progressbar--sm{height:.75rem}.Progressbar--lg{height:1.5rem}.Progressbar-item{position:absolute;left:0;z-index:100;margin:0;padding:0;width:100%;height:100%;list-style:none}.Progressbar-approved{background-color:#4e9fdd;z-index:200}.Progressbar-translated{background-color:#70a98b}.Progressbar-needsWork{background-color:#e0c350}.Progressbar-untranslated{background-color:#bdcbd5}.Modal{position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;display:block;visibility:hidden;overflow:auto;overflow-y:scroll;width:100%;height:100%;margin:0 auto;padding:4.5rem 1.5rem 1.5rem;-webkit-transition:all .15s linear;transition:all .15s linear;opacity:0;background-color:rgba(238,240,242,.95);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:75rem;perspective:75rem;-webkit-overflow-scrolling:touch}.Modal.is-active{visibility:visible;opacity:1}.Modal-dialog{position:relative;width:90%;top:50%;left:50%;max-height:100%;min-width:300px;max-width:45rem;-webkit-transition:all .25s cubic-bezier(.175,.885,.32,1.1);transition:all .25s cubic-bezier(.175,.885,.32,1.1);-webkit-transform:translateX(-50%)translateY(100%);-ms-transform:translateX(-50%)translateY(100%);transform:translateX(-50%)translateY(100%);-webkit-transform-origin:0;-ms-transform-origin:0;transform-origin:0;background-color:#f8f9fa}.Modal.is-active .Modal-dialog{-webkit-transform:translateX(-50%)translateY(-50%);-ms-transform:translateX(-50%)translateY(-50%);transform:translateX(-50%)translateY(-50%)}.Modal-header{position:fixed;top:-3rem;left:0;right:0;border:1px solid rgba(65,105,136,.12);background-color:#fff;z-index:100}.Modal-title{font-size:1.375rem;font-weight:300;line-height:1.5rem;margin:0;padding:.75rem 2.25rem .75rem 1.5rem}.Modal-close{position:absolute;top:0;right:0;width:3rem;height:3rem;-webkit-transition:all .25s ease-out;transition:all .25s ease-out;text-align:center;border-left:1px solid rgba(65,105,136,.12)}.Modal-close:hover{background-color:rgba(65,105,136,.05)}.Modal-close:active{background-color:rgba(65,105,136,.1)}.Modal-content{position:relative;max-height:100%;overflow:auto;background-clip:padding-box;border:1px solid rgba(65,105,136,.12);border-top-color:transparent;border-bottom-width:2px}.Modal-container.is-modal{overflow:hidden;height:100%}.Toggle,.Toggle-label{cursor:pointer}.Toggle{position:relative;display:inline-block;min-width:2.0625rem;margin:0 .09375rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top}.Toggle-checkbox{position:absolute;cursor:none;top:0;left:0;width:100%;height:100%;opacity:0}.Toggle-label{font-weight:600;display:block;position:relative;padding:0 .5625rem;-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);text-align:center;color:currentColor}.Toggle-fakeCheckbox{opacity:1;position:absolute;top:0;left:0;width:100%;height:100%;content:'';background-color:transparent}.Toggle:hover>.Toggle-fakeCheckbox,.Toggle-checkbox:focus~.Toggle-fakeCheckbox{background-color:currentColor;opacity:.2}.Toggle-checkbox:checked~.Toggle-label,.Toggle.is-active~.Toggle-label{color:#fff}.Toggle-checkbox:checked~.Toggle-fakeCheckbox,.Toggle.is-active>.Toggle-fakeCheckbox{background-color:currentColor}.Toggle:hover>.Toggle-checkbox:checked~.Toggle-fakeCheckbox,.Toggle-checkbox:checked:focus~.Toggle-fakeCheckbox,.Toggle.is-active:hover>.Toggle-fakeCheckbox{opacity:.8}.TransUnit{position:relative;margin:0;padding:0;cursor:text;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-bottom:1px solid rgba(65,105,136,.12)}.TransUnit:focus{outline:0;box-shadow:none}.TransUnit.is-focused{z-index:100!important;opacity:1!important;background-color:#fff}.TransUnit:before,.TransUnit:after{position:absolute;z-index:-1;left:0;visibility:hidden;width:100%;height:1.5rem;content:'';-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);opacity:0;background-color:#fff;background-clip:padding-box}.TransUnit:before{box-shadow:0 -.375rem .75rem rgba(0,0,0,.04);-webkit-transform-origin:bottom;-ms-transform-origin:bottom;transform-origin:bottom;top:-1.125rem}.TransUnit:after{box-shadow:0 .375rem .75rem rgba(0,0,0,.04);-webkit-transform-origin:top;-ms-transform-origin:top;transform-origin:top;bottom:-1.125rem}.TransUnit.is-focused:before,.TransUnit.is-focused:after{visibility:visible;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1);opacity:1}.TransUnit.is-first{border-top:1px solid rgba(65,105,136,.12)}.TransUnit-container.is-unit-selected .TransUnit{opacity:.8}.TransUnit-panel{padding-top:1.125rem;padding-bottom:1.125rem;padding-left:1.5rem;list-style:none;vertical-align:top}.TransUnit-panel,.TransUnit-item{position:relative}.TransUnit-source{cursor:pointer;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.TransUnit.is-focused .TransUnit-source{cursor:text}.TransUnit-translation{cursor:text;background-color:#fff}.TransUnit-panelHeader,.TransUnit-panelFooter,.TransUnit-itemHeader{position:absolute;z-index:200;right:0;left:0;width:100%;padding-right:1.125rem;padding-left:1.125rem;cursor:default}.TransUnit-panelHeader,.TransUnit-panelFooter{visibility:hidden;-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);opacity:0}.TransUnit.is-focused .TransUnit-panelHeader,.TransUnit.is-focused .TransUnit-panelFooter{visibility:visible;opacity:1}.TransUnit-panelHeader{top:-1.125rem}.TransUnit-itemHeader{top:0}.TransUnit-panelFooter{bottom:-1.125rem}.TransUnit-heading{font-size:1rem;font-weight:400;line-height:2.25rem;display:inline-block;float:left;margin:0;vertical-align:top;text-transform:uppercase}.TransUnit-text{font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;overflow:hidden;width:100%;min-height:1.5rem;margin:0;padding:1.125rem;resize:none;-webkit-transition:height .1s cubic-bezier(.075,.82,.165,1);transition:height .1s cubic-bezier(.075,.82,.165,1);white-space:pre-wrap;word-wrap:break-word;-moz-tab-size:8;tab-size:8;color:#444c54;border:none;background-color:transparent;box-shadow:none;-webkit-appearance:none}.TransUnit-text:focus{border:none;outline:none;background-color:transparent}.TransUnit-text span{font-weight:400!important;font-style:normal!important}.TransUnit-status,.TransUnit-status:before{position:absolute;z-index:200;left:0;width:1.5rem;background-color:#bdcbd5;-webkit-transition:all .4s linear;transition:all .4s linear}.TransUnit-status{top:-1;bottom:-1}.TransUnit-status.is-loading,.TransUnit-status.is-loading:before{background-image:-webkit-repeating-linear-gradient(45deg,transparent,transparent .375rem,rgba(255,255,255,.5).375rem,rgba(255,255,255,.5).75rem);background-image:repeating-linear-gradient(45deg,transparent,transparent .375rem,rgba(255,255,255,.5).375rem,rgba(255,255,255,.5).75rem);background-size:100% 1000px;-webkit-animation:loading 7s linear;animation:loading 7s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.TransUnit-status:before{top:-1.125rem;height:100%;padding-top:1.125rem;padding-bottom:1.125rem;box-sizing:content-box;z-index:300;visibility:hidden;content:'';-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);-webkit-transform:scaleY(.65);-ms-transform:scaleY(.65);transform:scaleY(.65)}.TransUnit.is-focused .TransUnit-status:before{visibility:visible;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}.TransUnit--highlight .TransUnit-status,.TransUnit--highlight .TransUnit-status:before{background-color:#4e9fdd}.TransUnit--success .TransUnit-status,.TransUnit--success .TransUnit-status:before{background-color:#70a98b}.TransUnit--unsure .TransUnit-status,.TransUnit--unsure .TransUnit-status:before{background-color:#e0c350}.TransUnit--warning .TransUnit-status,.TransUnit--warning .TransUnit-status:before{background-color:#e3824e}.TransUnit--danger .TransUnit-status,.TransUnit--danger .TransUnit-status:before{background-color:#e0575b}.TransUnit-metaData{position:relative;right:0;left:0;height:100%;text-align:center}.TransUnit-metaDataItem{line-height:1.125rem}.TransUnit-metaDataButton{font-size:.75rem;line-height:.6000000000000001rem;opacity:.8}.TransUnit-metaDataButton:hover{opacity:1}.TransUnit-metaDataComments,.TransUnit-metaDataErrors{position:absolute;right:0;left:0}.TransUnit-metaDataComments{top:1.125rem}.TransUnit-metaDataErrors{top:2.625rem}.TransUnit-metaDataErrorsIcon{text-shadow:0 0 2px #fff}@media (min-width:0) and (max-width:740px){.TransUnit-Heading{padding-left:1.5rem}}@media (min-width:741px){.TransUnit,.TransUnit-item{display:table;width:100%;table-layout:fixed}.TransUnit-panel{display:table-cell;width:50%;padding-left:0}.TransUnit-source{padding-right:.75rem}.TransUnit-translation{padding-left:.75rem}.TransUnit-panelHeader--source,.TransUnit-panelFooter--source{padding-right:1.875rem;right:auto}.TransUnit-panelHeader--translation,.TransUnit-panelFooter--translation{padding-left:1.875rem;left:auto}.TransUnit-status,.TransUnit-status:before,.TransUnit-status:after{left:50%;margin-left:-.75rem}}@-webkit-keyframes loading{0%{background-position:0 0}100%{background-position:0 1000px}}@keyframes loading{0%{background-position:0 0}100%{background-position:0 1000px}}.Editor{overflow:hidden}.Editor-header,.Editor-loader,.Editor-content{-webkit-transition:.2s all cubic-bezier(.175,.885,.32,1.275);transition:.2s all cubic-bezier(.175,.885,.32,1.275)}.Editor-header.is-minimised{-webkit-transform:translateY(-3rem);-ms-transform:translateY(-3rem);transform:translateY(-3rem)}.Editor-header.is-minimised .Editor-mainNav{visibility:hidden}.Editor-loader{position:absolute;z-index:900;top:0;left:50%;-webkit-transform:translate(-50%,.375rem);-ms-transform:translate(-50%,.375rem);transform:translate(-50%,.375rem)}.Editor-loader.is-minimised{-webkit-transform:translateX(-50%)scale(.75,.75);-ms-transform:translateX(-50%)scale(.75,.75);transform:translateX(-50%)scale(.75,.75)}.Editor-mainNav{height:3rem}.Editor-content{position:fixed;top:6rem;bottom:0;overflow:auto;overflow-y:scroll;width:100%;-webkit-overlow-scrolling:touch}.Editor-content.is-maximised{bottom:-3rem;-webkit-transform:translateY(-3rem);-ms-transform:translateY(-3rem);transform:translateY(-3rem)}.Editor-translations{min-height:100%;padding:3rem 0;background:-webkit-linear-gradient(left,#dde4ea ,#dde4ea);background:linear-gradient(left,#dde4ea ,#dde4ea);background-position:left center;background-size:1.5rem 100%;background-repeat:no-repeat}.Editor-currentDoc,.Editor-currentLang{max-width:5.25rem}@media (min-width:0) and (max-width:740px){.Editor-currentProject{max-width:5.25rem}}@media (min-width:741px){.Editor-translations{background:-webkit-linear-gradient(left,#dde4ea ,#dde4ea),-webkit-linear-gradient(left,#fff,#fff);background:linear-gradient(to right,#dde4ea ,#dde4ea),linear-gradient(to right,#fff,#fff);background-position:center,right;background-size:1.5rem 100%,50% 100%;background-repeat:no-repeat}}.fade{-webkit-transition:opacity .25s easein;transition:opacity .25s easein;opacity:0}.fade.in{opacity:1}[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none!important} \ No newline at end of file +.u-cf:before,.u-cf:after{content:" ";display:table}.u-cf:after{clear:both}.u-nbfc{overflow:hidden!important}.u-nbfcAlt{display:table-cell!important;width:10000px!important}.u-floatLeft{float:left!important}.u-floatRight{float:right!important}@media (min-width:0) and (max-width:740px){.u-sm-floatNone{clear:both;float:none!important}}.u-bgFaint{opacity:.9}.u-bgHigh{background-color:#f5f6f7}.u-bgHigher{background-color:#fefefe}.u-bgHighest{background-color:#fff}.u-bgLow{background-color:#e5e8e9}.u-bgLower{background-color:#dee1e2}.u-bgLowest{background-color:#d7d9da}.u-bgPop{border:1px solid rgba(32,113,138,.12);border-bottom-width:2px}.u-bgNeutral{background-color:#ECEFF0}.u-bgPrimary{background-color:#03A6D7}.u-bgSecondary{background-color:#20718A}.u-bgDanger{background-color:#ffd8d8}.u-bgWarning{background-color:#fec}.u-bgUnsure{background-color:#fdfce8}.u-bgSuccess{background-color:#def4e5}.u-bgHighlight{background-color:#cdedf7}.u-block{display:block!important}.u-hidden{display:none!important}.u-hiddenVisually{position:absolute!important;overflow:hidden!important;width:1px!important;height:1px!important;padding:0!important;border:0!important;clip:rect(1px,1px,1px,1px)!important}.u-inline{display:inline!important}.u-inlineBlock{display:inline-block!important;max-width:100%}.u-table{display:table!important}.u-tableCell{display:table-cell!important}.u-tableRow{display:table-row!important}.u-round{border-radius:1000px!important}.u-round,.u-roundish{overflow:hidden!important}.u-roundish{border-radius:.5625rem!important}.u-rounded{border-radius:1.125rem!important;overflow:hidden!important}@media (min-width:0) and (max-width:740px){.u-sm-hidden{display:none!important}}@media (min-width:741px) and (max-width:960px){.u-md-hidden{display:none!important}}@media (max-width:960px){.u-ltemd-hidden{display:none!important}}@media (min-width:741px){.u-gtemd-hidden{display:none!important}}@media (min-width:961px) and (max-width:1270px){.u-lg-hidden{display:none!important}}@media (min-width:961px){.u-gtelg-hidden{display:none!important}}.u-dlUnstyled>dd{margin-left:0}.u-dlInline dt,.u-dlInline dd{display:inline-block;margin-right:.1875rem;margin-left:0}.u-listUnstyled{margin-bottom:0;padding-left:0;list-style:none}.u-listUnstyled>li{margin-left:0;list-style:none}.u-listInline{margin-left:-.1875rem;padding-left:0;list-style:none}.u-listInline>li{display:inline-block;padding-right:.1875rem;padding-left:.1875rem}.u-listHorizontal{font-size:0;list-style:none}.u-listHorizontal>li{font-size:1rem;display:inline-block;vertical-align:top}.u-posAbsolute,.u-posAbsoluteCenter{position:absolute!important}.u-posAbsoluteCenter{bottom:0!important;left:0!important;margin:auto!important;right:0!important;top:0!important}.u-posFixed{position:fixed!important;-webkit-backface-visibility:hidden;backface-visibility:hidden}.u-posRelative{position:relative!important}.u-posStatic{position:static!important}.u-posAbsoluteLeft{left:0!important}.u-posAbsoluteLeft,.u-posAbsoluteRight{bottom:0!important;position:absolute!important;top:0!important}.u-posAbsoluteRight{right:0!important}.u-sizeFit{display:block!important;float:left!important;width:auto!important}.u-sizeFitAlt{float:right!important}.u-sizeFitAlt,.u-sizeFill{display:block!important;width:auto!important}.u-sizeFill{overflow:hidden!important}.u-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-size1of12{width:8.333333333333332%!important}.u-size1of10{width:10%!important}.u-size1of8{width:12.5%!important}.u-size1of6,.u-size2of12{width:16.666666666666664%!important}.u-size1of5,.u-size2of10{width:20%!important}.u-size1of4,.u-size2of8,.u-size3of12{width:25%!important}.u-size3of10{width:30%!important}.u-size1of3,.u-size2of6,.u-size4of12{width:33.33333333333333%!important}.u-size3of8{width:37.5%!important}.u-size2of5,.u-size4of10{width:40%!important}.u-size5of12{width:41.66666666666667%!important}.u-size1of2,.u-size2of4,.u-size3of6,.u-size4of8,.u-size5of10,.u-size6of12{width:50%!important}.u-size7of12{width:58.333333333333336%!important}.u-size3of5,.u-size6of10{width:60%!important}.u-size5of8{width:62.5%!important}.u-size2of3,.u-size4of6,.u-size8of12{width:66.66666666666666%!important}.u-size7of10{width:70%!important}.u-size3of4,.u-size6of8,.u-size9of12{width:75%!important}.u-size4of5,.u-size8of10{width:80%!important}.u-size5of6,.u-size10of12{width:83.33333333333334%!important}.u-size7of8{width:87.5%!important}.u-size9of10{width:90%!important}.u-size11of12{width:91.66666666666666%!important}@media (min-width:0) and (max-width:740px){.u-sm-sizeFit{display:block!important;float:left!important;width:auto!important}.u-sm-sizeFitAlt{float:right!important}.u-sm-sizeFitAlt,.u-sm-sizeFill{display:block!important;width:auto!important}.u-sm-sizeFill{overflow:hidden!important}.u-sm-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-sm-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-sm-size1of12{width:8.333333333333332%!important}.u-sm-size1of10{width:10%!important}.u-sm-size1of8{width:12.5%!important}.u-sm-size1of6,.u-sm-size2of12{width:16.666666666666664%!important}.u-sm-size1of5,.u-sm-size2of10{width:20%!important}.u-sm-size1of4,.u-sm-size2of8,.u-sm-size3of12{width:25%!important}.u-sm-size3of10{width:30%!important}.u-sm-size1of3,.u-sm-size2of6,.u-sm-size4of12{width:33.33333333333333%!important}.u-sm-size3of8{width:37.5%!important}.u-sm-size2of5,.u-sm-size4of10{width:40%!important}.u-sm-size5of12{width:41.66666666666667%!important}.u-sm-size1of2,.u-sm-size2of4,.u-sm-size3of6,.u-sm-size4of8,.u-sm-size5of10,.u-sm-size6of12{width:50%!important}.u-sm-size7of12{width:58.333333333333336%!important}.u-sm-size3of5,.u-sm-size6of10{width:60%!important}.u-sm-size5of8{width:62.5%!important}.u-sm-size2of3,.u-sm-size4of6,.u-sm-size8of12{width:66.66666666666666%!important}.u-sm-size7of10{width:70%!important}.u-sm-size3of4,.u-sm-size6of8,.u-sm-size9of12{width:75%!important}.u-sm-size4of5,.u-sm-size8of10{width:80%!important}.u-sm-size5of6,.u-sm-size10of12{width:83.33333333333334%!important}.u-sm-size7of8{width:87.5%!important}.u-sm-size9of10{width:90%!important}.u-sm-size11of12{width:91.66666666666666%!important}}@media (min-width:741px) and (max-width:960px){.u-md-sizeFit{display:block!important;float:left!important;width:auto!important}.u-md-sizeFitAlt{float:right!important}.u-md-sizeFitAlt,.u-md-sizeFill{display:block!important;width:auto!important}.u-md-sizeFill{overflow:hidden!important}.u-md-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-md-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-md-size1of12{width:8.333333333333332%!important}.u-md-size1of10{width:10%!important}.u-md-size1of8{width:12.5%!important}.u-md-size1of6,.u-md-size2of12{width:16.666666666666664%!important}.u-md-size1of5,.u-md-size2of10{width:20%!important}.u-md-size1of4,.u-md-size2of8,.u-md-size3of12{width:25%!important}.u-md-size3of10{width:30%!important}.u-md-size1of3,.u-md-size2of6,.u-md-size4of12{width:33.33333333333333%!important}.u-md-size3of8{width:37.5%!important}.u-md-size2of5,.u-md-size4of10{width:40%!important}.u-md-size5of12{width:41.66666666666667%!important}.u-md-size1of2,.u-md-size2of4,.u-md-size3of6,.u-md-size4of8,.u-md-size5of10,.u-md-size6of12{width:50%!important}.u-md-size7of12{width:58.333333333333336%!important}.u-md-size3of5,.u-md-size6of10{width:60%!important}.u-md-size5of8{width:62.5%!important}.u-md-size2of3,.u-md-size4of6,.u-md-size8of12{width:66.66666666666666%!important}.u-md-size7of10{width:70%!important}.u-md-size3of4,.u-md-size6of8,.u-md-size9of12{width:75%!important}.u-md-size4of5,.u-md-size8of10{width:80%!important}.u-md-size5of6,.u-md-size10of12{width:83.33333333333334%!important}.u-md-size7of8{width:87.5%!important}.u-md-size9of10{width:90%!important}.u-md-size11of12{width:91.66666666666666%!important}}@media (min-width:961px) and (max-width:1270px){.u-lg-sizeFit{display:block!important;float:left!important;width:auto!important}.u-lg-sizeFitAlt{float:right!important}.u-lg-sizeFitAlt,.u-lg-sizeFill{display:block!important;width:auto!important}.u-lg-sizeFill{overflow:hidden!important}.u-lg-sizeFillAlt{display:table-cell!important;max-width:100%!important;width:10000px!important}.u-lg-sizeFull{box-sizing:border-box!important;display:block!important;width:100%!important}.u-lg-size1of12{width:8.333333333333332%!important}.u-lg-size1of10{width:10%!important}.u-lg-size1of8{width:12.5%!important}.u-lg-size1of6,.u-lg-size2of12{width:16.666666666666664%!important}.u-lg-size1of5,.u-lg-size2of10{width:20%!important}.u-lg-size1of4,.u-lg-size2of8,.u-lg-size3of12{width:25%!important}.u-lg-size3of10{width:30%!important}.u-lg-size1of3,.u-lg-size2of6,.u-lg-size4of12{width:33.33333333333333%!important}.u-lg-size3of8{width:37.5%!important}.u-lg-size2of5,.u-lg-size4of10{width:40%!important}.u-lg-size5of12{width:41.66666666666667%!important}.u-lg-size1of2,.u-lg-size2of4,.u-lg-size3of6,.u-lg-size4of8,.u-lg-size5of10,.u-lg-size6of12{width:50%!important}.u-lg-size7of12{width:58.333333333333336%!important}.u-lg-size3of5,.u-lg-size6of10{width:60%!important}.u-lg-size5of8{width:62.5%!important}.u-lg-size2of3,.u-lg-size4of6,.u-lg-size8of12{width:66.66666666666666%!important}.u-lg-size7of10{width:70%!important}.u-lg-size3of4,.u-lg-size6of8,.u-lg-size9of12{width:75%!important}.u-lg-size4of5,.u-lg-size8of10{width:80%!important}.u-lg-size5of6,.u-lg-size10of12{width:83.33333333333334%!important}.u-lg-size7of8{width:87.5%!important}.u-lg-size9of10{width:90%!important}.u-lg-size11of12{width:91.66666666666666%!important}}.u-sizeWidth-1-4{width:.375rem!important}.u-sizeWidth-1-2{width:.75rem!important}.u-sizeWidth-3-4{width:1.125rem!important}.u-sizeWidth-1{width:1.5rem!important}.u-sizeWidth-1_1-2{width:2.25rem!important}.u-sizeWidth-2{width:3rem!important}.u-sizeWidth-6{width:9rem!important}.u-sizeHeight-1-4{height:.375rem!important}.u-sizeHeight-1-2{height:.75rem!important}.u-sizeHeight-3-4{height:1.125rem!important}.u-sizeHeight-1{height:1.5rem!important}.u-sizeHeight-1_1-4{height:1.875rem!important}.u-sizeHeight-1_1-2{height:2.25rem!important}.u-sizeHeight-2{height:3rem!important}.u-sizeLineHeight-1-4{line-height:.375rem!important}.u-sizeLineHeight-1-2{line-height:.75rem!important}.u-sizeLineHeight-3-4{line-height:1.125rem!important}.u-sizeLineHeight-1{line-height:1.5rem!important}.u-sizeLineHeight-1_1-4{line-height:1.875rem!important}.u-sizeLineHeight-1_1-2{line-height:2.25rem!important}.u-sizeLineHeight-2{line-height:3rem!important}.u-sM-1-8{margin:.1875rem!important}.u-sM-1-4{margin:.375rem!important}.u-sM-1-2{margin:.75rem!important}.u-sM-3-4{margin:1.125rem!important}.u-sM-1{margin:1.5rem!important}.u-sM-1_1-2{margin:2.25rem!important}.u-sM-2{margin:3rem!important}.u-sMT-1-4{margin-top:.375rem!important}.u-sMT-1-2{margin-top:.75rem!important}.u-sMT-3-4{margin-top:1.125rem!important}.u-sMT-1{margin-top:1.5rem!important}.u-sMT-1_1-2{margin-top:2.25rem!important}.u-sMT-2{margin-top:3rem!important}.u-sMR-1-4{margin-right:.375rem!important}.u-sMR-1-2{margin-right:.75rem!important}.u-sMR-3-4{margin-right:1.125rem!important}.u-sMR-1{margin-right:1.5rem!important}.u-sMR-1_1-2{margin-right:2.25rem!important}.u-sMR-2{margin-right:3rem!important}.u-sMB-1-4{margin-bottom:.375rem!important}.u-sMB-1-2{margin-bottom:.75rem!important}.u-sMB-3-4{margin-bottom:1.125rem!important}.u-sMB-1{margin-bottom:1.5rem!important}.u-sMB-1_1-2{margin-bottom:2.25rem!important}.u-sMB-2{margin-bottom:3rem!important}.u-sML-1-4{margin-left:.375rem!important}.u-sML-1-2{margin-left:.75rem!important}.u-sML-3-4{margin-left:1.125rem!important}.u-sML-1{margin-left:1.5rem!important}.u-sML-1_1-2{margin-left:2.25rem!important}.u-sML-2{margin-left:3rem!important}.u-sMV-1-4{margin-top:.375rem!important;margin-bottom:.375rem!important}.u-sMV-1-2{margin-top:.75rem!important;margin-bottom:.75rem!important}.u-sMV-3-4{margin-top:1.125rem!important;margin-bottom:1.125rem!important}.u-sMV-1{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.u-sMV-1_1-2{margin-top:2.25rem!important;margin-bottom:2.25rem!important}.u-sMV-2{margin-top:3rem!important;margin-bottom:3rem!important}.u-sMH-1-4{margin-left:.375rem!important;margin-right:.375rem!important}.u-sMH-1-2{margin-left:.75rem!important;margin-right:.75rem!important}.u-sMH-3-4{margin-left:1.125rem!important;margin-right:1.125rem!important}.u-sMH-1{margin-left:1.5rem!important;margin-right:1.5rem!important}.u-sMH-1_1-2{margin-left:2.25rem!important;margin-right:2.25rem!important}.u-sMH-2{margin-left:3rem!important;margin-right:3rem!important}.u-sP-1-4{padding:.375rem!important}.u-sP-1-2{padding:.75rem!important}.u-sP-3-4{padding:1.125rem!important}.u-sP-1{padding:1.5rem!important}.u-sP-1_1-2{padding:2.25rem!important}.u-sP-2{padding:3rem!important}.u-sPT-1-4{padding-top:.375rem!important}.u-sPT-1-2{padding-top:.75rem!important}.u-sPT-3-4{padding-top:1.125rem!important}.u-sPT-1{padding-top:1.5rem!important}.u-sPT-1_1-2{padding-top:2.25rem!important}.u-sPT-2{padding-top:3rem!important}.u-sPR-1-4{padding-right:.375rem!important}.u-sPR-1-2{padding-right:.75rem!important}.u-sPR-3-4{padding-right:1.125rem!important}.u-sPR-1{padding-right:1.5rem!important}.u-sPR-1_1-2{padding-right:2.25rem!important}.u-sPR-2{padding-right:3rem!important}.u-sPB-1-4{padding-bottom:.375rem!important}.u-sPB-1-2{padding-bottom:.75rem!important}.u-sPB-3-4{padding-bottom:1.125rem!important}.u-sPB-1{padding-bottom:1.5rem!important}.u-sPB-1_1-2{padding-bottom:2.25rem!important}.u-sPB-2{padding-bottom:3rem!important}.u-sPL-1-4{padding-left:.375rem!important}.u-sPL-1-2{padding-left:.75rem!important}.u-sPL-3-4{padding-left:1.125rem!important}.u-sPL-1{padding-left:1.5rem!important}.u-sPL-1_1-2{padding-left:2.25rem!important}.u-sPL-2{padding-left:3rem!important}.u-sPV-1-4{padding-top:.375rem!important;padding-bottom:.375rem!important}.u-sPV-1-2{padding-top:.75rem!important;padding-bottom:.75rem!important}.u-sPV-3-4{padding-top:1.125rem!important;padding-bottom:1.125rem!important}.u-sPV-1{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.u-sPV-1_1-2{padding-top:2.25rem!important;padding-bottom:2.25rem!important}.u-sPV-2{padding-top:3rem!important;padding-bottom:3rem!important}.u-sPH-1-4{padding-left:.375rem!important;padding-right:.375rem!important}.u-sPH-1-2{padding-left:.75rem!important;padding-right:.75rem!important}.u-sPH-3-4{padding-left:1.125rem!important;padding-right:1.125rem!important}.u-sPH-1{padding-left:1.5rem!important;padding-right:1.5rem!important}.u-sPH-1_1-2{padding-left:2.25rem!important;padding-right:2.25rem!important}.u-sPH-2{padding-left:3rem!important;padding-right:3rem!important}.u-textBreak{word-wrap:break-word!important}.u-textCenter{text-align:center!important}.u-textLeft{text-align:left!important}.u-textRight{text-align:right!important}.u-textInheritColor{color:inherit!important}.u-textKern{text-rendering:optimizeLegibility;-webkit-font-feature-settings:"kern" 1;-moz-font-feature-settings:"kern" 1;font-feature-settings:"kern" 1;-webkit-font-kerning:normal;-moz-font-kerning:normal;font-kerning:normal}.u-textNoWrap,.u-textTruncate{white-space:nowrap!important}.u-textTruncate{max-width:100%;overflow:hidden!important;text-overflow:ellipsis!important;word-wrap:normal!important}.u-textUpper{text-transform:uppercase}.u-textLower{text-transform:lowercase}.u-textCapitalize{text-transform:capitalize}.u-textInvert{color:#f2f2f2}.u-textMuted{opacity:.6}.u-textMicro{font-size:.75rem}.u-textMini,.u-textMeta{font-size:.875rem}.u-textMeta{color:#90b8c5}.u-textLead{font-size:1.5rem;font-weight:300}.u-textPrimary{color:#03A6D7}.u-textSecondary{color:#20718A}.u-textHighlight{color:#03A6D7}.u-textSuccess{color:#5CCA7B}.u-textUnsure{color:#E9DF1B}.u-textNeutral{color:#a6c6d0}.u-textWarning{color:#FFA800}.u-textDanger{color:#FF3B3D}.u-textPilcrow:before{content:'\00b6';color:#a6c6d0;padding:0 .1875rem}.u-textTab{position:relative;display:inline-block;width:1.2em;text-align:center}.u-textTab:before{content:'\21E5';color:#a6c6d0}.u-textSpace{position:relative}.u-textSpace:before{position:absolute;content:'.';color:#a6c6d0}.Grid{display:block;font-size:0;margin:0;padding:0;text-align:left}.Grid--alignCenter{text-align:center}.Grid--alignRight{text-align:right}.Grid--alignMiddle>.Grid-cell{vertical-align:middle}.Grid--alignBottom>.Grid-cell{vertical-align:bottom}.Grid--withGutter{margin:0 -10px}.Grid--withGutter>.Grid-cell{padding:0 10px}.Grid-cell{box-sizing:border-box;display:inline-block;font-size:1rem;margin:0;padding:0;text-align:left;vertical-align:top;width:100%}.Grid-cell--center{display:block;margin:0 auto}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}hr{box-sizing:content-box;height:0}pre{overflow:auto}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}::-webkit-input-placeholder{color:#95b2bb}:-moz-placeholder,::-moz-placeholder{color:#95b2bb}:-ms-input-placeholder{color:#95b2bb}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:none}button{background:0 0;border:0;padding:0;text-align:inherit}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button:hover,button:active{outline:none}fieldset{border:0;margin:0;padding:0}input[type="text"],input[type="password"],input[type="date"],input[type="datetime"],input[type="email"],input[type="number"],input[type="search"],input[type="tel"],input[type="time"],input[type="url"],textarea{-webkit-appearance:none;outline:none;box-sizing:border-box}@-ms-viewport{width:device-width}@viewport{width:device-width}html{font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;box-sizing:border-box;color:#444c54}*,*:before,*:after{box-sizing:inherit}body{min-width:320px;background:#ECEFF0}:active,:hover{outline:none}h1,h2,h3,h4,h5,h6{font-size:16px;margin:0;color:#20718A}a{color:#03A6D7;text-decoration:none;cursor:pointer}a:hover{color:#0395c2}a:active{color:#0285ac}ol,ul{list-style:none;margin:0;padding:0}ul:empty,ol:empty{display:none}img{max-width:100%}svg:not(:root){overflow:hidden}figure{margin:0}figcaption{color:gray}hr{width:100%;border-bottom:1px solid;border-color:rgba(32,113,138,.12);margin:rhythm(1)0;background:0 0}hr,iframe{border:0}[tabindex="-1"]:focus{outline:none!important}code{font-family:Monaco,Courier,monospace;margin:0;padding:0 .1875rem}code,kbd,pre{font-size:.8125rem;font-weight:400;color:#4d4d4d}pre,samp{font-family:Monaco,Courier,monospace;padding:0 .1875rem}samp{font-size:.8125rem;font-weight:400;color:#4d4d4d}samp,blockquote,dl,dd,p,pre{margin:0}kbd{margin:0 .1875rem;padding:.1875rem .5625rem;border:1px solid rgba(65,105,136,.07);border-bottom:3px solid rgba(65,105,136,.2);border-radius:.375rem;background-color:#fff;background-clip:padding;white-space:nowrap;display:inline-block;text-transform:uppercase;font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif}.ButtonGroup{display:block;font-size:0;margin:0;list-style:none;padding:0}.ButtonGroup-item{display:block;font-size:1rem}.ButtonGroup-item>.Button{display:block;width:100%}.ButtonGroup-item>.Button:hover,.ButtonGroup-item>.Button:focus,.ButtonGroup-item>.Button:active,.ButtonGroup-item>.Button.is-pressed{z-index:1}.ButtonGroup--hz>.ButtonGroup-item{display:inline-block}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item{margin-top:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:first-child{margin-top:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:not(:first-child):not(:last-child)>.Button{border-radius:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:first-child:not(:only-child)>.Button{border-bottom-left-radius:0;border-bottom-right-radius:0}.ButtonGroup--borderCollapse:not(.ButtonGroup--hz)>.ButtonGroup-item:last-child:not(:only-child)>.Button{border-top-left-radius:0;border-top-right-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item{margin-left:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:first-child{margin-left:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:not(:first-child):not(:last-child)>.Button{border-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:first-child:not(:only-child)>.Button{border-bottom-right-radius:0;border-top-right-radius:0}.ButtonGroup--borderCollapse.ButtonGroup--hz>.ButtonGroup-item:last-child:not(:only-child)>.Button{border-bottom-left-radius:0;border-top-left-radius:0}.ButtonGroup--hz>.ButtonGroup-item{vertical-align:middle}.ButtonGroup--round .ButtonGroup-item:first-child .Button{border-top-left-radius:100px;border-bottom-left-radius:100px}.ButtonGroup--round .ButtonGroup-item:last-child .Button{border-top-right-radius:100px;border-bottom-right-radius:100px}.Button{-webkit-appearance:none;background:0 0;border-color:currentcolor;border-style:solid;border-width:0;box-sizing:border-box;color:transparent;cursor:pointer;display:inline-block;font:inherit;line-height:normal;margin:0;padding:.1875rem .75rem;position:relative;text-align:center;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:normal}.Button::-moz-focus-inner{border:0;padding:0}.Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.Button:hover,.Button:focus,.Button:active{text-decoration:none}.Button:disabled,.Button.is-disabled{cursor:default;opacity:.6}.Button{-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);min-height:1.875rem;text-shadow:1px 1px 0 rgba(0,0,0,.15)}.Button:disabled,.Button.is-disabled{pointer-events:none}.Button:hover,.Button:active,.Button.is-active{outline:inherit}.Button--default{background-color:#deeaed}.Button--default:hover{background-color:#c8d3d5}.Button--default:active,.Button--default.is-active{background-color:#bdc7c9}.Button--primary{color:#fff;background-color:#03A6D7}.Button--primary:hover{background-color:#0395c2}.Button--primary:active,.Button--primary.is-active{background-color:#038db7}.Button--secondary{color:#fff;background-color:#20718A}.Button--secondary:hover{background-color:#1d667c}.Button--secondary:active,.Button--secondary.is-active{background-color:#1b6075}.Button--highlight{color:#fff;background-color:#03A6D7}.Button--highlight:hover{background-color:#0395c2}.Button--highlight:active,.Button--highlight.is-active{background-color:#038db7}.Button--success{color:#fff;background-color:#5CCA7B}.Button--success:hover{background-color:#53b66f}.Button--success:active,.Button--success.is-active{background-color:#4eac69}.Button--unsure{color:#fff;background-color:#E9DF1B}.Button--unsure:hover{background-color:#d2c918}.Button--unsure:active,.Button--unsure.is-active{background-color:#c6be17}.Button--neutral{color:#fff;background-color:#90b8c5}.Button--neutral:hover{background-color:#82a6b1}.Button--neutral:active,.Button--neutral.is-active{background-color:#7a9ca7}.Button--warning{color:#fff;background-color:#FFA800}.Button--warning:hover{background-color:#e69700}.Button--warning:active,.Button--warning.is-active{background-color:#d98f00}.Button--danger{color:#fff;background-color:#FF3B3D}.Button--danger:hover{background-color:#e63537}.Button--danger:active,.Button--danger.is-active{background-color:#d93234}.Button--invisible{background-color:transparent;color:#90b8c5}.Button--invisible:hover{background-color:#edf4f6;color:#639cad}.Button--invisible:active,.Button--invisible.is-active{color:#20718A;background-color:#e4eef1}.Button--snug{padding-left:.375rem;padding-right:.375rem}.Button--small{min-height:1.5rem;padding:.1875rem .75rem;font-size:.875rem}.InputGroup{position:relative;display:table;border-collapse:separate}.InputGroup-input,.InputGroup-addon,.InputGroup-button{display:table-cell;-webkit-transition:.2s cubic-bezier(.26,.47,.36,.94);transition:.2s cubic-bezier(.26,.47,.36,.94)}.InputGroup-input,.InputGroup-addon{background-color:transparent;padding:0 .375rem}.InputGroup-input{border:none;width:100%;color:#20718A}.InputGroup-addon{color:#639cad;text-align:center;width:1%;white-space:nowrap;vertical-align:middle}.InputGroup-addon:before{content:' '}.InputGroup.is-focused .InputGroup-input,.InputGroup.is-focused .InputGroup-addon{background-color:#fff}.InputGroup--bordered .InputGroup-input,.InputGroup--bordered .InputGroup-addon,.InputGroup--outlined .InputGroup-input,.InputGroup--outlined .InputGroup-addon{border-top:1px solid #a6c6d0;border-bottom:1px solid #a6c6d0}.InputGroup--bordered .InputGroup-input{border-left:1px solid #a6c6d0;border-right:1px solid #a6c6d0}.InputGroup--outlined .InputGroup-input:first-child,.InputGroup--outlined .InputGroup-addon:first-child{border-left:1px solid #a6c6d0}.InputGroup--outlined .InputGroup-input:last-child,.InputGroup--outlined .InputGroup-addon:last-child{border-right:1px solid #a6c6d0}.InputGroup--bordered.is-focused .InputGroup-input,.InputGroup--bordered.is-focused .InputGroup-addon,.InputGroup--outlined.is-focused .InputGroup-input,.InputGroup--outlined.is-focused .InputGroup-addon{border-color:#639cad}.InputGroup--rounded .InputGroup-input:first-child,.InputGroup--rounded .InputGroup-addon:first-child{border-bottom-left-radius:1.5rem;border-top-left-radius:1.5rem;padding-left:.5625rem}.InputGroup--rounded .InputGroup-input:last-child,.InputGroup--rounded .InputGroup-addon:last-child{border-bottom-right-radius:1.5rem;border-top-right-radius:1.5rem;padding-right:.5625rem}.Dropdown{position:relative;z-index:100;display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Dropdown.is-active{z-index:900}.Dropdown-toggleIcon{display:inline-block;-webkit-transition:all .2s cubic-bezier(.175,.885,.32,1.275);transition:all .2s cubic-bezier(.175,.885,.32,1.275);text-align:center}.Dropdown.is-active .Dropdown-toggleIcon{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.Dropdown-content{position:absolute;z-index:800;top:100%;left:0;visibility:hidden;float:left;min-width:100%;margin:0;padding:0;-webkit-transition:all .2s cubic-bezier(.175,.885,.32,1.275);transition:all .2s cubic-bezier(.175,.885,.32,1.275);-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);text-align:left;opacity:0;background-color:#fff;background-clip:padding-box;box-shadow:0 0 1.5rem rgba(0,0,0,.1)}.Dropdown-content--Bordered{border:1px solid rgba(32,113,138,.12);border-bottom-width:2px}.Dropdown.is-active>.Dropdown-content{visibility:visible;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1}.Dropdown-title{font-size:.875rem;padding:.1875rem .375rem;background-color:transparent;border-bottom:1px solid rgba(32,113,138,.12);color:#79aab9}.Dropdown-item{display:block;padding:.1875rem .375rem;-webkit-transition:all .2s ease-out;transition:all .2s ease-out;color:#03A6D7}.Dropdown-item:hover{color:#fff;background-color:#03A6D7}.Dropdown--right .Dropdown-content{left:auto;right:0}.Header{background-color:#03A6D7;position:fixed;z-index:100;width:100%;top:0;box-shadow:0 .375rem 1.5rem rgba(0,0,0,.1)}.Header-item{height:3rem;display:inline-block;padding-top:.75rem;padding-bottom:.75rem}.Header-avatar{margin-top:.5625rem;margin-bottom:.5625rem;width:1.875rem;height:1.875rem;display:inline-block}.h1,.h2,.h3,.h4,.h5,.h6{font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;font-weight:600}.h1{font-size:36px}.h2{font-size:28px}.h3{font-size:24px}.h4{font-size:20px}.h5{font-size:18px}.h6{font-size:16px}.Heading--panel{font-size:1rem;font-weight:400;margin:0;text-transform:uppercase}.Icon{text-align:center;display:inline-block;-webkit-transition:.25s all cubic-bezier(.175,.885,.32,1.275);transition:.25s all cubic-bezier(.175,.885,.32,1.275)}.Icon.is-rotated{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.Icon-item{vertical-align:-25%;display:inline-block;width:1.5rem;height:1.5rem;fill:currentColor!important}.Icon--xlg .Icon-item{width:3rem;height:3rem}.Icon--lg .Icon-item{width:2.25rem;height:2.25rem}.Icon--sm .Icon-item{vertical-align:-15%;width:1.125rem;height:1.125rem}.Icon--xsm .Icon-item{vertical-align:-10%;width:.9375rem;height:.9375rem}.Icon--stroked .Icon-item{fill:none;stroke:currentColor;stroke-width:3}.Link{color:#03A6D7;text-decoration:none;cursor:pointer}.Link:hover{color:#0395c2}.Link:active{color:#0285ac}.Link--invert{opacity:.8}.Link--invert,.Link--invert:hover{color:#fff!important}.Link--invert:hover{opacity:1}.Link--invert:active,.Link--invert.is-active{opacity:.6}.Link--success{color:#5CCA7B!important}.Link--success:hover{color:#408d56 !important}.Link--success:active,.Link--success.is-active{color:#255131 !important}.Link--unsure{color:#E9DF1B!important}.Link--unsure:hover{color:#a39c13 !important}.Link--unsure:active,.Link--unsure.is-active{color:#5d590b !important}.Link--neutral{color:#a6c6d0 !important}.Link--neutral:hover{color:#748b92 !important}.Link--neutral:active,.Link--neutral.is-active{color:#424f53 !important}.Link--warning{color:#FFA800!important}.Link--warning:hover{color:#b37600 !important}.Link--warning:active,.Link--warning.is-active{color:#664300 !important}.Link--danger{color:#FF3B3D!important}.Link--danger:hover{color:#b3292b !important}.Link--danger:active,.Link--danger.is-active{color:#661818 !important}.Difference{display:inline-block;padding:0 2px;border-radius:2px}.Difference ins{background-color:#c9eed3;text-decoration:none}.Difference del{background-color:#ffe0e0;text-decoration:none}.LogoLoader{position:relative;display:inline-block;overflow:hidden;width:2.25rem;height:2.25rem;color:#03A6D7;border-radius:100px;background-color:#fff}.LogoLoader--inverted{color:#fff;background-color:#03A6D7}.LogoLoader.is-loading{-webkit-animation:rotate .3s infinite linear;animation:rotate .3s infinite linear;-webkit-animation-delay:.05s;animation-delay:.05s}.LogoLoader-logo{-ms-transform:scale(1,1)}.LogoLoader-logo,.LogoLoader-loader{position:absolute;top:0;left:0;-webkit-transition:all .25s cubic-bezier(.175,.885,.32,1.275);transition:all .25s cubic-bezier(.175,.885,.32,1.275);fill:currentColor}.LogoLoader-logo{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);opacity:1}.LogoLoader:hover .LogoLoader-logo{-webkit-animation:pop .3s cubic-bezier(.175,.885,.32,1.275);animation:pop .3s cubic-bezier(.175,.885,.32,1.275);-webkit-animation-iteration-count:2;animation-iteration-count:2;-webkit-animation-direction:alternate;animation-direction:alternate}.LogoLoader.is-loading .LogoLoader-logo{-webkit-transform:scale(0,0);-ms-transform:scale(0,0);transform:scale(0,0);opacity:0}.LogoLoader-loader{-webkit-transform:scale(2.5,2.5);-ms-transform:scale(2.5,2.5);transform:scale(2.5,2.5);opacity:0}.LogoLoader.is-loading .LogoLoader-loader{-webkit-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1);opacity:1}@-webkit-keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes pop{to{-webkit-transform:scale(1.2,1.2)rotate(15deg);transform:scale(1.2,1.2)rotate(15deg)}}@keyframes pop{to{-webkit-transform:scale(1.2,1.2)rotate(15deg);transform:scale(1.2,1.2)rotate(15deg)}}.Progressbar{position:relative;width:100%;height:.75rem;margin:0;background-color:#a6c6d0}.Progressbar--sm{height:.375rem}.Progressbar--lg{height:1.5rem}.Progressbar-item{position:absolute;left:0;z-index:100;margin:0;padding:0;width:100%;height:100%;list-style:none}.Progressbar-approved{background-color:#03A6D7;z-index:200}.Progressbar-translated{background-color:#5CCA7B}.Progressbar-needsWork{background-color:#E9DF1B}.Progressbar-untranslated{background-color:#a6c6d0}.Modal{position:fixed;z-index:1000;top:0;right:0;bottom:0;left:0;display:block;visibility:hidden;overflow:auto;overflow-y:scroll;width:100%;height:100%;margin:0 auto;padding:4.5rem 1.5rem 1.5rem;-webkit-transition:all .15s linear;transition:all .15s linear;opacity:0;background-color:rgba(236,239,240,.95);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:75rem;perspective:75rem;-webkit-overflow-scrolling:touch}.Modal.is-active{visibility:visible;opacity:1}.Modal-dialog{position:relative;width:90%;top:50%;left:50%;max-height:100%;min-width:300px;max-width:45rem;-webkit-transition:all .25s cubic-bezier(.175,.885,.32,1.1);transition:all .25s cubic-bezier(.175,.885,.32,1.1);-webkit-transform:translateX(-50%)translateY(100%);-ms-transform:translateX(-50%)translateY(100%);transform:translateX(-50%)translateY(100%);-webkit-transform-origin:0;-ms-transform-origin:0;transform-origin:0;background-color:#f7f9f9}.Modal.is-active .Modal-dialog{-webkit-transform:translateX(-50%)translateY(-50%);-ms-transform:translateX(-50%)translateY(-50%);transform:translateX(-50%)translateY(-50%)}.Modal-header{position:fixed;top:-3rem;left:0;right:0;border:1px solid rgba(32,113,138,.12);background-color:#fff;z-index:100}.Modal-title{font-size:1.375rem;font-weight:300;line-height:1.5rem;margin:0;padding:.75rem 2.25rem .75rem 1.5rem}.Modal-close{position:absolute;top:0;right:0;width:3rem;height:3rem;-webkit-transition:all .25s ease-out;transition:all .25s ease-out;text-align:center;border-left:1px solid rgba(32,113,138,.12)}.Modal-close:hover{background-color:rgba(32,113,138,.05)}.Modal-close:active{background-color:rgba(32,113,138,.1)}.Modal-content{position:relative;max-height:100%;overflow:auto;background-clip:padding-box;border:1px solid rgba(32,113,138,.12);border-top-color:transparent;border-bottom-width:2px}.Modal-container.is-modal{overflow:hidden;height:100%}.Toggle,.Toggle-label{cursor:pointer}.Toggle{position:relative;display:inline-block;min-width:2.0625rem;margin:0 .09375rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top}.Toggle-checkbox{position:absolute;cursor:none;top:0;left:0;width:100%;height:100%;opacity:0}.Toggle-label{font-weight:600;display:block;position:relative;padding:0 .5625rem;-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);text-align:center;color:currentColor}.Toggle-fakeCheckbox{opacity:1;position:absolute;top:0;left:0;width:100%;height:100%;content:'';background-color:transparent}.Toggle:hover>.Toggle-fakeCheckbox,.Toggle-checkbox:focus~.Toggle-fakeCheckbox{background-color:currentColor;opacity:.2}.Toggle-checkbox:checked~.Toggle-label,.Toggle.is-active~.Toggle-label{color:#fff}.Toggle-checkbox:checked~.Toggle-fakeCheckbox,.Toggle.is-active>.Toggle-fakeCheckbox{background-color:currentColor}.Toggle:hover>.Toggle-checkbox:checked~.Toggle-fakeCheckbox,.Toggle-checkbox:checked:focus~.Toggle-fakeCheckbox,.Toggle.is-active:hover>.Toggle-fakeCheckbox{opacity:.8}.Switch{padding-left:2.25rem;position:relative}.Switch-checkbox{position:absolute;margin-left:-9999px;visibility:hidden}.Switch-label{cursor:pointer}.Switch-label:before,.Switch-label:after{content:'';position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);border-radius:1.125rem;-webkit-transition:all .2s ease-out;transition:all .2s ease-out}.Switch-label:before{width:1.875rem;height:1.125rem;background-color:#d2e3e8}.Switch-label:after{width:1.125rem;height:1.125rem;background-color:#79aab9;border:1px solid transparent;-webkit-transform:translateY(-50%)scale(.8,.8);-ms-transform:translateY(-50%)scale(.8,.8);transform:translateY(-50%)scale(.8,.8)}.Switch-labelText{color:#79aab9;font-size:.875rem}.Switch-checkbox:checked~.Switch-label:before{background-color:#20718A}.Switch-checkbox:checked~.Switch-label:after{background-color:#fff;-webkit-transform:translateY(-50%)translateX(66%)scale(.8,.8);-ms-transform:translateY(-50%)translateX(66%)scale(.8,.8);transform:translateY(-50%)translateX(66%)scale(.8,.8)}.Switch-checkbox:checked~.Switch-label .Switch-labelText{color:#20718A}.TransUnit{position:relative;margin:0;padding:0;cursor:text;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-bottom:1px solid rgba(32,113,138,.12)}.TransUnit:focus{outline:0;box-shadow:none}.TransUnit.is-focused{z-index:100!important;opacity:1!important;background-color:#fff}.TransUnit:before,.TransUnit:after{position:absolute;z-index:-1;left:0;visibility:hidden;width:100%;height:1.5rem;content:'';-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);-webkit-transform:scaleY(0);-ms-transform:scaleY(0);transform:scaleY(0);opacity:0;background-color:#fff;background-clip:padding-box}.TransUnit:before{box-shadow:0 -.375rem .75rem rgba(0,0,0,.04);-webkit-transform-origin:bottom;-ms-transform-origin:bottom;transform-origin:bottom;top:-1.125rem}.TransUnit:after{box-shadow:0 .375rem .75rem rgba(0,0,0,.04);-webkit-transform-origin:top;-ms-transform-origin:top;transform-origin:top;bottom:-1.125rem}.TransUnit.is-focused:before,.TransUnit.is-focused:after{visibility:visible;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1);opacity:1}.TransUnit.is-first{border-top:1px solid rgba(32,113,138,.12)}.TransUnit-container.is-unit-selected .TransUnit{opacity:.8}.TransUnit-panel{padding-top:1.125rem;padding-bottom:1.125rem;padding-left:1.5rem;list-style:none;vertical-align:top}.TransUnit-panel,.TransUnit-item{position:relative}.TransUnit-source{cursor:pointer;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.TransUnit.is-focused .TransUnit-source{cursor:text}.TransUnit-translation{cursor:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.TransUnit-panelHeader,.TransUnit-panelFooter,.TransUnit-itemHeader{position:absolute;z-index:200;right:0;left:0;width:100%;padding-right:1.125rem;padding-left:1.125rem;cursor:default}.TransUnit-panelHeader,.TransUnit-panelFooter{visibility:hidden;-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);opacity:0}.TransUnit.is-focused .TransUnit-panelHeader,.TransUnit.is-focused .TransUnit-panelFooter{visibility:visible;opacity:1}.TransUnit-panelHeader{top:-1.125rem}.TransUnit-itemHeader{top:0}.TransUnit-panelFooter{bottom:-1.125rem}.TransUnit-heading{font-size:1rem;font-weight:400;line-height:2.25rem;display:inline-block;float:left;margin:0;vertical-align:top;text-transform:uppercase}.TransUnit-text{font-family:'Source Sans Pro',"Helvetica Neue",HelveticaNeue,Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;overflow:hidden;width:100%;min-height:1.5rem;margin:0;padding:1.125rem;resize:none;-webkit-transition:height .1s cubic-bezier(.075,.82,.165,1);transition:height .1s cubic-bezier(.075,.82,.165,1);white-space:pre-wrap;word-wrap:break-word;-moz-tab-size:8;tab-size:8;color:#444c54;border:none;background-color:transparent;box-shadow:none;-webkit-appearance:none}.TransUnit-text:focus{border:none;outline:none;background-color:transparent}.TransUnit-text span{font-weight:400!important;font-style:normal!important}.TransUnit-status,.TransUnit-status:before,.TransUnit-status:after{position:absolute;z-index:200;left:0;width:1.5rem;background-color:#a6c6d0;-webkit-transition:all .4s linear;transition:all .4s linear}.TransUnit-status{top:-1;bottom:-1}.TransUnit-status.is-loading,.TransUnit-status.is-loading:before{background-image:-webkit-repeating-linear-gradient(45deg,transparent,transparent .375rem,rgba(255,255,255,.5).375rem,rgba(255,255,255,.5).75rem);background-image:repeating-linear-gradient(45deg,transparent,transparent .375rem,rgba(255,255,255,.5).375rem,rgba(255,255,255,.5).75rem);background-size:100% 1000px;-webkit-animation:loading 7s linear;animation:loading 7s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.TransUnit-status:before{top:-1.125rem;height:100%;padding-top:1.125rem;padding-bottom:1.125rem;box-sizing:content-box;z-index:300;visibility:hidden;content:'';-webkit-transition:all .25s cubic-bezier(.075,.82,.165,1);transition:all .25s cubic-bezier(.075,.82,.165,1);-webkit-transform:scaleY(.65);-ms-transform:scaleY(.65);transform:scaleY(.65)}.TransUnit-status:after{-webkit-transition:opacity .3 ease-out;transition:opacity .3 ease-out;z-index:400;top:0;box-sizing:content-box;width:1.3125rem;height:100%;content:'';background-color:#fff;opacity:.6}.TransUnit.is-focused .TransUnit-status:before{visibility:visible;-webkit-transform:scaleY(1);-ms-transform:scaleY(1);transform:scaleY(1)}.TransUnit.is-focused .TransUnit-status:after{top:-1.125rem;padding-top:1.125rem;padding-bottom:1.125rem;opacity:.8}.TransUnit-metaData{position:relative;right:0;left:0;height:100%;text-align:center}.TransUnit-metaDataItem{line-height:1.125rem}.TransUnit-metaDataButton{font-size:.75rem;line-height:.6000000000000001rem;opacity:.8}.TransUnit-metaDataButton:hover{opacity:1}.TransUnit-metaDataComments,.TransUnit-metaDataErrors{position:absolute;right:0;left:0}.TransUnit-metaDataComments{top:1.125rem}.TransUnit-metaDataErrors{top:2.625rem}.TransUnit-metaDataErrorsIcon{text-shadow:0 0 2px #fff}@media (min-width:0) and (max-width:740px){.TransUnit-Heading,.TransUnit-panelFooterLeftNav{padding-left:1.5rem}}@media (min-width:741px){.TransUnit,.TransUnit-item{display:table;width:100%;table-layout:fixed}.TransUnit-panel{display:table-cell;width:50%;padding-left:0}.TransUnit-source{padding-right:.75rem}.TransUnit-translation{padding-left:.75rem}.TransUnit-panelHeader--source,.TransUnit-panelFooter--source{padding-right:1.875rem;right:auto}.TransUnit-panelHeader--translation,.TransUnit-panelFooter--translation{padding-left:1.875rem;left:auto}.TransUnit-status,.TransUnit-status:before,.TransUnit-status:after{left:50%;margin-left:-.75rem}}.TransUnit--highlight .TransUnit-status,.TransUnit--highlight .TransUnit-status:before{background-color:#03A6D7}.TransUnit--success .TransUnit-status,.TransUnit--success .TransUnit-status:before{background-color:#5CCA7B}.TransUnit--unsure .TransUnit-status,.TransUnit--unsure .TransUnit-status:before{background-color:#E9DF1B}.TransUnit--warning .TransUnit-status,.TransUnit--warning .TransUnit-status:before{background-color:#FFA800}.TransUnit--danger .TransUnit-status,.TransUnit--danger .TransUnit-status:before{background-color:#FF3B3D}.TransUnit--secondary .TransUnit-status,.TransUnit--secondary .TransUnit-status:before{background-color:#20718A}.TransUnit--suggestion:hover{background-color:#f5f6f7}.TransUnit--suggestion .TransUnit-panel{padding-top:.75rem;padding-bottom:.75rem}.TransUnit--suggestion .TransUnit-item,.TransUnit--suggestion .TransUnit-details{padding-left:1.125rem;padding-right:1.125rem}.TransUnit--suggestion .TransUnit-itemHeader{margin-top:-1.125rem}.TransUnit--suggestion .TransUnit-item:nth-last-child(n+3):first-child,.TransUnit--suggestion .TransUnit-item:nth-last-child(n+3):first-child~.TransUnit-item{margin-top:1.5rem}.TransUnit--suggestion .TransUnit-details{margin-top:.375rem}@-webkit-keyframes loading{0%{background-position:0 0}100%{background-position:0 1000px}}@keyframes loading{0%{background-position:0 0}100%{background-position:0 1000px}}.Resizer{position:absolute;z-index:1000}.Resizer--vertical{cursor:ew-resize;width:12px;top:0;bottom:0}.Resizer--horizontal{height:12px;left:0;right:0;cursor:ns-resize}.Editor{overflow:hidden}.Editor-header,.Editor-loader{-webkit-transition:.2s all cubic-bezier(.175,.885,.32,1.275);transition:.2s all cubic-bezier(.175,.885,.32,1.275)}.Editor-header.is-minimised{-webkit-transform:translateY(-3rem);-ms-transform:translateY(-3rem);transform:translateY(-3rem)}.Editor-header.is-minimised .Editor-mainNav{visibility:hidden}.Editor-loader{position:absolute;z-index:900;top:0;left:50%;-webkit-transform:translate(-50%,.375rem);-ms-transform:translate(-50%,.375rem);transform:translate(-50%,.375rem)}.Editor-loader.is-minimised{-webkit-transform:translateX(-50%)scale(.75,.75);-ms-transform:translateX(-50%)scale(.75,.75);transform:translateX(-50%)scale(.75,.75)}.Editor-mainNav{height:3rem}.Editor-content{position:absolute;left:0;right:0;top:5.625rem;bottom:0;overflow:auto;overflow-y:scroll;width:100%;-webkit-overlow-scrolling:touch}.Editor-content.is-maximised{top:2.625rem}.Editor-translations{min-height:100%;padding:3rem 0;background:-webkit-linear-gradient(left,#d7e5ea ,#d7e5ea);background:linear-gradient(left,#d7e5ea ,#d7e5ea);background-position:left center;background-size:1.5rem 100%;background-repeat:no-repeat}.Editor-currentDoc,.Editor-currentLang{max-width:5.25rem}.Editor-suggestions{position:fixed;z-index:200;right:0;bottom:0;left:0;overflow:hidden;box-shadow:0 -.1875rem 1.5rem rgba(0,0,0,.1)}.Editor-suggestionsHeader{position:absolute;top:0;left:0;right:0;box-shadow:0 1px 1px rgba(0,0,0,.1);z-index:300;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.Editor-suggestionsBody{position:absolute;top:2.25rem;left:0;right:0;bottom:0;overflow:scroll;overflow-x:hidden;overflow-y:scroll}.Editor-suggestions.is-search-active .Editor-suggestionsBody{top:4.5rem}.Editor-suggestionsSearch{clear:both}@media (min-width:0) and (max-width:740px){.Editor-currentProject{max-width:5.25rem}}@media (min-width:741px){.Editor-translations{background:-webkit-linear-gradient(left,#d7e5ea ,#d7e5ea),-webkit-linear-gradient(left,#ECEFF0,#ECEFF0);background:linear-gradient(to right,#d7e5ea ,#d7e5ea),linear-gradient(to right,#ECEFF0,#ECEFF0);background-position:center,right;background-size:1.5rem 100%,50% 100%;background-repeat:no-repeat}}.fade{-webkit-transition:opacity .25s easein;transition:opacity .25s easein;opacity:0}.fade.in{opacity:1}[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none!important} \ No newline at end of file diff --git a/zanata-war/src/main/webapp/app/index.html b/zanata-war/src/main/webapp/app/index.html index fffbd07840..28028ab65c 100755 --- a/zanata-war/src/main/webapp/app/index.html +++ b/zanata-war/src/main/webapp/app/index.html @@ -2,7 +2,6 @@
=e.length?[r,i,a,s,u]:null}if(0>=this.Diff_Timeout)return null;var r=e.length>t.length?e:t,i=e.length>t.length?t:e;if(4>r.length||2*i.lengthr[4].length?s:r:s;var l;return e.length>t.length?(s=a[0],r=a[1],i=a[2],l=a[3]):(i=a[0],l=a[1],s=a[2],r=a[3]),a=a[4],[s,r,i,l,a]},e.prototype.diff_cleanupSemantic=function(e){for(var t=!1,n=[],r=0,i=null,a=0,o=0,s=0,l=0,c=0;a0?n[r-1]:-1,c=l=s=o=0,i=null,t=!0)),a++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),a=1;a=i?(r>=t.length/2||r>=n.length/2)&&(e.splice(a,0,[0,n.substring(0,r)]),e[a-1][1]=t.substring(0,t.length-r),e[a+1][1]=n.substring(r),a++):(i>=t.length/2||i>=n.length/2)&&(e.splice(a,0,[0,t.substring(0,i)]),e[a-1][0]=1,e[a-1][1]=n.substring(0,n.length-i),e[a+1][0]=-1,e[a+1][1]=t.substring(i),a++),a++),a++},e.prototype.diff_cleanupSemanticLossless=function(t){function n(t,n){if(!t||!n)return 6;var r=t.charAt(t.length-1),i=n.charAt(0),a=r.match(e.nonAlphaNumericRegex_),o=i.match(e.nonAlphaNumericRegex_),s=a&&r.match(e.whitespaceRegex_),l=o&&i.match(e.whitespaceRegex_),r=s&&r.match(e.linebreakRegex_),i=l&&i.match(e.linebreakRegex_),c=r&&t.match(e.blanklineEndRegex_),u=i&&n.match(e.blanklineStartRegex_);return c||u?5:r||i?4:a&&!s&&l?3:s||l?2:a||o?1:0}for(var r=1;r=u&&(u=f,s=i,l=a,c=o)}t[r-1][1]!=s&&(s?t[r-1][1]=s:(t.splice(r-1,1),r--),t[r][1]=l,c?t[r+1][1]=c:(t.splice(r+1,1),r--))}r++}},e.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,e.whitespaceRegex_=/\s/,e.linebreakRegex_=/[\r\n]/,e.blanklineEndRegex_=/\n\r?\n$/,e.blanklineStartRegex_=/^\r?\n\r?\n/,e.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,n=[],r=0,i=null,a=0,o=!1,s=!1,l=!1,c=!1;a0?n[r-1]:-1,l=c=!1),t=!0)),a++;t&&this.diff_cleanupMerge(e)},e.prototype.diff_cleanupMerge=function(e){e.push([0,""]);for(var t,n=0,r=0,i=0,a="",o="";n1?(0!==r&&0!==i&&(t=this.diff_commonPrefix(o,a),0!==t&&(n-r-i>0&&0==e[n-r-i-1][0]?e[n-r-i-1][1]+=o.substring(0,t):(e.splice(0,0,[0,o.substring(0,t)]),n++),o=o.substring(t),a=a.substring(t)),t=this.diff_commonSuffix(o,a),0!==t&&(e[n][1]=o.substring(o.length-t)+e[n][1],o=o.substring(0,o.length-t),a=a.substring(0,a.length-t))),0===r?e.splice(n-i,r+i,[1,o]):0===i?e.splice(n-r,r+i,[-1,a]):e.splice(n-r-i,r+i,[-1,a],[1,o]),n=n-r-i+(r?1:0)+(i?1:0)+1):0!==n&&0==e[n-1][0]?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,r=i=0,o=a=""}for(""===e[e.length-1][1]&&e.pop(),r=!1,n=1;nt));n++)a=r,o=i;return e.length!=n&&-1===e[n][0]?o:o+(t-a)},e.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,r=//g,a=/\n/g,o=0;o");switch(s){case 1:t[o]=''+l+"";break;case-1:t[o]=''+l+"";break;case 0:t[o]=""+l+""}}return t.join("")},e.prototype.diff_text1=function(e){for(var t=[],n=0;nc)throw Error("Invalid number in diff_fromDelta: "+s);s=e.substring(i,i+=c),n[r++]="="==a[o].charAt(0)?[0,s]:[-1,s];break;default:if(a[o])throw Error("Invalid diff operation in diff_fromDelta: "+a[o])}}if(i!=e.length)throw Error("Delta length ("+i+") does not equal source text length ("+e.length+").");return n},e.prototype.match_main=function(e,t,n){if(null==e||null==t||null==n)throw Error("Null input. (match_main)");return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},e.prototype.match_bitap_=function(e,t,n){function r(e,r){var i=e/t.length,o=Math.abs(n-r);return a.Match_Distance?i+o/a.Match_Distance:o?1:i}if(t.length>this.Match_MaxBits)throw Error("Pattern too long for this browser.");var i=this.match_alphabet_(t),a=this,o=this.Match_Threshold,s=e.indexOf(t,n);-1!=s&&(o=Math.min(r(0,s),o),s=e.lastIndexOf(t,n+t.length),-1!=s&&(o=Math.min(r(0,s),o)));for(var l,c,u,f=1<l;)r(d,n+c)<=o?l=c:p=c,c=Math.floor((p-l)/2+l);p=c,l=Math.max(1,n-c+1);var h=Math.min(n+c,e.length)+t.length;for(c=Array(h+2),c[h+1]=(1<=l;h--){var m=i[e.charAt(h-1)];if(c[h]=0===d?(c[h+1]<<1|1)&m:(c[h+1]<<1|1)&m|((u[h+1]|u[h])<<1|1)|u[h+1],c[h]&f&&(m=r(d,h-1),o>=m)){if(o=m,s=h-1,!(s>n))break;l=Math.max(1,2*n-s)}}if(r(d+1,n)>o)break;u=c}return s},e.prototype.match_alphabet_=function(e){for(var t={},n=0;n=2*this.Patch_Margin&&a&&(this.patch_addContext_(t,l),r.push(t),t=new e.patch_obj,a=0,l=i,o=s)}1!==u&&(o+=f.length),-1!==u&&(s+=f.length)}return a&&(this.patch_addContext_(t,l),r.push(t)),r},e.prototype.patch_deepCopy=function(t){for(var n=[],r=0;rthis.Match_MaxBits?(o=this.match_main(t,l.substring(0,this.Match_MaxBits),s),-1!=o&&(c=this.match_main(t,l.substring(l.length-this.Match_MaxBits),s+l.length-this.Match_MaxBits),-1==c||o>=c)&&(o=-1)):o=this.match_main(t,l,s),-1==o)i[a]=!1,r-=e[a].length2-e[a].length1;else if(i[a]=!0,r=o-s,s=-1==c?t.substring(o,o+l.length):t.substring(o,c+this.Match_MaxBits),l==s)t=t.substring(0,o)+this.diff_text2(e[a].diffs)+t.substring(o+l.length);else if(s=this.diff_main(l,s,!1),l.length>this.Match_MaxBits&&this.diff_levenshtein(s)/l.length>this.Patch_DeleteThreshold)i[a]=!1;else{this.diff_cleanupSemanticLossless(s);for(var u,l=0,c=0;c=r;r++)n+=String.fromCharCode(r);for(r=0;ri[0][1].length){var a=t-i[0][1].length;i[0][1]=n.substring(i[0][1].length)+i[0][1],r.start1-=a,r.start2-=a,r.length1+=a,r.length2+=a}return r=e[e.length-1],i=r.diffs,0==i.length||0!=i[i.length-1][0]?(i.push([0,n]),r.length1+=t,r.length2+=t):t>i[i.length-1][1].length&&(a=t-i[i.length-1][1].length,i[i.length-1][1]+=n.substring(0,a),r.length1+=a,r.length2+=a),n},e.prototype.patch_splitMax=function(t){for(var n=this.Match_MaxBits,r=0;r2*n?(l.length1+=u.length,a+=u.length,c=!1,l.diffs.push([s,u]),i.diffs.shift()):(u=u.substring(0,n-l.length1-this.Patch_Margin),l.length1+=u.length,a+=u.length,0===s?(l.length2+=u.length,o+=u.length):c=!1,l.diffs.push([s,u]),u==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(u.length))}s=this.diff_text2(l.diffs),s=s.substring(s.length-this.Patch_Margin),u=this.diff_text1(i.diffs).substring(0,this.Patch_Margin),""!==u&&(l.length1+=u.length,l.length2+=u.length,0!==l.diffs.length&&0===l.diffs[l.diffs.length-1][0]?l.diffs[l.diffs.length-1][1]+=u:l.diffs.push([0,u])),c||t.splice(++r,0,l)}}},e.prototype.patch_toText=function(e){for(var t=[],n=0;n/gm,">")}function t(e){return e.nodeName.toLowerCase()}function n(e,t){var n=e&&e.exec(t);return n&&0==n.index}function r(e){return Array.prototype.map.call(e.childNodes,function(e){return 3==e.nodeType?v.useBR?e.nodeValue.replace(/\n/g,""):e.nodeValue:"br"==t(e)?"\n":r(e)}).join("")}function i(e){var t=(e.className+" "+(e.parentNode?e.parentNode.className:"")).split(/\s+/);return t=t.map(function(e){return e.replace(/^language-/,"")}),t.filter(function(e){return b(e)||"no-highlight"==e})[0]}function a(e,t){var n={};for(var r in e)n[r]=e[r];if(t)for(var r in t)n[r]=t[r];return n}function o(e){var n=[];return function r(e,i){for(var a=e.firstChild;a;a=a.nextSibling)3==a.nodeType?i+=a.nodeValue.length:"br"==t(a)?i+=1:1==a.nodeType&&(n.push({event:"start",offset:i,node:a}),i=r(a,i),n.push({event:"stop",offset:i,node:a}));return i}(e,0),n}function s(n,r,i){function a(){return n.length&&r.length?n[0].offset!=r[0].offset?n[0].offset"}function s(e){u+=""+t(e)+">"}function l(e){("start"==e.event?o:s)(e.node)}for(var c=0,u="",f=[];n.length||r.length;){var p=a();if(u+=e(i.substr(c,p[0].offset-c)),c=p[0].offset,p==n){f.reverse().forEach(s);do l(p.splice(0,1)[0]),p=a();while(p==n&&p.length&&p[0].offset==c);f.reverse().forEach(o)}else"start"==p[0].event?f.push(p[0].node):f.pop(),l(p.splice(0,1)[0])}return u+e(i.substr(c))}function l(e){function t(e){return e&&e.source||e}function n(n,r){return RegExp(t(n),"m"+(e.cI?"i":"")+(r?"g":""))}function r(i,o){function s(t,n){e.cI&&(n=n.toLowerCase()),n.split(" ").forEach(function(e){var n=e.split("|");l[n[0]]=[t,n[1]?Number(n[1]):1]})}if(!i.compiled){if(i.compiled=!0,i.k=i.k||i.bK,i.k){var l={};"string"==typeof i.k?s("keyword",i.k):Object.keys(i.k).forEach(function(e){s(e,i.k[e])}),i.k=l}i.lR=n(i.l||/\b[A-Za-z0-9_]+\b/,!0),o&&(i.bK&&(i.b=i.bK.split(" ").join("|")),i.b||(i.b=/\B|\b/),i.bR=n(i.b),i.e||i.eW||(i.e=/\B|\b/),i.e&&(i.eR=n(i.e)),i.tE=t(i.e)||"",i.eW&&o.tE&&(i.tE+=(i.e?"|":"")+o.tE)),i.i&&(i.iR=n(i.i)),void 0===i.r&&(i.r=1),i.c||(i.c=[]);var c=[];i.c.forEach(function(e){e.v?e.v.forEach(function(t){c.push(a(e,t))}):c.push("self"==e?i:e)}),i.c=c,i.c.forEach(function(e){r(e,i)}),i.starts&&r(i.starts,o);var u=i.c.map(function(e){return e.bK?"\\.?\\b("+e.b+")\\b\\.?":e.b}).concat([i.tE]).concat([i.i]).map(t).filter(Boolean);i.t=u.length?n(u.join("|"),!0):{exec:function(){return null}},i.continuation={}}}r(e)}function c(t,r,i,a){function o(e,t){for(var r=0;r";return a+=e+'">',a+t+o}function h(){var t=e(E);if(!x.k)return t;var n="",r=0;x.lR.lastIndex=0;for(var i=x.lR.exec(t);i;){n+=t.substr(r,i.index-r);var a=p(x,i);a?(N+=a[1],n+=d(a[0],i[0])):n+=i[0],r=x.lR.lastIndex,i=x.lR.exec(t)}return n+t.substr(r)}function m(){if(x.sL&&!y[x.sL])return e(E);var t=x.sL?c(x.sL,E,!0,x.continuation.top):u(E);return x.r>0&&(N+=t.r),"continuous"==x.subLanguageMode&&(x.continuation.top=t.top),d(t.language,t.value,!1,!0)}function g(){return void 0!==x.sL?m():h()}function $(t,n){var r=t.cN?d(t.cN,"",!0):"";t.rB?(w+=r,E=""):t.eB?(w+=e(n)+r,E=""):(w+=r,E=n),x=Object.create(t,{parent:{value:x}})}function S(t,n){if(E+=t,void 0===n)return w+=g(),0;var r=o(n,x);if(r)return w+=g(),$(r,n),r.rB?0:n.length;var i=s(x,n);if(i){var a=x;a.rE||a.eE||(E+=n),w+=g();do x.cN&&(w+=""),N+=x.r,x=x.parent;while(x!=i.parent);return a.eE&&(w+=e(n)),E="",i.starts&&$(i.starts,""),a.rE?0:n.length}if(f(n,x))throw new Error('Illegal lexeme "'+n+'" for mode "'+(x.cN||"")+'"');return E+=n,n.length||1}var C=b(t);if(!C)throw new Error('Unknown language: "'+t+'"');l(C);for(var x=a||C,w="",D=x;D!=C;D=D.parent)D.cN&&(w=d(D.cN,w,!0));var E="",N=0;try{for(var M,T,A=0;;){if(x.t.lastIndex=A,M=x.t.exec(r),!M)break;T=S(r.substr(A,M.index-A),M[0]),A=M.index+T}S(r.substr(A));for(var D=x;D.parent;D=D.parent)D.cN&&(w+="");return{r:N,value:w,language:t,top:x}}catch(k){if(-1!=k.message.indexOf("Illegal"))return{r:0,value:e(r)};throw k}}function u(t,n){n=n||v.languages||Object.keys(y);var r={r:0,value:e(t)},i=r;return n.forEach(function(e){if(b(e)){var n=c(e,t,!1);n.language=e,n.r>i.r&&(i=n),n.r>r.r&&(i=r,r=n)}}),i.language&&(r.second_best=i),r}function f(e){return v.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,t){return t.replace(/\t/g,v.tabReplace)})),v.useBR&&(e=e.replace(/\n/g,"")),e}function p(e){var t=r(e),n=i(e);if("no-highlight"!=n){var a=n?c(n,t,!0):u(t),l=o(e);if(l.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","pre");p.innerHTML=a.value,a.value=s(l,o(p),t)}a.value=f(a.value),e.innerHTML=a.value,e.className+=" hljs "+(!n&&a.language||""),e.result={language:a.language,re:a.r},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.r})}}function d(e){v=a(v,e)}function h(){if(!h.called){h.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function m(){addEventListener("DOMContentLoaded",h,!1),addEventListener("load",h,!1)}function g(e,t){var n=y[e]=t(this);n.aliases&&n.aliases.forEach(function(t){$[t]=e})}function b(e){return y[e]||y[$[e]]}var v={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},y={},$={};this.highlight=c,this.highlightAuto=u,this.fixMarkup=f,this.highlightBlock=p,this.configure=d,this.initHighlighting=h,this.initHighlightingOnLoad=m,this.registerLanguage=g,this.getLanguage=b,this.inherit=a,this.IR="[a-zA-Z][a-zA-Z0-9_]*",this.UIR="[a-zA-Z_][a-zA-Z0-9_]*",this.NR="\\b\\d+(\\.\\d+)?",this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",this.BNR="\\b(0b[01]+)",this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",this.BE={b:"\\\\[\\s\\S]",r:0},this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]},this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]},this.CLCM={cN:"comment",b:"//",e:"$"},this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"},this.HCM={cN:"comment",b:"#",e:"$"},this.NM={cN:"number",b:this.NR,r:0},this.CNM={cN:"number",b:this.CNR,r:0},this.BNM={cN:"number",b:this.BNR,r:0},this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]},this.TM={cN:"title",b:this.IR,r:0},this.UTM={cN:"title",b:this.UIR,r:0}};hljs.registerLanguage("scilab",function(e){var t=[e.CNM,{cN:"string",b:"'|\"",e:"'|\"",c:[e.BE,{b:"''"}]}];return{k:{keyword:"abort break case clear catch continue do elseif else endfunction end for functionglobal if pause return resume select try then while%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp errorexec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isemptyisinfisnan isvector lasterror length load linspace list listfiles log10 log2 logmax min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand realround sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tantype typename warning zeros matrix"},i:'("|#|/\\*|\\s+/\\w+)',c:[{cN:"function",bK:"function endfunction",e:"$",k:"function endfunction|10",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)"}]},{cN:"transposed_variable",b:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",e:"",r:0},{cN:"matrix",b:"\\[",e:"\\]'*[\\.']*",r:0,c:t},{cN:"comment",b:"//",e:"$"}].concat(t)}}),hljs.registerLanguage("xml",function(){var e="[A-Za-z0-9\\._:-]+",t={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"},n={eW:!0,i:/,r:0,c:[t,{cN:"attribute",b:e,r:0},{b:"=",r:0,c:[{cN:"value",v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html"],cI:!0,c:[{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"",rE:!0,sL:"css"}},{cN:"tag",b:"",rE:!0,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},t,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"?",e:"/?>",c:[{cN:"title",b:"[^ /><]+",r:0},n]}]}}),hljs.registerLanguage("asciidoc",function(){return{c:[{cN:"comment",b:"^/{4,}\\n",e:"\\n/{4,}$",r:10},{cN:"comment",b:"^//",e:"$",r:0},{cN:"title",b:"^\\.\\w.*$"},{b:"^[=\\*]{4,}\\n",e:"\\n^[=\\*]{4,}$",r:10},{cN:"header",b:"^(={1,5}) .+?( \\1)?$",r:10},{cN:"header",b:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$",r:10},{cN:"attribute",b:"^:.+?:",e:"\\s",eE:!0,r:10},{cN:"attribute",b:"^\\[.+?\\]$",r:0},{cN:"blockquote",b:"^_{4,}\\n",e:"\\n_{4,}$",r:10},{cN:"code",b:"^[\\-\\.]{4,}\\n",e:"\\n[\\-\\.]{4,}$",r:10},{b:"^\\+{4,}\\n",e:"\\n\\+{4,}$",c:[{b:"<",e:">",sL:"xml",r:0}],r:10},{cN:"bullet",b:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{cN:"label",b:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",r:10},{cN:"strong",b:"\\B\\*(?![\\*\\s])",e:"(\\n{2}|\\*)",c:[{b:"\\\\*\\w",r:0}]},{cN:"emphasis",b:"\\B'(?!['\\s])",e:"(\\n{2}|')",c:[{b:"\\\\'\\w",r:0}],r:0},{cN:"emphasis",b:"_(?![_\\s])",e:"(\\n{2}|_)",r:0},{cN:"smartquote",b:"``.+?''",r:10},{cN:"smartquote",b:"`.+?'",r:10},{cN:"code",b:"(`.+?`|\\+.+?\\+)",r:0},{cN:"code",b:"^[ \\t]",e:"$",r:0},{cN:"horizontal_rule",b:"^'{3,}[ \\t]*$",r:10},{b:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",rB:!0,c:[{b:"(link|image:?):",r:0},{cN:"link_url",b:"\\w",e:"[^\\[]+",r:0},{cN:"link_label",b:"\\[",e:"\\]",eB:!0,eE:!0,r:0}],r:10}]}}),hljs.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module exports global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r=e.inherit(e.TM,{b:n}),i={cN:"subst",b:/#\{/,e:/}/,k:t},a=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,i]},{b:/"/,e:/"/,c:[e.BE,i]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[i,e.HCM]},{b:"//[gim]*",r:0},{b:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"}]},{cN:"property",b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];return i.c=a,{k:t,c:a.concat([{cN:"comment",b:"###",e:"###"},e.HCM,{cN:"function",b:"("+n+"\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",e:"[-=]>",rB:!0,c:[r,{cN:"params",b:"\\(",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(a)}]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[r]},r]},{cN:"attribute",b:n+":",e:":",rB:!0,eE:!0,r:0}])}}),hljs.registerLanguage("fix",function(){return{c:[{b:/[^\u2401\u0001]+/,e:/[\u2401\u0001]/,eE:!0,rB:!0,rE:!1,c:[{b:/([^\u2401\u0001=]+)/,e:/=([^\u2401\u0001=]+)/,rE:!0,rB:!1,cN:"attribute"},{b:/=/,e:/([\u2401\u0001])/,eE:!0,eB:!0,cN:"string"}]}],cI:!0}}),hljs.registerLanguage("mel",function(e){return{k:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",i:"",c:[e.CNM,e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE]},{cN:"variable",v:[{b:"\\$\\d"},{b:"[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)"},{b:"\\*(\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)",r:0}]},e.CLCM,e.CBLCLM]} +}),hljs.registerLanguage("objectivec",function(e){var t={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign self synchronized id nonatomic super unichar IBOutlet IBAction strong weak @private @protected @public @try @property @end @throw @catch @finally @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,r="@interface @class @protocol @implementation";return{k:t,l:n,i:"",c:[e.CLCM,e.CBLCLM,e.CNM,e.QSM,{cN:"string",b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"},{cN:"preprocessor",b:"#import",e:"$",c:[{cN:"title",b:'"',e:'"'},{cN:"title",b:"<",e:">"}]},{cN:"preprocessor",b:"#",e:"$"},{cN:"class",b:"("+r.split(" ").join("|")+")\\b",e:"({|$)",k:r,l:n,c:[e.UTM]},{cN:"variable",b:"\\."+e.UIR,r:0}]}}),hljs.registerLanguage("apache",function(e){var t={cN:"number",b:"[\\$%]\\d+"};return{cI:!0,c:[e.HCM,{cN:"tag",b:"?",e:">"},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",t]},t,e.QSM]}}],i:/\S/}}),hljs.registerLanguage("livecodeserver",function(e){var t={cN:"variable",b:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",r:0},n={cN:"comment",e:"$",v:[e.CBLCLM,e.HCM,{b:"--"},{b:"[^:]//"}]},r=e.inherit(e.TM,{v:[{b:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{b:"\\b_[a-z0-9\\-]+"}]}),i=e.inherit(e.TM,{b:"\\b([A-Za-z0-9_\\-]+)\\b"});return{cI:!1,k:{keyword:"after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if",constant:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",operator:"div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg base64Decode base64Encode baseConvert binaryDecode binaryEncode byteToNum cachedURL cachedURLs charToNum cipherNames commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames global globals hasMemory hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames num number numToByte numToChar offset open openfiles openProcesses openProcessIDs openSockets paramCount param params peerAddress pendingMessages platform processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_Execute revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sec secs seconds sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName tick ticks time to toLower toUpper transpose trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus value variableNames version waitDepth weekdayNames wordOffset add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket process post seek rel relative read from process rename replace require resetAll revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split subtract union unload wait write"},c:[t,{cN:"keyword",b:"\\bend\\sif\\b"},{cN:"function",bK:"function",e:"$",c:[t,i,e.ASM,e.QSM,e.BNM,e.CNM,r]},{cN:"function",bK:"end",e:"$",c:[i,r]},{cN:"command",bK:"command on",e:"$",c:[t,i,e.ASM,e.QSM,e.BNM,e.CNM,r]},{cN:"command",bK:"end",e:"$",c:[i,r]},{cN:"preprocessor",b:"<\\?rev|<\\?lc|<\\?livecode",r:10},{cN:"preprocessor",b:"<\\?"},{cN:"preprocessor",b:"\\?>"},n,e.ASM,e.QSM,e.BNM,e.CNM,r],i:";$|^\\[|^="}}),hljs.registerLanguage("glsl",function(e){return{k:{keyword:"atomic_uint attribute bool break bvec2 bvec3 bvec4 case centroid coherent const continue default discard dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 do double dvec2 dvec3 dvec4 else flat float for highp if iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray in inout int invariant isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 layout lowp mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 mediump noperspective out patch precision readonly restrict return sample sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow smooth struct subroutine switch uimage1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint uniform usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D usamplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 varying vec2 vec3 vec4 void volatile while writeonly",built_in:"gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffsetgl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_PerVertex gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicCounter atomicCounterDecrement atomicCounterIncrement barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow gl_TextureMatrix gl_TextureMatrixInverse",literal:"true false"},i:'"',c:[e.CLCM,e.CBLCLM,e.CNM,{cN:"preprocessor",b:"#",e:"$"}]}}),hljs.registerLanguage("lasso",function(e){var t="[a-zA-Z_][a-zA-Z0-9_.]*",n="<\\?(lasso(script)?|=)",r="\\]|\\?>",i={literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null bytes list queue set stack staticarray tie local var variable global data self inherited",keyword:"error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},a={cN:"comment",b:"",r:0},o={cN:"preprocessor",b:"\\[noprocess\\]",starts:{cN:"markup",e:"\\[/noprocess\\]",rE:!0,c:[a]}},s={cN:"preprocessor",b:"\\[/noprocess|"+n},l={cN:"variable",b:"'"+t+"'"},c=[e.CLCM,{cN:"javadoc",b:"/\\*\\*!",e:"\\*/"},e.CBLCLM,e.inherit(e.CNM,{b:e.CNR+"|-?(infinity|nan)\\b"}),e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null}),{cN:"string",b:"`",e:"`"},{cN:"variable",v:[{b:"[#$]"+t},{b:"#",e:"\\d+",i:"\\W"}]},{cN:"tag",b:"::\\s*",e:t,i:"\\W"},{cN:"attribute",b:"\\.\\.\\.|-"+e.UIR},{cN:"subst",v:[{b:"->\\s*",c:[l]},{b:":=|/(?!\\w)=?|[-+*%=<>&|!?\\\\]+",r:0}]},{cN:"built_in",b:"\\.\\.?",r:0,c:[l]},{cN:"class",bK:"define",rE:!0,e:"\\(|=>",c:[e.inherit(e.TM,{b:e.UIR+"(=(?!>))?"})]}];return{aliases:["ls","lassoscript"],cI:!0,l:t+"|&[lg]t;",k:i,c:[{cN:"preprocessor",b:r,r:0,starts:{cN:"markup",e:"\\[|"+n,rE:!0,r:0,c:[a]}},o,s,{cN:"preprocessor",b:"\\[no_square_brackets",starts:{e:"\\[/no_square_brackets\\]",l:t+"|&[lg]t;",k:i,c:[{cN:"preprocessor",b:r,r:0,starts:{cN:"markup",e:n,rE:!0,c:[a]}},o,s].concat(c)}},{cN:"preprocessor",b:"\\[",r:0},{cN:"shebang",b:"^#!.+lasso9\\b",r:10}].concat(c)}}),hljs.registerLanguage("mathematica",function(e){return{aliases:["mma"],l:"(\\$|\\b)"+e.IR+"\\b",k:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber",c:[{cN:"comment",b:/\(\*/,e:/\*\)/},e.ASM,e.QSM,e.CNM,{cN:"list",b:/\{/,e:/\}/,i:/:/}]} +}),hljs.registerLanguage("tex",function(){var e={cN:"command",b:"\\\\[a-zA-Zа-яА-я]+[\\*]?"},t={cN:"command",b:"\\\\[^a-zA-Zа-яА-я0-9]"},n={cN:"special",b:"[{}\\[\\]\\~]",r:0};return{c:[{b:"\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",rB:!0,c:[e,t,{cN:"number",b:" *=",e:"-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",eB:!0}],r:10},e,t,n,{cN:"formula",b:"\\$\\$",e:"\\$\\$",c:[e,t,n],r:0},{cN:"formula",b:"\\$",e:"\\$",c:[e,t,n],r:0},{cN:"comment",b:"%",e:"$",r:0}]}}),hljs.registerLanguage("cs",function(e){var t="abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async await ascending descending from get group into join let orderby partial select set value var where yield";return{k:t,c:[{cN:"comment",b:"///",e:"$",rB:!0,c:[{cN:"xmlDocTag",b:"///|"},{cN:"xmlDocTag",b:"?",e:">"}]},e.CLCM,e.CBLCLM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},e.ASM,e.QSM,e.CNM,{bK:"protected public private internal",e:/[{;=]/,k:t,c:[{bK:"class namespace interface",starts:{c:[e.TM]}},{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM]}]}]}}),hljs.registerLanguage("css",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={cN:"function",b:t+"\\(",e:"\\)",c:["self",e.NM,e.ASM,e.QSM]};return{cI:!0,i:"[=/|']",c:[e.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[n,e.ASM,e.QSM,e.NM]}]},{cN:"tag",b:t,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[e.CBLCLM,{cN:"rule",b:"[^\\s]",rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[n,e.NM,e.QSM,e.ASM,e.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}}),hljs.registerLanguage("python",function(e){var t={cN:"prompt",b:/^(>>>|\.\.\.) /},n={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[t],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[t],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},r={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},i={cN:"params",b:/\(/,e:/\)/,c:["self",t,r,n]},a={e:/:/,i:/[${=;\n]/,c:[e.UTM,i]};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[t,r,n,e.HCM,e.inherit(a,{cN:"function",bK:"def",r:10}),e.inherit(a,{cN:"class",bK:"class"}),{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}}),hljs.registerLanguage("profile",function(e){return{c:[e.CNM,{cN:"built_in",b:"{",e:"}$",eB:!0,eE:!0,c:[e.ASM,e.QSM],r:0},{cN:"filename",b:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",e:":",eE:!0},{cN:"header",b:"(ncalls|tottime|cumtime)",e:"$",k:"ncalls tottime|10 cumtime|10 filename",r:10},{cN:"summary",b:"function calls",e:"$",c:[e.CNM],r:10},e.ASM,e.QSM,{cN:"function",b:"\\(",e:"\\)$",c:[e.UTM],r:0}]}}),hljs.registerLanguage("django",function(){var e={cN:"filter",b:/\|[A-Za-z]+\:?/,k:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone",c:[{cN:"argument",b:/"/,e:/"/},{cN:"argument",b:/'/,e:/'/}]};return{cI:!0,sL:"xml",subLanguageMode:"continuous",c:[{cN:"template_comment",b:/\{%\s*comment\s*%}/,e:/\{%\s*endcomment\s*%}/},{cN:"template_comment",b:/\{#/,e:/#}/},{cN:"template_tag",b:/\{%/,e:/%}/,k:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor in ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup by as ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim",c:[e]},{cN:"variable",b:/\{\{/,e:/}}/,c:[e]}]}}),hljs.registerLanguage("nginx",function(e){var t={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},n={eW:!0,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0},{cN:"regexp",c:[e.BE,t],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},t]};return{c:[e.HCM,{b:e.UIR+"\\s",e:";|{",rB:!0,c:[e.inherit(e.UTM,{starts:n})],r:0}],i:"[^\\s\\}]"}}),hljs.registerLanguage("smalltalk",function(e){var t="[a-z][a-zA-Z0-9_]*",n={cN:"char",b:"\\$.{1}"},r={cN:"symbol",b:"#"+e.UIR};return{k:"self super nil true false thisContext",c:[{cN:"comment",b:'"',e:'"'},e.ASM,{cN:"class",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},{cN:"method",b:t+":",r:0},e.CNM,r,n,{cN:"localvars",b:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",rB:!0,e:/\|/,i:/\S/,c:[{b:"(\\|[ ]*)?"+t}]},{cN:"array",b:"\\#\\(",e:"\\)",c:[e.ASM,n,e.CNM,r]}]}}),hljs.registerLanguage("sql",function(e){return{cI:!0,i:/[<>]/,c:[{cN:"operator",b:"\\b(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant|merge)\\b(?!:)",e:";",eW:!0,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row merge matched database",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM]},e.CBLCLM,{cN:"comment",b:"--",e:"$"}]}}),hljs.registerLanguage("oxygene",function(e){var t="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained",n={cN:"comment",b:"{",e:"}",r:0},r={cN:"comment",b:"\\(\\*",e:"\\*\\)",r:10},i={cN:"string",b:"'",e:"'",c:[{b:"''"}]},a={cN:"string",b:"(#\\d+)+"},o={cN:"function",bK:"function constructor destructor procedure method",e:"[:;]",k:"function constructor|10 destructor|10 procedure|10 method|10",c:[e.TM,{cN:"params",b:"\\(",e:"\\)",k:t,c:[i,a]},n,r]};return{cI:!0,k:t,i:'("|\\$[G-Zg-z]|\\/\\*|)',c:[n,r,e.CLCM,i,a,e.NM,o,{cN:"class",b:"=\\bclass\\b",e:"end;",k:t,c:[i,a,n,r,e.CLCM,o]}]}}),hljs.registerLanguage("actionscript",function(e){var t="[a-zA-Z_$][a-zA-Z0-9_$]*",n="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",r={cN:"rest_arg",b:"[.]{3}",e:t,r:10};return{k:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},c:[e.ASM,e.QSM,e.CLCM,e.CBLCLM,e.CNM,{cN:"package",bK:"package",e:"{",c:[e.TM]},{cN:"class",bK:"class interface",e:"{",c:[{bK:"extends implements"},e.TM]},{cN:"preprocessor",bK:"import include",e:";"},{cN:"function",bK:"function",e:"[{;]",i:"\\S",c:[e.TM,{cN:"params",b:"\\(",e:"\\)",c:[e.ASM,e.QSM,e.CLCM,e.CBLCLM,r]},{cN:"type",b:":",e:n,r:10}]}]}}),hljs.registerLanguage("ruleslanguage",function(e){return{k:{keyword:"BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM NUMDAYS READ_DATE STAGING",built_in:"IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME"},c:[e.CLCM,e.CBLCLM,e.ASM,e.QSM,e.CNM,{cN:"array",b:"#[a-zA-Z .]+"}]}}),hljs.registerLanguage("mizar",function(){return{k:["environ vocabularies notations constructors definitions registrations theorems schemes requirements","begin end definition registration cluster existence pred func defpred deffunc theorem proof","let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from","be being by means equals implies iff redefine define now not or attr is mode suppose per cases set","thesis contradiction scheme reserve struct","correctness compatibility coherence symmetry assymetry reflexivity irreflexivity","connectedness uniqueness commutativity idempotence involutiveness projectivity"].join(" "),c:[{cN:"comment",b:"::",e:"$"}]}}),hljs.registerLanguage("handlebars",function(){var e="each in with if else unless bindattr action collection debugger log outlet template unbound view yield";return{cI:!0,sL:"xml",subLanguageMode:"continuous",c:[{cN:"expression",b:"{{",e:"}}",c:[{cN:"begin-block",b:"#[a-zA-Z- .]+",k:e},{cN:"string",b:'"',e:'"'},{cN:"end-block",b:"\\/[a-zA-Z- .]+",k:e},{cN:"variable",b:"[a-zA-Z-.]+",k:e}]}]}}),hljs.registerLanguage("scss",function(e){{var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={cN:"function",b:t+"\\(",e:"\\)",c:["self",e.NM,e.ASM,e.QSM]},r={cN:"hexcolor",b:"#[0-9A-Fa-f]+"};({cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[n,r,e.NM,e.QSM,e.ASM,e.CBLCLM,{cN:"important",b:"!important"}]}})}return{cI:!0,i:"[=/|']",c:[e.CLCM,e.CBLCLM,{cN:"function",b:t+"\\(",e:"\\)",c:["self",e.NM,e.ASM,e.QSM]},{cN:"id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{cN:"pseudo",b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{cN:"pseudo",b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{cN:"value",b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{cN:"value",b:":",e:";",c:[r,e.NM,e.QSM,e.ASM,{cN:"important",b:"!important"}]},{cN:"at_rule",b:"@",e:"[{;]",k:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",c:[n,e.QSM,e.ASM,r,e.NM,{cN:"preprocessor",b:"\\s[A-Za-z0-9_.-]+",r:0}]}]}}),hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",n={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},r={b:"->{",e:"}"},i={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@\*](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@\*][^\s\w{]/,r:0}]},a={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5},o=[e.BE,n,i],s=[i,e.HCM,a,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:!0},r,{cN:"string",c:o,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,a,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];return n.c=s,r.c=s,{k:t,c:s}}),hljs.registerLanguage("ini",function(e){return{cI:!0,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:!0,k:"on off true false yes no",c:[e.QSM,e.NM],r:0}]}]}}),hljs.registerLanguage("erlang",function(e){var t="[a-z'][a-zA-Z0-9_']*",n="("+t+":"+t+"|"+t+")",r={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun let not of orelse|10 query receive rem try when xor",literal:"false true"},i={cN:"comment",b:"%",e:"$",r:0},a={cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},o={b:"fun\\s+"+t+"/\\d+"},s={b:n+"\\(",e:"\\)",rB:!0,r:0,c:[{cN:"function_name",b:n,r:0},{b:"\\(",e:"\\)",eW:!0,rE:!0,r:0}]},l={cN:"tuple",b:"{",e:"}",r:0},c={cN:"variable",b:"\\b_([A-Z][A-Za-z0-9_]*)?",r:0},u={cN:"variable",b:"[A-Z][a-zA-Z0-9_]*",r:0},f={b:"#"+e.UIR,r:0,rB:!0,c:[{cN:"record_name",b:"#"+e.UIR,r:0},{b:"{",e:"}",r:0}]},p={bK:"fun receive if try case",e:"end",k:r};p.c=[i,o,e.inherit(e.ASM,{cN:""}),p,s,e.QSM,a,l,c,u,f];var d=[i,o,p,s,e.QSM,a,l,c,u,f];s.c[1].c=d,l.c=d,f.c[1].c=d;var h={cN:"params",b:"\\(",e:"\\)",c:d};return{k:r,i:"(|\\*=|\\+=|-=|/=|/\\*|\\*/|\\(\\*|\\*\\))",c:[{cN:"function",b:"^"+t+"\\s*\\(",e:"->",rB:!0,i:"\\(|#|//|/\\*|\\\\|:|;",c:[h,e.inherit(e.TM,{b:t})],starts:{e:";|\\.",k:r,c:d}},i,{cN:"pp",b:"^-",e:"\\.",r:0,eE:!0,rB:!0,l:"-"+e.IR,k:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior",c:[h]},a,e.QSM,f,c,u,l]}}),hljs.registerLanguage("1c",function(e){var t="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",n="возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",r="ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон",i={cN:"dquote",b:'""'},a={cN:"string",b:'"',e:'"|$',c:[i]},o={cN:"string",b:"\\|",e:'"|$',c:[i]};return{cI:!0,l:t,k:{keyword:n,built_in:r},c:[e.CLCM,e.NM,a,o,{cN:"function",b:"(процедура|функция)",e:"$",l:t,k:"процедура функция",c:[e.inherit(e.TM,{b:t}),{cN:"tail",eW:!0,c:[{cN:"params",b:"\\(",e:"\\)",l:t,k:"знач",c:[a,o]},{cN:"export",b:"экспорт",eW:!0,l:t,k:"экспорт",c:[e.CLCM]}]},e.CLCM]},{cN:"preprocessor",b:"#",e:"$"},{cN:"date",b:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}}),hljs.registerLanguage("haskell",function(e){var t={cN:"comment",v:[{b:"--",e:"$"},{b:"{-",e:"-}",c:["self"]}]},n={cN:"pragma",b:"{-#",e:"#-}"},r={cN:"preprocessor",b:"^#",e:"$"},i={cN:"type",b:"\\b[A-Z][\\w']*",r:0},a={cN:"container",b:"\\(",e:"\\)",i:'"',c:[n,t,r,{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TM,{b:"[_a-z][\\w']*"})]},o={cN:"container",b:"{",e:"}",c:a.c};return{k:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",c:[{cN:"module",b:"\\bmodule\\b",e:"where",k:"module where",c:[a,t],i:"\\W\\.|;"},{cN:"import",b:"\\bimport\\b",e:"$",k:"import|0 qualified as hiding",c:[a,t],i:"\\W\\.|;"},{cN:"class",b:"^(\\s*)?(class|instance)\\b",e:"where",k:"class family instance where",c:[i,a,t]},{cN:"typedef",b:"\\b(data|(new)?type)\\b",e:"$",k:"data family type newtype deriving",c:[n,t,i,a,o]},{cN:"default",bK:"default",e:"$",c:[i,a,t]},{cN:"infix",bK:"infix infixl infixr",e:"$",c:[e.CNM,t]},{cN:"foreign",b:"\\bforeign\\b",e:"$",k:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",c:[i,e.QSM,t]},{cN:"shebang",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},n,t,r,e.QSM,e.CNM,i,e.inherit(e.TM,{b:"^[_a-z][\\w']*"}),{b:"->|<-"}]}}),hljs.registerLanguage("delphi",function(e){var t="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure",n={cN:"comment",v:[{b:/\{/,e:/\}/,r:0},{b:/\(\*/,e:/\*\)/,r:10}]},r={cN:"string",b:/'/,e:/'/,c:[{b:/''/}]},i={cN:"string",b:/(#\d+)+/},a={b:e.IR+"\\s*=\\s*class\\s*\\(",rB:!0,c:[e.TM]},o={cN:"function",bK:"function constructor destructor procedure",e:/[:;]/,k:"function constructor|10 destructor|10 procedure|10",c:[e.TM,{cN:"params",b:/\(/,e:/\)/,k:t,c:[r,i]},n]};return{cI:!0,k:t,i:/("|\$[G-Zg-z]|\/\*|<\/)/,c:[n,e.CLCM,r,i,e.NM,a,o]}}),hljs.registerLanguage("markdown",function(){return{c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:!0,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",e:"$",rB:!0,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:!0,eE:!0},{cN:"link_url",b:"\\s",e:"$"}]}]} +}),hljs.registerLanguage("avrasm",function(e){return{cI:!0,k:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf"},c:[e.CBLCLM,{cN:"comment",b:";",e:"$",r:0},e.CNM,e.BNM,{cN:"number",b:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},e.QSM,{cN:"string",b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"},{cN:"label",b:"^[A-Za-z0-9_.$]+:"},{cN:"preprocessor",b:"#",e:"$"},{cN:"preprocessor",b:"\\.[a-zA-Z]+"},{cN:"localvars",b:"@[0-9]+"}]}}),hljs.registerLanguage("lisp",function(e){var t="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",n="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?",r={cN:"shebang",b:"^#!",e:"$"},i={cN:"literal",b:"\\b(t{1}|nil)\\b"},a={cN:"number",v:[{b:n,r:0},{b:"#b[0-1]+(/[0-1]+)?"},{b:"#o[0-7]+(/[0-7]+)?"},{b:"#x[0-9a-f]+(/[0-9a-f]+)?"},{b:"#c\\("+n+" +"+n,e:"\\)"}]},o=e.inherit(e.QSM,{i:null}),s={cN:"comment",b:";",e:"$"},l={cN:"variable",b:"\\*",e:"\\*"},c={cN:"keyword",b:"[:&]"+t},u={b:"\\(",e:"\\)",c:["self",i,o,a]},f={cN:"quoted",c:[a,o,l,c,u],v:[{b:"['`]\\(",e:"\\)"},{b:"\\(quote ",e:"\\)",k:{title:"quote"}}]},p={cN:"list",b:"\\(",e:"\\)"},d={eW:!0,r:0};return p.c=[{cN:"title",b:t},d],d.c=[f,p,i,a,o,s,l,c],{i:/\S/,c:[a,r,i,o,s,f,p]}}),hljs.registerLanguage("vbnet",function(e){return{cI:!0,k:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},i:"//|{|}|endif|gosub|variant|wend",c:[e.inherit(e.QSM,{c:[{b:'""'}]}),{cN:"comment",b:"'",e:"$",rB:!0,c:[{cN:"xmlDocTag",b:"'''|"},{cN:"xmlDocTag",b:"?",e:">"}]},e.CNM,{cN:"preprocessor",b:"#",e:"$",k:"if else elseif end region externalsource"}]}}),hljs.registerLanguage("axapta",function(e){return{k:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",c:[e.CLCM,e.CBLCLM,e.ASM,e.QSM,e.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"class",bK:"class interface",e:"{",i:":",c:[{cN:"inheritance",bK:"extends implements",r:10},e.UTM]}]}}),hljs.registerLanguage("ocaml",function(e){return{k:{keyword:"and as assert asr begin class constraint do done downto else end exception external false for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new object of open or private rec ref sig struct then to true try type val virtual when while with parser value",built_in:"bool char float int list unit array exn option int32 int64 nativeint format4 format6 lazy_t in_channel out_channel string"},i:/\/\//,c:[{cN:"string",b:'"""',e:'"""'},{cN:"comment",b:"\\(\\*",e:"\\*\\)",c:["self"]},{cN:"class",bK:"type",e:"\\(|=|$",c:[e.UTM]},{cN:"annotation",b:"\\[<",e:">\\]"},e.CBLCLM,e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null}),e.CNM]}}),hljs.registerLanguage("erlang-repl",function(e){return{k:{special_functions:"spawn spawn_link self",reserved:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},c:[{cN:"prompt",b:"^[0-9]+> ",r:10},{cN:"comment",b:"%",e:"$"},{cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},e.ASM,e.QSM,{cN:"constant",b:"\\?(::)?([A-Z]\\w*(::)?)+"},{cN:"arrow",b:"->"},{cN:"ok",b:"ok"},{cN:"exclamation_mark",b:"!"},{cN:"function_or_atom",b:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",r:0},{cN:"variable",b:"[A-Z][a-zA-Z0-9_']*",r:0}]}}),hljs.registerLanguage("vala",function(e){return{k:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object",literal:"false true null"},c:[{cN:"class",bK:"class interface delegate namespace",e:"{",i:"[^,:\\n\\s\\.]",c:[e.UTM]},e.CLCM,e.CBLCLM,{cN:"string",b:'"""',e:'"""',r:5},e.ASM,e.QSM,e.CNM,{cN:"preprocessor",b:"^#",e:"$",r:2},{cN:"constant",b:" [A-Z_]+ ",r:0}]}}),hljs.registerLanguage("dos",function(){return{cI:!0,k:{flow:"if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq",keyword:"shift cd dir echo setlocal endlocal set pause copy",stream:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux",winutils:"ping net ipconfig taskkill xcopy ren del"},c:[{cN:"envvar",b:"%%[^ ]"},{cN:"envvar",b:"%[^ ]+?%"},{cN:"envvar",b:"![^ ]+?!"},{cN:"number",b:"\\b\\d+",r:0},{cN:"comment",b:"@?rem",e:"$"}]}}),hljs.registerLanguage("clojure",function(e){var t={built_in:"def cond apply if-not if-let if not not= = < < > <= <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},n="[a-zA-Z_0-9\\!\\.\\?\\-\\+\\*\\/\\<\\=\\>\\&\\#\\$';]+",r="[\\s:\\(\\{]+\\d+(\\.\\d+)?",i={cN:"number",b:r,r:0},a=e.inherit(e.QSM,{i:null}),o={cN:"comment",b:";",e:"$",r:0},s={cN:"collection",b:"[\\[\\{]",e:"[\\]\\}]"},l={cN:"comment",b:"\\^"+n},c={cN:"comment",b:"\\^\\{",e:"\\}"},u={cN:"attribute",b:"[:]"+n},f={cN:"list",b:"\\(",e:"\\)"},p={eW:!0,k:{literal:"true false nil"},r:0},d={k:t,l:n,cN:"title",b:n,starts:p};return f.c=[{cN:"comment",b:"comment"},d,p],p.c=[f,a,l,c,o,u,s,i],s.c=[f,a,l,o,u,s,i],{i:/\S/,c:[o,f,{cN:"prompt",b:/^=> /,starts:{e:/\n\n|\Z/}}]}}),hljs.registerLanguage("go",function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer",constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:t,i:"",c:[e.CLCM,e.CBLCLM,e.QSM,{cN:"string",b:"'",e:"[^\\\\]'"},{cN:"string",b:"`",e:"`"},{cN:"number",b:"[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?",r:0},e.CNM]}}),hljs.registerLanguage("json",function(e){var t={literal:"true false null"},n=[e.QSM,e.CNM],r={cN:"value",e:",",eW:!0,eE:!0,c:n,k:t},i={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:r}],i:"\\S"},a={b:"\\[",e:"\\]",c:[e.inherit(r,{cN:null})],i:"\\S"};return n.splice(n.length,0,i,a),{c:n,k:t,i:"\\S"}}),hljs.registerLanguage("rust",function(e){var t={cN:"number",b:"\\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\\.[0-9_]+)?([uif](8|16|32|64)?)?)",r:0},n="assert bool break char check claim comm const cont copy dir do drop else enum extern export f32 f64 fail false float fn for i16 i32 i64 i8 if impl int let log loop match mod move mut priv pub pure ref return self static str struct task true trait type u16 u32 u64 u8 uint unsafe use vec while";return{k:n,i:"",c:[e.CLCM,e.CBLCLM,e.inherit(e.QSM,{i:null}),e.ASM,t,{cN:"function",bK:"fn",e:"(\\(|<)",c:[e.UTM]},{cN:"preprocessor",b:"#\\[",e:"\\]"},{bK:"type",e:"(=|<)",c:[e.UTM],i:"\\S"},{bK:"trait enum",e:"({|<)",c:[e.UTM],i:"\\S"}]}}),hljs.registerLanguage("java",function(e){var t="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws";return{k:t,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}],r:10},e.CLCM,e.CBLCLM,e.ASM,e.QSM,{bK:"protected public private",e:/[{;=]/,k:t,c:[{cN:"class",bK:"class interface",eW:!0,i:/[:"<>]/,c:[{bK:"extends implements",r:10},e.UTM]},{b:e.UIR+"\\s*\\(",rB:!0,c:[e.UTM]}]},e.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}}),hljs.registerLanguage("lua",function(e){var t="\\[=*\\[",n="\\]=*\\]",r={b:t,e:n,c:["self"]},i=[{cN:"comment",b:"--(?!"+t+")",e:"$"},{cN:"comment",b:"--"+t,e:n,c:[r],r:10}];return{l:e.UIR,k:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},c:i.concat([{cN:"function",bK:"function",e:"\\)",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{cN:"params",b:"\\(",eW:!0,c:i}].concat(i)},e.CNM,e.ASM,e.QSM,{cN:"string",b:t,e:n,c:[r],r:10}])}}),hljs.registerLanguage("rsl",function(e){return{k:{keyword:"float color point normal vector matrix while for if do return else break extern continue",built_in:"abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp faceforward filterstep floor format fresnel incident length lightsource log match max min mod noise normalize ntransform opposite option phong pnoise pow printf ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan texture textureinfo trace transform vtransform xcomp ycomp zcomp"},i:"",c:[e.CLCM,e.CBLCLM,e.QSM,e.ASM,e.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"shader",bK:"surface displacement light volume imager",e:"\\("},{cN:"shading",bK:"illuminate illuminance gather",e:"\\("}]}}),hljs.registerLanguage("d",function(e){var t={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},n="(0|[1-9][\\d_]*)",r="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",i="0[bB][01_]+",a="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",o="0[xX]"+a,s="([eE][+-]?"+r+")",l="("+r+"(\\.\\d*|"+s+")|\\d+\\."+r+r+"|\\."+n+s+"?)",c="(0[xX]("+a+"\\."+a+"|\\.?"+a+")[pP][+-]?"+r+")",u="("+n+"|"+i+"|"+o+")",f="("+c+"|"+l+")",p="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",d={cN:"number",b:"\\b"+u+"(L|u|U|Lu|LU|uL|UL)?",r:0},h={cN:"number",b:"\\b("+f+"([fF]|L|i|[fF]i|Li)?|"+u+"(i|[fF]i|Li))",r:0},m={cN:"string",b:"'("+p+"|.)",e:"'",i:"."},g={b:p,r:0},b={cN:"string",b:'"',c:[g],e:'"[cwd]?'},v={cN:"string",b:'[rq]"',e:'"[cwd]?',r:5},y={cN:"string",b:"`",e:"`[cwd]?"},$={cN:"string",b:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',r:10},S={cN:"string",b:'q"\\{',e:'\\}"'},C={cN:"shebang",b:"^#!",e:"$",r:5},x={cN:"preprocessor",b:"#(line)",e:"$",r:5},w={cN:"keyword",b:"@[a-zA-Z_][a-zA-Z_\\d]*"},D={cN:"comment",b:"\\/\\+",c:["self"],e:"\\+\\/",r:10};return{l:e.UIR,k:t,c:[e.CLCM,e.CBLCLM,D,$,b,v,y,S,h,d,m,C,x,w]}}),hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},e.ASM,e.QSM,e.CLCM,e.CBLCLM,e.CNM,{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBLCLM,e.REGEXP_MODE,{b:/,e:/>;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[e.CLCM,e.CBLCLM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0}]}}),hljs.registerLanguage("r",function(e){var t="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{c:[e.HCM,{b:t,l:t,k:{keyword:"function if in break next repeat else for return switch while try tryCatch|10 stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...|10",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",r:0},{cN:"number",b:"\\d+\\.(?!\\d)(?:i\\b)?",r:0},{cN:"number",b:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{b:"`",e:"`",r:0},{cN:"string",c:[e.BE],v:[{b:'"',e:'"'},{b:"'",e:"'"}]}]}}),hljs.registerLanguage("ruby",function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",n="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",r={cN:"yardoctag",b:"@[A-Za-z]+"},i={cN:"comment",v:[{b:"#",e:"$",c:[r]},{b:"^\\=begin",e:"^\\=end",c:[r],r:10},{b:"^__END__",e:"\\n$"}]},a={cN:"subst",b:"#\\{",e:"}",k:n},o={cN:"string",c:[e.BE,a],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:"%[qw]?\\(",e:"\\)"},{b:"%[qw]?\\[",e:"\\]"},{b:"%[qw]?{",e:"}"},{b:"%[qw]?<",e:">",r:10},{b:"%[qw]?/",e:"/",r:10},{b:"%[qw]?%",e:"%",r:10},{b:"%[qw]?-",e:"-",r:10},{b:"%[qw]?\\|",e:"\\|",r:10},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},s={cN:"params",b:"\\(",e:"\\)",k:n},l=[o,i,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]},i]},{cN:"function",bK:"def",e:" |$|;",r:0,c:[e.inherit(e.TM,{b:t}),s,i]},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[o,{b:t}],r:0},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[i,{cN:"regexp",c:[e.BE,a],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];return a.c=l,s.c=l,{k:n,c:l}}),hljs.registerLanguage("haml",function(){return{cI:!0,c:[{cN:"doctype",b:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",r:10},{cN:"comment",b:"^\\s*(!=#|=#|-#|/).*$",r:0},{b:"^\\s*(-|=|!=)(?!#)",starts:{e:"\\n",sL:"ruby"}},{cN:"tag",b:"^\\s*%",c:[{cN:"title",b:"\\w+"},{cN:"value",b:"[#\\.]\\w+"},{b:"{\\s*",e:"\\s*}",eE:!0,c:[{b:":\\w+\\s*=>",e:",\\s+",rB:!0,eW:!0,c:[{cN:"symbol",b:":\\w+"},{cN:"string",b:'"',e:'"'},{cN:"string",b:"'",e:"'"},{b:"\\w+",r:0}]}]},{b:"\\(\\s*",e:"\\s*\\)",eE:!0,c:[{b:"\\w+\\s*=",e:"\\s+",rB:!0,eW:!0,c:[{cN:"attribute",b:"\\w+",r:0},{cN:"string",b:'"',e:'"'},{cN:"string",b:"'",e:"'"},{b:"\\w+",r:0}]}]}]},{cN:"bullet",b:"^\\s*[=~]\\s*",r:0},{b:"#{",starts:{e:"}",sL:"ruby"}}]}}),hljs.registerLanguage("brainfuck",function(){var e={cN:"literal",b:"[\\+\\-]",r:0};return{c:[{cN:"comment",b:"[^\\[\\]\\.,\\+\\-<> \r\n]",rE:!0,e:"[\\[\\]\\.,\\+\\-<> \r\n]",r:0},{cN:"title",b:"[\\[\\]]",r:0},{cN:"string",b:"[\\.,]",r:0},{b:/\+\+|\-\-/,rB:!0,c:[e]},e]}}),hljs.registerLanguage("matlab",function(e){var t=[e.CNM,{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]}];return{k:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},i:'(//|"|#|/\\*|\\s+/\\w+)',c:[{cN:"function",bK:"function",e:"$",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)"},{cN:"params",b:"\\[",e:"\\]"}]},{cN:"transposed_variable",b:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",e:"",r:0},{cN:"matrix",b:"\\[",e:"\\]'*[\\.']*",c:t,r:0},{cN:"cell",b:"\\{",e:"\\}'*[\\.']*",c:t,i:/:/},{cN:"comment",b:"\\%",e:"$"}].concat(t)}}),hljs.registerLanguage("vbscript",function(e){return{cI:!0,k:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},i:"//",c:[e.inherit(e.QSM,{c:[{b:'""'}]}),{cN:"comment",b:/'/,e:/$/,r:0},e.CNM]}}),hljs.registerLanguage("fsharp",function(e){return{k:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",c:[{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},{cN:"string",b:'"""',e:'"""'},{cN:"comment",b:"\\(\\*",e:"\\*\\)"},{cN:"class",bK:"type",e:"\\(|=|$",c:[e.UTM]},{cN:"annotation",b:"\\[<",e:">\\]"},{cN:"attribute",b:"\\B('[A-Za-z])\\b",c:[e.BE]},e.CLCM,e.inherit(e.QSM,{i:null}),e.CNM]}}),hljs.registerLanguage("makefile",function(e){var t={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[t]}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,c:[e.QSM,t]}]}}),hljs.registerLanguage("diff",function(){return{c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}}),hljs.registerLanguage("rib",function(e){return{k:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",i:"",c:[e.HCM,e.CNM,e.ASM,e.QSM]}}),hljs.registerLanguage("http",function(){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:!0}}]}}),hljs.registerLanguage("autohotkey",function(e){var t={cN:"escape",b:"`[\\s\\S]"},n={cN:"comment",b:";",e:"$",r:0},r=[{cN:"built_in",b:"A_[a-zA-Z0-9]+"},{cN:"built_in",bK:"ComSpec Clipboard ClipboardAll ErrorLevel"}];return{cI:!0,k:{keyword:"Break Continue Else Gosub If Loop Return While",literal:"A true false NOT AND OR"},c:r.concat([t,e.inherit(e.QSM,{c:[t]}),n,{cN:"number",b:e.NR,r:0},{cN:"var_expand",b:"%",e:"%",i:"\\n",c:[t]},{cN:"label",c:[t],v:[{b:'^[^\\n";]+::(?!=)'},{b:'^[^\\n";]+:(?!=)',r:0}]},{b:",\\s*,",r:10}])}}),hljs.registerLanguage("php",function(e){var t={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},n={cN:"preprocessor",b:/<\?(php)?|\?>/},r={cN:"string",c:[e.BE,n],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},i={v:[e.BNM,e.CNM]};return{cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},n]},{cN:"comment",b:"__halt_compiler.+?;",eW:!0,k:"__halt_compiler",l:e.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[e.BE]},n,t,{cN:"function",bK:"function",e:/[;{]/,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBLCLM,r,i]}]},{cN:"class",bK:"class interface",e:"{",i:/[:\(\$"]/,c:[{bK:"extends implements",r:10},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},r,i]}}),hljs.registerLanguage("cmake",function(e){return{cI:!0,k:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or",operator:"equal less greater strless strgreater strequal matches"},c:[{cN:"envvar",b:"\\${",e:"}"},e.HCM,e.QSM,e.NM]}}),hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]},n={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},r={cN:"string",b:/'/,e:/'/};return{l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,e.NM,n,r,t]}}),hljs.registerLanguage("applescript",function(e){var t=e.inherit(e.QSM,{i:""}),n={cN:"params",b:"\\(",e:"\\)",c:["self",e.CNM,t]},r=[{cN:"comment",b:"--",e:"$"},{cN:"comment",b:"\\(\\*",e:"\\*\\)",c:["self",{b:"--",e:"$"}]},e.HCM];return{k:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the then third through thru timeout times to transaction try until where while whose with without",constant:"AppleScript false linefeed return pi quote result space tab true",type:"alias application boolean class constant date file integer list number real record string text",command:"activate beep count delay launch log offset read round run say summarize write",property:"character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},c:[t,e.CNM,{cN:"type",b:"\\bPOSIX file\\b"},{cN:"command",b:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{cN:"constant",b:"\\b(text item delimiters|current application|missing value)\\b"},{cN:"keyword",b:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{cN:"property",b:"\\b(POSIX path|(date|time) string|quoted form)\\b"},{cN:"function_start",bK:"on",i:"[${=;\\n]",c:[e.UTM,n]}].concat(r),i:"//"} +}),hljs.registerLanguage("vhdl",function(e){return{cI:!0,k:{keyword:"abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",typename:"boolean bit character severity_level integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector std_logic std_logic_vector unsigned signed boolean_vector integer_vector real_vector time_vector"},i:"{",c:[e.CBLCLM,{cN:"comment",b:"--",e:"$"},e.QSM,e.CNM,{cN:"literal",b:"'(U|X|0|1|Z|W|L|H|-)'",c:[e.BE]},{cN:"attribute",b:"'[A-Za-z](_?[A-Za-z0-9])*",c:[e.BE]}]}}),hljs.registerLanguage("parser3",function(e){return{sL:"xml",r:0,c:[{cN:"comment",b:"^#",e:"$"},{cN:"comment",b:"\\^rem{",e:"}",r:10,c:[{b:"{",e:"}",c:["self"]}]},{cN:"preprocessor",b:"^@(?:BASE|USE|CLASS|OPTIONS)$",r:10},{cN:"title",b:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{cN:"variable",b:"\\$\\{?[\\w\\-\\.\\:]+\\}?"},{cN:"keyword",b:"\\^[\\w\\-\\.\\:]+"},{cN:"number",b:"\\^#[0-9a-fA-F]+"},e.CNM]}}),hljs.registerLanguage("scala",function(e){var t={cN:"annotation",b:"@[A-Za-z]+"},n={cN:"string",b:'u?r?"""',e:'"""',r:10};return{k:"type yield lazy override def with val var false true sealed abstract private trait object null if for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws",c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"@[A-Za-z]+"}],r:10},e.CLCM,e.CBLCLM,n,e.ASM,e.QSM,{cN:"class",b:"((case )?class |object |trait )",e:"({|$)",i:":",k:"case class trait object",c:[{bK:"extends with",r:10},e.UTM,{cN:"params",b:"\\(",e:"\\)",c:[e.ASM,e.QSM,n,t]}]},e.CNM,t]}}),hljs.registerLanguage("cpp",function(e){var t={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c"],k:t,i:"",c:[e.CLCM,e.CBLCLM,e.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},e.CNM,{cN:"preprocessor",b:"#",e:"$",c:[{b:"include\\s*<",e:">",i:"\\n"},e.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:t,r:10,c:["self"]}]}}),window.Modernizr=function(e,t,n){function r(e){v.cssText=e}function i(e,t){return typeof e===t}function a(e,t){return!!~(""+e).indexOf(t)}function o(e,t){for(var r in e){var i=e[r];if(!a(i,"-")&&v[i]!==n)return"pfx"==t?i:!0}return!1}function s(e,t,r){for(var a in e){var o=t[e[a]];if(o!==n)return r===!1?e[a]:i(o,"function")?o.bind(r||t):o}return!1}function l(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+S.join(r+" ")+r).split(" ");return i(t,"string")||i(t,"undefined")?o(a,t):(a=(e+" "+C.join(r+" ")+r).split(" "),s(a,t,n))}var c,u,f,p="2.8.3",d={},h=!0,m=t.documentElement,g="modernizr",b=t.createElement(g),v=b.style,y=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),$="Webkit Moz O ms",S=$.split(" "),C=$.toLowerCase().split(" "),x={svg:"http://www.w3.org/2000/svg"},w={},D=[],E=D.slice,N=function(e,n,r,i){var a,o,s,l,c=t.createElement("div"),u=t.body,f=u||t.createElement("body");if(parseInt(r,10))for(;r--;)s=t.createElement("div"),s.id=i?i[r]:g+(r+1),c.appendChild(s);return a=["",'"].join(""),c.id=g,(u?c:f).innerHTML+=a,f.appendChild(c),u||(f.style.background="",f.style.overflow="hidden",l=m.style.overflow,m.style.overflow="hidden",m.appendChild(f)),o=n(c,e),u?c.parentNode.removeChild(c):(f.parentNode.removeChild(f),m.style.overflow=l),!!o},M={}.hasOwnProperty;f=i(M,"undefined")||i(M.call,"undefined")?function(e,t){return t in e&&i(e.constructor.prototype[t],"undefined")}:function(e,t){return M.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=E.call(arguments,1),r=function(){if(this instanceof r){var i=function(){};i.prototype=t.prototype;var a=new i,o=t.apply(a,n.concat(E.call(arguments)));return Object(o)===o?o:a}return t.apply(e,n.concat(E.call(arguments)))};return r}),w.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:N(["@media (",y.join("touch-enabled),("),g,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){n=9===e.offsetTop}),n},w.csstransforms=function(){return!!l("transform")},w.csstransforms3d=function(){var e=!!l("perspective");return e&&"webkitPerspective"in m.style&&N("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t){e=9===t.offsetLeft&&3===t.offsetHeight}),e},w.svg=function(){return!!t.createElementNS&&!!t.createElementNS(x.svg,"svg").createSVGRect};for(var T in w)f(w,T)&&(u=T.toLowerCase(),d[u]=w[T](),D.push((d[u]?"":"no-")+u));return d.addTest=function(e,t){if("object"==typeof e)for(var r in e)f(e,r)&&d.addTest(r,e[r]);else{if(e=e.toLowerCase(),d[e]!==n)return d;t="function"==typeof t?t():t,"undefined"!=typeof h&&h&&(m.className+=" "+(t?"":"no-")+e),d[e]=t}return d},r(""),b=c=null,d._version=p,d._prefixes=y,d._domPrefixes=C,d._cssomPrefixes=S,d.testProp=function(e){return o([e])},d.testAllProps=l,d.testStyles=N,m.className=m.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(h?" js "+D.join(" "):""),d}(this,this.document),function(e,t){function n(e,t,n){return e.addEventListener?void e.addEventListener(t,n,!1):void e.attachEvent("on"+t,n)}function r(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return w[e.which]?w[e.which]:D[e.which]?D[e.which]:String.fromCharCode(e.which).toLowerCase()}function i(e,t){return e.sort().join(",")===t.sort().join(",")}function a(e){e=e||{};var t,n=!1;for(t in A)e[t]?n=!0:A[t]=0;n||(L=!1)}function o(e,t,n,r,a,o){var s,l,c=[],u=n.type;if(!M[e])return[];for("keyup"==u&&d(e)&&(t=[e]),s=0;s95&&112>e||w.hasOwnProperty(e)&&(C[w[e]]=e)}return C}function g(e,t,n){return n||(n=m()[e]?"keydown":"keypress"),"keypress"==n&&t.length&&(n="keydown"),n}function b(e,t,n,i){function o(t){return function(){L=t,++A[e],h()}}function s(t){u(n,t,e),"keyup"!==i&&(k=r(t)),setTimeout(a,10)}A[e]=0;for(var l=0;l1?void b(e,s,t,n):(a=y(e,n),M[a.key]=M[a.key]||[],o(a.key,a.modifiers,{type:a.action},r,e,i),void M[a.key][r?"unshift":"push"]({callback:t,modifiers:a.modifiers,action:a.action,seq:r,level:i,combo:e}))}function S(e,t,n){for(var r=0;r":".","?":"/","|":"\\"},N={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},M={},T={},A={},k=!1,P=!1,L=!1,_=1;20>_;++_)w[111+_]="f"+_;for(_=0;9>=_;++_)w[_+96]=_;n(t,"keypress",p),n(t,"keydown",p),n(t,"keyup",p);var I={bind:function(e,t,n){return e=e instanceof Array?e:[e],S(e,t,n),this},unbind:function(e,t){return I.bind(e,function(){},t)},trigger:function(e,t){return T[e+":"+t]&&T[e+":"+t]({},e),this},reset:function(){return M={},T={},this},stopCallback:function(e,t){return(" "+t.className+" ").indexOf(" mousetrap ")>-1?!1:"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},handleKey:f};e.Mousetrap=I,"function"==typeof define&&define.amd&&define(I)}(window,document),function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);throw new Error("Cannot find module '"+o+"'")}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o"+t+"");r(o.contents())(i);var s=a.contents(),p=o.contents();n.enter(p,a),n.leave(s)}var u=t(o.translateN),f=null;o.translateN&&i.$watch(o.translateN,s),i.$on("gettextLanguageChanged",s),s()}}}}}]),angular.module("gettext").filter("translate",["gettextCatalog",function(e){function t(t){return e.getString(t)}return t.$stateful=!0,t}]),angular.module("gettext").factory("gettextPlurals",function(){return function(e,t){switch(e){case"ay":case"bo":case"cgg":case"dz":case"fa":case"id":case"ja":case"jbo":case"ka":case"kk":case"km":case"ko":case"ky":case"lo":case"ms":case"my":case"sah":case"su":case"th":case"tt":case"ug":case"vi":case"wo":case"zh":return 0;case"is":return t%10!=1||t%100==11?1:0;case"jv":return 0!=t?1:0;case"mk":return 1==t||t%10==1?0:1;case"ach":case"ak":case"am":case"arn":case"br":case"fil":case"fr":case"gun":case"ln":case"mfe":case"mg":case"mi":case"oc":case"pt_BR":case"tg":case"ti":case"tr":case"uz":case"wa":case"zh":return t>1?1:0;case"lv":return t%10==1&&t%100!=11?0:0!=t?1:2;case"lt":return t%10==1&&t%100!=11?0:t%10>=2&&(10>t%100||t%100>=20)?1:2;case"be":case"bs":case"hr":case"ru":case"sr":case"uk":return t%10==1&&t%100!=11?0:t%10>=2&&4>=t%10&&(10>t%100||t%100>=20)?1:2;case"mnk":return 0==t?0:1==t?1:2;case"ro":return 1==t?0:0==t||t%100>0&&20>t%100?1:2;case"pl":return 1==t?0:t%10>=2&&4>=t%10&&(10>t%100||t%100>=20)?1:2;case"cs":case"sk":return 1==t?0:t>=2&&4>=t?1:2;case"sl":return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0;case"mt":return 1==t?0:0==t||t%100>1&&11>t%100?1:t%100>10&&20>t%100?2:3;case"gd":return 1==t||11==t?0:2==t||12==t?1:t>2&&20>t?2:3;case"cy":return 1==t?0:2==t?1:8!=t&&11!=t?2:3;case"kw":return 1==t?0:2==t?1:3==t?2:3;case"ga":return 1==t?0:2==t?1:7>t?2:11>t?3:4;case"ar":return 0==t?0:1==t?1:2==t?2:t%100>=3&&10>=t%100?3:t%100>=11?4:5;default:return 1!=t?1:0}}}),function(){"use strict";angular.module("cfp.hotkeys",[]).provider("hotkeys",function(){this.includeCheatSheet=!0,this.templateTitle="Keyboard Shortcuts:",this.template='{{ title }}{{ key }}{{ hotkey.description }}×',this.cheatSheetHotkey="?",this.cheatSheetDescription="Show / hide this help menu",this.$get=["$rootElement","$rootScope","$compile","$window","$document",function(e,t,n,r,i){function a(e){var t={command:"⌘",shift:"⇧",left:"←",right:"→",up:"↑",down:"↓","return":"↩",backspace:"⌫"};e=e.split("+");for(var n=0;n=0?"command":"ctrl"),e[n]=t[e[n]]||e[n];return e.join(" + ")}function o(e,t,n,r,i,a){this.combo=e instanceof Array?e:[e],this.description=t,this.callback=n,this.action=r,this.allowIn=i,this.persistent=a}function s(){for(var e=h.hotkeys.length;e--;){var t=h.hotkeys[e];t&&!t.persistent&&u(t)}}function l(){h.helpVisible=!h.helpVisible,h.helpVisible?(y=f("esc"),u("esc"),c("esc",y.description,l)):(u("esc"),y!==!1&&c(y))}function c(e,t,n,r,i,a){var s,l=["INPUT","SELECT","TEXTAREA"],c=Object.prototype.toString.call(e);if("[object Object]"===c&&(t=e.description,n=e.callback,r=e.action,a=e.persistent,i=e.allowIn,e=e.combo),t instanceof Function?(r=n,n=t,t="$$undefined$$"):angular.isUndefined(t)&&(t="$$undefined$$"),void 0===a&&(a=!0),"function"==typeof n){s=n,i instanceof Array||(i=[]);for(var u,f=0;f-1)t=!0;else for(var i=0;i-1?(h.hotkeys[i].combo.length>1?h.hotkeys[i].combo.splice(h.hotkeys[i].combo.indexOf(t),1):h.hotkeys.splice(i,1),!0):!1}function f(e){for(var t,n=0;n-1)return t;return!1}function p(e){return e.$id in m||(m[e.$id]=[],e.$on("$destroy",function(){for(var t=m[e.$id].length;t--;)u(m[e.$id][t]),delete m[e.$id][t]})),{add:function(t){var n;return n=arguments.length>1?c.apply(this,arguments):c(t),m[e.$id].push(n),this}}}function d(e){return function(n,r){if(e instanceof Array){var i=e[0],a=e[1];e=function(){a.scope.$eval(i)}}t.$apply(function(){e(n,f(r))})}}Mousetrap.stopCallback=function(e,t){return(" "+t.className+" ").indexOf(" mousetrap ")>-1?!1:t.contentEditable&&"true"==t.contentEditable},o.prototype.format=function(){for(var e=this.combo[0],t=e.split(/[\s]/),n=0;n>>0,r=Number(arguments[2])||0;for(r=0>r?Math.ceil(r):Math.floor(r),0>r&&(r+=n);n>r;r++)if(r in e&&e[r]===t)return r;return-1}function l(e,t,n,r){var i,l=a(n,r),c={},u=[];for(var f in l)if(l[f].params&&(i=o(l[f].params),i.length))for(var p in i)s(u,i[p])>=0||(u.push(i[p]),c[i[p]]=e[i[p]]);return O({},c,t)}function c(e,t,n){if(!n){n=[];for(var r in e)n.push(r)}for(var i=0;i "));if(v[n]=r,_(e))g.push(n,[function(){return t.get(e)}],c);else{var i=t.annotate(e);R(i,function(e){e!==n&&l.hasOwnProperty(e)&&d(l[e],e)}),g.push(n,e,i)}b.pop(),v[n]=a}}function h(e){return I(e)&&e.then&&e.$$promises}if(!I(l))throw new Error("'invocables' must be an object");var m=o(l||{}),g=[],b=[],v={};return R(l,d),l=b=v=null,function(r,a,o){function s(){--$||(S||i(y,a.$$values),b.$$values=y,b.$$promises=b.$$promises||!0,delete b.$$inheritedValues,d.resolve(y))}function l(e){b.$$failure=e,d.reject(e)}function c(n,i,a){function c(e){f.reject(e),l(e)}function u(){if(!P(b.$$failure))try{f.resolve(t.invoke(i,o,y)),f.promise.then(function(e){y[n]=e,s()},c)}catch(e){c(e)}}var f=e.defer(),p=0;R(a,function(e){v.hasOwnProperty(e)&&!r.hasOwnProperty(e)&&(p++,v[e].then(function(t){y[e]=t,--p||u()},c))}),p||u(),v[n]=f.promise}if(h(r)&&o===n&&(o=a,a=r,r=null),r){if(!I(r))throw new Error("'locals' must be an object")}else r=u;if(a){if(!h(a))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else a=p;var d=e.defer(),b=d.promise,v=b.$$promises={},y=O({},r),$=1+g.length/3,S=!1;if(P(a.$$failure))return l(a.$$failure),b;a.$$inheritedValues&&i(y,f(a.$$inheritedValues,m)),O(v,a.$$promises),a.$$values?(S=i(y,f(a.$$values,m)),b.$$inheritedValues=f(a.$$values,m),s()):(a.$$inheritedValues&&(b.$$inheritedValues=f(a.$$inheritedValues,m)),a.then(s,l));for(var C=0,x=g.length;x>C;C+=3)r.hasOwnProperty(g[C])?s():c(g[C],g[C+1],g[C+2]);return b}},this.resolve=function(e,t,n,r){return this.study(e)(t,n,r)}}function m(e,t,n){this.fromConfig=function(e,t,n){return P(e.template)?this.fromString(e.template,t):P(e.templateUrl)?this.fromUrl(e.templateUrl,t):P(e.templateProvider)?this.fromProvider(e.templateProvider,t,n):null},this.fromString=function(e,t){return L(e)?e(t):e},this.fromUrl=function(n,r){return L(n)&&(n=n(r)),null==n?null:e.get(n,{cache:t,headers:{Accept:"text/html"}}).then(function(e){return e.data})},this.fromProvider=function(e,t,r){return n.invoke(e,null,r||{params:t})}}function g(e,t,i){function a(t,n,r,i){if(g.push(t),h[t])return h[t];if(!/^\w+(-+\w+)*(?:\[\])?$/.test(t))throw new Error("Invalid parameter name '"+t+"' in pattern '"+e+"'");if(m[t])throw new Error("Duplicate parameter name '"+t+"' in pattern '"+e+"'");return m[t]=new G.Param(t,n,r,i),m[t]}function o(e,t,n){var r=["",""],i=e.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return i;switch(n){case!1:r=["(",")"];break;case!0:r=["?(",")?"];break;default:r=["("+n+"|",")?"]}return i+r[0]+t+r[1]}function s(n,i){var a,o,s,l,c;return a=n[2]||n[3],c=t.params[a],s=e.substring(p,n.index),o=i?n[4]:n[4]||("*"==n[1]?".*":null),l=G.type(o||"string")||r(G.type("string"),{pattern:new RegExp(o)}),{id:a,regexp:o,segment:s,type:l,cfg:c}}t=O({params:{}},I(t)?t:{});var l,c=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,u=/([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,f="^",p=0,d=this.segments=[],h=i?i.params:{},m=this.params=i?i.params.$$new():new G.ParamSet,g=[];this.source=e;for(var b,v,y;(l=c.exec(e))&&(b=s(l,!1),!(b.segment.indexOf("?")>=0));)v=a(b.id,b.type,b.cfg,"path"),f+=o(b.segment,v.type.pattern.source,v.squash),d.push(b.segment),p=c.lastIndex;y=e.substring(p);var $=y.indexOf("?");if($>=0){var S=this.sourceSearch=y.substring($);if(y=y.substring(0,$),this.sourcePath=e.substring(0,p+$),S.length>0)for(p=0;l=u.exec(S);)b=s(l,!0),v=a(b.id,b.type,b.cfg,"search"),p=c.lastIndex}else this.sourcePath=e,this.sourceSearch="";f+=o(y)+(t.strict===!1?"/?":"")+"$",d.push(y),this.regexp=new RegExp(f,t.caseInsensitive?"i":n),this.prefix=d[0],this.$$paramNames=g}function b(e){O(this,e)}function v(){function e(e){return null!=e?e.toString().replace(/\//g,"%2F"):e}function i(e){return null!=e?e.toString().replace(/%2F/g,"/"):e}function a(e){return this.pattern.test(e)}function l(){return{strict:y,caseInsensitive:m}}function c(e){return L(e)||F(e)&&L(e[e.length-1])}function u(){for(;x.length;){var e=x.shift();if(e.pattern)throw new Error("You cannot override a type's .pattern at runtime.");t.extend(S[e.name],h.invoke(e.def))}}function f(e){O(this,e||{})}G=this;var h,m=!1,y=!0,$=!1,S={},C=!0,x=[],w={string:{encode:e,decode:i,is:a,pattern:/[^/]*/},"int":{encode:e,decode:function(e){return parseInt(e,10)},is:function(e){return P(e)&&this.decode(e.toString())===e},pattern:/\d+/},bool:{encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:function(e){return e===!0||e===!1},pattern:/0|1/},date:{encode:function(e){return this.is(e)?[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-"):n},decode:function(e){if(this.is(e))return e;var t=this.capture.exec(e);return t?new Date(t[1],t[2]-1,t[3]):n},is:function(e){return e instanceof Date&&!isNaN(e.valueOf())},equals:function(e,t){return this.is(e)&&this.is(t)&&e.toISOString()===t.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:t.toJson,decode:t.fromJson,is:t.isObject,equals:t.equals,pattern:/[^/]*/},any:{encode:t.identity,decode:t.identity,is:t.identity,equals:t.equals,pattern:/.*/}};v.$$getDefaultValue=function(e){if(!c(e.value))return e.value;if(!h)throw new Error("Injectable functions cannot be called at configuration time");return h.invoke(e.value)},this.caseInsensitive=function(e){return P(e)&&(m=e),m},this.strictMode=function(e){return P(e)&&(y=e),y},this.defaultSquashPolicy=function(e){if(!P(e))return $;if(e!==!0&&e!==!1&&!_(e))throw new Error("Invalid squash policy: "+e+". Valid policies: false, true, arbitrary-string");return $=e,e},this.compile=function(e,t){return new g(e,O(l(),t))},this.isMatcher=function(e){if(!I(e))return!1;var t=!0;return R(g.prototype,function(n,r){L(n)&&(t=t&&P(e[r])&&L(e[r]))}),t},this.type=function(e,t,n){if(!P(t))return S[e];if(S.hasOwnProperty(e))throw new Error("A type named '"+e+"' has already been defined.");return S[e]=new b(O({name:e},t)),n&&(x.push({name:e,def:n}),C||u()),this},R(w,function(e,t){S[t]=new b(O({name:t},e))}),S=r(S,{}),this.$get=["$injector",function(e){return h=e,C=!1,u(),R(w,function(e,t){S[t]||(S[t]=new b(e))}),this}],this.Param=function(e,t,r,i){function a(e){var t=I(e)?o(e):[],n=-1===s(t,"value")&&-1===s(t,"type")&&-1===s(t,"squash")&&-1===s(t,"array");return n&&(e={value:e}),e.$$fn=c(e.value)?e.value:function(){return e.value},e}function l(t,n,r){if(t.type&&n)throw new Error("Param '"+e+"' has two type configurations.");return n?n:t.type?t.type instanceof b?t.type:new b(t.type):"config"===r?S.any:S.string}function u(){var t={array:"search"===i?"auto":!1},n=e.match(/\[\]$/)?{array:!0}:{};return O(t,n,r).array}function f(e,t){var n=e.squash;if(!t||n===!1)return!1;if(!P(n)||null==n)return $;if(n===!0||_(n))return n;throw new Error("Invalid squash policy: '"+n+"'. Valid policies: false, true, or arbitrary string")}function m(e,t,r,i){var a,o,l=[{from:"",to:r||t?n:""},{from:null,to:r||t?n:""}];return a=F(e.replace)?e.replace:[],_(i)&&a.push({from:i,to:n}),o=d(a,function(e){return e.from}),p(l,function(e){return-1===s(o,e.from)}).concat(a)}function g(){if(!h)throw new Error("Injectable functions cannot be called at configuration time");return h.invoke(r.$$fn)}function v(e){function t(e){return function(t){return t.from===e}}function n(e){var n=d(p(C.replace,t(e)),function(e){return e.to});return n.length?n[0]:e}return e=n(e),P(e)?C.type.decode(e):g()}function y(){return"{Param:"+e+" "+t+" squash: '"+D+"' optional: "+w+"}"}var C=this;r=a(r),t=l(r,t,i);var x=u();t=x?t.$asArray(x,"search"===i):t,"string"!==t.name||x||"path"!==i||r.value!==n||(r.value="");var w=r.value!==n,D=f(r,w),E=m(r,x,w,D);O(this,{id:e,type:t,location:i,array:x,squash:D,replace:E,isOptional:w,value:v,dynamic:n,config:r,toString:y})},f.prototype={$$new:function(){return r(this,O(new f,{$$parent:this}))},$$keys:function(){for(var e=[],t=[],n=this,r=o(f.prototype);n;)t.push(n),n=n.$$parent;return t.reverse(),R(t,function(t){R(o(t),function(t){-1===s(e,t)&&-1===s(r,t)&&e.push(t)})}),e},$$values:function(e){var t={},n=this;return R(n.$$keys(),function(r){t[r]=n[r].value(e&&e[r])}),t},$$equals:function(e,t){var n=!0,r=this;return R(r.$$keys(),function(i){var a=e&&e[i],o=t&&t[i];r[i].type.equals(a,o)||(n=!1)}),n},$$validates:function(e){var t,n,r,i=!0,a=this;return R(this.$$keys(),function(o){r=a[o],n=e[o],t=!n&&r.isOptional,i=i&&(t||!!r.type.is(n))}),i},$$parent:n},this.ParamSet=f}function y(e,r){function i(e){var t=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(e.source);return null!=t?t[1].replace(/\\(.)/g,"$1"):""}function a(e,t){return e.replace(/\$(\$|\d{1,2})/,function(e,n){return t["$"===n?0:Number(n)]})}function o(e,t,n){if(!n)return!1;var r=e.invoke(t,t,{$match:n});return P(r)?r:!0}function s(r,i,a,o){function s(e,t,n){return"/"===m?e:t?m.slice(0,-1)+e:n?m.slice(1)+e:e}function p(e){function t(e){var t=e(a,r);return t?(_(t)&&r.replace().url(t),!0):!1}if(!e||!e.defaultPrevented){var i=h&&r.url()===h;if(h=n,i)return!0;var o,s=c.length;for(o=0;s>o;o++)if(t(c[o]))return;u&&t(u)}}function d(){return l=l||i.$on("$locationChangeSuccess",p)}var h,m=o.baseHref(),g=r.url();return f||d(),{sync:function(){p()},listen:function(){return d()},update:function(e){return e?void(g=r.url()):void(r.url()!==g&&(r.url(g),r.replace()))},push:function(e,t,i){r.url(e.format(t||{})),h=i&&i.$$avoidResync?r.url():n,i&&i.replace&&r.replace()},href:function(n,i,a){if(!n.validates(i))return null;var o=e.html5Mode();t.isObject(o)&&(o=o.enabled);var l=n.format(i);if(a=a||{},o||null===l||(l="#"+e.hashPrefix()+l),l=s(l,o,a.absolute),!a.absolute||!l)return l;var c=!o&&l?"/":"",u=r.port();return u=80===u||443===u?"":":"+u,[r.protocol(),"://",r.host(),u,c,l].join("")}}}var l,c=[],u=null,f=!1;this.rule=function(e){if(!L(e))throw new Error("'rule' must be a function"); +return c.push(e),this},this.otherwise=function(e){if(_(e)){var t=e;e=function(){return t}}else if(!L(e))throw new Error("'rule' must be a function");return u=e,this},this.when=function(e,t){var n,s=_(t);if(_(e)&&(e=r.compile(e)),!s&&!L(t)&&!F(t))throw new Error("invalid 'handler' in when()");var l={matcher:function(e,t){return s&&(n=r.compile(t),t=["$match",function(e){return n.format(e)}]),O(function(n,r){return o(n,t,e.exec(r.path(),r.search()))},{prefix:_(e.prefix)?e.prefix:""})},regex:function(e,t){if(e.global||e.sticky)throw new Error("when() RegExp must not be global or sticky");return s&&(n=t,t=["$match",function(e){return a(n,e)}]),O(function(n,r){return o(n,t,e.exec(r.path()))},{prefix:i(e)})}},c={matcher:r.isMatcher(e),regex:e instanceof RegExp};for(var u in c)if(c[u])return this.rule(l[u](e,t));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(e){e===n&&(e=!0),f=e},this.$get=s,s.$inject=["$location","$rootScope","$injector","$browser"]}function $(e,i){function a(e){return 0===e.indexOf(".")||0===e.indexOf("^")}function f(e,t){if(!e)return n;var r=_(e),i=r?e:e.name,o=a(i);if(o){if(!t)throw new Error("No reference point given for path '"+i+"'");t=f(t);for(var s=i.split("."),l=0,c=s.length,u=t;c>l;l++)if(""!==s[l]||0!==l){if("^"!==s[l])break;if(!u.parent)throw new Error("Path '"+i+"' not valid for state '"+t.name+"'");u=u.parent}else u=t;s=s.slice(l).join("."),i=u.name+(u.name&&s?".":"")+s}var p=w[i];return!p||!r&&(r||p!==e&&p.self!==e)?n:p}function p(e,t){D[e]||(D[e]=[]),D[e].push(t)}function h(e){for(var t=D[e]||[];t.length;)m(t.shift())}function m(t){t=r(t,{self:t,resolve:t.resolve||{},toString:function(){return this.name}});var n=t.name;if(!_(n)||n.indexOf("@")>=0)throw new Error("State must have a valid name");if(w.hasOwnProperty(n))throw new Error("State '"+n+"'' is already defined");var i=-1!==n.indexOf(".")?n.substring(0,n.lastIndexOf(".")):_(t.parent)?t.parent:I(t.parent)&&_(t.parent.name)?t.parent.name:"";if(i&&!w[i])return p(i,t.self);for(var a in N)L(N[a])&&(t[a]=N[a](t,N.$delegates[a]));return w[n]=t,!t[E]&&t.url&&e.when(t.url,["$match","$stateParams",function(e,n){x.$current.navigable==t&&c(e,n)||x.transitionTo(t,e,{inherit:!0,location:!1})}]),h(n),t}function g(e){return e.indexOf("*")>-1}function b(e){var t=e.split("."),n=x.$current.name.split(".");if("**"===t[0]&&(n=n.slice(s(n,t[1])),n.unshift("**")),"**"===t[t.length-1]&&(n.splice(s(n,t[t.length-2])+1,Number.MAX_VALUE),n.push("**")),t.length!=n.length)return!1;for(var r=0,i=t.length;i>r;r++)"*"===t[r]&&(n[r]="*");return n.join("")===t.join("")}function v(e,t){return _(e)&&!P(t)?N[e]:L(t)&&_(e)?(N[e]&&!N.$delegates[e]&&(N.$delegates[e]=N[e]),N[e]=t,this):this}function y(e,t){return I(e)?t=e:t.name=e,m(t),this}function $(e,i,a,s,p,h,m){function v(t,n,r,a){var o=e.$broadcast("$stateNotFound",t,n,r);if(o.defaultPrevented)return m.update(),N;if(!o.retry)return null;if(a.$retry)return m.update(),M;var s=x.transition=i.when(o.retry);return s.then(function(){return s!==x.transition?$:(t.options.$retry=!0,x.transitionTo(t.to,t.toParams,t.options))},function(){return N}),m.update(),s}function y(e,n,r,o,l,c){var f=r?n:u(e.params.$$keys(),n),d={$stateParams:f};l.resolve=p.resolve(e.resolve,d,l.resolve,e);var h=[l.resolve.then(function(e){l.globals=e})];return o&&h.push(o),R(e.views,function(n,r){var i=n.resolve&&n.resolve!==e.resolve?n.resolve:{};i.$template=[function(){return a.load(r,{view:n,locals:d,params:f,notify:c.notify})||""}],h.push(p.resolve(i,d,l.resolve,e).then(function(a){if(L(n.controllerProvider)||F(n.controllerProvider)){var o=t.extend({},i,d);a.$$controller=s.invoke(n.controllerProvider,null,o)}else a.$$controller=n.controller;a.$$state=e,a.$$controllerAs=n.controllerAs,l[r]=a}))}),i.all(h).then(function(){return l})}var $=i.reject(new Error("transition superseded")),D=i.reject(new Error("transition prevented")),N=i.reject(new Error("transition aborted")),M=i.reject(new Error("transition failed"));return C.locals={resolve:null,globals:{$stateParams:{}}},x={params:{},current:C.self,$current:C,transition:null},x.reload=function(){return x.transitionTo(x.current,h,{reload:!0,inherit:!1,notify:!0})},x.go=function(e,t,n){return x.transitionTo(e,t,O({inherit:!0,relative:x.$current},n))},x.transitionTo=function(t,n,a){n=n||{},a=O({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},a||{});var o,c=x.$current,p=x.params,d=c.path,g=f(t,a.relative);if(!P(g)){var b={to:t,toParams:n,options:a},w=v(b,c.self,p,a);if(w)return w;if(t=b.to,n=b.toParams,a=b.options,g=f(t,a.relative),!P(g)){if(!a.relative)throw new Error("No such state '"+t+"'");throw new Error("Could not resolve '"+t+"' from state '"+a.relative+"'")}}if(g[E])throw new Error("Cannot transition to abstract state '"+t+"'");if(a.inherit&&(n=l(h,n||{},x.$current,g)),!g.params.$$validates(n))return M;n=g.params.$$values(n),t=g;var N=t.path,T=0,A=N[T],k=C.locals,L=[];if(!a.reload)for(;A&&A===d[T]&&A.ownParams.$$equals(n,p);)k=L[T]=A.locals,T++,A=N[T];if(S(t,c,k,a))return t.self.reloadOnSearch!==!1&&m.update(),x.transition=null,i.when(x.current);if(n=u(t.params.$$keys(),n||{}),a.notify&&e.$broadcast("$stateChangeStart",t.self,n,c.self,p).defaultPrevented)return m.update(),D;for(var _=i.when(k),I=T;I=T;r--)o=d[r],o.self.onExit&&s.invoke(o.self.onExit,o.self,o.locals.globals),o.locals=null;for(r=T;r=0?i:i+"@"+(a?a.state.name:"")}function E(e,t){var n,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e=t+"("+r[1]+")"),n=e.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!n||4!==n.length)throw new Error("Invalid state ref '"+e+"'");return{state:n[1],paramExpr:n[3]||null}}function N(e){var t=e.parent().inheritedData("$uiView");return t&&t.state&&t.state.name?t.state:void 0}function M(e,n){var r=["location","inherit","reload"];return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(i,a,o,s){var l=E(o.uiSref,e.current.name),c=null,u=N(a)||e.$current,f=null,p="A"===a.prop("tagName"),d="FORM"===a[0].nodeName,h=d?"action":"href",m=!0,g={relative:u,inherit:!0},b=i.$eval(o.uiSrefOpts)||{};t.forEach(r,function(e){e in b&&(g[e]=b[e])});var v=function(n){if(n&&(c=t.copy(n)),m){f=e.href(l.state,c,g);var r=s[1]||s[0];return r&&r.$$setStateInfo(l.state,c),null===f?(m=!1,!1):void o.$set(h,f)}};l.paramExpr&&(i.$watch(l.paramExpr,function(e){e!==c&&v(e)},!0),c=t.copy(i.$eval(l.paramExpr))),v(),d||a.bind("click",function(t){var r=t.which||t.button;if(!(r>1||t.ctrlKey||t.metaKey||t.shiftKey||a.attr("target"))){var i=n(function(){e.go(l.state,c,g)});t.preventDefault();var o=p&&!f?1:0;t.preventDefault=function(){o--<=0&&n.cancel(i)}}})}}}function T(e,t,n){return{restrict:"A",controller:["$scope","$element","$attrs",function(t,r,i){function a(){o()?r.addClass(c):r.removeClass(c)}function o(){return"undefined"!=typeof i.uiSrefActiveEq?s&&e.is(s.name,l):s&&e.includes(s.name,l)}var s,l,c;c=n(i.uiSrefActiveEq||i.uiSrefActive||"",!1)(t),this.$$setStateInfo=function(t,n){s=e.get(t,N(r)),l=n,a()},t.$on("$stateChangeSuccess",a)}]}}function A(e){var t=function(t){return e.is(t)};return t.$stateful=!0,t}function k(e){var t=function(t){return e.includes(t)};return t.$stateful=!0,t}var P=t.isDefined,L=t.isFunction,_=t.isString,I=t.isObject,F=t.isArray,R=t.forEach,O=t.extend,B=t.copy;t.module("ui.router.util",["ng"]),t.module("ui.router.router",["ui.router.util"]),t.module("ui.router.state",["ui.router.router","ui.router.util"]),t.module("ui.router",["ui.router.state"]),t.module("ui.router.compat",["ui.router"]),h.$inject=["$q","$injector"],t.module("ui.router.util").service("$resolve",h),m.$inject=["$http","$templateCache","$injector"],t.module("ui.router.util").service("$templateFactory",m);var G;g.prototype.concat=function(e,t){var n={caseInsensitive:G.caseInsensitive(),strict:G.strictMode(),squash:G.defaultSquashPolicy()};return new g(this.sourcePath+e+this.sourceSearch,O(n,t),this)},g.prototype.toString=function(){return this.source},g.prototype.exec=function(e,t){function n(e){function t(e){return e.split("").reverse().join("")}function n(e){return e.replace(/\\-/,"-")}var r=t(e).split(/-(?!\\)/),i=d(r,t);return d(i,n).reverse()}var r=this.regexp.exec(e);if(!r)return null;t=t||{};var i,a,o,s=this.parameters(),l=s.length,c=this.segments.length-1,u={};if(c!==r.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");for(i=0;c>i;i++){o=s[i];var f=this.params[o],p=r[i+1];for(a=0;ai;i++)o=s[i],u[o]=this.params[o].value(t[o]);return u},g.prototype.parameters=function(e){return P(e)?this.params[e]||null:this.$$paramNames},g.prototype.validates=function(e){return this.params.$$validates(e)},g.prototype.format=function(e){function t(e){return encodeURIComponent(e).replace(/-/g,function(e){return"%5C%"+e.charCodeAt(0).toString(16).toUpperCase()})}e=e||{};var n=this.segments,r=this.parameters(),i=this.params;if(!this.validates(e))return null;var a,o=!1,s=n.length-1,l=r.length,c=n[0];for(a=0;l>a;a++){var u=s>a,f=r[a],p=i[f],h=p.value(e[f]),m=p.isOptional&&p.type.equals(p.value(),h),g=m?p.squash:!1,b=p.type.encode(h);if(u){var v=n[a+1];if(g===!1)null!=b&&(c+=F(b)?d(b,t).join("-"):encodeURIComponent(b)),c+=v;else if(g===!0){var y=c.match(/\/$/)?/\/?(.*)/:/(.*)/;c+=v.match(y)[1]}else _(g)&&(c+=g+v)}else{if(null==b||m&&g!==!1)continue;F(b)||(b=[b]),b=d(b,encodeURIComponent).join("&"+f+"="),c+=(o?"&":"?")+(f+"="+b),o=!0}}return c},b.prototype.is=function(){return!0},b.prototype.encode=function(e){return e},b.prototype.decode=function(e){return e},b.prototype.equals=function(e,t){return e==t},b.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},b.prototype.pattern=/.*/,b.prototype.toString=function(){return"{Type:"+this.name+"}"},b.prototype.$asArray=function(e,t){function r(e,t){function r(e,t){return function(){return e[t].apply(e,arguments)}}function i(e){return F(e)?e:P(e)?[e]:[]}function a(e){switch(e.length){case 0:return n;case 1:return"auto"===t?e[0]:e;default:return e}}function o(e){return!e}function s(e,t){return function(n){n=i(n);var r=d(n,e);return t===!0?0===p(r,o).length:a(r)}}function l(e){return function(t,n){var r=i(t),a=i(n);if(r.length!==a.length)return!1;for(var o=0;o-1?0:-1:t?0:-1}function n(e){var t=this.cache,n=typeof e;if("boolean"==n||null==e)t[e]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?e:y+e,i=t[n]||(t[n]={});"object"==n?(i[r]||(i[r]=[])).push(e):i[r]=!0}}function r(e){return e.charCodeAt(0)}function i(e,t){for(var n=e.criteria,r=t.criteria,i=-1,a=n.length;++is||"undefined"==typeof o)return 1;if(s>o||"undefined"==typeof s)return-1}}return e.index-t.index}function a(e){var t=-1,r=e.length,i=e[0],a=e[r/2|0],o=e[r-1];if(i&&"object"==typeof i&&a&&"object"==typeof a&&o&&"object"==typeof o)return!1;var s=l();s["false"]=s["null"]=s["true"]=s.undefined=!1;var c=l();for(c.array=e,c.cache=s,c.push=n;++ti?0:i);++r=$&&o===e,c=[];if(l){var u=a(r);u?(o=t,r=u):l=!1}for(;++i-1:void 0});return i.pop(),a.pop(),y&&(u(i),u(a)),o}function lt(e,t,n,r,i){(fi(t)?rn:Di)(t,function(t,a){var o,s,l=t,c=e[a];if(t&&((s=fi(t))||Ei(t))){for(var u=r.length;u--;)if(o=r[u]==t){c=i[u];break}if(!o){var f;n&&(l=n(c,t),(f="undefined"!=typeof l)&&(c=l)),f||(c=s?fi(c)?c:[]:Ei(c)?c:{}),r.push(t),i.push(c),f||lt(c,t,n,r,i)}}else n&&(l=n(c,t),"undefined"==typeof l&&(l=t)),"undefined"!=typeof l&&(c=l);e[a]=c})}function ct(e,t){return e+Ur(ai()*(t-e+1))}function ut(n,r,i){var o=-1,l=mt(),c=n?n.length:0,p=[],d=!r&&c>=$&&l===e,h=i||d?s():p;if(d){var m=a(h);l=t,h=m}for(;++o3&&"function"==typeof t[n-2])var r=nt(t[--n-1],t[n--],2);else n>2&&"function"==typeof t[n-1]&&(r=t[--n]);for(var i=p(arguments,1,n),a=-1,o=s(),l=s();++an?ni(0,a+n):n)||0,fi(e)?o=i(e,t,n)>-1:"number"==typeof a?o=(jt(e)?e.indexOf(t,n):i(e,t,n))>-1:Si(e,function(e){return++r>=n?!(o=e===t):void 0}),o}function Yt(e,t,n){var r=!0;if(t=m.createCallback(t,n,3),fi(e))for(var i=-1,a=e.length;++ia&&(a=l)}else t=null==t&&jt(e)?r:m.createCallback(t,n,3),Si(e,function(e,n,r){var o=t(e,n,r);o>i&&(i=o,a=e)});return a}function cn(e,t,n){var i=1/0,a=i;if("function"!=typeof t&&n&&n[t]===e&&(t=null),null==t&&fi(e))for(var o=-1,s=e.length;++ol&&(a=l)}else t=null==t&&jt(e)?r:m.createCallback(t,n,3),Si(e,function(e,n,r){var o=t(e,n,r);i>o&&(i=o,a=e)});return a}function un(e,t,n,r){var i=arguments.length<3;if(t=m.createCallback(t,r,4),fi(e)){var a=-1,o=e.length;for(i&&(n=e[++a]);++ar?ni(0,i+r):r||0}else if(r){var a=_n(t,n);return t[a]===n?a:-1}return e(t,n,r)}function En(e,t,n){var r=0,i=e?e.length:0;if("number"!=typeof t&&null!=t){var a=i;for(t=m.createCallback(t,n,3);a--&&t(e[a],a,e);)r++}else r=null==t||n?1:t||r;return p(e,0,ri(ni(0,i-r),i))}function Nn(){for(var n=[],r=-1,i=arguments.length,o=s(),l=mt(),c=l===e,p=s();++r=$&&a(r?n[r]:p)))}var h=n[0],m=-1,g=h?h.length:0,b=[];e:for(;++mn?ni(0,r+n):ri(n,r-1))+1);r--;)if(e[r]===t)return r;return-1}function An(e){for(var t=arguments,n=0,r=t.length,i=e?e.length:0;++ni;){var o=i+a>>>1;n(e[o])1?arguments:arguments[0],t=-1,n=e?ln(Ai(e,"length")):0,r=Sr(0>n?0:n);++t2?pt(e,17,p(arguments,2),null,t):pt(e,1,null,null,t)}function Vn(e){for(var t=arguments.length>1?ot(arguments,!0,!1,1):Nt(e),n=-1,r=t.length;++n2?pt(t,19,p(arguments,2),null,e):pt(t,3,null,null,e)}function Hn(){for(var e=arguments,t=e.length;t--;)if(!Ft(e[t]))throw new kr;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}}function zn(e,t){return t="number"==typeof t?t:+t||e.length,pt(e,4,null,null,null,t)}function Wn(e,t,n){var r,i,a,o,s,l,c,u=0,f=!1,p=!0;if(!Ft(e))throw new kr;if(t=ni(0,t)||0,n===!0){var d=!0;p=!1}else Rt(n)&&(d=n.leading,f="maxWait"in n&&(ni(t,n.maxWait)||0),p="trailing"in n?n.trailing:p);var m=function(){var n=t-(Pi()-o);if(0>=n){i&&Gr(i);var f=c;i=l=c=h,f&&(u=Pi(),a=e.apply(s,r),l||i||(r=s=null))}else l=Wr(m,n)},g=function(){l&&Gr(l),i=l=c=h,(p||f!==t)&&(u=Pi(),a=e.apply(s,r),l||i||(r=s=null))};return function(){if(r=arguments,o=Pi(),s=this,c=p&&(l||!d),f===!1)var n=d&&!l;else{i||d||(u=o);var h=f-(o-u),b=0>=h;b?(i&&(i=Gr(i)),u=o,a=e.apply(s,r)):i||(i=Wr(g,h))}return b&&l?l=Gr(l):l||t===f||(l=Wr(m,t)),n&&(b=!0,a=e.apply(s,r)),!b||l||i||(r=s=null),a}}function Qn(e){if(!Ft(e))throw new kr;var t=p(arguments,1);return Wr(function(){e.apply(h,t)},1)}function Kn(e,t){if(!Ft(e))throw new kr;var n=p(arguments,2);return Wr(function(){e.apply(h,n)},t)}function Zn(e,t){if(!Ft(e))throw new kr;var n=function(){var r=n.cache,i=t?t.apply(this,arguments):y+arguments[0];return qr.call(r,i)?r[i]:r[i]=e.apply(this,arguments)};return n.cache={},n}function Xn(e){var t,n;if(!Ft(e))throw new kr;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}}function Jn(e){return pt(e,16,p(arguments,1))}function Yn(e){return pt(e,32,null,p(arguments,1))}function er(e,t,n){var r=!0,i=!0;if(!Ft(e))throw new kr;return n===!1?r=!1:Rt(n)&&(r="leading"in n?n.leading:r,i="trailing"in n?n.trailing:i),K.leading=r,K.maxWait=t,K.trailing=i,Wn(e,t,K)}function tr(e,t){return pt(t,16,[e])}function nr(e){return function(){return e}}function rr(e,t,n){var r=typeof e;if(null==e||"function"==r)return nt(e,t,n);if("object"!=r)return cr(e);var i=di(e),a=i[0],o=e[a];return 1!=i.length||o!==o||Rt(o)?function(t){for(var n=i.length,r=!1;n--&&(r=st(t[i[n]],e[i[n]],null,!0)););return r}:function(e){var t=e[a];return o===t&&(0!==o||1/o==1/t)}}function ir(e){return null==e?"":Ar(e).replace($i,ht)}function ar(e){return e}function or(e,t,n){var r=!0,i=t&&Nt(t);t&&(n||i.length)||(null==n&&(n=t),a=g,t=e,e=m,i=Nt(t)),n===!1?r=!1:Rt(n)&&"chain"in n&&(r=n.chain);var a=e,o=Ft(a);rn(i,function(n){var i=e[n]=t[n];o&&(a.prototype[n]=function(){var t=this.__chain__,n=this.__wrapped__,o=[n];Hr.apply(o,arguments);var s=i.apply(e,o);if(r||t){if(n===s&&Rt(s))return this;s=new a(s),s.__chain__=t}return s})})}function sr(){return n._=Fr,this}function lr(){}function cr(e){return function(t){return t[e]}}function ur(e,t,n){var r=null==e,i=null==t;if(null==n&&("boolean"==typeof e&&i?(n=e,e=1):i||"boolean"!=typeof t||(n=t,i=!0)),r&&i&&(t=1),e=+e||0,i?(t=e,e=0):t=+t||0,n||e%1||t%1){var a=ai();return ri(e+a*(t-e+parseFloat("1e-"+((a+"").length-1))),t)}return ct(e,t)}function fr(e,t){if(e){var n=e[t];return Ft(n)?e[t]():n}}function pr(e,t,n){var r=m.templateSettings;e=Ar(e||""),n=xi({},n,r);var i,a=xi({},n.imports,r.imports),s=di(a),l=Zt(a),c=0,u=n.interpolate||P,f="__p += '",p=Tr((n.escape||P).source+"|"+u.source+"|"+(u===T?E:P).source+"|"+(n.evaluate||P).source+"|$","g");e.replace(p,function(t,n,r,a,s,l){return r||(r=a),f+=e.slice(c,l).replace(_,o),n&&(f+="' +\n__e("+n+") +\n'"),s&&(i=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+t.length,t}),f+="';\n";var d=n.variable,g=d;g||(d="obj",f="with ("+d+") {\n"+f+"\n}\n"),f=(i?f.replace(x,""):f).replace(w,"$1").replace(D,"$1;"),f="function("+d+") {\n"+(g?"":d+" || ("+d+" = {});\n")+"var __t, __p = '', __e = _.escape"+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var b="\n/*\n//# sourceURL="+(n.sourceURL||"/lodash/template/source["+R++ +"]")+"\n*/";try{var v=Dr(s,"return "+f+b).apply(h,l)}catch(y){throw y.source=f,y}return t?v(t):(v.source=f,v)}function dr(e,t,n){e=(e=+e)>-1?e:0;var r=-1,i=Sr(e);for(t=nt(t,n,1);++r/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:T,variable:"",imports:{_:m}};var ci=function(e){var t="var index, iterable = "+e.firstArg+", result = "+e.init+";\nif (!iterable) return result;\n"+e.top+";";e.array?(t+="\nvar length = iterable.length; index = -1;\nif ("+e.array+") { ",li.unindexedChars&&(t+="\n if (isString(iterable)) {\n iterable = iterable.split('')\n } "),t+="\n while (++index < length) {\n "+e.loop+";\n }\n}\nelse { "):li.nonEnumArgs&&(t+="\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += '';\n "+e.loop+";\n }\n } else { "),li.enumPrototypes&&(t+="\n var skipProto = typeof iterable == 'function';\n "),li.enumErrorProps&&(t+="\n var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n ");var n=[];if(li.enumPrototypes&&n.push('!(skipProto && index == "prototype")'),li.enumErrorProps&&n.push('!(skipErrorProps && (index == "message" || index == "name"))'),e.useHas&&e.keys)t+="\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] && keys(iterable),\n length = ownProps ? ownProps.length : 0;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n",n.length&&(t+=" if ("+n.join(" && ")+") {\n "),t+=e.loop+"; ",n.length&&(t+="\n }"),t+="\n } ";else if(t+="\n for (index in iterable) {\n",e.useHas&&n.push("hasOwnProperty.call(iterable, index)"),n.length&&(t+=" if ("+n.join(" && ")+") {\n "),t+=e.loop+"; ",n.length&&(t+="\n }"),t+="\n } ",li.nonEnumShadows){for(t+="\n\n if (iterable !== objectProto) {\n var ctor = iterable.constructor,\n isProto = iterable === (ctor && ctor.prototype),\n className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n nonEnum = nonEnumProps[className];\n ",k=0;k<7;k++)t+="\n index = '"+e.shadowedProps[k]+"';\n if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))",e.useHas||(t+=" || (!nonEnum[index] && iterable[index] !== objectProto[index])"),t+=") {\n "+e.loop+";\n } ";t+="\n } "}return(e.array||li.nonEnumArgs)&&(t+="\n}"),t+=e.bottom+";\nreturn result"};Xr||(tt=function(){function e(){}return function(t){if(Rt(t)){e.prototype=t;var r=new e;e.prototype=null}return r||n.Object()}}());var ui=Zr?function(e,t){Z.value=t,Zr(e,"__bindData__",Z)}:lr;li.argsClass||(yt=function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&qr.call(e,"callee")&&!zr.call(e,"callee")||!1});var fi=Jr||function(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Rr.call(e)==B||!1},pi=dt({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),di=ti?function(e){return Rt(e)?li.enumPrototypes&&"function"==typeof e||li.nonEnumArgs&&e.length&&yt(e)?pi(e):ti(e):[]}:pi,hi={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : baseCreateCallback(callback, thisArg, 3)",array:"typeof length == 'number'",keys:di,loop:"if (callback(iterable[index], index, collection) === false) return result"},mi={args:"object, source, guard",top:"var args = arguments,\n argsIndex = 0,\n argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n iterable = args[argsIndex];\n if (iterable && objectTypes[typeof iterable]) {",keys:di,loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:" }\n}"},gi={top:"if (!objectTypes[typeof iterable]) return result;\n"+hi.top,array:!1},bi={"&":"&","<":"<",">":">",'"':""","'":"'"},vi=Tt(bi),yi=Tr("("+di(vi).join("|")+")","g"),$i=Tr("["+di(bi).join("")+"]","g"),Si=dt(hi),Ci=dt(mi,{top:mi.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n var callback = baseCreateCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n callback = args[--argsLength];\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"}),xi=dt(mi),wi=dt(hi,gi,{useHas:!1}),Di=dt(hi,gi);Ft(/x/)&&(Ft=function(e){return"function"==typeof e&&Rr.call(e)==V});var Ei=Vr?function(e){if(!e||Rr.call(e)!=H||!li.argsClass&&yt(e))return!1;var t=e.valueOf,n=gt(t)&&(n=Vr(t))&&Vr(n);return n?e==n||Vr(e)==n:bt(e)}:bt,Ni=ft(function(e,t,n){qr.call(e,n)?e[n]++:e[n]=1}),Mi=ft(function(e,t,n){(qr.call(e,n)?e[n]:e[n]=[]).push(t)}),Ti=ft(function(e,t,n){e[n]=t}),Ai=sn,ki=en,Pi=gt(Pi=xr.now)&&Pi||function(){return(new xr).getTime()},Li=8==ii(C+"08")?ii:function(e,t){return ii(jt(e)?e.replace(A,""):e,t||0)};return m.after=Un,m.assign=Ci,m.at=Xt,m.bind=jn,m.bindAll=Vn,m.bindKey=qn,m.chain=gr,m.compact=yn,m.compose=Hn,m.constant=nr,m.countBy=Ni,m.create=Ct,m.createCallback=rr,m.curry=zn,m.debounce=Wn,m.defaults=xi,m.defer=Qn,m.delay=Kn,m.difference=$n,m.filter=en,m.flatten=wn,m.forEach=rn,m.forEachRight=an,m.forIn=wi,m.forInRight=Dt,m.forOwn=Di,m.forOwnRight=Et,m.functions=Nt,m.groupBy=Mi,m.indexBy=Ti,m.initial=En,m.intersection=Nn,m.invert=Tt,m.invoke=on,m.keys=di,m.map=sn,m.mapValues=qt,m.max=ln,m.memoize=Zn,m.merge=Ht,m.min=cn,m.omit=zt,m.once=Xn,m.pairs=Wt,m.partial=Jn,m.partialRight=Yn,m.pick=Qt,m.pluck=Ai,m.property=cr,m.pull=An,m.range=kn,m.reject=pn,m.remove=Pn,m.rest=Ln,m.shuffle=hn,m.sortBy=bn,m.tap=br,m.throttle=er,m.times=dr,m.toArray=vn,m.transform=Kt,m.union=In,m.uniq=Fn,m.values=Zt,m.where=ki,m.without=Rn,m.wrap=tr,m.xor=On,m.zip=Bn,m.zipObject=Gn,m.collect=sn,m.drop=Ln,m.each=rn,m.eachRight=an,m.extend=Ci,m.methods=Nt,m.object=Gn,m.select=en,m.tail=Ln,m.unique=Fn,m.unzip=Bn,or(m),m.clone=$t,m.cloneDeep=St,m.contains=Jt,m.escape=ir,m.every=Yt,m.find=tn,m.findIndex=Sn,m.findKey=xt,m.findLast=nn,m.findLastIndex=Cn,m.findLastKey=wt,m.has=Mt,m.identity=ar,m.indexOf=Dn,m.isArguments=yt,m.isArray=fi,m.isBoolean=At,m.isDate=kt,m.isElement=Pt,m.isEmpty=Lt,m.isEqual=_t,m.isFinite=It,m.isFunction=Ft,m.isNaN=Ot,m.isNull=Bt,m.isNumber=Gt,m.isObject=Rt,m.isPlainObject=Ei,m.isRegExp=Ut,m.isString=jt,m.isUndefined=Vt,m.lastIndexOf=Tn,m.mixin=or,m.noConflict=sr,m.noop=lr,m.now=Pi,m.parseInt=Li,m.random=ur,m.reduce=un,m.reduceRight=fn,m.result=fr,m.runInContext=d,m.size=mn,m.some=gn,m.sortedIndex=_n,m.template=pr,m.unescape=hr,m.uniqueId=mr,m.all=Yt,m.any=gn,m.detect=tn,m.findWhere=tn,m.foldl=un,m.foldr=fn,m.include=Jt,m.inject=un,or(function(){var e={};return Di(m,function(t,n){m.prototype[n]||(e[n]=t)}),e}(),!1),m.first=xn,m.last=Mn,m.sample=dn,m.take=xn,m.head=xn,Di(m,function(e,t){var n="sample"!==t;m.prototype[t]||(m.prototype[t]=function(t,r){var i=this.__chain__,a=e(this.__wrapped__,t,r);return i||null!=t&&(!r||n&&"function"==typeof t)?new g(a,i):a})}),m.VERSION="2.4.1",m.prototype.chain=vr,m.prototype.toString=yr,m.prototype.value=$r,m.prototype.valueOf=$r,Si(["join","pop","shift"],function(e){var t=Pr[e];m.prototype[e]=function(){var e=this.__chain__,n=t.apply(this.__wrapped__,arguments);return e?new g(n,e):n}}),Si(["push","reverse","sort","unshift"],function(e){var t=Pr[e];m.prototype[e]=function(){return t.apply(this.__wrapped__,arguments),this}}),Si(["concat","slice","splice"],function(e){var t=Pr[e];m.prototype[e]=function(){return new g(t.apply(this.__wrapped__,arguments),this.__chain__)}}),li.spliceObjects||Si(["pop","shift","splice"],function(e){var t=Pr[e],n="splice"==e;m.prototype[e]=function(){var e=this.__chain__,r=this.__wrapped__,i=t.apply(r,arguments);return 0===r.length&&delete r[0],e||n?new g(i,e):i}}),m}var h,m=[],g=[],b=0,v={},y=+new Date+"",$=75,S=40,C=" \f \n\r\u2028\u2029 ",x=/\b__p \+= '';/g,w=/\b(__p \+=) '' \+/g,D=/(__e\(.*?\)|\b__t\)) \+\n'';/g,E=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,N=/\w*$/,M=/^\s*function[ \n\r\t]+\w/,T=/<%=([\s\S]+?)%>/g,A=RegExp("^["+C+"]*0+(?=.$)"),P=/($^)/,L=/\bthis\b/,_=/['\n\r\t\u2028\u2029\\]/g,I=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],F=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],R=0,O="[object Arguments]",B="[object Array]",G="[object Boolean]",U="[object Date]",j="[object Error]",V="[object Function]",q="[object Number]",H="[object Object]",z="[object RegExp]",W="[object String]",Q={};Q[V]=!1,Q[O]=Q[B]=Q[G]=Q[U]=Q[q]=Q[H]=Q[z]=Q[W]=!0;var K={leading:!1,maxWait:0,trailing:!1},Z={configurable:!1,enumerable:!1,value:null,writable:!1},X={args:"",array:null,bottom:"",firstArg:"",init:"",keys:null,loop:"",shadowedProps:null,support:null,top:"",useHas:!1},J={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Y={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},et=J[typeof window]&&window||this,tt=J[typeof exports]&&exports&&!exports.nodeType&&exports,nt=J[typeof module]&&module&&!module.nodeType&&module,rt=nt&&nt.exports===tt&&tt,it=J[typeof global]&&global;!it||it.global!==it&&it.window!==it||(et=it);var at=d();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(et._=at,define(function(){return at})):tt&&nt?rt?(nt.exports=at)._=at:tt._=at:et._=at}.call(this),!function(e,t){"use strict";function n(e,t){var n,r,i=e.toLowerCase();for(t=[].concat(t),n=0;nt)return"";for(var n="";t>0;)1&t&&(n+=e),t>>=1,e+=e;return n},l=[].slice,c=function(e){return null==e?"\\s":e.source?e.source:"["+h.escapeRegExp(e)+"]"},u={lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},f={};for(var p in u)f[u[p]]=p;f["'"]="#39";var d=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var n=s,r=function(){return r.cache.hasOwnProperty(arguments[0])||(r.cache[arguments[0]]=r.parse(arguments[0])),r.format.call(null,r.cache[arguments[0]],arguments)};return r.format=function(r,i){var a,o,s,l,c,u,f,p=1,h=r.length,m="",g=[];for(o=0;h>o;o++)if(m=e(r[o]),"string"===m)g.push(r[o]);else if("array"===m){if(l=r[o],l[2])for(a=i[p],s=0;s=0?"+"+a:a,u=l[4]?"0"==l[4]?"0":l[4].charAt(1):" ",f=l[6]-t(a).length,c=l[6]?n(u,f):"",g.push(l[5]?a+c:c+a)}return g.join("")},r.cache={},r.parse=function(e){for(var t=e,n=[],r=[],i=0;t;){if(null!==(n=/^[^\x25]+/.exec(t)))r.push(n[0]);else if(null!==(n=/^\x25{2}/.exec(t)))r.push("%");else{if(null===(n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t)))throw new Error("[_.sprintf] huh?");if(n[2]){i|=1;var a=[],o=n[2],s=[];if(null===(s=/^([a-z_][a-z_\d]*)/i.exec(o)))throw new Error("[_.sprintf] huh?");for(a.push(s[1]);""!==(o=o.substring(s[0].length));)if(null!==(s=/^\.([a-z_][a-z_\d]*)/i.exec(o)))a.push(s[1]);else{if(null===(s=/^\[(\d+)\]/.exec(o)))throw new Error("[_.sprintf] huh?");a.push(s[1])}n[2]=a}else i|=2;if(3===i)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");r.push(n)}t=t.substring(n[0].length)}return r},r}(),h={VERSION:"2.4.0",isBlank:function(e){return null==e&&(e=""),/^\s*$/.test(e)},stripTags:function(e){return null==e?"":t(e).replace(/<\/?[^>]+>/g,"")},capitalize:function(e){return e=null==e?"":t(e),e.charAt(0).toUpperCase()+e.slice(1)},chop:function(e,n){return null==e?[]:(e=t(e),n=~~n,n>0?e.match(new RegExp(".{1,"+n+"}","g")):[e])},clean:function(e){return h.strip(e).replace(/\s+/g," ")},count:function(e,n){if(null==e||null==n)return 0;e=t(e),n=t(n);for(var r=0,i=0,a=n.length;;){if(i=e.indexOf(n,i),-1===i)break;r++,i+=a}return r},chars:function(e){return null==e?[]:t(e).split("")},swapCase:function(e){return null==e?"":t(e).replace(/\S/g,function(e){return e===e.toUpperCase()?e.toLowerCase():e.toUpperCase()})},escapeHTML:function(e){return null==e?"":t(e).replace(/[&<>"']/g,function(e){return"&"+f[e]+";"})},unescapeHTML:function(e){return null==e?"":t(e).replace(/\&([^;]+);/g,function(e,n){var r;return n in u?u[n]:(r=n.match(/^#x([\da-fA-F]+)$/))?t.fromCharCode(parseInt(r[1],16)):(r=n.match(/^#(\d+)$/))?t.fromCharCode(~~r[1]):e})},escapeRegExp:function(e){return null==e?"":t(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(e,t,n,r){var i=h.chars(e);return i.splice(~~t,~~n,r),i.join("")},insert:function(e,t,n){return h.splice(e,t,0,n)},include:function(e,n){return""===n?!0:null==e?!1:-1!==t(e).indexOf(n)},join:function(){var e=l.call(arguments),t=e.shift();return null==t&&(t=""),e.join(t)},lines:function(e){return null==e?[]:t(e).split("\n")},reverse:function(e){return h.chars(e).reverse().join("")},startsWith:function(e,n){return""===n?!0:null==e||null==n?!1:(e=t(e),n=t(n),e.length>=n.length&&e.slice(0,n.length)===n)},endsWith:function(e,n){return""===n?!0:null==e||null==n?!1:(e=t(e),n=t(n),e.length>=n.length&&e.slice(e.length-n.length)===n)},succ:function(e){return null==e?"":(e=t(e),e.slice(0,-1)+t.fromCharCode(e.charCodeAt(e.length-1)+1))},titleize:function(e){return null==e?"":(e=t(e).toLowerCase(),e.replace(/(?:^|\s|-)\S/g,function(e){return e.toUpperCase()}))},camelize:function(e){return h.trim(e).replace(/[-_\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""})},underscored:function(e){return h.trim(e).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(e){return h.trim(e).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(e){return h.capitalize(h.camelize(t(e).replace(/[\W_]/g," ")).replace(/\s/g,""))},humanize:function(e){return h.capitalize(h.underscored(e).replace(/_id$/,"").replace(/_/g," "))},trim:function(e,n){return null==e?"":!n&&r?r.call(e):(n=c(n),t(e).replace(new RegExp("^"+n+"+|"+n+"+$","g"),""))},ltrim:function(e,n){return null==e?"":!n&&a?a.call(e):(n=c(n),t(e).replace(new RegExp("^"+n+"+"),""))},rtrim:function(e,n){return null==e?"":!n&&i?i.call(e):(n=c(n),t(e).replace(new RegExp(n+"+$"),""))},truncate:function(e,n,r){return null==e?"":(e=t(e),r=r||"...",n=~~n,e.length>n?e.slice(0,n)+r:e)},prune:function(e,n,r){if(null==e)return"";if(e=t(e),n=~~n,r=null!=r?t(r):"...",e.length<=n)return e;var i=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},a=e.slice(0,n+1).replace(/.(?=\W*\w*$)/g,i);return a=a.slice(a.length-2).match(/\w\w/)?a.replace(/\s*\S+$/,""):h.rtrim(a.slice(0,a.length-1)),(a+r).length>e.length?e:e.slice(0,a.length)+r},words:function(e,t){return h.isBlank(e)?[]:h.trim(e,t).split(t||/\s+/)},pad:function(e,n,r,i){e=null==e?"":t(e),n=~~n;var a=0;switch(r?r.length>1&&(r=r.charAt(0)):r=" ",i){case"right":return a=n-e.length,e+s(r,a);case"both":return a=n-e.length,s(r,Math.ceil(a/2))+e+s(r,Math.floor(a/2));default:return a=n-e.length,s(r,a)+e}},lpad:function(e,t,n){return h.pad(e,t,n)},rpad:function(e,t,n){return h.pad(e,t,n,"right")},lrpad:function(e,t,n){return h.pad(e,t,n,"both")},sprintf:d,vsprintf:function(e,t){return t.unshift(e),d.apply(null,t)},toNumber:function(e,t){return e?(e=h.trim(e),e.match(/^-?\d+(?:\.\d+)?$/)?o(o(e).toFixed(~~t)):0/0):0},numberFormat:function(e,t,n,r){if(isNaN(e)||null==e)return"";e=e.toFixed(~~t),r="string"==typeof r?r:",";var i=e.split("."),a=i[0],o=i[1]?(n||".")+i[1]:"";return a.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+r)+o},strRight:function(e,n){if(null==e)return"";e=t(e),n=null!=n?t(n):n;var r=n?e.indexOf(n):-1;return~r?e.slice(r+n.length,e.length):e},strRightBack:function(e,n){if(null==e)return"";e=t(e),n=null!=n?t(n):n;var r=n?e.lastIndexOf(n):-1;return~r?e.slice(r+n.length,e.length):e},strLeft:function(e,n){if(null==e)return"";e=t(e),n=null!=n?t(n):n;var r=n?e.indexOf(n):-1;return~r?e.slice(0,r):e},strLeftBack:function(e,t){if(null==e)return"";e+="",t=null!=t?""+t:t;var n=e.lastIndexOf(t);return~n?e.slice(0,n):e},toSentence:function(e,t,n,r){t=t||", ",n=n||" and ";var i=e.slice(),a=i.pop();return e.length>2&&r&&(n=h.rtrim(t)+n),i.length?i.join(t)+n+a:a},toSentenceSerial:function(){var e=l.call(arguments);return e[3]=!0,h.toSentence.apply(h,e)},slugify:function(e){if(null==e)return"";var n="ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź",r="aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz",i=new RegExp(c(n),"g");return e=t(e).toLowerCase().replace(i,function(e){var t=n.indexOf(e);return r.charAt(t)||"-"}),h.dasherize(e.replace(/[^\w\s-]/g,""))},surround:function(e,t){return[t,e,t].join("")},quote:function(e,t){return h.surround(e,t||'"')},unquote:function(e,t){return t=t||'"',e[0]===t&&e[e.length-1]===t?e.slice(1,e.length-1):e},exports:function(){var e={};for(var t in this)this.hasOwnProperty(t)&&!t.match(/^(?:include|contains|reverse)$/)&&(e[t]=this[t]);return e},repeat:function(e,n,r){if(null==e)return"";if(n=~~n,null==r)return s(t(e),n);for(var i=[];n>0;i[--n]=e);return i.join(r)},naturalCmp:function(e,n){if(e==n)return 0;if(!e)return-1;if(!n)return 1;for(var r=/(\.\d+)|(\d+)|(\D+)/g,i=t(e).toLowerCase().match(r),a=t(n).toLowerCase().match(r),o=Math.min(i.length,a.length),s=0;o>s;s++){var l=i[s],c=a[s];if(l!==c){var u=parseInt(l,10);if(!isNaN(u)){var f=parseInt(c,10);if(!isNaN(f)&&u-f)return u-f}return c>l?-1:1}}return i.length===a.length?i.length-a.length:n>e?-1:1},levenshtein:function(e,n){if(null==e&&null==n)return 0;if(null==e)return t(n).length;if(null==n)return t(e).length;e=t(e),n=t(n);for(var r,i,a=[],o=0;o<=n.length;o++)for(var s=0;s<=e.length;s++)i=o&&s?e.charAt(s-1)===n.charAt(o-1)?r:Math.min(a[s],a[s-1],r)+1:o+s,r=a[s],a[s]=i;return a.pop()},toBoolean:function(e,t,r){return"number"==typeof e&&(e=""+e),"string"!=typeof e?!!e:(e=h.trim(e),n(e,t||["true","1"])?!0:n(e,r||["false","0"])?!1:void 0)}};h.strip=h.trim,h.lstrip=h.ltrim,h.rstrip=h.rtrim,h.center=h.lrpad,h.rjust=h.lpad,h.ljust=h.rpad,h.contains=h.include,h.q=h.quote,h.toBool=h.toBoolean,"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(module.exports=h),exports._s=h),"function"==typeof define&&define.amd&&define("underscore.string",[],function(){return h}),e._=e._||{},e._.string=e._.str=h}(this,String); //# sourceMappingURL=../maps/libs.js.map \ No newline at end of file diff --git a/zanata-war/src/main/webapp/app/js/templates.js b/zanata-war/src/main/webapp/app/js/templates.js index b823bb3e93..ebeb635241 100644 --- a/zanata-war/src/main/webapp/app/js/templates.js +++ b/zanata-war/src/main/webapp/app/js/templates.js @@ -1,15 +1,16 @@ -angular.module("templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("editor/editor-content.html","\n \n 0\">\n \n \n \n \n \n No content\n \n \n\n"); +angular.module("templates", []).run(["$templateCache", function($templateCache) {$templateCache.put("editor/editor-content.html","\n \n 0\">\n \n \n \n \n \n No content\n \n \n\n"); $templateCache.put("editor/editor-details.html","\n"); -$templateCache.put("editor/editor-header.html","\n \n\n\n \n \n \n \n Loading Loading \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n More\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Translating\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); -$templateCache.put("editor/editor-suggestions.html","\n"); -$templateCache.put("editor/editor.html","\n \n\n \n\n \n\n \n\n \n \n \n Keyboard Shortcuts\n \n \n \n \n \n \n \n \n {{ ::key }}\n \n \n {{ ::shortcut.description }}\n \n \n \n \n \n \n\n\n\n"); +$templateCache.put("editor/editor-header.html","\n \n\n\n \n \n \n \n Loading Loading \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n More\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Translating\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); +$templateCache.put("editor/editor-suggestions.html","\n\n\n\n"); +$templateCache.put("editor/editor.html","\n \n\n \n\n \n\n \n\n \n \n \n Keyboard Shortcuts\n \n \n \n \n \n \n \n \n {{ ::key }}\n \n \n {{ ::shortcut.description }}\n \n \n \n \n \n \n\n"); $templateCache.put("components/icon/icon.html","\n \n\n"); $templateCache.put("components/logo-loader/logo-loader.html","\n Zanata\n Loading\n\n"); $templateCache.put("components/progressbar/progressbar.html","\n \n \n \n \n\n"); +$templateCache.put("components/suggestions/suggestion.html"," 1\">\n \n \n \n \n \n \n Singular Form\n Plural Form\n \n {{source}}\n \n \n \n \n \n {{detail.projectName}}\n {{detail.version}}\n {{detail.documentName}}\n\n {{detail.transMemorySlug}}\n\n 0\"> {{remaining}} more occurrences\n \n \n \n \n \n \n Singular Form\n Plural Form\n \n {{target}}\n \n \n \n \n Translated by {{translator}}\n \n \n \n {{suggestionCtrl.percent()}}%\n \n \n \n \n \n \n \n\n"); $templateCache.put("components/transUnit/trans-unit-status.html","\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); $templateCache.put("components/transUnit/trans-unit.html","\n\n \n\n \n \n\n \n \n Singular Form\n Plural Form\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n Singular Form\n Plural Form\n \n \n \n \n \n \n\n\n"); $templateCache.put("components/transUnitFilter/trans-unit-filter.html","\n \n \n \n \n 0\n Total Phrases\n \n \n \n \n \n \n \n \n 0\n Approved\n \n \n \n \n \n \n \n \n 0\n Translated\n \n \n \n \n \n \n \n \n 0\n Needs Work\n \n \n \n \n \n \n \n \n 0\n Untranslated\n \n \n \n \n \n \n \n \n \n \n \n \n\n"); $templateCache.put("components/transUnit/source/footer.html","\n \n \n \n \n \n\n"); $templateCache.put("components/transUnit/source/header.html","\n {{::editorContext.srcLocale.name}} {{::editorContext.srcLocale.localeId}}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); -$templateCache.put("components/transUnit/translation/footer.html","\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Save as\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); +$templateCache.put("components/transUnit/translation/footer.html","\n \n \n \n \n \n \n \n 0\">\n \n \n {{suggestionCount}}\n \n \n \n \n \n \n Save as\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"); $templateCache.put("components/transUnit/translation/header.html","\n {{transUnitCtrl.getLocaleName(editorContext.localeId)}} {{editorContext.localeId}}\n \n \n \n \n \n \n \n \n \n \n \n \n\n");}]); \ No newline at end of file diff --git a/zanata-war/src/main/webapp/app/maps/app.js.map b/zanata-war/src/main/webapp/app/maps/app.js.map index 04f2889fb7..5c87a5ded3 100644 --- a/zanata-war/src/main/webapp/app/maps/app.js.map +++ b/zanata-war/src/main/webapp/app/maps/app.js.map @@ -1 +1 @@ -{"version":3,"sources":["app.js","AppConfig.js","AppConstants.js","AppCtrl.js","editor/EditorContentCtrl.js","editor/EditorCtrl.js","editor/EditorDetailsCtrl.js","editor/EditorService.js","editor/EditorShortcuts.js","editor/EditorSuggestionsCtrl.js","components/blur-on/blurOnDirective.js","components/clickElsewhere/clickElsewhereDirective.js","components/document/DocumentService.js","components/dropdown/DropdownController.js","components/dropdown/DropdownService.js","components/dropdown/dropdown.js","components/dropdown/dropdownDirective.js","components/event/EventService.js","components/icon/iconDirective.js","components/locale/LocaleService.js","components/logo-loader/logoLoaderDirective.js","components/message/MessageHandler.js","components/notification/NotificationService.js","components/phrases/PhraseCache.js","components/phrases/PhraseService.js","components/progressbar/progressbarDirective.js","components/project/ProjectService.js","components/renderWhitespaceCharacters/renderWhitespaceCharacters.js","components/scrollbar-width/ScrollbarWidthCtrl.js","components/scrollbar-width/scrollbarWidthDirective.js","components/toggle/toggleDirective.js","components/transStatus/TransStatusService.js","components/transUnit/TransUnitCtrl.js","components/transUnit/TransUnitService.js","components/transUnit/transUnitDirective.js","components/transUnitFilter/transUnitFilterDirective.js","components/user/UserService.js","components/util/FilterUtil.js","components/util/PhraseUtil.js","components/util/StatisticUtil.js","components/util/StringUtil.js","components/util/UrlService.js"],"names":[],"mappings":"AAAA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;;AAEJ;;ACnBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;;IAEA;IACA;MACE;QACE;UACE;UACA;UACA;QACF;QACA;UACE;UACA;UACA;UACA;QACF;QACA;UACE;UACA;UACA;QACF;QACA;UACE;UACA;UACA;YACE;UACF;YACE;cACE;UACJ;YACE;UACF;UACA;QACF;MACF;IACF,EAAE;;;IAEF;;IAEA;IACA;;IAEA;MACE;QACE;QACA;QACA,aAAa,oBAAoB;QACjC;UACE,MAAM,eAAA;YACJ;UACF,CAAC;QACH;MACF;QACE;QACA;UACE;YACE;YACA,aAAa,kCAAkC;UACjD;UACA;YACE;YACA,aAAa,0CAA0C;UACzD;UACA;YACE;YACA,aAAa,kCAAkC;UACjD;QACF;MACF;QACE;QACA;MACF;;MAEA;;EAEJ;EACA;EACA,CAAC;;;EAED;IACE;IACA;;AAEJ;;;;;AC5FA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;IACA;;AAEJ;;;;ACfA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;mBACiB;IACf;;IAEA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;MACF;;MAEA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;;IAEF;IACA;MACE;MACA;MACA;QACE;QACA;YACI;gBACI;kBACE;gBACF;gBACA;kBACE;oBACE;oBACA;kBACF;oBACE;kBACF;gBACF;MACV;QACE;UACE;MACJ;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;UACE;UACA;UACA;YACE;QACJ;UACE;QACF;IACJ;;IAEA;MACE;QACE;UACE;YACE;cACE;cACA;YACF;YACA;UACF;UACA;YACE;UACF;YACE;UACF;QACF;QACA;UACE;YACE;YACA;UACF;QACF;IACJ;EACF,CAAC;;;EAED;IACE;IACA,aAAa,OAAO;;AAExB;;;;;AC5GA;EACE;;EAEA;GACC;GACA;GACA;EACD;6BAC2B;6BACA;6BACA;;IAEzB;IACA;QACI;IACJ;;IAEA;;IAEA;MACE;MACA;;IAEF;;IAEA;MACE;QACE;UACE;QACF;UACE;UACA;YACE;cACE;YACF;UACF;UACA;QACF;QACA;QACA;MACF;;IAEF;MACE;;MAEA;QACE;QACA;UACE;UACA;QACF;MACF;MACA;QACE;MACF;IACF;;;IAGA;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;QACE;UACE;UACA;QACF;MACF;;IAEF;MACE;MACA;KACD;IACD;IACA;;IAEA;IACA;;IAEA;IACA;mBACe;;IAEf;MACE;QACE;QACA;QACA;QACA;;MAEF;QACE;MACF;MACA;MACA;;MAEA;QACE;+BACuB;iCACE;iCACA;iCACA;+BACF;MACzB;QACE;QACA;QACA;WACG;aACE;aACA;aACA;aACA;WACF;MACL;IACF;;IAEA;MACE;QACE;QACA;QACA;QACA;;MAEF;QACE;MACF;MACA;MACA;;MAEA;QACE;+BACuB;iCACE;iCACA;iCACA;+BACF;MACzB;QACE;QACA;QACA;WACG;aACE;aACA;aACA;aACA;WACF;MACL;IACF;;IAEA;MACE;QACE;QACA;QACA;;MAEF;QACE;MACF;;MAEA;QACE;UACE;QACF;UACE;iCACuB;mCACE;mCACA;mCACA;iCACF;UACvB;QACF;MACF;MACA;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;UACA;UACA;QACF;MACF;;MAEA;QACE;UACE;UACA;YACE;cACE;UACJ;;UAEA;YACE;;UAEF;MACJ;IACF;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,aAAa,iBAAiB;AAClC;;AC3PA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;IACA;IACA;MACE;QACE;QACA;QACA;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;IACF;;IAEA;;IAEA;IACA;IACA;MACE;MACA;;MAEA;QACE;QACA;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;MACE;MACA;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;;MAEA;MACA;QACE;IACJ;;IAEA;IACA;;IAEA;IACA;IACA;MACE;MACA;MACA;;IAEF;MACE;IACF;;IAEA;MACE;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;QACE;UACE;MACJ;;IAEF;MACE;MACA;QACE;QACA;UACE;UACA;YACE;YACA;QACJ;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;YACE;YACA;cACE;cACA;YACF;UACF;QACF;MACF;QACE;MACF;;IAEF;MACE;MACA;QACE;;QAEA;UACE;UACA;YACE;YACA;QACJ;UACE;UACA;cACI;UACJ;YACE;YACA;UACF;YACE;YACA;cACE;cACA;YACF;UACF;QACF;MACF;QACE;MACF;;IAEF;MACE;QACE;QACA;MACF;;IAEF;MACE;QACE;QACA;MACF;;IAEF;MACE;;QAEE;UACE;;QAEF;QACA;MACF;;IAEF;MACE;QACE;MACF;QACE;UACE;MACJ;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;;IAGA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;QACE;QACA;UACE;YACE;QACJ;MACF;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;;MAEA;QACE;UACE;MACJ;IACF;;IAEA;MACE;QACE;QACA;IACJ;;IAEA;MACE;QACE;UACE;UACA;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;cACE;YACF;cACE;UACJ;UACA;YACE;UACF;IACN;;IAEA;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,aAAa,UAAU;AAC3B;;AC/SA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;;IAEA;EACF;;EAEA;IACE;IACA,aAAa,iBAAiB;AAClC;;AChBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;IACA;IACA;QACI;;IAEJ;;IAEA;IACA;;IAEA;MACE;QACE;UACE;UACA;UACA;UACA;UACA;UACA;QACF;QACA;MACF;;IAEF;2CACuC;MACrC;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;QACJ;UACE;UACA;QACF;;QAEA;QACA;UACE;UACA;UACA;QACF;UACE;UACA;YACE;YACA;YACA;YACA;UACF;QACF;QACA;QACA;MACF;;IAEF;MACE;QACE;IACJ;;IAEA;IACA;MACE;;MAEA;;MAEA;QACE;UACE;UACA;YACE;UACF;QACF;MACF;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;UACE;;UAEA;YACE;;UAEF;YACE;YACA;YACA;;UAEF;YACE;QACJ;QACA;UACE;YACE;UACF;UACA;YACE;QACJ;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,aAAa;;AAE3B;;;ACtJA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;2BACyB;IACvB;MACE;;IAEF;IACA;IACA;;IAEA;MACE;QACE;QACA;UACE;MACJ;IACF;;IAEA;MACE;QACE;QACA;QACA;UACE;MACJ;IACF;;IAEA;MACE;QACE;QACA;QACA;UACE;MACJ;IACF;;IAEA;MACE;MACA;MACA;QACE;QACA;UACE;QACF;MACF;QACE;QACA;UACE;UACA;YACE;QACJ;UACE;UACA;YACE;QACJ;MACF;IACF;;IAEA;MACE;QACE;QACA;QACA;UACE;YACE;YACA;YACA;YACA;UACF;MACJ;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;QACE;UACE;YACE;YACA;UACF;;QAEF;QACA;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;IACD;MACE;QACE;;MAEF;;MAEA;QACE;;MAEF;QACE;;MAEF;MACA;MACA;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;QACA;QACA;;MAEF;QACE;QACA;QACA;QACA;SACC;SACA;QACD;QACA;IACJ;;IAEA;KACC;;KAEA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;IACA;MACE;MACA;QACE;MACF;MACA;QACE;QACA;UACE;MACJ;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;QACE;UACE;YACE;UACF;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;YACE;UACF;MACJ;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;UACE;QACF;MACF;IACF;;IAEA;uDACmD;MACjD;;MAEA;MACA;;MAEA;QACE;UACE;UACA;UACA;UACA;QACF;MACF;IACF;;IAEA;MACE;QACE;QACA;QACA;UACE;YACE;YACA;UACF;MACJ;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;MACA;;MAEA;QACE;QACA;UACE;YACE;YACA;UACF;YACE;UACF;QACF;;QAEA;MACF;;MAEA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,eAAe;AAC7B;;;ACnVA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;;IAEA;EACF;;EAEA;IACE;IACA,aAAa,qBAAqB;AACtC;;AChBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;UACE;cACI;YACF;UACF;QACF;IACJ;EACF;;EAEA;IACE;IACA,YAAY,MAAM;;AAEtB;;ACzBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;MACF;MACA;QACE;UACE;YACE;UACF;QACF;;QAEA;;QAEA;UACE;QACF;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,YAAY,cAAc;;AAE9B;;AClCA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;2BACyB;IACvB;QACI;;IAEJ;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;UACE;QACF;UACE;UACA;YACE;cACE;cACA;gBACE;gBACA;gBACA;gBACA;cACF;cACA;YACF;UACF;UACA;;YAEE;YACA;cACE;gBACE;YACJ;;YAEA;YACA;UACF;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;MACE;SACG;MACH;IACF;;IAEA;+CAC2C;+CACA;MACzC;MACA;QACE;UACE;;QAEF;UACE;YACE;YACA;YACA;YACA;UACF;QACF;MACF;IACF;;IAEA;IACA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;;MAEE;QACE;;MAEF;QACE;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,eAAe;AAC7B;;AC9JA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;QACI;QACA;QACA;QACA;QACA;QACA;UACE;;IAEN;MACE;;MAEA;QACE;QACA;;QAEA;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;QACE;;MAEF;QACE;QACA;QACA;QACA;UACE;QACF;QACA;MACF;QACE;MACF;;MAEA;MACA;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;EACF,CAAC;;;EAED;IACE;IACA,aAAa,YAAY;;AAE7B;;ACpGA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;QACI;;IAEJ;MACE;QACE;QACA;MACF;;MAEA;QACE;MACF;;MAEA;IACF;;IAEA;MACE;QACE;QACA;QACA;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;QACE;MACF;;MAEA;QACE;MACF;IACF;;IAEA;MACE;QACE;QACA;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,UAAU,eAAe;;AAE7B;;;AC/DA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;IACE;IACA;;AAEJ;;AClBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;MACA,aAAa,YAAY;MACzB;QACE;MACF;IACF;EACF;;EAEA;IACE;MACE;MACA;MACA;QACE;MACF;MACA;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;MACA;MACA;QACE;UACE;QACF;;QAEA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;YACF;UACF;QACF;;QAEA;;QAEA;QACA;UACE;UACA;QACF;QACA;UACE;UACA;YACE;UACF;QACF;;QAEA;UACE;QACF;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,QAAQ;IACpB,YAAY,eAAe;IAC3B,YAAY,cAAc;;AAE9B;;;AC3FA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;OACC;OACA;OACA;OACA;MACD;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;;MAEA;;MAEA;;MAEA;;MAEA;OACC;OACA;MACD;MACA;MACA;;MAEA;OACC;OACA;OACA;MACD;;;MAGA;OACC;OACA;MACD;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,YAAY;AAC1B;;AC1IA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;QACA;QACA;MACF;MACA;MACA;QACE;YACI;;QAEJ;;QAEA;UACE;QACF;;QAEA;QACA;UACE;YACE;YACA;UACF;QACF;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,YAAY,IAAI;;AAEpB;;AC3CA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;;IAEE;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;;MAEE;QACE;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;;MAEA;IACF;;IAEA;IACA;MACE;QACE;UACE;UACA;QACF;MACF;MACA;QACE;MACF;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;;MAEA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;MACA;QACE;QACA;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,UAAU,aAAa;AAC3B;;ACjGA;;EAEE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;QACA;MACF;MACA;QACE;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;MACA;IACF;EACF,CAAC;;;EAED;IACE;IACA,YAAY,UAAU;;AAE1B;;AC9CA;EACE;;EAEA;GACC;GACA;GACA;EACD;IACE;MACE;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA,UAAU,cAAc;;AAE5B;;ACzBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;;EAEA;;EAEA;IACE;IACA,UAAU,mBAAmB;;AAEjC;;ACjBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;uBACqB;IACnB;MACE;MACA;;IAEF;MACE;QACE;QACA;UACE;QACF;UACE;UACA;cACI;gBACE;gBACA;kBACE;kBACA;kBACA;kBACA;gBACF;gBACA;cACF;YACF;YACA;UACF;YACE;YACA;YACA;UACF;QACF;MACF;;IAEF;MACE;QACE;QACA;MACF;QACE;UACE;YACE;UACF;YACE;UACF;QACF;UACE;QACF;MACF;MACA;QACE;MACF;MACA;QACE;QACA;UACE;YACE;cACE;cACA;gBACE;gBACA;cACF;YACF;UACF;QACF;QACA;UACE;YACE;cACE;cACA;gBACE;gBACA;cACF;YACF;UACF;QACF;;QAEA;QACA;UACE;YACE;QACJ;UACE;QACF;UACE;QACF;MACF;;MAEA;QACE;QACA;UACE;UACA;UACA;QACF;QACA;MACF;;MAEA;QACE;QACA;UACE;UACA;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;QAEE;UACE;;QAEF;UACE;QACF;QACA;QACA;UACE;QACF;;QAEA;QACA;QACA;UACE;QACF;QACA;QACA;QACA;MACF;;IAEF;MACE;QACE;IACJ;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,WAAW;;AAEzB;;AClKA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;GACC;GACA;GACA;GACA;GACA;EACD;yBACuB;IACrB;;IAEA;;IAEA;IACA;IACA;IACA;;IAEA;MACE;QACE;UACE;UACA;QACF;IACJ;;IAEA;KACC;KACA;IACD;6CACyC;;MAEvC;;MAEA;QACE;;MAEF;QACE;QACA;UACE;YACE;UACF;YACE;UACF;QACF;QACA;QACA;QACA;UACE;MACJ;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;UACE;cACI;UACJ;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;cACE;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;;MAEA;QACE;UACE;YACE;cACE;gBACE;cACF;cACA;YACF;YACA;UACF;MACJ;IACF;;IAEA;IACA;MACE;;MAEA;QACE;;MAEF;MACA;MACA;QACE;QACA;QACA;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;IACF;;IAEA;IACA;MACE;mCAC6B;mCACA;QAC3B;UACE;YACE;UACF;YACE;UACF;UACA;YACE;UACF;QACF;IACJ;;IAEA;IACA;MACE;mCAC6B;mCACA;QAC3B;UACE;YACE;UACF;YACE;UACF;UACA;UACA;QACF;IACJ;;IAEA;IACA;MACE;mCAC6B;mCACA;QAC3B;UACE;YACE;YACA;;UAEF;YACE;UACF;;UAEA;YACE;cACE;YACF;cACE;YACF;UACF;UACA;QACF;IACJ;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,aAAa;;AAE3B;;;AClOA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;QACA;MACF;MACA;MACA,YAAY,WAAA;QACV;SACC;SACA;SACA;QACD;UACE;YACE;UACF;QACF;MACF,CAAC;IACH;EACF;;EAEA;IACE;QACI;QACA;QACA;QACA;QACA;QACA;QACA;UACE;QACF;;IAEJ;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA,YAAY,WAAW;;AAE3B;;AC1EA;EACE;;EAEA;GACC;GACA;GACA;GACA;;EAED;;IAEE;KACC;KACA;KACA;KACA;KACA;IACD;MACE;UACI;YACE;YACA;cACE;YACF;UACF;QACF;;MAEF;MACA;IACF;;IAEA;MACE;IACF;EACF,CAAC;;EACD;IACE;IACA,UAAU,cAAc;AAC5B;;ACtCA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;QACE;QACA;MACF;MACA;QACE;QACA;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;MACA;QACE;MACF;;MAEA;QACE;UACE;UACA;UACA;UACA;QACF;MACF;IACF;;IAEA;MACE;IACF;EACF;;EAEA;IACE;IACA,YAAY,0BAA0B;;AAE1C;;ACnDA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;MACE;UACI;UACA;;MAEJ;IACF;;EAEF;;EAEA;IACE;IACA,aAAa,kBAAkB;;AAEnC;;AC5BA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA,aAAa,wCAAwC;MACrD;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;UACE;QACF;QACA;QACA;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;UACE;QACF;QACA;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;UACE;QACF;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,cAAc;IAC1B,YAAY,qBAAqB;IACjC,YAAY,uBAAuB;IACnC,YAAY,mBAAmB;;AAEnC;;ACrFA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,cAAc;;AAE9B;;ACtBA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;GACC;GACA;GACA;GACA;EACD;IACE;QACI;UACE;YACE;YACA;YACA;UACF;UACA;YACE;YACA;YACA;UACF;UACA;YACE;YACA;YACA;UACF;UACA;YACE;YACA;YACA;UACF;QACF;;IAEJ;MACE;IACF;;IAEA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;QACE;MACF;MACA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,kBAAkB;AAChC;;;ACjHA;EACE;;EAEA;GACC;GACA;GACA;EACD;yBACuB;yBACA;;IAErB;;IAEA;IACA;IACA;;IAEA;MACE;;IAEF;MACE;QACE;QACA;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;MACA;QACE;UACE;YACE;YACA;UACF;MACJ;IACF;;IAEA;MACE;UACI;IACN;;IAEA;MACE;IACF;;IAEA;MACE;MACA;QACE;UACE;YACE;YACA;MACN;IACF;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;MACA;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;QACE;MACF;QACE;UACE;MACJ;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;UACE;MACJ;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;+BACuB;iCACE;iCACA;+BACF;MACzB;IACF;;IAEA;MACE;QACE;UACE;YACE;cACE;cACA;QACN;MACF;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,aAAa,aAAa;AAC9B;;;AChKA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;QACI;QACA;;IAEJ;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;QACA;UACE;QACF;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;YACA;;QAEJ;UACE;;UAEA;YACE;;YAEA;YACA;cACE;cACA;gBACE;kBACE;kBACA;kBACA;kBACA;gBACF;YACJ;UACF;;UAEA;UACA;UACA;;UAEA;;UAEA;UACA;YACE;cACE;gBACE;gBACA;cACF;YACF;cACE;cACA;YACF;UACF;QACF;UACE;QACF;MACF;;IAEF;KACC;KACA;KACA;IACD;MACE;QACE;QACA;UACE;UACA;UACA;YACE;YACA;YACA;YACA;cACE;cACA;YACF;UACF;QACF;QACA;MACF;;IAEF;KACC;KACA;KACA;IACD;MACE;QACE;UACE;QACF;MACF;;IAEF;KACC;KACA;KACA;IACD;MACE;QACE;UACE;UACA;UACA;QACF;;QAEA;QACA;UACE;QACF;;QAEA;QACA;UACE;YACE;UACF;QACF;MACF;;IAEF;KACC;KACA;KACA;IACD;OACG;;IAEH;KACC;KACA;KACA;IACD;OACG;;IAEH;MACE;MACA;MACA;IACF;OACG;;IAEH;MACE;MACA;MACA;IACF;OACG;;IAEH;MACE;MACA;QACE;QACA;MACF;MACA;MACA;QACE;MACF;QACE;IACJ;;IAEA;MACE;MACA;;MAEA;QACE;MACF;QACE;IACJ;;IAEA;OACG;OACA;IACH;;IAEA;MACE;MACA;MACA;QACE;IACJ;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;MACA;;MAEA;QACE;UACE;UACA;QACF;YACI;YACA;QACJ;MACF;;MAEA;QACE;QACA;MACF;;MAEA;IACF;;IAEA;EACF,CAAC;;;EAED;IACE;IACA,UAAU,gBAAgB;AAC9B;;;;ACrQA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;QACA;QACA;MACF;MACA,aAAa,8BAA8B;MAC3C;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA,YAAY,SAAS;;AAEzB;;AC7BA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;QACE;MACF;MACA;IACF;EACF;;EAEA;IACE;IACA,YAAY,eAAe;;AAE/B;;ACvBA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;;IAEE;MACE;QACE;UACE;UACA;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;MACA;MACA;IACF;EACF,CAAC;;EACD;IACE;IACA,UAAU,WAAW;AACzB;;AC5CA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;;IAEE;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;;IAGA;MACE;QACE;MACF;MACA;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;MACA;IACF;EACF,CAAC;;EACD;IACE;IACA,UAAU,UAAU;AACxB;;AC1EA;EACE;;EAEA;GACC;GACA;GACA;GACA;EACD;;IAEE;MACE;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;MACE;MACA;MACA;QACE;UACE;YACE;QACJ;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;EACF,CAAC;;EACD;IACE;IACA,UAAU,UAAU;AACxB;;AC3DA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;QACE;MACF;MACA;QACE;MACF;IACF;EACF;EACA;IACE;IACA,UAAU,aAAa;AAC3B;;ACxBA;EACE;;EAEA;GACC;GACA;GACA;GACA;;EAED;IACE;MACE;QACE;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;EACF;EACA;IACE;IACA,UAAU,UAAU;AACxB;;AC3CA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;QACE;QACA;IACJ;;IAEA;MACE;MACA;MACA;MACA;MACA;QACE;;IAEJ;;IAEA;MACE;QACE;MACF;MACA;QACE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;YACE;UACF;YACE;gBACI;;YAEJ;YACA;cACE;YACF;YACA;cACE;YACF;UACF;;UAEA;UACA;UACA;UACA;UACA;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;YACE;cACE;UACJ;;UAEA;YACE;QACJ;MACF;IACF;;IAEA;KACC;KACA;IACD;MACE;IACF;;IAEA;MACE;QACE;IACJ;;IAEA;MACE;IACF;;IAEA;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;IACD;MACE;QACE;MACF;IACF;EACF,CAAC;;;EAED;IACE;IACA,UAAU,UAAU;AACxB","file":"app.js","sourcesContent":["(function() {\n 'use strict';\n\n /**\n * Root application\n * app.js\n */\n angular.module(\n 'app', [\n 'ngResource',\n 'ngAnimate',\n 'ui.router',\n 'templates',\n 'cfp.hotkeys',\n 'focusOn',\n 'monospaced.elastic',\n 'gettext'\n ]);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name AppConfig\n * @description Main config for the entire app\n * @ngInject\n */\n function AppConfig($stateProvider, $urlRouterProvider, $httpProvider,\n hotkeysProvider) {\n\n //Can't use injection for EventService as this module is out of the scope\n var interceptor = function($q, $rootScope) {\n return {\n request: function(config) {\n // See EventService.EVENT.LOADING_START\n $rootScope.$broadcast('loadingStart');\n return config;\n },\n requestError: function(rejection) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n console.error('Request error due to ', rejection);\n return $q.reject(rejection);\n },\n response: function(response) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n return response || $q.when(response);\n },\n responseError: function(rejection) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n if (rejection.status === 401) {\n console.error('Unauthorized access. Please login');\n } else if (rejection.status === 404) {\n console.error('Service end point not found- ',\n rejection.config.url);\n } else {\n console.error('Error in response ', rejection);\n }\n return $q.reject(rejection);\n }\n };\n };\n\n $httpProvider.interceptors.push(interceptor);\n\n // For any unmatched url, redirect to /editor\n $urlRouterProvider.otherwise('/');\n\n $stateProvider\n .state('editor', {\n url: '/:projectSlug/:versionSlug/translate',\n templateUrl: 'editor/editor.html',\n controller: 'EditorCtrl as editor',\n resolve: {\n url : function(UrlService) {\n return UrlService.init();\n }\n }\n }).state('editor.selectedContext', {\n url: '/:docId/:localeId',\n views: {\n 'editor-content': {\n templateUrl: 'editor/editor-content.html',\n controller: 'EditorContentCtrl as editorContent'\n },\n 'editor-suggestions': {\n templateUrl: 'editor/editor-suggestions.html',\n controller: 'EditorSuggestionsCtrl as editorSuggestions'\n },\n 'editor-details': {\n templateUrl: 'editor/editor-details.html',\n controller: 'EditorDetailsCtrl as editorDetails'\n }\n }\n }).state('editor.selectedContext.tu', {\n url: '/?id&selected?states',\n reloadOnSearch: false\n });\n\n hotkeysProvider.includeCheatSheet = false;\n\n // $locationProvider.html5Mode(true);\n // .hashPrefix('!');\n }\n\n angular\n .module('app')\n .config(AppConfig);\n\n})();\n\n\n\n","(function() {\n 'use strict';\n\n /**\n * AddConstants\n * \"Global\" app variables. Don't worry David, they're not really global.\n */\n angular\n .module('app')\n .constant('_', window._)\n .constant('str', window._.string)\n .constant('Mousetrap', window.Mousetrap)\n // Toggle to hide/show features that are ready for production\n .constant('PRODUCTION', true);\n\n})();\n\n\n","(function() {\n 'use strict';\n\n /**\n * @name AppCtrl\n * @description Main controler for the entire app\n * @ngInject\n */\n function AppCtrl($scope, UserService, UrlService, LocaleService,\n MessageHandler, gettextCatalog, StringUtil, PRODUCTION) {\n var appCtrl = this;\n\n // See AppConstants.js\n appCtrl.PRODUCTION = PRODUCTION;\n appCtrl.settings = UserService.settings;\n appCtrl.uiLocaleList = [ LocaleService.DEFAULT_LOCALE ];\n\n /*\n Not used for the time being. But should show loading when change state\n $scope.$on('$stateChangeStart', function(event, toState) {\n if (toState.resolve) {\n }\n });\n\n $scope.$on('$stateChangeSuccess', function(event, toState) {\n if (toState.resolve) {\n }\n });\n */\n\n UrlService.init().then(loadLocales).\n then(loadUserInformation).\n then(loadUILocale);\n\n // On UI locale changes listener\n appCtrl.onChangeUILocale = function(locale) {\n appCtrl.myInfo.locale = locale;\n var uiLocaleId = appCtrl.myInfo.locale.localeId;\n if (!StringUtil.startsWith(uiLocaleId,\n LocaleService.DEFAULT_LOCALE.localeId, true)) {\n gettextCatalog.loadRemote(UrlService.uiTranslationURL(uiLocaleId))\n .then(\n function() {\n gettextCatalog.setCurrentLanguage(uiLocaleId);\n },\n function(error) {\n MessageHandler.displayInfo('Error loading UI locale. ' +\n 'Default to \\'' + LocaleService.DEFAULT_LOCALE.name +\n '\\': ' + error);\n gettextCatalog.setCurrentLanguage(\n LocaleService.DEFAULT_LOCALE);\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n });\n } else {\n gettextCatalog.setCurrentLanguage(\n LocaleService.DEFAULT_LOCALE.localeId);\n }\n };\n\n appCtrl.dashboardPage = function() {\n return UrlService.DASHBOARD_PAGE;\n };\n\n function loadLocales() {\n return LocaleService.getAllLocales();\n }\n\n function loadUserInformation() {\n return UserService.getMyInfo().then(\n function(myInfo) {\n appCtrl.myInfo = myInfo;\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n appCtrl.myInfo.gravatarUrl = UrlService.gravatarUrl(\n appCtrl.myInfo.gravatarHash, 72);\n }, function(error) {\n MessageHandler.displayError('Error loading my info: ' + error);\n });\n }\n\n function loadUILocale() {\n LocaleService.getUILocaleList().then(\n function(translationList) {\n for ( var i in translationList.locales) {\n var language = {\n 'localeId' : translationList.locales[i],\n 'name' : ''\n };\n appCtrl.uiLocaleList.push(language);\n }\n appCtrl.myInfo.locale = LocaleService.getLocaleByLocaleId(\n appCtrl.uiLocaleList, LocaleService.DEFAULT_LOCALE.localeId);\n if (!appCtrl.myInfo.locale) {\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n }\n },\n function(error) {\n MessageHandler.displayInfo('Error loading UI locale. ' +\n 'Default to \\'' + LocaleService.DEFAULT_LOCALE.name +\n '\\': ' + error);\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n });\n }\n }\n\n angular\n .module('app')\n .controller('AppCtrl', AppCtrl);\n\n})();\n\n\n\n","(function() {\n 'use strict';\n\n /**\n * EditorContentCtrl.js\n * @ngInject\n */\n function EditorContentCtrl($rootScope, EditorService, PhraseService,\n DocumentService, UrlService, EventService,\n $stateParams, PhraseUtil, $location, _,\n TransStatusService) {\n\n //TODO: move pager to directives/convert to infinite scroll\n var COUNT_PER_PAGE = 50,\n editorContentCtrl = this, status, filter;\n refreshFilterQueryFromUrl();\n\n editorContentCtrl.phrases = [];\n\n EditorService.updateContext($stateParams.projectSlug,\n $stateParams.versionSlug, DocumentService.decodeDocId($stateParams.docId),\n $stateParams.localeId);\n\n init();\n\n $rootScope.$on(EventService.EVENT.FILTER_TRANS_UNIT,\n function (event, filter) {\n if(filter.status.all === true) {\n $location.search('status', null);\n } else {\n var queries = [];\n _.forEach(filter.status, function(val, key) {\n if(val) {\n queries.push(key);\n }\n });\n $location.search('status', queries.join(','));\n }\n refreshFilterQueryFromUrl();\n init();\n });\n\n function refreshFilterQueryFromUrl() {\n status = UrlService.readValue('status');\n\n if(!_.isUndefined(status)) {\n status = status.split(',');\n status = _.transform(status, function(result, state) {\n state = TransStatusService.getServerId(state);\n return result.push(state);\n });\n }\n filter = {\n 'status': status\n };\n }\n\n\n $rootScope.$on(EventService.EVENT.GOTO_FIRST_PAGE,\n function () {\n if(EditorService.currentPageIndex > 0) {\n EditorService.currentPageIndex = 0;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_PREV_PAGE,\n function () {\n if(EditorService.currentPageIndex > 0) {\n EditorService.currentPageIndex -= 1;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_PAGE,\n function () {\n if(EditorService.currentPageIndex < EditorService.maxPageIndex) {\n EditorService.currentPageIndex +=1;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_LAST_PAGE,\n function () {\n if(EditorService.currentPageIndex < EditorService.maxPageIndex) {\n EditorService.currentPageIndex = EditorService.maxPageIndex;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n /*\n TODO: after moving to infinite scroll, all these go to event handler\n should move back to TransUnitService and use PhraseService.findNextId etc\n */\n // EventService.EVENT.GOTO_NEXT_ROW listener\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_ROW, goToNextRow);\n\n // EventService.EVENT.GOTO_PREVIOUS_ROW listener\n $rootScope.$on(EventService.EVENT.GOTO_PREVIOUS_ROW, goToPreviousRow);\n\n // EventService.EVENT.GOTO_NEXT_UNTRANSLATED listener\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_UNTRANSLATED,\n goToNextUntranslated);\n\n function goToNextRow(event, data) {\n var phrases = editorContentCtrl.phrases,\n phrase,\n currentIndex,\n nextIndex,\n nextId;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n nextIndex = Math.min(currentIndex + 1, phrases.length - 1);\n nextId = phrases[nextIndex].id;\n\n if (nextId !== data.currentId) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': nextId,\n 'updateURL': true,\n 'focus': true\n }, null);\n } else {\n // we have reach the end\n phrase = phrases[currentIndex];\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n function goToPreviousRow(event, data) {\n var phrases = editorContentCtrl.phrases,\n phrase,\n currentIndex,\n previousIndex,\n prevId;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n previousIndex = Math.max(currentIndex - 1, 0);\n prevId = phrases[previousIndex].id;\n\n if (prevId !== data.currentId) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': prevId,\n 'updateURL': true,\n 'focus': true\n }, null);\n } else {\n phrase = phrases[currentIndex];\n // have reach the start\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n function goToNextUntranslated(event, data) {\n var phrases = editorContentCtrl.phrases,\n requestStatus = TransStatusService.getStatusInfo(status),\n currentIndex,\n nextStatusInfo;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n\n for (var i = currentIndex + 1; i < phrases.length; i++) {\n nextStatusInfo = TransStatusService.getStatusInfo(\n phrases[i].state);\n if (nextStatusInfo.ID === requestStatus.ID) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': phrases[i].id,\n 'updateURL': true,\n 'focus': true\n }, null);\n return;\n }\n }\n // can not find next untranslated\n //TransUnitService.saveCurrentRowIfModifiedAndUnfocus(data);\n }\n\n function changePage(pageIndex) {\n loadPhrase(pageIndex);\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT);\n }\n\n /**\n * Load transUnit\n *\n * @param projectSlug\n * @param versionSlug\n * @param docId\n * @param localeId\n */\n function init() {\n EventService.emitEvent(EventService.EVENT.REFRESH_STATISTIC,\n {\n projectSlug: EditorService.context.projectSlug,\n versionSlug: EditorService.context.versionSlug,\n docId: EditorService.context.docId,\n localeId: EditorService.context.localeId\n }\n );\n\n PhraseService.getPhraseCount(EditorService.context, filter).\n then(function(count) {\n EditorService.maxPageIndex = parseInt(count / COUNT_PER_PAGE);\n if(count > COUNT_PER_PAGE) {\n EditorService.maxPageIndex = count % COUNT_PER_PAGE !== 0 ?\n EditorService.maxPageIndex +=1 : EditorService.maxPageIndex;\n }\n\n EditorService.maxPageIndex = EditorService.maxPageIndex -1 < 0 ? 0 :\n EditorService.maxPageIndex -1;\n\n loadPhrase(EditorService.currentPageIndex);\n });\n }\n\n function loadPhrase(pageIndex) {\n var startIndex = pageIndex * COUNT_PER_PAGE;\n PhraseService.fetchAllPhrase(EditorService.context, filter,\n startIndex, COUNT_PER_PAGE).then(displayPhrases);\n }\n\n function displayPhrases(phrases) {\n editorContentCtrl.phrases = phrases;\n }\n\n return editorContentCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorContentCtrl', EditorContentCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * EditorCtrl.js\n * @ngInject\n */\n function EditorCtrl($scope, UserService, DocumentService, LocaleService,\n ProjectService, EditorService, StatisticUtil,\n UrlService, $stateParams, $state, MessageHandler, $rootScope,\n EventService, EditorShortcuts, _, Mousetrap) {\n var editorCtrl = this;\n editorCtrl.pageNumber = 1;\n editorCtrl.showCheatsheet = false;\n editorCtrl.shortcuts = _.mapValues(\n _.values(EditorShortcuts.SHORTCUTS), function(shortcutInfo) {\n // second combo (secondary keys) is an array. We have to flatten it\n var keyCombos = _.flatten(shortcutInfo.keyCombos, 'combo');\n return {\n combos: _.map(keyCombos, function(key) {\n return EditorShortcuts.symbolizeKey(key);\n }),\n description: shortcutInfo.keyCombos[0].description\n };\n });\n\n //tu status to include for display\n editorCtrl.filter = {\n 'status' : {\n 'all': true,\n 'approved' : false,\n 'translated' : false,\n 'needsWork': false,\n 'untranslated': false\n }\n };\n\n processFilterQuery();\n\n //This is just processing UI during startup,\n //phrase filtering are done in EditorContentCtrl during init\n function processFilterQuery() {\n //process filter query\n var status = UrlService.readValue('status');\n\n if(!_.isUndefined(status)) {\n status = status.split(',');\n _.forEach(status, function(val) {\n if(!_.isUndefined(editorCtrl.filter.status[val])) {\n editorCtrl.filter.status[val] = true;\n }\n });\n updateFilter();\n }\n }\n\n Mousetrap.bind('?', function(event) {\n var srcElement = event.srcElement;\n if (!editorCtrl.showCheatsheet && !stopCheatsheetCallback(srcElement)) {\n editorCtrl.toggleKeyboardShortcutsModal();\n $scope.$digest();\n }\n }, 'keyup');\n\n /**\n * Mousetrap by default stops callback on input elements BUT\n * hotkeys monkey patched it!!!\n * TODO change this hack once we remove angular hotkeys\n */\n function stopCheatsheetCallback(element) {\n // if the element has the class \"mousetrap\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n // stop for input, select, and textarea\n return element.tagName === 'INPUT' || element.tagName === 'SELECT' ||\n element.tagName === 'TEXTAREA' || element.isContentEditable;\n }\n\n //TODO: cross domain rest\n //TODO: Unit test\n\n //Working URL: http://localhost:8000/#/tiny-project/1/translate or\n // http://localhost:8000/#/tiny-project/1/translate/hello.txt/fr\n editorCtrl.context = EditorService.initContext($stateParams.projectSlug,\n $stateParams.versionSlug, DocumentService.decodeDocId($stateParams.docId),\n LocaleService.DEFAULT_LOCALE, LocaleService.DEFAULT_LOCALE.localeId,\n 'READ_WRITE');\n\n editorCtrl.toggleKeyboardShortcutsModal = function() {\n editorCtrl.showCheatsheet = !editorCtrl.showCheatsheet;\n };\n\n editorCtrl.versionPage = function() {\n return UrlService.PROJECT_PAGE(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug);\n };\n\n editorCtrl.encodeDocId = function(docId) {\n return DocumentService.encodeDocId(docId);\n };\n\n ProjectService.getProjectInfo($stateParams.projectSlug).then(\n function(projectInfo) {\n editorCtrl.projectInfo = projectInfo;\n },\n function(error) {\n MessageHandler.displayError('Error getting project ' +\n 'information:' + error);\n });\n\n LocaleService.getSupportedLocales(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug).then(\n function(locales) {\n editorCtrl.locales = locales;\n if (!editorCtrl.locales || editorCtrl.locales.length <= 0) {\n //redirect if no supported locale in version\n MessageHandler.displayError('No supported locales in ' +\n editorCtrl.context.projectSlug + ' : ' +\n editorCtrl.context.versionSlug);\n } else {\n //if localeId is not defined in url, set to first from list\n var selectedLocaleId = $state.params.localeId;\n var context = editorCtrl.context;\n\n if (!selectedLocaleId) {\n context.localeId = editorCtrl.locales[0].localeId;\n transitionToEditorSelectedView();\n } else {\n context.localeId = selectedLocaleId;\n if (!LocaleService.containsLocale(editorCtrl.locales,\n selectedLocaleId)) {\n context.localeId = editorCtrl.locales[0].localeId;\n }\n }\n }\n }, function(error) {\n MessageHandler.displayError('Error getting locale list: ' + error);\n });\n\n DocumentService.findAll(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug).then(\n function(documents) {\n editorCtrl.documents = documents;\n\n if (!editorCtrl.documents || editorCtrl.documents.length <= 0) {\n //redirect if no documents in version\n MessageHandler.displayError('No documents in ' +\n editorCtrl.context.projectSlug + ' : ' +\n editorCtrl.context.versionSlug);\n } else {\n //if docId is not defined in url, set to first from list\n var selectedDocId = $state.params.docId,\n context = editorCtrl.context;\n if (!selectedDocId) {\n context.docId = editorCtrl.documents[0].name;\n transitionToEditorSelectedView();\n } else {\n context.docId = DocumentService.decodeDocId(selectedDocId);\n if (!DocumentService.containsDoc(editorCtrl.documents,\n context.docId)) {\n context.docId = editorCtrl.documents[0].name;\n }\n }\n }\n }, function(error) {\n MessageHandler.displayError('Error getting document list: ' + error);\n });\n\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n editorCtrl.unitSelected = data.id;\n editorCtrl.focused = data.focus;\n });\n\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function () {\n editorCtrl.unitSelected = false;\n editorCtrl.focused = false;\n });\n\n $rootScope.$on(EventService.EVENT.REFRESH_STATISTIC,\n function (event, data) {\n\n loadStatistic(data.projectSlug, data.versionSlug, data.docId,\n data.localeId);\n\n editorCtrl.context.docId = data.docId;\n editorCtrl.context.localeId = data.localeId;\n });\n\n editorCtrl.pageNumber = function() {\n if(EditorService.maxPageIndex === 0) {\n return EditorService.currentPageIndex + 1;\n } else {\n return (EditorService.currentPageIndex + 1) + ' of ' +\n (EditorService.maxPageIndex + 1);\n }\n };\n\n editorCtrl.getLocaleName = function(localeId) {\n return LocaleService.getName(localeId);\n };\n\n editorCtrl.firstPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_FIRST_PAGE);\n };\n\n editorCtrl.lastPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_LAST_PAGE);\n };\n\n\n editorCtrl.nextPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_PAGE);\n };\n\n editorCtrl.previousPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_PREV_PAGE);\n };\n\n editorCtrl.resetFilter = function() {\n resetFilter(true);\n };\n\n editorCtrl.updateFilter = function() {\n updateFilter(true);\n };\n\n function updateFilter(fireEvent) {\n if(isStatusSame(editorCtrl.filter.status)) {\n resetFilter(fireEvent);\n } else {\n editorCtrl.filter.status.all = false;\n if(fireEvent) {\n EventService.emitEvent(EventService.EVENT.FILTER_TRANS_UNIT,\n editorCtrl.filter);\n }\n }\n }\n\n function resetFilter(fireEvent) {\n editorCtrl.filter.status.all = true;\n editorCtrl.filter.status.approved = false;\n editorCtrl.filter.status.translated = false;\n editorCtrl.filter.status.needsWork = false;\n editorCtrl.filter.status.untranslated = false;\n\n if(fireEvent) {\n EventService.emitEvent(EventService.EVENT.FILTER_TRANS_UNIT,\n editorCtrl.filter);\n }\n }\n\n function isStatusSame(statuses) {\n return statuses.approved === statuses.translated &&\n statuses.translated === statuses.needsWork &&\n statuses.needsWork === statuses.untranslated;\n }\n\n function transitionToEditorSelectedView() {\n if (isDocumentAndLocaleSelected()) {\n $state.go('editor.selectedContext', {\n 'docId': editorCtrl.context.docId,\n 'localeId': editorCtrl.context.localeId\n });\n }\n }\n\n function isDocumentAndLocaleSelected() {\n return editorCtrl.context.docId && editorCtrl.context.localeId;\n }\n\n /**\n * Load document statistics (word and message)\n *\n * @param projectSlug\n * @param versionSlug\n * @param docId\n * @param localeId\n */\n function loadStatistic(projectSlug, versionSlug, docId, localeId) {\n DocumentService.getStatistics(projectSlug, versionSlug, docId, localeId)\n .then(function(statistics) {\n editorCtrl.wordStatistic = StatisticUtil\n .getWordStatistic(statistics);\n editorCtrl.messageStatistic = StatisticUtil\n .getMsgStatistic(statistics);\n },\n function(error) {\n MessageHandler.displayError('Error loading statistic: ' + error);\n });\n }\n\n this.settings = UserService.settings.editor;\n\n EditorShortcuts.enableEditorKeys();\n }\n\n angular\n .module('app')\n .controller('EditorCtrl', EditorCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * EditorDetailsCtrl.js\n * @ngInject\n */\n function EditorDetailsCtrl() {\n var editorDetailsCtrl = this;\n\n return editorDetailsCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorDetailsCtrl', EditorDetailsCtrl);\n})();\n","(function () {\n 'use strict';\n\n /**\n * EditorService.js\n * //TODO: parse editorContext in functions\n * @ngInject\n */\n function EditorService($rootScope, $resource, _, UrlService,\n EventService, PhraseService, PhraseUtil, DocumentService, MessageHandler,\n TransStatusService) {\n var editorService = this,\n queue = {};\n\n editorService.context = {};\n\n editorService.currentPageIndex = 0;\n editorService.maxPageIndex = 0;\n\n editorService.initContext =\n function (projectSlug, versionSlug, docId, srcLocale, localeId, mode) {\n editorService.context = {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: docId,\n srcLocale: srcLocale,\n localeId: localeId,\n mode: mode // READ_WRITE, READ_ONLY, REVIEW\n };\n return editorService.context;\n };\n\n editorService.updateContext = function(projectSlug, versionSlug, docId,\n localeId) {\n if(editorService.context.projectSlug !== projectSlug) {\n editorService.context.projectSlug = projectSlug;\n }\n if(editorService.context.versionSlug !== versionSlug) {\n editorService.context.versionSlug = versionSlug;\n }\n if(editorService.context.docId !== docId) {\n editorService.context.docId = docId;\n }\n if(editorService.context.localeId !== localeId) {\n editorService.context.localeId = localeId;\n }\n };\n\n /**\n * EventService.EVENT.SAVE_TRANSLATION listener\n * Perform save translation with given status\n *\n * - queue save translation request (1 global queue, 1 for each TU)\n * - if queue contains request id, replace old request with new request\n */\n $rootScope.$on(EventService.EVENT.SAVE_TRANSLATION,\n function (event, data) {\n var phrase = data.phrase,\n status = data.status;\n if (!needToSavePhrase(phrase, status)) {\n // nothing has changed\n return;\n }\n\n //update pending queue if contains\n if (_.has(queue, phrase.id)) {\n var pendingRequest = queue[phrase.id];\n pendingRequest.phrase = phrase;\n pendingRequest.status = status;\n } else {\n status = resolveTranslationState(phrase, status);\n queue[phrase.id] = {\n 'phrase': phrase,\n 'status': status,\n 'locale': data.locale,\n 'docId': data.docId\n };\n }\n EventService.emitEvent(EventService.EVENT.SAVE_INITIATED, data);\n processSaveRequest(phrase.id);\n });\n\n function needToSavePhrase(phrase, status) {\n return PhraseUtil.hasTranslationChanged(phrase) ||\n phrase.status !== status;\n }\n\n // Process save translation request\n function processSaveRequest(id) {\n var context = _.cloneDeep(editorService.context);\n\n var request = queue[id];\n\n var Translation = $resource(UrlService.TRANSLATION_URL, {}, {\n update: {\n method: 'PUT',\n params: {\n localeId: request.locale\n }\n }\n });\n var data = {\n id: request.phrase.id,\n revision: request.phrase.revision || 0,\n content: request.phrase.newTranslations[0],\n contents: request.phrase.newTranslations,\n // Return status object to PascalCase Id for the server\n status: TransStatusService.getServerId(request.status.ID),\n plural: request.phrase.plural\n };\n\n Translation.update(data).$promise.then(\n function(response) {\n var oldStatus = request.phrase.status.ID;\n\n PhraseService.onTransUnitUpdated(context, data.id, request.locale,\n response.revision, response.status, request.phrase);\n\n DocumentService.updateStatistic(context.projectSlug,\n context.versionSlug, request.docId, request.locale,\n oldStatus, TransStatusService.getId(response.status),\n request.phrase.wordCount);\n\n EventService.emitEvent(EventService.EVENT.SAVE_COMPLETED,\n request.phrase);\n },\n function(response) {\n MessageHandler.displayWarning('Update translation failed for ' +\n data.id + ' -' + response);\n PhraseService.onTransUnitUpdateFailed(data.id);\n EventService.emitEvent(EventService.EVENT.SAVE_COMPLETED,\n request.phrase);\n });\n delete queue[id];\n }\n\n function resolveTranslationState(phrase, requestStatus) {\n if (_.isEmpty(_.compact(phrase.newTranslations))) {\n return TransStatusService.getStatusInfo('UNTRANSLATED');\n }\n return requestStatus;\n }\n\n return editorService;\n }\n\n angular\n .module('app')\n .factory('EditorService', EditorService);\n\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * @name EditorShortcuts\n * @description service for editor keyboard shortcuts\n * @ngInject\n */\n function EditorShortcuts(EventService, $stateParams, _, hotkeys, PhraseUtil,\n TransStatusService, Mousetrap, str, $window) {\n var editorShortcuts = this,\n inSaveAsMode = false;\n\n // this will be set by TransUnitService\n // on EVENT.SELECT_TRANS_UNIT and unset on EVENT.CANCEL_EDIT\n editorShortcuts.selectedTUCtrl = null;\n\n function copySourceCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n {'phrase': editorShortcuts.selectedTUCtrl.getPhrase()});\n }\n }\n\n function gotoNextRowCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n event.stopPropagation();\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_ROW,\n currentContext());\n }\n }\n\n function gotoPreviousRowCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n event.stopPropagation();\n EventService.emitEvent(EventService.EVENT.GOTO_PREVIOUS_ROW,\n currentContext());\n }\n }\n\n function cancelEditCallback(event) {\n event.preventDefault();\n event.stopPropagation();\n if (inSaveAsMode) {\n editorShortcuts.cancelSaveAsModeIfOn();\n if (editorShortcuts.selectedTUCtrl) {\n editorShortcuts.selectedTUCtrl.focusTranslation();\n }\n } else if (editorShortcuts.selectedTUCtrl) {\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n if (PhraseUtil.hasTranslationChanged(phrase)) {\n // if it has changed translation, undo edit\n EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n phrase);\n } else {\n // otherwise cancel edit\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n phrase);\n }\n }\n }\n\n function saveAsCurrentButtonOptionCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n /**\n * This is to mimic sequence shortcut.\n * e.g. press ctlr-shift-s then press 'n' to save as\n * 'needs work'.\n */\n function saveAsModeCallback(event) {\n event.preventDefault();\n editorShortcuts.cancelSaveAsModeIfOn();\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n if (phrase) {\n EventService.emitEvent(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n {\n 'id': phrase.id,\n 'open': true\n });\n\n addSaveAsModeExtensionKey(phrase, 'n', 'needsWork');\n addSaveAsModeExtensionKey(phrase, 't', 'translated');\n addSaveAsModeExtensionKey(phrase, 'a', 'approved');\n }\n }\n\n /**\n * mod will be replaced by ctrl if on windows/linux or cmd if on mac.\n * By default it listens on keydown event.\n */\n editorShortcuts.SHORTCUTS = {\n COPY_SOURCE: new ShortcutInfo(\n 'alt+c', copySourceCallback, 'Copy source as translation', 'alt+g'),\n\n CANCEL_EDIT: new ShortcutInfo('esc', cancelEditCallback, 'Cancel edit'),\n\n SAVE_AS_CURRENT_BUTTON_OPTION: new ShortcutInfo(\n 'mod+s', saveAsCurrentButtonOptionCallback, 'Save'),\n\n SAVE_AS_MODE: new ShortcutInfo(\n 'mod+shift+s', saveAsModeCallback, 'Save as…'),\n\n // this is just so we can show it in cheatsheet.\n // see app/editor/EditorCtrl.shortcuts\n SAVE_AS_NEEDSWORK: {\n keyCombos: [{combo: 'mod+shift+s n', description: 'Save as needs work'}]\n },\n\n SAVE_AS_TRANSLATED: {\n keyCombos: [{combo: 'mod+shift+s t', description: 'Save as translated'}]\n },\n\n SAVE_AS_APPROVED: {\n keyCombos: [{combo: 'mod+shift+s a', description: 'Save as approved'}]\n },\n\n GOTO_NEXT_ROW_FAST: new ShortcutInfo(\n 'mod+enter', gotoNextRowCallback,\n 'Save (if changed) and go to next string',\n ['alt+k', 'alt+down']),\n\n GOTO_PREVIOUS_ROW: new ShortcutInfo(\n 'mod+shift+enter', gotoPreviousRowCallback,\n 'Save (if changed) and go to previous string',\n ['alt+j', 'alt+up'])\n /*\n Disable for now until status navigation implementation\n GOTO_NEXT_UNTRANSLATED: new ShortcutInfo(\n 'tab+u', gotoToNextUntranslatedCallback)\n */\n };\n\n /*\n Disable for now until status navigation implementation\n\n function gotoToNextUntranslatedCallback(event) {\n event.preventDefault();\n event.stopPropagation();\n if (editorShortcuts.selectedTUCtrl) {\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_UNTRANSLATED,\n currentContext());\n }\n // the shortcut is a tab + u combination\n // we don't want other tab event to trigger\n tabCombinationPressed = true;\n }\n */\n\n /**\n *\n * @param {string} defaultKey default key combo for a shortcut\n * @param {function} callback callback to execute\n * @param {string} [description]\n * optional. If not empty will apply to default key (shows in cheatsheet)\n * @param {(string|string[])} [otherKeys]\n * optional other keys that will do the same (won't show in cheatsheet)\n * @param {string} [action] optional event to listen to. e.g. 'keyup'\n * @returns {EditorShortcuts.ShortcutInfo}\n * @constructor\n */\n function ShortcutInfo(defaultKey, callback, description, otherKeys, action)\n {\n this.defaultKey = defaultKey;\n this.keyCombos = [\n singleKeyConfig(defaultKey, description, action, callback)\n ];\n if (otherKeys) {\n this.otherKeys = otherKeys instanceof Array ? otherKeys : [otherKeys];\n this.keyCombos.push(\n singleKeyConfig(this.otherKeys, '', action, callback));\n }\n return this;\n }\n\n function singleKeyConfig(combo, description, action, callback) {\n var keyConfig = {\n allowIn: ['TEXTAREA'],\n callback: callback\n };\n keyConfig.combo = combo;\n if (description) {\n keyConfig.description = description;\n }\n if (action) {\n keyConfig.action = action;\n }\n return keyConfig;\n }\n\n editorShortcuts.enableEditorKeys = function () {\n // here we only check copy source shortcut since we always enable keys in\n // bundle.\n if (!hotkeys.get(editorShortcuts.SHORTCUTS.COPY_SOURCE.defaultKey)) {\n _.forOwn(editorShortcuts.SHORTCUTS, function(value) {\n if (value instanceof ShortcutInfo) { // a hack to handle sequence keys\n enableShortcut(value);\n }\n });\n }\n };\n\n editorShortcuts.disableEditorKeys = function () {\n _.forOwn(editorShortcuts.SHORTCUTS, function(value) {\n _.forEach(value.keyCombos, function(hotkey) {\n editorShortcuts.deleteKeys(hotkey.combo, hotkey.action);\n });\n });\n };\n\n function enableShortcut(shortcutInfo) {\n if (!hotkeys.get(shortcutInfo.defaultKey)) {\n _.forEach(shortcutInfo.keyCombos,\n function(combo) {\n hotkeys.add(combo);\n });\n }\n }\n\n function currentContext() {\n return {\n 'currentId': editorShortcuts.selectedTUCtrl.getPhrase().id\n };\n }\n\n function addSaveAsModeExtensionKey(phrase, combo, status) {\n var statusInfo = TransStatusService.getStatusInfo(status);\n return hotkeys.add({\n combo: combo,\n description: str.sprintf('Save as %s', status),\n allowIn: ['INPUT', 'TEXTAREA'],\n action: 'keydown',\n callback: function (event) {\n editorShortcuts.saveTranslationCallBack(event, phrase, statusInfo);\n }\n });\n }\n\n editorShortcuts.saveTranslationCallBack = function(event, phrase,\n statusInfo) {\n inSaveAsMode = true;\n\n event.preventDefault();\n event.stopPropagation();\n\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': statusInfo,\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n editorShortcuts.cancelSaveAsModeIfOn();\n };\n\n editorShortcuts.cancelSaveAsModeIfOn = function() {\n if (inSaveAsMode && editorShortcuts.selectedTUCtrl) {\n inSaveAsMode = false;\n editorShortcuts.deleteKeys(['n', 't', 'a']);\n EventService.emitEvent(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n {\n 'id': editorShortcuts.selectedTUCtrl.getPhrase().id,\n 'open': false\n });\n }\n };\n\n /**\n * This is a workaround for augular-hotkeys not being able to delete hotkey.\n * @see https://github.com/chieffancypants/angular-hotkeys/issues/100\n *\n * @param {(string|string[])} keys single key or array of keys to be deleted\n * @param {string} [action='keydown'] 'keyup' or 'keydown' etc.\n */\n editorShortcuts.deleteKeys = function(keys, action) {\n var keysToDelete = keys instanceof Array ? keys : [keys];\n action = action || 'keydown';\n _.forEach(keysToDelete, function(key) {\n hotkeys.del(key);\n Mousetrap.unbind(key, action);\n });\n };\n\n /**\n * Copied from angular-hotkeys.\n * Convert strings like cmd into symbols like ⌘\n * @param {String} combo Key combination, e.g. 'mod+f'\n * @return {String} The key combination with symbols\n */\n editorShortcuts.symbolizeKey = function (combo) {\n var map = {\n command: '⌘',\n shift: '⇧',\n left: '←',\n right: '→',\n up: '↑',\n down: '↓',\n 'return': '↩',\n backspace: '⌫'\n };\n combo = combo.split('+');\n\n for (var i = 0; i < combo.length; i++) {\n // try to resolve command / ctrl based on OS:\n if (combo[i] === 'mod') {\n if ($window.navigator &&\n $window.navigator.platform.indexOf('Mac') >= 0) {\n combo[i] = 'command';\n } else {\n combo[i] = 'ctrl';\n }\n }\n\n combo[i] = map[combo[i]] || combo[i];\n }\n\n return combo.join(' + ');\n };\n\n return editorShortcuts;\n }\n\n angular\n .module('app')\n .factory('EditorShortcuts', EditorShortcuts);\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * EditorSuggestionsCtrl.js\n * @ngInject\n */\n function EditorSuggestionsCtrl() {\n var editorSuggestionsCtrl = this;\n\n return editorSuggestionsCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorSuggestionsCtrl', EditorSuggestionsCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name blur-on\n * @description When you put attribute 'blur-on=\"something\"',\n * you can then blur this element. It works the same way as focus-on library.\n */\n function blurOn() {\n return {\n restrict: 'A',\n link: function(scope, elem, attr) {\n return scope.$on('blurOn', function (e, name) {\n if (name === attr.blurOn) {\n return elem[0].blur();\n }\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('blurOn', blurOn);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name clickElsewhere\n * @description Initiate expression when clicking somewhere else\n * @ngInject\n */\n function clickElsewhere($document) {\n return {\n restrict: 'A',\n scope: {\n callback: '&clickElsewhere'\n },\n link: function(scope, element) {\n var handler = function(e) {\n if (!element[0].contains(e.target)) {\n scope.$apply(scope.callback(e));\n }\n };\n\n $document.on('click', handler);\n\n scope.$on('$destroy', function() {\n $document.off('click', handler);\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('clickElsewhere', clickElsewhere);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle server communication on document related\n * information in project-version.\n *\n * DocumentService.js\n * @ngInject\n */\n function DocumentService($q, $resource, UrlService, StringUtil,\n StatisticUtil, EventService, _, TransStatusService) {\n var documentService = this,\n statisticMap = {};\n\n /**\n * Finds all documents in given project version\n *\n * @param _projectSlug\n * @param _versionSlug\n * @returns {$promise|*|N.$promise}\n */\n documentService.findAll = function findAll(_projectSlug, _versionSlug) {\n var Documents = $resource(UrlService.DOCUMENT_LIST_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: _projectSlug,\n versionSlug: _versionSlug\n },\n isArray: true\n }\n });\n return Documents.query().$promise;\n };\n\n /**\n * Get statistic of document in locale (word and message)\n *\n * @param _projectSlug\n * @param _versionSlug\n * @param _docId\n * @param _localeId\n * @returns {*}\n */\n documentService.getStatistics = function (_projectSlug, _versionSlug,\n _docId, _localeId) {\n if (_docId && _localeId) {\n var key = generateStatisticKey(_docId, _localeId);\n if (_.has(statisticMap, key)) {\n return $q.when(statisticMap[key]);\n } else {\n var encodedDocId = documentService.encodeDocId(_docId);\n var Statistics = $resource(UrlService.DOC_STATISTIC_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: _projectSlug,\n versionSlug: _versionSlug,\n docId: encodedDocId,\n localeId: _localeId\n },\n isArray: true\n }\n });\n return Statistics.query().$promise.then(function(statistics) {\n\n // Make needReview(server) available to needswork\n _.forEach(statistics, function(statistic) {\n statistic[TransStatusService.getId('needswork')] =\n statistic.needReview || 0;\n });\n\n statisticMap[key] = statistics;\n return statisticMap[key];\n });\n }\n }\n };\n\n /**\n * Encode docId, replace '/' with ',' when REST call\n * @param docId\n * @returns {*}\n */\n documentService.encodeDocId = function(docId) {\n return docId ? docId.replace(/\\//g, ',') : docId;\n };\n\n /**\n * Encode docId, replace ',' with '/' when REST call\n * @param docId\n * @returns {*}\n */\n documentService.decodeDocId = function(docId) {\n return docId ? docId.replace(/\\,/g, '/') : docId;\n };\n\n documentService.containsDoc = function (documents, docId) {\n return _.any(documents, function(document) {\n return StringUtil.equals(document.name, docId, true);\n });\n };\n\n documentService.updateStatistic = function(projectSlug, versionSlug, docId,\n localeId, oldState,\n newState, wordCount) {\n var key = generateStatisticKey(docId, localeId);\n if(_.has(statisticMap, key)) {\n adjustStatistic(statisticMap[key], oldState, newState,\n wordCount);\n\n EventService.emitEvent(EventService.EVENT.REFRESH_STATISTIC,\n {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: docId,\n localeId: localeId\n }\n );\n }\n };\n\n //Generate unique key from docId and localeId for statistic cache\n function generateStatisticKey(docId, localeId) {\n return docId + '-' + localeId;\n }\n\n /**\n * Adjust statistic based on translation change of state\n * word - -wordCount of oldState, +wordCount of newState\n * msg - -1 of oldState, +1 of newState\n */\n function adjustStatistic(statistics, oldState, newState, wordCount) {\n\n var wordStatistic = StatisticUtil.getWordStatistic(statistics),\n msgStatistic = StatisticUtil.getMsgStatistic(statistics);\n\n if(wordStatistic) {\n wordCount = parseInt(wordCount);\n var wordOldState = parseInt(wordStatistic[oldState]) - wordCount;\n wordStatistic[oldState] = wordOldState < 0 ? 0 : wordOldState;\n wordStatistic[newState] = parseInt(wordStatistic[newState]) + wordCount;\n }\n\n if(msgStatistic) {\n var msgOldState = parseInt(msgStatistic[oldState]) - 1;\n msgStatistic[oldState] = msgOldState < 0 ? 0 : msgOldState;\n msgStatistic[newState] = parseInt(msgStatistic[newState]) + 1;\n }\n }\n\n return documentService;\n }\n\n angular\n .module('app')\n .factory('DocumentService', DocumentService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name DropdownCtrl\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n function DropdownCtrl($scope, $attrs, $parse, dropdownConfig,\n DropdownService, $animate, $timeout) {\n var dropdownCtrl = this,\n // create a child scope so we are not polluting original one\n scope = $scope.$new(),\n openClass = dropdownConfig.openClass,\n getIsOpen,\n setIsOpen = angular.noop,\n toggleInvoker = $attrs.onToggle ?\n $parse($attrs.onToggle) : angular.noop;\n\n this.init = function(element) {\n dropdownCtrl.$element = element;\n\n if ($attrs.isOpen) {\n getIsOpen = $parse($attrs.isOpen);\n setIsOpen = getIsOpen.assign;\n\n $scope.$watch(getIsOpen, function(value) {\n scope.isOpen = !!value;\n });\n }\n };\n\n this.toggle = function(open) {\n scope.isOpen = arguments.length ? !!open : !scope.isOpen;\n return scope.isOpen;\n };\n\n // Allow other directives to watch status\n this.isOpen = function() {\n return scope.isOpen;\n };\n\n scope.getToggleElement = function() {\n return dropdownCtrl.toggleElement;\n };\n\n scope.focusToggleElement = function() {\n if (dropdownCtrl.toggleElement) {\n dropdownCtrl.toggleElement[0].focus();\n }\n };\n\n scope.$watch('isOpen', function(isOpen, wasOpen) {\n $animate[isOpen ? 'addClass' : 'removeClass']\n (dropdownCtrl.$element, openClass);\n\n if (isOpen) {\n // need to wrap it in a timeout\n // see http://stackoverflow.com/questions/12729122/\n // prevent-error-digest-already-in-progress-when-calling-scope-apply\n $timeout(function() {\n scope.focusToggleElement();\n });\n DropdownService.open(scope);\n } else {\n DropdownService.close(scope);\n }\n\n setIsOpen($scope, isOpen);\n if (angular.isDefined(isOpen) && isOpen !== wasOpen) {\n toggleInvoker($scope, {\n open: !!isOpen\n });\n }\n });\n\n $scope.$on('$locationChangeSuccess', function() {\n scope.isOpen = false;\n });\n\n $scope.$on('$destroy', function() {\n scope.$destroy();\n });\n\n $scope.$on('openDropdown', function() {\n scope.isOpen = true;\n });\n\n $scope.$on('closeDropdown', function() {\n scope.isOpen = false;\n });\n }\n\n angular\n .module('app')\n .controller('DropdownCtrl', DropdownCtrl);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name dropdownService\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n\n function DropdownService($document) {\n var openScope = null,\n dropdownService = this;\n\n dropdownService.open = function(dropdownScope) {\n if (!openScope) {\n $document.bind('click', closeDropdown);\n $document.bind('keydown', escapeKeyBind);\n }\n\n if (openScope && openScope !== dropdownScope) {\n openScope.isOpen = false;\n }\n\n openScope = dropdownScope;\n };\n\n dropdownService.close = function(dropdownScope) {\n if (openScope === dropdownScope) {\n openScope = null;\n $document.unbind('click', closeDropdown);\n $document.unbind('keydown', escapeKeyBind);\n }\n };\n\n var closeDropdown = function(evt) {\n if (!openScope) {\n return;\n }\n var toggleElement = openScope.getToggleElement();\n if (evt && toggleElement && toggleElement[0].contains(evt.target)) {\n return;\n }\n\n openScope.$apply(function() {\n openScope.isOpen = false;\n });\n };\n\n var escapeKeyBind = function(evt) {\n if (evt.which === 27) {\n openScope.focusToggleElement();\n closeDropdown();\n }\n };\n }\n\n angular\n .module('app')\n .service('DropdownService', DropdownService);\n\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @name Dropdown\n *\n * @description\n * Custom module for dropdowns\n *\n */\n var dropdownConfig = {\n openClass: 'is-active'\n };\n\n angular\n .module('app')\n .constant('dropdownConfig', dropdownConfig);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name dropdown\n *\n * @description\n * Main dropdown container\n *\n */\n\n function dropdown() {\n return {\n restrict: 'EA',\n controller: 'DropdownCtrl',\n link: function(scope, element, attrs, dropdownCtrl) {\n dropdownCtrl.init(element);\n }\n };\n }\n\n function onCloseDropdown() {\n return {\n restrict: 'A',\n require: '?^dropdown',\n scope: {\n callback: '&onCloseDropdown'\n },\n link: function(scope, elem, attrs, dropdownCtrl) {\n dropdownCtrl.onCloseDropdown = scope.callback;\n }\n };\n }\n\n /**\n * @name dropdown-toggle\n *\n * @description\n * Main dropdown toggle\n *\n */\n\n function dropdownToggle() {\n return {\n restrict: 'EA',\n require: '?^dropdown',\n link: function(scope, element, attrs, dropdownCtrl) {\n if (!dropdownCtrl) {\n return;\n }\n\n dropdownCtrl.toggleElement = element;\n\n var toggleDropdown = function(event) {\n event.preventDefault();\n event.stopPropagation();\n\n if (!element.hasClass('disabled') && !attrs.disabled) {\n scope.$apply(function() {\n dropdownCtrl.toggle();\n });\n }\n };\n\n element.bind('click', toggleDropdown);\n\n // WAI-ARIA\n element.attr({\n 'aria-haspopup': true,\n 'aria-expanded': false\n });\n scope.$watch(dropdownCtrl.isOpen, function(isOpen) {\n element.attr('aria-expanded', !!isOpen);\n if (dropdownCtrl.onCloseDropdown && !isOpen) {\n scope.$applyAsync(dropdownCtrl.onCloseDropdown);\n }\n });\n\n scope.$on('$destroy', function() {\n element.unbind('click', toggleDropdown);\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('dropdown', dropdown)\n .directive('onCloseDropdown', onCloseDropdown)\n .directive('dropdownToggle', dropdownToggle);\n\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * EventService.js\n * Broadcast events service in app.\n * Usage: EventService.emitEvent( event, data, scope)\n * See EventService.emitEvent\n *\n * @ngInject\n */\n function EventService($rootScope) {\n var eventService = this;\n eventService.EVENT = {\n /**\n * Loading Events\n *\n * Broadcast from AppConfig\n */\n LOADING_START: 'loadingStart',\n LOADING_STOP: 'loadingStop',\n\n /**\n * scroll to trans unit\n * data: {id: number, updateURL: boolean, focus: boolean}\n * id: (transunit id),\n * updateURL: (flag on whether to update url with trans unit id)\n * focus: flag on whether to have row in view and focused\n */\n SELECT_TRANS_UNIT: 'selectTransUnit',\n\n //data: {phrase: Phrase, sourceIndex:sourceIndex}\n COPY_FROM_SOURCE: 'copyFromSource',\n\n //data: {phrase: Phrase}\n UNDO_EDIT: 'undoEdit',\n\n //data: {phrase: Phrase}\n CANCEL_EDIT: 'cancelEdit',\n\n //data:phrase\n FOCUS_TRANSLATION: 'focusTranslation',\n\n /**\n * data: {\n * phrase: Phrase, status: StatusInfo, locale: string, docId: string\n * }\n * phrase:\n * status: Object. Request save state\n * locale: target locale\n * docId: docId\n */\n SAVE_TRANSLATION: 'saveTranslation',\n\n /**\n * Translation save in this editor is being sent to the server and\n * is waiting on a response.\n */\n SAVE_INITIATED: 'saveInitiated',\n\n /**\n * Translation save in this editor has been completed\n * (Server has responded with a success or error).\n */\n SAVE_COMPLETED: 'saveCompleted',\n\n /**\n * The text in the translation editor textbox has been edited and\n * not yet saved.\n */\n TRANSLATION_TEXT_MODIFIED: 'translationTextModified',\n\n /**\n * refresh ui statistic - changes in doc or locale\n *\n * data: {projectSlug: string, versionSlug: string,\n * docId: string, localeId: string}\n */\n REFRESH_STATISTIC: 'refreshStatistic',\n\n GOTO_PREV_PAGE: 'gotoPreviousPage',\n\n GOTO_NEXT_PAGE: 'gotoNextPage',\n\n GOTO_FIRST_PAGE: 'gotoFirstPage',\n\n GOTO_LAST_PAGE: 'gotoLastPage',\n\n /**\n * data: { currentId: number }\n */\n GOTO_NEXT_ROW: 'gotoNextRow',\n GOTO_PREVIOUS_ROW: 'gotoPreviousRow',\n GOTO_NEXT_UNTRANSLATED: 'gotoNextUntranslated',\n\n /**\n * Toggle save as options dropdown.\n * data: {id: number, open: boolean}\n */\n TOGGLE_SAVE_OPTIONS: 'openSaveOptions',\n\n\n /**\n * data: {filter: refer to editorCtrl.filter}\n */\n FILTER_TRANS_UNIT: 'filterTransUnit'\n };\n\n /**\n * Firing an event downwards of scope\n *\n * @param event - eventService.EVENT type\n * @param data - data for the event\n * @param scope - scope of event to to fire, $rootScope if empty\n */\n eventService.broadcastEvent = function(event, data, scope) {\n scope = scope || $rootScope;\n scope.$broadcast(event, data);\n };\n\n /**\n * Firing an event upwards of scope\n *\n * @param event - eventService.EVENT types\n * @param data - data for the event\n * @param scope - scope of event to to fire, $rootScope if empty\n */\n eventService.emitEvent = function(event, data, scope) {\n scope = scope || $rootScope;\n scope.$emit(event, data);\n };\n\n return eventService;\n }\n\n angular\n .module('app')\n .factory('EventService', EventService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name icon\n * @description declarative svg icons\n * @ngInject\n */\n function icon($sce) {\n return {\n restrict: 'E',\n required: ['name'],\n scope: {\n name: '@',\n title: '@',\n size: '@'\n },\n // templateUrl: 'components/icon/icon.html',\n link: function(scope, element) {\n var svg = '',\n titleHtml = '';\n\n element.addClass('Icon');\n\n if (scope.title) {\n titleHtml = '' + scope.title + '';\n }\n\n // Stupid hack to make svg work\n svg = '' +\n '' +\n '' +\n titleHtml +\n '';\n element.html($sce.trustAsHtml(svg));\n }\n };\n }\n\n angular\n .module('app')\n .directive('icon', icon);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle locales related information.\n *\n * LocaleService.js\n * @ngInject\n */\n function LocaleService(UrlService, StringUtil, FilterUtil, $resource, _) {\n\n var locales = [];\n\n /**\n * Get project-version supported locales\n * @param projectSlug\n * @param versionSlug\n * @returns {$promise|*}\n */\n function getSupportedLocales(projectSlug, versionSlug) {\n\n var Locales = $resource(UrlService.LOCALE_LIST_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug,\n versionSlug: versionSlug\n },\n isArray: true\n }\n });\n\n return Locales.query().$promise;\n }\n\n //Returns all locales supported in Zanata instance\n function getAllLocales() {\n var Locales = $resource(UrlService.ALL_LOCALE_URL, {}, {\n query: {\n method: 'GET',\n isArray: true\n }\n });\n return Locales.query().$promise.then(function(results) {\n locales = FilterUtil.cleanResourceList(results);\n });\n }\n\n function getUILocaleList() {\n var list = $resource(UrlService.uiTranslationListURL, {}, {\n query: {\n method: 'GET'\n }\n });\n\n return list.query().$promise;\n }\n\n function getLocaleByLocaleId(locales, localeId) {\n if(locales) {\n return _.find(locales, function(locale) {\n return StringUtil.equals(locale.localeId, localeId, true);\n });\n }\n }\n\n function containsLocale (locales, localeId) {\n return _.any(locales, function(locale) {\n return StringUtil.equals(locale.localeId, localeId, true);\n });\n }\n\n function getName(localeId) {\n var locale = getLocaleByLocaleId(locales, localeId);\n if(locale) {\n return locale.name;\n }\n return localeId;\n }\n\n return {\n getSupportedLocales : getSupportedLocales,\n getUILocaleList : getUILocaleList,\n getLocaleByLocaleId : getLocaleByLocaleId,\n getAllLocales : getAllLocales,\n containsLocale : containsLocale,\n getName : getName,\n DEFAULT_LOCALE: {\n 'localeId' : 'en-US',\n 'name' : 'English'\n }\n };\n }\n\n angular\n .module('app')\n .factory('LocaleService', LocaleService);\n})();\n","(function() {\n\n 'use strict';\n\n /**\n * @name logoLoader\n *\n * @description\n * Logo that is activated on global loading state\n *\n * @ngInject\n */\n function logoLoader(EventService) {\n return {\n restrict: 'EA',\n scope: {\n loading: '=',\n inverted: '='\n },\n link: function(scope) {\n scope.classes = '';\n\n scope.$on(EventService.EVENT.LOADING_START, function() {\n scope.classes += ' is-loading';\n });\n\n scope.$on(EventService.EVENT.LOADING_STOP, function() {\n scope.classes = scope.classes.replace('is-loading', '');\n });\n\n scope.$watch('inverted', function(newInverted) {\n if (newInverted) {\n scope.classes += ' LogoLoader--inverted';\n } else {\n scope.classes = scope.classes.replace('LogoLoader--inverted', '');\n }\n });\n },\n templateUrl: 'components/logo-loader/logo-loader.html'\n };\n }\n\n angular\n .module('app')\n .directive('logoLoader', logoLoader);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * MessageHandler.js\n * @ngInject\n */\n function MessageHandler() {\n return {\n displayError: function(msg) {\n console.error(msg);\n },\n displayWarning: function(msg) {\n console.warn(msg);\n },\n displayInfo: function(msg) {\n console.info(msg);\n }\n };\n }\n\n angular\n .module('app')\n .factory('MessageHandler', MessageHandler);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle notification in editor\n *\n * NotificationService.js\n * @ngInject\n */\n function NotificationService() {\n\n }\n\n angular\n .module('app')\n .factory('NotificationService', NotificationService);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * PhraseCache.js\n * Stores textflow, states in local cache.\n * TODO: use angular-data for storage\n * @ngInject\n */\n function PhraseCache($q, $resource, FilterUtil, UrlService, DocumentService,\n _) {\n var phraseCache = this,\n states = {}, //ids and states of all tu in order\n transUnits = {};\n\n phraseCache.getStates =\n function (projectSlug, versionSlug, documentId, localeId) {\n var key = generateKey(projectSlug, versionSlug, documentId, localeId);\n if (_.has(states, key)) {\n return $q.when(states[key]);\n } else {\n var encodedDocId = DocumentService.encodeDocId(documentId);\n var methods = {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: encodedDocId,\n localeId: localeId\n },\n isArray: true\n }\n },\n States = $resource(UrlService.TRANSLATION_STATUS_URL, {}, methods);\n return States.query().$promise.then(function (state) {\n state = FilterUtil.cleanResourceList(state);\n states[key] = state;\n return states[key];\n });\n }\n };\n\n phraseCache.getTransUnits = function (ids, localeId) {\n var results = {},\n missingTUId = [],\n missingLocaleTUId = [];\n ids.forEach(function (id) {\n if (_.has(transUnits, id)) {\n if(transUnits[id][localeId]) {\n results[id] = transUnits[id];\n } else {\n missingLocaleTUId.push(id);\n }\n } else {\n missingTUId.push(id);\n }\n });\n if (_.isEmpty(missingTUId) && _.isEmpty(missingLocaleTUId)) {\n return $q.when(results);\n }\n else {\n var TextFlows, Translations;\n if(!_.isEmpty(missingTUId)) {\n TextFlows = $resource(UrlService.TEXT_FLOWS_URL, {}, {\n query: {\n method: 'GET',\n params: {\n localeId: localeId,\n ids: missingTUId.join(',')\n }\n }\n });\n }\n if(!_.isEmpty(missingLocaleTUId)) {\n Translations = $resource(UrlService.TRANSLATION_URL, {}, {\n query: {\n method: 'GET',\n params: {\n localeId: localeId,\n ids: missingLocaleTUId.join(',')\n }\n }\n });\n }\n\n //need to create chain of promises\n if(TextFlows && Translations) {\n return TextFlows.query().$promise.then(updateCacheWithNewTU).\n then(Translations.query().$promise.then(updateCacheWithExistingTU));\n } else if(TextFlows) {\n return TextFlows.query().$promise.then(updateCacheWithNewTU);\n } else if(Translations) {\n return Translations.query().$promise.then(updateCacheWithExistingTU);\n }\n }\n\n function updateCacheWithExistingTU(newTransUnits) {\n newTransUnits = FilterUtil.cleanResourceMap(newTransUnits);\n for (var key in newTransUnits) {\n //push to cache\n transUnits[key][localeId] = newTransUnits[key][localeId];\n results[key] = transUnits[key]; //merge with results\n }\n return results;\n }\n\n function updateCacheWithNewTU(newTransUnits) {\n newTransUnits = FilterUtil.cleanResourceMap(newTransUnits);\n for (var key in newTransUnits) {\n transUnits[key] = newTransUnits[key]; //push to cache\n results[key] = transUnits[key]; //merge with results\n }\n return results;\n }\n };\n\n /**\n * On translation updated from server\n * @param id\n * @param localeId\n * @param revision\n * @param state\n * @param content\n * @param contents\n */\n phraseCache.onTransUnitUpdated =\n function (context, id, localeId, revision, status, phrase) {\n\n var key = generateKey(context.projectSlug, context.versionSlug,\n context.docId, localeId);\n\n var stateEntry = _.find(states[key], function(stateEntry) {\n return stateEntry.id === id;\n });\n //Update states cache\n if(stateEntry) {\n stateEntry.state = status;\n }\n\n //Update transUnits cache\n var translation = transUnits[id][localeId];\n if (!translation) {\n translation = {};\n }\n translation.revision = parseInt(revision);\n translation.state = status;\n translation.contents = phrase.newTranslations.slice();\n };\n\n function generateKey(projectId, versionId, documentId, localeId) {\n return projectId + '-' + versionId + '-' +\n documentId + '-' + localeId;\n }\n\n return phraseCache;\n }\n\n angular\n .module('app')\n .factory('PhraseCache', PhraseCache);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * @typedef {Object} Phrase\n * @property {number} id text flow id\n * @property {string[]} sources source contents\n * @property {string[]} translations original translation\n * @property {string[]} newTranslations translations in the editor\n * @property {boolean} plural whether it's in plural form\n * @property {StatusInfo} status information about this phrase\n * @property {number} revision translation revision number\n * @property {number} wordCount source word count\n */\n /**\n * @name PhraseService\n * @description Provides a list of phrases for the current document(s)\n *\n * @ngInject\n */\n function PhraseService(FilterUtil, PhraseCache, TransStatusService, _,\n $stateParams) {\n var phraseService = {};\n\n phraseService.phrases = []; //current displayed phrases\n\n // FIXME use an object for all the ID arguments - in general we will only\n // need to modify such an object sporadically when switching document\n // or locale, and it is neater than passing them all\n // around separately.\n\n phraseService.getPhraseCount = function(context, filter) {\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, context.localeId).then(function(states) {\n var ids = getIds(states, filter.status);\n return ids.length;\n });\n };\n\n /**\n * Fetch each of the text flows appearing in the given states data.\n */\n phraseService.fetchAllPhrase = function (context, filter,\n offset, maxResult) {\n\n var localeId = context.localeId;\n\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, localeId).then(getTransUnits);\n\n function getTransUnits(states) {\n var ids = getIds(states, filter.status);\n if (!isNaN(offset)) {\n if(!isNaN(maxResult)) {\n ids = ids.slice(offset, offset + maxResult);\n } else {\n ids = ids.slice(offset);\n }\n }\n // Reading for chaining promises https://github.com/kriskowal/q\n // (particularly \"Sequences\").\n return PhraseCache.getTransUnits(ids, localeId).\n then(transformToPhrases).then(sortPhrases);\n }\n\n /**\n * Converts text flow data from the API into the form expected in the\n * editor.\n *\n * @returns {Phrase[]}\n */\n function transformToPhrases(transUnits) {\n return _.map(transUnits, function(transUnit, id) {\n var source = transUnit.source,\n trans = transUnit[localeId];\n return {\n id: parseInt(id),\n sources: source.plural ? source.contents : [source.content],\n // Original translation\n translations: extractTranslations(source, trans),\n // Translation from editor\n newTranslations: extractTranslations(source, trans),\n plural: source.plural,\n // Conform the status from the server, return an object\n status: trans ? TransStatusService.getStatusInfo(trans.state) :\n TransStatusService.getStatusInfo('untranslated'),\n revision: trans ? parseInt(trans.revision) : 0,\n wordCount: parseInt(source.wordCount)\n };\n });\n }\n\n function extractTranslations(source, trans) {\n if(source.plural) {\n return trans && trans.contents ? trans.contents.slice() : [];\n }\n return trans ? [trans.content] : [];\n }\n\n function sortPhrases(phrases) {\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, localeId).then(function(states) {\n phraseService.phrases = _.sortBy(phrases, function(phrase) {\n var index = _.findIndex(states, function(state) {\n return state.id === phrase.id;\n });\n return index >= 0 ? index : phrases.length;\n });\n return phraseService.phrases;\n });\n }\n };\n\n //update phrase,statuses and textFlows with given tu id\n phraseService.onTransUnitUpdated = function(context, id, localeId, revision,\n status, phrase) {\n\n PhraseCache.onTransUnitUpdated(context, id, localeId, revision, status,\n phrase);\n\n var cachedPhrase = findPhrase(id, phraseService.phrases);\n //update phrase if found\n if(cachedPhrase) {\n cachedPhrase.translations = phrase.newTranslations.slice();\n cachedPhrase.revision = revision;\n cachedPhrase.status = TransStatusService.getStatusInfo(status);\n }\n };\n\n //rollback content of phrase\n phraseService.onTransUnitUpdateFailed = function(id) {\n var phrase = findPhrase(id, phraseService.phrases);\n if(phrase) {\n phrase.newTranslations = phrase.translations.slice();\n }\n };\n\n // find next Id from phrases states\n phraseService.findNextId = function(currentId) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (states) {\n var currentIndex,\n nextIndex;\n currentIndex = _.findIndex(states, function (state) {\n return state.id === currentId;\n });\n nextIndex = currentIndex + 1 < states.length ?\n currentIndex + 1 : states.length - 1;\n return states[nextIndex].id;\n });\n };\n\n // find previous id from phrases states\n phraseService.findPreviousId = function(currentId) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (states) {\n var currentIndex,\n previousIndex;\n currentIndex = _.findIndex(states, function (state) {\n return state.id === currentId;\n });\n previousIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : 0;\n return states[previousIndex].id;\n });\n };\n\n // find next phrase with requested status\n phraseService.findNextStatus = function(currentId, status) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (statusList) {\n var currentIndex,\n nextStatusInfo,\n requestStatus = TransStatusService.getStatusInfo(status);\n\n currentIndex = _.findIndex(statusList, function (state) {\n return state.id === currentId;\n });\n\n for (var i = currentIndex + 1; i < statusList.length; i++) {\n nextStatusInfo = TransStatusService.getStatusInfo(\n statusList[i].state);\n if (nextStatusInfo.ID === requestStatus.ID) {\n return statusList[i].id;\n }\n }\n return currentId;\n });\n };\n\n function findPhrase(id, phrases) {\n return _.find(phrases, function(phrase) {\n return phrase.id === id;\n });\n }\n\n function getIds(resources, states) {\n if(states) {\n resources = FilterUtil.filterResources(resources, ['status'], states);\n }\n return _.map(resources, function (item) {\n return item.id;\n });\n }\n\n // Does not appear to be used anywhere. Removing until phrase-caching code\n // is added.\n // phraseService.findById = function(phraseId) {\n // var deferred = $q.defer();\n // var phrase = phrases[phraseId];\n // deferred.resolve(phrase);\n // return deferred.promise;\n // };\n\n return phraseService;\n }\n\n angular\n .module('app')\n .factory('PhraseService', PhraseService);\n\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @name progressbar\n * @description progressbar container\n * @ngInject\n */\n function progressbar() {\n return {\n restrict: 'E',\n required: 'progressbarStatistic',\n scope: {\n statistic: '=progressbarStatistic',\n size: '@' //large, full, or empty\n },\n templateUrl: 'components/progressbar/progressbar.html',\n controller: function($scope) {\n /**\n * Need to set to true for complex object watch. Performance issue.\n * https://docs.angularjs.org/api/ng/type/$rootScope.Scope\n */\n $scope.$watch('statistic', function(statistic) {\n if (statistic) {\n $scope.style = getStyle(statistic);\n }\n }, true);\n }\n };\n }\n\n function getStyle(statistic) {\n var total = statistic.total,\n widthApproved = getWidthPercent(statistic.approved, total),\n widthTranslated = getWidthPercent(statistic.translated, total),\n marginLeftTranslated = widthApproved,\n widthNeedsWork = getWidthPercent(statistic.needswork, total),\n marginLeftNeedsWork = widthApproved + widthTranslated,\n widthUntranslated = getWidthPercent(statistic.untranslated, total),\n marginLeftUntranslated = widthApproved +\n widthTranslated + widthNeedsWork,\n style = {};\n\n style.approved = {\n 'width': widthApproved + '%',\n 'marginLeft': 0\n };\n style.translated = {\n 'width': widthTranslated + '%',\n 'marginLeft': marginLeftTranslated + '%'\n };\n style.needsWork = {\n 'width': widthNeedsWork + '%',\n 'marginLeft': marginLeftNeedsWork + '%'\n };\n style.untranslated = {\n 'width': widthUntranslated + '%',\n 'marginLeft': marginLeftUntranslated + '%'\n };\n return style;\n }\n\n function getWidthPercent(value, total) {\n var percent = 0;\n if (value) {\n percent = value / total * 100;\n }\n return percent;\n }\n\n angular\n .module('app')\n .directive('progressbar', progressbar);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle communication with server on Project related information.\n * ProjectService.js\n * @ngInject\n */\n\n function ProjectService(UrlService, $resource) {\n\n /**\n * Get project's information\n *\n * @param projectSlug\n * @returns {$promise|*|N.$promise}\n */\n function getProjectInfo(projectSlug) {\n var methods = {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug\n }\n }\n };\n\n var Locales = $resource(UrlService.PROJECT_URL, {}, methods);\n return Locales.query().$promise;\n }\n\n return {\n getProjectInfo: getProjectInfo\n };\n }\n angular\n .module('app')\n .factory('ProjectService', ProjectService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name display-character\n * @description display whitespace character with symbol(HTML),\n * *NOTE*, need to wrap around tag\n * @ngInject\n */\n function renderWhitespaceCharacters() {\n var WHITESPACES = {\n 'space' : {\n 'regex' : / /g,\n 'template' : ' '\n },\n 'newline' : {\n 'regex' : /\\n/g,\n 'template' : '\\n'\n },\n 'tab' : {\n 'regex' : /\\t/g,\n 'template' : '\\t'\n }\n };\n\n return {\n restrict: 'A',\n required: ['ngBind'],\n scope: {\n ngBind: '='\n },\n\n link: function compile(scope, element) {\n scope.$watch('ngBind', function (value) {\n value = replaceChar(value, WHITESPACES.space);\n value = replaceChar(value, WHITESPACES.newline);\n value = replaceChar(value, WHITESPACES.tab);\n element.html(value);\n });\n }\n };\n\n function replaceChar(value, whitespaceChar) {\n return value.replace(whitespaceChar.regex, whitespaceChar.template);\n }\n }\n\n angular\n .module('app')\n .directive('renderWhitespaceCharacters', renderWhitespaceCharacters);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name ScrollbarWidthCtrl\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n function ScrollbarWidthCtrl() {\n var scrollbarWidthCtrl = this;\n\n scrollbarWidthCtrl.init = function() {\n var container = scrollbarWidthCtrl.container[0],\n child = scrollbarWidthCtrl.child[0],\n scrollbarWidth = child.offsetWidth - container.offsetWidth;\n\n scrollbarWidthCtrl.width = scrollbarWidth / 2;\n };\n\n }\n\n angular\n .module('app')\n .controller('ScrollbarWidthCtrl', ScrollbarWidthCtrl);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name scrollbarWidth\n *\n * @description\n * Scrollbar width container\n * Needed for the controller to reference all properties\n */\n function scrollbarWidth() {\n return {\n restrict: 'A',\n controller: 'ScrollbarWidthCtrl as scrollbarWidthCtrl',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n scrollbarWidthCtrl.init(element);\n }\n };\n }\n\n /**\n * @name scrollbarWidthElement\n *\n * @description\n * The element to add the scrollbar width to\n */\n function scrollbarWidthElement() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n // Use the attribute to decide which property to set\n element.css(attrs.scrollbarWidthElement, scrollbarWidthCtrl.width);\n }\n };\n }\n\n /**\n * @name scrollbarWidthContainer\n *\n * @description\n * Get the scrollbar container width\n */\n function scrollbarWidthContainer() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.container = element;\n }\n };\n }\n\n /**\n * @name scrollbarWidthChild\n *\n * @description\n * Get the scrollbar child width\n */\n function scrollbarWidthChild() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.child = element;\n }\n };\n }\n\n angular\n .module('app')\n .directive('scrollbarWidth', scrollbarWidth)\n .directive('scrollbarWidthElement', scrollbarWidthElement)\n .directive('scrollbarWidthContainer', scrollbarWidthContainer)\n .directive('scrollbarWidthChild', scrollbarWidthChild);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name toggle-checkbox\n * @description Add an extra element to a checkbox to\n * so we can style it differently\n * @ngInject\n */\n function toggleCheckbox() {\n return {\n restrict: 'A',\n link: function(scope, element) {\n element.after('');\n }\n };\n }\n\n angular\n .module('app')\n .directive('toggleCheckbox', toggleCheckbox);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * @typedef {Object} StatusInfo\n * @property {string} ID lower case translation status (content state)\n * @property {string} NAME capitalized representation\n * @property {string} CSSCLASS css class to use for this status\n *\n */\n /**\n * TransStatusService.js\n *\n * @ngInject\n */\n function TransStatusService(_) {\n var transStatusService = this,\n STATUSES = {\n 'UNTRANSLATED': {\n 'ID': 'untranslated',\n 'NAME': 'Untranslated',\n 'CSSCLASS': 'neutral'\n },\n 'NEEDSWORK': {\n 'ID': 'needswork',\n 'NAME': 'Needs Work',\n 'CSSCLASS': 'unsure'\n },\n 'TRANSLATED' : {\n 'ID': 'translated',\n 'NAME': 'Translated',\n 'CSSCLASS': 'success'\n },\n 'APPROVED': {\n 'ID': 'approved',\n 'NAME': 'Approved',\n 'CSSCLASS': 'highlight'\n }\n };\n\n transStatusService.getAll = function() {\n return STATUSES;\n };\n\n transStatusService.getAllAsArray = function() {\n return _.values(STATUSES);\n };\n\n /**\n *\n * @param {string} statusKey string representation of the status.\n * @returns {StatusInfo}\n */\n transStatusService.getStatusInfo = function(statusKey) {\n return STATUSES[conformStatus(statusKey)];\n };\n\n transStatusService.getId = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].ID;\n };\n\n transStatusService.getServerId = function(statusId) {\n return serverStatusId(statusId);\n };\n\n transStatusService.getName = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].NAME;\n };\n\n transStatusService.getCSSClass = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].CSSCLASS;\n };\n\n /**\n * Conform it to uppercase for lookups and\n * temporary fix for server sending \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function conformStatus(statusKey) {\n statusKey = angular.uppercase(statusKey);\n if (!statusKey || statusKey === 'NEW') {\n statusKey = 'UNTRANSLATED';\n } else if (statusKey === 'NEEDREVIEW') {\n statusKey = 'NEEDSWORK';\n }\n return statusKey;\n }\n\n /**\n * Conform it to PascalCase for lookups and\n * temporary fix for server receiving \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function serverStatusId(statusId) {\n statusId = angular.lowercase(statusId);\n if (!statusId || statusId === 'untranslated') {\n return 'New';\n } else if (statusId === 'needswork') {\n return 'NeedReview';\n }\n return statusId.charAt(0).toUpperCase() + statusId.slice(1).toLowerCase();\n }\n\n return transStatusService;\n }\n\n angular\n .module('app')\n .factory('TransStatusService', TransStatusService);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitCtrl.js\n * @ngInject\n */\n function TransUnitCtrl($scope, $element, $stateParams, _,\n TransUnitService, EventService, LocaleService, focus,\n EditorShortcuts, PhraseUtil) {\n\n var transUnitCtrl = this;\n\n transUnitCtrl.selected = false;\n transUnitCtrl.focused = false;\n transUnitCtrl.focusedTranslationIndex = 0;\n\n transUnitCtrl.hasTranslationChanged =\n PhraseUtil.hasTranslationChanged;\n\n transUnitCtrl.focusTranslation = function() {\n if(transUnitCtrl.selected) {\n focus('phrase-' + $scope.phrase.id + '-' +\n transUnitCtrl.focusedTranslationIndex);\n }\n };\n\n // when user clicked on TU or using tab to nav\n transUnitCtrl.onTextAreaFocus = function(phrase, index) {\n transUnitCtrl.focused = true;\n if (!_.isUndefined(index)) {\n transUnitCtrl.focusedTranslationIndex = index;\n }\n if(!transUnitCtrl.selected) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': phrase.id,\n 'updateURL': true,\n 'focus': true\n }, $scope);\n }\n };\n\n transUnitCtrl.translationTextModified = function(phrase) {\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n };\n\n transUnitCtrl.getPhrase = function() {\n return $scope.phrase;\n };\n\n transUnitCtrl.init = function() {\n TransUnitService.addController($scope.phrase.id, transUnitCtrl);\n if($stateParams.id && parseInt($stateParams.id) === $scope.phrase.id) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $stateParams.id,\n 'updateURL': false,\n 'focus' : $stateParams.selected});\n }\n };\n\n transUnitCtrl.copySource = function($event, phrase, sourceIndex) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n {'phrase': phrase, 'sourceIndex': sourceIndex}, $scope);\n };\n\n transUnitCtrl.undoEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.cancelEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.saveAs = function($event, phrase, status) {\n EditorShortcuts.saveTranslationCallBack($event, phrase, status);\n };\n\n transUnitCtrl.getLocaleName = function(localeId) {\n return LocaleService.getName(localeId);\n };\n\n transUnitCtrl.toggleSaveAsOptions = function(open) {\n EventService.broadcastEvent( open ? 'openDropdown': 'closeDropdown',\n {}, $scope);\n if (open) {\n // focus on the first dropdown option\n focus($scope.phrase.id + '-saveAsOption-0');\n }\n };\n\n transUnitCtrl.cancelSaveAsMode = function() {\n EditorShortcuts.cancelSaveAsModeIfOn();\n };\n\n $scope.$on('$destroy', function () {\n $element.unbind('click', onTransUnitClick);\n $element.unbind('focus', onTransUnitClick);\n });\n\n transUnitCtrl.updateSaveButton = function (phrase) {\n transUnitCtrl.saveButtonStatus =\n PhraseUtil.getSaveButtonStatus($scope.phrase);\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n $scope.phrase);\n transUnitCtrl.saveButtonText = transUnitCtrl.saveButtonStatus.NAME;\n transUnitCtrl.saveButtonDisabled =\n !PhraseUtil.hasTranslationChanged(phrase);\n transUnitCtrl.loadingClass = '';\n transUnitCtrl.savingStatus = '';\n };\n\n transUnitCtrl.phraseSaving = function (data) {\n transUnitCtrl.loadingClass = 'is-loading';\n transUnitCtrl.saveButtonStatus =\n transUnitCtrl.savingStatus = data.status;\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n data.phrase);\n transUnitCtrl.saveButtonText = 'Saving…';\n transUnitCtrl.saveButtonDisabled = true;\n };\n\n transUnitCtrl.saveButtonOptionsAvailable = function() {\n return !_.isEmpty(transUnitCtrl.saveButtonOptions);\n };\n\n transUnitCtrl.selectTransUnit = function(phrase) {\n if (!transUnitCtrl.selected) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': phrase.id,\n 'updateURL': true,\n 'focus': true\n }, $scope);\n }\n };\n\n function onTransUnitClick() {\n if(!transUnitCtrl.selected) {\n $scope.$apply(function () {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $scope.phrase.id,\n 'updateURL': true,\n 'focus': true}, $scope);\n });\n }\n }\n\n return transUnitCtrl;\n }\n\n angular\n .module('app')\n .controller('TransUnitCtrl', TransUnitCtrl);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitService\n *\n * See PhraseService.transformToPhrases function for phrase definition.\n *\n * @ngInject\n */\n function TransUnitService(_, $location, $rootScope, $state, $stateParams,\n $filter, MessageHandler, EventService, TransStatusService, PRODUCTION,\n EditorShortcuts, PhraseUtil, $timeout) {\n var transUnitService = this,\n controllerList = {},\n selectedTUId;\n\n transUnitService.addController = function(id, controller) {\n controllerList[id] = controller;\n };\n\n transUnitService.getSaveButtonOptions = function(saveButtonStatus, phrase) {\n return filterSaveButtonOptions(saveButtonStatus, phrase);\n };\n\n $rootScope.$on(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n function(event, data) {\n var transUnitCtrl = controllerList[data.id];\n if (transUnitCtrl) {\n transUnitCtrl.toggleSaveAsOptions(data.open);\n }\n });\n\n /**\n * EventService.EVENT.SELECT_TRANS_UNIT listener\n * - Select and focus a trans-unit.\n * - Perform implicit save on previous selected TU if changed\n * - Update url with TU id without reload state\n */\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n var newTuController = controllerList[data.id],\n oldTUController = controllerList[selectedTUId],\n updateURL = data.updateURL;\n\n if(newTuController) {\n EditorShortcuts.selectedTUCtrl = newTuController;\n\n if (selectedTUId && selectedTUId !== data.id) {\n setSelected(oldTUController, false);\n\n //perform implicit save if changed\n if(PhraseUtil.hasTranslationChanged(\n oldTUController.getPhrase())) {\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase' : oldTUController.getPhrase(),\n 'status' : TransStatusService.getStatusInfo('TRANSLATED'),\n 'locale' : $stateParams.localeId,\n 'docId' : $stateParams.docId\n });\n }\n }\n\n updateSaveButton(event, newTuController.getPhrase());\n selectedTUId = data.id;\n setSelected(newTuController, true);\n\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION, data);\n\n //Update url without reload state\n if(updateURL) {\n if($state.current.name !== 'editor.selectedContext.tu') {\n $state.go('editor.selectedContext.tu', {\n 'id': data.id,\n 'selected': data.focus.toString()\n });\n } else {\n $location.search('id', data.id);\n $location.search('selected', data.focus.toString());\n }\n }\n } else {\n MessageHandler.displayWarning('Trans-unit not found:' + data.id);\n }\n });\n\n /**\n * EventService.EVENT.COPY_FROM_SOURCE listener\n * Copy translation from source\n */\n $rootScope.$on(EventService.EVENT.COPY_FROM_SOURCE,\n function (event, data) {\n var sourceIndex = 0;\n if(data.phrase.plural) {\n //clicked copy source button\n sourceIndex = data.sourceIndex;\n if(_.isUndefined(sourceIndex)) {\n //copy source key shortcut, copy corresponding source to target\n var transUnitCtrl = controllerList[data.phrase.id];\n sourceIndex = transUnitCtrl.focusedTranslationIndex;\n if(data.phrase.sources.length <\n transUnitCtrl.focusedTranslationIndex + 1) {\n sourceIndex = data.phrase.sources.length - 1;\n }\n }\n }\n setTranslationText(data.phrase, data.phrase.sources[sourceIndex]);\n });\n\n /**\n * EventService.EVENT.UNDO_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.UNDO_EDIT,\n function (event, phrase) {\n if (PhraseUtil.hasTranslationChanged(phrase)) {\n setAllTranslations(phrase, phrase.translations);\n }\n });\n\n /**\n * EventService.EVENT.CANCEL_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function (event, phrase) {\n if(selectedTUId) {\n setSelected(controllerList[selectedTUId], false);\n selectedTUId = false;\n EditorShortcuts.selectedTUCtrl = null;\n }\n\n $location.search('selected', null);\n if(!phrase) {\n $location.search('id', null);\n }\n\n // EditorContentCtrl#changePage doesn't provide a phrase object\n if (phrase) {\n $timeout(function() {\n return $rootScope.$broadcast('blurOn', 'phrase-' + phrase.id);\n });\n }\n });\n\n /**\n * EventService.EVENT.TRANSLATION_TEXT_MODIFIED listener\n *\n */\n $rootScope.$on(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n updateSaveButton);\n\n /**\n * EventService.EVENT.FOCUS_TRANSLATION listener\n *\n */\n $rootScope.$on(EventService.EVENT.FOCUS_TRANSLATION,\n setFocus);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_INITIATED,\n phraseSaving);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_COMPLETED,\n updateSaveButton);\n\n function setTranslationText(phrase, newText) {\n var index = 0;\n if (phrase.plural) {\n var transUnitCtrl = controllerList[phrase.id];\n index = transUnitCtrl.focusedTranslationIndex;\n }\n phrase.newTranslations[index] = newText;\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n phrase);\n }\n\n function setAllTranslations(phrase, newTexts) {\n //need slice() for new instance of array\n phrase.newTranslations = newTexts.slice();\n\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n phrase);\n }\n\n function updateSaveButton(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.updateSaveButton(phrase);\n }\n\n function phraseSaving(event, data) {\n var transUnitCtrl = controllerList[data.phrase.id];\n transUnitCtrl.phraseSaving(data);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n data.phrase);\n }\n\n function setSelected(transUnitCtrl, isSelected) {\n //This check is to prevent selected event being triggered repeatedly.\n if(transUnitCtrl.selected !== isSelected) {\n transUnitCtrl.selected = isSelected || false;\n }\n }\n\n function setFocus(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.focusTranslation();\n }\n\n /**\n * Filters the dropdown options for saving a translation\n * Unless the translation is empty, remove untranslated as an option\n * Filter the current default save state out of the list and show remaining\n *\n * @param {Object} saveStatus The current default translation *save* status\n * @return {Array} Is used to construct the dropdown list\n */\n function filterSaveButtonOptions(saveStatus, phrase) {\n var filteredOptions = [];\n if (saveStatus.ID === 'untranslated') {\n return filteredOptions;\n }\n filteredOptions = $filter('filter')\n (TransStatusService.getAllAsArray(), {ID: '!untranslated'});\n\n if(phrase.plural) {\n if(PhraseUtil.hasNoTranslation(phrase)) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!needswork'});\n } else if(PhraseUtil.hasEmptyTranslation(phrase)) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!translated'});\n }\n }\n\n if (PRODUCTION) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!approved'});\n }\n\n return $filter('filter')(filteredOptions, {ID: '!'+saveStatus.ID});\n }\n\n return transUnitService;\n }\n\n angular\n .module('app')\n .factory('TransUnitService', TransUnitService);\n})();\n\n\n","(function() {\n 'use strict';\n\n /**\n * @name trans-unit\n * @description transUnit container\n * @ngInject\n */\n function transUnit() {\n return {\n restrict: 'E',\n required: ['phrase', 'editorContext'],\n scope: {\n phrase: '=',\n firstPhrase: '=',\n editorContext: '='\n },\n controller: 'TransUnitCtrl as transUnitCtrl',\n templateUrl: 'components/transUnit/trans-unit.html',\n link: function(scope, element, attr, TransUnitCtrl) {\n TransUnitCtrl.init();\n }\n };\n }\n\n angular\n .module('app')\n .directive('transUnit', transUnit);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name trans-unit\n * @description transUnit container\n * @ngInject\n */\n function transUnitFilter() {\n return {\n restrict: 'E',\n required: ['editor'],\n scope: {\n editor: '='\n },\n templateUrl: 'components/transUnitFilter/trans-unit-filter.html'\n };\n }\n\n angular\n .module('app')\n .directive('transUnitFilter', transUnitFilter);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * UserService.js\n *\n * @ngInject\n */\n function UserService($resource, UrlService) {\n\n function getUserInfo(username) {\n var UserInfo = $resource(UrlService.USER_INFO_URL, {}, {\n query: {\n method: 'GET',\n params: {\n username: username\n }\n }\n });\n return UserInfo.query().$promise;\n }\n\n function getMyInfo() {\n var MyInfo = $resource(UrlService.MY_INFO_URL, {}, {\n query: {\n method: 'GET'\n }\n });\n return MyInfo.query().$promise;\n }\n\n return {\n settings: {\n editor: {\n hideMainNav: false\n }\n },\n getUserInfo: getUserInfo,\n getMyInfo: getMyInfo\n };\n }\n angular\n .module('app')\n .factory('UserService', UserService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * FilterUtil.js\n *\n * @ngInject\n */\n function FilterUtil(StringUtil, _) {\n\n /**\n * Filter in resources on given fields with matched terms\n *\n * @param resources - list of resources\n * @param fields - list of fields to check\n * @param terms - list of term to check\n * @returns {*}\n */\n function filterResources(resources, fields, terms) {\n if(!resources || !fields || !terms) {\n return resources;\n }\n return _.filter(resources, function (resource) {\n return isInclude(resource, fields, terms);\n });\n }\n\n /**\n * Filter out properties starting with $ (added by promise)\n * @param resources\n */\n function cleanResourceMap(resources) {\n var filteredList = {};\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList[id] = (resources[id]);\n });\n return filteredList;\n }\n\n function cleanResourceList(resources) {\n var filteredList = [];\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList.push(resources[id]);\n });\n return filteredList;\n }\n\n\n function isInclude(resource, fields, terms) {\n if(!resource || !fields || !terms) {\n return false;\n }\n return _.any(fields, function(field) {\n return _.any(terms, function(term) {\n return StringUtil.equals(resource[field], term, true);\n });\n });\n }\n\n return {\n filterResources : filterResources,\n cleanResourceList:cleanResourceList,\n cleanResourceMap : cleanResourceMap\n };\n }\n angular\n .module('app')\n .factory('FilterUtil', FilterUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * PhraseUtil.js\n *\n * @ngInject\n */\n function PhraseUtil(TransStatusService, _) {\n\n function getSaveButtonStatus(phrase) {\n if (hasNoTranslation(phrase)) {\n return TransStatusService.getStatusInfo('untranslated');\n }\n else if (hasEmptyTranslation(phrase)) {\n return TransStatusService.getStatusInfo('needswork');\n }\n else if (hasTranslationChanged(phrase)) {\n return TransStatusService.getStatusInfo('translated');\n }\n else {\n return phrase.status;\n }\n }\n\n function hasTranslationChanged(phrase) {\n // on Firefox with input method turned on,\n // when hitting tab it seems to turn undefined value into ''\n var allSame = _.every(phrase.translations,\n function(translation, index) {\n return nullToEmpty(translation) ===\n nullToEmpty(phrase.newTranslations[index]);\n });\n return !allSame;\n }\n\n function hasNoTranslation(phrase) {\n return _.isEmpty(_.compact(phrase.newTranslations));\n }\n\n function hasEmptyTranslation(phrase) {\n return _.compact(phrase.newTranslations).length !==\n phrase.newTranslations.length;\n }\n\n function nullToEmpty(value) {\n return value || '';\n }\n\n return {\n getSaveButtonStatus : getSaveButtonStatus,\n hasTranslationChanged : hasTranslationChanged,\n hasNoTranslation : hasNoTranslation,\n hasEmptyTranslation : hasEmptyTranslation\n };\n }\n angular\n .module('app')\n .factory('PhraseUtil', PhraseUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility method for handling $resource.statistic\n *\n * StatisticUtil.js\n * @ngInject\n *\n */\n\n function StatisticUtil() {\n return {\n getWordStatistic: function(statistics) {\n return statistics[0].unit === 'WORD' ? statistics[0] : statistics[1];\n },\n getMsgStatistic: function(statistics) {\n return statistics[0].unit === 'MESSAGE' ? statistics[0] : statistics[1];\n }\n };\n }\n angular\n .module('app')\n .factory('StatisticUtil', StatisticUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * StringUtil\n *\n * @ngInject\n */\n\n function StringUtil() {\n function startsWith(str, prefix, ignoreCase) {\n if (ignoreCase && str && prefix) {\n str = str.toUpperCase();\n prefix = prefix.toUpperCase();\n }\n return str.lastIndexOf(prefix, 0) === 0;\n }\n\n function endsWith(str, suffix, ignoreCase) {\n if (ignoreCase && str && suffix) {\n str = str.toUpperCase();\n suffix = suffix.toUpperCase();\n }\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\n }\n\n function equals(from, to, ignoreCase) {\n if (ignoreCase && from && to) {\n from = from.toUpperCase();\n to = to.toUpperCase();\n }\n return from === to;\n }\n\n return {\n startsWith : startsWith,\n endsWith : endsWith,\n equals : equals\n };\n }\n angular\n .module('app')\n .factory('StringUtil', StringUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility to handles URL related request.\n *\n * UrlService.js\n * @ngInject\n */\n function UrlService($location, $http, $q, $stateParams, _) {\n //IE doesn't support location.origin\n if (!location.origin) {\n location.origin =\n window.location.protocol + '//' + window.location.hostname +\n (window.location.port ? (':' + window.location.port) : '');\n }\n\n var urlService = this,\n gravatarBaseUrl = 'http://www.gravatar.com/avatar',\n configFile = 'config.json',\n baseUrl = '',\n urls = {},\n uiTranslationsURL = location.origin + location.pathname +\n 'translations';\n\n urlService.serverContextPath = '';\n\n urlService.init = function () {\n if (baseUrl) {\n return $q.when(baseUrl);\n }\n else {\n /**\n * Temporary solution to handle dynamic context path deployed for\n * Zanata server in JBOSS (/ or /zanata).\n *\n * If config.baseUrl exist and not empty,\n * baseUrl = config.baseUrl\n *\n * ELSE\n * baseUrl = full.url - appPath onwards\n */\n return $http.get(configFile).then(function (response) {\n var config = response.data;\n if (config.baseUrl) {\n baseUrl = config.baseUrl;\n } else {\n var deployPath = config.appPath.replace(/^\\//g, ''),\n index = location.href.indexOf(deployPath);\n\n urlService.serverContextPath = location.origin + location.pathname;\n if(index >= 0) {\n urlService.serverContextPath = location.href.substring(0, index);\n }\n urlService.serverContextPath = urlService.serverContextPath.\n replace(/\\/?$/, '/');\n baseUrl = urlService.serverContextPath + 'rest';\n }\n\n /* jshint -W101 */\n // URLs over multiple lines are hard to read, allowing long lines here.\n // Warnings for jshint are turned off/on with -/+ before the warning code.\n // See: https://github.com/jshint/jshint/blob/2.1.4/src/shared/messages.js\n urls = _.mapValues({\n project: '/project/:projectSlug',\n docs: '/project/:projectSlug/version/:versionSlug/docs',\n locales: '/project/:projectSlug/version/:versionSlug/locales',\n status: '/project/:projectSlug/version/:versionSlug/doc/:docId/status/:localeId',\n textFlows: '/source+trans/:localeId',\n docStats: '/stats/project/:projectSlug/version/:versionSlug/doc/:docId/locale/:localeId',\n myInfo: '/user',\n userInfo: '/user/:username',\n translation: '/trans/:localeId',\n allLocales: '/locales'\n }, unary(restUrl));\n /* jshint +W101 */\n\n urlService.PROJECT_URL = urls.project;\n urlService.LOCALE_LIST_URL = urls.locales;\n urlService.DOCUMENT_LIST_URL = urls.docs;\n urlService.TRANSLATION_STATUS_URL = urls.status;\n urlService.TEXT_FLOWS_URL = urls.textFlows;\n urlService.DOC_STATISTIC_URL = urls.docStats;\n urlService.MY_INFO_URL = urls.myInfo;\n urlService.USER_INFO_URL = urls.userInfo;\n urlService.TRANSLATION_URL = urls.translation;\n urlService.ALL_LOCALE_URL = urls.allLocales;\n\n urlService.PROJECT_PAGE = function(projectSlug, versionSlug) {\n return urlService.serverContextPath + 'iteration/view/' +\n projectSlug + '/' + versionSlug;\n };\n\n urlService.DASHBOARD_PAGE = urlService.serverContextPath +\n 'dashboard';\n });\n }\n };\n\n /**\n * Get the value of a query string parameter.\n */\n urlService.readValue = function (key) {\n return $location.search()[key];\n };\n\n urlService.gravatarUrl = function (gravatarHash, size) {\n return gravatarBaseUrl + '/' + gravatarHash +\n '?d=mm&r=g&s=' + size;\n };\n\n urlService.uiTranslationURL = function (locale) {\n return uiTranslationsURL + '/' + locale + '.json';\n };\n\n urlService.uiTranslationListURL = uiTranslationsURL + '/locales';\n\n return urlService;\n\n /**\n * Create a REST URL by appending all the given URL part arguments to the\n * base URL.\n *\n * No separators will be added or removed, so all parts should include\n * leading / and exclude trailing / to avoid problems.\n */\n function restUrl() {\n return baseUrl + Array.prototype.join.call(arguments, '');\n }\n\n /**\n * Decorate a function to ignore all but the first argument.\n */\n function unary(fun) {\n return function(arg) {\n return fun(arg);\n };\n }\n }\n\n angular\n .module('app')\n .factory('UrlService', UrlService);\n})();\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["app.js","AppConfig.js","AppConstants.js","AppCtrl.js","editor/EditorContentCtrl.js","editor/EditorCtrl.js","editor/EditorDetailsCtrl.js","editor/EditorService.js","editor/EditorShortcuts.js","editor/EditorSuggestionsCtrl.js","components/blur-on/blurOnDirective.js","components/clickElsewhere/clickElsewhereDirective.js","components/document/DocumentService.js","components/dropdown/DropdownController.js","components/dropdown/DropdownService.js","components/dropdown/dropdown.js","components/dropdown/dropdownDirective.js","components/event/EventService.js","components/icon/iconDirective.js","components/locale/LocaleService.js","components/logo-loader/logoLoaderDirective.js","components/message/MessageHandler.js","components/notification/NotificationService.js","components/phrases/PhraseCache.js","components/phrases/PhraseService.js","components/progressbar/progressbarDirective.js","components/project/ProjectService.js","components/renderWhitespaceCharacters/renderWhitespaceCharacters.js","components/resizer/resizerDirective.js","components/scrollbar-width/ScrollbarWidthCtrl.js","components/scrollbar-width/scrollbarWidthDirective.js","components/settings/SettingsService.js","components/suggestions/SuggestionCtrl.js","components/suggestions/SuggestionsService.js","components/suggestions/suggestionDirective.js","components/toggle/toggleDirective.js","components/transStatus/TransStatusService.js","components/transUnit/TransUnitCtrl.js","components/transUnit/TransUnitService.js","components/transUnit/transUnitDirective.js","components/transUnitFilter/transUnitFilterDirective.js","components/user/UserService.js","components/util/FilterUtil.js","components/util/PhraseUtil.js","components/util/StatisticUtil.js","components/util/StringUtil.js","components/util/UrlService.js"],"names":[],"mappings":"AAAA,CAAC,WAAW;EACV;;;;;;EAMA,QAAQ;IACN,OAAO;MACL;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;;;AAIN;ACrBA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,UAAU,gBAAgB,oBAAoB;IACrD,iBAAiB;;;IAGjB,IAAI,cAAc,SAAS,IAAI,YAAY;MACzC,OAAO;QACL,SAAS,SAAS,QAAQ;;UAExB,WAAW,WAAW;UACtB,OAAO;;QAET,cAAc,SAAS,WAAW;;UAEhC,WAAW,WAAW;UACtB,QAAQ,MAAM,yBAAyB;UACvC,OAAO,GAAG,OAAO;;QAEnB,UAAU,SAAS,UAAU;;UAE3B,WAAW,WAAW;UACtB,OAAO,YAAY,GAAG,KAAK;;QAE7B,eAAe,SAAS,WAAW;;UAEjC,WAAW,WAAW;UACtB,IAAI,UAAU,WAAW,KAAK;YAC5B,QAAQ,MAAM;iBACT,IAAI,UAAU,WAAW,KAAK;YACnC,QAAQ,MAAM;cACZ,UAAU,OAAO;iBACd;YACL,QAAQ,MAAM,sBAAsB;;UAEtC,OAAO,GAAG,OAAO;;;;;;IAKvB,cAAc,aAAa,KAAK;;;IAGhC,mBAAmB,UAAU;;IAE7B;OACG,MAAM,UAAU;QACf,KAAK;QACL,aAAa;QACb,YAAY;QACZ,SAAS;UACP,qBAAM,SAAS,YAAY;YACzB,OAAO,WAAW;;;SAGrB,MAAM,0BAA0B;QACjC,KAAK;QACL,OAAO;UACL,kBAAkB;YAChB,aAAa;YACb,YAAY;;UAEd,sBAAsB;YACpB,aAAa;YACb,YAAY;;UAEd,kBAAkB;YAChB,aAAa;YACb,YAAY;;;SAGf,MAAM,6BAA6B;QACpC,KAAK;QACL,gBAAgB;;;MAGlB,gBAAgB,oBAAoB;;;;;;;EAMxC;KACG,OAAO;KACP,OAAO;;;;;;AAMZ;AChGA,CAAC,WAAW;EACV;;;;;;EAMA;KACG,OAAO;KACP,SAAS,KAAK,OAAO;KACrB,SAAS,OAAO,OAAO,EAAE;KACzB,SAAS,aAAa,OAAO;;KAE7B,SAAS,cAAc;;;;;AAK5B;AClBA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,QAAQ,QAAQ,aAAa,YAAY;mBACjC,gBAAgB,gBAAgB,YAAY,YAAY;IACvE,IAAI,UAAU;;;IAGd,QAAQ,aAAa;IACrB,QAAQ,WAAW,YAAY;IAC/B,QAAQ,eAAe,EAAE,cAAc;;;;;;;;;;;;;;;IAevC,WAAW,OAAO,KAAK;MACrB,KAAK;MACL,KAAK;;;IAGP,QAAQ,mBAAmB,SAAS,QAAQ;MAC1C,QAAQ,OAAO,SAAS;MACxB,IAAI,aAAa,QAAQ,OAAO,OAAO;MACvC,IAAI,CAAC,WAAW,WAAW;QACzB,cAAc,eAAe,UAAU,OAAO;QAC9C,eAAe,WAAW,WAAW,iBAAiB;aACjD;gBACG,WAAW;kBACT,eAAe,mBAAmB;;gBAEpC,SAAS,OAAO;kBACd,eAAe,YAAY;oBACzB,kBAAkB,cAAc,eAAe;oBAC/C,SAAS;kBACX,eAAe;oBACb,cAAc;kBAChB,QAAQ,OAAO,SAAS,cAAc;;aAE3C;QACL,eAAe;UACb,cAAc,eAAe;;;;IAInC,QAAQ,gBAAgB,WAAW;MACjC,OAAO,WAAW;;;IAGpB,SAAS,cAAc;MACrB,OAAO,cAAc;;;IAGvB,SAAS,sBAAsB;MAC7B,OAAO,YAAY,YAAY;QAC7B,SAAS,QAAQ;UACf,QAAQ,SAAS;UACjB,QAAQ,OAAO,SAAS,cAAc;UACtC,QAAQ,OAAO,cAAc,WAAW;YACtC,QAAQ,OAAO,cAAc;WAC9B,SAAS,OAAO;UACjB,eAAe,aAAa,4BAA4B;;;;IAI9D,SAAS,eAAe;MACtB,cAAc,kBAAkB;QAC9B,SAAS,iBAAiB;UACxB,MAAM,IAAI,KAAK,gBAAgB,SAAS;YACtC,IAAI,WAAW;cACb,aAAa,gBAAgB,QAAQ;cACrC,SAAS;;YAEX,QAAQ,aAAa,KAAK;;UAE5B,QAAQ,OAAO,SAAS,cAAc;YACpC,QAAQ,cAAc,cAAc,eAAe;UACrD,IAAI,CAAC,QAAQ,OAAO,QAAQ;YAC1B,QAAQ,OAAO,SAAS,cAAc;;;QAG1C,SAAS,OAAO;UACd,eAAe,YAAY;YACzB,kBAAkB,cAAc,eAAe;YAC/C,SAAS;UACX,QAAQ,OAAO,SAAS,cAAc;;;;;;EAK9C;KACG,OAAO;KACP,WAAW,WAAW;;;;;;AAM3B;AChHA,CAAC,WAAW;EACV;;;;;;EAMA,SAAS,kBAAkB,YAAY,eAAe;6BAC3B,iBAAiB,YAAY;6BAC7B,cAAc,YAAY,WAAW;6BACrC,oBAAoB;;;IAG7C,IAAI,iBAAiB;QACjB,oBAAoB,MAAM,QAAQ;IACtC;;IAEA,kBAAkB,UAAU;;IAE5B,cAAc,cAAc,aAAa;MACvC,aAAa,aAAa,gBAAgB,YAAY,aAAa;MACnE,aAAa;;IAEf;;IAEA,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,QAAQ;QACvB,GAAG,OAAO,OAAO,QAAQ,MAAM;UAC7B,UAAU,OAAO,UAAU;eACtB;UACL,IAAI,UAAU;UACd,EAAE,QAAQ,OAAO,QAAQ,SAAS,KAAK,KAAK;YAC1C,GAAG,KAAK;cACN,QAAQ,KAAK;;;UAGjB,UAAU,OAAO,UAAU,QAAQ,KAAK;;QAE1C;QACA;;;IAGJ,SAAS,4BAA4B;MACnC,SAAS,WAAW,UAAU;;MAE9B,GAAG,CAAC,EAAE,YAAY,SAAS;QACzB,SAAS,OAAO,MAAM;QACtB,SAAS,EAAE,UAAU,QAAQ,SAAS,QAAQ,OAAO;UACnD,QAAQ,mBAAmB,YAAY;UACvC,OAAO,OAAO,KAAK;;;MAGvB,SAAS;QACP,UAAU;;;;;IAKd,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,GAAG,cAAc,mBAAmB,GAAG;UACrC,cAAc,mBAAmB;UACjC,WAAW,cAAc;;;;IAI/B,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,GAAG,cAAc,mBAAmB,GAAG;UACrC,cAAc,oBAAoB;UAClC,WAAW,cAAc;;;;IAI/B,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,GAAG,cAAc,mBAAmB,cAAc,cAAc;UAC9D,cAAc,mBAAmB;UACjC,WAAW,cAAc;;;;IAI/B,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,GAAG,cAAc,mBAAmB,cAAc,cAAc;UAC9D,cAAc,mBAAmB,cAAc;UAC/C,WAAW,cAAc;;;;;;;;;IAS/B,WAAW,IAAI,aAAa,MAAM,eAAe;;;IAGjD,WAAW,IAAI,aAAa,MAAM,mBAAmB;;;IAGrD,WAAW,IAAI,aAAa,MAAM;mBACnB;;IAEf,SAAS,YAAY,OAAO,MAAM;MAChC,IAAI,UAAU,kBAAkB;QAC9B;QACA;QACA;QACA;;MAEF,eAAe,EAAE,UAAU,SAAS,UAAU,QAAQ;QACpD,OAAO,OAAO,OAAO,KAAK;;MAE5B,YAAY,KAAK,IAAI,eAAe,GAAG,QAAQ,SAAS;MACxD,SAAS,QAAQ,WAAW;;MAE5B,IAAI,WAAW,KAAK,WAAW;QAC7B,aAAa,UAAU,aAAa,MAAM;+BACnB;iCACE,MAAM;iCACN,aAAa;iCACb,SAAS;kCACR;aACrB;;QAEL,SAAS,QAAQ;QACjB,aAAa,UAAU,aAAa,MAAM;WACvC;aACE,UAAU;aACV,UAAU,WAAW,oBAAoB;aACzC,UAAU,aAAa;aACvB,SAAS,aAAa;;;;;IAK/B,SAAS,gBAAgB,OAAO,MAAM;MACpC,IAAI,UAAU,kBAAkB;QAC9B;QACA;QACA;QACA;;MAEF,eAAe,EAAE,UAAU,SAAS,UAAU,QAAQ;QACpD,OAAO,OAAO,OAAO,KAAK;;MAE5B,gBAAgB,KAAK,IAAI,eAAe,GAAG;MAC3C,SAAS,QAAQ,eAAe;;MAEhC,IAAI,WAAW,KAAK,WAAW;QAC7B,aAAa,UAAU,aAAa,MAAM;+BACnB;iCACE,MAAM;iCACN,aAAa;iCACb,SAAS;kCACR;aACrB;QACL,SAAS,QAAQ;;QAEjB,aAAa,UAAU,aAAa,MAAM;WACvC;aACE,UAAU;aACV,UAAU,WAAW,oBAAoB;aACzC,UAAU,aAAa;aACvB,SAAS,aAAa;;;;;IAK/B,SAAS,qBAAqB,OAAO,MAAM;MACzC,IAAI,UAAU,kBAAkB;QAC9B,gBAAgB,mBAAmB,cAAc;QACjD;QACA;;MAEF,eAAe,EAAE,UAAU,SAAS,UAAU,QAAQ;QACpD,OAAO,OAAO,OAAO,KAAK;;;MAG5B,KAAK,IAAI,IAAI,eAAe,GAAG,IAAI,QAAQ,QAAQ,KAAK;QACtD,iBAAiB,mBAAmB;UAClC,QAAQ,GAAG;QACb,IAAI,eAAe,OAAO,cAAc,IAAI;UAC1C,aAAa,UAAU,aAAa,MAAM;iCACnB;mCACE,MAAM,QAAQ,GAAG;mCACjB,aAAa;mCACb,SAAS;oCACR;UAC1B;;;;;;;IAON,SAAS,WAAW,WAAW;MAC7B,WAAW;MACX,aAAa,UAAU,aAAa,MAAM;;;;;;;;;;;IAW5C,SAAS,OAAO;MACd,aAAa,UAAU,aAAa,MAAM;QACxC;UACE,aAAa,cAAc,QAAQ;UACnC,aAAa,cAAc,QAAQ;UACnC,OAAO,cAAc,QAAQ;UAC7B,UAAU,cAAc,QAAQ;;;;MAIpC,cAAc,eAAe,cAAc,SAAS;QAClD,KAAK,SAAS,OAAO;UACnB,cAAc,eAAe,SAAS,QAAQ;UAC9C,GAAG,QAAQ,gBAAgB;YACzB,cAAc,eAAe,QAAQ,mBAAmB;cACtD,cAAc,eAAe,IAAI,cAAc;;;UAGnD,cAAc,gBAAgB,cAAc,cAAc,IAAI,IAAI;YAChE,cAAc,cAAc;;UAE9B,WAAW,cAAc;;;;IAI/B,SAAS,WAAW,WAAW;MAC7B,IAAI,aAAa,YAAY;MAC7B,cAAc,eAAe,cAAc,SAAS;QAClD,YAAY,gBAAgB,KAAK;;;IAGrC,SAAS,eAAe,SAAS;MAC/B,kBAAkB,UAAU;;;IAG9B,OAAO;;;;EAGT;KACG,OAAO;KACP,WAAW,qBAAqB;;AAErC;AC5PA,CAAC,WAAW;EACV;;;;;;EAMA,SAAS,WAAW,QAAQ,aAAa,iBAAiB;IACxD,gBAAgB,eAAe,iBAAiB;IAChD,YAAY,cAAc,QAAQ,gBAAgB;IAClD,cAAc,iBAAiB,GAAG,WAAW;IAC7C,IAAI,aAAa;IACjB,WAAW,aAAa;IACxB,WAAW,iBAAiB;IAC5B,WAAW,YAAY,EAAE;MACvB,EAAE,OAAO,gBAAgB,YAAY,SAAS,cAAc;;QAE1D,IAAI,YAAY,EAAE,QAAQ,aAAa,WAAW;QAClD,OAAO;QACP,QAAQ,EAAE,IAAI,WAAW,SAAS,KAAK;UACrC,OAAO,gBAAgB,aAAa;;QAEtC,aAAa,aAAa,UAAU,GAAG;;;;;IAK3C,WAAW,SAAS;MAClB,WAAW;QACT,OAAO;QACP,aAAa;QACb,eAAe;QACf,aAAa;QACb,gBAAgB;;;;IAIpB;;;;IAIA,SAAS,qBAAqB;;MAE5B,IAAI,SAAS,WAAW,UAAU;;MAElC,GAAG,CAAC,EAAE,YAAY,SAAS;QACzB,SAAS,OAAO,MAAM;QACtB,EAAE,QAAQ,QAAQ,SAAS,KAAK;UAC9B,GAAG,CAAC,EAAE,YAAY,WAAW,OAAO,OAAO,OAAO;YAChD,WAAW,OAAO,OAAO,OAAO;;;QAGpC;;;;IAIJ,UAAU,KAAK,KAAK,SAAS,OAAO;MAClC,IAAI,aAAa,MAAM;MACvB,IAAI,CAAC,WAAW,kBAAkB,CAAC,uBAAuB,aAAa;QACrE,WAAW;QACX,OAAO;;OAER;;;;;;;IAOH,SAAS,uBAAuB,SAAS;;MAEvC,IAAI,CAAC,MAAM,QAAQ,YAAY,KAAK,QAAQ,iBAAiB,CAAC,GAAG;QAC/D,OAAO;;;;MAIT,OAAO,QAAQ,YAAY,WAAW,QAAQ,YAAY;QACxD,QAAQ,YAAY,cAAc,QAAQ;;;;;;;;IAQ9C,WAAW,UAAU,cAAc,YAAY,aAAa;MAC1D,aAAa,aAAa,gBAAgB,YAAY,aAAa;MACnE,cAAc,gBAAgB,cAAc,eAAe;MAC3D;;IAEF,WAAW,+BAA+B,WAAW;MACnD,WAAW,iBAAiB,CAAC,WAAW;;;IAG1C,IAAI,mBAAmB,gBAAgB,QAAQ;IAC/C,OAAO,kBAAkB,gBAAgB,UAAU;MACjD,UAAU,MAAM;QACd,OAAO,kBAAkB;;IAE7B,WAAW,wBAAwB,YAAY;MAC7C,gBAAgB,OAAO,kBAAkB,CAAC,OAAO;;;;IAInD,WAAW,cAAc,WAAW;MAClC,OAAO,WAAW,aAAa,WAAW,QAAQ;QAChD,WAAW,QAAQ;;;IAGvB,WAAW,cAAc,SAAS,OAAO;MACvC,OAAO,gBAAgB,YAAY;;;IAGrC,eAAe,eAAe,aAAa,aAAa;MACtD,SAAS,aAAa;QACpB,WAAW,cAAc;;MAE3B,SAAS,OAAO;QACd,eAAe,aAAa;UAC1B,iBAAiB;;;IAGvB,cAAc,oBAAoB,WAAW,QAAQ;MACnD,WAAW,QAAQ,aAAa;MAChC,SAAS,SAAS;QAChB,WAAW,UAAU;QACrB,IAAI,CAAC,WAAW,WAAW,WAAW,QAAQ,UAAU,GAAG;;UAEzD,eAAe,aAAa;YAC1B,WAAW,QAAQ,cAAc;YACjC,WAAW,QAAQ;eAChB;;UAEL,IAAI,mBAAmB,OAAO,OAAO;UACrC,IAAI,UAAU,WAAW;;UAEzB,IAAI,CAAC,kBAAkB;YACrB,QAAQ,WAAW,WAAW,QAAQ,GAAG;YACzC;iBACK;YACL,QAAQ,WAAW;YACnB,IAAI,CAAC,cAAc,eAAe,WAAW;cAC3C,mBAAmB;cACnB,QAAQ,WAAW,WAAW,QAAQ,GAAG;;;;SAI9C,SAAS,OAAO;QACjB,eAAe,aAAa,gCAAgC;;;IAGhE,gBAAgB,QAAQ,WAAW,QAAQ;MACzC,WAAW,QAAQ,aAAa;MAChC,SAAS,WAAW;QAClB,WAAW,YAAY;;QAEvB,IAAI,CAAC,WAAW,aAAa,WAAW,UAAU,UAAU,GAAG;;UAE7D,eAAe,aAAa;YAC1B,WAAW,QAAQ,cAAc;YACjC,WAAW,QAAQ;eAChB;;UAEL,IAAI,gBAAgB,OAAO,OAAO;cAC9B,UAAU,WAAW;UACzB,IAAI,CAAC,eAAe;YAClB,QAAQ,QAAQ,WAAW,UAAU,GAAG;YACxC;iBACK;YACL,QAAQ,QAAQ,gBAAgB,YAAY;YAC5C,IAAI,CAAC,gBAAgB,YAAY,WAAW;cAC1C,QAAQ,QAAQ;cAChB,QAAQ,QAAQ,WAAW,UAAU,GAAG;;;;SAI7C,SAAS,OAAO;QACjB,eAAe,aAAa,kCAAkC;;;IAGlE,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,WAAW,eAAe,KAAK;QAC/B,WAAW,UAAU,KAAK;;;IAG9B,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,WAAW,eAAe;QAC1B,WAAW,UAAU;;;IAGzB,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;;QAErB,cAAc,KAAK,aAAa,KAAK,aAAa,KAAK;UACrD,KAAK;;QAEP,WAAW,QAAQ,QAAQ,KAAK;QAChC,WAAW,QAAQ,WAAW,KAAK;;;IAGvC,WAAW,aAAa,WAAW;MACjC,GAAG,cAAc,iBAAiB,GAAG;QACnC,OAAO,cAAc,mBAAmB;aACnC;QACL,OAAO,CAAC,cAAc,mBAAmB,KAAK;WAC3C,cAAc,eAAe;;;;IAIpC,WAAW,gBAAgB,SAAS,UAAU;MAC5C,OAAO,cAAc,QAAQ;;;IAG/B,WAAW,YAAY,WAAW;MAChC,aAAa,UAAU,aAAa,MAAM;;;IAG5C,WAAW,WAAW,WAAW;MAC/B,aAAa,UAAU,aAAa,MAAM;;;;IAI5C,WAAW,WAAW,WAAW;MAC/B,aAAa,UAAU,aAAa,MAAM;;;IAG5C,WAAW,eAAe,WAAW;MACnC,aAAa,UAAU,aAAa,MAAM;;;IAG5C,WAAW,cAAc,WAAW;MAClC,YAAY;;;IAGd,WAAW,eAAe,WAAW;MACnC,aAAa;;;IAGf,SAAS,aAAa,WAAW;MAC/B,GAAG,aAAa,WAAW,OAAO,SAAS;QACzC,YAAY;aACP;QACL,WAAW,OAAO,OAAO,MAAM;QAC/B,GAAG,WAAW;UACZ,aAAa,UAAU,aAAa,MAAM;YACxC,WAAW;;;;;IAKnB,SAAS,YAAY,WAAW;MAC9B,WAAW,OAAO,OAAO,MAAM;MAC/B,WAAW,OAAO,OAAO,WAAW;MACpC,WAAW,OAAO,OAAO,aAAa;MACtC,WAAW,OAAO,OAAO,YAAY;MACrC,WAAW,OAAO,OAAO,eAAe;;MAExC,GAAG,WAAW;QACZ,aAAa,UAAU,aAAa,MAAM;UACxC,WAAW;;;;IAIjB,SAAS,aAAa,UAAU;MAC9B,OAAO,SAAS,aAAa,SAAS;QACpC,SAAS,eAAe,SAAS;QACjC,SAAS,cAAc,SAAS;;;IAGpC,SAAS,iCAAiC;MACxC,IAAI,+BAA+B;QACjC,OAAO,GAAG,0BAA0B;UAClC,SAAS,WAAW,QAAQ;UAC5B,YAAY,WAAW,QAAQ;;;;;IAKrC,SAAS,8BAA8B;MACrC,OAAO,WAAW,QAAQ,SAAS,WAAW,QAAQ;;;;;;;;;;;IAWxD,SAAS,cAAc,aAAa,aAAa,OAAO,UAAU;MAChE,gBAAgB,cAAc,aAAa,aAAa,OAAO;SAC5D,KAAK,SAAS,YAAY;YACvB,WAAW,gBAAgB;eACxB,iBAAiB;YACpB,WAAW,mBAAmB;eAC3B,gBAAgB;;UAErB,SAAS,OAAO;YACd,eAAe,aAAa,8BAA8B;;;;IAIlE,KAAK,WAAW,YAAY,SAAS;;IAErC,gBAAgB;;;;EAGlB;KACG,OAAO;KACP,WAAW,cAAc;;AAE9B;AC1TA,CAAC,WAAW;EACV;;;;;;EAMA,SAAS,oBAAoB;IAC3B,IAAI,oBAAoB;;IAExB,OAAO;;;EAGT;KACG,OAAO;KACP,WAAW,qBAAqB;;AAErC;ACjBA,CAAC,YAAY;EACX;;;;;;;EAOA,SAAS,cAAc,YAAY,WAAW,GAAG;IAC/C,cAAc,eAAe,YAAY,iBAAiB;IAC1D,oBAAoB;IACpB,IAAI,gBAAgB;QAChB,QAAQ;;IAEZ,cAAc,UAAU;;IAExB,cAAc,mBAAmB;IACjC,cAAc,eAAe;;IAE7B,cAAc;MACZ,UAAU,aAAa,aAAa,OAAO,WAAW,UAAU,MAAM;QACpE,cAAc,UAAU;UACtB,aAAa;UACb,aAAa;UACb,OAAO;UACP,WAAW;UACX,UAAU;UACV,MAAM;;QAER,OAAO,cAAc;;;IAGzB,cAAc,gBAAgB,SAAS,aAAa,aAAa;2CAC1B,UAAU;MAC/C,GAAG,cAAc,QAAQ,gBAAgB,aAAa;QACpD,cAAc,QAAQ,cAAc;;MAEtC,GAAG,cAAc,QAAQ,gBAAgB,aAAa;QACpD,cAAc,QAAQ,cAAc;;MAEtC,GAAG,cAAc,QAAQ,UAAU,OAAO;QACxC,cAAc,QAAQ,QAAQ;;MAEhC,GAAG,cAAc,QAAQ,aAAa,UAAU;QAC9C,cAAc,QAAQ,WAAW;;;;;;;;;;;IAWrC,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,SAAS,KAAK;YACd,SAAS,KAAK;QAClB,IAAI,CAAC,iBAAiB,QAAQ,SAAS;;UAErC;;;;QAIF,IAAI,EAAE,IAAI,OAAO,OAAO,KAAK;UAC3B,IAAI,iBAAiB,MAAM,OAAO;UAClC,eAAe,SAAS;UACxB,eAAe,SAAS;eACnB;UACL,SAAS,wBAAwB,QAAQ;UACzC,MAAM,OAAO,MAAM;YACjB,UAAU;YACV,UAAU;YACV,UAAU,KAAK;YACf,SAAS,KAAK;;;QAGlB,aAAa,UAAU,aAAa,MAAM,gBAAgB;QAC1D,mBAAmB,OAAO;;;IAG9B,SAAS,iBAAiB,QAAQ,QAAQ;MACxC,OAAO,WAAW,sBAAsB;QACtC,OAAO,WAAW;;;;IAItB,SAAS,mBAAmB,IAAI;MAC9B,IAAI,UAAU,EAAE,UAAU,cAAc;;MAExC,IAAI,UAAU,MAAM;;MAEpB,IAAI,cAAc,UAAU,WAAW,iBAAiB,IAAI;QAC1D,QAAQ;UACN,QAAQ;UACR,QAAQ;YACN,UAAU,QAAQ;;;;MAIxB,IAAI,OAAO;QACT,IAAI,QAAQ,OAAO;QACnB,UAAU,QAAQ,OAAO,YAAY;QACrC,SAAS,QAAQ,OAAO,gBAAgB;QACxC,UAAU,QAAQ,OAAO;;QAEzB,QAAQ,mBAAmB,YAAY,QAAQ,OAAO;QACtD,QAAQ,QAAQ,OAAO;;;MAGzB,YAAY,OAAO,MAAM,SAAS;QAChC,SAAS,UAAU;UACjB,IAAI,aAAa,QAAQ,OAAO,OAAO;;UAEvC,cAAc,mBAAmB,SAAS,KAAK,IAAI,QAAQ;YACzD,SAAS,UAAU,SAAS,QAAQ,QAAQ;;UAE9C,gBAAgB,gBAAgB,QAAQ;YACtC,QAAQ,aAAa,QAAQ,OAAO,QAAQ;YAC5C,WAAW,mBAAmB,MAAM,SAAS;YAC7C,QAAQ,OAAO;;UAEjB,aAAa,UAAU,aAAa,MAAM;YACxC,QAAQ;;QAEZ,SAAS,UAAU;UACjB,eAAe,eAAe;YAC5B,KAAK,KAAK,OAAO;UACnB,cAAc,wBAAwB,KAAK;UAC3C,aAAa,UAAU,aAAa,MAAM;YACxC,QAAQ;;MAEd,OAAO,MAAM;;;IAGf,SAAS,wBAAwB,QAAQ,eAAe;MACtD,IAAI,EAAE,QAAQ,EAAE,QAAQ,OAAO,mBAAmB;QAChD,OAAO,mBAAmB,cAAc;;MAE1C,OAAO;;;IAGT,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,iBAAiB;;;;AAI9B;ACxJA,CAAC,YAAY;EACX;;;;;;;EAOA,SAAS,gBAAgB,cAAc,cAAc,GAAG,SAAS;2BACxC,oBAAoB,WAAW,KAAK,SAAS;IACpE,IAAI,kBAAkB;MACpB,eAAe;;;;IAIjB,gBAAgB,iBAAiB;;IAEjC,SAAS,mBAAmB,OAAO;MACjC,IAAI,gBAAgB,gBAAgB;QAClC,MAAM;QACN,aAAa,UAAU,aAAa,MAAM;UACxC,CAAC,UAAU,gBAAgB,eAAe;;;;IAIhD,SAAS,oBAAoB,OAAO;MAClC,IAAI,gBAAgB,gBAAgB;QAClC,MAAM;QACN,MAAM;QACN,aAAa,UAAU,aAAa,MAAM;UACxC;;;;IAIN,SAAS,wBAAwB,OAAO;MACtC,IAAI,gBAAgB,gBAAgB;QAClC,MAAM;QACN,MAAM;QACN,aAAa,UAAU,aAAa,MAAM;UACxC;;;;IAIN,SAAS,mBAAmB,OAAO;MACjC,MAAM;MACN,MAAM;MACN,IAAI,cAAc;QAChB,gBAAgB;QAChB,IAAI,gBAAgB,gBAAgB;UAClC,gBAAgB,eAAe;;aAE5B,IAAI,gBAAgB,gBAAgB;QACzC,IAAI,SAAS,gBAAgB,eAAe;QAC5C,IAAI,WAAW,sBAAsB,SAAS;;UAE5C,aAAa,UAAU,aAAa,MAAM;YACxC;eACG;;UAEL,aAAa,UAAU,aAAa,MAAM;YACxC;;;;;IAKR,SAAS,kCAAkC,OAAO;MAChD,IAAI,gBAAgB,gBAAgB;QAClC,MAAM;QACN,IAAI,SAAS,gBAAgB,eAAe;QAC5C,aAAa,UAAU,aAAa,MAAM;UACxC;YACE,UAAU;YACV,UAAU,WAAW,oBAAoB;YACzC,UAAU,aAAa;YACvB,SAAS,aAAa;;;;;;;;;;IAU9B,SAAS,mBAAmB,OAAO;MACjC,MAAM;MACN,gBAAgB;MAChB,IAAI,SAAS,gBAAgB,eAAe;MAC5C,IAAI,QAAQ;QACV,aAAa,UAAU,aAAa,MAAM;UACxC;YACE,MAAM,OAAO;YACb,QAAQ;;;QAGZ,0BAA0B,QAAQ,KAAK;QACvC,0BAA0B,QAAQ,KAAK;QACvC,0BAA0B,QAAQ,KAAK;;;;;;;;;;;IAW3C,SAAS,uBAAuB,eAAe;MAC7C,QAAQ,UAAU,OAAO;QACvB,MAAM;QACN,aAAa,UAAU,aAAa,MAAM;UACxC,cAAc;;;;;;;;IAQpB,gBAAgB,YAAY;MAC1B,aAAa,IAAI;QACf,SAAS,oBAAoB,8BAA8B;;MAE7D,mBAAmB,IAAI;QACrB,aAAa,uBAAuB;QACpC;;MAEF,mBAAmB,IAAI;QACrB,aAAa,uBAAuB;QACpC;;MAEF,mBAAmB,IAAI;QACrB,aAAa,uBAAuB;QACpC;;MAEF,mBAAmB,IAAI;QACrB,aAAa,uBAAuB;QACpC;;MAEF,aAAa,IAAI,aAAa,OAAO,oBAAoB;;MAEzD,+BAA+B,IAAI;QACjC,SAAS,mCAAmC;;MAE9C,cAAc,IAAI;QAChB,eAAe,oBAAoB;;;;MAIrC,mBAAmB;QACjB,WAAW,CAAC,CAAC,OAAO,iBAAiB,aAAa;;;MAGpD,oBAAoB;QAClB,WAAW,CAAC,CAAC,OAAO,iBAAiB,aAAa;;;MAGpD,kBAAkB;QAChB,WAAW,CAAC,CAAC,OAAO,iBAAiB,aAAa;;;MAGpD,oBAAoB,IAAI;QACtB,aAAa;QACb;QACA,CAAC,SAAS;;MAEZ,mBAAmB,IAAI;QACrB,mBAAmB;QACnB;QACA,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoCd,SAAS,aAAa,YAAY,UAAU,aAAa,WAAW;IACpE;MACE,KAAK,aAAa;MAClB,KAAK,YAAY;QACf,gBAAgB,YAAY,aAAa,QAAQ;;MAEnD,IAAI,WAAW;QACb,KAAK,YAAY,qBAAqB,QAAQ,YAAY,CAAC;QAC3D,KAAK,UAAU;UACb,gBAAgB,KAAK,WAAW,IAAI,QAAQ;;MAEhD,OAAO;;;IAGT,SAAS,gBAAgB,OAAO,aAAa,QAAQ,UAAU;MAC7D,IAAI,YAAY;QACd,SAAS,CAAC;QACV,UAAU;;MAEZ,UAAU,QAAQ;MAClB,IAAI,aAAa;QACf,UAAU,cAAc;;MAE1B,IAAI,QAAQ;QACV,UAAU,SAAS;;MAErB,OAAO;;;IAGT,gBAAgB,mBAAmB,YAAY;;;MAG7C,IAAI,CAAC,QAAQ,IAAI,gBAAgB,UAAU,YAAY,aAAa;QAClE,EAAE,OAAO,gBAAgB,WAAW,SAAS,OAAO;UAClD,IAAI,iBAAiB,cAAc;YACjC,eAAe;;;;;;IAMvB,gBAAgB,oBAAoB,YAAY;MAC9C,EAAE,OAAO,gBAAgB,WAAW,SAAS,OAAO;QAClD,EAAE,QAAQ,MAAM,WAAW,SAAS,QAAQ;UAC1C,gBAAgB,WAAW,OAAO,OAAO,OAAO;;;;;IAKtD,SAAS,eAAe,cAAc;MACpC,IAAI,CAAC,QAAQ,IAAI,aAAa,aAAa;QACzC,EAAE,QAAQ,aAAa;UACrB,SAAS,OAAO;YACd,QAAQ,IAAI;;;;;IAKpB,SAAS,iBAAiB;MACxB,OAAO;QACL,aAAa,gBAAgB,eAAe,YAAY;;;;IAI5D,SAAS,0BAA0B,QAAQ,OAAO,QAAQ;MACxD,IAAI,aAAa,mBAAmB,cAAc;MAClD,OAAO,QAAQ,IAAI;QACjB,OAAO;QACP,aAAa,IAAI,QAAQ,cAAc;QACvC,SAAS,CAAC,SAAS;QACnB,QAAQ;QACR,UAAU,UAAU,OAAO;UACzB,gBAAgB,wBAAwB,OAAO,QAAQ;;;;;IAK7D,gBAAgB,0BAA0B,SAAS,OAAO;uDACP,YAAY;MAC7D,eAAe;;MAEf,MAAM;MACN,MAAM;;MAEN,aAAa,UAAU,aAAa,MAAM;QACxC;UACE,UAAU;UACV,UAAU;UACV,UAAU,aAAa;UACvB,SAAS,aAAa;;MAE1B,gBAAgB;;;IAGlB,gBAAgB,uBAAuB,WAAW;MAChD,IAAI,gBAAgB,gBAAgB,gBAAgB;QAClD,eAAe;QACf,gBAAgB,WAAW,CAAC,KAAK,KAAK;QACtC,aAAa,UAAU,aAAa,MAAM;UACxC;YACE,MAAM,gBAAgB,eAAe,YAAY;YACjD,QAAQ;;;;;;;;;;;;IAYhB,gBAAgB,aAAa,SAAS,MAAM,QAAQ;MAClD,IAAI,eAAe,gBAAgB,QAAQ,OAAO,CAAC;MACnD,SAAS,UAAU;MACnB,EAAE,QAAQ,cAAc,SAAS,KAAK;QACpC,QAAQ,IAAI;QACZ,UAAU,OAAO,KAAK;;;;;;;;;;IAU1B,gBAAgB,eAAe,UAAU,OAAO;MAC9C,IAAI,MAAM;QACR,SAAS;QACT,OAAO;QACP,MAAM;QACN,OAAO;QACP,IAAI;QACJ,MAAM;QACN,UAAU;QACV,WAAW;;MAEb,QAAQ,MAAM,MAAM;;MAEpB,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;;QAErC,IAAI,MAAM,OAAO,OAAO;UACtB,IAAI,QAAQ;YACV,QAAQ,UAAU,SAAS,QAAQ,UAAU,GAAG;YAChD,MAAM,KAAK;iBACN;YACL,MAAM,KAAK;;;;QAIf,MAAM,KAAK,IAAI,MAAM,OAAO,MAAM;;;MAGpC,OAAO,MAAM,KAAK;;;IAGpB,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,mBAAmB;;;AAGhC;ACpXA,CAAC,WAAW;EACV;;;;;;EAMA,SAAS,sBAAsB,QAAQ,GAAG,iBAAiB;IACzD,cAAc,YAAY,UAAU,OAAO;IAC3C,IAAI,2BAA2B,gBAAgB,QAAQ;IACvD,IAAI;MACF,gBAAgB,QAAQ;;IAE1B,IAAI,wBAAwB;;IAE5B,sBAAsB,cAAc;IACpC,sBAAsB,eAAe;IACrC,sBAAsB,qBAAqB;IAC3C,sBAAsB,aAAa;IACnC,sBAAsB,wBAAwB;IAC9C,sBAAsB,eAAe;IACrC,sBAAsB,eAAe;;IAErC,OAAO,kBAAkB;IACzB,OAAO,kBAAkB;;IAEzB,OAAO,OAAO,gBAAgB,UAAU;MACtC,UAAU,MAAM;QACd,OAAO,OAAO;;;IAGlB,OAAO,OAAO,gBAAgB,UAAU;MACtC,UAAU,MAAM;QACd,OAAO,OAAO;;;IAGlB,OAAO,cAAc,SAAS,QAAQ;MACpC,IAAI,QAAQ;QACV,OAAO;;MAET,MAAM;;;IAGR,sBAAsB,mBAAmB,YAAY;MACnD,gBAAgB,OAAO,0BAA0B;MACjD,aAAa,UAAU,aAAa,MAAM;QACxC;;;IAGJ,sBAAsB;MACpB,SAAS,QAAQ,gBAAgB;MACjC,sBAAsB,aAAa;MACnC,sBAAsB,cAAc;MACpC,IAAI,CAAC,kBAAkB,QAAQ;QAC7B,OAAO,YAAY;;;;IAIvB,sBAAsB,gBAAgB,UAAU,SAAS;MACvD,sBAAsB,eAAe;MACrC,SAAS,OAAO,sBAAsB;MACtC,sBAAsB,mBAAmB,SAAS,WAAW;QAC3D,aAAa,UAAU,aAAa,MAAM;UACxC;SACD;;;IAGL,sBAAsB,eAAe,WAAW;MAC9C,IAAI,OAAO,iBAAiB;QAC1B,aAAa,UAAU,aAAa,MAAM;UACxC;;WAEC;QACH,aAAa,UAAU,aAAa,MAAM;UACxC;;;;;IAKN,IAAI,CAAC,sBAAsB,gBAAgB,OAAO,MAAM;MACtD,sBAAsB,wBAAwB;MAC9C;;;IAGF,SAAS,mBAAmB,aAAa;MACvC,IAAI,sBAAsB;MAC1B,sBAAsB,EAAE,MAAM;SAC3B,OAAO,CAAC,qBAAqB;SAC7B;SACA;;MAEH,IAAI,CAAC,sBAAsB,cAAc;QACvC,iBAAiB;;;MAGnB,IAAI,OAAO,iBAAiB;QAC1B,qBAAqB,sBAAsB;UACzC;QACF,sBAAsB;UACpB,sBAAsB,YAAY;;WAEjC;QACH,qBAAqB,sBAAsB;UACzC;QACF,sBAAsB,qBAAqB;;;MAG7C,OAAO,kBAAkB;;;;IAI3B,SAAS,kBAAkB,cAAc;MACvC,sBAAsB,sBAAsB;;;IAG9C,SAAS,iBAAiB,aAAa;MACrC,sBAAsB,2BAA2B;;;IAGnD,SAAS,qBAAqB,cAAc,aAAa;MACvD,sBAAsB,eAAe;MACrC,sBAAsB,cAAc;;;IAGtC,SAAS,2BAA2B;MAClC,SAAS,WAAW;QAClB,sBAAsB;UACpB,sBAAsB;QACxB,sBAAsB;UACpB,sBAAsB;;;;IAI5B,SAAS,aAAa;MACpB,OAAO,kBAAkB;MACzB,sBAAsB,mBAAmB,MAAM;MAC/C,IAAI,sBAAsB,cAAc;QACtC,sBAAsB,eAAe;QACrC;;;;IAIJ,SAAS,WAAW,QAAQ,gBAAgB;MAC1C,OAAO,kBAAkB;MACzB,IAAI,CAAC,kBAAkB,QAAQ;QAC7B,OAAO,YAAY;;MAErB,sBAAsB,cAAc;;;IAGtC,SAAS,aAAa,OAAO;MAC3B,QAAQ,MAAM,gBAAgB;;;IAGhC,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,sBAAsB,eAAe,KAAK;QAC1C,IAAI,sBAAsB,eAAe,MAAM,OAAO,iBAAiB;UACrE,aAAa,UAAU,aAAa,MAAM;WACzC;;QAEH,sBAAsB,wBAAwB;;;IAGlD,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,IAAI,OAAO,MAAM;UACf,WAAW,MAAM;UACjB,sBAAsB,wBAAwB;;;;GAIrD,WAAW,IAAI,aAAa,MAAM;MAC/B,SAAS,OAAO,UAAU;QACxB,IAAI,UAAU;UACZ,WAAW;;aAER;UACH,WAAW;;;;;IAKjB,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,sBAAsB,eAAe;QACrC,mBAAmB,wBAAwB,KAAK;WAC7C,KAAK,oBAAoB;QAC5B,kBAAkB,KAAK;;;;IAI3B,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,SAAS,IAAI;UACf,mBAAmB;;UAEnB,OAAO;;QAET,OAAO,kBAAkB;QACzB,mBAAmB,sBAAsB;WACtC,KAAK,oBAAoB;QAC5B,sBAAsB,eAAe;;;IAGzC,OAAO;;;;EAGT;KACG,OAAO;KACP,WAAW,yBAAyB;;AAEzC;ACpNA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,SAAS;IAChB,OAAO;MACL,UAAU;MACV,MAAM,SAAS,OAAO,MAAM,MAAM;QAChC,OAAO,MAAM,IAAI,UAAU,UAAU,GAAG,MAAM;UAC5C,IAAI,SAAS,KAAK,QAAQ;cACtB,OAAO,KAAK,GAAG;;;;;;;EAO3B;KACG,OAAO;KACP,UAAU,UAAU;;;AAGzB;AC1BA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,eAAe,WAAW;IACjC,OAAO;MACL,UAAU;MACV,OAAO;QACL,UAAU;;MAEZ,MAAM,SAAS,OAAO,SAAS;QAC7B,IAAI,UAAU,SAAS,GAAG;UACxB,IAAI,CAAC,QAAQ,GAAG,SAAS,EAAE,SAAS;YAClC,MAAM,OAAO,MAAM,SAAS;;;;QAIhC,UAAU,GAAG,SAAS;;QAEtB,MAAM,IAAI,YAAY,WAAW;UAC/B,UAAU,IAAI,SAAS;;;;;;;EAM/B;KACG,OAAO;KACP,UAAU,kBAAkB;;;AAGjC;ACnCA,CAAC,WAAW;EACV;;;;;;;;;EASA,SAAS,gBAAgB,IAAI,WAAW,YAAY;2BAC3B,eAAe,cAAc,GAAG,oBAAoB;IAC3E,IAAI,kBAAkB;QAClB,eAAe;;;;;;;;;IASnB,gBAAgB,UAAU,SAAS,QAAQ,cAAc,cAAc;MACrE,IAAI,YAAY,UAAU,WAAW,mBAAmB,IAAI;QAC1D,OAAO;UACL,QAAQ;UACR,QAAQ;YACN,aAAa;YACb,aAAa;;UAEf,SAAS;;;MAGb,OAAO,UAAU,QAAQ;;;;;;;;;;;;IAY3B,gBAAgB,gBAAgB,UAAU,cAAc;MACtD,QAAQ,WAAW;MACnB,IAAI,UAAU,WAAW;QACvB,IAAI,MAAM,qBAAqB,SAAS;QACxC,IAAI,EAAE,IAAI,cAAc,MAAM;UAC5B,OAAO,GAAG,KAAK,aAAa;eACvB;UACL,IAAI,eAAe,gBAAgB,YAAY;UAC/C,IAAI,aAAa,UAAU,WAAW,mBAAmB,IAAI;YAC3D,OAAO;cACL,QAAQ;cACR,QAAQ;gBACN,aAAa;gBACb,aAAa;gBACb,OAAO;gBACP,UAAU;;cAEZ,SAAS;;;UAGb,OAAO,WAAW,QAAQ,SAAS,KAAK,SAAS,YAAY;;;YAG3D,EAAE,QAAQ,YAAY,SAAS,WAAW;cACxC,UAAU,mBAAmB,MAAM;gBACjC,UAAU,cAAc;;;YAG5B,aAAa,OAAO;YACpB,OAAO,aAAa;;;;;;;;;;;IAW5B,gBAAgB,cAAc,SAAS,OAAO;MAC5C,OAAO,QAAQ,MAAM,QAAQ,OAAO,OAAO;;;;;;;;IAQ7C,gBAAgB,cAAc,SAAS,OAAO;MAC5C,OAAO,QAAQ,MAAM,QAAQ,OAAO,OAAO;;;IAG7C,gBAAgB,cAAc,UAAU,WAAW,OAAO;MACxD,OAAO,EAAE,IAAI,WAAW,SAAS,UAAU;SACxC,OAAO,WAAW,OAAO,SAAS,MAAM,OAAO;;;;IAIpD,gBAAgB,kBAAkB,SAAS,aAAa,aAAa;+CAC1B,UAAU;+CACV,UAAU,WAAW;MAC9D,IAAI,MAAM,qBAAqB,OAAO;MACtC,GAAG,EAAE,IAAI,cAAc,MAAM;QAC3B,gBAAgB,aAAa,MAAM,UAAU;UAC3C;;QAEF,aAAa,UAAU,aAAa,MAAM;UACxC;YACE,aAAa;YACb,aAAa;YACb,OAAO;YACP,UAAU;;;;;;;IAOlB,SAAS,qBAAqB,OAAO,UAAU;MAC7C,OAAO,QAAQ,MAAM;;;;;;;;IAQvB,SAAS,gBAAgB,YAAY,UAAU,UAAU,WAAW;;MAElE,IAAI,gBAAgB,cAAc,iBAAiB;QACjD,eAAe,cAAc,gBAAgB;;MAE/C,GAAG,eAAe;QAChB,YAAY,SAAS;QACrB,IAAI,eAAe,SAAS,cAAc,aAAa;QACvD,cAAc,YAAY,eAAe,IAAI,IAAI;QACjD,cAAc,YAAY,SAAS,cAAc,aAAa;;;MAGhE,GAAG,cAAc;QACf,IAAI,cAAc,SAAS,aAAa,aAAa;QACrD,aAAa,YAAY,cAAc,IAAI,IAAI;QAC/C,aAAa,YAAY,SAAS,aAAa,aAAa;;;;IAIhE,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,mBAAmB;;AAEhC;AC/JA,CAAC,WAAW;EACV;;;;;;;;;;EAUA,SAAS,aAAa,QAAQ,QAAQ,QAAQ;IAC5C,iBAAiB,UAAU,UAAU;IACrC,IAAI,eAAe;;QAEf,QAAQ,OAAO;QACf,YAAY,eAAe;QAC3B;QACA,YAAY,QAAQ;QACpB,gBAAgB,OAAO;UACrB,OAAO,OAAO,YAAY,QAAQ;;IAExC,KAAK,OAAO,SAAS,SAAS;MAC5B,aAAa,WAAW;;MAExB,IAAI,OAAO,QAAQ;QACjB,YAAY,OAAO,OAAO;QAC1B,YAAY,UAAU;;QAEtB,OAAO,OAAO,WAAW,SAAS,OAAO;UACvC,MAAM,SAAS,CAAC,CAAC;;;;;IAKvB,KAAK,SAAS,SAAS,MAAM;MAC3B,MAAM,SAAS,UAAU,SAAS,CAAC,CAAC,OAAO,CAAC,MAAM;MAClD,OAAO,MAAM;;;;IAIf,KAAK,SAAS,WAAW;MACvB,OAAO,MAAM;;;IAGf,MAAM,mBAAmB,WAAW;MAClC,OAAO,aAAa;;;IAGtB,MAAM,qBAAqB,WAAW;MACpC,IAAI,aAAa,eAAe;QAC9B,aAAa,cAAc,GAAG;;;;IAIlC,MAAM,OAAO,UAAU,SAAS,QAAQ,SAAS;MAC/C,SAAS,SAAS,aAAa;SAC5B,aAAa,UAAU;;MAE1B,IAAI,QAAQ;;;;QAIV,SAAS,WAAW;UAClB,MAAM;;QAER,gBAAgB,KAAK;aAChB;QACL,gBAAgB,MAAM;;;MAGxB,UAAU,QAAQ;MAClB,IAAI,QAAQ,UAAU,WAAW,WAAW,SAAS;QACnD,cAAc,QAAQ;UACpB,MAAM,CAAC,CAAC;;;;;IAKd,OAAO,IAAI,0BAA0B,WAAW;MAC9C,MAAM,SAAS;;;IAGjB,OAAO,IAAI,YAAY,WAAW;MAChC,MAAM;;;IAGR,OAAO,IAAI,gBAAgB,WAAW;MACpC,MAAM,SAAS;;;IAGjB,OAAO,IAAI,iBAAiB,WAAW;MACrC,MAAM,SAAS;;;;;EAInB;KACG,OAAO;KACP,WAAW,gBAAgB;;;AAGhC;ACrGA,CAAC,WAAW;EACV;;;;;;;;;;;EAWA,SAAS,gBAAgB,WAAW;IAClC,IAAI,YAAY;QACZ,kBAAkB;;IAEtB,gBAAgB,OAAO,SAAS,eAAe;MAC7C,IAAI,CAAC,WAAW;QACd,UAAU,KAAK,SAAS;QACxB,UAAU,KAAK,WAAW;;;MAG5B,IAAI,aAAa,cAAc,eAAe;QAC5C,UAAU,SAAS;;;MAGrB,YAAY;;;IAGd,gBAAgB,QAAQ,SAAS,eAAe;MAC9C,IAAI,cAAc,eAAe;QAC/B,YAAY;QACZ,UAAU,OAAO,SAAS;QAC1B,UAAU,OAAO,WAAW;;;;IAIhC,IAAI,gBAAgB,SAAS,KAAK;MAChC,IAAI,CAAC,WAAW;QACd;;MAEF,IAAI,gBAAgB,UAAU;MAC9B,IAAI,OAAO,iBAAiB,cAAc,GAAG,SAAS,IAAI,SAAS;QACjE;;;MAGF,UAAU,OAAO,WAAW;QAC1B,UAAU,SAAS;;;;IAIvB,IAAI,gBAAgB,SAAS,KAAK;MAChC,IAAI,IAAI,UAAU,IAAI;QACpB,UAAU;QACV;;;;;;EAKN;KACG,OAAO;KACP,QAAQ,mBAAmB;;;;AAIhC;ACjEA,CAAC,WAAW;EACV;;;;;;;;;EASA,IAAI,iBAAiB;IACnB,WAAW;;;EAGb;KACG,OAAO;KACP,SAAS,kBAAkB;;;AAGhC;ACnBA,CAAC,WAAW;EACV;;;;;;;;;;EAUA,SAAS,WAAW;IAClB,OAAO;MACL,UAAU;MACV,YAAY;MACZ,MAAM,SAAS,OAAO,SAAS,OAAO,cAAc;QAClD,aAAa,KAAK;;;;;EAKxB,SAAS,kBAAkB;IACzB,OAAO;MACL,UAAU;MACV,SAAS;MACT,OAAO;QACL,UAAU;;MAEZ,MAAM,SAAS,OAAO,MAAM,OAAO,cAAc;QAC/C,aAAa,kBAAkB,MAAM;;;;;;;;;;;;;EAa3C,SAAS,iBAAiB;IACxB,OAAO;MACL,UAAU;MACV,SAAS;MACT,MAAM,SAAS,OAAO,SAAS,OAAO,cAAc;QAClD,IAAI,CAAC,cAAc;UACjB;;;QAGF,aAAa,gBAAgB;;QAE7B,IAAI,iBAAiB,SAAS,OAAO;UACnC,MAAM;UACN,MAAM;;UAEN,IAAI,CAAC,QAAQ,SAAS,eAAe,CAAC,MAAM,UAAU;YACpD,MAAM,OAAO,WAAW;cACtB,aAAa;;;;;QAKnB,QAAQ,KAAK,SAAS;;;QAGtB,QAAQ,KAAK;UACX,iBAAiB;UACjB,iBAAiB;;QAEnB,MAAM,OAAO,aAAa,QAAQ,SAAS,QAAQ;UACjD,QAAQ,KAAK,iBAAiB,CAAC,CAAC;UAChC,IAAI,aAAa,mBAAmB,CAAC,QAAQ;YAC3C,MAAM,YAAY,aAAa;;;;QAInC,MAAM,IAAI,YAAY,WAAW;UAC/B,QAAQ,OAAO,SAAS;;;;;;EAMhC;KACG,OAAO;KACP,UAAU,YAAY;KACtB,UAAU,mBAAmB;KAC7B,UAAU,kBAAkB;;;;AAIjC;AC7FA,CAAC,YAAY;EACX;;;;;;;;;;EAUA,SAAS,aAAa,YAAY;IAChC,IAAI,eAAe;;;;;IAKnB,aAAa,QAAQ;;;;;;MAMnB,eAAe;MACf,cAAc;;;;;;;;;MASd,mBAAmB;;;MAGnB,kBAAkB;;;MAGlB,sBAAsB;;;;;;;MAOtB,wBAAwB;;;MAGxB,WAAW;;;MAGX,aAAa;;;MAGb,mBAAmB;;;;;;;;;;;MAWnB,kBAAkB;;;;;;MAMlB,gBAAgB;;;;;;MAMhB,gBAAgB;;;;;;MAMhB,2BAA2B;;;;;;;;MAQ3B,mBAAmB;;MAEnB,gBAAgB;;MAEhB,gBAAgB;;MAEhB,iBAAiB;;MAEjB,gBAAgB;;;;;MAKhB,eAAe;MACf,mBAAmB;MACnB,wBAAwB;;;;;;MAMxB,qBAAqB;;;;;;MAMrB,mBAAmB;;;;;;;MAOnB,yBAAyB;;;;;;;MAOzB,4BAA4B;;;;;;;MAO5B,0BAA0B;;;;;;;MAO1B,2BAA2B;;;;;;;;;;MAU3B,sBAAsB;;;;;;;;;;IAUxB,aAAa,iBAAiB,SAAS,OAAO,MAAM,OAAO;MACzD,QAAQ,SAAS;MACjB,MAAM,WAAW,OAAO;;;;;;;;;;IAU1B,aAAa,YAAY,SAAS,OAAO,MAAM,OAAO;MACpD,QAAQ,SAAS;MACjB,MAAM,MAAM,OAAO;;;IAGrB,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,gBAAgB;;AAE7B;AC/LA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,KAAK,MAAM;IAClB,OAAO;MACL,UAAU;MACV,UAAU,CAAC;MACX,OAAO;QACL,MAAM;QACN,OAAO;QACP,MAAM;;;MAGR,MAAM,SAAS,OAAO,SAAS;QAC7B,IAAI,MAAM;YACN,YAAY;;QAEhB,QAAQ,SAAS;;QAEjB,IAAI,MAAM,OAAO;UACf,YAAY,YAAY,MAAM,QAAQ;;;;QAIxC,MAAM;UACJ;YACE,4BAA4B,MAAM,OAAO;YACzC;UACF;QACF,QAAQ,KAAK,KAAK,YAAY;;;;;;EAKpC;KACG,OAAO;KACP,UAAU,QAAQ;;;AAGvB;AC5CA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,cAAc,YAAY,YAAY,YAAY,WAAW,GAAG;;IAEvE,IAAI,UAAU;;;;;;;;IAQd,SAAS,oBAAoB,aAAa,aAAa;;MAErD,IAAI,UAAU,UAAU,WAAW,iBAAiB,IAAI;QACtD,OAAO;UACL,QAAQ;UACR,QAAQ;YACN,aAAa;YACb,aAAa;;UAEf,SAAS;;;;MAIb,OAAO,QAAQ,QAAQ;;;;IAIzB,SAAS,gBAAgB;MACvB,IAAI,UAAU,UAAU,WAAW,gBAAgB,IAAI;QACrD,OAAO;UACL,QAAQ;UACR,SAAS;;;MAGb,OAAO,QAAQ,QAAQ,SAAS,KAAK,SAAS,SAAS;QACrD,UAAU,WAAW,kBAAkB;;;;IAI3C,SAAS,kBAAkB;MACzB,IAAI,OAAO,UAAU,WAAW,sBAAsB,IAAI;QACxD,OAAO;UACL,QAAQ;;;;MAIZ,OAAO,KAAK,QAAQ;;;IAGtB,SAAS,oBAAoB,SAAS,UAAU;MAC9C,GAAG,SAAS;QACV,OAAO,EAAE,KAAK,SAAS,SAAS,QAAQ;UACtC,OAAO,WAAW,OAAO,OAAO,UAAU,UAAU;;;;;IAK1D,SAAS,gBAAgB,SAAS,UAAU;MAC1C,OAAO,EAAE,IAAI,SAAS,SAAS,QAAQ;QACrC,OAAO,WAAW,OAAO,OAAO,UAAU,UAAU;;;;IAIxD,SAAS,QAAQ,UAAU;MACzB,IAAI,SAAS,oBAAoB,SAAS;MAC1C,GAAG,QAAQ;QACT,OAAO,OAAO;;MAEhB,OAAO;;;IAGT,OAAO;MACL,sBAAsB;MACtB,sBAAsB;MACtB,sBAAsB;MACtB,gBAAgB;MAChB,iBAAiB;MACjB,UAAU;MACV,gBAAgB;QACd,aAAa;QACb,SAAS;;;;;;EAKf;KACG,OAAO;KACP,QAAQ,iBAAiB;;AAE9B;AClGA,CAAC,WAAW;;EAEV;;;;;;;;;;EAUA,SAAS,WAAW,cAAc;IAChC,OAAO;MACL,UAAU;MACV,OAAO;QACL,SAAS;QACT,UAAU;;MAEZ,MAAM,SAAS,OAAO;QACpB,MAAM,UAAU;;QAEhB,MAAM,IAAI,aAAa,MAAM,eAAe,WAAW;UACrD,MAAM,WAAW;;;QAGnB,MAAM,IAAI,aAAa,MAAM,cAAc,WAAW;UACpD,MAAM,UAAU,MAAM,QAAQ,QAAQ,cAAc;;;QAGtD,MAAM,OAAO,YAAY,SAAS,aAAa;UAC7C,IAAI,aAAa;YACf,MAAM,WAAW;iBACZ;YACL,MAAM,UAAU,MAAM,QAAQ,QAAQ,wBAAwB;;;;MAIpE,aAAa;;;;;EAIjB;KACG,OAAO;KACP,UAAU,cAAc;;;AAG7B;AC/CA,CAAC,WAAW;EACV;;;;;;EAMA,SAAS,iBAAiB;IACxB,OAAO;MACL,cAAc,SAAS,KAAK;QAC1B,QAAQ,MAAM;;MAEhB,gBAAgB,SAAS,KAAK;QAC5B,QAAQ,KAAK;;MAEf,aAAa,SAAS,KAAK;QACzB,QAAQ,KAAK;;;;;EAKnB;KACG,OAAO;KACP,QAAQ,kBAAkB;;;AAG/B;AC1BA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,sBAAsB;;;;EAI/B;KACG,OAAO;KACP,QAAQ,uBAAuB;;;AAGpC;AClBA,CAAC,YAAY;EACX;;;;;;;;EAQA,SAAS,YAAY,IAAI,WAAW,YAAY,YAAY;uBACvC,GAAG;IACtB,IAAI,cAAc;MAChB,SAAS;MACT,aAAa;;IAEf,YAAY;MACV,UAAU,aAAa,aAAa,YAAY,UAAU;QACxD,IAAI,MAAM,YAAY,aAAa,aAAa,YAAY;QAC5D,IAAI,EAAE,IAAI,QAAQ,MAAM;UACtB,OAAO,GAAG,KAAK,OAAO;eACjB;UACL,IAAI,eAAe,gBAAgB,YAAY;UAC/C,IAAI,UAAU;cACV,OAAO;gBACL,QAAQ;gBACR,QAAQ;kBACN,aAAa;kBACb,aAAa;kBACb,OAAO;kBACP,UAAU;;gBAEZ,SAAS;;;YAGb,SAAS,UAAU,WAAW,wBAAwB,IAAI;UAC5D,OAAO,OAAO,QAAQ,SAAS,KAAK,UAAU,OAAO;YACnD,QAAQ,WAAW,kBAAkB;YACrC,OAAO,OAAO;YACd,OAAO,OAAO;;;;;IAKtB,YAAY,gBAAgB,UAAU,KAAK,UAAU;MACnD,IAAI,UAAU;QACZ,cAAc;QACd,oBAAoB;MACtB,IAAI,QAAQ,UAAU,IAAI;QACxB,IAAI,EAAE,IAAI,YAAY,KAAK;UACzB,GAAG,WAAW,IAAI,WAAW;YAC3B,QAAQ,MAAM,WAAW;iBACpB;YACL,kBAAkB,KAAK;;eAEpB;UACL,YAAY,KAAK;;;MAGrB,IAAI,EAAE,QAAQ,gBAAgB,EAAE,QAAQ,oBAAoB;QAC1D,OAAO,GAAG,KAAK;;WAEZ;QACH,IAAI,WAAW;QACf,GAAG,CAAC,EAAE,QAAQ,cAAc;UAC1B,YAAY,UAAU,WAAW,gBAAgB,IAAI;YACnD,OAAO;cACL,QAAQ;cACR,QAAQ;gBACN,UAAU;gBACV,KAAK,YAAY,KAAK;;;;;QAK9B,GAAG,CAAC,EAAE,QAAQ,oBAAoB;UAChC,eAAe,UAAU,WAAW,iBAAiB,IAAI;YACvD,OAAO;cACL,QAAQ;cACR,QAAQ;gBACN,UAAU;gBACV,KAAK,kBAAkB,KAAK;;;;;;;QAOpC,GAAG,aAAa,cAAc;UAC5B,OAAO,UAAU,QAAQ,SAAS,KAAK;YACrC,KAAK,aAAa,QAAQ,SAAS,KAAK;eACrC,GAAG,WAAW;UACnB,OAAO,UAAU,QAAQ,SAAS,KAAK;eAClC,GAAG,cAAc;UACtB,OAAO,aAAa,QAAQ,SAAS,KAAK;;;;MAI9C,SAAS,0BAA0B,eAAe;QAChD,gBAAgB,WAAW,iBAAiB;QAC5C,KAAK,IAAI,OAAO,eAAe;;UAE7B,WAAW,KAAK,YAAY,cAAc,KAAK;UAC/C,QAAQ,OAAO,WAAW;;QAE5B,OAAO;;;MAGT,SAAS,qBAAqB,eAAe;QAC3C,gBAAgB,WAAW,iBAAiB;QAC5C,KAAK,IAAI,OAAO,eAAe;UAC7B,WAAW,OAAO,cAAc;UAChC,QAAQ,OAAO,WAAW;;QAE5B,OAAO;;;;;;;;;;;;;IAaX,YAAY;MACV,UAAU,SAAS,IAAI,UAAU,UAAU,QAAQ,QAAQ;;QAEzD,IAAI,MAAM,YAAY,QAAQ,aAAa,QAAQ;UACjD,QAAQ,OAAO;;QAEjB,IAAI,aAAa,EAAE,KAAK,OAAO,MAAM,SAAS,YAAY;UACxD,OAAO,WAAW,OAAO;;;QAG3B,GAAG,YAAY;UACb,WAAW,QAAQ;;;;QAIrB,IAAI,cAAc,WAAW,IAAI;QACjC,IAAI,CAAC,aAAa;UAChB,cAAc;;QAEhB,YAAY,WAAW,SAAS;QAChC,YAAY,QAAQ;QACpB,YAAY,WAAW,OAAO,gBAAgB;;;IAGlD,SAAS,YAAY,WAAW,WAAW,YAAY,UAAU;MAC/D,OAAO,YAAY,MAAM,YAAY;QACnC,aAAa,MAAM;;;IAGvB,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,eAAe;;;AAG5B;ACnKA,CAAC,YAAY;EACX;;;;;;;;;;;;;;;;;;;EAmBA,SAAS,cAAc,YAAY,aAAa,oBAAoB;yBAC7C,cAAc;IACnC,IAAI,gBAAgB;;IAEpB,cAAc,UAAU;;;;;;;IAOxB,cAAc,iBAAiB,SAAS,SAAS,QAAQ;MACvD,OAAO,YAAY,UAAU,QAAQ,aAAa,QAAQ;QACxD,QAAQ,OAAO,QAAQ,UAAU,KAAK,SAAS,QAAQ;UACrD,IAAI,MAAM,OAAO,QAAQ,OAAO;UAChC,OAAO,IAAI;;;;;;;IAOjB,cAAc,iBAAiB,UAAU,SAAS;6CACT,QAAQ,WAAW;;MAE1D,IAAI,WAAW,QAAQ;;MAEvB,OAAO,YAAY,UAAU,QAAQ,aAAa,QAAQ;QACxD,QAAQ,OAAO,UAAU,KAAK;;MAEhC,SAAS,cAAc,QAAQ;QAC7B,IAAI,MAAM,OAAO,QAAQ,OAAO;QAChC,IAAI,CAAC,MAAM,SAAS;UAClB,GAAG,CAAC,MAAM,YAAY;YACpB,MAAM,IAAI,MAAM,QAAQ,SAAS;iBAC5B;YACL,MAAM,IAAI,MAAM;;;;;QAKpB,OAAO,YAAY,cAAc,KAAK;UACpC,KAAK,oBAAoB,KAAK;;;;;;;;;MASlC,SAAS,mBAAmB,YAAY;QACtC,OAAO,EAAE,IAAI,YAAY,SAAS,WAAW,IAAI;UAC/C,IAAI,SAAS,UAAU;cACnB,QAAQ,UAAU;UACtB,OAAO;YACL,IAAI,SAAS;YACb,SAAS,OAAO,SAAS,OAAO,WAAW,CAAC,OAAO;;YAEnD,cAAc,oBAAoB,QAAQ;;YAE1C,iBAAiB,oBAAoB,QAAQ;YAC7C,QAAQ,OAAO;;YAEf,QAAQ,QAAQ,mBAAmB,cAAc,MAAM;cACrD,mBAAmB,cAAc;YACnC,UAAU,QAAQ,SAAS,MAAM,YAAY;YAC7C,WAAW,SAAS,OAAO;;;;;MAKjC,SAAS,oBAAoB,QAAQ,OAAO;QAC1C,GAAG,OAAO,QAAQ;UAChB,OAAO,SAAS,MAAM,WAAW,MAAM,SAAS,UAAU;;QAE5D,OAAO,QAAQ,CAAC,MAAM,WAAW;;;MAGnC,SAAS,YAAY,SAAS;QAC5B,OAAO,YAAY,UAAU,QAAQ,aAAa,QAAQ;UACxD,QAAQ,OAAO,UAAU,KAAK,SAAS,QAAQ;YAC7C,cAAc,UAAU,EAAE,OAAO,SAAS,SAAS,QAAQ;cACzD,IAAI,QAAQ,EAAE,UAAU,QAAQ,SAAS,OAAO;gBAC9C,OAAO,MAAM,OAAO,OAAO;;cAE7B,OAAO,SAAS,IAAI,QAAQ,QAAQ;;YAEtC,OAAO,cAAc;;;;;;IAM7B,cAAc,qBAAqB,SAAS,SAAS,IAAI,UAAU;MACjE,QAAQ,QAAQ;;MAEhB,YAAY,mBAAmB,SAAS,IAAI,UAAU,UAAU;QAC9D;;MAEF,IAAI,eAAe,WAAW,IAAI,cAAc;;MAEhD,GAAG,cAAc;QACf,aAAa,eAAe,OAAO,gBAAgB;QACnD,aAAa,WAAW;QACxB,aAAa,SAAS,mBAAmB,cAAc;;;;;IAK3D,cAAc,0BAA0B,SAAS,IAAI;MACnD,IAAI,SAAS,WAAW,IAAI,cAAc;MAC1C,GAAG,QAAQ;QACT,OAAO,kBAAkB,OAAO,aAAa;;;;;IAKjD,cAAc,aAAa,SAAS,WAAW;MAC7C,OAAO,YAAY,UAAU,aAAa;mCACb,aAAa,aAAa,aAAa;mCACvC,aAAa;SACvC,KAAK,UAAU,QAAQ;UACtB,IAAI;YACF;UACF,eAAe,EAAE,UAAU,QAAQ,UAAU,OAAO;YAClD,OAAO,MAAM,OAAO;;UAEtB,YAAY,eAAe,IAAI,OAAO;YACpC,eAAe,IAAI,OAAO,SAAS;UACrC,OAAO,OAAO,WAAW;;;;;IAK/B,cAAc,iBAAiB,SAAS,WAAW;MACjD,OAAO,YAAY,UAAU,aAAa;mCACb,aAAa,aAAa,aAAa;mCACvC,aAAa;SACvC,KAAK,UAAU,QAAQ;UACtB,IAAI;YACF;UACF,eAAe,EAAE,UAAU,QAAQ,UAAU,OAAO;YAClD,OAAO,MAAM,OAAO;;UAEtB,gBAAgB,eAAe,KAAK,IAAI,eAAe,IAAI;UAC3D,OAAO,OAAO,eAAe;;;;;IAKnC,cAAc,iBAAiB,SAAS,WAAW,QAAQ;MACzD,OAAO,YAAY,UAAU,aAAa;mCACb,aAAa,aAAa,aAAa;mCACvC,aAAa;SACvC,KAAK,UAAU,YAAY;UAC1B,IAAI;YACF;YACA,gBAAgB,mBAAmB,cAAc;;UAEnD,eAAe,EAAE,UAAU,YAAY,UAAU,OAAO;YACtD,OAAO,MAAM,OAAO;;;UAGtB,KAAK,IAAI,IAAI,eAAe,GAAG,IAAI,WAAW,QAAQ,KAAK;YACzD,iBAAiB,mBAAmB;cAClC,WAAW,GAAG;YAChB,IAAI,eAAe,OAAO,cAAc,IAAI;cAC1C,OAAO,WAAW,GAAG;;;UAGzB,OAAO;;;;IAIb,SAAS,WAAW,IAAI,SAAS;MAC/B,OAAO,EAAE,KAAK,SAAS,SAAS,QAAQ;QACtC,OAAO,OAAO,OAAO;;;;IAIzB,SAAS,OAAO,WAAW,QAAQ;MACjC,GAAG,QAAQ;QACT,YAAY,WAAW,gBAAgB,WAAW,CAAC,WAAW;;MAEhE,OAAO,EAAE,IAAI,WAAW,UAAU,MAAM;QACtC,OAAO,KAAK;;;;;;;;;;;;;IAahB,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,iBAAiB;;;;AAI9B;ACpOA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,cAAc;IACrB,OAAO;MACL,UAAU;MACV,UAAU;MACV,OAAO;QACL,WAAW;QACX,MAAM;;MAER,aAAa;MACb,uBAAY,SAAS,QAAQ;;;;;QAK3B,OAAO,OAAO,aAAa,SAAS,WAAW;UAC7C,IAAI,WAAW;YACb,OAAO,QAAQ,SAAS;;WAEzB;;;;;EAKT,SAAS,SAAS,WAAW;IAC3B,IAAI,QAAQ,UAAU;QAClB,gBAAgB,gBAAgB,UAAU,UAAU;QACpD,kBAAkB,gBAAgB,UAAU,YAAY;QACxD,uBAAuB;QACvB,iBAAiB,gBAAgB,UAAU,WAAW;QACtD,sBAAsB,gBAAgB;QACtC,oBAAoB,gBAAgB,UAAU,cAAc;QAC5D,yBAAyB;UACvB,kBAAkB;QACpB,QAAQ;;IAEZ,MAAM,WAAW;MACf,SAAS,gBAAgB;MACzB,cAAc;;IAEhB,MAAM,aAAa;MACjB,SAAS,kBAAkB;MAC3B,cAAc,uBAAuB;;IAEvC,MAAM,YAAY;MAChB,SAAS,iBAAiB;MAC1B,cAAc,sBAAsB;;IAEtC,MAAM,eAAe;MACnB,SAAS,oBAAoB;MAC7B,cAAc,yBAAyB;;IAEzC,OAAO;;;EAGT,SAAS,gBAAgB,OAAO,OAAO;IACrC,IAAI,UAAU;IACd,IAAI,OAAO;MACT,UAAU,QAAQ,QAAQ;;IAE5B,OAAO;;;EAGT;KACG,OAAO;KACP,UAAU,eAAe;;;AAG9B;AC3EA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,eAAe,YAAY,WAAW;;;;;;;;IAQ7C,SAAS,eAAe,aAAa;MACnC,IAAI,UAAU;UACV,OAAO;YACL,QAAQ;YACR,QAAQ;cACN,aAAa;;;;;MAKrB,IAAI,UAAU,UAAU,WAAW,aAAa,IAAI;MACpD,OAAO,QAAQ,QAAQ;;;IAGzB,OAAO;MACL,gBAAgB;;;;EAGpB;KACG,OAAO;KACP,QAAQ,kBAAkB;;AAE/B;ACvCA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,6BAA6B;IACpC,IAAI,cAAc;MAChB,UAAU;QACR,UAAU;QACV,aAAa;;MAEf,YAAY;QACV,UAAU;QACV,aAAa;;MAEf,QAAQ;QACN,UAAU;QACV,aAAa;;;;IAIjB,OAAO;MACL,UAAU;MACV,UAAU,CAAC;MACX,OAAO;QACL,QAAQ;;;MAGV,MAAM,SAAS,QAAQ,OAAO,SAAS;QACrC,MAAM,OAAO,UAAU,UAAU,OAAO;UACtC,QAAQ,YAAY,OAAO,YAAY;UACvC,QAAQ,YAAY,OAAO,YAAY;UACvC,QAAQ,YAAY,OAAO,YAAY;UACvC,QAAQ,KAAK;;;;;IAKnB,SAAS,YAAY,OAAO,gBAAgB;MAC1C,OAAO,MAAM,QAAQ,eAAe,OAAO,eAAe;;;;EAI9D;KACG,OAAO;KACP,UAAU,8BAA8B;;;AAG7C;ACpDA,CAAC,WAAW;EACV;;;;;;;;;;EAUA,SAAS,QAAQ,iBAAiB,SAAS,WAAW,UAAU;;IAE9D,SAAS,KAAK,OAAO,SAAS,OAAO;;;;;;;MAOnC,MAAM,SAAS,SAAS,MAAM;;;;;;;MAO9B,MAAM,eAAe,MAAM;;MAE3B,MAAM,WAAW,oBAAoB,gBAAgB;QACnD,gBAAgB,QAAQ,2BAA2B,QAAQ;MAC7D,MAAM,iBAAiB,MAAM;;MAE7B,MAAM;QACJ,gBAAgB,UAAU,gBAAgB,QAAQ;QAClD,UAAU,MAAM;UACd,MAAM,OAAO;UACb,yBAAyB;;;;;;MAM7B,SAAS,kBAAkB;QACzB,gBAAgB,OAAO,gBAAgB,QAAQ;UAC7C,MAAM;;;MAGV,SAAS,yBAAyB,SAAS;QACzC,IAAI,SAAS;UACX,MAAM,iBAAiB,MAAM;UAC7B,MAAM,eAAe,MAAM;eACtB;;;UAGL,IAAI,aAAa,MAAM;UACvB,MAAM,WAAW;UACjB,MAAM,iBAAiB;UACvB,MAAM,eAAe;;;;QAIvB,WAAW;;;MAGb,yBAAyB,MAAM;;MAE/B,QAAQ,SAAS;;;MAGjB,IAAI,MAAM,YAAY,YAAY;QAChC,QAAQ,SAAS;QACjB,SAAS,WAAW;UAClB,oBAAoB,MAAM;;;WAGzB;QACH,QAAQ,SAAS;QACjB,SAAS,WAAW;UAClB,sBAAsB,MAAM;;;;MAIhC,QAAQ,GAAG,aAAa,SAAS,OAAO;QACtC,MAAM;QACN,UAAU,GAAG,aAAa;QAC1B,UAAU,GAAG,WAAW;;;MAG1B,QAAQ,QAAQ,SAAS,KAAK,UAAU,WAAW;QACjD,SAAS,OAAO,MAAM;QACtB,MAAM,WAAW,SAAS;;;MAG5B,SAAS,UAAU,OAAO;QACxB,IAAI,MAAM,YAAY,YAAY;UAChC,oBAAoB,MAAM;eACrB;UACL,sBAAsB,QAAQ,cAAc,MAAM;;;;MAItD,SAAS,oBAAoB,kBAAkB;QAC7C,IAAI,IAAI;YACJ,YAAY,QAAQ,QAAQ;eACzB,cAAc,MAAM;YACvB,aAAa,QAAQ,QAAQ;eAC1B,cAAc,MAAM;YACvB;cACE,oBAAoB,MAAM,YAAY,QAAQ;YAChD,mBAAmB,MAAM;cACvB,SAAS,MAAM;;QAErB,MAAM,iBAAiB;QACvB,IAAI,iBAAiB,GAAG,kBAAkB;;QAE1C,QAAQ,IAAI;UACV,MAAM,CAAC,KAAK,MAAM,eAAe,OAAO;;;QAG1C,UAAU,IAAI;UACZ,OAAO,IAAI;;;QAGb,WAAW,IAAI;UACb,MAAM,IAAI;;;;MAId,SAAS,sBAAsB,kBAAkB;QAC/C,IAAI,IAAI;YACJ,WAAW,QAAQ,QAAQ;eACxB,cAAc,MAAM;YACvB,cAAc,QAAQ,QAAQ;eAC3B,cAAc,MAAM;YACvB;cACE,oBAAoB,MAAM,YAAY,QAAQ;YAChD,mBAAmB,MAAM,cAAc,MAAM;;QAEjD,MAAM,iBAAiB;QACvB,IAAI,iBAAiB,GAAG,kBAAkB;;QAE1C,QAAQ,IAAI;UACV,QAAQ,CAAC,KAAK,MAAM,eAAe,OAAO;;;QAG5C,SAAS,IAAI;UACX,QAAQ,IAAI;;;QAGd,YAAY,IAAI;UACd,QAAQ,IAAI;;;;MAIhB,SAAS,UAAU;QACjB,UAAU,OAAO,aAAa;QAC9B,UAAU,OAAO,WAAW;;;QAG5B;;;MAGF,SAAS,gBAAgB;QACvB,IAAI,MAAM,YAAY,YAAY;UAChC,oBAAoB,MAAM;;aAEvB;UACH,sBAAsB,MAAM;;;;MAIhC,SAAS,iBAAiB,aAAa,SAAS,SAAS;;QAEvD,IAAI,WAAW,cAAc,SAAS;UACpC,OAAO;;;aAGJ,IAAI,cAAc,SAAS;UAC9B,OAAO;;aAEJ;UACH,OAAO;;;;MAIX,SAAS,oBAAoB,UAAU,OAAO;QAC5C,IAAI,CAAC,oBAAoB,KAAK,WAAW;UACvC,OAAO,KAAK,MAAM,SAAS,SAAS,SAAS,QAAQ,IAAI,OAAO;;aAE7D;UACH,OAAO,SAAS;;;;;;IAMtB,OAAO;MACL,MAAM;;;;;EAIV;KACG,OAAO;KACP,UAAU,WAAW;;;AAG1B;AC/MA,CAAC,WAAW;EACV;;;;;;;;;;EAUA,SAAS,qBAAqB;IAC5B,IAAI,qBAAqB;;IAEzB,mBAAmB,OAAO,WAAW;MACnC,IAAI,YAAY,mBAAmB,UAAU;UACzC,QAAQ,mBAAmB,MAAM;UACjC,iBAAiB,MAAM,cAAc,UAAU;;MAEnD,mBAAmB,QAAQ,iBAAiB;;;;;EAKhD;KACG,OAAO;KACP,WAAW,sBAAsB;;;AAGtC;AC7BA,CAAC,WAAW;EACV;;;;;;;;;EASA,SAAS,iBAAiB;IACxB,OAAO;MACL,UAAU;MACV,YAAY;MACZ,MAAM,SAAS,OAAO,SAAS,OAAO,oBAAoB;QACxD,mBAAmB,KAAK;;;;;;;;;;;EAW9B,SAAS,wBAAwB;IAC/B,OAAO;MACL,UAAU;MACV,SAAS;MACT,MAAM,SAAS,OAAO,SAAS,OAAO,oBAAoB;QACxD,IAAI,CAAC,oBAAoB;UACvB;;;QAGF,QAAQ,IAAI,MAAM,uBAAuB,mBAAmB;;;;;;;;;;;EAWlE,SAAS,0BAA0B;IACjC,OAAO;MACL,UAAU;MACV,SAAS;MACT,MAAM,SAAS,OAAO,SAAS,OAAO,oBAAoB;QACxD,IAAI,CAAC,oBAAoB;UACvB;;QAEF,mBAAmB,YAAY;;;;;;;;;;;EAWrC,SAAS,sBAAsB;IAC7B,OAAO;MACL,UAAU;MACV,SAAS;MACT,MAAM,SAAS,OAAO,SAAS,OAAO,oBAAoB;QACxD,IAAI,CAAC,oBAAoB;UACvB;;QAEF,mBAAmB,QAAQ;;;;;EAKjC;KACG,OAAO;KACP,UAAU,kBAAkB;KAC5B,UAAU,yBAAyB;KACnC,UAAU,2BAA2B;KACrC,UAAU,uBAAuB;;;AAGtC;ACtFA,CAAC,WAAW;EACV;;;;;;;;;;;;;;;;;;;EAmBA,SAAS,gBAAgB,cAAc,IAAI,YAAY,GAAG;IACxD,IAAI,kBAAkB;;;;;;;;;IAStB,gBAAgB,UAAU;MACxB,oCAAoC;MACpC,6BAA6B;MAC7B,kBAAkB;MAClB,0BAA0B;;;IAG5B,IAAI,UAAU,gBAAgB;;;;;;IAM9B,IAAI,kBAAkB;IACtB,gBAAgB,QAAQ,sCAAsC;IAC9D,gBAAgB,QAAQ,+BAA+B;IACvD,gBAAgB,QAAQ,oBAAoB;IAC5C,gBAAgB,QAAQ,4BAA4B;;;;;;;IAOpD,IAAI,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;IAoBvB,SAAS,OAAO,SAAS,OAAO;MAC9B,qBAAqB;MACrB,IAAI,aAAa;MACjB,WAAW,WAAW;MACtB,EAAE,OAAO,UAAU;;MAEnB,aAAa,UAAU,aAAa,MAAM,sBAAsB;QAC9D,SAAS;QACT,OAAO;;;;;;;;;;;IAWX,SAAS,UAAU,UAAU;MAC3B,EAAE,KAAK,UAAU,UAAU,OAAO,KAAK;QACrC,OAAO,KAAK;;;;;;;;;;;;;;IAchB,SAAS,IAAI,SAAS;MACpB,IAAI,EAAE,IAAI,UAAU,UAAU;QAC5B,OAAO,SAAS;;;;MAIlB,QAAQ,MAAM;QACZ;;;;;;;;;;;IAWJ,SAAS,UAAU,SAAS,UAAU;MACpC,WAAW,IAAI,aAAa,MAAM;QAChC,UAAU,OAAO,MAAM;UACrB,IAAI,KAAK,YAAY,SAAS;YAC5B,SAAS,KAAK;;;MAGpB,OAAO,IAAI;;;;;;;;IAQb,SAAS,qBAAqB,OAAO;MACnC,QAAQ,OAAO;QACb,KAAK;QACL,KAAK;QACL,KAAK;UACH;QACF;UACE,MAAM,IAAI,MAAM,sCAAsC,OAAO;YAC3D;;;;;;IAMR,OAAO;MACL,SAAS;MACT,QAAQ;MACR,WAAW;MACX,KAAK;MACL,WAAW;;;;;EAIf;KACG,OAAO;KACP,QAAQ,mBAAmB;;AAEhC;ACzKA,CAAC,YAAY;EACX;;;;;;EAMA,SAAS,eAAe,cAAc,YAAY,QAAQ,GAAG,UAAU;IACrE,IAAI,iBAAiB;;IAErB,eAAe,iBAAiB;;IAEhC,OAAO,aAAa,CAAC,OAAO,OAAO,WAAW;MAC5C,CAAC,OAAO;MACR,OAAO,OAAO;;;;;;;;;;;;IAYhB,eAAe,iBAAiB,YAAY;;MAE1C,IAAI,WAAW,eAAe;;MAE9B,IAAI,SAAS,SAAS,eAAe;QACnC,OAAO;;MAET,IAAI,SAAS,SAAS,iBAAiB;QACrC,IAAI,SAAS,iBAAiB,cAAc;UAC1C,OAAO;;QAET,IAAI,SAAS,iBAAiB,YAAY;UACxC,OAAO;;;MAGX,QAAQ,MAAM;;;;;;;IAOhB,eAAe,qBAAqB,YAAY;MAC9C,IAAI,OAAO,eAAe;MAC1B,OAAO,KAAK,OAAO,GAAG,gBAAgB,KAAK,UAAU;;;;;;;;;;;IAWvD,eAAe,UAAU,YAAY;MACnC,IAAI,UAAU,OAAO,WAAW;;;MAGhC,IAAI,UAAU,SAAS,UAAU,KAAK;QACpC,OAAO;;MAET,IAAI,WAAW,SAAS,UAAU,KAAK;QACrC,OAAO;;;;MAIT,IAAI,KAAK,MAAM,aAAa,SAAS;QACnC,OAAO,QAAQ,QAAQ;;;MAGzB,OAAO;;;;;;;;;;;;IAYT,eAAe,WAAW,YAAY;MACpC,OAAO,OAAO,cAAc;;;;;;;;;;;;IAY9B,SAAS,iBAAiB,QAAQ;;MAEhC,IAAI,OAAO,SAAS,eAAe;QACjC,OAAO,MAAM,OAAO;;MAEtB,IAAI,OAAO,SAAS,iBAAiB;QACnC,IAAI,OAAO,iBAAiB,cAAc;UACxC,OAAO,MAAM,OAAO;;QAEtB,IAAI,OAAO,iBAAiB,YAAY;UACtC,OAAO,MAAM,OAAO;;;;MAIxB,OAAO;;;;;;;;IAQT,eAAe,iBAAiB,YAAY;MAC1C,eAAe,iBAAiB;MAChC,eAAe,qBAAqB;MACpC,SAAS,WAAW;QAClB,eAAe,qBAAqB;QACpC,eAAe,iBAAiB;SAC/B;MACH,aAAa,UAAU,aAAa,MAAM;QACxC,EAAE,YAAY,OAAO;;;;;IAKzB,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,SAAS,OAAO,OAAO;UACzB,eAAe;;;;;IAKrB,OAAO;MACL,EAAE,OAAO,OAAO,WAAW,cAAc;;;;IAI3C,OAAO,aAAa,eAAe,WAAW;;;IAG9C,OAAO;;;;EAGT;KACG,OAAO;KACP,WAAW,kBAAkB;;;AAGlC;ACjKA,CAAC,WAAW;EACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+DA,SAAS,mBAAmB,eAAe,cAAc;8BAC7B,WAAW;;;;;;;;;IASrC,SAAS,sBAAsB,YAAY;MACzC,OAAO,0BAA0B,CAAC;;;;;;;;;;IAUpC,SAAS,wBAAwB,QAAQ;MACvC,OAAO,0BAA0B,OAAO;SACrC,KAAK,UAAU,aAAa;UAC3B,aAAa,UAAU,aAAa,MAAM;YACxC,EAAE,IAAI,OAAO,IAAI,OAAO,YAAY;UACtC,OAAO;;;;;;;;;;IAUb,SAAS,0BAA0B,UAAU;MAC3C,IAAI,eAAe,cAAc,QAAQ,UAAU;MACnD,IAAI,cAAc,cAAc,QAAQ;;MAExC,IAAI,YAAY;QACd,OAAO;UACL,QAAQ;UACR,QAAQ;YACN,MAAM;YACN,IAAI;YACJ,YAAY;;UAEd,SAAS;;;;MAIb,IAAI,cAAc,UAAU,WAAW,iBAAiB,IAAI;MAC5D,OAAO,YAAY,MAAM,IAAI,UAAU;;;IAGzC,OAAO;MACL,yBAAyB;MACzB,uBAAuB;;;;;EAI3B;KACG,OAAO;KACP,QAAQ,sBAAsB;;AAEnC;AClIA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,aAAa;IACpB,OAAO;;;MAGL,UAAU;;;;MAIV,OAAO;;;;QAIL,YAAY;QACZ,OAAO;QACP,QAAQ;QACR,aAAa;;;;;;MAMf,YAAY;MACZ,aAAa;;;;EAIjB;KACG,OAAO;KACP,UAAU,cAAc;;;AAG7B;ACvCA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,iBAAiB;IACxB,OAAO;MACL,UAAU;MACV,MAAM,SAAS,OAAO,SAAS;QAC7B,QAAQ,MAAM;;;;;EAKpB;KACG,OAAO;KACP,UAAU,kBAAkB;;;AAGjC;ACvBA,CAAC,YAAY;EACX;;;;;;;;;;;;;;EAcA,SAAS,mBAAmB,GAAG;IAC7B,IAAI,qBAAqB;QACrB,WAAW;UACT,gBAAgB;YACd,MAAM;YACN,QAAQ;YACR,YAAY;;UAEd,aAAa;YACX,MAAM;YACN,QAAQ;YACR,YAAY;;UAEd,eAAe;YACb,MAAM;YACN,QAAQ;YACR,YAAY;;UAEd,YAAY;YACV,MAAM;YACN,QAAQ;YACR,YAAY;;;;IAIpB,mBAAmB,SAAS,WAAW;MACrC,OAAO;;;IAGT,mBAAmB,gBAAgB,WAAW;MAC5C,OAAO,EAAE,OAAO;;;;;;;;IAQlB,mBAAmB,gBAAgB,SAAS,WAAW;MACrD,OAAO,SAAS,cAAc;;;IAGhC,mBAAmB,QAAQ,SAAS,WAAW;MAC7C,OAAO,SAAS,cAAc,YAAY;;;IAG5C,mBAAmB,cAAc,SAAS,UAAU;MAClD,OAAO,eAAe;;;IAGxB,mBAAmB,UAAU,SAAS,WAAW;MAC/C,OAAO,SAAS,cAAc,YAAY;;;IAG5C,mBAAmB,cAAc,SAAS,WAAW;MACnD,OAAO,SAAS,cAAc,YAAY;;;;;;;;;;IAU5C,SAAS,cAAc,WAAW;MAChC,YAAY,QAAQ,UAAU;MAC9B,IAAI,CAAC,aAAa,cAAc,OAAO;QACrC,YAAY;aACP,IAAI,cAAc,cAAc;QACrC,YAAY;;MAEd,OAAO;;;;;;;;;;IAUT,SAAS,eAAe,UAAU;MAChC,WAAW,QAAQ,UAAU;MAC7B,IAAI,CAAC,YAAY,aAAa,gBAAgB;QAC5C,OAAO;aACF,IAAI,aAAa,aAAa;QACnC,OAAO;;MAET,OAAO,SAAS,OAAO,GAAG,gBAAgB,SAAS,MAAM,GAAG;;;IAG9D,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,sBAAsB;;;AAGnC;ACnHA,CAAC,YAAY;EACX;;;;;;EAMA,SAAS,cAAc,YAAY,QAAQ,UAAU,cAAc;yBAC5C,kBAAkB,cAAc,eAAe;yBAC/C,iBAAiB,YAAY,iBAAiB;;IAEnE,IAAI,gBAAgB;;IAEpB,cAAc,WAAW;IACzB,cAAc,UAAU;IACxB,cAAc,0BAA0B;;IAExC,cAAc;MACZ,WAAW;;IAEb,cAAc,mBAAmB,WAAW;MAC1C,GAAG,cAAc,UAAU;QACzB,MAAM,YAAY,OAAO,OAAO,KAAK;QACrC,cAAc;;;;;IAKlB,cAAc,kBAAkB,SAAS,QAAQ,OAAO;MACtD,cAAc,UAAU;MACxB,IAAI,CAAC,EAAE,YAAY,QAAQ;QACzB,cAAc,0BAA0B;;MAE1C,GAAG,CAAC,cAAc,UAAU;QAC1B,aAAa,UAAU,aAAa,MAAM;UACxC,CAAC,MAAM,OAAO;YACZ,aAAa;YACb,SAAS;aACR;;;;IAIT,cAAc,0BAA0B,SAAS,QAAQ;MACvD,aAAa,UAAU,aAAa,MAAM;UACtC;;;IAGN,cAAc,YAAY,WAAW;MACnC,OAAO,OAAO;;;IAGhB,cAAc,OAAO,WAAW;MAC9B,iBAAiB,cAAc,OAAO,OAAO,IAAI;MACjD,GAAG,aAAa,MAAM,SAAS,aAAa,QAAQ,OAAO,OAAO,IAAI;QACpE,aAAa,UAAU,aAAa,MAAM;UACxC,CAAC,MAAM,aAAa;YAClB,aAAa;YACb,UAAU,aAAa;;;;IAI/B,cAAc,aAAa,SAAS,QAAQ,QAAQ,aAAa;MAC/D,OAAO;MACP,aAAa,UAAU,aAAa,MAAM;QACxC,CAAC,UAAU,QAAQ,eAAe,cAAc;;;IAGpD,cAAc,WAAW,SAAS,QAAQ,QAAQ;MAChD,OAAO;MACP,aAAa,UAAU,aAAa,MAAM;QACxC,QAAQ;;;IAGZ,cAAc,aAAa,SAAS,QAAQ,QAAQ;MAClD,OAAO;MACP,aAAa,UAAU,aAAa,MAAM;QACxC,QAAQ;;;IAGZ,cAAc,SAAS,SAAS,QAAQ,QAAQ,QAAQ;MACtD,gBAAgB,wBAAwB,QAAQ,QAAQ;;;IAG1D,cAAc,gBAAgB,SAAS,UAAU;MAC/C,OAAO,cAAc,QAAQ;;;IAG/B,cAAc,sBAAsB,SAAS,MAAM;MACjD,aAAa,gBAAgB,OAAO,gBAAgB;QAClD,IAAI;MACN,IAAI,MAAM;;QAER,MAAM,OAAO,OAAO,KAAK;;;;IAI7B,IAAI,mBAAmB,gBAAgB,QAAQ;IAC/C,OAAO,kBAAkB,gBAAgB,UAAU;MACjD,UAAU,MAAM;QACd,OAAO,kBAAkB;;;IAG7B,WAAW,IAAI,aAAa,MAAM;MAChC,SAAS,OAAO,MAAM;QACpB,cAAc,4BAA4B;;;IAG9C,cAAc,wBAAwB,YAAY;MAChD,IAAI,cAAc,2BAA2B;QAC3C,aAAa,UAAU,aAAa,MAAM;UACxC;;WAEC;QACH,gBAAgB,OAAO,kBAAkB,CAAC,OAAO;;;;IAIrD,OAAO,kBAAkB;IACzB,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,KAAK,OAAO,OAAO,OAAO,IAAI;UAChC,OAAO,kBAAkB,KAAK;;;;IAIpC,cAAc,mBAAmB,WAAW;MAC1C,gBAAgB;;;IAGlB,OAAO,IAAI,YAAY,YAAY;MACjC,SAAS,OAAO,SAAS;MACzB,SAAS,OAAO,SAAS;;;IAG3B,cAAc,mBAAmB,UAAU,QAAQ;MACjD,cAAc;QACZ,WAAW,oBAAoB,OAAO;MACxC,cAAc;QACZ,iBAAiB,qBAAqB,cAAc;UAClD,OAAO;MACX,cAAc,iBAAiB,cAAc,iBAAiB;MAC9D,cAAc;QACZ,CAAC,WAAW,sBAAsB;MACpC,cAAc,eAAe;MAC7B,cAAc,eAAe;;;IAG/B,cAAc,eAAe,UAAU,MAAM;MAC3C,cAAc,eAAe;MAC7B,cAAc;QACZ,cAAc,eAAe,KAAK;MACpC,cAAc;QACZ,iBAAiB,qBAAqB,cAAc;UAClD,KAAK;MACT,cAAc,iBAAiB;MAC/B,cAAc,qBAAqB;;;IAGrC,cAAc,6BAA6B,WAAW;MACpD,OAAO,CAAC,EAAE,QAAQ,cAAc;;;IAGlC,cAAc,kBAAkB,SAAS,QAAQ;MAC/C,IAAI,CAAC,cAAc,UAAU;QAC3B,aAAa,UAAU,aAAa,MAAM;+BACnB,CAAC,MAAM,OAAO;iCACZ,aAAa;iCACb,SAAS;kCACR;;;;IAI9B,SAAS,mBAAmB;MAC1B,GAAG,CAAC,cAAc,UAAU;QAC1B,OAAO,OAAO,YAAY;UACxB,aAAa,UAAU,aAAa,MAAM;YACxC,CAAC,MAAM,OAAO,OAAO;cACnB,aAAa;cACb,SAAS,OAAO;;;;;IAK1B,OAAO;;;;EAGT;KACG,OAAO;KACP,WAAW,iBAAiB;;;AAGjC;AC/LA,CAAC,YAAY;EACX;;;;;;;;;EASA,SAAS,iBAAiB,GAAG,WAAW,YAAY,QAAQ;IAC1D,SAAS,gBAAgB,cAAc,oBAAoB;IAC3D,iBAAiB,YAAY,UAAU;IACvC,IAAI,mBAAmB;QACnB,iBAAiB;QACjB;;IAEJ,iBAAiB,gBAAgB,SAAS,IAAI,YAAY;MACxD,eAAe,MAAM;;;IAGvB,iBAAiB,uBAAuB,SAAS,kBAAkB,QAAQ;MACzE,OAAO,wBAAwB,kBAAkB;;;IAGnD,WAAW,IAAI,aAAa,MAAM;MAChC,SAAS,OAAO,MAAM;QACpB,IAAI,gBAAgB,eAAe,KAAK;QACxC,IAAI,eAAe;UACjB,cAAc,oBAAoB,KAAK;;;;;;;;;;IAU7C,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,kBAAkB,eAAe,KAAK;YACtC,kBAAkB,eAAe;YACjC,YAAY,KAAK;;QAErB,aAAa,UAAU,aAAa,MAAM;UACxC;YACE,WAAW,gBAAgB;;;QAG/B,GAAG,iBAAiB;UAClB,gBAAgB,iBAAiB;;UAEjC,IAAI,gBAAgB,iBAAiB,KAAK,IAAI;YAC5C,YAAY,iBAAiB;;;YAG7B,GAAG,WAAW;cACZ,gBAAgB,cAAc;cAC9B,aAAa,UAAU,aAAa,MAAM;gBACxC;kBACE,WAAW,gBAAgB;kBAC3B,WAAW,mBAAmB,cAAc;kBAC5C,WAAW,aAAa;kBACxB,WAAW,aAAa;;;;;UAKhC,iBAAiB,OAAO,gBAAgB;UACxC,eAAe,KAAK;UACpB,YAAY,iBAAiB;;UAE7B,aAAa,UAAU,aAAa,MAAM,mBAAmB;;;UAG7D,GAAG,WAAW;YACZ,GAAG,OAAO,QAAQ,SAAS,6BAA6B;cACtD,OAAO,GAAG,6BAA6B;gBACrC,MAAM,KAAK;gBACX,YAAY,KAAK,MAAM;;mBAEpB;cACL,UAAU,OAAO,MAAM,KAAK;cAC5B,UAAU,OAAO,YAAY,KAAK,MAAM;;;eAGvC;UACL,eAAe,eAAe,0BAA0B,KAAK;;;;;;;;IAQnE,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,cAAc;QAClB,GAAG,KAAK,OAAO,QAAQ;;UAErB,cAAc,KAAK;UACnB,GAAG,EAAE,YAAY,cAAc;;YAE7B,IAAI,gBAAgB,eAAe,KAAK,OAAO;YAC/C,cAAc,cAAc;YAC5B,GAAG,KAAK,OAAO,QAAQ;cACrB,cAAc,0BAA0B,GAAG;cAC3C,cAAc,KAAK,OAAO,QAAQ,SAAS;;;;QAIjD,mBAAmB,KAAK,QAAQ,KAAK,OAAO,QAAQ;;;IAGxD,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,cAAc;UAChB,IAAI,gBAAgB,eAAe;UACnC,IAAI,SAAS,cAAc;;UAE3B,IAAI,aAAa,KAAK;UACtB,IAAI,UAAU,WAAW;;UAEzB,IAAI,gBAAgB,OAAO,UAAU,QAAQ,SAAS;;;UAGtD,IAAI,eAAe;YACjB,IAAI,cAAc,OAAO,aAAa;;YAEtC,IAAI,QAAQ,SAAS,aAAa;cAChC,IAAI,iBAAiB,EAAE,KAAK;;;cAG5B,UAAU,EAAE,OAAO,OAAO,aAAa,SAAS;gBAC9C,UAAU,SAAS,WAAW;kBAC5B,IAAI,WAAW,OAAO;kBACtB,IAAI,SAAS,OAAO;kBACpB,OAAO;;;YAGb,IAAI,QAAQ,SAAS,aAAa;cAChC,UAAU,EAAE,MAAM,SAAS;;;YAG7B,mBAAmB,QAAQ;iBACtB;YACL,mBAAmB,QAAQ,QAAQ;;;;;;;;;IAS3C,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,QAAQ;QACvB,IAAI,WAAW,sBAAsB,SAAS;UAC5C,mBAAmB,QAAQ,OAAO;;;;;;;;IAQxC,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,QAAQ;QACvB,GAAG,cAAc;UACf,YAAY,eAAe,eAAe;UAC1C,eAAe;UACf,gBAAgB,iBAAiB;;;QAGnC,UAAU,OAAO,YAAY;QAC7B,GAAG,CAAC,QAAQ;UACV,UAAU,OAAO,MAAM;;;;QAIzB,IAAI,QAAQ;UACV,SAAS,WAAW;YAClB,OAAO,WAAW,WAAW,UAAU,YAAY,OAAO;;;;;;;;;IASlE,WAAW,IAAI,aAAa,MAAM;OAC/B;;;;;;IAMH,WAAW,IAAI,aAAa,MAAM;OAC/B;;;;;;IAMH,WAAW,IAAI,aAAa,MAAM;OAC/B;;;;;;IAMH,WAAW,IAAI,aAAa,MAAM;OAC/B;;IAEH,SAAS,mBAAmB,QAAQ,SAAS;MAC3C,IAAI,QAAQ;MACZ,IAAI,OAAO,QAAQ;QACjB,IAAI,gBAAgB,eAAe,OAAO;QAC1C,QAAQ,cAAc;;MAExB,OAAO,gBAAgB,SAAS;MAChC,aAAa,UAAU,aAAa,MAAM;QACxC;MACF,aAAa,UAAU,aAAa,MAAM;QACxC;;;IAGJ,SAAS,mBAAmB,QAAQ,UAAU;;MAE5C,OAAO,kBAAkB,SAAS;;MAElC,aAAa,UAAU,aAAa,MAAM;QACxC;MACF,aAAa,UAAU,aAAa,MAAM;QACxC;;;IAGJ,SAAS,iBAAiB,OAAO,QAAQ;OACtC,IAAI,gBAAgB,eAAe,OAAO;OAC1C,cAAc,iBAAiB;;;IAGlC,SAAS,aAAa,OAAO,MAAM;MACjC,IAAI,gBAAgB,eAAe,KAAK,OAAO;MAC/C,cAAc,aAAa;MAC3B,aAAa,UAAU,aAAa,MAAM;QACxC,KAAK;;;IAGT,SAAS,YAAY,eAAe,YAAY;;MAE9C,GAAG,cAAc,aAAa,YAAY;QACxC,cAAc,WAAW,cAAc;;;;IAI3C,SAAS,SAAS,OAAO,QAAQ;MAC/B,IAAI,gBAAgB,eAAe,OAAO;MAC1C,cAAc;;;;;;;;;;;IAWhB,SAAS,wBAAwB,YAAY,QAAQ;MACnD,IAAI,kBAAkB;MACtB,IAAI,WAAW,OAAO,gBAAgB;QACpC,OAAO;;MAET,kBAAkB,QAAQ;OACzB,mBAAmB,iBAAiB,CAAC,IAAI;;MAE1C,GAAG,OAAO,QAAQ;QAChB,GAAG,WAAW,iBAAiB,SAAS;UACtC,kBAAkB,QAAQ;WACzB,iBAAiB,CAAC,IAAI;eAClB,GAAG,WAAW,oBAAoB,SAAS;YAC9C,kBAAkB,QAAQ;aACzB,iBAAiB,CAAC,IAAI;;;;MAI7B,IAAI,YAAY;QACd,kBAAkB,QAAQ;SACzB,iBAAiB,CAAC,IAAI;;;MAGzB,OAAO,QAAQ,UAAU,iBAAiB,CAAC,IAAI,IAAI,WAAW;;;IAGhE,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,oBAAoB;;;;AAIjC;AClTA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,YAAY;IACnB,OAAO;MACL,UAAU;MACV,UAAU,CAAC,UAAU;MACrB,OAAO;QACL,QAAQ;QACR,aAAa;QACb,eAAe;;MAEjB,YAAY;MACZ,aAAa;MACb,MAAM,SAAS,OAAO,SAAS,MAAM,eAAe;QAClD,cAAc;;;;;EAKpB;KACG,OAAO;KACP,UAAU,aAAa;;;AAG5B;AC9BA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,kBAAkB;IACzB,OAAO;MACL,UAAU;MACV,UAAU,CAAC;MACX,OAAO;QACL,QAAQ;;MAEV,aAAa;;;;EAIjB;KACG,OAAO;KACP,UAAU,mBAAmB;;;AAGlC;ACxBA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,YAAY,WAAW,YAAY;;IAE1C,SAAS,YAAY,UAAU;MAC7B,IAAI,WAAW,UAAU,WAAW,eAAe,IAAI;QACrD,OAAO;UACL,QAAQ;UACR,QAAQ;YACN,UAAU;;;;MAIhB,OAAO,SAAS,QAAQ;;;IAG1B,SAAS,YAAY;MACnB,IAAI,SAAS,UAAU,WAAW,aAAa,IAAI;QACjD,OAAO;UACL,QAAQ;;;MAGZ,OAAO,OAAO,QAAQ;;;IAGxB,OAAO;MACL,UAAU;QACR,QAAQ;UACN,aAAa;;;MAGjB,aAAa;MACb,WAAW;;;;EAGf;KACG,OAAO;KACP,QAAQ,eAAe;;AAE5B;AC7CA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,WAAW,YAAY,GAAG;;;;;;;;;;IAUjC,SAAS,gBAAgB,WAAW,QAAQ,OAAO;MACjD,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO;QAClC,OAAO;;MAET,OAAO,EAAE,OAAO,WAAW,UAAU,UAAU;QAC7C,OAAO,UAAU,UAAU,QAAQ;;;;;;;;IAQvC,SAAS,iBAAiB,WAAW;MACnC,IAAI,eAAe;MACnB,IAAI,MAAM,OAAO,KAAK,WAAW,OAAO,UAAU,IAAI;QACpD,OAAO,GAAG,QAAQ,SAAS,CAAC;;MAE9B,IAAI,QAAQ,SAAS,IAAI;QACvB,aAAa,OAAO,UAAU;;MAEhC,OAAO;;;IAGT,SAAS,kBAAkB,WAAW;MACpC,IAAI,eAAe;MACnB,IAAI,MAAM,OAAO,KAAK,WAAW,OAAO,UAAU,IAAI;QACpD,OAAO,GAAG,QAAQ,SAAS,CAAC;;MAE9B,IAAI,QAAQ,SAAS,IAAI;QACvB,aAAa,KAAK,UAAU;;MAE9B,OAAO;;;;IAIT,SAAS,UAAU,UAAU,QAAQ,OAAO;MAC1C,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO;QACjC,OAAO;;MAET,OAAO,EAAE,IAAI,QAAQ,SAAS,OAAO;QACnC,OAAO,EAAE,IAAI,OAAO,SAAS,MAAM;UACjC,OAAO,WAAW,OAAO,SAAS,QAAQ,MAAM;;;;;IAKtD,OAAO;MACL,mBAAmB;MACnB,kBAAkB;MAClB,qBAAqB;;;;EAGzB;KACG,OAAO;KACP,QAAQ,cAAc;;AAE3B;AC3EA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,WAAW,oBAAoB,GAAG;;IAEzC,SAAS,oBAAoB,QAAQ;MACnC,IAAI,iBAAiB,SAAS;QAC5B,OAAO,mBAAmB,cAAc;;WAErC,IAAI,oBAAoB,SAAS;QACpC,OAAO,mBAAmB,cAAc;;WAErC,IAAI,sBAAsB,SAAS;QACtC,OAAO,mBAAmB,cAAc;;WAErC;QACH,OAAO,OAAO;;;;IAIlB,SAAS,sBAAsB,QAAQ;;;MAGrC,IAAI,UAAU,EAAE,MAAM,OAAO;QAC3B,SAAS,aAAa,OAAO;UAC3B,OAAO,YAAY;YACjB,YAAY,OAAO,gBAAgB;;MAEzC,OAAO,CAAC;;;IAGV,SAAS,iBAAiB,QAAQ;MAChC,OAAO,EAAE,QAAQ,EAAE,QAAQ,OAAO;;;IAGpC,SAAS,oBAAoB,QAAQ;MACnC,OAAO,EAAE,QAAQ,OAAO,iBAAiB;QACvC,OAAO,gBAAgB;;;IAG3B,SAAS,YAAY,OAAO;MAC1B,OAAO,SAAS;;;IAGlB,OAAO;MACL,uBAAuB;MACvB,wBAAwB;MACxB,mBAAmB;MACnB,sBAAsB;;;;EAG1B;KACG,OAAO;KACP,QAAQ,cAAc;;AAE3B;AC5DA,CAAC,WAAW;EACV;;;;;;;;;;EAUA,SAAS,gBAAgB;IACvB,OAAO;MACL,kBAAkB,SAAS,YAAY;QACrC,OAAO,WAAW,GAAG,SAAS,SAAS,WAAW,KAAK,WAAW;;MAEpE,iBAAiB,SAAS,YAAY;QACpC,OAAO,WAAW,GAAG,SAAS,YAAY,WAAW,KAAK,WAAW;;;;EAI3E;KACG,OAAO;KACP,QAAQ,iBAAiB;;AAE9B;ACzBA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,aAAa;IACpB,SAAS,WAAW,KAAK,QAAQ,YAAY;MAC3C,IAAI,cAAc,OAAO,QAAQ;QAC/B,MAAM,IAAI;QACV,SAAS,OAAO;;MAElB,OAAO,IAAI,YAAY,QAAQ,OAAO;;;IAGxC,SAAS,SAAS,KAAK,QAAQ,YAAY;MACzC,IAAI,cAAc,OAAO,QAAQ;QAC/B,MAAM,IAAI;QACV,SAAS,OAAO;;MAElB,OAAO,IAAI,QAAQ,QAAQ,IAAI,SAAS,OAAO,YAAY,CAAC;;;IAG9D,SAAS,OAAO,MAAM,IAAI,YAAY;MACpC,IAAI,cAAc,QAAQ,IAAI;QAC5B,OAAO,KAAK;QACZ,KAAK,GAAG;;MAEV,OAAO,SAAS;;;IAGlB,OAAO;MACL,aAAa;MACb,aAAa;MACb,aAAa;;;EAGjB;KACG,OAAO;KACP,QAAQ,cAAc;;AAE3B;AC5CA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,WAAW,WAAW,OAAO,IAAI,cAAc,GAAG;;IAEzD,IAAI,CAAC,SAAS,QAAQ;MACpB,SAAS;QACP,OAAO,SAAS,WAAW,OAAO,OAAO,SAAS;SACjD,OAAO,SAAS,QAAQ,MAAM,OAAO,SAAS,QAAQ;;;IAG3D,IAAI,aAAa;MACf,kBAAkB;MAClB,aAAa;MACb,UAAU;MACV,OAAO;MACP,oBAAoB,SAAS,SAAS,SAAS;QAC7C;;IAEJ,WAAW,oBAAoB;;IAE/B,WAAW,OAAO,YAAY;MAC5B,IAAI,SAAS;QACX,OAAO,GAAG,KAAK;;WAEZ;;;;;;;;;;;QAWH,OAAO,MAAM,IAAI,YAAY,KAAK,UAAU,UAAU;UACpD,IAAI,SAAS,SAAS;UACtB,IAAI,OAAO,SAAS;YAClB,UAAU,OAAO;iBACZ;YACL,IAAI,aAAa,OAAO,QAAQ,QAAQ,QAAQ;gBAC5C,QAAQ,SAAS,KAAK,QAAQ;;YAElC,WAAW,oBAAoB,SAAS,SAAS,SAAS;YAC1D,GAAG,SAAS,GAAG;cACb,WAAW,oBAAoB,SAAS,KAAK,UAAU,GAAG;;YAE5D,WAAW,oBAAoB,WAAW;cACxC,QAAQ,QAAQ;YAClB,UAAU,WAAW,oBAAoB;;;;;;;UAO3C,OAAO,EAAE,UAAU;YACjB,SAAS;YACT,MAAM;YACN,SAAS;YACT,QAAQ;YACR,WAAW;YACX,UAAU;YACV,QAAQ;YACR,UAAU;YACV,aAAa;YACb,YAAY;YACZ,aAAa;aACZ,MAAM;;;UAGT,WAAW,cAAc,KAAK;UAC9B,WAAW,kBAAkB,KAAK;UAClC,WAAW,oBAAoB,KAAK;UACpC,WAAW,yBAAyB,KAAK;UACzC,WAAW,iBAAiB,KAAK;UACjC,WAAW,oBAAoB,KAAK;UACpC,WAAW,cAAc,KAAK;UAC9B,WAAW,gBAAgB,KAAK;UAChC,WAAW,kBAAkB,KAAK;UAClC,WAAW,iBAAiB,KAAK;UACjC,WAAW,kBAAkB,KAAK;;UAElC,WAAW,eAAe,SAAS,aAAa,aAAa;YAC3D,OAAO,WAAW,oBAAoB;cACpC,cAAc,OAAO;;;UAGzB,WAAW,iBAAiB,WAAW;YACrC;;;;;;;;IAQR,WAAW,YAAY,UAAU,KAAK;MACpC,OAAO,UAAU,SAAS;;;IAG5B,WAAW,cAAc,UAAU,cAAc,MAAM;MACrD,OAAO,kBAAkB,MAAM;QAC7B,yBAAyB;;;IAG7B,WAAW,mBAAmB,UAAU,QAAQ;MAC9C,OAAO,oBAAoB,MAAM,SAAS;;;IAG5C,WAAW,uBAAuB,oBAAoB;;IAEtD,OAAO;;;;;;;;;IASP,SAAS,UAAU;MACjB,OAAO,UAAU,MAAM,UAAU,KAAK,KAAK,WAAW;;;;;;IAMxD,SAAS,MAAM,KAAK;MAClB,OAAO,SAAS,KAAK;QACnB,OAAO,IAAI;;;;;;EAKjB;KACG,OAAO;KACP,QAAQ,cAAc;;AAE3B","file":"app.js","sourcesContent":["(function() {\n 'use strict';\n\n /**\n * Root application\n * app.js\n */\n angular.module(\n 'app', [\n 'ngResource',\n 'ngAnimate',\n 'ui.router',\n 'templates',\n 'cfp.hotkeys',\n 'focusOn',\n 'monospaced.elastic',\n 'gettext',\n 'diff-match-patch'\n ]);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name AppConfig\n * @description Main config for the entire app\n * @ngInject\n */\n function AppConfig($stateProvider, $urlRouterProvider, $httpProvider,\n hotkeysProvider) {\n\n //Can't use injection for EventService as this module is out of the scope\n var interceptor = function($q, $rootScope) {\n return {\n request: function(config) {\n // See EventService.EVENT.LOADING_START\n $rootScope.$broadcast('loadingStart');\n return config;\n },\n requestError: function(rejection) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n console.error('Request error due to ', rejection);\n return $q.reject(rejection);\n },\n response: function(response) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n return response || $q.when(response);\n },\n responseError: function(rejection) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n if (rejection.status === 401) {\n console.error('Unauthorized access. Please login');\n } else if (rejection.status === 404) {\n console.error('Service end point not found- ',\n rejection.config.url);\n } else {\n console.error('Error in response ', rejection);\n }\n return $q.reject(rejection);\n }\n };\n };\n\n $httpProvider.interceptors.push(interceptor);\n\n // For any unmatched url, redirect to /editor\n $urlRouterProvider.otherwise('/');\n\n $stateProvider\n .state('editor', {\n url: '/:projectSlug/:versionSlug/translate',\n templateUrl: 'editor/editor.html',\n controller: 'EditorCtrl as editor',\n resolve: {\n url : function(UrlService) {\n return UrlService.init();\n }\n }\n }).state('editor.selectedContext', {\n url: '/:docId/:localeId',\n views: {\n 'editor-content': {\n templateUrl: 'editor/editor-content.html',\n controller: 'EditorContentCtrl as editorContent'\n },\n 'editor-suggestions': {\n templateUrl: 'editor/editor-suggestions.html',\n controller: 'EditorSuggestionsCtrl as editorSuggestions'\n },\n 'editor-details': {\n templateUrl: 'editor/editor-details.html',\n controller: 'EditorDetailsCtrl as editorDetails'\n }\n }\n }).state('editor.selectedContext.tu', {\n url: '/?id&selected?states',\n reloadOnSearch: false\n });\n\n hotkeysProvider.includeCheatSheet = false;\n\n // $locationProvider.html5Mode(true);\n // .hashPrefix('!');\n }\n\n angular\n .module('app')\n .config(AppConfig);\n\n})();\n\n\n\n","(function() {\n 'use strict';\n\n /**\n * AddConstants\n * \"Global\" app variables. Don't worry David, they're not really global.\n */\n angular\n .module('app')\n .constant('_', window._)\n .constant('str', window._.string)\n .constant('Mousetrap', window.Mousetrap)\n // Toggle to hide/show features that are ready for production\n .constant('PRODUCTION', true);\n\n})();\n\n\n","(function() {\n 'use strict';\n\n /**\n * @name AppCtrl\n * @description Main controler for the entire app\n * @ngInject\n */\n function AppCtrl($scope, UserService, UrlService, LocaleService,\n MessageHandler, gettextCatalog, StringUtil, PRODUCTION) {\n var appCtrl = this;\n\n // See AppConstants.js\n appCtrl.PRODUCTION = PRODUCTION;\n appCtrl.settings = UserService.settings;\n appCtrl.uiLocaleList = [ LocaleService.DEFAULT_LOCALE ];\n\n /*\n Not used for the time being. But should show loading when change state\n $scope.$on('$stateChangeStart', function(event, toState) {\n if (toState.resolve) {\n }\n });\n\n $scope.$on('$stateChangeSuccess', function(event, toState) {\n if (toState.resolve) {\n }\n });\n */\n\n UrlService.init().then(loadLocales).\n then(loadUserInformation).\n then(loadUILocale);\n\n // On UI locale changes listener\n appCtrl.onChangeUILocale = function(locale) {\n appCtrl.myInfo.locale = locale;\n var uiLocaleId = appCtrl.myInfo.locale.localeId;\n if (!StringUtil.startsWith(uiLocaleId,\n LocaleService.DEFAULT_LOCALE.localeId, true)) {\n gettextCatalog.loadRemote(UrlService.uiTranslationURL(uiLocaleId))\n .then(\n function() {\n gettextCatalog.setCurrentLanguage(uiLocaleId);\n },\n function(error) {\n MessageHandler.displayInfo('Error loading UI locale. ' +\n 'Default to \\'' + LocaleService.DEFAULT_LOCALE.name +\n '\\': ' + error);\n gettextCatalog.setCurrentLanguage(\n LocaleService.DEFAULT_LOCALE);\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n });\n } else {\n gettextCatalog.setCurrentLanguage(\n LocaleService.DEFAULT_LOCALE.localeId);\n }\n };\n\n appCtrl.dashboardPage = function() {\n return UrlService.DASHBOARD_PAGE;\n };\n\n function loadLocales() {\n return LocaleService.getAllLocales();\n }\n\n function loadUserInformation() {\n return UserService.getMyInfo().then(\n function(myInfo) {\n appCtrl.myInfo = myInfo;\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n appCtrl.myInfo.gravatarUrl = UrlService.gravatarUrl(\n appCtrl.myInfo.gravatarHash, 72);\n }, function(error) {\n MessageHandler.displayError('Error loading my info: ' + error);\n });\n }\n\n function loadUILocale() {\n LocaleService.getUILocaleList().then(\n function(translationList) {\n for ( var i in translationList.locales) {\n var language = {\n 'localeId' : translationList.locales[i],\n 'name' : ''\n };\n appCtrl.uiLocaleList.push(language);\n }\n appCtrl.myInfo.locale = LocaleService.getLocaleByLocaleId(\n appCtrl.uiLocaleList, LocaleService.DEFAULT_LOCALE.localeId);\n if (!appCtrl.myInfo.locale) {\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n }\n },\n function(error) {\n MessageHandler.displayInfo('Error loading UI locale. ' +\n 'Default to \\'' + LocaleService.DEFAULT_LOCALE.name +\n '\\': ' + error);\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n });\n }\n }\n\n angular\n .module('app')\n .controller('AppCtrl', AppCtrl);\n\n})();\n\n\n\n","(function() {\n 'use strict';\n\n /**\n * EditorContentCtrl.js\n * @ngInject\n */\n function EditorContentCtrl($rootScope, EditorService, PhraseService,\n DocumentService, UrlService, EventService,\n $stateParams, PhraseUtil, $location, _,\n TransStatusService) {\n\n //TODO: move pager to directives/convert to infinite scroll\n var COUNT_PER_PAGE = 50,\n editorContentCtrl = this, status, filter;\n refreshFilterQueryFromUrl();\n\n editorContentCtrl.phrases = [];\n\n EditorService.updateContext($stateParams.projectSlug,\n $stateParams.versionSlug, DocumentService.decodeDocId($stateParams.docId),\n $stateParams.localeId);\n\n init();\n\n $rootScope.$on(EventService.EVENT.FILTER_TRANS_UNIT,\n function (event, filter) {\n if(filter.status.all === true) {\n $location.search('status', null);\n } else {\n var queries = [];\n _.forEach(filter.status, function(val, key) {\n if(val) {\n queries.push(key);\n }\n });\n $location.search('status', queries.join(','));\n }\n refreshFilterQueryFromUrl();\n init();\n });\n\n function refreshFilterQueryFromUrl() {\n status = UrlService.readValue('status');\n\n if(!_.isUndefined(status)) {\n status = status.split(',');\n status = _.transform(status, function(result, state) {\n state = TransStatusService.getServerId(state);\n return result.push(state);\n });\n }\n filter = {\n 'status': status\n };\n }\n\n\n $rootScope.$on(EventService.EVENT.GOTO_FIRST_PAGE,\n function () {\n if(EditorService.currentPageIndex > 0) {\n EditorService.currentPageIndex = 0;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_PREV_PAGE,\n function () {\n if(EditorService.currentPageIndex > 0) {\n EditorService.currentPageIndex -= 1;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_PAGE,\n function () {\n if(EditorService.currentPageIndex < EditorService.maxPageIndex) {\n EditorService.currentPageIndex +=1;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_LAST_PAGE,\n function () {\n if(EditorService.currentPageIndex < EditorService.maxPageIndex) {\n EditorService.currentPageIndex = EditorService.maxPageIndex;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n /*\n TODO: after moving to infinite scroll, all these go to event handler\n should move back to TransUnitService and use PhraseService.findNextId etc\n */\n // EventService.EVENT.GOTO_NEXT_ROW listener\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_ROW, goToNextRow);\n\n // EventService.EVENT.GOTO_PREVIOUS_ROW listener\n $rootScope.$on(EventService.EVENT.GOTO_PREVIOUS_ROW, goToPreviousRow);\n\n // EventService.EVENT.GOTO_NEXT_UNTRANSLATED listener\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_UNTRANSLATED,\n goToNextUntranslated);\n\n function goToNextRow(event, data) {\n var phrases = editorContentCtrl.phrases,\n phrase,\n currentIndex,\n nextIndex,\n nextId;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n nextIndex = Math.min(currentIndex + 1, phrases.length - 1);\n nextId = phrases[nextIndex].id;\n\n if (nextId !== data.currentId) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': nextId,\n 'updateURL': true,\n 'focus': true\n }, null);\n } else {\n // we have reach the end\n phrase = phrases[currentIndex];\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n function goToPreviousRow(event, data) {\n var phrases = editorContentCtrl.phrases,\n phrase,\n currentIndex,\n previousIndex,\n prevId;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n previousIndex = Math.max(currentIndex - 1, 0);\n prevId = phrases[previousIndex].id;\n\n if (prevId !== data.currentId) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': prevId,\n 'updateURL': true,\n 'focus': true\n }, null);\n } else {\n phrase = phrases[currentIndex];\n // have reach the start\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n function goToNextUntranslated(event, data) {\n var phrases = editorContentCtrl.phrases,\n requestStatus = TransStatusService.getStatusInfo(status),\n currentIndex,\n nextStatusInfo;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n\n for (var i = currentIndex + 1; i < phrases.length; i++) {\n nextStatusInfo = TransStatusService.getStatusInfo(\n phrases[i].state);\n if (nextStatusInfo.ID === requestStatus.ID) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': phrases[i].id,\n 'updateURL': true,\n 'focus': true\n }, null);\n return;\n }\n }\n // can not find next untranslated\n //TransUnitService.saveCurrentRowIfModifiedAndUnfocus(data);\n }\n\n function changePage(pageIndex) {\n loadPhrase(pageIndex);\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT);\n }\n\n /**\n * Load transUnit\n *\n * @param projectSlug\n * @param versionSlug\n * @param docId\n * @param localeId\n */\n function init() {\n EventService.emitEvent(EventService.EVENT.REFRESH_STATISTIC,\n {\n projectSlug: EditorService.context.projectSlug,\n versionSlug: EditorService.context.versionSlug,\n docId: EditorService.context.docId,\n localeId: EditorService.context.localeId\n }\n );\n\n PhraseService.getPhraseCount(EditorService.context, filter).\n then(function(count) {\n EditorService.maxPageIndex = parseInt(count / COUNT_PER_PAGE);\n if(count > COUNT_PER_PAGE) {\n EditorService.maxPageIndex = count % COUNT_PER_PAGE !== 0 ?\n EditorService.maxPageIndex +=1 : EditorService.maxPageIndex;\n }\n\n EditorService.maxPageIndex = EditorService.maxPageIndex -1 < 0 ? 0 :\n EditorService.maxPageIndex -1;\n\n loadPhrase(EditorService.currentPageIndex);\n });\n }\n\n function loadPhrase(pageIndex) {\n var startIndex = pageIndex * COUNT_PER_PAGE;\n PhraseService.fetchAllPhrase(EditorService.context, filter,\n startIndex, COUNT_PER_PAGE).then(displayPhrases);\n }\n\n function displayPhrases(phrases) {\n editorContentCtrl.phrases = phrases;\n }\n\n return editorContentCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorContentCtrl', EditorContentCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * EditorCtrl.js\n * @ngInject\n */\n function EditorCtrl($scope, UserService, DocumentService, LocaleService,\n ProjectService, EditorService, SettingsService, StatisticUtil,\n UrlService, $stateParams, $state, MessageHandler, $rootScope,\n EventService, EditorShortcuts, _, Mousetrap) {\n var editorCtrl = this;\n editorCtrl.pageNumber = 1;\n editorCtrl.showCheatsheet = false;\n editorCtrl.shortcuts = _.mapValues(\n _.values(EditorShortcuts.SHORTCUTS), function(shortcutInfo) {\n // second combo (secondary keys) is an array. We have to flatten it\n var keyCombos = _.flatten(shortcutInfo.keyCombos, 'combo');\n return {\n combos: _.map(keyCombos, function(key) {\n return EditorShortcuts.symbolizeKey(key);\n }),\n description: shortcutInfo.keyCombos[0].description\n };\n });\n\n //tu status to include for display\n editorCtrl.filter = {\n 'status' : {\n 'all': true,\n 'approved' : false,\n 'translated' : false,\n 'needsWork': false,\n 'untranslated': false\n }\n };\n\n processFilterQuery();\n\n //This is just processing UI during startup,\n //phrase filtering are done in EditorContentCtrl during init\n function processFilterQuery() {\n //process filter query\n var status = UrlService.readValue('status');\n\n if(!_.isUndefined(status)) {\n status = status.split(',');\n _.forEach(status, function(val) {\n if(!_.isUndefined(editorCtrl.filter.status[val])) {\n editorCtrl.filter.status[val] = true;\n }\n });\n updateFilter();\n }\n }\n\n Mousetrap.bind('?', function(event) {\n var srcElement = event.srcElement;\n if (!editorCtrl.showCheatsheet && !stopCheatsheetCallback(srcElement)) {\n editorCtrl.toggleKeyboardShortcutsModal();\n $scope.$digest();\n }\n }, 'keyup');\n\n /**\n * Mousetrap by default stops callback on input elements BUT\n * hotkeys monkey patched it!!!\n * TODO change this hack once we remove angular hotkeys\n */\n function stopCheatsheetCallback(element) {\n // if the element has the class \"mousetrap\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n // stop for input, select, and textarea\n return element.tagName === 'INPUT' || element.tagName === 'SELECT' ||\n element.tagName === 'TEXTAREA' || element.isContentEditable;\n }\n\n //TODO: cross domain rest\n //TODO: Unit test\n\n //Working URL: http://localhost:8000/#/tiny-project/1/translate or\n // http://localhost:8000/#/tiny-project/1/translate/hello.txt/fr\n editorCtrl.context = EditorService.initContext($stateParams.projectSlug,\n $stateParams.versionSlug, DocumentService.decodeDocId($stateParams.docId),\n LocaleService.DEFAULT_LOCALE, LocaleService.DEFAULT_LOCALE.localeId,\n 'READ_WRITE');\n\n editorCtrl.toggleKeyboardShortcutsModal = function() {\n editorCtrl.showCheatsheet = !editorCtrl.showCheatsheet;\n };\n\n var SHOW_SUGGESTIONS = SettingsService.SETTING.SHOW_SUGGESTIONS;\n $scope.showSuggestions = SettingsService.subscribe(SHOW_SUGGESTIONS,\n function (show) {\n $scope.showSuggestions = show;\n });\n editorCtrl.toggleSuggestionPanel = function () {\n SettingsService.update(SHOW_SUGGESTIONS, !$scope.showSuggestions);\n };\n\n\n editorCtrl.versionPage = function() {\n return UrlService.PROJECT_PAGE(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug);\n };\n\n editorCtrl.encodeDocId = function(docId) {\n return DocumentService.encodeDocId(docId);\n };\n\n ProjectService.getProjectInfo($stateParams.projectSlug).then(\n function(projectInfo) {\n editorCtrl.projectInfo = projectInfo;\n },\n function(error) {\n MessageHandler.displayError('Error getting project ' +\n 'information:' + error);\n });\n\n LocaleService.getSupportedLocales(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug).then(\n function(locales) {\n editorCtrl.locales = locales;\n if (!editorCtrl.locales || editorCtrl.locales.length <= 0) {\n //redirect if no supported locale in version\n MessageHandler.displayError('No supported locales in ' +\n editorCtrl.context.projectSlug + ' : ' +\n editorCtrl.context.versionSlug);\n } else {\n //if localeId is not defined in url, set to first from list\n var selectedLocaleId = $state.params.localeId;\n var context = editorCtrl.context;\n\n if (!selectedLocaleId) {\n context.localeId = editorCtrl.locales[0].localeId;\n transitionToEditorSelectedView();\n } else {\n context.localeId = selectedLocaleId;\n if (!LocaleService.containsLocale(editorCtrl.locales,\n selectedLocaleId)) {\n context.localeId = editorCtrl.locales[0].localeId;\n }\n }\n }\n }, function(error) {\n MessageHandler.displayError('Error getting locale list: ' + error);\n });\n\n DocumentService.findAll(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug).then(\n function(documents) {\n editorCtrl.documents = documents;\n\n if (!editorCtrl.documents || editorCtrl.documents.length <= 0) {\n //redirect if no documents in version\n MessageHandler.displayError('No documents in ' +\n editorCtrl.context.projectSlug + ' : ' +\n editorCtrl.context.versionSlug);\n } else {\n //if docId is not defined in url, set to first from list\n var selectedDocId = $state.params.docId,\n context = editorCtrl.context;\n if (!selectedDocId) {\n context.docId = editorCtrl.documents[0].name;\n transitionToEditorSelectedView();\n } else {\n context.docId = DocumentService.decodeDocId(selectedDocId);\n if (!DocumentService.containsDoc(editorCtrl.documents,\n context.docId)) {\n context.docId = editorCtrl.documents[0].name;\n }\n }\n }\n }, function(error) {\n MessageHandler.displayError('Error getting document list: ' + error);\n });\n\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n editorCtrl.unitSelected = data.id;\n editorCtrl.focused = data.focus;\n });\n\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function () {\n editorCtrl.unitSelected = false;\n editorCtrl.focused = false;\n });\n\n $rootScope.$on(EventService.EVENT.REFRESH_STATISTIC,\n function (event, data) {\n\n loadStatistic(data.projectSlug, data.versionSlug, data.docId,\n data.localeId);\n\n editorCtrl.context.docId = data.docId;\n editorCtrl.context.localeId = data.localeId;\n });\n\n editorCtrl.pageNumber = function() {\n if(EditorService.maxPageIndex === 0) {\n return EditorService.currentPageIndex + 1;\n } else {\n return (EditorService.currentPageIndex + 1) + ' of ' +\n (EditorService.maxPageIndex + 1);\n }\n };\n\n editorCtrl.getLocaleName = function(localeId) {\n return LocaleService.getName(localeId);\n };\n\n editorCtrl.firstPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_FIRST_PAGE);\n };\n\n editorCtrl.lastPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_LAST_PAGE);\n };\n\n\n editorCtrl.nextPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_PAGE);\n };\n\n editorCtrl.previousPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_PREV_PAGE);\n };\n\n editorCtrl.resetFilter = function() {\n resetFilter(true);\n };\n\n editorCtrl.updateFilter = function() {\n updateFilter(true);\n };\n\n function updateFilter(fireEvent) {\n if(isStatusSame(editorCtrl.filter.status)) {\n resetFilter(fireEvent);\n } else {\n editorCtrl.filter.status.all = false;\n if(fireEvent) {\n EventService.emitEvent(EventService.EVENT.FILTER_TRANS_UNIT,\n editorCtrl.filter);\n }\n }\n }\n\n function resetFilter(fireEvent) {\n editorCtrl.filter.status.all = true;\n editorCtrl.filter.status.approved = false;\n editorCtrl.filter.status.translated = false;\n editorCtrl.filter.status.needsWork = false;\n editorCtrl.filter.status.untranslated = false;\n\n if(fireEvent) {\n EventService.emitEvent(EventService.EVENT.FILTER_TRANS_UNIT,\n editorCtrl.filter);\n }\n }\n\n function isStatusSame(statuses) {\n return statuses.approved === statuses.translated &&\n statuses.translated === statuses.needsWork &&\n statuses.needsWork === statuses.untranslated;\n }\n\n function transitionToEditorSelectedView() {\n if (isDocumentAndLocaleSelected()) {\n $state.go('editor.selectedContext', {\n 'docId': editorCtrl.context.docId,\n 'localeId': editorCtrl.context.localeId\n });\n }\n }\n\n function isDocumentAndLocaleSelected() {\n return editorCtrl.context.docId && editorCtrl.context.localeId;\n }\n\n /**\n * Load document statistics (word and message)\n *\n * @param projectSlug\n * @param versionSlug\n * @param docId\n * @param localeId\n */\n function loadStatistic(projectSlug, versionSlug, docId, localeId) {\n DocumentService.getStatistics(projectSlug, versionSlug, docId, localeId)\n .then(function(statistics) {\n editorCtrl.wordStatistic = StatisticUtil\n .getWordStatistic(statistics);\n editorCtrl.messageStatistic = StatisticUtil\n .getMsgStatistic(statistics);\n },\n function(error) {\n MessageHandler.displayError('Error loading statistic: ' + error);\n });\n }\n\n this.settings = UserService.settings.editor;\n\n EditorShortcuts.enableEditorKeys();\n }\n\n angular\n .module('app')\n .controller('EditorCtrl', EditorCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * EditorDetailsCtrl.js\n * @ngInject\n */\n function EditorDetailsCtrl() {\n var editorDetailsCtrl = this;\n\n return editorDetailsCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorDetailsCtrl', EditorDetailsCtrl);\n})();\n","(function () {\n 'use strict';\n\n /**\n * EditorService.js\n * //TODO: parse editorContext in functions\n * @ngInject\n */\n function EditorService($rootScope, $resource, _, UrlService,\n EventService, PhraseService, PhraseUtil, DocumentService, MessageHandler,\n TransStatusService) {\n var editorService = this,\n queue = {};\n\n editorService.context = {};\n\n editorService.currentPageIndex = 0;\n editorService.maxPageIndex = 0;\n\n editorService.initContext =\n function (projectSlug, versionSlug, docId, srcLocale, localeId, mode) {\n editorService.context = {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: docId,\n srcLocale: srcLocale,\n localeId: localeId,\n mode: mode // READ_WRITE, READ_ONLY, REVIEW\n };\n return editorService.context;\n };\n\n editorService.updateContext = function(projectSlug, versionSlug, docId,\n localeId) {\n if(editorService.context.projectSlug !== projectSlug) {\n editorService.context.projectSlug = projectSlug;\n }\n if(editorService.context.versionSlug !== versionSlug) {\n editorService.context.versionSlug = versionSlug;\n }\n if(editorService.context.docId !== docId) {\n editorService.context.docId = docId;\n }\n if(editorService.context.localeId !== localeId) {\n editorService.context.localeId = localeId;\n }\n };\n\n /**\n * EventService.EVENT.SAVE_TRANSLATION listener\n * Perform save translation with given status\n *\n * - queue save translation request (1 global queue, 1 for each TU)\n * - if queue contains request id, replace old request with new request\n */\n $rootScope.$on(EventService.EVENT.SAVE_TRANSLATION,\n function (event, data) {\n var phrase = data.phrase,\n status = data.status;\n if (!needToSavePhrase(phrase, status)) {\n // nothing has changed\n return;\n }\n\n //update pending queue if contains\n if (_.has(queue, phrase.id)) {\n var pendingRequest = queue[phrase.id];\n pendingRequest.phrase = phrase;\n pendingRequest.status = status;\n } else {\n status = resolveTranslationState(phrase, status);\n queue[phrase.id] = {\n 'phrase': phrase,\n 'status': status,\n 'locale': data.locale,\n 'docId': data.docId\n };\n }\n EventService.emitEvent(EventService.EVENT.SAVE_INITIATED, data);\n processSaveRequest(phrase.id);\n });\n\n function needToSavePhrase(phrase, status) {\n return PhraseUtil.hasTranslationChanged(phrase) ||\n phrase.status !== status;\n }\n\n // Process save translation request\n function processSaveRequest(id) {\n var context = _.cloneDeep(editorService.context);\n\n var request = queue[id];\n\n var Translation = $resource(UrlService.TRANSLATION_URL, {}, {\n update: {\n method: 'PUT',\n params: {\n localeId: request.locale\n }\n }\n });\n var data = {\n id: request.phrase.id,\n revision: request.phrase.revision || 0,\n content: request.phrase.newTranslations[0],\n contents: request.phrase.newTranslations,\n // Return status object to PascalCase Id for the server\n status: TransStatusService.getServerId(request.status.ID),\n plural: request.phrase.plural\n };\n\n Translation.update(data).$promise.then(\n function(response) {\n var oldStatus = request.phrase.status.ID;\n\n PhraseService.onTransUnitUpdated(context, data.id, request.locale,\n response.revision, response.status, request.phrase);\n\n DocumentService.updateStatistic(context.projectSlug,\n context.versionSlug, request.docId, request.locale,\n oldStatus, TransStatusService.getId(response.status),\n request.phrase.wordCount);\n\n EventService.emitEvent(EventService.EVENT.SAVE_COMPLETED,\n request.phrase);\n },\n function(response) {\n MessageHandler.displayWarning('Update translation failed for ' +\n data.id + ' -' + response);\n PhraseService.onTransUnitUpdateFailed(data.id);\n EventService.emitEvent(EventService.EVENT.SAVE_COMPLETED,\n request.phrase);\n });\n delete queue[id];\n }\n\n function resolveTranslationState(phrase, requestStatus) {\n if (_.isEmpty(_.compact(phrase.newTranslations))) {\n return TransStatusService.getStatusInfo('UNTRANSLATED');\n }\n return requestStatus;\n }\n\n return editorService;\n }\n\n angular\n .module('app')\n .factory('EditorService', EditorService);\n\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * @name EditorShortcuts\n * @description service for editor keyboard shortcuts\n * @ngInject\n */\n function EditorShortcuts(EventService, $stateParams, _, hotkeys, PhraseUtil,\n TransStatusService, Mousetrap, str, $window) {\n var editorShortcuts = this,\n inSaveAsMode = false;\n\n // this will be set by TransUnitService\n // on EVENT.SELECT_TRANS_UNIT and unset on EVENT.CANCEL_EDIT\n editorShortcuts.selectedTUCtrl = null;\n\n function copySourceCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n {'phrase': editorShortcuts.selectedTUCtrl.getPhrase()});\n }\n }\n\n function gotoNextRowCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n event.stopPropagation();\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_ROW,\n currentContext());\n }\n }\n\n function gotoPreviousRowCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n event.stopPropagation();\n EventService.emitEvent(EventService.EVENT.GOTO_PREVIOUS_ROW,\n currentContext());\n }\n }\n\n function cancelEditCallback(event) {\n event.preventDefault();\n event.stopPropagation();\n if (inSaveAsMode) {\n editorShortcuts.cancelSaveAsModeIfOn();\n if (editorShortcuts.selectedTUCtrl) {\n editorShortcuts.selectedTUCtrl.focusTranslation();\n }\n } else if (editorShortcuts.selectedTUCtrl) {\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n if (PhraseUtil.hasTranslationChanged(phrase)) {\n // if it has changed translation, undo edit\n EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n phrase);\n } else {\n // otherwise cancel edit\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n phrase);\n }\n }\n }\n\n function saveAsCurrentButtonOptionCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n /**\n * This is to mimic sequence shortcut.\n * e.g. press ctlr-shift-s then press 'n' to save as\n * 'needs work'.\n */\n function saveAsModeCallback(event) {\n event.preventDefault();\n editorShortcuts.cancelSaveAsModeIfOn();\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n if (phrase) {\n EventService.emitEvent(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n {\n 'id': phrase.id,\n 'open': true\n });\n\n addSaveAsModeExtensionKey(phrase, 'n', 'needsWork');\n addSaveAsModeExtensionKey(phrase, 't', 'translated');\n addSaveAsModeExtensionKey(phrase, 'a', 'approved');\n }\n }\n\n /**\n * Generate a callback that will copy one of the suggestions to the editor.\n *\n * @param {number} oneBasedIndex the 1-based index of the suggestion that\n * this callback will copy\n * @return {function} callback that will copy the nth suggestion.\n */\n function copySuggestionCallback(oneBasedIndex) {\n return (function (event) {\n event.preventDefault();\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SUGGESTION_N,\n oneBasedIndex-1);\n });\n }\n\n /**\n * mod will be replaced by ctrl if on windows/linux or cmd if on mac.\n * By default it listens on keydown event.\n */\n editorShortcuts.SHORTCUTS = {\n COPY_SOURCE: new ShortcutInfo(\n 'alt+c', copySourceCallback, 'Copy source as translation', 'alt+g'),\n\n COPY_SUGGESTION_1: new ShortcutInfo(\n 'mod+alt+1', copySuggestionCallback(1),\n 'Copy first suggestion as translation'),\n\n COPY_SUGGESTION_2: new ShortcutInfo(\n 'mod+alt+2', copySuggestionCallback(2),\n 'Copy second suggestion as translation'),\n\n COPY_SUGGESTION_3: new ShortcutInfo(\n 'mod+alt+3', copySuggestionCallback(3),\n 'Copy third suggestion as translation'),\n\n COPY_SUGGESTION_4: new ShortcutInfo(\n 'mod+alt+4', copySuggestionCallback(4),\n 'Copy fourth suggestion as translation'),\n\n CANCEL_EDIT: new ShortcutInfo('esc', cancelEditCallback, 'Cancel edit'),\n\n SAVE_AS_CURRENT_BUTTON_OPTION: new ShortcutInfo(\n 'mod+s', saveAsCurrentButtonOptionCallback, 'Save'),\n\n SAVE_AS_MODE: new ShortcutInfo(\n 'mod+shift+s', saveAsModeCallback, 'Save as…'),\n\n // this is just so we can show it in cheatsheet.\n // see app/editor/EditorCtrl.shortcuts\n SAVE_AS_NEEDSWORK: {\n keyCombos: [{combo: 'mod+shift+s n', description: 'Save as needs work'}]\n },\n\n SAVE_AS_TRANSLATED: {\n keyCombos: [{combo: 'mod+shift+s t', description: 'Save as translated'}]\n },\n\n SAVE_AS_APPROVED: {\n keyCombos: [{combo: 'mod+shift+s a', description: 'Save as approved'}]\n },\n\n GOTO_NEXT_ROW_FAST: new ShortcutInfo(\n 'mod+enter', gotoNextRowCallback,\n 'Save (if changed) and go to next string',\n ['alt+k', 'alt+down']),\n\n GOTO_PREVIOUS_ROW: new ShortcutInfo(\n 'mod+shift+enter', gotoPreviousRowCallback,\n 'Save (if changed) and go to previous string',\n ['alt+j', 'alt+up'])\n /*\n Disable for now until status navigation implementation\n GOTO_NEXT_UNTRANSLATED: new ShortcutInfo(\n 'tab+u', gotoToNextUntranslatedCallback)\n */\n };\n\n /*\n Disable for now until status navigation implementation\n\n function gotoToNextUntranslatedCallback(event) {\n event.preventDefault();\n event.stopPropagation();\n if (editorShortcuts.selectedTUCtrl) {\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_UNTRANSLATED,\n currentContext());\n }\n // the shortcut is a tab + u combination\n // we don't want other tab event to trigger\n tabCombinationPressed = true;\n }\n */\n\n /**\n *\n * @param {string} defaultKey default key combo for a shortcut\n * @param {function} callback callback to execute\n * @param {string} [description]\n * optional. If not empty will apply to default key (shows in cheatsheet)\n * @param {(string|string[])} [otherKeys]\n * optional other keys that will do the same (won't show in cheatsheet)\n * @param {string} [action] optional event to listen to. e.g. 'keyup'\n * @returns {EditorShortcuts.ShortcutInfo}\n * @constructor\n */\n function ShortcutInfo(defaultKey, callback, description, otherKeys, action)\n {\n this.defaultKey = defaultKey;\n this.keyCombos = [\n singleKeyConfig(defaultKey, description, action, callback)\n ];\n if (otherKeys) {\n this.otherKeys = otherKeys instanceof Array ? otherKeys : [otherKeys];\n this.keyCombos.push(\n singleKeyConfig(this.otherKeys, '', action, callback));\n }\n return this;\n }\n\n function singleKeyConfig(combo, description, action, callback) {\n var keyConfig = {\n allowIn: ['TEXTAREA'],\n callback: callback\n };\n keyConfig.combo = combo;\n if (description) {\n keyConfig.description = description;\n }\n if (action) {\n keyConfig.action = action;\n }\n return keyConfig;\n }\n\n editorShortcuts.enableEditorKeys = function () {\n // here we only check copy source shortcut since we always enable keys in\n // bundle.\n if (!hotkeys.get(editorShortcuts.SHORTCUTS.COPY_SOURCE.defaultKey)) {\n _.forOwn(editorShortcuts.SHORTCUTS, function(value) {\n if (value instanceof ShortcutInfo) { // a hack to handle sequence keys\n enableShortcut(value);\n }\n });\n }\n };\n\n editorShortcuts.disableEditorKeys = function () {\n _.forOwn(editorShortcuts.SHORTCUTS, function(value) {\n _.forEach(value.keyCombos, function(hotkey) {\n editorShortcuts.deleteKeys(hotkey.combo, hotkey.action);\n });\n });\n };\n\n function enableShortcut(shortcutInfo) {\n if (!hotkeys.get(shortcutInfo.defaultKey)) {\n _.forEach(shortcutInfo.keyCombos,\n function(combo) {\n hotkeys.add(combo);\n });\n }\n }\n\n function currentContext() {\n return {\n 'currentId': editorShortcuts.selectedTUCtrl.getPhrase().id\n };\n }\n\n function addSaveAsModeExtensionKey(phrase, combo, status) {\n var statusInfo = TransStatusService.getStatusInfo(status);\n return hotkeys.add({\n combo: combo,\n description: str.sprintf('Save as %s', status),\n allowIn: ['INPUT', 'TEXTAREA'],\n action: 'keydown',\n callback: function (event) {\n editorShortcuts.saveTranslationCallBack(event, phrase, statusInfo);\n }\n });\n }\n\n editorShortcuts.saveTranslationCallBack = function(event, phrase,\n statusInfo) {\n inSaveAsMode = true;\n\n event.preventDefault();\n event.stopPropagation();\n\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': statusInfo,\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n editorShortcuts.cancelSaveAsModeIfOn();\n };\n\n editorShortcuts.cancelSaveAsModeIfOn = function() {\n if (inSaveAsMode && editorShortcuts.selectedTUCtrl) {\n inSaveAsMode = false;\n editorShortcuts.deleteKeys(['n', 't', 'a']);\n EventService.emitEvent(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n {\n 'id': editorShortcuts.selectedTUCtrl.getPhrase().id,\n 'open': false\n });\n }\n };\n\n /**\n * This is a workaround for augular-hotkeys not being able to delete hotkey.\n * @see https://github.com/chieffancypants/angular-hotkeys/issues/100\n *\n * @param {(string|string[])} keys single key or array of keys to be deleted\n * @param {string} [action='keydown'] 'keyup' or 'keydown' etc.\n */\n editorShortcuts.deleteKeys = function(keys, action) {\n var keysToDelete = keys instanceof Array ? keys : [keys];\n action = action || 'keydown';\n _.forEach(keysToDelete, function(key) {\n hotkeys.del(key);\n Mousetrap.unbind(key, action);\n });\n };\n\n /**\n * Copied from angular-hotkeys.\n * Convert strings like cmd into symbols like ⌘\n * @param {String} combo Key combination, e.g. 'mod+f'\n * @return {String} The key combination with symbols\n */\n editorShortcuts.symbolizeKey = function (combo) {\n var map = {\n command: '⌘',\n shift: '⇧',\n left: '←',\n right: '→',\n up: '↑',\n down: '↓',\n 'return': '↩',\n backspace: '⌫'\n };\n combo = combo.split('+');\n\n for (var i = 0; i < combo.length; i++) {\n // try to resolve command / ctrl based on OS:\n if (combo[i] === 'mod') {\n if ($window.navigator &&\n $window.navigator.platform.indexOf('Mac') >= 0) {\n combo[i] = 'command';\n } else {\n combo[i] = 'ctrl';\n }\n }\n\n combo[i] = map[combo[i]] || combo[i];\n }\n\n return combo.join(' + ');\n };\n\n return editorShortcuts;\n }\n\n angular\n .module('app')\n .factory('EditorShortcuts', EditorShortcuts);\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * EditorSuggestionsCtrl.js\n * @ngInject\n */\n function EditorSuggestionsCtrl($scope, _, SettingsService, SuggestionsService,\n EventService, $rootScope, $timeout, focus) {\n var SHOW_SUGGESTIONS_SETTING = SettingsService.SETTING.SHOW_SUGGESTIONS;\n var SUGGESTIONS_SHOW_DIFFERENCE_SETTING =\n SettingsService.SETTING.SUGGESTIONS_SHOW_DIFFERENCE;\n\n var editorSuggestionsCtrl = this;\n\n editorSuggestionsCtrl.suggestions = [];\n editorSuggestionsCtrl.searchPhrase = null;\n editorSuggestionsCtrl.searchResultsTotal = 0;\n editorSuggestionsCtrl.searchText = '';\n editorSuggestionsCtrl.searchDisplayRequired = false;\n editorSuggestionsCtrl.searchIsText = false;\n editorSuggestionsCtrl.unitSelected = false;\n\n $scope.searchIsVisible = false;\n $scope.searchIsLoading = false;\n\n $scope.show = SettingsService.subscribe(SHOW_SUGGESTIONS_SETTING,\n function (show) {\n $scope.show = show;\n });\n\n $scope.diff = SettingsService.subscribe(SUGGESTIONS_SHOW_DIFFERENCE_SETTING,\n function (diff) {\n $scope.diff = diff;\n });\n\n $scope.focusSearch = function($event) {\n if ($event) {\n $event.preventDefault();\n }\n focus('searchSugInput');\n };\n\n editorSuggestionsCtrl.closeSuggestions = function () {\n SettingsService.update(SHOW_SUGGESTIONS_SETTING, false);\n EventService.emitEvent(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n false);\n };\n\n editorSuggestionsCtrl.clearSearchResults =\n function($event, dontFocusInput) {\n editorSuggestionsCtrl.searchText = '';\n editorSuggestionsCtrl.suggestions = [];\n if (!dontFocusInput && $event) {\n $scope.focusSearch($event);\n }\n };\n\n editorSuggestionsCtrl.searchForText = function (newText) {\n editorSuggestionsCtrl.searchIsText = true;\n $timeout.cancel(editorSuggestionsCtrl.searchInProgress);\n editorSuggestionsCtrl.searchInProgress = $timeout(function() {\n EventService.emitEvent(EventService.EVENT.REQUEST_TEXT_SUGGESTIONS,\n newText);\n }, 300);\n };\n\n editorSuggestionsCtrl.toggleSearch = function() {\n if ($scope.searchIsVisible) {\n EventService.emitEvent(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n false);\n }\n else {\n EventService.emitEvent(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n true);\n }\n };\n\n // Init\n if (!editorSuggestionsCtrl.unitSelected && $scope.show) {\n editorSuggestionsCtrl.searchDisplayRequired = true;\n showSearch();\n }\n\n function displaySuggestions(suggestions) {\n var filteredSuggestions = [];\n filteredSuggestions = _.chain(suggestions)\n .sortBy(['similarityPercent', 'relevanceScore'])\n .reverse()\n .value();\n\n if (!editorSuggestionsCtrl.searchIsText) {\n cacheSuggestions(filteredSuggestions);\n }\n\n if ($scope.searchIsVisible) {\n setPhraseSuggestions(editorSuggestionsCtrl.searchPhrase,\n filteredSuggestions);\n editorSuggestionsCtrl.searchResultsTotal =\n editorSuggestionsCtrl.suggestions.length;\n }\n else {\n setPhraseSuggestions(editorSuggestionsCtrl.currentSearchPhrase,\n filteredSuggestions);\n editorSuggestionsCtrl.searchResultsTotal = 0;\n }\n\n $scope.searchIsLoading = false;\n\n }\n\n function cacheSearchPhrase(searchPhrase) {\n editorSuggestionsCtrl.currentSearchPhrase = searchPhrase;\n }\n\n function cacheSuggestions(suggestions) {\n editorSuggestionsCtrl.currentPhraseSuggestions = suggestions;\n }\n\n function setPhraseSuggestions(searchPhrase, suggestions) {\n editorSuggestionsCtrl.searchPhrase = searchPhrase;\n editorSuggestionsCtrl.suggestions = suggestions;\n }\n\n function restorePhraseSuggestions() {\n $timeout(function() {\n editorSuggestionsCtrl.searchPhrase =\n editorSuggestionsCtrl.currentSearchPhrase;\n editorSuggestionsCtrl.suggestions =\n editorSuggestionsCtrl.currentPhraseSuggestions;\n });\n }\n\n function hideSearch() {\n $scope.searchIsVisible = false;\n editorSuggestionsCtrl.clearSearchResults(null, true);\n if (editorSuggestionsCtrl.unitSelected) {\n editorSuggestionsCtrl.searchIsText = false;\n restorePhraseSuggestions();\n }\n }\n\n function showSearch($event, dontFocusInput) {\n $scope.searchIsVisible = true;\n if (!dontFocusInput && $event) {\n $scope.focusSearch($event);\n }\n editorSuggestionsCtrl.searchForText('');\n }\n\n function handleError (error) {\n console.error('It\\'s over! ', error);\n }\n\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n editorSuggestionsCtrl.unitSelected = data.id;\n if (editorSuggestionsCtrl.searchText === '' && $scope.searchIsVisible) {\n EventService.emitEvent(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n false);\n }\n editorSuggestionsCtrl.searchDisplayRequired = false;\n });\n\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function () {\n if ($scope.show) {\n showSearch(null, true);\n editorSuggestionsCtrl.searchDisplayRequired = true;\n }\n });\n\n $rootScope.$on(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n function(event, activate) {\n if (activate) {\n showSearch(event);\n }\n else {\n hideSearch(event);\n }\n });\n\n // Automatic suggestions search on row select\n $rootScope.$on(EventService.EVENT.REQUEST_PHRASE_SUGGESTIONS,\n function (event, data) {\n editorSuggestionsCtrl.searchIsText = false;\n SuggestionsService.getSuggestionsForPhrase(data.phrase)\n .then(displaySuggestions, handleError);\n cacheSearchPhrase(data.phrase);\n });\n\n // Manual suggestions search\n $rootScope.$on(EventService.EVENT.REQUEST_TEXT_SUGGESTIONS,\n function (event, data) {\n if (data === '') {\n displaySuggestions('');\n // editorSuggestionsCtrl.suggestions = [];\n return false;\n }\n $scope.searchIsLoading = true;\n SuggestionsService.getSuggestionsForText(data)\n .then(displaySuggestions, handleError);\n editorSuggestionsCtrl.searchPhrase = data;\n });\n\n return editorSuggestionsCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorSuggestionsCtrl', EditorSuggestionsCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name blur-on\n * @description When you put attribute 'blur-on=\"something\"',\n * you can then blur this element. It works the same way as focus-on library.\n */\n function blurOn() {\n return {\n restrict: 'A',\n link: function(scope, elem, attr) {\n return scope.$on('blurOn', function (e, name) {\n if (name === attr.blurOn) {\n return elem[0].blur();\n }\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('blurOn', blurOn);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name clickElsewhere\n * @description Initiate expression when clicking somewhere else\n * @ngInject\n */\n function clickElsewhere($document) {\n return {\n restrict: 'A',\n scope: {\n callback: '&clickElsewhere'\n },\n link: function(scope, element) {\n var handler = function(e) {\n if (!element[0].contains(e.target)) {\n scope.$apply(scope.callback(e));\n }\n };\n\n $document.on('click', handler);\n\n scope.$on('$destroy', function() {\n $document.off('click', handler);\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('clickElsewhere', clickElsewhere);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle server communication on document related\n * information in project-version.\n *\n * DocumentService.js\n * @ngInject\n */\n function DocumentService($q, $resource, UrlService, StringUtil,\n StatisticUtil, EventService, _, TransStatusService) {\n var documentService = this,\n statisticMap = {};\n\n /**\n * Finds all documents in given project version\n *\n * @param _projectSlug\n * @param _versionSlug\n * @returns {$promise|*|N.$promise}\n */\n documentService.findAll = function findAll(_projectSlug, _versionSlug) {\n var Documents = $resource(UrlService.DOCUMENT_LIST_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: _projectSlug,\n versionSlug: _versionSlug\n },\n isArray: true\n }\n });\n return Documents.query().$promise;\n };\n\n /**\n * Get statistic of document in locale (word and message)\n *\n * @param _projectSlug\n * @param _versionSlug\n * @param _docId\n * @param _localeId\n * @returns {*}\n */\n documentService.getStatistics = function (_projectSlug, _versionSlug,\n _docId, _localeId) {\n if (_docId && _localeId) {\n var key = generateStatisticKey(_docId, _localeId);\n if (_.has(statisticMap, key)) {\n return $q.when(statisticMap[key]);\n } else {\n var encodedDocId = documentService.encodeDocId(_docId);\n var Statistics = $resource(UrlService.DOC_STATISTIC_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: _projectSlug,\n versionSlug: _versionSlug,\n docId: encodedDocId,\n localeId: _localeId\n },\n isArray: true\n }\n });\n return Statistics.query().$promise.then(function(statistics) {\n\n // Make needReview(server) available to needswork\n _.forEach(statistics, function(statistic) {\n statistic[TransStatusService.getId('needswork')] =\n statistic.needReview || 0;\n });\n\n statisticMap[key] = statistics;\n return statisticMap[key];\n });\n }\n }\n };\n\n /**\n * Encode docId, replace '/' with ',' when REST call\n * @param docId\n * @returns {*}\n */\n documentService.encodeDocId = function(docId) {\n return docId ? docId.replace(/\\//g, ',') : docId;\n };\n\n /**\n * Encode docId, replace ',' with '/' when REST call\n * @param docId\n * @returns {*}\n */\n documentService.decodeDocId = function(docId) {\n return docId ? docId.replace(/\\,/g, '/') : docId;\n };\n\n documentService.containsDoc = function (documents, docId) {\n return _.any(documents, function(document) {\n return StringUtil.equals(document.name, docId, true);\n });\n };\n\n documentService.updateStatistic = function(projectSlug, versionSlug, docId,\n localeId, oldState,\n newState, wordCount) {\n var key = generateStatisticKey(docId, localeId);\n if(_.has(statisticMap, key)) {\n adjustStatistic(statisticMap[key], oldState, newState,\n wordCount);\n\n EventService.emitEvent(EventService.EVENT.REFRESH_STATISTIC,\n {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: docId,\n localeId: localeId\n }\n );\n }\n };\n\n //Generate unique key from docId and localeId for statistic cache\n function generateStatisticKey(docId, localeId) {\n return docId + '-' + localeId;\n }\n\n /**\n * Adjust statistic based on translation change of state\n * word - -wordCount of oldState, +wordCount of newState\n * msg - -1 of oldState, +1 of newState\n */\n function adjustStatistic(statistics, oldState, newState, wordCount) {\n\n var wordStatistic = StatisticUtil.getWordStatistic(statistics),\n msgStatistic = StatisticUtil.getMsgStatistic(statistics);\n\n if(wordStatistic) {\n wordCount = parseInt(wordCount);\n var wordOldState = parseInt(wordStatistic[oldState]) - wordCount;\n wordStatistic[oldState] = wordOldState < 0 ? 0 : wordOldState;\n wordStatistic[newState] = parseInt(wordStatistic[newState]) + wordCount;\n }\n\n if(msgStatistic) {\n var msgOldState = parseInt(msgStatistic[oldState]) - 1;\n msgStatistic[oldState] = msgOldState < 0 ? 0 : msgOldState;\n msgStatistic[newState] = parseInt(msgStatistic[newState]) + 1;\n }\n }\n\n return documentService;\n }\n\n angular\n .module('app')\n .factory('DocumentService', DocumentService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name DropdownCtrl\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n function DropdownCtrl($scope, $attrs, $parse, dropdownConfig,\n DropdownService, $animate, $timeout) {\n var dropdownCtrl = this,\n // create a child scope so we are not polluting original one\n scope = $scope.$new(),\n openClass = dropdownConfig.openClass,\n getIsOpen,\n setIsOpen = angular.noop,\n toggleInvoker = $attrs.onToggle ?\n $parse($attrs.onToggle) : angular.noop;\n\n this.init = function(element) {\n dropdownCtrl.$element = element;\n\n if ($attrs.isOpen) {\n getIsOpen = $parse($attrs.isOpen);\n setIsOpen = getIsOpen.assign;\n\n $scope.$watch(getIsOpen, function(value) {\n scope.isOpen = !!value;\n });\n }\n };\n\n this.toggle = function(open) {\n scope.isOpen = arguments.length ? !!open : !scope.isOpen;\n return scope.isOpen;\n };\n\n // Allow other directives to watch status\n this.isOpen = function() {\n return scope.isOpen;\n };\n\n scope.getToggleElement = function() {\n return dropdownCtrl.toggleElement;\n };\n\n scope.focusToggleElement = function() {\n if (dropdownCtrl.toggleElement) {\n dropdownCtrl.toggleElement[0].focus();\n }\n };\n\n scope.$watch('isOpen', function(isOpen, wasOpen) {\n $animate[isOpen ? 'addClass' : 'removeClass']\n (dropdownCtrl.$element, openClass);\n\n if (isOpen) {\n // need to wrap it in a timeout\n // see http://stackoverflow.com/questions/12729122/\n // prevent-error-digest-already-in-progress-when-calling-scope-apply\n $timeout(function() {\n scope.focusToggleElement();\n });\n DropdownService.open(scope);\n } else {\n DropdownService.close(scope);\n }\n\n setIsOpen($scope, isOpen);\n if (angular.isDefined(isOpen) && isOpen !== wasOpen) {\n toggleInvoker($scope, {\n open: !!isOpen\n });\n }\n });\n\n $scope.$on('$locationChangeSuccess', function() {\n scope.isOpen = false;\n });\n\n $scope.$on('$destroy', function() {\n scope.$destroy();\n });\n\n $scope.$on('openDropdown', function() {\n scope.isOpen = true;\n });\n\n $scope.$on('closeDropdown', function() {\n scope.isOpen = false;\n });\n }\n\n angular\n .module('app')\n .controller('DropdownCtrl', DropdownCtrl);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name dropdownService\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n\n function DropdownService($document) {\n var openScope = null,\n dropdownService = this;\n\n dropdownService.open = function(dropdownScope) {\n if (!openScope) {\n $document.bind('click', closeDropdown);\n $document.bind('keydown', escapeKeyBind);\n }\n\n if (openScope && openScope !== dropdownScope) {\n openScope.isOpen = false;\n }\n\n openScope = dropdownScope;\n };\n\n dropdownService.close = function(dropdownScope) {\n if (openScope === dropdownScope) {\n openScope = null;\n $document.unbind('click', closeDropdown);\n $document.unbind('keydown', escapeKeyBind);\n }\n };\n\n var closeDropdown = function(evt) {\n if (!openScope) {\n return;\n }\n var toggleElement = openScope.getToggleElement();\n if (evt && toggleElement && toggleElement[0].contains(evt.target)) {\n return;\n }\n\n openScope.$apply(function() {\n openScope.isOpen = false;\n });\n };\n\n var escapeKeyBind = function(evt) {\n if (evt.which === 27) {\n openScope.focusToggleElement();\n closeDropdown();\n }\n };\n }\n\n angular\n .module('app')\n .service('DropdownService', DropdownService);\n\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @name Dropdown\n *\n * @description\n * Custom module for dropdowns\n *\n */\n var dropdownConfig = {\n openClass: 'is-active'\n };\n\n angular\n .module('app')\n .constant('dropdownConfig', dropdownConfig);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name dropdown\n *\n * @description\n * Main dropdown container\n *\n */\n\n function dropdown() {\n return {\n restrict: 'EA',\n controller: 'DropdownCtrl',\n link: function(scope, element, attrs, dropdownCtrl) {\n dropdownCtrl.init(element);\n }\n };\n }\n\n function onCloseDropdown() {\n return {\n restrict: 'A',\n require: '?^dropdown',\n scope: {\n callback: '&onCloseDropdown'\n },\n link: function(scope, elem, attrs, dropdownCtrl) {\n dropdownCtrl.onCloseDropdown = scope.callback;\n }\n };\n }\n\n /**\n * @name dropdown-toggle\n *\n * @description\n * Main dropdown toggle\n *\n */\n\n function dropdownToggle() {\n return {\n restrict: 'EA',\n require: '?^dropdown',\n link: function(scope, element, attrs, dropdownCtrl) {\n if (!dropdownCtrl) {\n return;\n }\n\n dropdownCtrl.toggleElement = element;\n\n var toggleDropdown = function(event) {\n event.preventDefault();\n event.stopPropagation();\n\n if (!element.hasClass('disabled') && !attrs.disabled) {\n scope.$apply(function() {\n dropdownCtrl.toggle();\n });\n }\n };\n\n element.bind('click', toggleDropdown);\n\n // WAI-ARIA\n element.attr({\n 'aria-haspopup': true,\n 'aria-expanded': false\n });\n scope.$watch(dropdownCtrl.isOpen, function(isOpen) {\n element.attr('aria-expanded', !!isOpen);\n if (dropdownCtrl.onCloseDropdown && !isOpen) {\n scope.$applyAsync(dropdownCtrl.onCloseDropdown);\n }\n });\n\n scope.$on('$destroy', function() {\n element.unbind('click', toggleDropdown);\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('dropdown', dropdown)\n .directive('onCloseDropdown', onCloseDropdown)\n .directive('dropdownToggle', dropdownToggle);\n\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * EventService.js\n * Broadcast events service in app.\n * Usage: EventService.emitEvent( event, data, scope)\n * See EventService.emitEvent\n *\n * @ngInject\n */\n function EventService($rootScope) {\n var eventService = this;\n\n /**\n * @enum {string}\n */\n eventService.EVENT = {\n /**\n * Loading Events\n *\n * Broadcast from AppConfig\n */\n LOADING_START: 'loadingStart',\n LOADING_STOP: 'loadingStop',\n\n /**\n * scroll to trans unit\n * data: {id: number, updateURL: boolean, focus: boolean}\n * id: (transunit id),\n * updateURL: (flag on whether to update url with trans unit id)\n * focus: flag on whether to have row in view and focused\n */\n SELECT_TRANS_UNIT: 'selectTransUnit',\n\n //data: {phrase: Phrase, sourceIndex:sourceIndex}\n COPY_FROM_SOURCE: 'copyFromSource',\n\n // data: { suggestion: Suggestion }\n COPY_FROM_SUGGESTION: 'copyFromSuggestion',\n\n /**\n * Emit this to trigger copying of the nth suggestion to the selected row.\n *\n * data: number (zero-based index of suggestion to copy)\n */\n COPY_FROM_SUGGESTION_N: 'copyFromSuggestionN',\n\n //data: {phrase: Phrase}\n UNDO_EDIT: 'undoEdit',\n\n //data: {phrase: Phrase}\n CANCEL_EDIT: 'cancelEdit',\n\n //data:phrase\n FOCUS_TRANSLATION: 'focusTranslation',\n\n /**\n * data: {\n * phrase: Phrase, status: StatusInfo, locale: string, docId: string\n * }\n * phrase:\n * status: Object. Request save state\n * locale: target locale\n * docId: docId\n */\n SAVE_TRANSLATION: 'saveTranslation',\n\n /**\n * Translation save in this editor is being sent to the server and\n * is waiting on a response.\n */\n SAVE_INITIATED: 'saveInitiated',\n\n /**\n * Translation save in this editor has been completed\n * (Server has responded with a success or error).\n */\n SAVE_COMPLETED: 'saveCompleted',\n\n /**\n * The text in the translation editor textbox has been edited and\n * not yet saved.\n */\n TRANSLATION_TEXT_MODIFIED: 'translationTextModified',\n\n /**\n * refresh ui statistic - changes in doc or locale\n *\n * data: {projectSlug: string, versionSlug: string,\n * docId: string, localeId: string}\n */\n REFRESH_STATISTIC: 'refreshStatistic',\n\n GOTO_PREV_PAGE: 'gotoPreviousPage',\n\n GOTO_NEXT_PAGE: 'gotoNextPage',\n\n GOTO_FIRST_PAGE: 'gotoFirstPage',\n\n GOTO_LAST_PAGE: 'gotoLastPage',\n\n /**\n * data: { currentId: number }\n */\n GOTO_NEXT_ROW: 'gotoNextRow',\n GOTO_PREVIOUS_ROW: 'gotoPreviousRow',\n GOTO_NEXT_UNTRANSLATED: 'gotoNextUntranslated',\n\n /**\n * Toggle save as options dropdown.\n * data: {id: number, open: boolean}\n */\n TOGGLE_SAVE_OPTIONS: 'openSaveOptions',\n\n\n /**\n * data: {filter: refer to editorCtrl.filter}\n */\n FILTER_TRANS_UNIT: 'filterTransUnit',\n\n /**\n * Reports the number of suggestions that are available for a phrase.\n *\n * data: { id: number, count: number }\n */\n PHRASE_SUGGESTION_COUNT: 'phraseSuggestionCount',\n\n /**\n * Fire to request suggestions from translation memory, etc.\n *\n * data: { phrase: Phrase }\n */\n REQUEST_PHRASE_SUGGESTIONS: 'requestPhraseSuggestions',\n\n /**\n * Fire for manual suggestions search using a single string.\n *\n * data: string\n */\n REQUEST_TEXT_SUGGESTIONS: 'requestTextSuggestions',\n\n /**\n * Fired every time search is toggled\n *\n * @type {Boolean}\n */\n SUGGESTIONS_SEARCH_TOGGLE: 'suggestionsSearchToggle',\n\n /**\n * Indicates a single user setting has changed.\n *\n * Event handlers should switch on the setting name to determine whether\n * it is a setting they are interested in.\n *\n * data: { setting: string, value: boolean|number|string }\n */\n USER_SETTING_CHANGED: 'userSettingChanged'\n };\n\n /**\n * Firing an event downwards of scope\n *\n * @param event - eventService.EVENT type\n * @param data - data for the event\n * @param scope - scope of event to to fire, $rootScope if empty\n */\n eventService.broadcastEvent = function(event, data, scope) {\n scope = scope || $rootScope;\n scope.$broadcast(event, data);\n };\n\n /**\n * Firing an event upwards of scope\n *\n * @param event - eventService.EVENT types\n * @param data - data for the event\n * @param scope - scope of event to to fire, $rootScope if empty\n */\n eventService.emitEvent = function(event, data, scope) {\n scope = scope || $rootScope;\n scope.$emit(event, data);\n };\n\n return eventService;\n }\n\n angular\n .module('app')\n .factory('EventService', EventService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name icon\n * @description declarative svg icons\n * @ngInject\n */\n function icon($sce) {\n return {\n restrict: 'E',\n required: ['name'],\n scope: {\n name: '@',\n title: '@',\n size: '@'\n },\n // templateUrl: 'components/icon/icon.html',\n link: function(scope, element) {\n var svg = '',\n titleHtml = '';\n\n element.addClass('Icon');\n\n if (scope.title) {\n titleHtml = '' + scope.title + '';\n }\n\n // Stupid hack to make svg work\n svg = '' +\n '' +\n '' +\n titleHtml +\n '';\n element.html($sce.trustAsHtml(svg));\n }\n };\n }\n\n angular\n .module('app')\n .directive('icon', icon);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle locales related information.\n *\n * LocaleService.js\n * @ngInject\n */\n function LocaleService(UrlService, StringUtil, FilterUtil, $resource, _) {\n\n var locales = [];\n\n /**\n * Get project-version supported locales\n * @param projectSlug\n * @param versionSlug\n * @returns {$promise|*}\n */\n function getSupportedLocales(projectSlug, versionSlug) {\n\n var Locales = $resource(UrlService.LOCALE_LIST_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug,\n versionSlug: versionSlug\n },\n isArray: true\n }\n });\n\n return Locales.query().$promise;\n }\n\n //Returns all locales supported in Zanata instance\n function getAllLocales() {\n var Locales = $resource(UrlService.ALL_LOCALE_URL, {}, {\n query: {\n method: 'GET',\n isArray: true\n }\n });\n return Locales.query().$promise.then(function(results) {\n locales = FilterUtil.cleanResourceList(results);\n });\n }\n\n function getUILocaleList() {\n var list = $resource(UrlService.uiTranslationListURL, {}, {\n query: {\n method: 'GET'\n }\n });\n\n return list.query().$promise;\n }\n\n function getLocaleByLocaleId(locales, localeId) {\n if(locales) {\n return _.find(locales, function(locale) {\n return StringUtil.equals(locale.localeId, localeId, true);\n });\n }\n }\n\n function containsLocale (locales, localeId) {\n return _.any(locales, function(locale) {\n return StringUtil.equals(locale.localeId, localeId, true);\n });\n }\n\n function getName(localeId) {\n var locale = getLocaleByLocaleId(locales, localeId);\n if(locale) {\n return locale.name;\n }\n return localeId;\n }\n\n return {\n getSupportedLocales : getSupportedLocales,\n getUILocaleList : getUILocaleList,\n getLocaleByLocaleId : getLocaleByLocaleId,\n getAllLocales : getAllLocales,\n containsLocale : containsLocale,\n getName : getName,\n DEFAULT_LOCALE: {\n 'localeId' : 'en-US',\n 'name' : 'English'\n }\n };\n }\n\n angular\n .module('app')\n .factory('LocaleService', LocaleService);\n})();\n","(function() {\n\n 'use strict';\n\n /**\n * @name logoLoader\n *\n * @description\n * Logo that is activated on global loading state\n *\n * @ngInject\n */\n function logoLoader(EventService) {\n return {\n restrict: 'EA',\n scope: {\n loading: '=',\n inverted: '='\n },\n link: function(scope) {\n scope.classes = '';\n\n scope.$on(EventService.EVENT.LOADING_START, function() {\n scope.classes += ' is-loading';\n });\n\n scope.$on(EventService.EVENT.LOADING_STOP, function() {\n scope.classes = scope.classes.replace('is-loading', '');\n });\n\n scope.$watch('inverted', function(newInverted) {\n if (newInverted) {\n scope.classes += ' LogoLoader--inverted';\n } else {\n scope.classes = scope.classes.replace('LogoLoader--inverted', '');\n }\n });\n },\n templateUrl: 'components/logo-loader/logo-loader.html'\n };\n }\n\n angular\n .module('app')\n .directive('logoLoader', logoLoader);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * MessageHandler.js\n * @ngInject\n */\n function MessageHandler() {\n return {\n displayError: function(msg) {\n console.error(msg);\n },\n displayWarning: function(msg) {\n console.warn(msg);\n },\n displayInfo: function(msg) {\n console.info(msg);\n }\n };\n }\n\n angular\n .module('app')\n .factory('MessageHandler', MessageHandler);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle notification in editor\n *\n * NotificationService.js\n * @ngInject\n */\n function NotificationService() {\n\n }\n\n angular\n .module('app')\n .factory('NotificationService', NotificationService);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * PhraseCache.js\n * Stores textflow, states in local cache.\n * TODO: use angular-data for storage\n * @ngInject\n */\n function PhraseCache($q, $resource, FilterUtil, UrlService, DocumentService,\n _) {\n var phraseCache = this,\n states = {}, //ids and states of all tu in order\n transUnits = {};\n\n phraseCache.getStates =\n function (projectSlug, versionSlug, documentId, localeId) {\n var key = generateKey(projectSlug, versionSlug, documentId, localeId);\n if (_.has(states, key)) {\n return $q.when(states[key]);\n } else {\n var encodedDocId = DocumentService.encodeDocId(documentId);\n var methods = {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: encodedDocId,\n localeId: localeId\n },\n isArray: true\n }\n },\n States = $resource(UrlService.TRANSLATION_STATUS_URL, {}, methods);\n return States.query().$promise.then(function (state) {\n state = FilterUtil.cleanResourceList(state);\n states[key] = state;\n return states[key];\n });\n }\n };\n\n phraseCache.getTransUnits = function (ids, localeId) {\n var results = {},\n missingTUId = [],\n missingLocaleTUId = [];\n ids.forEach(function (id) {\n if (_.has(transUnits, id)) {\n if(transUnits[id][localeId]) {\n results[id] = transUnits[id];\n } else {\n missingLocaleTUId.push(id);\n }\n } else {\n missingTUId.push(id);\n }\n });\n if (_.isEmpty(missingTUId) && _.isEmpty(missingLocaleTUId)) {\n return $q.when(results);\n }\n else {\n var TextFlows, Translations;\n if(!_.isEmpty(missingTUId)) {\n TextFlows = $resource(UrlService.TEXT_FLOWS_URL, {}, {\n query: {\n method: 'GET',\n params: {\n localeId: localeId,\n ids: missingTUId.join(',')\n }\n }\n });\n }\n if(!_.isEmpty(missingLocaleTUId)) {\n Translations = $resource(UrlService.TRANSLATION_URL, {}, {\n query: {\n method: 'GET',\n params: {\n localeId: localeId,\n ids: missingLocaleTUId.join(',')\n }\n }\n });\n }\n\n //need to create chain of promises\n if(TextFlows && Translations) {\n return TextFlows.query().$promise.then(updateCacheWithNewTU).\n then(Translations.query().$promise.then(updateCacheWithExistingTU));\n } else if(TextFlows) {\n return TextFlows.query().$promise.then(updateCacheWithNewTU);\n } else if(Translations) {\n return Translations.query().$promise.then(updateCacheWithExistingTU);\n }\n }\n\n function updateCacheWithExistingTU(newTransUnits) {\n newTransUnits = FilterUtil.cleanResourceMap(newTransUnits);\n for (var key in newTransUnits) {\n //push to cache\n transUnits[key][localeId] = newTransUnits[key][localeId];\n results[key] = transUnits[key]; //merge with results\n }\n return results;\n }\n\n function updateCacheWithNewTU(newTransUnits) {\n newTransUnits = FilterUtil.cleanResourceMap(newTransUnits);\n for (var key in newTransUnits) {\n transUnits[key] = newTransUnits[key]; //push to cache\n results[key] = transUnits[key]; //merge with results\n }\n return results;\n }\n };\n\n /**\n * On translation updated from server\n * @param id\n * @param localeId\n * @param revision\n * @param state\n * @param content\n * @param contents\n */\n phraseCache.onTransUnitUpdated =\n function (context, id, localeId, revision, status, phrase) {\n\n var key = generateKey(context.projectSlug, context.versionSlug,\n context.docId, localeId);\n\n var stateEntry = _.find(states[key], function(stateEntry) {\n return stateEntry.id === id;\n });\n //Update states cache\n if(stateEntry) {\n stateEntry.state = status;\n }\n\n //Update transUnits cache\n var translation = transUnits[id][localeId];\n if (!translation) {\n translation = {};\n }\n translation.revision = parseInt(revision);\n translation.state = status;\n translation.contents = phrase.newTranslations.slice();\n };\n\n function generateKey(projectId, versionId, documentId, localeId) {\n return projectId + '-' + versionId + '-' +\n documentId + '-' + localeId;\n }\n\n return phraseCache;\n }\n\n angular\n .module('app')\n .factory('PhraseCache', PhraseCache);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * @typedef {Object} Phrase\n * @property {number} id text flow id\n * @property {string[]} sources source contents\n * @property {string[]} translations original translation\n * @property {string[]} newTranslations translations in the editor\n * @property {boolean} plural whether it's in plural form\n * @property {StatusInfo} status information about this phrase\n * @property {number} revision translation revision number\n * @property {number} wordCount source word count\n */\n /**\n * @name PhraseService\n * @description Provides a list of phrases for the current document(s)\n *\n * @ngInject\n */\n function PhraseService(FilterUtil, PhraseCache, TransStatusService, _,\n $stateParams) {\n var phraseService = {};\n\n phraseService.phrases = []; //current displayed phrases\n\n // FIXME use an object for all the ID arguments - in general we will only\n // need to modify such an object sporadically when switching document\n // or locale, and it is neater than passing them all\n // around separately.\n\n phraseService.getPhraseCount = function(context, filter) {\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, context.localeId).then(function(states) {\n var ids = getIds(states, filter.status);\n return ids.length;\n });\n };\n\n /**\n * Fetch each of the text flows appearing in the given states data.\n */\n phraseService.fetchAllPhrase = function (context, filter,\n offset, maxResult) {\n\n var localeId = context.localeId;\n\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, localeId).then(getTransUnits);\n\n function getTransUnits(states) {\n var ids = getIds(states, filter.status);\n if (!isNaN(offset)) {\n if(!isNaN(maxResult)) {\n ids = ids.slice(offset, offset + maxResult);\n } else {\n ids = ids.slice(offset);\n }\n }\n // Reading for chaining promises https://github.com/kriskowal/q\n // (particularly \"Sequences\").\n return PhraseCache.getTransUnits(ids, localeId).\n then(transformToPhrases).then(sortPhrases);\n }\n\n /**\n * Converts text flow data from the API into the form expected in the\n * editor.\n *\n * @returns {Phrase[]}\n */\n function transformToPhrases(transUnits) {\n return _.map(transUnits, function(transUnit, id) {\n var source = transUnit.source,\n trans = transUnit[localeId];\n return {\n id: parseInt(id),\n sources: source.plural ? source.contents : [source.content],\n // Original translation\n translations: extractTranslations(source, trans),\n // Translation from editor\n newTranslations: extractTranslations(source, trans),\n plural: source.plural,\n // Conform the status from the server, return an object\n status: trans ? TransStatusService.getStatusInfo(trans.state) :\n TransStatusService.getStatusInfo('untranslated'),\n revision: trans ? parseInt(trans.revision) : 0,\n wordCount: parseInt(source.wordCount)\n };\n });\n }\n\n function extractTranslations(source, trans) {\n if(source.plural) {\n return trans && trans.contents ? trans.contents.slice() : [];\n }\n return trans ? [trans.content] : [];\n }\n\n function sortPhrases(phrases) {\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, localeId).then(function(states) {\n phraseService.phrases = _.sortBy(phrases, function(phrase) {\n var index = _.findIndex(states, function(state) {\n return state.id === phrase.id;\n });\n return index >= 0 ? index : phrases.length;\n });\n return phraseService.phrases;\n });\n }\n };\n\n //update phrase,statuses and textFlows with given tu id\n phraseService.onTransUnitUpdated = function(context, id, localeId, revision,\n status, phrase) {\n\n PhraseCache.onTransUnitUpdated(context, id, localeId, revision, status,\n phrase);\n\n var cachedPhrase = findPhrase(id, phraseService.phrases);\n //update phrase if found\n if(cachedPhrase) {\n cachedPhrase.translations = phrase.newTranslations.slice();\n cachedPhrase.revision = revision;\n cachedPhrase.status = TransStatusService.getStatusInfo(status);\n }\n };\n\n //rollback content of phrase\n phraseService.onTransUnitUpdateFailed = function(id) {\n var phrase = findPhrase(id, phraseService.phrases);\n if(phrase) {\n phrase.newTranslations = phrase.translations.slice();\n }\n };\n\n // find next Id from phrases states\n phraseService.findNextId = function(currentId) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (states) {\n var currentIndex,\n nextIndex;\n currentIndex = _.findIndex(states, function (state) {\n return state.id === currentId;\n });\n nextIndex = currentIndex + 1 < states.length ?\n currentIndex + 1 : states.length - 1;\n return states[nextIndex].id;\n });\n };\n\n // find previous id from phrases states\n phraseService.findPreviousId = function(currentId) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (states) {\n var currentIndex,\n previousIndex;\n currentIndex = _.findIndex(states, function (state) {\n return state.id === currentId;\n });\n previousIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : 0;\n return states[previousIndex].id;\n });\n };\n\n // find next phrase with requested status\n phraseService.findNextStatus = function(currentId, status) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (statusList) {\n var currentIndex,\n nextStatusInfo,\n requestStatus = TransStatusService.getStatusInfo(status);\n\n currentIndex = _.findIndex(statusList, function (state) {\n return state.id === currentId;\n });\n\n for (var i = currentIndex + 1; i < statusList.length; i++) {\n nextStatusInfo = TransStatusService.getStatusInfo(\n statusList[i].state);\n if (nextStatusInfo.ID === requestStatus.ID) {\n return statusList[i].id;\n }\n }\n return currentId;\n });\n };\n\n function findPhrase(id, phrases) {\n return _.find(phrases, function(phrase) {\n return phrase.id === id;\n });\n }\n\n function getIds(resources, states) {\n if(states) {\n resources = FilterUtil.filterResources(resources, ['status'], states);\n }\n return _.map(resources, function (item) {\n return item.id;\n });\n }\n\n // Does not appear to be used anywhere. Removing until phrase-caching code\n // is added.\n // phraseService.findById = function(phraseId) {\n // var deferred = $q.defer();\n // var phrase = phrases[phraseId];\n // deferred.resolve(phrase);\n // return deferred.promise;\n // };\n\n return phraseService;\n }\n\n angular\n .module('app')\n .factory('PhraseService', PhraseService);\n\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @name progressbar\n * @description progressbar container\n * @ngInject\n */\n function progressbar() {\n return {\n restrict: 'E',\n required: 'progressbarStatistic',\n scope: {\n statistic: '=progressbarStatistic',\n size: '@' //large, full, or empty\n },\n templateUrl: 'components/progressbar/progressbar.html',\n controller: function($scope) {\n /**\n * Need to set to true for complex object watch. Performance issue.\n * https://docs.angularjs.org/api/ng/type/$rootScope.Scope\n */\n $scope.$watch('statistic', function(statistic) {\n if (statistic) {\n $scope.style = getStyle(statistic);\n }\n }, true);\n }\n };\n }\n\n function getStyle(statistic) {\n var total = statistic.total,\n widthApproved = getWidthPercent(statistic.approved, total),\n widthTranslated = getWidthPercent(statistic.translated, total),\n marginLeftTranslated = widthApproved,\n widthNeedsWork = getWidthPercent(statistic.needswork, total),\n marginLeftNeedsWork = widthApproved + widthTranslated,\n widthUntranslated = getWidthPercent(statistic.untranslated, total),\n marginLeftUntranslated = widthApproved +\n widthTranslated + widthNeedsWork,\n style = {};\n\n style.approved = {\n 'width': widthApproved + '%',\n 'marginLeft': 0\n };\n style.translated = {\n 'width': widthTranslated + '%',\n 'marginLeft': marginLeftTranslated + '%'\n };\n style.needsWork = {\n 'width': widthNeedsWork + '%',\n 'marginLeft': marginLeftNeedsWork + '%'\n };\n style.untranslated = {\n 'width': widthUntranslated + '%',\n 'marginLeft': marginLeftUntranslated + '%'\n };\n return style;\n }\n\n function getWidthPercent(value, total) {\n var percent = 0;\n if (value) {\n percent = value / total * 100;\n }\n return percent;\n }\n\n angular\n .module('app')\n .directive('progressbar', progressbar);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle communication with server on Project related information.\n * ProjectService.js\n * @ngInject\n */\n\n function ProjectService(UrlService, $resource) {\n\n /**\n * Get project's information\n *\n * @param projectSlug\n * @returns {$promise|*|N.$promise}\n */\n function getProjectInfo(projectSlug) {\n var methods = {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug\n }\n }\n };\n\n var Locales = $resource(UrlService.PROJECT_URL, {}, methods);\n return Locales.query().$promise;\n }\n\n return {\n getProjectInfo: getProjectInfo\n };\n }\n angular\n .module('app')\n .factory('ProjectService', ProjectService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name display-character\n * @description display whitespace character with symbol(HTML),\n * *NOTE*, need to wrap around tag\n * @ngInject\n */\n function renderWhitespaceCharacters() {\n var WHITESPACES = {\n 'space' : {\n 'regex' : / /g,\n 'template' : ' '\n },\n 'newline' : {\n 'regex' : /\\n/g,\n 'template' : '\\n'\n },\n 'tab' : {\n 'regex' : /\\t/g,\n 'template' : '\\t'\n }\n };\n\n return {\n restrict: 'A',\n required: ['ngBind'],\n scope: {\n ngBind: '='\n },\n\n link: function compile(scope, element) {\n scope.$watch('ngBind', function (value) {\n value = replaceChar(value, WHITESPACES.space);\n value = replaceChar(value, WHITESPACES.newline);\n value = replaceChar(value, WHITESPACES.tab);\n element.html(value);\n });\n }\n };\n\n function replaceChar(value, whitespaceChar) {\n return value.replace(whitespaceChar.regex, whitespaceChar.template);\n }\n }\n\n angular\n .module('app')\n .directive('renderWhitespaceCharacters', renderWhitespaceCharacters);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Represents a draggable resizer.\n *\n * @param $window\n * @param $document\n * @param $timeout\n * @returns {Function}\n */\n function resizer(SettingsService, $window, $document, $timeout) {\n\n function link(scope, element, attrs) {\n\n /**\n * The height to use for the resizer when it is visible.\n *\n * @type {Number}\n */\n scope.height = parseInt(attrs.resizerHeight);\n\n /**\n * The current height of the resizer to display.\n *\n * @type {Number}\n */\n scope.actualHeight = scope.height;\n\n scope.position = normalisePercentage(SettingsService.get(\n SettingsService.SETTING.SUGGESTIONS_PANEL_HEIGHT), $window.innerHeight);\n scope.actualPosition = scope.position;\n\n scope.show =\n SettingsService.subscribe(SettingsService.SETTING.SHOW_SUGGESTIONS,\n function (show) {\n scope.show = show;\n setBottomPanelVisibility(show);\n });\n\n /**\n * Persist the current size as a setting.\n */\n function saveCurrentSize() {\n SettingsService.update(SettingsService.SETTING.SUGGESTIONS_PANEL_HEIGHT,\n scope.actualPosition);\n }\n\n function setBottomPanelVisibility(showing) {\n if (showing) {\n scope.actualPosition = scope.position;\n scope.actualHeight = scope.height;\n } else {\n // save resizer position so it can be restored\n // does not appear to set properly without an intermediate variable\n var currentPos = scope.actualPosition;\n scope.position = currentPos;\n scope.actualPosition = 0;\n scope.actualHeight = 0;\n }\n\n // Panel only renders properly if resizer is adjusted in a later frame\n setTimeout(adjustResizer);\n }\n\n setBottomPanelVisibility(scope.show);\n\n element.addClass('Resizer');\n\n // Initial Resize\n if (attrs.resizer === 'vertical') {\n element.addClass('Resizer--vertical');\n $timeout(function (){\n adjustVerticalPanel(scope.actualPosition);\n });\n }\n else {\n element.addClass('Resizer--horizontal');\n $timeout(function (){\n adjustHorizontalPanel(scope.actualPosition);\n });\n }\n\n element.on('mousedown', function(event) {\n event.preventDefault();\n $document.on('mousemove', mousemove);\n $document.on('mouseup', mouseup);\n });\n\n angular.element($window).bind('resize', function() {\n $timeout.cancel(scope.resizing);\n scope.resizing = $timeout(adjustResizer);\n });\n\n function mousemove(event) {\n if (attrs.resizer === 'vertical') {\n adjustVerticalPanel(event.pageX);\n } else {\n adjustHorizontalPanel($window.innerHeight - event.pageY);\n }\n }\n\n function adjustVerticalPanel(resizerPositionX) {\n var x = resizerPositionX,\n leftPanel = angular.element(document\n .querySelector(attrs.resizerLeft)),\n rightPanel = angular.element(document\n .querySelector(attrs.resizerRight)),\n maximumPanelSize =\n normalisePercentage(attrs.resizerMax, $window.innerHeight),\n minimumPanelSize = attrs.resizerMin ||\n parseInt(attrs.resizerWidth);\n\n scope.actualPosition = x;\n x = restrictMinOrMax(x, maximumPanelSize, minimumPanelSize);\n\n element.css({\n left: (x - (scope.actualHeight / 2)) + 'px'\n });\n\n leftPanel.css({\n width: x + 'px'\n });\n\n rightPanel.css({\n left: x + 'px'\n });\n }\n\n function adjustHorizontalPanel(resizerPositionY) {\n var y = resizerPositionY,\n topPanel = angular.element(document\n .querySelector(attrs.resizerTop)),\n bottomPanel = angular.element(document\n .querySelector(attrs.resizerBottom)),\n maximumPanelSize =\n normalisePercentage(attrs.resizerMax, $window.innerHeight),\n minimumPanelSize = attrs.resizerMin || scope.actualHeight;\n\n scope.actualPosition = y;\n y = restrictMinOrMax(y, maximumPanelSize, minimumPanelSize);\n\n element.css({\n bottom: (y - (scope.actualHeight / 2)) + 'px'\n });\n\n topPanel.css({\n bottom: y + 'px'\n });\n\n bottomPanel.css({\n height: y + 'px'\n });\n }\n\n function mouseup() {\n $document.unbind('mousemove', mousemove);\n $document.unbind('mouseup', mouseup);\n\n // Now that a new value has stopped rapidly changing, persist it.\n saveCurrentSize();\n }\n\n function adjustResizer() {\n if (attrs.resizer === 'vertical') {\n adjustVerticalPanel(scope.actualPosition);\n }\n else {\n adjustHorizontalPanel(scope.actualPosition);\n }\n }\n\n function restrictMinOrMax(currentSize, maxSize, minSize) {\n // Maximum\n if (maxSize && currentSize > maxSize) {\n return maxSize;\n }\n // Minimum\n else if (currentSize < minSize) {\n return minSize;\n }\n else {\n return currentSize;\n }\n }\n\n function normalisePercentage(fraction, whole) {\n if ((/[0-9]*\\.?[0-9]+%/).test(fraction)) {\n return Math.round(whole * (parseInt(fraction.replace('%','')) / 100));\n }\n else {\n return parseInt(fraction);\n }\n }\n\n }\n\n return {\n link: link\n };\n }\n\n angular\n .module('app')\n .directive('resizer', resizer);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name ScrollbarWidthCtrl\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n function ScrollbarWidthCtrl() {\n var scrollbarWidthCtrl = this;\n\n scrollbarWidthCtrl.init = function() {\n var container = scrollbarWidthCtrl.container[0],\n child = scrollbarWidthCtrl.child[0],\n scrollbarWidth = child.offsetWidth - container.offsetWidth;\n\n scrollbarWidthCtrl.width = scrollbarWidth / 2;\n };\n\n }\n\n angular\n .module('app')\n .controller('ScrollbarWidthCtrl', ScrollbarWidthCtrl);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name scrollbarWidth\n *\n * @description\n * Scrollbar width container\n * Needed for the controller to reference all properties\n */\n function scrollbarWidth() {\n return {\n restrict: 'A',\n controller: 'ScrollbarWidthCtrl as scrollbarWidthCtrl',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n scrollbarWidthCtrl.init(element);\n }\n };\n }\n\n /**\n * @name scrollbarWidthElement\n *\n * @description\n * The element to add the scrollbar width to\n */\n function scrollbarWidthElement() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n // Use the attribute to decide which property to set\n element.css(attrs.scrollbarWidthElement, scrollbarWidthCtrl.width);\n }\n };\n }\n\n /**\n * @name scrollbarWidthContainer\n *\n * @description\n * Get the scrollbar container width\n */\n function scrollbarWidthContainer() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.container = element;\n }\n };\n }\n\n /**\n * @name scrollbarWidthChild\n *\n * @description\n * Get the scrollbar child width\n */\n function scrollbarWidthChild() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.child = element;\n }\n };\n }\n\n angular\n .module('app')\n .directive('scrollbarWidth', scrollbarWidth)\n .directive('scrollbarWidthElement', scrollbarWidthElement)\n .directive('scrollbarWidthContainer', scrollbarWidthContainer)\n .directive('scrollbarWidthChild', scrollbarWidthChild);\n\n})();\n","(function() {\n 'use strict';\n\n\n /**\n * The name of a setting, used as a unique key for lookup and storage.\n * @typedef {string} SettingKey\n */\n\n /**\n * The value for a setting.\n *\n * @typedef {(string|number|boolean)} SettingValue\n */\n\n /**\n * Service for persisted user settings.\n *\n * @constructor\n */\n function SettingsService(EventService, $q, $rootScope, _) {\n var settingsService = this;\n\n /**\n * All valid settings keys.\n *\n * These enum constants should be used for all settings operations.\n *\n * @type {Object<*, SettingKey>}\n */\n settingsService.SETTING = {\n SUGGESTIONS_AUTOFILL_ON_ROW_SELECT: 'suggestionsAutofillOnRowSelect',\n SUGGESTIONS_SHOW_DIFFERENCE: 'suggestionsShowDifference',\n SHOW_SUGGESTIONS: 'showSuggestions',\n SUGGESTIONS_PANEL_HEIGHT: 'suggestionsPanelHeight'\n };\n\n var SETTING = settingsService.SETTING;\n\n /**\n * Settings enum, with default values that indicate the type\n * @enum {SettingValue}\n */\n var defaultSettings = {};\n defaultSettings[SETTING.SUGGESTIONS_AUTOFILL_ON_ROW_SELECT] = true;\n defaultSettings[SETTING.SUGGESTIONS_SHOW_DIFFERENCE] = false;\n defaultSettings[SETTING.SHOW_SUGGESTIONS] = true;\n defaultSettings[SETTING.SUGGESTIONS_PANEL_HEIGHT] = '30%';\n\n /**\n * Local settings cache.\n *\n * @type {Object}\n */\n var settings = _.clone(defaultSettings);\n\n\n /*\n\n TODO save settings to the server, prefer sending as a batch if possible\n (i.e. when updateAll is used, and future option to ensure only one save\n request at a time and use _.extend to combine all the queued settings\n while waiting).\n\n */\n\n /**\n * Update a single setting to have the given value.\n *\n * This will trigger a user setting update event.\n *\n * @param {SettingKey} setting the name of the setting to update\n * @param {SettingValue} value the new value for the setting\n */\n function update(setting, value) {\n validateSettingValue(value);\n var settingObj = {};\n settingObj[setting] = value;\n _.extend(settings, settingObj);\n\n EventService.emitEvent(EventService.EVENT.USER_SETTING_CHANGED, {\n setting: setting,\n value: value\n });\n }\n\n /**\n * Update multiple settings from a map of setting names and values.\n *\n * An event is triggered for each setting.\n *\n * @param {Object} settings\n */\n function updateAll(settings) {\n _.each(settings, function (value, key) {\n update(key, value);\n });\n }\n\n /**\n * Get the currently stored value for a setting.\n *\n * This should only be used to fetch the initial value or when a setting\n * is used once. To track changes to a setting, subscribe to the\n * USER_SETTING_CHANGED event and check the setting property of the event\n * payload.\n *\n * @param {SettingKey} setting name of the setting to look up\n */\n function get(setting) {\n if (_.has(settings, setting)) {\n return settings[setting];\n }\n // Incorrect key is a programmer error - default should be set for all\n // user settings that are used.\n console.error('Tried to look up setting with unrecognized key: %s',\n setting);\n }\n\n /**\n * Register an action to perform when a user setting value changes, and get\n * the current value.\n *\n * @param {SettingKey} setting the setting to get and subscribe to\n * @param {function} callback called with the new value\n * @return {SettingValue} the current value of the setting\n */\n function subscribe(setting, callback) {\n $rootScope.$on(EventService.EVENT.USER_SETTING_CHANGED,\n function (event, data) {\n if (data.setting === setting) {\n callback(data.value);\n }\n });\n return get(setting);\n }\n\n /**\n * Throw an error if the value is not the correct type for the setting.\n *\n * @param {SettingValue} value\n */\n function validateSettingValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'string':\n break;\n default:\n throw new Error('Invalid type for setting value: \"' + typeof value +\n '\".');\n }\n }\n\n\n\n return {\n SETTING: SETTING,\n update: update,\n updateAll: updateAll,\n get: get,\n subscribe: subscribe\n };\n }\n\n angular\n .module('app')\n .factory('SettingsService', SettingsService);\n})();\n","(function () {\n 'use strict';\n\n /**\n * SuggestionCtrl.js\n * @ngInject\n */\n function SuggestionCtrl(EventService, $rootScope, $scope, _, $timeout) {\n var suggestionCtrl = this;\n\n suggestionCtrl.copyButtonText = 'Copy Translation';\n\n $scope.searchTerm = (typeof $scope.search === 'string') ?\n [$scope.search] :\n $scope.search.sources;\n\n /**\n * Get a modifier for the row class that will determine display colours.\n *\n * Intended to be used to generate css class for the row:\n *\n * TransUnit--{{suggestionCtrl.rowDisplayType()}}\n *\n * @return {string} modifier to append to the TransUnit-- css class\n */\n\n suggestionCtrl.rowDisplayType = function () {\n /* @type {MatchDetail} */\n var topMatch = suggestionCtrl.topMatch();\n\n if (topMatch.type === 'IMPORTED_TM') {\n return 'secondary';\n }\n if (topMatch.type === 'LOCAL_PROJECT') {\n if (topMatch.contentState === 'Translated') {\n return 'success';\n }\n if (topMatch.contentState === 'Approved') {\n return 'highlight';\n }\n }\n console.error('Unable to generate row display type for top match');\n };\n\n /**\n *\n * @returns {string}\n */\n suggestionCtrl.percentDisplayType = function () {\n var type = suggestionCtrl.rowDisplayType();\n return type.charAt(0).toUpperCase() + type.substring(1);\n };\n\n /**\n * Return correct percentage to display.\n *\n * I am using this instead of Angular's number display because the number\n * display forces a particular number of decimal places rather than just\n * limiting to the specified number, and because we should never show 100%\n * unless it is exactly 100%.\n */\n suggestionCtrl.percent = function () {\n var percent = $scope.suggestion.similarityPercent;\n\n // Prevent very high percentages displaying as 100%\n if (percent > 99.99 && percent < 100) {\n return '99.99';\n }\n if (percent >= 99.90 && percent < 100) {\n return '99.9';\n }\n\n // Limit any inexact percentages to a single decimal place\n if (Math.round(percent) !== percent) {\n return percent.toFixed(1);\n }\n\n return percent;\n };\n\n /**\n * Return the details for the best match according to the following\n * criteria:\n *\n * - Content state and type: Approved > Translated > Imported\n * - Last modified: older modifications take higher priority.\n *\n * @return {MatchDetail} the best match\n */\n suggestionCtrl.topMatch = function () {\n return $scope.sortedDetails[0];\n };\n\n // TODO use sortByAll when lodash version is increased\n /**\n * Return a string that will naturally sort local project details before\n * imported TM details, approved state above translated state, and older\n * modification dates first, in that priority order.\n *\n * @param detail {MatchDetail} to generate a sorting string for\n * @returns {string}\n */\n function typeAndDateSort (detail) {\n\n if (detail.type === 'IMPORTED_TM') {\n return '3' + detail.lastChanged;\n }\n if (detail.type === 'LOCAL_PROJECT') {\n if (detail.contentState === 'Translated') {\n return '2' + detail.lastModifiedDate;\n }\n if (detail.contentState === 'Approved') {\n return '1' + detail.lastModifiedDate;\n }\n }\n // Unrecognized, sort last\n return '9';\n }\n\n /**\n * Request this suggestion to be copied to the selected translation field.\n *\n * Generates a COPY_FROM_SUGGESTION event.\n */\n suggestionCtrl.copySuggestion = function () {\n suggestionCtrl.copyButtonText = 'Copied';\n suggestionCtrl.copyButtonDisabled = true;\n $timeout(function() {\n suggestionCtrl.copyButtonDisabled = false;\n suggestionCtrl.copyButtonText = 'Copy Translation';\n }, 500);\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SUGGESTION,\n { suggestion: $scope.suggestion });\n };\n\n\n\n $rootScope.$on(EventService.EVENT.COPY_FROM_SUGGESTION_N,\n function (event, data) {\n if (data === $scope.index) {\n suggestionCtrl.copySuggestion();\n }\n });\n\n // TODO sort detail before it is sent here for display\n $scope.sortedDetails =\n _.sortBy($scope.suggestion.matchDetails, typeAndDateSort);\n\n\n // Will be undefined for imported matches\n $scope.translator = suggestionCtrl.topMatch().lastModifiedBy;\n\n\n return suggestionCtrl;\n }\n\n angular\n .module('app')\n .controller('SuggestionCtrl', SuggestionCtrl);\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @typedef {Object} ImportedMatchDetail\n * @param {string} type - 'IMPORTED_TM'\n * @param {number} transMemoryUnitId - numeric identifier for this translation\n * memory unit on the server\n * @param {string} transMemorySlug - identifier for the translation memory\n * that contains this translation unit\n * @param {string} transUnitId - optional identifier for this translation unit\n * @param {string} lastChanged - date that this text flow was last changed, in\n * ISO-8601 format\n */\n\n /**\n * @typedef {Object} LocalMatchDetail\n * @param {string} type - 'LOCAL_PROJECT'\n * @param {number} textFlowId - numeric identifier for this text flow on the\n * server\n * @param {string} contentState - 'Translated' or 'Approved'\n * @param {string} projectId - identifier for the project that this text flow\n * is in\n * @param {string} projectName - display name for the project that this text\n * flow is in\n * @param {string} version - identifier for the version that this text flow is\n * in\n * @param {string} documentPath - file path of the document that contains this\n * text flow.\n * @param {string} documentName - file name of the document that contains this\n * text flow, without the file path\n * @param {string} resId - natural id for this text flow within the document\n * @param {string} lastModifiedDate - date that this text flow was last\n * changed, in ISO-8601 format\n * @param {string} lastModifiedBy - username of the user who last modified\n * this text flow\n */\n\n /**\n * @typedef {(ImportedMatchDetail|LocalMatchDetail)} MatchDetail\n */\n\n /**\n * @typedef {Object} Suggestion\n * @param {number} relevanceScore - score from the search engine indicating\n * how close a match it considers this to the query.\n * It is sensible to compare scores within a query,\n * but not between queries.\n * @param {number} similarityPercent - proportion of the characters in\n * sourceContents that match the query\n * @param {Array} sourceContents - suggested source text that is\n * similar to the search\n * @param {Array} targetContents - translations of the suggested\n * source text\n * @param {Array} matchDetails - summary of all the sources with\n * the same source and target contents\n */\n\n /**\n * Provide suggestions based on given source text.\n *\n * SuggestionsService.js\n * @ngInject\n */\n function SuggestionsService(EditorService, EventService, UrlService,\n $resource) {\n\n /**\n * Get a list of suggestions for how to translate a piece of text.\n *\n * @param {string} searchText\n * @return {Promise>} suggestions for translating the\n * given text\n */\n function getSuggestionsForText(searchText) {\n return getSuggestionsForContents([searchText]);\n }\n\n /**\n * Get a list of suggestions for how to translate a phrase.\n *\n * @param {Phrase} phrase the source text to find suggestions for\n * @returns {Promise>} suggestions for translating the\n * given phrase\n */\n function getSuggestionsForPhrase(phrase) {\n return getSuggestionsForContents(phrase.sources)\n .then(function (suggestions) {\n EventService.emitEvent(EventService.EVENT.PHRASE_SUGGESTION_COUNT,\n { id: phrase.id, count: suggestions.length });\n return suggestions;\n });\n }\n\n /**\n * Get a list of suggestions for how to translate a list of strings.\n *\n * @param contents {Array} source strings to find matches for\n * @returns {Promise>}\n */\n function getSuggestionsForContents(contents) {\n var sourceLocale = EditorService.context.srcLocale.localeId;\n var transLocale = EditorService.context.localeId;\n\n var postQuery = {\n query: {\n method: 'POST',\n params: {\n from: sourceLocale,\n to: transLocale,\n searchType: 'FUZZY_PLURAL'\n },\n isArray: true\n }\n };\n\n var Suggestions = $resource(UrlService.SUGGESTIONS_URL, {}, postQuery);\n return Suggestions.query({}, contents).$promise;\n }\n\n return {\n getSuggestionsForPhrase: getSuggestionsForPhrase,\n getSuggestionsForText: getSuggestionsForText\n };\n }\n\n angular\n .module('app')\n .factory('SuggestionsService', SuggestionsService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name suggestion\n * @description suggestion container\n * @ngInject\n */\n function suggestion() {\n return {\n // Only use the template on elements with this name (not on things that\n // have an attribute or class called 'suggestion'.\n restrict: 'E',\n //required: ['suggestion'],\n\n // Specify an isolated scope for the suggestion component.\n scope: {\n // make variable 'suggestion' available in the template's scope, and\n // bind its value from the attribute with the same name.\n // (a different name for the attribute can be specified after the =\n suggestion: '=',\n index: '=',\n search: '=',\n diffEnabled: '='\n\n // If I put & instead of = in front of a name, it will run it in the\n // parent scope instead of this directive's isolated scope. Good for\n // callbacks.\n },\n controller: 'SuggestionCtrl as suggestionCtrl',\n templateUrl: 'components/suggestions/suggestion.html'\n };\n }\n\n angular\n .module('app')\n .directive('suggestion', suggestion);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name toggle-checkbox\n * @description Add an extra element to a checkbox to\n * so we can style it differently\n * @ngInject\n */\n function toggleCheckbox() {\n return {\n restrict: 'A',\n link: function(scope, element) {\n element.after('');\n }\n };\n }\n\n angular\n .module('app')\n .directive('toggleCheckbox', toggleCheckbox);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * @typedef {Object} StatusInfo\n * @property {string} ID lower case translation status (content state)\n * @property {string} NAME capitalized representation\n * @property {string} CSSCLASS css class to use for this status\n *\n */\n /**\n * TransStatusService.js\n *\n * @ngInject\n */\n function TransStatusService(_) {\n var transStatusService = this,\n STATUSES = {\n 'UNTRANSLATED': {\n 'ID': 'untranslated',\n 'NAME': 'Untranslated',\n 'CSSCLASS': 'neutral'\n },\n 'NEEDSWORK': {\n 'ID': 'needswork',\n 'NAME': 'Needs Work',\n 'CSSCLASS': 'unsure'\n },\n 'TRANSLATED' : {\n 'ID': 'translated',\n 'NAME': 'Translated',\n 'CSSCLASS': 'success'\n },\n 'APPROVED': {\n 'ID': 'approved',\n 'NAME': 'Approved',\n 'CSSCLASS': 'highlight'\n }\n };\n\n transStatusService.getAll = function() {\n return STATUSES;\n };\n\n transStatusService.getAllAsArray = function() {\n return _.values(STATUSES);\n };\n\n /**\n *\n * @param {string} statusKey string representation of the status.\n * @returns {StatusInfo}\n */\n transStatusService.getStatusInfo = function(statusKey) {\n return STATUSES[conformStatus(statusKey)];\n };\n\n transStatusService.getId = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].ID;\n };\n\n transStatusService.getServerId = function(statusId) {\n return serverStatusId(statusId);\n };\n\n transStatusService.getName = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].NAME;\n };\n\n transStatusService.getCSSClass = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].CSSCLASS;\n };\n\n /**\n * Conform it to uppercase for lookups and\n * temporary fix for server sending \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function conformStatus(statusKey) {\n statusKey = angular.uppercase(statusKey);\n if (!statusKey || statusKey === 'NEW') {\n statusKey = 'UNTRANSLATED';\n } else if (statusKey === 'NEEDREVIEW') {\n statusKey = 'NEEDSWORK';\n }\n return statusKey;\n }\n\n /**\n * Conform it to PascalCase for lookups and\n * temporary fix for server receiving \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function serverStatusId(statusId) {\n statusId = angular.lowercase(statusId);\n if (!statusId || statusId === 'untranslated') {\n return 'New';\n } else if (statusId === 'needswork') {\n return 'NeedReview';\n }\n return statusId.charAt(0).toUpperCase() + statusId.slice(1).toLowerCase();\n }\n\n return transStatusService;\n }\n\n angular\n .module('app')\n .factory('TransStatusService', TransStatusService);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitCtrl.js\n * @ngInject\n */\n function TransUnitCtrl($rootScope, $scope, $element, $stateParams, _,\n TransUnitService, EventService, LocaleService, focus,\n EditorShortcuts, PhraseUtil, SettingsService) {\n\n var transUnitCtrl = this;\n\n transUnitCtrl.selected = false;\n transUnitCtrl.focused = false;\n transUnitCtrl.focusedTranslationIndex = 0;\n\n transUnitCtrl.hasTranslationChanged =\n PhraseUtil.hasTranslationChanged;\n\n transUnitCtrl.focusTranslation = function() {\n if(transUnitCtrl.selected) {\n focus('phrase-' + $scope.phrase.id + '-' +\n transUnitCtrl.focusedTranslationIndex);\n }\n };\n\n // when user clicked on TU or using tab to nav\n transUnitCtrl.onTextAreaFocus = function(phrase, index) {\n transUnitCtrl.focused = true;\n if (!_.isUndefined(index)) {\n transUnitCtrl.focusedTranslationIndex = index;\n }\n if(!transUnitCtrl.selected) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': phrase.id,\n 'updateURL': true,\n 'focus': true\n }, $scope);\n }\n };\n\n transUnitCtrl.translationTextModified = function(phrase) {\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n };\n\n transUnitCtrl.getPhrase = function() {\n return $scope.phrase;\n };\n\n transUnitCtrl.init = function() {\n TransUnitService.addController($scope.phrase.id, transUnitCtrl);\n if($stateParams.id && parseInt($stateParams.id) === $scope.phrase.id) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $stateParams.id,\n 'updateURL': false,\n 'focus' : $stateParams.selected});\n }\n };\n\n transUnitCtrl.copySource = function($event, phrase, sourceIndex) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n {'phrase': phrase, 'sourceIndex': sourceIndex}, $scope);\n };\n\n transUnitCtrl.undoEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.cancelEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.saveAs = function($event, phrase, status) {\n EditorShortcuts.saveTranslationCallBack($event, phrase, status);\n };\n\n transUnitCtrl.getLocaleName = function(localeId) {\n return LocaleService.getName(localeId);\n };\n\n transUnitCtrl.toggleSaveAsOptions = function(open) {\n EventService.broadcastEvent( open ? 'openDropdown': 'closeDropdown',\n {}, $scope);\n if (open) {\n // focus on the first dropdown option\n focus($scope.phrase.id + '-saveAsOption-0');\n }\n };\n\n var SHOW_SUGGESTIONS = SettingsService.SETTING.SHOW_SUGGESTIONS;\n $scope.showSuggestions = SettingsService.subscribe(SHOW_SUGGESTIONS,\n function (show) {\n $scope.showSuggestions = show;\n });\n\n $rootScope.$on(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n function(event, data) {\n transUnitCtrl.suggestionsSearchIsActive = data;\n });\n\n transUnitCtrl.toggleSuggestionPanel = function () {\n if (transUnitCtrl.suggestionsSearchIsActive) {\n EventService.emitEvent(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n false);\n }\n else {\n SettingsService.update(SHOW_SUGGESTIONS, !$scope.showSuggestions);\n }\n };\n\n $scope.suggestionCount = 0;\n $rootScope.$on(EventService.EVENT.PHRASE_SUGGESTION_COUNT,\n function (event, data) {\n if (data.id === $scope.phrase.id) {\n $scope.suggestionCount = data.count;\n }\n });\n\n transUnitCtrl.cancelSaveAsMode = function() {\n EditorShortcuts.cancelSaveAsModeIfOn();\n };\n\n $scope.$on('$destroy', function () {\n $element.unbind('click', onTransUnitClick);\n $element.unbind('focus', onTransUnitClick);\n });\n\n transUnitCtrl.updateSaveButton = function (phrase) {\n transUnitCtrl.saveButtonStatus =\n PhraseUtil.getSaveButtonStatus($scope.phrase);\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n $scope.phrase);\n transUnitCtrl.saveButtonText = transUnitCtrl.saveButtonStatus.NAME;\n transUnitCtrl.saveButtonDisabled =\n !PhraseUtil.hasTranslationChanged(phrase);\n transUnitCtrl.loadingClass = '';\n transUnitCtrl.savingStatus = '';\n };\n\n transUnitCtrl.phraseSaving = function (data) {\n transUnitCtrl.loadingClass = 'is-loading';\n transUnitCtrl.saveButtonStatus =\n transUnitCtrl.savingStatus = data.status;\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n data.phrase);\n transUnitCtrl.saveButtonText = 'Saving…';\n transUnitCtrl.saveButtonDisabled = true;\n };\n\n transUnitCtrl.saveButtonOptionsAvailable = function() {\n return !_.isEmpty(transUnitCtrl.saveButtonOptions);\n };\n\n transUnitCtrl.selectTransUnit = function(phrase) {\n if (!transUnitCtrl.selected) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': phrase.id,\n 'updateURL': true,\n 'focus': true\n }, $scope);\n }\n };\n\n function onTransUnitClick() {\n if(!transUnitCtrl.selected) {\n $scope.$apply(function () {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $scope.phrase.id,\n 'updateURL': true,\n 'focus': true}, $scope);\n });\n }\n }\n\n return transUnitCtrl;\n }\n\n angular\n .module('app')\n .controller('TransUnitCtrl', TransUnitCtrl);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitService\n *\n * See PhraseService.transformToPhrases function for phrase definition.\n *\n * @ngInject\n */\n function TransUnitService(_, $location, $rootScope, $state, $stateParams,\n $filter, MessageHandler, EventService, TransStatusService, PRODUCTION,\n EditorShortcuts, PhraseUtil, $timeout) {\n var transUnitService = this,\n controllerList = {},\n selectedTUId;\n\n transUnitService.addController = function(id, controller) {\n controllerList[id] = controller;\n };\n\n transUnitService.getSaveButtonOptions = function(saveButtonStatus, phrase) {\n return filterSaveButtonOptions(saveButtonStatus, phrase);\n };\n\n $rootScope.$on(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n function(event, data) {\n var transUnitCtrl = controllerList[data.id];\n if (transUnitCtrl) {\n transUnitCtrl.toggleSaveAsOptions(data.open);\n }\n });\n\n /**\n * EventService.EVENT.SELECT_TRANS_UNIT listener\n * - Select and focus a trans-unit.\n * - Perform implicit save on previous selected TU if changed\n * - Update url with TU id without reload state\n */\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n var newTuController = controllerList[data.id],\n oldTUController = controllerList[selectedTUId],\n updateURL = data.updateURL;\n\n EventService.emitEvent(EventService.EVENT.REQUEST_PHRASE_SUGGESTIONS,\n {\n 'phrase' : newTuController.getPhrase()\n });\n\n if(newTuController) {\n EditorShortcuts.selectedTUCtrl = newTuController;\n\n if (selectedTUId && selectedTUId !== data.id) {\n setSelected(oldTUController, false);\n\n //perform implicit save if changed\n if(PhraseUtil.hasTranslationChanged(\n oldTUController.getPhrase())) {\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase' : oldTUController.getPhrase(),\n 'status' : TransStatusService.getStatusInfo('TRANSLATED'),\n 'locale' : $stateParams.localeId,\n 'docId' : $stateParams.docId\n });\n }\n }\n\n updateSaveButton(event, newTuController.getPhrase());\n selectedTUId = data.id;\n setSelected(newTuController, true);\n\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION, data);\n\n //Update url without reload state\n if(updateURL) {\n if($state.current.name !== 'editor.selectedContext.tu') {\n $state.go('editor.selectedContext.tu', {\n 'id': data.id,\n 'selected': data.focus.toString()\n });\n } else {\n $location.search('id', data.id);\n $location.search('selected', data.focus.toString());\n }\n }\n } else {\n MessageHandler.displayWarning('Trans-unit not found:' + data.id);\n }\n });\n\n /**\n * EventService.EVENT.COPY_FROM_SOURCE listener\n * Copy translation from source\n */\n $rootScope.$on(EventService.EVENT.COPY_FROM_SOURCE,\n function (event, data) {\n var sourceIndex = 0;\n if(data.phrase.plural) {\n //clicked copy source button\n sourceIndex = data.sourceIndex;\n if(_.isUndefined(sourceIndex)) {\n //copy source key shortcut, copy corresponding source to target\n var transUnitCtrl = controllerList[data.phrase.id];\n sourceIndex = transUnitCtrl.focusedTranslationIndex;\n if(data.phrase.sources.length <\n transUnitCtrl.focusedTranslationIndex + 1) {\n sourceIndex = data.phrase.sources.length - 1;\n }\n }\n }\n setTranslationText(data.phrase, data.phrase.sources[sourceIndex]);\n });\n\n $rootScope.$on(EventService.EVENT.COPY_FROM_SUGGESTION,\n function (event, data) {\n if (selectedTUId) {\n var transUnitCtrl = controllerList[selectedTUId];\n var phrase = transUnitCtrl.getPhrase();\n\n var suggestion = data.suggestion;\n var targets = suggestion.targetContents;\n\n var copyAsPlurals = phrase.plural && targets.length > 1;\n\n\n if (copyAsPlurals) {\n var pluralCount = phrase.translations.length;\n\n if (targets.length < pluralCount) {\n var lastSuggestion = _.last(targets);\n // pad suggestions with last suggestion, but only when there are\n // no translations entered for the extra plural forms.\n targets = _.assign(phrase.translations.slice(), targets,\n function (current, suggested) {\n if (suggested) return suggested;\n if (current) return current;\n return lastSuggestion;\n });\n }\n if (targets.length > pluralCount) {\n targets = _.first(targets, pluralCount);\n }\n\n setAllTranslations(phrase, targets);\n } else {\n setTranslationText(phrase, targets[0]);\n }\n }\n });\n\n /**\n * EventService.EVENT.UNDO_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.UNDO_EDIT,\n function (event, phrase) {\n if (PhraseUtil.hasTranslationChanged(phrase)) {\n setAllTranslations(phrase, phrase.translations);\n }\n });\n\n /**\n * EventService.EVENT.CANCEL_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function (event, phrase) {\n if(selectedTUId) {\n setSelected(controllerList[selectedTUId], false);\n selectedTUId = false;\n EditorShortcuts.selectedTUCtrl = null;\n }\n\n $location.search('selected', null);\n if(!phrase) {\n $location.search('id', null);\n }\n\n // EditorContentCtrl#changePage doesn't provide a phrase object\n if (phrase) {\n $timeout(function() {\n return $rootScope.$broadcast('blurOn', 'phrase-' + phrase.id);\n });\n }\n });\n\n /**\n * EventService.EVENT.TRANSLATION_TEXT_MODIFIED listener\n *\n */\n $rootScope.$on(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n updateSaveButton);\n\n /**\n * EventService.EVENT.FOCUS_TRANSLATION listener\n *\n */\n $rootScope.$on(EventService.EVENT.FOCUS_TRANSLATION,\n setFocus);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_INITIATED,\n phraseSaving);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_COMPLETED,\n updateSaveButton);\n\n function setTranslationText(phrase, newText) {\n var index = 0;\n if (phrase.plural) {\n var transUnitCtrl = controllerList[phrase.id];\n index = transUnitCtrl.focusedTranslationIndex;\n }\n phrase.newTranslations[index] = newText;\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n phrase);\n }\n\n function setAllTranslations(phrase, newTexts) {\n //need slice() for new instance of array\n phrase.newTranslations = newTexts.slice();\n\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n phrase);\n }\n\n function updateSaveButton(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.updateSaveButton(phrase);\n }\n\n function phraseSaving(event, data) {\n var transUnitCtrl = controllerList[data.phrase.id];\n transUnitCtrl.phraseSaving(data);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n data.phrase);\n }\n\n function setSelected(transUnitCtrl, isSelected) {\n //This check is to prevent selected event being triggered repeatedly.\n if(transUnitCtrl.selected !== isSelected) {\n transUnitCtrl.selected = isSelected || false;\n }\n }\n\n function setFocus(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.focusTranslation();\n }\n\n /**\n * Filters the dropdown options for saving a translation\n * Unless the translation is empty, remove untranslated as an option\n * Filter the current default save state out of the list and show remaining\n *\n * @param {Object} saveStatus The current default translation *save* status\n * @return {Array} Is used to construct the dropdown list\n */\n function filterSaveButtonOptions(saveStatus, phrase) {\n var filteredOptions = [];\n if (saveStatus.ID === 'untranslated') {\n return filteredOptions;\n }\n filteredOptions = $filter('filter')\n (TransStatusService.getAllAsArray(), {ID: '!untranslated'});\n\n if(phrase.plural) {\n if(PhraseUtil.hasNoTranslation(phrase)) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!needswork'});\n } else if(PhraseUtil.hasEmptyTranslation(phrase)) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!translated'});\n }\n }\n\n if (PRODUCTION) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!approved'});\n }\n\n return $filter('filter')(filteredOptions, {ID: '!'+saveStatus.ID});\n }\n\n return transUnitService;\n }\n\n angular\n .module('app')\n .factory('TransUnitService', TransUnitService);\n})();\n\n\n","(function() {\n 'use strict';\n\n /**\n * @name trans-unit\n * @description transUnit container\n * @ngInject\n */\n function transUnit() {\n return {\n restrict: 'E',\n required: ['phrase', 'editorContext'],\n scope: {\n phrase: '=',\n firstPhrase: '=',\n editorContext: '='\n },\n controller: 'TransUnitCtrl as transUnitCtrl',\n templateUrl: 'components/transUnit/trans-unit.html',\n link: function(scope, element, attr, TransUnitCtrl) {\n TransUnitCtrl.init();\n }\n };\n }\n\n angular\n .module('app')\n .directive('transUnit', transUnit);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name trans-unit\n * @description transUnit container\n * @ngInject\n */\n function transUnitFilter() {\n return {\n restrict: 'E',\n required: ['editor'],\n scope: {\n editor: '='\n },\n templateUrl: 'components/transUnitFilter/trans-unit-filter.html'\n };\n }\n\n angular\n .module('app')\n .directive('transUnitFilter', transUnitFilter);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * UserService.js\n *\n * @ngInject\n */\n function UserService($resource, UrlService) {\n\n function getUserInfo(username) {\n var UserInfo = $resource(UrlService.USER_INFO_URL, {}, {\n query: {\n method: 'GET',\n params: {\n username: username\n }\n }\n });\n return UserInfo.query().$promise;\n }\n\n function getMyInfo() {\n var MyInfo = $resource(UrlService.MY_INFO_URL, {}, {\n query: {\n method: 'GET'\n }\n });\n return MyInfo.query().$promise;\n }\n\n return {\n settings: {\n editor: {\n hideMainNav: false\n }\n },\n getUserInfo: getUserInfo,\n getMyInfo: getMyInfo\n };\n }\n angular\n .module('app')\n .factory('UserService', UserService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * FilterUtil.js\n *\n * @ngInject\n */\n function FilterUtil(StringUtil, _) {\n\n /**\n * Filter in resources on given fields with matched terms\n *\n * @param resources - list of resources\n * @param fields - list of fields to check\n * @param terms - list of term to check\n * @returns {*}\n */\n function filterResources(resources, fields, terms) {\n if(!resources || !fields || !terms) {\n return resources;\n }\n return _.filter(resources, function (resource) {\n return isInclude(resource, fields, terms);\n });\n }\n\n /**\n * Filter out properties starting with $ (added by promise)\n * @param resources\n */\n function cleanResourceMap(resources) {\n var filteredList = {};\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList[id] = (resources[id]);\n });\n return filteredList;\n }\n\n function cleanResourceList(resources) {\n var filteredList = [];\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList.push(resources[id]);\n });\n return filteredList;\n }\n\n\n function isInclude(resource, fields, terms) {\n if(!resource || !fields || !terms) {\n return false;\n }\n return _.any(fields, function(field) {\n return _.any(terms, function(term) {\n return StringUtil.equals(resource[field], term, true);\n });\n });\n }\n\n return {\n filterResources : filterResources,\n cleanResourceList:cleanResourceList,\n cleanResourceMap : cleanResourceMap\n };\n }\n angular\n .module('app')\n .factory('FilterUtil', FilterUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * PhraseUtil.js\n *\n * @ngInject\n */\n function PhraseUtil(TransStatusService, _) {\n\n function getSaveButtonStatus(phrase) {\n if (hasNoTranslation(phrase)) {\n return TransStatusService.getStatusInfo('untranslated');\n }\n else if (hasEmptyTranslation(phrase)) {\n return TransStatusService.getStatusInfo('needswork');\n }\n else if (hasTranslationChanged(phrase)) {\n return TransStatusService.getStatusInfo('translated');\n }\n else {\n return phrase.status;\n }\n }\n\n function hasTranslationChanged(phrase) {\n // on Firefox with input method turned on,\n // when hitting tab it seems to turn undefined value into ''\n var allSame = _.every(phrase.translations,\n function(translation, index) {\n return nullToEmpty(translation) ===\n nullToEmpty(phrase.newTranslations[index]);\n });\n return !allSame;\n }\n\n function hasNoTranslation(phrase) {\n return _.isEmpty(_.compact(phrase.newTranslations));\n }\n\n function hasEmptyTranslation(phrase) {\n return _.compact(phrase.newTranslations).length !==\n phrase.newTranslations.length;\n }\n\n function nullToEmpty(value) {\n return value || '';\n }\n\n return {\n getSaveButtonStatus : getSaveButtonStatus,\n hasTranslationChanged : hasTranslationChanged,\n hasNoTranslation : hasNoTranslation,\n hasEmptyTranslation : hasEmptyTranslation\n };\n }\n angular\n .module('app')\n .factory('PhraseUtil', PhraseUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility method for handling $resource.statistic\n *\n * StatisticUtil.js\n * @ngInject\n *\n */\n\n function StatisticUtil() {\n return {\n getWordStatistic: function(statistics) {\n return statistics[0].unit === 'WORD' ? statistics[0] : statistics[1];\n },\n getMsgStatistic: function(statistics) {\n return statistics[0].unit === 'MESSAGE' ? statistics[0] : statistics[1];\n }\n };\n }\n angular\n .module('app')\n .factory('StatisticUtil', StatisticUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * StringUtil\n *\n * @ngInject\n */\n\n function StringUtil() {\n function startsWith(str, prefix, ignoreCase) {\n if (ignoreCase && str && prefix) {\n str = str.toUpperCase();\n prefix = prefix.toUpperCase();\n }\n return str.lastIndexOf(prefix, 0) === 0;\n }\n\n function endsWith(str, suffix, ignoreCase) {\n if (ignoreCase && str && suffix) {\n str = str.toUpperCase();\n suffix = suffix.toUpperCase();\n }\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\n }\n\n function equals(from, to, ignoreCase) {\n if (ignoreCase && from && to) {\n from = from.toUpperCase();\n to = to.toUpperCase();\n }\n return from === to;\n }\n\n return {\n startsWith : startsWith,\n endsWith : endsWith,\n equals : equals\n };\n }\n angular\n .module('app')\n .factory('StringUtil', StringUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility to handles URL related request.\n *\n * UrlService.js\n * @ngInject\n */\n function UrlService($location, $http, $q, $stateParams, _) {\n //IE doesn't support location.origin\n if (!location.origin) {\n location.origin =\n window.location.protocol + '//' + window.location.hostname +\n (window.location.port ? (':' + window.location.port) : '');\n }\n\n var urlService = this,\n gravatarBaseUrl = 'http://www.gravatar.com/avatar',\n configFile = 'config.json',\n baseUrl = '',\n urls = {},\n uiTranslationsURL = location.origin + location.pathname +\n 'translations';\n\n urlService.serverContextPath = '';\n\n urlService.init = function () {\n if (baseUrl) {\n return $q.when(baseUrl);\n }\n else {\n /**\n * Temporary solution to handle dynamic context path deployed for\n * Zanata server in JBOSS (/ or /zanata).\n *\n * If config.baseUrl exist and not empty,\n * baseUrl = config.baseUrl\n *\n * ELSE\n * baseUrl = full.url - appPath onwards\n */\n return $http.get(configFile).then(function (response) {\n var config = response.data;\n if (config.baseUrl) {\n baseUrl = config.baseUrl;\n } else {\n var deployPath = config.appPath.replace(/^\\//g, ''),\n index = location.href.indexOf(deployPath);\n\n urlService.serverContextPath = location.origin + location.pathname;\n if(index >= 0) {\n urlService.serverContextPath = location.href.substring(0, index);\n }\n urlService.serverContextPath = urlService.serverContextPath.\n replace(/\\/?$/, '/');\n baseUrl = urlService.serverContextPath + 'rest';\n }\n\n /* jshint -W101 */\n // URLs over multiple lines are hard to read, allowing long lines here.\n // Warnings for jshint are turned off/on with -/+ before the warning code.\n // See: https://github.com/jshint/jshint/blob/2.1.4/src/shared/messages.js\n urls = _.mapValues({\n project: '/project/:projectSlug',\n docs: '/project/:projectSlug/version/:versionSlug/docs',\n locales: '/project/:projectSlug/version/:versionSlug/locales',\n status: '/project/:projectSlug/version/:versionSlug/doc/:docId/status/:localeId',\n textFlows: '/source+trans/:localeId',\n docStats: '/stats/project/:projectSlug/version/:versionSlug/doc/:docId/locale/:localeId',\n myInfo: '/user',\n userInfo: '/user/:username',\n translation: '/trans/:localeId',\n allLocales: '/locales',\n suggestions: '/suggestions'\n }, unary(restUrl));\n /* jshint +W101 */\n\n urlService.PROJECT_URL = urls.project;\n urlService.LOCALE_LIST_URL = urls.locales;\n urlService.DOCUMENT_LIST_URL = urls.docs;\n urlService.TRANSLATION_STATUS_URL = urls.status;\n urlService.TEXT_FLOWS_URL = urls.textFlows;\n urlService.DOC_STATISTIC_URL = urls.docStats;\n urlService.MY_INFO_URL = urls.myInfo;\n urlService.USER_INFO_URL = urls.userInfo;\n urlService.TRANSLATION_URL = urls.translation;\n urlService.ALL_LOCALE_URL = urls.allLocales;\n urlService.SUGGESTIONS_URL = urls.suggestions;\n\n urlService.PROJECT_PAGE = function(projectSlug, versionSlug) {\n return urlService.serverContextPath + 'iteration/view/' +\n projectSlug + '/' + versionSlug;\n };\n\n urlService.DASHBOARD_PAGE = urlService.serverContextPath +\n 'dashboard';\n });\n }\n };\n\n /**\n * Get the value of a query string parameter.\n */\n urlService.readValue = function (key) {\n return $location.search()[key];\n };\n\n urlService.gravatarUrl = function (gravatarHash, size) {\n return gravatarBaseUrl + '/' + gravatarHash +\n '?d=mm&r=g&s=' + size;\n };\n\n urlService.uiTranslationURL = function (locale) {\n return uiTranslationsURL + '/' + locale + '.json';\n };\n\n urlService.uiTranslationListURL = uiTranslationsURL + '/locales';\n\n return urlService;\n\n /**\n * Create a REST URL by appending all the given URL part arguments to the\n * base URL.\n *\n * No separators will be added or removed, so all parts should include\n * leading / and exclude trailing / to avoid problems.\n */\n function restUrl() {\n return baseUrl + Array.prototype.join.call(arguments, '');\n }\n\n /**\n * Decorate a function to ignore all but the first argument.\n */\n function unary(fun) {\n return function(arg) {\n return fun(arg);\n };\n }\n }\n\n angular\n .module('app')\n .factory('UrlService', UrlService);\n})();\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/zanata-war/src/main/webapp/app/maps/libs.js.map b/zanata-war/src/main/webapp/app/maps/libs.js.map index f4fba3f2a8..0f57a98ac3 100644 --- a/zanata-war/src/main/webapp/app/maps/libs.js.map +++ b/zanata-war/src/main/webapp/app/maps/libs.js.map @@ -1 +1 @@ -{"version":3,"sources":["angular/angular.js","angular-animate/angular-animate.js","angular-elastic/elastic.js","angular-resource/angular-resource.js","highlightjs/highlight.pack.js","modernizr/modernizr-custom.js","mousetrap/mousetrap.js","ng-focus-on/ng-focus-on.js","angular-gettext/dist/angular-gettext.js","angular-hotkeys/src/hotkeys.js","angular-ui-router/release/angular-ui-router.js","lodash/dist/lodash.compat.js","underscore.string/lib/underscore.string.js"],"names":[],"mappings":"AAAA;CACC;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;EACA;IACE;MACE;MACA;MACA;MACA;QACE;UACE;QACF;UACE;QACF;UACE;QACF;QACA;MACF;MACA;;IAEF;MACE;;MAEA;QACE;QACA;UACE;QACF;UACE;QACF;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;IACF;MACE;QACE;IACJ;IACA;EACF;AACF;;AAEA;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;EACE;EACA;MACI;MACA;AACN;AACA;EACE;EACA;MACI;MACA;AACN;;;AAGA;AACA;AACA;AACA;EACE;EACA;AACF;;;AAGA;IACI;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;AAEJ;CACC;CACA;CACA;AACD;AACA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;SACO;AACT;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;KACA;KACA;OACE;KACF;KACA;GACF;CACF;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;EACA;IACE;MACE;QACE;QACA;QACA;UACE;QACF;MACF;IACF;MACE;MACA;QACE;UACE;QACF;MACF;IACF;QACI;IACJ;MACE;QACE;UACE;QACF;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;MACE;MACA;QACE;QACA;MACF;IACF;EACF;;EAEA;EACA;AACF;;AAEA;EACE;AACF;;;AAGA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;KACF;GACF;CACF;AACD;AACA;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;KACF;GACF;CACF;AACD;AACA;;;AAGA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;AACJ;;AAEA;CACC;CACA;CACA;AACD;EACE;EACA;IACE;EACF;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;IACE;MACE;QACE;EACN;;EAEA;AACF;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;IACE;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;IACA;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;EACC;IACE;MACE;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;IACF;CACH;CACA;CACA;CACA;AACD;EACE;IACE;MACE;EACJ;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;MACF;QACE;QACA;MACF;QACE;QACA;MACF;IACF;EACF;IACE;MACE;;IAEF;IACA;;IAEA;MACE;MACA;;MAEA;MACA;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;QACA;MACF;IACF;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;MACA;QACE;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;MACA;IACF;;EAEF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;;IAEA;MACE;IACF;EACF;IACE;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;IACE;MACE;QACE;QACA;UACE;YACE;UACF;UACA;QACF;MACF;QACE;QACA;MACF;QACE;MACF;QACE;QACA;QACA;UACE;UACA;UACA;QACF;QACA;UACE;cACI;cACA;cACA;QACN;QACA;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;;EAEA;kBACgB;;EAEhB;IACE;MACE;MACA;MACA;IACF;MACE;IACF;EACF;;EAEA;AACF;;;;AAIA;EACE;AACF;;AAEA;EACE;AACF;;;AAGA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;EACA;IACE;MACE;UACI;YACE;YACA;QACJ;MACF;UACI;YACE;YACA;QACJ;EACN;IACE;IACA;EACF;AACF;;;AAGA;EACE;;EAEA;IACE;EACF;IACE;EACF;IACE;EACF;IACE;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;AACN;;;AAGA;CACC;CACA;AACD;EACE;EACA;IACE;IACA;IACA;EACF;EACA;EACA;EACA;EACA;IACE;QACI;UACE;UACA;EACR;IACE;EACF;;AAEF;;;AAGA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;AACD;EACE;EACA;IACE;MACE;MACA;MACA;QACE;QACA;UACE;QACF;UACE;QACF;UACE;QACF;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;QACE;mBACW;MACb;IACF;IACA;eACW;IACX;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;aACW;aACA;aACA;AACb;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;aACW;aACA;aACA;aACA;aACA;aACA;AACb;;AAEA;;AAEA;EACE;EACA;EACA;IACE;IACA;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;GACA;KACE;GACF;GACA;GACA;GACA;KACE;KACA;GACF;GACA;CACF;CACA;CACA;CACA;CACA;GACE;GACA;OACI;WACI;;WAEA;cACG;cACA;WACH;OACJ;;OAEA;WACI;WACA;;WAEA;cACG;cACA;WACH;OACJ;;OAEA;WACI;;WAEA;cACG;cACA;cACA;WACH;OACJ;GACJ;GACA;GACA;GACA;KACE;KACA;KACA;OACE;OACA;KACF;KACA;KACA;KACA;OACE;OACA;KACF;KACA;KACA;OACE;KACF;KACA;GACF;GACA;GACA;OACI;OACA;OACA;OACA;OACA;GACJ;GACA;OACI;OACA;OACA;GACJ;GACA;OACI;OACA;OACA;OACA;GACJ;GACA;CACF;CACA;AACD;EACE;MACI;MACA;;EAEJ;EACA;IACE;;IAEA;MACE;MACA;IACF;EACF;EACA;IACE;IACA;;IAEA;MACE;MACA;IACF;EACF;EACA;IACE;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;IACE;EACF;EACA;EACA;IACE;;IAEA;MACE;MACA;MACA;UACI;UACA;UACA;IACN;;IAEA;IACA;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;IACA;IACA;OACG;QACC;UACE;UACA;QACF;MACF;IACF;IACA;EACF;;EAEA;EACA;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;EACA;IACE;MACE;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;AACA;EACE;EACA;IACE;EACF;AACF;;AAEA;AACA;AACA;EACE;;EAEA;IACE;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;UACE;UACA;YACE;UACF;QACF;MACF;QACE;MACF;MACA;IACF;EACF;IACE;EACF;;EAEA;;EAEA;EACA;AACF;;AAEA;CACC;CACA;AACD;EACE;IACE;EACF;EACA;AACF;;AAEA;EACE;MACI;EACJ;;EAEA;MACI;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;MACE;IACF;EACF;EACA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;IACA;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;EACA;;EAEA;IACE;EACF;;EAEA;;EAEA;EACA;;EAEA;IACE;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;QACF;MACF;;MAEA;MACA;QACE;MACF;MACA;QACE;UACE;aACG;aACA;QACL;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;;QAEA;QACA;UACE;UACA;UACA;UACA;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;;UAGA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;UACE;UACA;YACE;YACA;UACF;QACF;MACF;IACF;EACF;;AAEF;;AAEA;EACE;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;AACF;;;AAGA;EACE;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;EACF;IACE;EACF;;EAEA;IACE;MACE;MACA;QACE;MACF;MACA;QACE;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;QACA;UACE;QACF;QACA;QACA;MACF;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;IACI;IACA;MACE;IACF;IACA;MACE;IACF;;AAEJ;CACC;CACA;AACD;EACE;EACA;AACF;;AAEA;;;AAGA;AACA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;MACE;IACF;IACA;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;EACE;;EAEA;EACA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;EACA;EACA;AACF;;AAEA;EACE;MACI;MACA;;EAEJ;IACE;IACA;EACF;IACE;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;IACF;;IAEA;;IAEA;IACA;EACF;;EAEA;EACA;EACA;EACA;IACE;EACF;;EAEA;AACF;;AAEA;EACE;EACA;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;AACF;;AAEA;AACA;EACE;IACE;EACF;;EAEA;;EAEA;IACE;IACA;EACF;EACA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;EACF;IACE;EACF;AACF;;AAEA;EACE;AACF;;AAEA;EACE;;EAEA;IACE;IACA;MACE;IACF;EACF;AACF;;AAEA;EACE;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;MACE;QACE;MACF;MACA;IACF;EACF;IACE;MACE;QACE;QACA;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;;EAEA;IACE;MACE;MACA;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;IACA;IACA;EACF;AACF;;;AAGA;EACE;MACI;;EAEJ;IACE;IACA;EACF;;EAEA;AACF;;;AAGA;EACE;;IAEE;IACA;IACA;IACA;IACA;;IAEA;MACE;IACF;MACE;QACE;MACF;QACE;UACE;UACA;QACF;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;MACI;AACN;;AAEA;EACE;IACE;MACE;UACI;UACA;UACA;MACJ;IACF;EACF;AACF;;AAEA;EACE;IACE;4BACwB;;IAExB;MACE;MACA;QACE;MACF;IACF;;IAEA;EACF;AACF;;;AAGA;EACE;;EAEA;;IAEE;IACA;MACE;IACF;MACE;;MAEA;MACA;QACE;UACE;YACE;UACF;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;EACA;IACE;EACF;EACA;;EAEA;IACE;MACE;IACF;;IAEA;IACA;IACA;IACA;EACF;AACF;;AAEA;EACE;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;EACE;IACE;;IAEA;MACE;MACA;MACA;IACF;;IAEA;IACA;MACE;IACF;MACE;MACA;MACA;MACA;MACA;MACA;IACF;EACF;EACA;IACE;IACA;IACA;EACF;;EAEA;MACI;EACJ;;EAEA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;EACE;AACF;AACA;AACA;EACE;AACF;AACA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;;EAEA;EACA;AACF;;AAEA;EACE;EACA;AACF;;AAEA;EACE;EACA;AACF;EACE;AACF;;AAEA;EACE;EACA;;EAEA;IACE;IACA;EACF;;EAEA;IACE;IACA;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;;EAEA;IACE;;IAEA;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;UACE;UACA;QACF;MACF;QACE;iBACS;eACF;eACA;MACT;IACF;MACE;IACF;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;EACF;;EAEA;IACE;MACE;QACE;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;IACA;EACF;;EAEA;AACF;EACE;GACC;GACA;EACD;IACE;IACA;;IAEA;IACA;IACA;IACA;QACI;MACF;;QAEE;QACA;UACE;YACE;YACA;UACF;YACE;cACE;YACF;UACF;QACF;QACA;QACA;MACF;QACE;QACA;QACA;QACA;QACA;QACA;UACE;UACA;QACF;QACA;MACF;IACF;MACE;MACA;QACE;MACF;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;MACE;IACF;;IAEA;IACA;;IAEA;;IAEA;MACE;MACA;QACE;;QAEA;UACE;QACF;;QAEA;UACE;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;EACE;;EAEA;IACE;;IAEA;IACA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;MACE;MACA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;;UAEA;YACE;YACA;YACA;YACA;cACE;YACF;UACF;;QAEF;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;EACF;;EAEA;;EAEA;IACE;;IAEA;IACA;IACA;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;QACE;MACF;QACE;MACF;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;IACJ;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;;IAEA;;IAEA;MACE;MACA;IACF;EACF;;EAEA;IACE;MACE;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;IACE;IACA;;IAEA;MACE;MACA;MACA;IACF;EACF;;EAEA;EACA;;EAEA;IACE;MACE;QACE;QACA;UACE;QACF;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;MACE;IACF;MACE;IACF;EACF;;EAEA;;EAEA;;IAEE;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;QACE;UACE;QACF;MACF;IACF;EACF;AACF;EACE;GACC;GACA;EACD;IACE;;IAEA;MACE;QACE;QACA;UACE;UACA;QACF;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;EACA;IACE;EACF;IACE;EACF;;EAEA;AACF;;AAEA;CACC;CACA;AACD;EACE;IACE;IACA;MACE;IACF;EACF;EACA;AACF;AACA;EACE;GACC;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;;AAED;AACA;AACA;AACA;AACA;;AAEA;EACE;EACA;EACA;MACI;EACJ;IACE;EACF;EACA;AACF;;AAEA;EACE;MACI;MACA;MACA;;EAEJ;IACE;MACE;MACA;QACE;UACE;YACE;UACF;UACA;YACE;QACJ;QACA;QACA;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;EACF;IACE;IACA;IACA;EACF;IACE;EACF;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;;AAKD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;wBACuB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;EACE;EACA;MACI;MACA;MACA;MACA;QACE;YACI;YACA;YACA;YACA;YACA;YACA;UACF;MACJ;MACA;UACI;YACE;UACF;MACJ;MACA;UACI;YACE;YACA;UACF;;;EAGR;;EAEA;;EAEA;EACA;EACA;;EAEA;IACE;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;IACF;IACA;MACE;IACF;IACA;EACF;;EAEA;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;IACA;EACF;;EAEA;IACE;QACI;;IAEJ;MACE;MACA;IACF;EACF;;EAEA;EACA;EACA;EACA;IACE;IACA;MACE;MACA;;MAEA;QACE;QACA;UACE;cACI;;UAEJ;QACF;MACF;;MAEA;QACE;UACE;UACA;UACA;UACA;QACF;YACI;QACJ;YACI;QACJ;UACE;QACF;MACF;QACE;UACE;QACF;QACA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;QACA;kBACU;MACZ;IACF;IACA;EACF;;EAEA;EACA;EACA;;EAEA;;IAEE;MACE;QACE;UACE;oBACU;QACZ;QACA;MACF;QACE;UACE;UACA;UACA;QACF;UACE;YACE;UACF;UACA;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;QACA;MACF;;MAEA;UACI;UACA;UACA;;MAEJ;QACE;QACA;UACE;kBACQ;QACV;QACA;UACE;UACA;UACA;QACF;MACF;MACA;QACE;MACF;;MAEA;MACA;MACA;IACF;;IAEA;MACE;UACI;;MAEJ;MACA;MACA;MACA;MACA;;MAEA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;aACE;eACE;eACA;eACA;;eAEA;eACA;aACF;WACF;KACN;KACA;OACE;SACE;SACA;OACF;;OAEA;SACE;SACA;OACF;KACF;GACF;CACF;AACD;;EAEE;;EAEA;IACE;EACF;;EAEA;IACE;;IAEA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;IACF;;IAEA;IACA;IACA;MACE;QACE;UACE;QACF;IACJ;;IAEA;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;EAGE;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;KACA;KACA;KACA;KACA;KACA;KACA;KACA;GACF;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;QACI;IACJ;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;EAEA;;IAEE;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;cACM;QACN;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;wBACgB;wBACA;QAChB;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;wBACgB;wBACA;QAChB;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;MACF;;MAEA;MACA;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;MACA;QACE;MACF;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;MACA;MACA;MACA;MACA;;EAEJ;;EAEA;EACA;;EAEA;EACA;EACA;;EAEA;GACC;GACA;GACA;EACD;IACE;MACE;IACF;MACE;MACA;QACE;UACE;YACE;UACF;YACE;UACF;QACF;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;;IAEA;MACE;IACF;MACE;IACF;EACF;;EAEA;EACA;EACA;EACA;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;EACF;;EAEA;EACA;EACA;;EAEA;MACI;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;;IAEA;IACA;MACE;MACA;MACA;QACE;QACA;UACE;UACA;UACA;QACF;MACF;QACE;QACA;UACE;QACF;UACE;QACF;MACF;MACA;IACF;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;MACI;;EAEJ;IACE;IACA;;IAEA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;;MAEA;IACF;;IAEA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;EACD;;EAEA;EACA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;MACE;QACE;gCACwB;MAC1B;QACE;UACE;gCACsB;;UAEtB;UACA;UACA;UACA;UACA;YACE;cACE;cACA;UACJ;QACF;MACF;IACF;MACE;QACE;QACA;QACA;;QAEA;UACE;UACA;UACA;YACE;YACA;YACA;YACA;YACA;cACE;YACF;UACF;QACF;MACF;MACA;IACF;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;MACA;IACF;IACA;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;IACF;IACA;EACF;;AAEF;;AAEA;EACE;MACI;QACE;MACF;AACN;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;SACA;;SAEA;SACA;WACE;WACA;WACA;SACF;;SAEA;SACA;WACE;WACA;WACA;SACF;OACF;KACF;KACA;OACE;SACE;WACE;WACA;WACA;aACE;eACE;aACF;aACA;WACF;SACF;KACJ;KACA;OACE;SACE;OACF;KACF;GACF;CACF;AACD;;EAEE;IACE;;IAEA;MACE;QACE;MACF;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;;MAEJ;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;UACF;;UAEA;UACA;UACA;;UAEA;YACE;UACF;;UAEA;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;;YAEA;UACF;;UAEA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;;YAEA;YACA;YACA;;YAEA;UACF;;UAEA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;UACE;YACE;UACF;YACE;UACF;;UAEA;UACA;UACA;UACA;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;UACE;UACA;QACF;MACF;IACF;;;EAGF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;MACE;MACA;QACE;MACF;MACA;IACF;;;EAGF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;MACE;IACF;;;IAGA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;IACC;MACE;QACE;QACA;QACA;UACE;UACA;YACE;cACE;iBACG;gBACD;cACF;cACA;gBACE;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;gBACA;cACF;YACF;UACF;QACF;MACF;MACA;QACE;QACA;MACF;IACF;IACA;MACE;MACA;MACA;IACF;GACD;GACA;KACE;OACE;OACA;OACA;OACA;OACA;OACA;OACA;KACF;GACF;CACF;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;AACA;EACE;MACI;MACA;MACA;MACA;;EAEJ;EACA;EACA;EACA;;EAEA;IACE;;IAEA;;IAEA;MACE;;MAEA;QACE;YACI;YACA;YACA;MACN;;MAEA;QACE;QACA;QACA;MACF;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;IACA;MACE;MACA;QACE;QACA;UACE;YACE;YACA;cACE;gBACE;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;gBACE;cACF;YACF;YACA;UACF;MACJ;MACA;IACF;MACE;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;YACU;YACA;IACR;aACS;;IAET;MACE;QACE;QACA;;QAEA;UACE;UACA;QACF;MACF;QACE;MACF;;MAEA;IACF;;IAEA;MACE;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;QACF;;QAEA;QACA;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;YACI;YACA;YACA;YACA;YACA;;QAEJ;UACE;UACA;QACF;UACE;UACA;QACF;;QAEA;;QAEA;QACA;UACE;QACF;UACE;UACA;YACE;UACF;QACF;;QAEA;;QAEA;QACA;YACI;UACF;QACF;;QAEA;UACE;YACE;UACF;YACE;UACF;QACF;;QAEA;QACA;QACA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;gBACS;OACT;OACA;OACA;MACD;QACE;YACI;YACA;;QAEJ;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;MACF;IACF;;;IAGA;MACE;QACE;MACF;QACE;QACA;MACF;IACF;;;IAGA;QACI;QACA;YACI;YACA;cACE;QACN;QACA;;IAEJ;MACE;;MAEA;QACE;MACF;QACE;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;;IAEA;wBACoB;MAClB;QACE;QACA;QACA;MACF;MACA;MACA;MACA;QACE;UACE;QACF;MACF;MACA;cACQ;2BACa;MACrB;MACA;MACA;MACA;MACA;QACE;QACA;UACE;QACF;QACA;UACE;YACE;UACF;QACF;QACA;QACA;QACA;;QAEA;QACA;QACA;UACE;UACA;;QAEF;UACE;YACE;UACF;QACF;;QAEA;;QAEA;QACA;QACA;MACF;IACF;;IAEA;MACE;MACA;MACA;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;4BACwB;MACtB;UACI;;MAEJ;QACE;;QAEA;QACA;wCACgC;;QAEhC;YACI;sCAC0B;YAC1B;;QAEJ;UACE;QACF;;QAEA;sBACc;sBACA;YACV;YACA;iBACK;kBACC;qBACG;;QAEb;UACE;UACA;UACA;QACF;;QAEA;QACA;MACF;;MAEA;MACA;;MAEA;QACE;QACA;;;QAGA;UACE;UACA;UACA;UACA;;UAEA;UACA;YACE;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;UACA;UACA;;UAEA;YACE;cACE;cACA;YACF;cACE;YACF;;YAEA;cACE;kBACI;kBACA;;YAEN;cACE;;YAEF;cACE;;YAEF;cACE;YACF;;YAEA;;UAEF;YACE;UACF;QACF;MACF;IACF;;IAEA;;MAEE;QACE;;QAEA;UACE;UACA;UACA;QACF;;QAEA;QACA;UACE;QACF;QACA;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;UACA;cACI;;UAEJ;UACA;mBACS;YACP;YACA;;YAEA;YACA;cACE;cACA;;cAEA;cACA;cACA;gBACE;cACF;;cAEA;cACA;gBACE;kBACE;kBACA;kBACA;gBACF;cACF;;cAEA;cACA;cACA;kBACI;kBACA;oBACE;kBACF;cACJ;cACA;cACA;4BACc;YAChB;UACF;;UAEA;UACA;UACA;YACE;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;UACA;QACF;UACE;UACA;QACF;UACE;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;UACF;YACE;YACA;YACA;UACF;UACA;MACJ;;MAEA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;UACE;YACE;sBACU;sBACA;UACZ;UACA;YACE;YACA;UACF;UACA;UACA;QACF;MACF;QACE;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;mCAC+B;mCACA;MAC7B;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;MACA;QACE;QACA;QACA;;QAEA;QACA;UACE;QACF;QACA;;QAEA;UACE;QACF;;QAEA;;UAEE;UACA;UACA;YACE;cACE;cACA;cACA;gCACkB;cAClB;YACF;cACE;cACA;cACA;gCACkB;YACpB;UACF;;UAEA;QACF;;QAEA;;QAEA;UACE;UACA;UACA;cACI;UACJ;QACF;;QAEA;UACE;;UAEA;UACA;UACA;UACA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;gBACI;8CAC8B;YAClC;YACA;;YAEA;wCAC4B;0CACE;0CACA;0CACA;0CACA;0CACA;0CACA;0CACA;0CACA;wCACF;UAC9B;YACE;YACA;YACA;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;cACI;cACA;;UAEJ;;UAEA;YACE;YACA;cACE;YACF;cACE;YACF;YACA;;YAEA;cACE;kBACI;kBACA;YACN;;YAEA;;YAEA;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;;YAEA;cACE;YACF;YACA;YACA;;YAEA;UACF;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;YACE;UACF;;UAEA;cACI;gBACE;gBACA;gBACA;gBACA;cACF;UACJ;QACF;UACE;YACE;YACA;cACE;YACF;cACE;YACF;UACF;YACE;UACF;QACF;;QAEA;UACE;UACA;QACF;;MAEF;;MAEA;MACA;MACA;MACA;MACA;;MAEA;;MAEA;MACA;;MAEA;;MAEA;QACE;UACE;UACA;UACA;UACA;YACE;UACF;UACA;QACF;QACA;UACE;UACA;UACA;UACA;YACE;UACF;UACA;QACF;MACF;;;MAGA;QACE;QACA;UACE;YACE;YACA;cACE;YACF;YACA;UACF;UACA;;UAEA;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;gBACI;gBACA;UACN;UACA;QACF;UACE;UACA;YACE;UACF;QACF;QACA;MACF;;;MAGA;QACE;YACI;;QAEJ;UACE;UACA;QACF;UACE;UACA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;UACE;UACA;UACA;UACA;YACE;cACE;cACA;cACA;cACA;YACF;;YAEA;YACA;cACE;YACF;;YAEA;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;cACE;YACF;;YAEA;UACF;QACF;;QAEA;UACE;;UAEA;cACI;UACJ;;UAEA;UACA;UACA;cACI;YACF;UACF;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;;cAEE;gBACE;kBACE;gBACF;gBACA;gBACA;kBACE;kBACA;kBACA;gBACF;gBACA;;cAEF;gBACE;kBACE;gBACF;gBACA;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;kBACE;kBACA;kBACA;sBACI;sBACA;gBACN;gBACA;gBACA;kBACE;oBACE;oBACA;sBACE;sBACA;oBACF;sBACE;sBACA;oBACF;kBACF;kBACA;gBACF;gBACA;gBACA;gBACA;gBACA;;cAEF;gBACE;gBACA;kBACE;gBACF;gBACA;YACJ;UACF;QACF;QACA;UACE;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;cACI;cACA;cACA;cACA;cACA;UACJ;QACF;;QAEA;QACA;QACA;QACA;QACA;UACE;QACF;QACA;;QAEA;QACA;UACE;UACA;cACI;cACA;cACA;cACA;cACA;UACJ;QACF;;QAEA;QACA;QACA;UACE;;UAEA;UACA;YACE;YACA;YACA;UACF;;UAEA;YACE;UACF;UACA;YACE;UACF;UACA;QACF;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;0BACsB;MACpB;MACA;MACA;QACE;YACI;UACF;YACE;YACA;iBACK;cACH;gBACE;cACF;cACA;cACA;YACF;UACF;QACF;MACF;MACA;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;UACF;UACA;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;UACE;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;QACE;UACE;UACA;QACF;UACE;UACA;UACA;UACA;UACA;QACF;UACE;UACA;QACF;MACF;IACF;;;IAGA;QACI;MACF;UACI;UACA;UACA;UACA;UACA;UACA;YACE;UACF;UACA;cACI;cACA;UACJ;;MAEJ;;MAEA;QACE;UACE;;UAEA;;UAEA;YACE;cACE;YACF;cACE;YACF;YACA;;YAEA;cACE;kBACI;kBACA;YACN;;YAEA;YACA;YACA;;YAEA;cACE;YACF;YACA;YACA;UACF;YACE;YACA;UACF;;UAEA;;UAEA;cACI;cACA;UACJ;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;cACE;;cAEA;kBACI;gBACF;gBACA;cACF;cACA;;cAEA;cACA;YACF;YACA;cACE;YACF;cACE;YACF;YACA;cACE;UACJ;UACA;QACF;;MAEF;QACE;QACA;UACE;UACA;UACA;UACA;QACF;UACE;YACE;UACF;UACA;QACF;MACF;IACF;;;IAGA;KACC;KACA;IACD;MACE;MACA;MACA;MACA;IACF;;;IAGA;MACE;QACE;YACI;MACN;IACF;;;IAGA;MACE;MACA;QACE;UACE;UACA;YACE;gBACI;;YAEJ;YACA;YACA;;YAEA;cACE;cACA;cACA;cACA;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;;;IAGA;MACE;MACA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;MACF;IACF;;;IAGA;MACE;QACE;MACF;MACA;MACA;MACA;UACI;UACA;4BACkB;QACpB;MACF;IACF;;;IAGA;MACE;;MAEA;MACA;;;MAGA;QACE;YACI;YACA;MACN;;MAEA;QACE;QACA;YACI;cACE;gBACE;;gBAEA;kBACE;sBACI;0BACI;gBACV;;gBAEA;gBACA;gBACA;oBACI;;gBAEJ;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;;gBAEA;gBACA;kBACE;oBACE;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;sBACE;oBACF;sBACE;oBACF;kBACF;cACJ;YACF;UACF;MACJ;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;YACE;YACA;qBACS;iBACJ;cACH;gBACE;cACF;gBACE;cACF;YACF;YACA;;YAEA;YACA;YACA;YACA;cACE;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;MACF;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;QACA;MACF;;MAEA;MACA;IACF;;;IAGA;MACE;IACF;;;IAGA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;AAID;CACC;CACA;;AAED;EACE;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;MACI;MACA;;EAEJ;EACA;IACE;IACA;MACE;IACF;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;;;EAGJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;EACF;;;EAGA;;IAEE;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACE;MACF;;MAEA;QACE;QACA;QACA;QACA;YACI;YACA;gBACI;;QAER;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;QACF;UACE;UACA;QACF;MACF;;MAEA;;MAEA;QACE;MACF;;MAEA;IACF;;IAEA;MACE;QACE;UACE;UACA;MACJ;;MAEA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;WACA;SACF;KACJ;GACF;CACF;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;EAEA;IACE;IACA;IACA;;IAEA;MACE;IACF;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;;IAEA;MACE;IACF;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;;EAEF;IACE;EACF;;EAEA;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;QACE;QACA;QACA;UACE;MACJ;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;IACA;EACF;;EAEA;EACA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;EACD;;EAEA;MACI;;IAEF;;IAEA;KACC;KACA;KACA;KACA;IACD;;IAEA;MACE;UACI;IACN;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;AACL;AACA;EACE;IACE;MACE;MACA;IACF;IACA;IACA;IACA;IACA;MACE;oBACc;MACd;IACF;IACA;MACE;QACE;MACF;IACF;IACA;EACF;AACF;AACA;EACE;IACE;MACE;QACE;QACA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;YACA;cACE;cACA;UACJ;QACF;;QAEA;UACE;UACA;QACF;MACF;AACN;AACA;EACE;AACF;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;IACA;IACA;EACF;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;EAEE;MACI;IACF;IACA;IACA;IACA;EACF;AACF;AACA;KACK;IACD;MACE;QACE;QACA;QACA;MACF;MACA;;MAEA;MACA;MACA;;MAEA;QACE;QACA;;QAEA;QACA;UACE;YACE;gBACI;YACJ;UACF;QACF;;QAEA;UACE;QACF;;QAEA;QACA;MACF;;MAEA;MACA;;MAEA;MACA;QACE;UACE;QACF;QACA;UACE;QACF;MACF;;MAEA;QACE;QACA;;QAEA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;;MAEA;;MAEA;QACE;QACA;UACE;QACF;QACA;UACE;UACA;MACJ;;MAEA;QACE;YACI;YACA;;QAEJ;;QAEA;QACA;QACA;UACE;;UAEA;YACE;cACE;YACF;UACF;;UAEA;QACF;;QAEA;QACA;QACA;;QAEA;UACE;;UAEA;YACE;cACE;cACA;gBACE;cACF;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;KAEA;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;;QAEI;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;IACL;;;IAGA;;;IAGA;MACE;QACE;UACE;YACE;YACA;UACF;QACF;MACF;IACF;;;IAGA;MACE;QACE;UACE;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;MACA;;;MAGA;UACI;QACF;cACM;cACA;MACR;;MAEA;QACE;QACA;UACE;YACE;YACA;YACA;UACF;YACE;YACA;cACE;YACF;cACE;YACF;UACF;QACF;UACE;UACA;QACF;MACF;;;MAGA;MACA;MACA;QACE;YACI;YACA;QACJ;UACE;QACF;;QAEA;YACI;MACN;;MAEA;;;MAGA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;UACE;YACE;UACF;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;UACE;UACA;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;MACF;;;MAGA;QACE;QACA;MACF;IACF;;;IAGA;MACE;MACA;MACA;QACE;QACA;;QAEA;UACE;YACE;cACE;YACF;cACE;YACF;UACF;UACA;qBACW;QACb;MACF;MACA;QACE;MACF;MACA;IACF;EACF;AACF;;AAEA;IACI;IACA;IACA;IACA;MACE;MACA;IACF;MACE;IACF;;IAEA;AACJ;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;EACE;;EAEA;EACA;IACE;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;MACF;;MAEA;UACI;QACF;QACA;MACF;IACF;;MAEE;;MAEA;MACA;QACE;YACI;QACJ;MACF;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;cACI;cACA;;UAEJ;YACE;;YAEA;YACA;YACA;UACF;;UAEA;UACA;UACA;YACE;UACF;;UAEA;cACI;cACA;cACA;cACA;QACN;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;QACF;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;UACF;QACF;MACF;;MAEA;IACF;;IAEA;MACE;IACF;MACE;IACF;;;IAGA;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;MACA;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;QACE;UACE;QACF;QACA;QACA;MACF;;MAEA;QACE;MACF;IACF;;IAEA;IACA;IACA;IACA;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;AACA;EACE;;EAEA;IACE;IACA;EACF;;;EAGA;MACI;EACJ;AACF;AACA;IACI;AACJ;AACA;AACA;EACE;IACE;EACF;AACF;AACA;CACC;AACD;EACE;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;;EAGA;IACE;QACI;QACA;QACA;;IAEJ;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;aACK;UACH;YACE;UACF;UACA;UACA;UACA;UACA;UACA;UACA;QACF;UACE;UACA;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;UACI;cACI;cACA;cACA;MACR;;MAEA;QACE;UACE;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;YACE;YACA;QACJ;;QAEA;UACE;YACE;UACF;UACA;YACE;cACE;YACF;YACA;cACE;cACA;YACF;YACA;cACE;YACF;UACF;;UAEA;QACF;;QAEA;YACI;YACA;YACA;;YAEA;cACE;gBACE;cACF;;cAEA;YACF;cACE;kBACI;cACJ;YACF;;UAEF;UACA;UACA;UACA;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;QACF;MACF;;MAEA;QACE;UACE;MACJ;;MAEA;QACE;UACE;QACF;UACE;YACE;UACF;QACF;MACF;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;EACF;AACF;;AAEA;EACE;OACK;IACH;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;;MAEA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;QACF;;QAEA;;MAEF;;MAEA;;MAEA;IACF;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;QACA;MACF;MACA;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;;MAEA;QACE;QACA;QACA;UACE;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;QACF;QACA;MACF;;MAEA;QACE;YACI;YACA;QACJ;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;IACF;EACF;AACF;;AAEA;IACI;AACJ;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;;EAEJ;IACE;EACF;;EAEA;AACF;;AAEA;EACE;;EAEA;EACA;EACA;AACF;;;AAGA;EACE;EACA;IACE;EACF;EACA;EACA;MACI;EACJ;EACA;;EAEA;EACA;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;;AAGA;EACE;EACA;AACF;;;AAGA;EACE;AACF;;AAEA;AACA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;;;EAGA;GACC;GACA;GACA;GACA;EACD;IACE;IACA;MACE;UACI;IACN;;IAEA;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;QACI;;IAEJ;IACA;EACF;;EAEA;IACE;MACE;MACA;MACA;MACA;IACF;IACA;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;IACF;MACE;IACF;MACE;IACF;IACA;MACE;IACF;IACA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;;EAGA;GACC;GACA;GACA;GACA;EACD;IACE;IACA;QACI;QACA;UACE;UACA;;IAEN;MACE;UACI;IACN;IACA;;IAEA;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;;MAEA;;MAEA;MACA;QACE;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;QACI;;IAEJ;IACA;EACF;;EAEA;IACE;MACE;MACA;IACF;IACA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;;EAEA;;EAEA;IACE;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;;IAEA;MACE;IACF;MACE;IACF;MACE;IACF;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;QACI;;IAEJ;IACA;IACA;EACF;;AAEF;;;AAGA;EACE;EACA;;EAEA;GACC;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;;IAEF;IACA;IACA;IACA;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;QACE;MACF;QACE;UACE;UACA;QACF;UACE;UACA;YACE;UACF;;UAEA;QACF;UACE;cACI;QACN;QACA;MACF;QACE;UACE;QACF;UACE;QACF;IACJ;;IAEA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;AACF;;AAEA;EACE;IACE;EACF;AACF;;;AAGA;EACE;IACE;MACE;;IAEF;IACA;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;QACE;QACA;MACF;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;UACI;UACA;MACJ;UACI;UACA;MACJ;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;MACI;IACF;QACI;QACA;QACA;QACA;;IAEJ;MACE;QACE;UACE;MACJ;MACA;MACA;IACF;MACE;MACA;IACF;IACA;IACA;;IAEA;;IAEA;MACE;MACA;;MAEA;;MAEA;;MAEA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;;MAEA;QACE;QACA;QACA;MACF;;MAEA;MACA;;MAEA;QACE;UACE;UACA;UACA;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;;IAGA;IACA;MACE;IACF;;IAEA;IACA;MACE;QACE;UACE;;UAEA;UACA;oCAC0B;YACxB;YACA;UACF;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;IACA;IACA;MACE;MACA;;MAEA;QACE;QACA;UACE;cACI;YACF;UACF;YACE;YACA;UACF;QACF;MACF;MACA;;MAEA;IACF;;IAEA;;IAEA;MACE;IACF;AACJ;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;WACA;SACF;KACJ;KACA;OACE;SACE;SACA;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;MACE;IACF;EACF;;EAEA;IACE;MACE;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;YACE;UACF;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;cACI;cACA;QACN;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;QACE;MACF;;MAEA;QACE;UACE;UACA;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;EACE;MACI;MACA;IACF;QACI;QACA;EACN;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;EACF;EACA;AACF;;AAEA;AACA;AACA;;AAEA;EACE;IACE;MACE;QACE;QACA;IACJ;MACE;QACE;QACA;IACJ;EACF;AACF;;AAEA;AACA;AACA;EACE;EACA;EACA;EACA;AACF;EACE;EACA;AACF;;AAEA;AACA;IACI;IACA;MACE;MACA;QACE;UACE;QACF;QACA;MACF;MACA;IACF;UACM;UACA;QACF;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;AACJ;AACA;AACA;;;AAGA;;;AAGA;CACC;CACA;AACD;EACE;AACF;;AAEA;EACE;;EAEA;IACE;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;QACE;MACF;QACE;UACE;UACA;QACF;QACA;MACF;QACE;MACF;QACE;QACA;QACA;QACA;QACA;QACA;UACE;UACA;QACF;UACE;UACA;QACF;UACE;YACE;YACA;YACA;UACF;UACA;QACF;UACE;QACF;MACF;IACF;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;YACQ;EACV;;EAEA;IACE;YACQ;YACA;EACV;;EAEA;IACE;EACF;;EAEA;IACE;IACA;YACQ;YACA;IACR;QACI;EACN;;EAEA;IACE;IACA;IACA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;YACI;YACA;UACF;QACF;YACI;YACA;UACF;QACF;UACE;QACF;MACF;MACA;IACF;IACA;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;;IAEA;;IAEA;MACE;MACA;QACE;QACA;MACF;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;MACA;QACE;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;UACA;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;QACE;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;MACE;MACA;MACA;QACE;UACE;UACA;YACE;UACF;UACA;QACF;UACE;UACA;QACF;QACA;MACF;QACE;MACF;QACE;QACA;UACE;UACA;UACA;UACA;UACA;QACF;QACA;MACF;QACE;MACF;MACA;IACF;IACA;EACF;AACF;;;AAGA;EACE;AACF;;AAEA;CACC;CACA;AACD;EACE;EACA;EACA;AACF;;AAEA;EACE;AACF;EACE;EACA;AACF;;AAEA;EACE;;EAEA;IACE;IACA;;IAEA;;IAEA;MACE;IACF;;IAEA;IACA;;IAEA;EACF;;EAEA;IACE;IACA;MACE;MACA;IACF;MACE;IACF;MACE;IACF;MACE;MACA;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;IACA;MACE;QACE;QACA;MACF;QACE;QACA;MACF;QACE;QACA;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;IACE;QACI;UACE;EACR;;EAEA;IACE;MACE;IACF;EACF;;EAEA;IACE;MACE;MACA;MACA;UACI;QACF;MACF;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;QACA;QACA;YACI;YACA;gBACI;gBACA;kBACE;gBACF;gBACA;cACF;MACR;IACF;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;;IAEA;MACE;MACA;MACA;QACE;MACF;IACF;;IAEA;;IAEA;MACE;MACA;QACE;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;MAEA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;IACA;IACA;MACE;QACE;YACI;MACN;MACA;MACA;QACE;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;MACE;MACA;QACE;;QAEA;UACE;QACF;UACE;QACF;;MAEF;QACE;MACF;IACF;;IAEA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;IACA;;IAEA;MACE;IACF;MACE;QACE;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;;IAEA;IACA;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;IACF;IACA;;IAEA;IACA;IACA;;IAEA;MACE;MACA;;MAEA;QACE;QACA;UACE;QACF;MACF;;MAEA;MACA;;MAEA;MACA;YACM;YACA;;MAEN;IACF;EACF;;EAEA;EACA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;QACA;QACA;MACF;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;MACA;IACF;MACE;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;QACA;QACA;QACA;QACA;QACA;MACF;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;MACA;IACF;MACE;MACA;MACA;IACF;EACF;AACF;;;AAGA;AACA;AACA;;AAEA;EACE;;EAEA;EACA;IACE;IACA;IACA;MACE;MACA;IACF;IACA;EACF;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;;IAEA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;EACF;AACF;;AAEA;EACE;;EAEA;;EAEA;MACI;;EAEJ;EACA;IACE;MACE;IACF;MACE;QACE;QACA;UACE;gCACsB;;UAEtB;UACA;QACF;QACA;MACF;IACF;EACF;IACE;IACA;MACE;MACA;cACQ;sBACQ;sBACA;sBACA;sBACA;IAClB;IACA;;IAEA;IACA;IACA;IACA;;IAEA;EACF;;EAEA;EACA;IACE;EACF;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;;;EAGA;IACE;;IAEA;MACE;;MAEA;QACE;UACE;QACF;QACA;QACA;QACA;MACF;;MAEA;IACF;;IAEA;MACE;;MAEA;QACE;UACE;;UAEA;;UAEA;YACE;cACE;cACA;YACF;;YAEA;YACA;YACA;;YAEA;cACE;YACF;cACE;cACA;cACA;cACA;gBACE;YACJ;cACE;YACF;;YAEA;UACF;UACA;;QAEF;UACE;;QAEF;UACE;MACJ;IACF;;IAEA;MACE;QACE;QACA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;MAEA;IACF;;IAEA;;MAEE;QACE;MACF;;MAEA;;QAEE;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;MACF;;MAEA;MACA;IACF;;IAEA;MACE;oBACc;;MAEd;;MAEA;QACE;QACA;QACA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;;MAEA;MACA;QACE;MACF;;MAEA;QACE;;QAEA;UACE;UACA;YACE;UACF;QACF;;QAEA;UACE;QACF;;QAEA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;QACA;UACE;YACE;cACE;YACF;UACF;QACF;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;QACA;UACE;YACE;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;UACI;QACF;MACF;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;IACE;MACE;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;IACE;IACA;MACE;QACE;QACA;QACA;MACF;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;IACE;EACF;;EAEA;IACE;MACE;;MAEA;MACA;MACA;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;EACA;IACE;MACE;IACF;EACF;;EAEA;IACE;;IAEA;IACA;IACA;IACA;MACE;MACA;MACA;QACE;UACE;QACF;UACE;QACF;UACE;QACF;MACF;QACE;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;IACE;MACE;MACA;QACE;UACE;UACA;UACA;MACJ;MACA;QACE;MACF;;IAEF;;IAEA;MACE;;MAEA;MACA;QACE;QACA;UACE;UACA;QACF;UACE;UACA;UACA;QACF;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;;MAEA;QACE;UACE;UACA;YACE;YACA;YACA;cACE;YACF;cACE;YACF;UACF;QACF;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;IACA;MACE;QACE;MACF;QACE;MACF;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;;EAGD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;QACI;QACA;;IAEJ;MACE;MACA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;IACE;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;EACF;;EAEA;EACA;EACA;EACA;;EAEA;AACF;;AAEA;EACE;IACE;gCAC4B;gCACA;;IAE5B;+BAC2B;+BACA;+BACA;;IAE3B;IACA;MACE;UACI;UACA;YACE;UACF;QACF;MACF;UACI;UACA;YACE;UACF;QACF;;IAEJ;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;MACI;;IAEF;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;SACI;SACA;;SAEA;SACA;SACA;;SAEA;SACA;SACA;KACJ;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;qBACe;qBACA;MACf;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;;KAEA;MACC;MACA;MACA;MACA;MACA;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;;IAEH;MACE;MACA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;UACE;UACA;UACA;YACE;cACE;kBACI;cACJ;cACA;cACA;cACA;YACF;YACA;UACF;UACA;QACF;QACA;QACA;QACA;QACA;UACE;UACA;QACF;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;WACA;;WAEA;WACA;aACE;WACF;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;;;WAIA;WACA;WACA;WACA;WACA;aACE;aACA;aACA;aACA;eACE;iBACE;iBACA;eACF;aACF;WACF;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;WACA;;OAEJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;QACF;QACA;YACI;YACA;cACE;cACA;cACA;cACA;cACA;YACF;;QAEJ;;QAEA;UACE;QACF;;QAEA;UACE;QACF;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;YACE;UACF;QACF;;QAEA;UACE;UACA;YACE;YACA;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;YACA;cACE;cACA;YACF;UACF;UACA;QACF;;QAEA;UACE;;UAEA;YACE;YACA;UACF;YACE;UACF;QACF;;QAEA;UACE;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;UACG;UACA;;UAEA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;OACH;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;UACF;YACE;cACE;cACA;cACA;cACA;YACF;;YAEA;;YAEA;cACE;cACA;cACA;YACF;YACA;YACA;cACE;cACA;;cAEA;cACA;gBACE;gBACA;cACF;YACF;UACF;YACE;cACE;cACA;cACA;cACA;YACF;YACA;YACA;YACA;cACE;gBACE;gBACA;gBACA;;gBAEA;kBACE;kBACA;oBACE;oBACA;kBACF;gBACF;kBACE;kBACA;kBACA;gBACF;cACF;YACF;YACA;cACE;cACA;cACA;gBACE;kBACE;kBACA;gBACF;cACF;YACF;UACF;UACA;QACF;;QAEA;UACE;YACE;YACA;UACF;YACE;UACF;;UAEA;UACA;YACE;cACE;cACA;YACF;cACE;cACA;gBACE;cACF;YACF;cACE;cACA;gBACE;kBACE;gBACF;cACF;YACF;UACF;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;;WAEA;WACA;aACE;WACF;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;OACJ;OACA;OACA;MACD;QACE;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;QAEJ;QACA;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;cACE;YACF;YACA;UACF;;UAEA;UACA;YACE;cACE;cACA;cACA;gBACE;kBACE;kBACA;kBACA;kBACA;oBACE;wBACI;4BACI;4BACA;+BACG;sBACT;sBACA;sBACA;sBACA;sBACA;wBACE;wBACA;wBACA;4BACI;4BACA;wBACJ;wBACA;sBACF;oBACF;sBACE;sBACA;sBACA;sBACA;oBACF;kBACF;gBACF;kBACE;gBACF;cACF;YACF;;YAEA;YACA;YACA;YACA;gBACI;cACF;gBACE;cACF;YACF;UACF;;UAEA;;UAEA;YACE;YACA;gBACI;gBACA;gBACA;UACN;;QAEF;;QAEA;;QAEA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;MAED;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;QACA;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;;;QAGA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;YACI;;QAEJ;QACA;QACA;;QAEA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;;WAEA;WACA;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;UACE;YACE;cACE;YACF;UACF;QACF;;QAEA;MACF;;MAEA;QACE;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;aACE;eACE;aACF;eACE;aACF;eACE;aACF;WACF;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;QACF;UACE;QACF;UACE;UACA;YACE;UACF;YACE;YACA;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;QACF;QACA;;QAEA;QACA;UACE;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;YACI;YACA;YACA;YACA;cACE;cACA;cACA;cACA;gBACE;cACF;cACA;YACF;YACA;YACA;;QAEJ;UACE;UACA;UACA;;YAEE;YACA;cACE;cACA;cACA;cACA;YACF;YACA;cACE;cACA;YACF;cACE;YACF;UACF;UACA;UACA;YACE;YACA;UACF;UACA;UACA;QACF;;QAEA;;QAEA;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;YACI;YACA;YACA;cACE;cACA;cACA;gBACE;cACF;cACA;YACF;;QAEJ;;QAEA;YACI;;QAEJ;QACA;UACE;UACA;UACA;YACE;YACA;cACE;cACA;cACA;cACA;YACF;;YAEA;cACE;YACF;cACE;YACF;UACF;;UAEA;UACA;UACA;UACA;UACA;cACI;YACF;cACE;YACF;UACF;QACF;;QAEA;QACA;MACF;IACF;;IAEA;;IAEA;;;IAGA;MACE;QACE;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;;IAGA;MACE;QACE;;QAEA;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;IACD;;IAEA;MACE;MACA;QACE;UACE;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;AACD;EACE;IACE;;EAEF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;MACA;MACA;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;EACF;AACF;;AAEA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;AACA;AACA;AACA;EACE;WACS;AACX;;;AAGA;EACE;IACE;EACF;IACE;IACA;IACA;IACA;IACA;MACE;UACI;IACN;IACA;kBACc;kBACA;IACd;EACF;IACE;IACA;IACA;IACA;EACF;IACE;QACI;EACN;AACF;;;AAGA;EACE;EACA;IACE;MACE;IACF;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;;EAEA;EACA;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;IACF;IACA;EACF;;EAEA;;IAEE;MACE;IACF;;IAEA;MACE;IACF;;;IAGA;MACE;QACE;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;QACE;QACA;UACE;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;QACI;;IAEJ;IACA;IACA;IACA;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;YACI;YACA;MACN;MACA;QACE;MACF;MACA;MACA;MACA;QACE;YACI;YACA;MACN;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;MACA;MACA;QACE;UACE;QACF;UACE;cACI;cACA;QACN;MACF;QACE;MACF;MACA;IACF;;IAEA;aACS;aACA;EACX;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;gBACc;IACZ;IACA;IACA;MACE;QACE;QACA;QACA;IACJ;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;IACA;;IAEA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;IACA;QACI;QACA;;IAEJ;MACE;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;QACI;UACE;QACF;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;MACE;QACE;UACE;UACA;UACA;QACF;MACF;;MAEA;QACE;MACF;;MAEA;MACA;;MAEA;QACE;QACA;MACF;IACF;;;IAGA;MACE;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;kBACY;kBACA;MACZ;QACE;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;MACF;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;MACA;;MAEA;QACE;UACE;UACA;YACE;UACF;;UAEA;UACA;UACA;QACF;;MAEF;QACE;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;;IAEA;EACF;AACF;;AAEA;EACE;OACK;;IAEH;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;UACE;YACE;cACE;cACA;gBACE;cACF;YACF;cACE;gBACE;cACF;YACF;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;QACA;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;EACF;AACF;;AAEA;EACE;OACK;IACH;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;QACF;UACE;UACA;QACF;QACA;UACE;QACF;;QAEA;MACF;;MAEA;MACA;;MAEA;IACF;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;EACF;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;IACA;IACA;EACF;;EAEA;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;UACQ;AACV;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;eACE;aACF;WACF;OACJ;OACA;SACE;SACA;OACF;KACF;KACA;MACC;OACC;OACA;OACA;MACD;KACD;GACF;CACF;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;QACC;QACA;OACD;KACF;;KAEA;MACC;MACA;QACE;QACA;MACF;KACD;GACF;EACD;AACF;AACA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;MACF;MACA;IACF;MACE;IACF;EACF;EACA;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;gCACyB;gCACA;gCACA;gCACA;gCACA;;OAEzB;OACA;SACE;SACA;WACE;WACA;SACF;OACF;OACA;OACA;OACA;OACA;OACA;OACA;SACE;SACA;WACE;WACA;SACF;OACF;KACF;KACA;OACE;SACE;WACE;aACE;WACF;SACF;OACF;;OAEA;SACE;SACA;SACA;SACA;;SAEA;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;OACF;OACA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;;IAEA;QACI;;IAEJ;MACE;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;QACE;UACE;YACE;cACE;kBACI;gBACF;cACF;YACF;YACA;UACF;UACA;UACA;QACF;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;QACE;QACA;QACA;UACE;QACF;UACE;YACE;cACE;YACF;cACE;gBACE;kBACE;gBACF;cACF;cACA;UACJ;UACA;QACF;UACE;YACE;cACE;YACF;UACF;UACA;QACF;UACE;MACJ;IACF;IACA;MACE;MACA;MACA;QACE;QACA;QACA;MACF;QACE;QACA;UACE;YACE;YACA;cACE;YACF;UACF;QACF;QACA;MACF;QACE;QACA;MACF;QACE;IACJ;IACA;IACA;MACE;MACA;QACE;MACF;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;SACA;OACF;KACF;KACA;OACE;SACE;SACA;OACF;OACA;SACE;WACE;WACA;WACA;SACF;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;AACA;EACE;EACA;IACE;;IAEA;IACA;QACI;QACA;YACI;EACV;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;OACF;KACF;KACA;OACE;SACE;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;SACA;MACH;KACD;GACF;CACF;;;AAGD;AACA;EACE;EACA;;IAEE;IACA;QACI;QACA;uBACe;EACrB;AACF;;AAEA;AACA;EACE;;EAEA;EACA;EACA;MACI;MACA;;EAEJ;EACA;IACE;IACA;MACE;MACA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;MACE;IACF;;IAEA;IACA;IACA;IACA;;IAEA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;QACI;QACA;;IAEJ;MACE;MACA;QACE;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;EACF;;IAEE;MACE;IACF;EACF;;EAEA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;IACE;IACA;EACF;EACA;EACA;EACA;IACE;EACF;AACF;;;AAGA;EACE;EACA;IACE;IACA;MACE;IACF;IACA;EACF;AACF;;AAEA;EACE;IACE;IACA;;IAEA;EACF;AACF;;AAEA;EACE;EACA;;EAEA;gBACc;;EAEd;AACF;;AAEA;IACI;IACA;IACA;IACA;IACA;AACJ;;AAEA;IACI;MACE;MACA;AACN;;AAEA;GACG;MACG;SACG;;MAEH;SACG;;MAEH;GACH;AACH;;AAEA;EACE;AACF;;AAEA;EACE;IACE;KACC;EACH;GACC;IACC;KACC;IACD;KACC;IACD;KACC;IACD;KACC;IACD;KACC;IACD;KACC;KACA;KACA;GACF;EACD;GACC;KACE;KACA;IACD;KACC;AACL;;AAEA;IACI;;AAEJ;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;WACI;OACJ;UACG;OACH;UACG;OACH;UACG;KACL;KACA;OACE;SACE;YACG;SACH;YACG;SACH;YACG;SACH;YACG;OACL;KACF;GACF;CACF;AACD;AACA;;;EAGE;qBACmB;EACnB;IACE;IACA;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;IACA;EACF;;;EAGA;IACE;QACI;QACA;;IAEJ;IACA;IACA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;QACE;QACA;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;IACF;IACA;MACE;MACA;iBACW;IACb;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;KACF;KACA;OACE;SACE;OACF;KACF;GACF;CACF;CACA;AACD;EACE;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;aACA;aACA;aACA;aACA;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;KACF;KACA;OACE;OACA;OACA;OACA;OACA;OACA;;OAEA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;;OAEA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;OAEA;SACE;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;AACH;AACA;EACE;IACE;IACA;;IAEA;MACE;IACF;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;IACF;;IAEA;MACE;;IAEF;IACA;MACE;IACF;MACE;;IAEF;MACE;MACA;IACF;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;iBACI;kBACC;kBACA;kBACA;kBACA;aACL;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;WACE;aACE;iBACI;aACJ;aACA;WACF;WACA;aACE;aACA;aACA;WACF;SACF;OACF;KACF;GACF;CACF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;UACE;YACE;cACE;YACF;YACA;UACF;UACA;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;UACA;YACE;YACA;YACA;YACA;YACA;UACF;UACA;YACE;UACF;UACA;QACF;IACJ;AACJ;CACC;AACD;AACA;EACE;IACE;IACA;IACA;IACA;MACE;MACA;QACE;UACE;UACA;QACF;QACA;QACA;UACE;UACA;YACE;UACF;QACF;MACF;MACA;QACE;MACF;IACF;IACA;IACA;IACA;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;IACA;MACE;UACI;UACA;IACN;IACA;MACE;MACA;MACA;QACE;UACE;UACA;QACF;QACA;WACG;WACA;QACH;QACA;QACA;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;;IAEE;;MAEE;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;MACA;MACA;IACF;;IAEA;MACE;QACE;QACA;mBACW;QACX;UACE;UACA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;;UAEA;;UAEA;UACA;;UAEA;YACE;cACE;YACF;UACF;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;;UAEA;;UAEA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;MACF;IACF;CACH;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;UACE;UACA;QACF;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;SACE;SACA;YACG;SACH;OACF;OACA;SACE;WACE;WACA;WACA;SACF;OACF;KACF;CACJ;CACA;CACA;CACA;CACA;;AAED;;;AAGA;AACA;EACE;EACA;;EAEA;EACA;IACE;MACE;MACA;MACA;QACE;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;IACE;MACE;MACA;QACE;QACA;QACA;UACE;UACA;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;EACA;IACE;MACE;MACA;QACE;YACI;;QAEJ;YACI;UACF;UACA;UACA;QACF;;QAEA;UACE;YACE;cACE;YACF;YACA;UACF;;UAEA;;UAEA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;AACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;AACA;;AAEA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;AACA;EACE;MACI;;EAEJ;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;;IAEA;MACE;IACF;EACF;;EAEA;EACA;IACE;;IAEA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;MACE;IACF;IACA;MACE;IACF;;IAEA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;MACA;QACE;MACF;MACA;MACA;QACE;MACF;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;CACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;SACE;WACE;aACE;WACF;OACJ;OACA;QACC;UACE;UACA;UACA;QACF;QACA;UACE;QACF;OACD;OACA;SACE;SACA;SACA;SACA;SACA;SACA;SACA;QACD;MACF;MACA;QACE;UACE;UACA;;UAEA;UACA;QACF;;QAEA;UACE;UACA;UACA;;UAEA;UACA;;UAEA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;AACD;EACE;IACE;MACE;MACA;MACA;MACA;QACE;UACE;YACE;cACE;cACA;cACA;cACA;cACA;cACA;cACA;gBACE;kBACE;kBACA;gBACF;;gBAEA;kBACE;kBACA;cACJ;;cAEA;;cAEA;cACA;cACA;gBACE;kBACE;gBACF;cACF;YACF;;YAEA;gBACI;;YAEJ;cACE;cACA;gBACE;gBACA;gBACA;gBACA;gBACA;cACF;YACF;YACA;cACE;gBACE;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;QACF;MACF;IACF;;IAEA;EACF;AACF;;AAEA;AACA;;AAEA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;aACF;SACJ;SACA;WACE;+BACoB;WACpB;aACE;WACF;aACE;;WAEF;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;;YAEA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;IAEE;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;OACE;UACG;YACE;cACE;YACF;OACL;OACA;UACG;UACA;cACI;UACJ;cACI;UACJ;cACI;WACH;WACA;WACA;WACA;WACA;OACJ;KACF;KACA;QACG;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;KACH;KACA;KACA;EACH;SACO;SACA;;GAEN;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;QACE;UACE;YACE;UACF;MACJ;MACA;QACE;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;MACF;IACF;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;IACA;EACF;MACI;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;MACC;QACE;UACE;QACF;KACH;KACA;QACG;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;KACH;GACF;GACA;MACG;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;GACH;GACA;GACA;EACD;MACI;KACD;;GAEF;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;UACE;QACF;MACF;MACA;QACE;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;MACF;IACF;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;MACC;QACE;UACE;QACF;KACH;KACA;OACE;OACA;UACG;OACH;UACG;OACH;UACG;OACH;OACA;OACA;OACA;OACA;KACF;GACF;GACA;MACG;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;GACH;GACA;GACA;EACD;KACG;KACA;;EAEH;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;SACA;WACE;0BACe;WACf;aACE;WACF;aACE;WACF;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;SACA;WACE;WACA;aACE;WACF;aACE;WACF;WACA;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;;YAEA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;WACE;aACE;aACA;eACE;aACF;eACE;aACF;aACA;aACA;aACA;aACA;aACA;WACF;SACF;QACD;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;iBACE;iBACA;eACF;aACF;SACJ;SACA;WACE;WACA;WACA;WACA;UACD;UACA;QACF;QACA;UACE;YACE;;YAEA;;YAEA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;aACF;SACJ;SACA;WACE;WACA;0BACe;WACf;WACA;UACD;QACF;QACA;UACE;YACE;YACA;;YAEA;YACA;;YAEA;YACA;;YAEA;YACA;UACF;QACF;MACF;GACH;EACD;;EAEA;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;MACA;QACE;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;IACE;EACF;AACF;;AAEA;EACE;EACA;AACF;;AAEA;EACE;EACA;EACA;;EAEA;EACA;EACA;EACA;IACE;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;EACF;;EAEA;IACE;IACA;QACI;;IAEJ;IACA;IACA;IACA;IACA;MACE;MACA;IACF;;IAEA;IACA;IACA;IACA;MACE;IACF;;IAEA;IACA;IACA;IACA;MACE;IACF;EACF;;EAEA;EACA;EACA;IACE;EACF;IACE;;IAEA;MACE;QACE;UACE;UACA;QACF;MACF;IACF;;IAEA;MACE;;MAEA;MACA;MACA;;MAEA;IACF;;IAEA;IACA;MACE;IACF;EACF;;EAEA;EACA;EACA;;EAEA;IACE;EACF;AACF;;AAEA;EACE;IACE;EACF;;EAEA;IACE;IACA;IACA;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;EACF;;EAEA;AACF;;AAEA;EACE;IACE;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;QACE;MACF;MACA;QACE;MACF;MACA;MACA;;MAEA;QACE;QACA;UACE;YACE;YACA;YACA;YACA;YACA;YACA;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;QACA;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;MACE;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;IACE;MACE;MACA;MACA;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;IACE;MACE;QACE;MACF;MACA;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;;EAEA;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;;EAEA;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;IACE;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;EACF;;EAEA;AACF;;AAEA;EACE;EACA;IACE;IACA;MACE;mCAC6B;IAC/B;IACA;EACF;EACA;AACF;;AAEA;EACE;EACA;;EAEA;IACE;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;EACA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;UACG;YACE;cACE;YACF;OACL;OACA;SACE;WACE;WACA;aACE;WACF;aACE;WACF;aACE;WACF;aACE;SACJ;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;OACF;MACD;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;MACF;IACF;CACH;AACD;IACI;EACF;IACE;IACA;IACA;MACE;QACE;4DACoD;MACtD;IACF;EACF;AACF;;AAEA;IACI;IACA;IACA;IACA;IACA;IACA;;AAEJ;CACC;CACA;CACA;CACA;CACA;CACA;OACM;OACA;OACA;OACA;OACA;OACA;;CAEN;CACA;OACM;OACA;CACN;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;QACA;MACF;;MAEA;QACE;MACF;;IAEF;IACA;MACE;QACE;UACE;YACE;YACA;YACA;cACE;;cAEA;cACA;gBACE;cACF;;cAEA;cACA;gBACE;cACF;cACA;;cAEA;cACA;gBACE;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;QACF;IACJ;IACA;MACE;OACC;YACK;YACA;YACA;QACJ;OACD;OACA;MACD;IACF;IACA;IACA;MACE;QACE;QACA;QACA;MACF;MACA;MACA;;MAEA;;MAEA;MACA;MACA;MACA;IACF;IACA;CACH;CACA;CACA;CACA;AACD;IACI;EACF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;EAGA;MACI;MACA;;EAEJ;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;QACI;;MAEF;IACF;MACE;IACF;EACF;;EAEA;IACE;;IAEA;MACE;UACI;IACN;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;MACI;;EAEJ;EACA;IACE;IACA;;EAEF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;;IAEA;IACA;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;YACE;UACF;UACA;YACE;UACF;UACA;QACF;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;QACE;QACA;UACE;YACE;QACJ;QACA;QACA;UACE;QACF;UACE;UACA;QACF;MACF;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;;QAEE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;;IAEA;IACA;IACA;IACA;MACE;IACF;IACA;;IAEA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;IACA;EACF;;EAEA;IACE;QACI;QACA;IACJ;MACE;MACA;QACE;QACA;MACF;IACF;IACA;MACE;MACA;IACF;IACA;IACA;IACA;MACE;MACA;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;QACA;MACF;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;EACF;;EAEA;IACE;QACI;QACA;;IAEJ;MACE;MACA;QACE;MACF;QACE;MACF;QACE;MACF;IACF;;IAEA;IACA;MACE;QACE;MACF;IACF;MACE;IACF;MACE;QACE;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;;IAEA;IACA;IACA;MACE;;MAEA;UACI;;MAEJ;MACA;QACE;MACF;MACA;QACE;QACA;;QAEA;MACF;IACF;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;QACC;UACE;YACE;UACF;OACH;OACA;SACE;WACE;WACA;WACA;SACF;SACA;WACE;WACA;SACF;OACF;OACA;OACA;OACA;SACE;OACF;KACF;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;SACE;WACE;WACA;kBACO;kBACA;SACT;SACA;OACF;KACF;KACA;OACE;SACE;WACE;WACA;aACE;eACE;iBACE;eACF;eACA;aACF;WACF;SACF;KACJ;CACJ;CACA;AACD;EACE;IACE;IACA;IACA;IACA;MACE;QACE;YACI;;QAEJ;;QAEA;QACA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;YACE;UACF;QACF;;QAEA;UACE;;UAEA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;IACE;MACE;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;MACA;;MAEA;QACE;MACF;;MAEA;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;UACE;QACF;;QAEA;UACE;YACE;YACA;QACJ;;QAEA;QACA;MACF;;MAEA;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;QACE;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;IACA;IACA;MACE;MACA;MACA;MACA;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;MACF;;MAEA;MACA;QACE;UACE;QACF;;QAEA;MACF;;MAEA;MACA;QACE;MACF;IACF;EACF;AACF;;;AAGA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;UACG;YACE;cACE;cACA;YACF;OACL;QACC;UACE;YACE;cACE;cACA;qBACO;qBACA;qBACA;qBACA;YACT;UACF;QACF;MACF;MACA;QACE;;QAEA;UACE;QACF;QACA;UACE;UACA;QACF;MACF;IACF;CACH;AACD;EACE;IACE;IACA;IACA;MACE;QACE;UACE;QACF;MACF;QACE;UACE;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;OACM;CACN;CACA;CACA;CACA;CACA;;EAEC;EACA;EACA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;iBACA;;UAEP;UACA;QACF;QACA;MACF;IACF;IACA;MACE;QACE;UACE;;UAEA;YACE;cACE;YACF;UACF;QACF;IACJ;IACA;MACE;MACA;MACA;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;EACA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;UACP;QACF;QACA;MACF;IACF;IACA;MACE;QACE;UACE;QACF;IACJ;EACF;;EAEA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;QACT;QACA;MACF;IACF;IACA;MACE;QACE;UACE;UACA;YACE;cACE;YACF;UACF;QACF;IACJ;EACF;CACD;AACD;EACE;IACE;IACA;MACE;MACA;MACA;MACA;QACE;QACA;QACA;UACE;UACA;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;MACI;MACA;MACA;MACA;MACA;MACA;;EAEJ;EACA;;EAEA;IACE;MACE;IACF;MACE;IACF;IACA;MACE;MACA;IACF;MACE;QACE;QACA;MACF;QACE;QACA;MACF;IACF;IACA;MACE;MACA;MACA;IACF;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;MACE;IACF;MACE;IACF;MACE;IACF;MACE;IACF;IACA;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;MACE;IACF;EACF;;EAEA;IACE;MACE;MACA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;OACF;KACF;KACA;OACE;SACE;;SAEA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;IACA;MACE;MACA;QACE;QACA;UACE;UACA;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;WACF;OACJ;OACA;QACC;QACA;QACA;OACD;KACF;KACA;OACE;SACE;SACA;SACA;;SAEA;;SAEA;SACA;SACA;SACA;;SAEA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;MACE;MACA;QACE;QACA;QACA;UACE;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;GAEE;KACE;OACE;QACC;OACD;KACF;;KAEA;OACE;SACE;WACE;cACG;cACA;SACL;KACJ;;KAEA;OACE;SACE;aACI;OACN;KACF;GACF;CACF;AACD;EACE;IACE;IACA;MACE;MACA;QACE;MACF;MACA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;IACE;MACE;MACA;QACE;;QAEA;;QAEA;UACE;QACF;;;QAGA;UACE;YACE;YACA;YACA;cACE;cACA;gBACE;gBACA;YACJ;UACF;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;UACA;YACE;cACE;cACA;gBACE;cACF;YACF;UACF;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;YACE;UACF;UACA;YACE;UACF;QACF;;QAEA;UACE;YACE;YACA;cACE;YACF;cACE;cACA;YACF;UACF;UACA;QACF;MACF;IACF;;IAEA;MACE;;MAEA;MACA;QACE;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;MACF;QACE;MACF;QACE;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;KACF;KACA;OACE;SACE;OACF;OACA;WACI;OACJ;OACA;WACI;OACJ;KACF;KACA;OACE;;OAEA;;SAEE;SACA;;SAEA;SACA;;SAEA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;;GAEA;;GAEA;;GAEA;KACE;MACC;MACA;MACA;MACA;KACD;KACA;OACE;SACE;SACA;OACF;;OAEA;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;;SAEF;;SAEA;WACE;;SAEF;;SAEA;WACE;OACJ;KACF;GACF;;;GAGA;GACA;GACA;GACA;GACA;GACA;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;UACE;WACC;aACE;WACF;UACD;QACF;KACH;KACA;OACE;SACE;OACF;OACA;SACE;OACF;KACF;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;UACE;WACC;aACE;WACF;UACD;QACF;KACH;KACA;OACE;SACE;OACF;OACA;SACE;OACF;KACF;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;QACA;KACH;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;CACA;AACD;EACE;IACE;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;AACD;EACE;IACE;IACA;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;KACA;KACA;KACA;KACA;GACF;CACF;;AAED;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;QACE;MACF;KACD;KACA;OACE;SACE;SACA;SACA;OACF;KACF;GACF;CACF;AACD;CACC;CACA;CACA;CACA;CACA;AACD;;AAEA;AACA;AACA;AACA;EACE;EACA;AACF;AACA;EACE;EACA;IACE;IACA;MACE;QACE;QACA;UACE;UACA;YACE;cACE;gBACE;cACF;cACA;gBACE;cACF;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;;OAEA;OACA;OACA;OACA;KACF;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;UACE;YACE;YACA;YACA;cACE;gBACE;gBACA;cACF;YACF;UACF;MACJ;MACA;QACE;QACA;QACA;QACA;MACF;KACD;KACA;OACE;SACE;SACA;SACA;SACA;OACF;OACA;SACE;SACA;SACA;SACA;QACD;KACH;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;MACA;QACE;MACF;IACF;IACA;MACE;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;QACE;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;IACA;IACA;IACA;IACA;QACI;QACA;;UAEE;YACE;cACE;gBACE;gBACA;gBACA;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;YACE;cACE;cACA;YACF;YACA;cACE;cACA;YACF;YACA;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;QACF;IACJ;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;KACC;OACE;QACC;OACD;OACA;OACA;OACA;SACE;OACF;KACF;IACD;IACA;MACE;QACE;UACE;YACE;cACE;UACJ;QACF;KACH;IACD;MACE;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;;MAEA;QACE;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;MACA;QACE;MACF;;MAEA;QACE;MACF;MACA;QACE;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;MACF;;MAEA;QACE;UACE;UACA;UACA;QACF;QACA;QACA;QACA;MACF;;MAEA;QACE;UACE;UACA;QACF;QACA;QACA;QACA;MACF;IACF;EACF;CACD;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;kBACkB;EAChB;IACE;IACA;IACA;IACA;IACA;IACA;MACE;UACI;UACA;;MAEJ;QACE;YACI;YACA;YACA;;QAEJ;UACE;YACE;YACA;UACF;UACA;YACE;YACA;UACF;UACA;YACE;cACE;YACF;YACA;YACA;UACF;QACF;;QAEA;UACE;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;YACA;YACA;cACE;cACA;cACA;;cAEA;cACA;cACA;cACA;cACA;cACA;cACA;gBACE;gBACA;cACF;;cAEA;cACA;;cAEA;cACA;YACF;cACE;gBACE;gBACA;cACF;YACF;YACA;UACF;YACE;YACA;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;EACE;IACE;MACE;MACA;MACA;MACA;QACE;UACE;UACA;UACA;UACA;UACA;cACI;YACF;UACF;UACA;QACF;;QAEA;QACA;MACF;IACF;EACF;;AAEF;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;GACF;KACE;OACE;SACE;OACF;GACJ;GACA;KACE;OACE;UACG;OACH;KACF;GACF;KACE;KACA;OACE;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;EACA;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;OACC;SACE;SACA;OACF;MACD;IACF;CACH;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;iBACgB;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;UACE;YACE;cACE;cACA;cACA;YACF;QACJ;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;wBACc;+BACO;+BACA;UACrB;;UAEA;UACA;UACA;wBACc;+BACO;+BACA;+BACA;+BACA;UACrB;QACF;MACF;MACA;QACE;UACE;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;QACF;QACA;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;CACH;AACD;EACE;EACA;IACE;IACA;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;UACE;YACE;QACJ;MACF;MACA;QACE;UACE;YACE;MACN;;MAEA;QACE;;QAEA;UACE;UACA;UACA;WACC;QACH;UACE;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;QACE;QACA;QACA;UACE;YACE;UACF;UACA;YACE;UACF;QACF;MACF;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;IACF;IACA;MACE;;MAEA;QACE;QACA;QACA;QACA;QACA;YACI;MACN;;OAEC;SACE;;SAEA;;SAEA;SACA;SACA;OACF;MACD;IACF;CACH;AACD;EACE;EACA;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;;EAGA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;;MAEA;;MAEA;QACE;YACI;MACN;;MAEA;MACA;MACA;MACA;;MAEA;;MAEA;QACE;YACI;MACN;MACA;MACA;;MAEA;UACI;QACF;UACE;MACJ;;MAEA;MACA;;MAEA;QACE;MACF;QACE;UACE;QACF;QACA;UACE;QACF;MACF;;MAEA;;QAEE;UACE;YACE;YACA;YACA;YACA;YACA;UACF;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;UACE;cACI;8CACgC;cAChC;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;;UAEJ;YACE;UACF;;UAEA;YACE;YACA;UACF;YACE;YACA;YACA;YACA;cACE;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;;UAEA;UACA;YACE;YACA;YACA;YACA;cACE;cACA;cACA;cACA;cACA;YACF;cACE;cACA;gBACE;cACF;cACA;kBACI;kBACA;YACN;cACE;cACA;cACA;YACF;UACF;;UAEA;UACA;YACE;YACA;YACA;YACA;cACE;cACA;cACA;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;YACE;YACA;YACA;;YAEA;cACE;cACA;;cAEA;;cAEA;cACA;gBACE;cACF;;cAEA;gBACE;gBACA;cACF;cACA;cACA;YACF;cACE;cACA;gBACE;gBACA;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;cACF;YACF;UACF;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;QACA;QACA;QACA;QACA;QACA;KACH;KACA;OACE;SACE;OACF;KACF;KACA;OACE;;OAEA;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;MACE;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;QACA;QACA;QACA;QACA;UACE;YACE;YACA;YACA;QACJ;MACF;IACF;IACA;MACE;QACE;UACE;UACA;QACF;IACJ;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;;MAEA;QACE;QACA;;QAEA;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;MACF;MACA;MACA;QACE;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;MACF;MACA;QACE;QACA;MACF;MACA;QACE;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;;IAEA;IACA;KACC;IACD;IACA;MACE;UACI;UACA;UACA;UACA;;MAEJ;UACI;MACJ;;MAEA;QACE;QACA;UACE;QACF;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;YACE;cACE;cACA;cACA;cACA;;cAEA;cACA;YACF;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;IACE;IACA;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;IACE;IACA;GACD;AACH;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;UACC;aACG;eACE;eACA;eACA;eACA;2BACY;2BACA;yBACF;aACZ;SACJ;SACA;WACE;WACA;SACF;OACF;OACA;SACE;SACA;SACA;OACF;KACF;KACA;QACG;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;KACH;GACF;CACF;CACA;AACD;EACE;EACA;IACE;MACE;OACC;OACA;OACA;OACA;IACH;;IAEA;MACE;MACA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;MACF;;MAEA;MACA;IACF;IACA;MACE;QACE;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;YACI;YACA;;QAEJ;MACF;IACF;EACF;AACF;;AAEA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;UACE;YACE;cACE;cACA;cACA;cACA;cACA;YACF;YACA;UACF;QACF;QACA;UACE;YACE;cACE;cACA;YACF;YACA;cACE;YACF;UACF;UACA;UACA;UACA;;UAEA;UACA;YACE;cACE;YACF;UACF;;UAEA;UACA;UACA;;;UAGA;UACA;UACA;UACA;eACK;UACL;QACF;MACF;MACA;SACG;WACE;WACA;WACA;WACA;WACA;WACA;WACA;SACF;MACH;IACF;CACH;;AAED;EACE;EACA;AACF;;AAEA;AACA;yBACyB;EACvB;MACI;AACN;;EAEE;IACE;IACA;IACA;MACE;UACI;UACA;UACA;UACA;;;MAGJ;;;MAGA;QACE;QACA;QACA;MACF;;;MAGA;QACE;QACA;;QAEA;UACE;UACA;QACF;QACA;QACA;QACA;QACA;UACE;QACF;MACF;;;MAGA;QACE;UACE;UACA;YACE;UACF;QACF;MACF;;;MAGA;QACE;QACA;QACA;QACA;QACA;MACF;;;MAGA;QACE;MACF;;MAEA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;MACA;QACE;UACE;UACA;QACF;MACF;;MAEA;;MAEA;MACA;QACE;UACE;QACF;MACF;;MAEA;MACA;MACA;;;MAGA;;;;MAIA;QACE;UACE;;UAEA;YACE;YACA;YACA;UACF;YACE;cACE;YACF;cACE;YACF;UACF;QACF;;QAEA;UACE;YACE;YACA;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;UACA;YACE;UACF;QACF;;QAEA;QACA;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;cACE;gBACE;cACF;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;;QAEA;UACE;YACE;YACA;YACA;YACA;QACJ;;QAEA;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;QAEJ;UACE;UACA;;UAEA;UACA;UACA;;UAEA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;YACE;gBACI;gBACA;gBACA;;YAEJ;cACE;cACA;mBACK;mBACA;gBACH;gBACA;;gBAEA;kBACE;oBACE;oBACA;oBACA;sBACE;wBACE;wBACA;sBACF;oBACF;sBACE;oBACF;oBACA;kBACF;gBACF;cACF;YACF;cACE;cACA;gBACE;cACF;gBACE;cACF;gBACE;kBACE;oBACE;oBACA;sBACE;sBACA;oBACF;kBACF;gBACF;kBACE;kBACA;kBACA;gBACF;cACF;YACF;YACA;YACA;UACF;QACF;;QAEA;;QAEA;QACA;UACE;cACI;UACJ;YACE;YACA;cACE;cACA;YACF;YACA;UACF;QACF;;QAEA;UACE;QACF;;;QAGA;UACE;UACA;YACE;YACA;cACE;cACA;cACA;gBACE;gBACA;cACF;YACF;cACE;YACF;UACF;UACA;QACF;;;QAGA;UACE;YACE;YACA;UACF;QACF;;;QAGA;UACE;;cAEI;UACJ;cACI;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;;;UAGJ;UACA;;YAEE;YACA;cACE;cACA;cACA;YACF;;YAEA;;YAEA;YACA;cACE;cACA;YACF;YACA;cACE;gBACE;cACF;YACF;cACE;gBACE;gBACA;gBACA;cACF;gBACE;cACF;cACA;YACF;YACA;;YAEA;YACA;YACA;cACE;cACA;cACA;cACA;YACF;UACF;UACA;YACE;cACE;cACA;YACF;cACE;cACA;YACF;UACF;;UAEA;UACA;eACK;eACA;YACH;YACA;;YAEA;YACA;;YAEA;cACE;cACA;gBACE;gBACA;cACF;cACA;cACA;cACA;YACF;cACE;cACA;;cAEA;cACA;gBACE;cACF;YACF;;YAEA;YACA;cACE;cACA;gBACE;gBACA;gBACA;kBACE;gBACF;gBACA;kBACE;gBACF;gBACA;gBACA;kBACE;kBACA;oBACE;oBACA;oBACA;oBACA;kBACF;gBACF;cACF;gBACE;;gBAEA;gBACA;kBACE;kBACA;gBACF;kBACE;kBACA;kBACA;kBACA;sBACI;sBACA;sBACA;sBACA;gBACN;;gBAEA;oBACI;oBACA;oBACA;oBACA;gBACJ;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;cACF;YACF;YACA;YACA;YACA;cACE;YACF;UACF;UACA;UACA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;QACE;QACA;UACE;QACF;MACF;;MAEA;QACE;YACI;YACA;cACE;;QAEN;UACE;UACA;UACA;QACF;UACE;QACF;;QAEA;UACE;YACE;YACA;cACE;YACF;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;AACF;;EAEE;IACE;IACA;IACA;EACF;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;EACF;;AAEF;;AAEA;AC5nwBA;CACC;CACA;CACA;CACA;AACD;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,YAAY,iBAAiB;IAC3B;IACA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;EACA,UAAU,eAAe;IACvB;IACA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;;IAEA;MACE;QACE;QACA;UACE;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA,oBAAoB,QAAQ;QACxB;CACP;;MAEK;;MAEA;MACA;MACA;MACA;MACA;QACE;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;MACF;;MAEA;MACA;MACA;cACQ;cACA;gBACE;cACF;;MAER;QACE;QACA;UACE;UACA;UACA;QACF;QACA;MACF;;MAEA;QACE;QACA;UACE;QACF;QACA;UACE;YACE;UACF;QACF;QACA;MACF;;MAEA;QACE;QACA;;QAEA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;UACF;QACF;;QAEA;QACA;UACE;YACE;UACF;QACF;;QAEA;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;YACA;cACE;YACF;UACF;YACE;YACA;cACE;YACF;UACF;QACF;;QAEA;MACF;;MAEA;QACE;UACE;cACI;cACA;;UAEJ;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;UACF;;UAEA;YACE;gBACI;YACJ;cACE;cACA;YACF;UACF;UACA;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;UACE;QACF;;QAEA;QACA;QACA;UACE;UACA;UACA;YACE;YACA;UACF;YACE;YACA;UACF;YACE;UACF;QACF;;QAEA;QACA;2BACmB;2BACA;;QAEnB;QACA;QACA;UACE;QACF;;QAEA;YACI;YACA;YACA;YACA;YACA;;QAEJ;QACA;UACE;UACA;YACE;YACA;UACF;QACF;;QAEA;UACE;UACA;UACA;YACE;cACE;cACA;cACA;YACF;YACA;cACE;YACF;YACA;cACE;YACF;YACA;UACF;QACF;;QAEA;UACE;UACA;YACE;UACF;;UAEA;UACA;YACE;cACE;cACA;cACA;YACF;YACA;UACF;;UAEA;UACA;UACA;UACA;YACE;cACE;YACF;YACA;cACE;gBACE;gBACA;cACF;gBACE;gBACA;cACF;gBACE;gBACA;cACF;gBACE;gBACA;YACJ;UACF;;UAEA;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;UACA;YACE;YACA;cACE;cACA;YACF;UACF;UACA;YACE;YACA;cACE;cACA;YACF;UACF;UACA;YACE;cACE;gBACE;cACF;cACA;YACF;YACA;cACE;gBACE;cACF;cACA;YACF;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;YACE;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;;UAEA;UACA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;UACA;YACE;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;;UAEA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;YACE;YACA;;YAEA;YACA;UACF;YACE;cACE;cACA;YACF;UACF;;UAEA;YACE;YACA;;YAEA;YACA;YACA;cACE;cACA;kBACI;gBACF;UACN;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;YACE;cACE;gBACE;cACF;gBACE;gBACA;gBACA;cACF;YACF;;YAEA;cACE;YACF;;YAEA;cACE;YACF;UACF;UACA;SACD;MACH;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;MACA;;QAEE;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;YACE;cACE;YACF;cACE;cACA;gBACE;cACF;cACA;cACA;YACF;UACF;YACE;YACA;UACF;UACA;YACE;YACA;cACE;YACF;cACE;cACA;YACF;UACF;;UAEA;YACE;cACE;YACF;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;YACE;YACA;YACA;cACE;cACA;gBACE;gBACA;cACF;YACF;UACF;QACF;;QAEA;QACA;QACA;;QAEA;QACA;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;UACE;UACA;wBACc;wBACA;;UAEd;UACA;YACE;UACF;YACE;YACA;UACF;QACF;;QAEA;;QAEA;UACE;UACA;YACE;cACE;gBACE;gBACA;cACF;YACF;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;QACF;;QAEA;QACA;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;YACA;cACE;iBACG;iBACA;iBACA;cACH;gBACE;cACF;gBACE;kBACE;kBACA;oBACE;kBACF;gBACF;gBACA;cACF;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;YACE;YACA;UACF;YACE;YACA;YACA;cACE;gBACE;cACF;YACF;UACF;QACF;MACF;;MAEA;QACE;UACE;YACE;YACA;UACF;QACF;UACE;;UAEA;UACA;YACE;YACA;UACF;;UAEA;YACE;YACA;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;;QAEA;UACE;QACF;;QAEA;QACA;UACE;UACA;UACA;UACA;;UAEA;UACA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;YACA;cACE;YACF;UACF;;UAEA;mCACyB;mCACA;QAC3B;QACA;;QAEA;MACF;IACF;;IAEA;2BACuB;MACrB;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;QACE;UACE;QACF;QACA;QACA;UACE;YACE;UACF;;UAEA;UACA;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;QACE;QACA;;QAEA;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;QACF;;QAEA;;QAEA;QACA;UACE;UACA;QACF;MACF;;MAEA;QACE;UACE;UACA;YACE;cACE;YACF;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;UACA;UACA;UACA;;UAEA;UACA;YACE;cACE;;cAEA;cACA;;cAEA;cACA;;cAEA;cACA;;cAEA;;cAEA;gBACE;cACF;cACA;YACF;UACF;UACA;YACE;YACA;YACA;YACA;YACA;UACF;UACA;YACE;UACF;QACF;QACA;MACF;;MAEA;QACE;QACA;UACE;UACA;QACF;UACE;QACF;QACA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;QACA;MACF;;MAEA;QACE;;QAEA;QACA;QACA;;QAEA;QACA;UACE;UACA;UACA;;UAEA;;UAEA;;UAEA;QACF;;QAEA;;QAEA;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;QACA;6BACqB;6BACA;;QAErB;QACA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;;QAEA;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;QACA;UACE;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;UACE;UACA;YACE;UACF;;UAEA;UACA;YACE;YACA;UACF;;UAEA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;YACE;UACF;UACA;QACF;;QAEA;QACA;QACA;QACA;;QAEA;QACA;UACE;UACA;YACE;YACA;YACA;YACA;cACE;YACF;UACF;QACF;;QAEA;QACA;UACE;UACA;QACF;;QAEA;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;YACE;UACF;UACA;UACA;UACA;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;WACC;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;UACD;YACE;UACF;QACF;MACF;;MAEA;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;YACE;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;UACE;UACA;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;UACE;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;QACF;MACF;;MAEA;QACE;QACA;QACA;UACE;YACE;UACF;UACA;YACE;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;0BACgB;UAChB;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;MACF;;MAEA;QACE;QACA;QACA;UACE;YACE;UACF;QACF;QACA;MACF;IACF;EACF;;;AAGF;;ACv1DA;CACC;CACA;CACA;CACA;;AAED;;EAEE;IACE;EACF;;EAEA,YAAY,UAAU;IACpB;IACA;MACE;;MAEA;QACE;QACA;QACA;;UAEE;UACA;cACI;;UAEJ;UACA;YACE;UACF;;UAEA;UACA;YACE;YACA;YACA;UACF;;UAEA;UACA;UACA;UACA;;UAEA;cACI;cACA;4BACc;4BACA;4BACA;4BACA;cACd;wCAC0B;cAC1B;cACA;cACA;cACA;0BACY;0BACA;cACZ;4BACc;oCACQ;oCACA;oCACA;4BACR;oCACQ;oCACA;oCACA;0BACV;cACZ;cACA;cACA;cACA;cACA;cACA;cACA;2BACa;2BACA;2BACA;2BACA;2BACA;2BACA;2BACA;2BACA;;UAEjB;UACA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;YACE;UACF;;UAEA;UACA;YACE;UACF;;UAEA;WACC;WACA;;UAED;YACE;YACA;YACA;YACA;cACE;YACF;YACA;UACF;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;cACE;YACF;;YAEA;YACA;cACE;;cAEA;cACA;;cAEA;;cAEA;;cAEA;cACA;gBACE;gBACA;gBACA;cACF;;cAEA;;cAEA;gBACE;gBACA;cACF;gBACE;cACF;cACA;;cAEA;;cAEA;gBACE;gBACA;cACF;;cAEA;cACA;gBACE;cACF;;YAEF;UACF;;UAEA;YACE;YACA;UACF;;UAEA;WACC;WACA;;UAED;UACA;YACE;YACA;UACF;YACE;UACF;;UAEA;;UAEA;YACE;UACF;YACE;UACF;;UAEA;YACE;UACF;;UAEA;;UAEA;WACC;WACA;;UAED;YACE;YACA;UACF;QACF;MACF;IACF;EACF;;ACpNF;CACC;CACA;CACA;CACA;AACD;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;EACE;MACI;AACN;;AAEA;EACE;IACE;EACF;EACA;EACA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;AACD;EACE;;EAEA;IACE;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;OACA;KACF;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;KACA;MACC;OACC;MACD;;KAED;KACA;OACE;OACA;;OAEA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;OAEA;OACA;OACA;KACF;;KAEA;KACA;KACA;KACA;KACA;KACA;KACA;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;GAEE;KACE;KACA;OACE;OACA;KACF;GACF;CACF;CACA;CACA;CACA;CACA;GACE;KACE;KACA;OACE;OACA;SACE;SACA;OACF;KACF;GACF;CACF;CACA;CACA;GACE;KACE;KACA;SACI;WACE;SACF;GACN;;CAEF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;sCACqC;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE,UAAU,SAAS;IACjB;;IAEA;MACE;MACA;;MAEA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;IACF;;IAEA;;MAEE;QACE;QACA;QACA;QACA;;MAEF;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;MACJ;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;UACA;UACA;MACJ;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;UACE;YACE;YACA;YACA;;UAEF;UACA;YACE;cACE;YACF;YACA;cACE;cACA;YACF;UACF;UACA;;UAEA;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;cACE;kBACI;gBACF;kBACE;gBACF;kBACE;gBACF;cACF;YACF;UACF;;UAEA;UACA;YACE;UACF;;UAEA;UACA;UACA;UACA;UACA;;;UAGA;UACA;YACE;cACE;cACA;YACF;UACF;QACF;MACF;;;MAGA;QACE;;QAEA;;QAEA;UACE;UACA;UACA;YACE;YACA;cACE;UACJ;UACA;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;;UAEA;YACE;;YAEA;YACA;cACE;gBACE;gBACA;cACF;cACA;cACA;gBACE;kBACE;oBACE;oBACA;oBACA;kBACF;;kBAEA;kBACA;kBACA;gBACF;kBACE;kBACA;kBACA;kBACA;gBACF;cACF;gBACE;gBACA;gBACA;gBACA;cACF;cACA;gBACE;kBACE;kBACA;YACN;YACA;;YAEA;YACA;YACA;YACA;cACE;YACF;cACE;;YAEF;cACE;gBACE;cACF;YACF;;YAEA;YACA;cACE;cACA;;YAEF;cACE;gBACE;;cAEF;gBACE;gBACA;gBACA;kBACE;sBACI;sBACA;oBACF;gBACJ;gBACA;gBACA;kBACE;kBACA;oBACE;sBACE;oBACF;sBACE;sBACA;sBACA;sBACA;oBACF;kBACF;gBACF;kBACE;kBACA;gBACF;cACF;;cAEA;;cAEA;;cAEA;YACF;cACE;;cAEA;;cAEA;YACF;;YAEA;cACE;gBACE;gBACA;gBACA;cACF;cACA;;YAEF;cACE;cACA;cACA;cACA;cACA;;cAEA;YACF;;YAEA;YACA;UACF;;;UAGA;YACE;cACE;YACF;YACA;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;MACF;;MAEA;IACF;EACF;;;AAGF;;AC1pBA;;;;;ACIA;;IAEI;;IAEA;;IAEA;;IAEA;;IAEA;IACA;IACA;;IAEA;;;IAGA;;IAEA;;;;IAIA;;IAEA;;IAEA;;IAEA;;IAEA;IACA;IACA;;IAEA;;IAEA;;IAEA;;;IAGA;;MAEE;UACI;gBACM;gBACA;;MAEV;sBACgB;cACR;cACA;cACA;UACJ;MACJ;;gBAEU;MACV;UACI;MACJ;MACA;gBACU;gBACA;UACN;UACA;UACA;MACJ;;MAEA;QACE;UACE;UACA;MACJ;UACI;MACJ;;MAEA;;IAEF;IACA;;IAEA;MACE;QACE;MACF;IACF;IACA;MACE;QACE;MACF;IACF;;;IAGA;MACE;;QAEE;;QAEA;YACI;QACJ;;QAEA;YACI;;YAEA;;cAEE;cACA;cACA;;cAEA;kBACI;kBACA;cACJ;cACA;kBACI;cACJ;cACA;;YAEF;;cAEE;kBACI;kBACA;cACJ;;YAEF;;QAEJ;;QAEA;MACF;IACF;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;YACI;YACA;gBACI;YACJ;QACJ;QACA;IACJ;;IAEA;QACI;YACI;YACA;;4BAEgB;;4BAEA;gCACI;gBAChB;;4BAEY;YAChB;QACJ;QACA;IACJ;;IAEA;;QAEI;YACI;;YAEA;UACF;;YAEE;UACF;UACA;QACF;IACJ;QACI;;QAEA;UACE;QACF;UACE;YACE;UACF;QACF;;QAEA;IACJ;;;;IAIA;QACI;IACJ;;;IAGA;;QAEI;;wBAEgB;;sBAEF;YACV;UACF;QACF;QACA;IACJ;IACA;QACI;IACJ;IACA;QACI;oCAC4B;YACxB;;YAEA;QACJ;IACJ;;;;KAIC;OACE;SACE;WACE;aACE;WACF;SACF;OACF;;SAEE;;SAEA;8CACqC;SACrC;;SAEA;;SAEA;WACE;SACF;SACA;;OAEF;;OAEA;KACF;;;IAGD;IACA;;;IAGA;;IAEA;IACA;IACA;;;;IAIA;QACI;IACJ;;IAEA;;;IAGA;;oDAEgD;;IAEhD;;AAEJ;;ACvSA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;IAEI;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;YACQ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;;IAEJ;KACC;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;YACI;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;YACJ;;YAEA;QACJ;;QAEA;QACA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;;QAEA;QACA;QACA;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;;QAEA;YACI;;QAEJ;YACI;gBACI;gBACA;YACJ;YACA;QACJ;;QAEA;YACI;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;;QAEJ;QACA;YACI;QACJ;;QAEA;QACA;YACI;QACJ;;QAEA;QACA;QACA;YACI;;YAEA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;gBAEI;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;oBACI;gBACJ;;gBAEA;YACJ;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;YACI;QACJ;;QAEA;YACI;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;YACA;;QAEJ;QACA;YACI;gBACI;YACJ;QACJ;;QAEA;QACA;;YAEI;YACA;YACA;YACA;YACA;YACA;;gBAEI;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;oBACI;gBACJ;;gBAEA;;gBAEA;gBACA;gBACA;gBACA;YACJ;;YAEA;YACA;YACA;gBACI;YACJ;QACJ;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;YACI;QACJ;;QAEA;;QAEA;QACA;YACI;QACJ;;QAEA;QACA;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;;gBAEI;gBACA;gBACA;oBACI;gBACJ;;gBAEA;oBACI;gBACJ;YACJ;QACJ;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;YACI;QACJ;;QAEA;QACA;QACA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;gBACI;gBACA;gBACA;YACJ;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;;YAEA;YACA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;QACJ;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;;QAEJ;QACA;QACA;;QAEA;YACI;;YAEA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;YACA;gBACI;gBACA;YACJ;;YAEA;YACA;gBACI;YACJ;QACJ;;QAEA;QACA;QACA;;QAEA;YACI;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;;QAEA;QACA;;QAEA;YACI;;QAEJ;QACA;QACA;YACI;YACA;QACJ;;QAEA;;QAEA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;YACA;YACA;YACA;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;QACJ;IACJ;;IAEA;IACA;IACA;IACA;;IAEA;;QAEI;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;gBACI;YACJ;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;QACJ;;OAED;QACC;QACA;QACA;QACA;QACA;QACA;QACA;;YAEI;YACA;gBACI;YACJ;;YAEA;YACA;QACJ;;QAEA;SACC;SACA;QACD;IACJ;;IAEA;IACA;;IAEA;IACA;QACI;IACJ;AACJ;;ACx7BA;AACA;AACA;;AAEA;;AAEA,eAAe,OAAO;EACpB;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA,aAAa,KAAK;EAChB;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;AC3BA;;AAEA;IACI;KACC;KACA;KACA;KACA;KACA;IACD;AACJ;;AAEA,mCAAmC,cAAc;IAC7C;;IAEA;QACI;YACI;QACJ;YACI;QACJ;IACJ;;IAEA;QACI;YACI;QACJ;YACI;QACJ;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;YACI;YACA;QACJ;;QAEA;YACI;gBACI;YACJ;;YAEA;gBACI;gBACA;oBACI;gBACJ;oBACI;gBACJ;YACJ;;YAEA;QACJ;;QAEA;YACI;YACA;YACA;QACJ;;QAEA;YACI;YACA;YACA;QACJ;;QAEA;YACI;YACA;YACA;YACA;QACJ;;QAEA;YACI;gBACI;gBACA;gBACA;YACJ;gBACI;oBACI;gBACJ;YACJ;QACJ;IACJ;;IAEA;AACJ;;AAEA,qCAAqC,SAAS;IAC1C;IACA;IACA;QACI;YACI;gBACI;YACJ;QACJ;QACA;YACI;QACJ;IACJ;;IAEA;QACI;YACI;QACJ;IACJ;;IAEA;QACI;QACA;QACA;YACI;YACA;YACA;;YAEA;YACA;;YAEA;gBACI;oBACI;oBACA;;oBAEA;wBACI;wBACA;wBACA;4BACI;4BACA;4BACA;wBACJ;4BACI;wBACJ;;wBAEA;wBACA;wBACA;wBACA;wBACA;wBACA;wBACA;oBACJ;;oBAEA;wBACI;oBACJ;;oBAEA;;oBAEA;gBACJ;YACJ;QACJ;IACJ;AACJ;;AAEA,kCAAkC,SAAS;IACvC;QACI;IACJ;IACA;IACA;AACJ;;AAEA;AACA,mCAAmC,cAAc;IAC7C;QACI;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;QACR;IACJ;AACJ;;ACrSA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;;EAEA,4CAA4C,OAAO;;IAEjD;KACC;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;;IAED;;IAEA;KACC;KACA;KACA;IACD;sBACkB;sBACA;wBACE;0BACE;4BACE;0BACF;0BACA;wBACF;sBACF;sBACA;oBACF;;IAEhB;KACC;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;IACD;;IAEA,YAAY,mEAAA;;MAEV;MACA;MACA;MACA;QACE;QACA;UACE;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;QACA;;QAEA;UACE;UACA;YACE;cACE;YACF;cACE;YACF;UACF;;UAEA;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;QACA;QACA;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;MACD;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;;MAGA;QACE;;QAEA;UACE;YACE;YACA;YACA;YACA;YACA;cACE;YACF;;YAEA;YACA;YACA;YACA;UACF;QACF;MACF;;;MAGA;MACA;QACE;QACA;QACA;QACA;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;UACA;YACE;UACF;QACF;MACF;;MAEA;OACC;OACA;MACD;;MAEA;QACE;;QAEA;QACA;QACA;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;UACE;;UAEA;UACA;YACE;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;UACE;UACA;UACA;QACF;UACE;QACF;;QAEA;QACA;QACA;QACA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;;UAEE;UACA;;UAEA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;;UAEA;UACA;YACE;YACA;YACA;;YAEA;YACA;cACE;YACF;cACE;cACA;gBACE;kBACE;kBACA;gBACF;cACF;YACF;;YAEA;cACE;YACF;UACF;QACF;;QAEA;UACE;QACF;UACE;QACF;;QAEA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;QACF;UACE;;UAEA;YACE;YACA;cACE;YACF;cACE;YACF;YACA;UACF;QACF;;QAEA;;MAEF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;QAEE;;QAEA;UACE;;UAEA;YACE;UACF;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;QACA;;UAEE;UACA;;UAEA;YACE;YACA;cACE;cACA;YACF;UACF;QACF;QACA;QACA;QACA;UACE;YACE;;YAEA;cACE;YACF;cACE;YACF;;YAEA;YACA;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;;UAEE;UACA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;;UAEA;UACA;UACA;YACE;YACA;UACF;QACF;MACF;;;MAGA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;;IAEF,CAAC,CAAA;EACH;;EAEA,YAAY,MAAM,GAAG,YAAA;IACnB;MACE;MACA;QACE;;QAEA;UACE;UACA;;UAEA;;UAEA;YACE;YACA;YACA;YACA;YACA;UACF;QACF;;QAEA;QACA;UACE;QACF;MACF;IACF;EACF,CAAC,CAAA;;EAED,KAAK,YAAA;IACH;IACA;EACF,CAAC,CAAA;;AAEH;;ACljBA;CACC;CACA;CACA;CACA;CACA;;AAED;AACA;EACE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;IACI;IACA;IACA;IACA;IACA;IACA;IACA;;AAEJ;EACE;AACF;;AAEA;EACE;IACE;MACE;QACE;MACF;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;;EAEA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;EACA;;EAEA;;EAEA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;IACA;;IAEA;MACE;MACA;MACA;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;EACF;;EAEA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;EACA;AACF;;AAEA;AACA;AACA;EACE;EACA;IACE;EACF;EACA;AACF;;AAEA;AACA;AACA;EACE;EACA;EACA;IACE;EACF;EACA;AACF;;AAEA;AACA;AACA;EACE;EACA;EACA;IACE;EACF;EACA;AACF;;AAEA;EACE;;EAEA;IACE;EACF;EACA;AACF;;AAEA;EACE;EACA;EACA;IACE;MACE;IACF;EACF;EACA;AACF;;AAEA;EACE;;EAEA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;MACI;MACA;MACA;MACA;MACA;;;EAGJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;;MAEA;QACE;MACF;QACE;QACA;UACE;QACF;QACA;MACF;;MAEA;MACA;IACF;IACA;IACA;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;UACI;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;UACA;UACA;UACA;QACF;MACF;;MAEA;QACE;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;MACF;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;UACE;QACF;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;QACA;QACA;QACA;UACE;YACE;YACA;cACE;cACA;YACF;UACF;QACF;QACA;QACA;UACE;UACA;YACE;YACA;cACE;cACA;YACF;UACF;YACE;UACF;QACF;QACA;QACA;MACF;;MAEA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;AACF;;AAEA,0CAA0C,QAAQ;;;AAGlD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;QACI;QACA;EACN;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;AACF;;AAEA,0CAA0C,gBAAgB;;AAE1D;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;MACI;MACA;MACA;MACA;MACA;MACA;;EAEJ;IACE;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;MACA;MACA;IACF;IACA;EACF;;EAEA;;EAEA;EACA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;MACE;IACF;EACF;;EAEA;EACA;IACE;IACA;;IAEA;IACA;IACA;IACA;EACF;EACA;;EAEA;EACA;;EAEA;IACE;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;QACA;QACA;MACF;IACF;EACF;IACE;IACA;EACF;;EAEA;EACA;;EAEA;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;IACE;IACA;IACA;EACF;EACA;AACF;;AAEA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;;EAEA;IACE;IACA;;EAEF;;EAEA;IACE;IACA;;IAEA;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;MACE;IACF;IACA;IACA;EACF;EACA;IACE;IACA;EACF;;EAEA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;;EAEA;;EAEA;IACE;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;UACE;YACE;UACF;YACE;UACF;QACF;QACA;MACF;QACE;QACA;MACF;QACE;MACF;IACF;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;EACE;EACA;AACF;;AAEA;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;;EAEA;IACE;MACE;QACE;MACF;IACF;;IAEA;IACA;IACA;IACA;MACE;QACE;QACA;QACA;MACF;IACF;IACA;;IAEA;IACA;MACE;QACE;QACA;QACA;UACE;QACF;MACF;IACF;;IAEA;IACA;MACE;QACE;QACA;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;EACF;AACF;;;;AAIA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;EAEA;EACA;AACF;AACA;EACE;;EAEA;IACE;MACE;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;IACF;IACA;MACE;QACE;UACE;QACF;UACE;UACA;QACF;MACF;MACA;QACE;QACA;QACA;MACF;MACA;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;MACE;MACA;IACF;EACF;;EAEA;IACE;EACF;;EAEA;GACC;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;QACE;MACF;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;EACA;IACE;MACE;MACA;MACA;IACF;EACF;;EAEA;EACA;EACA;;EAEA;EACA;IACE;IACA;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;MACE;IACF;IACA;IACA;;IAEA;MACE;MACA;wBACkB;MAClB;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;IACF;;IAEA;KACC;KACA;IACD;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;IACD;MACE;MACA;QACE;QACA;MACF;MACA;MACA;IACF;;IAEA;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;EACF;;EAEA;IACE;MACE;IACF;IACA;MACE;QACE;MACF;MACA;MACA;QACE;YACI;QACJ;MACF;MACA;IACF;IACA;MACE;MACA;QACE;MACF;MACA;IACF;IACA;MACE;MACA;QACE;QACA;MACF;MACA;IACF;IACA;MACE;;MAEA;QACE;QACA;QACA;QACA;MACF;MACA;IACF;IACA;EACF;;EAEA;AACF;;AAEA;AACA,2CAA2C,kBAAkB;AAC7D;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;;EAEA;EACA;IACE;IACA;EACF;;EAEA;EACA;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;IACA;IACA;EACF;;;EAGA;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;;IAEF;MACE;QACE;UACE;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;MACA;QACE;;QAEA;UACE;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;YACS;GACT;EACD;IACE;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;EACA;;IAEE;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;MACA;;MAEA;QACE;;QAEA;QACA;QACA;MACF;MACA;;MAEA;QACE;MACF;MACA;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;;IAEA;MACE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;UACA;QACF;QACA;;QAEA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;QACA;UACE;QACF;;QAEA;QACA;;QAEA;UACE;QACF;QACA;;QAEA;UACE;QACF;;QAEA;QACA;;QAEA;MACF;IACF;EACF;AACF;;AAEA,6CAA6C,UAAU;;AAEvD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;;EAEA;EACA;;IAEE;IACA;IACA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;;MAEA;QACE;QACA;MACF;;MAEA;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;MACE;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;MACA;MACA;IACF;;IAEA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;;IAEA;QACI;QACA;;IAEJ;MACE;MACA;;MAEA;;MAEA;QACE;UACE;UACA;QACF;QACA;UACE;UACA;UACA;QACF;QACA;MACF;MACA;MACA;IACF;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;EACF;;EAEA;IACE;IACA;MACE;MACA;MACA;IACF;;IAEA;IACA;IACA;;IAEA;IACA;QACI;QACA;QACA;;IAEJ;IACA;MACE;IACF;;IAEA;MACE;IACF;IACA;;IAEA;IACA;MACE;QACE;UACE;QACF;MACF;IACF;;IAEA;IACA;;IAEA;EACF;;EAEA;EACA;IACE;EACF;;EAEA;EACA;IACE;QACI;;IAEJ;IACA;OACG;OACA;IACH;IACA;IACA;OACG;OACA;IACH;;IAEA;MACE;IACF;;IAEA;IACA;MACE;QACE;MACF;IACF;;IAEA;EACF;;;EAGA;EACA;IACE;IACA;IACA;IACA;EACF;EACA;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;IACA;MACE;IACF;IACA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;EACA;;IAEE;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;QACE;QACA;MACF;;MAEA;QACE;MACF;;MAEA;MACA;QACE;QACA;MACF;MACA;;MAEA;QACE;QACA;QACA;MACF;QACE;MACF;MACA;;MAEA;IACF;;IAEA;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;;MAEA;MACA;;MAEA;QACE;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;MACF;MACA;MACA;MACA;;MAEA;MACA;;MAEA;;MAEA;MACA;;MAEA;QACE;UACE;UACA;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;QACE;QACA;QACA;MACF;;MAEA;MACA;;MAEA;MACA;QACE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;MACA;QACE;;QAEA;;QAEA;QACA;UACE;UACA;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;UACA;YACE;UACF;QACF;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;UACC;QACF;QACA;;QAEA;MACF;QACE;;QAEA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;;QAEA;YACI;QACJ;;QAEA;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;UACE;QACF;QACA;MACF;;MAEA;MACA;MACA;MACA;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;QACA;QACA;MACF;;MAEA;;MAEA;MACA;;MAEA;;MAEA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;QACE;MACF;MACA;;MAEA;MACA;QACE;QACA;UACE;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;YACE;UACF;UACA;UACA;UACA;UACA;QACF;MACF;;MAEA;MACA;QACE;MACF;IACF;;IAEA;EACF;;EAEA;IACE;MACE;IACF;EACF;AACF;;AAEA;EACE;EACA,WAAW,MAAM;;;AAGnB;AACA;;EAEE;EACA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;MACE;MACA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;QACA;;QAEA;UACE;QACF;QACA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;UACC;QACF;QACA;MACF;IACF;EACF;AACF;;AAEA,4CAA4C,KAAK;;AAEjD;CACC;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA,4CAA4C,aAAa;;AAEzD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;IACE;MACE;IACF;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;MACI;MACA;;EAEJ;EACA;EACA;IACE;MACE;QACE;QACA;MACF;IACF;;IAEA;MACE;QACE;UACE;UACA;QACF;QACA;UACE;UACA;QACF;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;MACF;IACF;;IAEA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;MACE;QACE;YACI;YACA;YACA;;QAEJ;UACE;QACF;QACA;UACE;QACF;;QAEA;;QAEA;UACE;YACE;YACA;UACF;;UAEA;YACE;YACA;UACF;;UAEA;YACE;cACE;YACF;;YAEA;YACA;UACF;QACF;;QAEA;UACE;cACI;cACA;;UAEJ;UACA;UACA;;UAEA;YACE;cACE;gBACE;cACF;;cAEA;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;UACA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;UACA;QACF;MACF;IACF;EACF;;EAEA;AACF;;AAEA;AACA;EACE;IACE;IACA;IACA;MACE;MACA;QACE;YACI;YACA;;QAEJ;UACE;QACF;;QAEA;QACA;;QAEA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;UACA;QACF;;QAEA;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;AACD;EACE;EACA;EACA;AACF;;AAEA,6CAA6C,MAAM;AACnD,6CAA6C,MAAM;;AAEnD;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;;EAEA;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;;EAEA;IACE;IACA;IACA;MACE;MACA;MACA;MACA;MACA;;MAEA;MACA;;MAEA;QACE;UACE;QACF;MACF;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;MACA;;MAEA;;MAEA;QACE;QACA;UACE;UACA;YACE;UACF;UACA;;UAEA;UACA;UACA;YACE;cACE;UACJ;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;IACA;MACE;;MAEA;MACA;MACA;MACA;;MAEA;MACA;QACE;QACA;QACA;MACF;;MAEA;;MAEA;MACA;QACE;UACE;QACF;UACE;QACF;MACF;;MAEA;QACE;UACE;QACF;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE,YAAY,MAAM;EAClB,YAAY,YAAY;EACxB,YAAY,cAAc;;AAE5B;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;EACF;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;EACF;EACA;EACA;AACF;;AAEA;EACE,SAAS,OAAO;EAChB,SAAS,eAAe;AAC1B;ACvoIA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;EACA;;EAEA;EACA;MACI;;EAEJ;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;;IAEA;IACA;;IAEA;IACA;EACF;;EAEA;EACA;MACI;MACA;;EAEJ;GACC;GACA;GACA;EACD;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;EACF;;EAEA;EACA;;EAEA;EACA;MACI;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;EAEJ;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;EACA;IACE;EACF;;EAEA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;;IAEJ;MACE;QACE;MACF;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;;IAEA;MACE;MACA;EACJ;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;QACI;;IAEJ;MACE;IACF;MACE;QACE;MACF;MACA;UACI;;MAEJ;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;QACA;QACA;;IAEJ;MACE;UACI;;MAEJ;QACE;UACE;QACF;QACA;UACE;QACF;MACF;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;QACA;QACA;QACA;;IAEJ;QACI;MACF;IACF;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;QACI;QACA;;IAEJ;MACE;IACF;IACA;EACF;;EAEA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;KACC;KACA;KACA;KACA;KACA;IACD;;IAEA;IACA;QACI;QACA;;IAEJ;IACA;;IAEA;IACA;;IAEA;IACA;MACE;QACE;QACA;IACJ;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;IACA;MACE;MACA;QACE;YACI;YACA;MACN;MACA;IACF;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;UACE;YACE;UACF;QACF;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;OACC;OACA;IACH;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;IACA;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;QAEE;SACC;SACA;SACA;SACA;SACA;QACD;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;MACA;MACA;MACA;MACA;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;MACA;MACA;OACC;MACD;MACA;MACA;OACC;;OAEA;MACD;OACC;;OAEA;MACD;OACC;;UAEG;;OAEH;MACD;UACI;MACJ;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;OACC;MACD;UACI;MACJ;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;OACC;MACD;OACC;MACD;MACA;MACA;cACQ;MACR;OACC;MACD;MACA;MACA;OACC;MACD;OACC;;OAEA;;OAEA;MACD;OACC;MACD;MACA;MACA;;MAEA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;QACA;QACA;QACA;UACE;UACA;cACI;UACJ;QACF;QACA;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;UACE;QACF;MACF;MACA;MACA;MACA;QACE;QACA;UACE;QACF;QACA;QACA;UACE;UACA;YACE;;UAEF;UACA;YACE;;UAEF;YACE;YACA;YACA;QACJ;MACF;QACE;MACF;MACA;MACA;QACE;QACA;QACA;QACA;;QAEA;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;QACE;MACF;MACA;MACA;QACE;UACE;QACF;QACA;UACE;QACF;MACF;MACA;MACA;QACE;MACF;MACA;MACA;MACA;MACA;;MAEA;MACA;QACE;MACF;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;MACE;QACE;QACA;UACE;YACE;YACA;YACA;UACF;UACA;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;QACE;UACE;QACF;QACA;QACA;UACE;UACA;YACE;UACF;UACA;YACE;YACA;YACA;UACF;QACF;MACF;MACA;MACA;QACE;MACF;MACA;QACE;UACE;QACF;QACA;UACE;QACF;QACA;UACE;QACF;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;QACF;QACA;UACE;UACA;YACE;UACF;UACA;YACE;YACA;UACF;QACF;QACA;QACA;UACE;QACF;QACA;UACE;UACA;UACA;QACF;QACA;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;QACF;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;;QAEA;YACI;UACF;UACA;YACE;UACF;UACA;cACI;cACA;;UAEJ;UACA;YACE;UACF;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;MACA;QACE;QACA;MACF;MACA;UACI;;MAEJ;MACA;UACI;UACA;QACF;MACF;MACA;MACA;MACA;QACE;MACF;MACA;MACA;UACI;;MAEJ;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;QACA;UACE;UACA;UACA;;QAEF;UACE;UACA;YACE;YACA;YACA;;QAEJ;QACA;UACE;UACA;UACA;MACJ;MACA;MACA;QACE;QACA;YACI;;QAEJ;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;YACI;;QAEJ;QACA;cACM;cACA;YACF;UACF;QACF;MACF;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;QACE;UACE;QACF;MACF;MACA;MACA;;MAEA;MACA;MACA;;MAEA;MACA;QACE;QACA;QACA;QACA;;QAEA;UACE;UACA;YACE;gBACI;;YAEJ;cACE;gBACE;kBACE;gBACF;cACF;YACF;cACE;YACF;UACF;QACF;MACF;MACA;QACE;QACA;QACA;UACE;YACE;YACA;YACA;YACA;UACF;QACF;;QAEA;UACE;UACA;YACE;cACE;cACA;YACF;UACF;QACF;MACF;MACA;MACA;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;YACA;YACA;;QAEJ;UACE;UACA;UACA;YACE;cACE;cACA;YACF;UACF;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;YACA;cACE;gBACE;gBACA;YACJ;YACA;YACA;YACA;;YAEA;YACA;cACE;YACF;UACF;QACF;QACA;UACE;YACE;YACA;cACE;YACF;UACF;UACA;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;UACI;;MAEJ;QACE;QACA;QACA;MACF;MACA;QACE;YACI;;QAEJ;cACM;cACA;YACF;UACF;YACE;UACF;UACA;QACF;MACF;MACA;QACE;QACA;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;;QAEA;UACE;cACI;;UAEJ;YACE;YACA;UACF;QACF;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;MACF;MACA;QACE;QACA;MACF;MACA;MACA;QACE;QACA;QACA;UACE;QACF;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;QACA;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;MACA;MACA;MACA;;MAEA;MACA;QACE;UACE;QACF;MACF;MACA;MACA;;MAEA;MACA;UACI;UACA;UACA;QACF;MACF;;MAEA;MACA;QACE;QACA;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;UACI;UACA;UACA;QACF;MACF;MACA;MACA;MACA;MACA;QACE;UACE;UACA;QACF;QACA;MACF;MACA;MACA;MACA;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;IACA;IACA;MACE;QACE;UACE;MACJ;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;UACI;QACF;MACF;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;MACF;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;;IAEA;IACA;QACI;;IAEJ;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;MAEA;QACE;MACF;;MAEA;MACA;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;UACI;;MAEJ;UACI;UACA;QACF;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;UACI;;MAEJ;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;MACA;MACA;QACE;MACF;MACA;QACE;MACF;QACE;MACF;MACA;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;UACE;QACF;QACA;;QAEA;YACI;;QAEJ;UACE;UACA;QACF;MACF;QACE;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;YACI;YACA;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;UACE;QACF;UACE;cACI;;UAEJ;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;MACA;QACE;MACF;QACE;MACF;QACE;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;MAEA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;QACA;UACE;YACE;YACA;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;UACE;YACE;UACF;QACF;MACF;QACE;UACE;UACA;QACF;UACE;QACF;QACA;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;UACE;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;UACA;;QAEF;UACE;UACA;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;UACA;;QAEF;UACE;UACA;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;QACF;QACA;UACE;QACF;MACF;QACE;UACE;YACE;YACA;QACJ;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;QACE;MACF;MACA;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;UACE;QACF;UACE;QACF;QACA;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;YACE;QACJ;MACF;MACA;UACI;UACA;UACA;;MAEJ;MACA;QACE;QACA;;QAEA;UACE;UACA;UACA;YACE;YACA;cACE;YACF;UACF;UACA;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;YACI;QACJ;UACE;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;QACA;MACF;MACA;MACA;MACA;UACI;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;QACA;UACE;UACA;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;YACA;;QAEJ;QACA;UACE;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;;MAEA;QACE;QACA;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;UACE;YACE;YACA;QACJ;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;UACE;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;QACE;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;QACF;MACF;MACA;QACE;YACI;;QAEJ;UACE;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;MACA;QACE;QACA;MACF;QACE;QACA;QACA;MACF;MACA;QACE;QACA;UACE;YACE;UACF;UACA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;QACF;UACE;QACF;MACF;;MAEA;QACE;UACE;QACF;QACA;QACA;UACE;UACA;UACA;YACE;UACF;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;;QAEA;UACE;QACF;UACE;YACE;UACF;UACA;cACI;;UAEJ;YACE;cACE;YACF;YACA;YACA;UACF;UACA;YACE;UACF;QACF;QACA;UACE;QACF;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;MACJ;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;QACE;UACE;QACF;QACA;QACA;;QAEA;QACA;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;QACE;MACF;QACE;QACA;MACF;MACA;MACA;MACA;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;MACA;QACE;MACF;MACA;UACI;UACA;;MAEJ;MACA;QACE;QACA;QACA;UACE;UACA;QACF;MACF;MACA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;QACF;QACA;QACA;QACA;QACA;MACF;MACA;QACE;MACF;QACE;MACF;MACA;UACI;;MAEJ;QACE;QACA;UACE;YACE;gBACI;gBACA;;YAEJ;YACA;YACA;cACE;gBACE;cACF;cACA;cACA;YACF;YACA;UACF;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;UACA;QACF;QACA;UACE;UACA;QACF;MACF;MACA;QACE;MACF;MACA;MACA;QACE;QACA;MACF;QACE;MACF;MACA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;;MAEA;UACI;UACA;;MAEJ;UACI;UACA;UACA;;MAEJ;MACA;QACE;QACA;QACA;QACA;MACF;;MAEA;QACE;;QAEA;QACA;;QAEA;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;UACE;QACF;QACA;;QAEA;QACA;QACA;MACF;;MAEA;;MAEA;MACA;MACA;UACI;;MAEJ;QACE;QACA;MACF;MACA;MACA;QACE;QACA;;MAEF;MACA;QACE;QACA;QACA;UACE;YACE;UACF;QACF;QACA;QACA;;MAEF;MACA;MACA;;MAEA;QACE;MACF;QACE;QACA;MACF;MACA;QACE;MACF;MACA;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;UACI;;MAEJ;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;;IAEA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;MACE;MACA;QACE;UACE;cACI;;UAEJ;YACE;YACA;QACJ;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;IACA;IACA;IACA;IACA;;IAEA;IACA;MACE;MACA;QACE;YACI;;QAEJ;UACE;UACA;MACJ;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;IACF;;IAEA;IACA;IACA;MACE;QACE;YACI;;QAEJ;UACE;cACI;cACA;;UAEJ;YACE;UACF;UACA;YACE;YACA;QACJ;MACF;IACF;;IAEA;EACF;;EAEA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;IACF;EACF;EACA;EACA;IACE;IACA;MACE;IACF;IACA;IACA;MACE;IACF;EACF;EACA;IACE;IACA;EACF;AACF;;ACp/NA;AACA;AACA;AACA;AACA;AACA;;AAEA;EACE;;EAEA;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;IACA;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;;EAEA;IACE;MACE;IACF;MACE;IACF;MACE;EACJ;;EAEA;EACA;IACE;IACA;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;IACE;MACE;IACF;;IAEA;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;QACA;UACE;QACF;QACA;UACE;UACA;YACE;YACA;cACE;gBACE;cACF;cACA;YACF;UACF;YACE;UACF;UACA;YACE;UACF;;UAEA;YACE;UACF;UACA;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;UACA;UACA;UACA;UACA;UACA;QACF;MACF;MACA;IACF;;IAEA;;IAEA;MACE;MACA;QACE;UACE;QACF;QACA;UACE;QACF;QACA;UACE;YACE;YACA;YACA;cACE;cACA;gBACE;kBACE;gBACF;gBACA;kBACE;gBACF;gBACA;kBACE;gBACF;cACF;YACF;YACA;cACE;YACF;YACA;UACF;UACA;YACE;UACF;UACA;YACE;UACF;UACA;QACF;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;EACF;;;;EAIA;;EAEA;;IAEE;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;QACE;QACA;;MAEF;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;QACE;;QAEA;UACE;QACF;UACE;QACF;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;QACE;;MAEF;;MAEA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;;MAEA;MACA;;MAEA;;MAEA;QACE;;MAEF;QACE;MACF;QACE;;MAEF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;;MAEA;;MAEA;QACE;MACF;QACE;;MAEF;QACE;UACE;UACA;QACF;UACE;UACA;kBACQ;QACV;UACE;UACA;QACF;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;QACE;;MAEF;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;;MAEA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;;MAEA;UACI;UACA;;MAEJ;QACE;QACA;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;MACF;;MAEA;IACF;;IAEA;MACE;;MAEA;;MAEA;MACA;;MAEA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;QACE;QACA;QACA;;MAEF;QACE;;QAEA;UACE;UACA;YACE;YACA;cACE;UACJ;UACA;QACF;MACF;;MAEA;QACE;;MAEF;IACF;;IAEA;MACE;MACA;MACA;;MAEA;;MAEA;;MAEA;QACE;UACE;YACE;cACE;YACF;cACE;UACJ;YACE;;UAEF;UACA;QACF;;MAEF;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EACA;IACE;MACE;;IAEF;EACF;;EAEA;EACA;IACE;;;EAGF;EACA;EACA;EACA;AACF","file":"libs.js","sourcesContent":["/**\n * @license AngularJS v1.3.0-rc.3\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, document, undefined) {'use strict';\n\n/**\n * @description\n *\n * This object provides a utility for producing rich Error messages within\n * Angular. It can be called as follows:\n *\n * var exampleMinErr = minErr('example');\n * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n *\n * The above creates an instance of minErr in the example namespace. The\n * resulting error will have a namespaced error code of example.one. The\n * resulting error will replace {0} with the value of foo, and {1} with the\n * value of bar. The object is not restricted in the number of arguments it can\n * take.\n *\n * If fewer arguments are specified than necessary for interpolation, the extra\n * interpolation markers will be preserved in the final string.\n *\n * Since data will be parsed statically during a build step, some restrictions\n * are applied with respect to how minErr instances are created and called.\n * Instances should have names of the form namespaceMinErr for a minErr created\n * using minErr('namespace') . Error codes, namespaces and template strings\n * should all be static strings, not variables or general expressions.\n *\n * @param {string} module The namespace to use for the new minErr instance.\n * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning\n * error from returned function, for cases when a particular type of error is useful.\n * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance\n */\n\nfunction minErr(module, ErrorConstructor) {\n ErrorConstructor = ErrorConstructor || Error;\n return function () {\n var code = arguments[0],\n prefix = '[' + (module ? module + ':' : '') + code + '] ',\n template = arguments[1],\n templateArgs = arguments,\n stringify = function (obj) {\n if (typeof obj === 'function') {\n return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n } else if (typeof obj === 'undefined') {\n return 'undefined';\n } else if (typeof obj !== 'string') {\n return JSON.stringify(obj);\n }\n return obj;\n },\n message, i;\n\n message = prefix + template.replace(/\\{\\d+\\}/g, function (match) {\n var index = +match.slice(1, -1), arg;\n\n if (index + 2 < templateArgs.length) {\n arg = templateArgs[index + 2];\n if (typeof arg === 'function') {\n return arg.toString().replace(/ ?\\{[\\s\\S]*$/, '');\n } else if (typeof arg === 'undefined') {\n return 'undefined';\n } else if (typeof arg !== 'string') {\n return toJson(arg);\n }\n return arg;\n }\n return match;\n });\n\n message = message + '\\nhttp://errors.angularjs.org/1.3.0-rc.3/' +\n (module ? module + '/' : '') + code;\n for (i = 2; i < arguments.length; i++) {\n message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +\n encodeURIComponent(stringify(arguments[i]));\n }\n return new ErrorConstructor(message);\n };\n}\n\n/* We need to tell jshint what variables are being exported */\n/* global angular: true,\n msie: true,\n jqLite: true,\n jQuery: true,\n slice: true,\n push: true,\n toString: true,\n ngMinErr: true,\n angularModule: true,\n uid: true,\n REGEX_STRING_REGEXP: true,\n VALIDITY_STATE_PROPERTY: true,\n\n lowercase: true,\n uppercase: true,\n manualLowercase: true,\n manualUppercase: true,\n nodeName_: true,\n isArrayLike: true,\n forEach: true,\n sortedKeys: true,\n forEachSorted: true,\n reverseParams: true,\n nextUid: true,\n setHashKey: true,\n extend: true,\n int: true,\n inherit: true,\n noop: true,\n identity: true,\n valueFn: true,\n isUndefined: true,\n isDefined: true,\n isObject: true,\n isString: true,\n isNumber: true,\n isDate: true,\n isArray: true,\n isFunction: true,\n isRegExp: true,\n isWindow: true,\n isScope: true,\n isFile: true,\n isBlob: true,\n isBoolean: true,\n isPromiseLike: true,\n trim: true,\n isElement: true,\n makeMap: true,\n size: true,\n includes: true,\n arrayRemove: true,\n isLeafNode: true,\n copy: true,\n shallowCopy: true,\n equals: true,\n csp: true,\n concat: true,\n sliceArgs: true,\n bind: true,\n toJsonReplacer: true,\n toJson: true,\n fromJson: true,\n startingTag: true,\n tryDecodeURIComponent: true,\n parseKeyValue: true,\n toKeyValue: true,\n encodeUriSegment: true,\n encodeUriQuery: true,\n angularInit: true,\n bootstrap: true,\n getTestability: true,\n snake_case: true,\n bindJQuery: true,\n assertArg: true,\n assertArgFn: true,\n assertNotHasOwnProperty: true,\n getter: true,\n getBlockNodes: true,\n hasOwnProperty: true,\n createMap: true,\n*/\n\n////////////////////////////////////\n\n/**\n * @ngdoc module\n * @name ng\n * @module ng\n * @description\n *\n * # ng (core module)\n * The ng module is loaded by default when an AngularJS application is started. The module itself\n * contains the essential components for an AngularJS application to function. The table below\n * lists a high level breakdown of each of the services/factories, filters, directives and testing\n * components available within this core module.\n *\n * \n */\n\nvar REGEX_STRING_REGEXP = /^\\/(.+)\\/([a-z]*)$/;\n\n// The name of a form control's ValidityState property.\n// This is used so that it's possible for internal tests to create mock ValidityStates.\nvar VALIDITY_STATE_PROPERTY = 'validity';\n\n/**\n * @ngdoc function\n * @name angular.lowercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to lowercase.\n * @param {string} string String to be converted to lowercase.\n * @returns {string} Lowercased string.\n */\nvar lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * @ngdoc function\n * @name angular.uppercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to uppercase.\n * @param {string} string String to be converted to uppercase.\n * @returns {string} Uppercased string.\n */\nvar uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};\n\n\nvar manualLowercase = function(s) {\n /* jshint bitwise: false */\n return isString(s)\n ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})\n : s;\n};\nvar manualUppercase = function(s) {\n /* jshint bitwise: false */\n return isString(s)\n ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})\n : s;\n};\n\n\n// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish\n// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods\n// with correct but slower alternatives.\nif ('i' !== 'I'.toLowerCase()) {\n lowercase = manualLowercase;\n uppercase = manualUppercase;\n}\n\n\nvar /** holds major version number for IE or NaN for real browsers */\n msie,\n jqLite, // delay binding since jQuery could be loaded after us.\n jQuery, // delay binding\n slice = [].slice,\n push = [].push,\n toString = Object.prototype.toString,\n ngMinErr = minErr('ng'),\n\n /** @name angular */\n angular = window.angular || (window.angular = {}),\n angularModule,\n uid = 0;\n\n/**\n * IE 11 changed the format of the UserAgent string.\n * See http://msdn.microsoft.com/en-us/library/ms537503.aspx\n */\nmsie = int((/msie (\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\nif (isNaN(msie)) {\n msie = int((/trident\\/.*; rv:(\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\n}\n\n\n/**\n * @private\n * @param {*} obj\n * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,\n * String ...)\n */\nfunction isArrayLike(obj) {\n if (obj == null || isWindow(obj)) {\n return false;\n }\n\n var length = obj.length;\n\n if (obj.nodeType === 1 && length) {\n return true;\n }\n\n return isString(obj) || isArray(obj) || length === 0 ||\n typeof length === 'number' && length > 0 && (length - 1) in obj;\n}\n\n/**\n * @ngdoc function\n * @name angular.forEach\n * @module ng\n * @kind function\n *\n * @description\n * Invokes the `iterator` function once for each item in `obj` collection, which can be either an\n * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`\n * is the value of an object property or an array element, `key` is the object property key or\n * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.\n *\n * It is worth noting that `.forEach` does not iterate over inherited properties because it filters\n * using the `hasOwnProperty` method.\n *\n ```js\n var values = {name: 'misko', gender: 'male'};\n var log = [];\n angular.forEach(values, function(value, key) {\n this.push(key + ': ' + value);\n }, log);\n expect(log).toEqual(['name: misko', 'gender: male']);\n ```\n *\n * @param {Object|Array} obj Object to iterate over.\n * @param {Function} iterator Iterator function.\n * @param {Object=} context Object to become context (`this`) for the iterator function.\n * @returns {Object|Array} Reference to `obj`.\n */\n\nfunction forEach(obj, iterator, context) {\n var key, length;\n if (obj) {\n if (isFunction(obj)) {\n for (key in obj) {\n // Need to check if hasOwnProperty exists,\n // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function\n if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (isArray(obj) || isArrayLike(obj)) {\n var isPrimitive = typeof obj !== 'object';\n for (key = 0, length = obj.length; key < length; key++) {\n if (isPrimitive || key in obj) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (obj.forEach && obj.forEach !== forEach) {\n obj.forEach(iterator, context, obj);\n } else {\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n }\n }\n return obj;\n}\n\nfunction sortedKeys(obj) {\n var keys = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n return keys.sort();\n}\n\nfunction forEachSorted(obj, iterator, context) {\n var keys = sortedKeys(obj);\n for ( var i = 0; i < keys.length; i++) {\n iterator.call(context, obj[keys[i]], keys[i]);\n }\n return keys;\n}\n\n\n/**\n * when using forEach the params are value, key, but it is often useful to have key, value.\n * @param {function(string, *)} iteratorFn\n * @returns {function(*, string)}\n */\nfunction reverseParams(iteratorFn) {\n return function(value, key) { iteratorFn(key, value); };\n}\n\n/**\n * A consistent way of creating unique IDs in angular.\n *\n * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before\n * we hit number precision issues in JavaScript.\n *\n * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M\n *\n * @returns {number} an unique alpha-numeric string\n */\nfunction nextUid() {\n return ++uid;\n}\n\n\n/**\n * Set or clear the hashkey for an object.\n * @param obj object\n * @param h the hashkey (!truthy to delete the hashkey)\n */\nfunction setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.extend\n * @module ng\n * @kind function\n *\n * @description\n * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n * to `dst`. You can specify multiple `src` objects.\n *\n * @param {Object} dst Destination object.\n * @param {...Object} src Source object(s).\n * @returns {Object} Reference to `dst`.\n */\nfunction extend(dst) {\n var h = dst.$$hashKey;\n\n for (var i = 1, ii = arguments.length; i < ii; i++) {\n var obj = arguments[i];\n if (obj) {\n var keys = Object.keys(obj);\n for (var j = 0, jj = keys.length; j < jj; j++) {\n var key = keys[j];\n dst[key] = obj[key];\n }\n }\n }\n\n setHashKey(dst, h);\n return dst;\n}\n\nfunction int(str) {\n return parseInt(str, 10);\n}\n\n\nfunction inherit(parent, extra) {\n return extend(new (extend(function() {}, {prototype:parent}))(), extra);\n}\n\n/**\n * @ngdoc function\n * @name angular.noop\n * @module ng\n * @kind function\n *\n * @description\n * A function that performs no operations. This function can be useful when writing code in the\n * functional style.\n ```js\n function foo(callback) {\n var result = calculateResult();\n (callback || angular.noop)(result);\n }\n ```\n */\nfunction noop() {}\nnoop.$inject = [];\n\n\n/**\n * @ngdoc function\n * @name angular.identity\n * @module ng\n * @kind function\n *\n * @description\n * A function that returns its first argument. This function is useful when writing code in the\n * functional style.\n *\n ```js\n function transformer(transformationFn, value) {\n return (transformationFn || angular.identity)(value);\n };\n ```\n */\nfunction identity($) {return $;}\nidentity.$inject = [];\n\n\nfunction valueFn(value) {return function() {return value;};}\n\n/**\n * @ngdoc function\n * @name angular.isUndefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is undefined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is undefined.\n */\nfunction isUndefined(value){return typeof value === 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is defined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is defined.\n */\nfunction isDefined(value){return typeof value !== 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isObject\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not\n * considered to be objects. Note that JavaScript arrays are objects.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Object` but not `null`.\n */\nfunction isObject(value){\n // http://jsperf.com/isobject4\n return value !== null && typeof value === 'object';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isString\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `String`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `String`.\n */\nfunction isString(value){return typeof value === 'string';}\n\n\n/**\n * @ngdoc function\n * @name angular.isNumber\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Number`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Number`.\n */\nfunction isNumber(value){return typeof value === 'number';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDate\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a value is a date.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Date`.\n */\nfunction isDate(value) {\n return toString.call(value) === '[object Date]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isArray\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Array`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Array`.\n */\nvar isArray = Array.isArray;\n\n/**\n * @ngdoc function\n * @name angular.isFunction\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Function`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Function`.\n */\nfunction isFunction(value){return typeof value === 'function';}\n\n\n/**\n * Determines if a value is a regular expression object.\n *\n * @private\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `RegExp`.\n */\nfunction isRegExp(value) {\n return toString.call(value) === '[object RegExp]';\n}\n\n\n/**\n * Checks if `obj` is a window object.\n *\n * @private\n * @param {*} obj Object to check\n * @returns {boolean} True if `obj` is a window obj.\n */\nfunction isWindow(obj) {\n return obj && obj.window === obj;\n}\n\n\nfunction isScope(obj) {\n return obj && obj.$evalAsync && obj.$watch;\n}\n\n\nfunction isFile(obj) {\n return toString.call(obj) === '[object File]';\n}\n\n\nfunction isBlob(obj) {\n return toString.call(obj) === '[object Blob]';\n}\n\n\nfunction isBoolean(value) {\n return typeof value === 'boolean';\n}\n\n\nfunction isPromiseLike(obj) {\n return obj && isFunction(obj.then);\n}\n\n\nvar trim = function(value) {\n return isString(value) ? value.trim() : value;\n};\n\n\n/**\n * @ngdoc function\n * @name angular.isElement\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a DOM element (or wrapped jQuery element).\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).\n */\nfunction isElement(node) {\n return !!(node &&\n (node.nodeName // we are a direct element\n || (node.prop && node.attr && node.find))); // we have an on and find method part of jQuery API\n}\n\n/**\n * @param str 'key1,key2,...'\n * @returns {object} in the form of {key1:true, key2:true, ...}\n */\nfunction makeMap(str) {\n var obj = {}, items = str.split(\",\"), i;\n for ( i = 0; i < items.length; i++ )\n obj[ items[i] ] = true;\n return obj;\n}\n\n\nfunction nodeName_(element) {\n return lowercase(element.nodeName || element[0].nodeName);\n}\n\n\n/**\n * @description\n * Determines the number of elements in an array, the number of properties an object has, or\n * the length of a string.\n *\n * Note: This function is used to augment the Object type in Angular expressions. See\n * {@link angular.Object} for more information about Angular arrays.\n *\n * @param {Object|Array|string} obj Object, array, or string to inspect.\n * @param {boolean} [ownPropsOnly=false] Count only \"own\" properties in an object\n * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.\n */\nfunction size(obj, ownPropsOnly) {\n var count = 0, key;\n\n if (isArray(obj) || isString(obj)) {\n return obj.length;\n } else if (isObject(obj)) {\n for (key in obj)\n if (!ownPropsOnly || obj.hasOwnProperty(key))\n count++;\n }\n\n return count;\n}\n\n\nfunction includes(array, obj) {\n return Array.prototype.indexOf.call(array, obj) != -1;\n}\n\nfunction arrayRemove(array, value) {\n var index = array.indexOf(value);\n if (index >=0)\n array.splice(index, 1);\n return value;\n}\n\nfunction isLeafNode (node) {\n if (node) {\n switch (nodeName_(node)) {\n case \"option\":\n case \"pre\":\n case \"title\":\n return true;\n }\n }\n return false;\n}\n\n/**\n * @ngdoc function\n * @name angular.copy\n * @module ng\n * @kind function\n *\n * @description\n * Creates a deep copy of `source`, which should be an object or an array.\n *\n * * If no destination is supplied, a copy of the object or array is created.\n * * If a destination is provided, all of its elements (for array) or properties (for objects)\n * are deleted and then all elements/properties from the source are copied to it.\n * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.\n * * If `source` is identical to 'destination' an exception will be thrown.\n *\n * @param {*} source The source that will be used to make a copy.\n * Can be any type, including primitives, `null`, and `undefined`.\n * @param {(Object|Array)=} destination Destination into which the source is copied. If\n * provided, must be of the same type as `source`.\n * @returns {*} The copy or updated `destination`, if `destination` was specified.\n *\n * @example\n \n \n \n \n Name: \n E-mail: \n Gender: male\n female\n RESET\n SAVE\n \n form = {{user | json}}\n master = {{master | json}}\n \n\n \n \n \n */\nfunction copy(source, destination, stackSource, stackDest) {\n if (isWindow(source) || isScope(source)) {\n throw ngMinErr('cpws',\n \"Can't copy! Making copies of Window or Scope instances is not supported.\");\n }\n\n if (!destination) {\n destination = source;\n if (source) {\n if (isArray(source)) {\n destination = copy(source, [], stackSource, stackDest);\n } else if (isDate(source)) {\n destination = new Date(source.getTime());\n } else if (isRegExp(source)) {\n destination = new RegExp(source.source, source.toString().match(/[^\\/]*$/)[0]);\n destination.lastIndex = source.lastIndex;\n } else if (isObject(source)) {\n var emptyObject = Object.create(Object.getPrototypeOf(source));\n destination = copy(source, emptyObject, stackSource, stackDest);\n }\n }\n } else {\n if (source === destination) throw ngMinErr('cpi',\n \"Can't copy! Source and destination are identical.\");\n\n stackSource = stackSource || [];\n stackDest = stackDest || [];\n\n if (isObject(source)) {\n var index = stackSource.indexOf(source);\n if (index !== -1) return stackDest[index];\n\n stackSource.push(source);\n stackDest.push(destination);\n }\n\n var result;\n if (isArray(source)) {\n destination.length = 0;\n for ( var i = 0; i < source.length; i++) {\n result = copy(source[i], null, stackSource, stackDest);\n if (isObject(source[i])) {\n stackSource.push(source[i]);\n stackDest.push(result);\n }\n destination.push(result);\n }\n } else {\n var h = destination.$$hashKey;\n if (isArray(destination)) {\n destination.length = 0;\n } else {\n forEach(destination, function(value, key) {\n delete destination[key];\n });\n }\n for ( var key in source) {\n if(source.hasOwnProperty(key)) {\n result = copy(source[key], null, stackSource, stackDest);\n if (isObject(source[key])) {\n stackSource.push(source[key]);\n stackDest.push(result);\n }\n destination[key] = result;\n }\n }\n setHashKey(destination,h);\n }\n\n }\n return destination;\n}\n\n/**\n * Creates a shallow copy of an object, an array or a primitive.\n *\n * Assumes that there are no proto properties for objects.\n */\nfunction shallowCopy(src, dst) {\n if (isArray(src)) {\n dst = dst || [];\n\n for (var i = 0, ii = src.length; i < ii; i++) {\n dst[i] = src[i];\n }\n } else if (isObject(src)) {\n dst = dst || {};\n\n for (var key in src) {\n if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst || src;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.equals\n * @module ng\n * @kind function\n *\n * @description\n * Determines if two objects or two values are equivalent. Supports value types, regular\n * expressions, arrays and objects.\n *\n * Two objects or values are considered equivalent if at least one of the following is true:\n *\n * * Both objects or values pass `===` comparison.\n * * Both objects or values are of the same type and all of their properties are equal by\n * comparing them with `angular.equals`.\n * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)\n * * Both values represent the same regular expression (In JavaScript,\n * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual\n * representation matches).\n *\n * During a property comparison, properties of `function` type and properties with names\n * that begin with `$` are ignored.\n *\n * Scope and DOMWindow objects are being compared only by identify (`===`).\n *\n * @param {*} o1 Object or value to compare.\n * @param {*} o2 Object or value to compare.\n * @returns {boolean} True if arguments are equal.\n */\nfunction equals(o1, o2) {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n if (t1 == t2) {\n if (t1 == 'object') {\n if (isArray(o1)) {\n if (!isArray(o2)) return false;\n if ((length = o1.length) == o2.length) {\n for(key=0; key 2 ? sliceArgs(arguments, 2) : [];\n if (isFunction(fn) && !(fn instanceof RegExp)) {\n return curryArgs.length\n ? function() {\n return arguments.length\n ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))\n : fn.apply(self, curryArgs);\n }\n : function() {\n return arguments.length\n ? fn.apply(self, arguments)\n : fn.call(self);\n };\n } else {\n // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)\n return fn;\n }\n}\n\n\nfunction toJsonReplacer(key, value) {\n var val = value;\n\n if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {\n val = undefined;\n } else if (isWindow(value)) {\n val = '$WINDOW';\n } else if (value && document === value) {\n val = '$DOCUMENT';\n } else if (isScope(value)) {\n val = '$SCOPE';\n }\n\n return val;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.toJson\n * @module ng\n * @kind function\n *\n * @description\n * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be\n * stripped since angular uses this notation internally.\n *\n * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.\n * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.\n * @returns {string|undefined} JSON-ified string representing `obj`.\n */\nfunction toJson(obj, pretty) {\n if (typeof obj === 'undefined') return undefined;\n return JSON.stringify(obj, toJsonReplacer, pretty ? ' ' : null);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.fromJson\n * @module ng\n * @kind function\n *\n * @description\n * Deserializes a JSON string.\n *\n * @param {string} json JSON string to deserialize.\n * @returns {Object|Array|string|number} Deserialized thingy.\n */\nfunction fromJson(json) {\n return isString(json)\n ? JSON.parse(json)\n : json;\n}\n\n\n/**\n * @returns {string} Returns the string representation of the element.\n */\nfunction startingTag(element) {\n element = jqLite(element).clone();\n try {\n // turns out IE does not let you set .html() on elements which\n // are not allowed to have children. So we just ignore it.\n element.empty();\n } catch(e) {}\n // As Per DOM Standards\n var TEXT_NODE = 3;\n var elemHtml = jqLite('').append(element).html();\n try {\n return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :\n elemHtml.\n match(/^(<[^>]+>)/)[1].\n replace(/^<([\\w\\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });\n } catch(e) {\n return lowercase(elemHtml);\n }\n\n}\n\n\n/////////////////////////////////////////////////\n\n/**\n * Tries to decode the URI component without throwing an exception.\n *\n * @private\n * @param str value potential URI component to check.\n * @returns {boolean} True if `value` can be decoded\n * with the decodeURIComponent function.\n */\nfunction tryDecodeURIComponent(value) {\n try {\n return decodeURIComponent(value);\n } catch(e) {\n // Ignore any invalid uri component\n }\n}\n\n\n/**\n * Parses an escaped url query string into key-value pairs.\n * @returns {Object.}\n */\nfunction parseKeyValue(/**string*/keyValue) {\n var obj = {}, key_value, key;\n forEach((keyValue || \"\").split('&'), function(keyValue) {\n if ( keyValue ) {\n key_value = keyValue.replace(/\\+/g,'%20').split('=');\n key = tryDecodeURIComponent(key_value[0]);\n if ( isDefined(key) ) {\n var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;\n if (!hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n } else if(isArray(obj[key])) {\n obj[key].push(val);\n } else {\n obj[key] = [obj[key],val];\n }\n }\n }\n });\n return obj;\n}\n\nfunction toKeyValue(obj) {\n var parts = [];\n forEach(obj, function(value, key) {\n if (isArray(value)) {\n forEach(value, function(arrayValue) {\n parts.push(encodeUriQuery(key, true) +\n (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));\n });\n } else {\n parts.push(encodeUriQuery(key, true) +\n (value === true ? '' : '=' + encodeUriQuery(value, true)));\n }\n });\n return parts.length ? parts.join('&') : '';\n}\n\n\n/**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n * segments:\n * segment = *pchar\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriSegment(val) {\n return encodeUriQuery(val, true).\n replace(/%26/gi, '&').\n replace(/%3D/gi, '=').\n replace(/%2B/gi, '+');\n}\n\n\n/**\n * This method is intended for encoding *key* or *value* parts of query component. We need a custom\n * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be\n * encoded per http://tools.ietf.org/html/rfc3986:\n * query = *( pchar / \"/\" / \"?\" )\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriQuery(val, pctEncodeSpaces) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%3B/gi, ';').\n replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n}\n\nvar ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];\n\nfunction getNgAttribute(element, ngAttr) {\n var attr, i, ii = ngAttrPrefixes.length;\n element = jqLite(element);\n for (i=0; i` or `` tags.\n *\n * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`\n * found in the document will be used to define the root element to auto-bootstrap as an\n * application. To run multiple applications in an HTML document you must manually bootstrap them using\n * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.\n *\n * You can specify an **AngularJS module** to be used as the root module for the application. This\n * module will be loaded into the {@link auto.$injector} when the application is bootstrapped and\n * should contain the application code needed or have dependencies on other modules that will\n * contain the code. See {@link angular.module} for more information.\n *\n * In the example below if the `ngApp` directive were not placed on the `html` element then the\n * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`\n * would not be resolved to `3`.\n *\n * `ngApp` is the easiest, and most common, way to bootstrap an application.\n *\n \n \n \n I can add: {{a}} + {{b}} = {{ a+b }}\n \n \n \n angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n });\n \n \n *\n * Using `ngStrictDi`, you would see something like this:\n *\n \n \n \n \n I can add: {{a}} + {{b}} = {{ a+b }}\n\n This renders because the controller does not fail to\n instantiate, by using explicit annotation style (see\n script.js for details)\n \n \n\n \n Name: \n Hello, {{name}}!\n\n This renders because the controller does not fail to\n instantiate, by using explicit annotation style\n (see script.js for details)\n \n \n\n \n I can add: {{a}} + {{b}} = {{ a+b }}\n\n The controller could not be instantiated, due to relying\n on automatic function annotations (which are disabled in\n strict mode). As such, the content of this section is not\n interpolated, and there should be an error in your web console.\n \n \n \n \n \n angular.module('ngAppStrictDemo', [])\n // BadController will fail to instantiate, due to relying on automatic function annotation,\n // rather than an explicit annotation\n .controller('BadController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n })\n // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,\n // due to using explicit annotations using the array style and $inject property, respectively.\n .controller('GoodController1', ['$scope', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n }])\n .controller('GoodController2', GoodController2);\n function GoodController2($scope) {\n $scope.name = \"World\";\n }\n GoodController2.$inject = ['$scope'];\n \n \n div[ng-controller] {\n margin-bottom: 1em;\n -webkit-border-radius: 4px;\n border-radius: 4px;\n border: 1px solid;\n padding: .5em;\n }\n div[ng-controller^=Good] {\n border-color: #d6e9c6;\n background-color: #dff0d8;\n color: #3c763d;\n }\n div[ng-controller^=Bad] {\n border-color: #ebccd1;\n background-color: #f2dede;\n color: #a94442;\n margin-bottom: 0;\n }\n \n \n */\nfunction angularInit(element, bootstrap) {\n var appElement,\n module,\n config = {};\n\n // The element `element` has priority over any other element\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n\n if (!appElement && element.hasAttribute && element.hasAttribute(name)) {\n appElement = element;\n module = element.getAttribute(name);\n }\n });\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n var candidate;\n\n if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\\\:') + ']'))) {\n appElement = candidate;\n module = candidate.getAttribute(name);\n }\n });\n if (appElement) {\n config.strictDi = getNgAttribute(appElement, \"strict-di\") !== null;\n bootstrap(appElement, module ? [module] : [], config);\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.bootstrap\n * @module ng\n * @description\n * Use this function to manually start up angular application.\n *\n * See: {@link guide/bootstrap Bootstrap}\n *\n * Note that Protractor based end-to-end tests cannot use this function to bootstrap manually.\n * They must use {@link ng.directive:ngApp ngApp}.\n *\n * Angular will detect if it has been loaded into the browser more than once and only allow the\n * first loaded script to be bootstrapped and will report a warning to the browser console for\n * each of the subsequent scripts. This prevents strange results in applications, where otherwise\n * multiple instances of Angular try to work on the DOM.\n *\n * ```html\n * \n * \n * \n * \n * {{greeting}}\n * \n *\n * \n * \n * \n * \n * ```\n *\n * @param {DOMElement} element DOM element which is the root of angular application.\n * @param {Array=} modules an array of modules to load into the application.\n * Each item in the array should be the name of a predefined module or a (DI annotated)\n * function that will be invoked by the injector as a run block.\n * See: {@link angular.module modules}\n * @param {Object=} config an object for defining configuration options for the application. The\n * following keys are supported:\n *\n * - `strictDi`: disable automatic function annotation for the application. This is meant to\n * assist in finding bugs which break minified code.\n *\n * @returns {auto.$injector} Returns the newly created injector for this app.\n */\nfunction bootstrap(element, modules, config) {\n if (!isObject(config)) config = {};\n var defaultConfig = {\n strictDi: false\n };\n config = extend(defaultConfig, config);\n var doBootstrap = function() {\n element = jqLite(element);\n\n if (element.injector()) {\n var tag = (element[0] === document) ? 'document' : startingTag(element);\n //Encode angle brackets to prevent input from being sanitized to empty string #8683\n throw ngMinErr(\n 'btstrpd',\n \"App Already Bootstrapped with this Element '{0}'\",\n tag.replace(/,'<').replace(/>/,'>'));\n }\n\n modules = modules || [];\n modules.unshift(['$provide', function($provide) {\n $provide.value('$rootElement', element);\n }]);\n\n if (config.debugInfoEnabled) {\n // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.\n modules.push(['$compileProvider', function($compileProvider) {\n $compileProvider.debugInfoEnabled(true);\n }]);\n }\n\n modules.unshift('ng');\n var injector = createInjector(modules, config.strictDi);\n injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',\n function bootstrapApply(scope, element, compile, injector) {\n scope.$apply(function() {\n element.data('$injector', injector);\n compile(element)(scope);\n });\n }]\n );\n return injector;\n };\n\n var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;\n var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\n if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {\n config.debugInfoEnabled = true;\n window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');\n }\n\n if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n return doBootstrap();\n }\n\n window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n angular.resumeBootstrap = function(extraModules) {\n forEach(extraModules, function(module) {\n modules.push(module);\n });\n doBootstrap();\n };\n}\n\n/**\n * @ngdoc function\n * @name angular.reloadWithDebugInfo\n * @module ng\n * @description\n * Use this function to reload the current application with debug information turned on.\n * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.\n *\n * See {@link ng.$compileProvider#debugInfoEnabled} for more.\n */\nfunction reloadWithDebugInfo() {\n window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;\n window.location.reload();\n}\n\n/**\n * @name angular.getTestability\n * @module ng\n * @description\n * Get the testability service for the instance of Angular on the given\n * element.\n * @param {DOMElement} element DOM element which is the root of angular application.\n */\nfunction getTestability(rootElement) {\n return angular.element(rootElement).injector().get('$$testability');\n}\n\nvar SNAKE_CASE_REGEXP = /[A-Z]/g;\nfunction snake_case(name, separator) {\n separator = separator || '_';\n return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n return (pos ? separator : '') + letter.toLowerCase();\n });\n}\n\nvar bindJQueryFired = false;\nvar skipDestroyOnNextJQueryCleanData;\nfunction bindJQuery() {\n var originalCleanData;\n\n if (bindJQueryFired) {\n return;\n }\n\n // bind to jQuery if present;\n jQuery = window.jQuery;\n // Use jQuery if it exists with proper functionality, otherwise default to us.\n // Angular 1.2+ requires jQuery 1.7+ for on()/off() support.\n // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older\n // versions. It will not work for sure with jQuery <1.7, though.\n if (jQuery && jQuery.fn.on) {\n jqLite = jQuery;\n extend(jQuery.fn, {\n scope: JQLitePrototype.scope,\n isolateScope: JQLitePrototype.isolateScope,\n controller: JQLitePrototype.controller,\n injector: JQLitePrototype.injector,\n inheritedData: JQLitePrototype.inheritedData\n });\n\n // All nodes removed from the DOM via various jQuery APIs like .remove()\n // are passed through jQuery.cleanData. Monkey-patch this method to fire\n // the $destroy event on all removed nodes.\n originalCleanData = jQuery.cleanData;\n jQuery.cleanData = function(elems) {\n var events;\n if (!skipDestroyOnNextJQueryCleanData) {\n for (var i = 0, elem; (elem = elems[i]) != null; i++) {\n events = jQuery._data(elem, \"events\");\n if (events && events.$destroy) {\n jQuery(elem).triggerHandler('$destroy');\n }\n }\n } else {\n skipDestroyOnNextJQueryCleanData = false;\n }\n originalCleanData(elems);\n };\n } else {\n jqLite = JQLite;\n }\n\n angular.element = jqLite;\n\n // Prevent double-proxying.\n bindJQueryFired = true;\n}\n\n/**\n * throw error if the argument is falsy.\n */\nfunction assertArg(arg, name, reason) {\n if (!arg) {\n throw ngMinErr('areq', \"Argument '{0}' is {1}\", (name || '?'), (reason || \"required\"));\n }\n return arg;\n}\n\nfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n if (acceptArrayAnnotation && isArray(arg)) {\n arg = arg[arg.length - 1];\n }\n\n assertArg(isFunction(arg), name, 'not a function, got ' +\n (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));\n return arg;\n}\n\n/**\n * throw error if the name given is hasOwnProperty\n * @param {String} name the name to test\n * @param {String} context the context in which the name is used, such as module or directive\n */\nfunction assertNotHasOwnProperty(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', \"hasOwnProperty is not a valid {0} name\", context);\n }\n}\n\n/**\n * Return the value accessible from the object by path. Any undefined traversals are ignored\n * @param {Object} obj starting object\n * @param {String} path path to traverse\n * @param {boolean} [bindFnToScope=true]\n * @returns {Object} value as accessible by path\n */\n//TODO(misko): this function needs to be removed\nfunction getter(obj, path, bindFnToScope) {\n if (!path) return obj;\n var keys = path.split('.');\n var key;\n var lastInstance = obj;\n var len = keys.length;\n\n for (var i = 0; i < len; i++) {\n key = keys[i];\n if (obj) {\n obj = (lastInstance = obj)[key];\n }\n }\n if (!bindFnToScope && isFunction(obj)) {\n return bind(lastInstance, obj);\n }\n return obj;\n}\n\n/**\n * Return the DOM siblings between the first and last node in the given array.\n * @param {Array} array like object\n * @returns {jqLite} jqLite collection containing the nodes\n */\nfunction getBlockNodes(nodes) {\n // TODO(perf): just check if all items in `nodes` are siblings and if they are return the original\n // collection, otherwise update the original collection.\n var node = nodes[0];\n var endNode = nodes[nodes.length - 1];\n var blockNodes = [node];\n\n do {\n node = node.nextSibling;\n if (!node) break;\n blockNodes.push(node);\n } while (node !== endNode);\n\n return jqLite(blockNodes);\n}\n\n\n/**\n * Creates a new object without a prototype. This object is useful for lookup without having to\n * guard against prototypically inherited properties via hasOwnProperty.\n *\n * Related micro-benchmarks:\n * - http://jsperf.com/object-create2\n * - http://jsperf.com/proto-map-lookup/2\n * - http://jsperf.com/for-in-vs-object-keys2\n *\n * @returns {Object}\n */\nfunction createMap() {\n return Object.create(null);\n}\n\n/**\n * @ngdoc type\n * @name angular.Module\n * @module ng\n * @description\n *\n * Interface for configuring angular {@link angular.module modules}.\n */\n\nfunction setupModuleLoader(window) {\n\n var $injectorMinErr = minErr('$injector');\n var ngMinErr = minErr('ng');\n\n function ensure(obj, name, factory) {\n return obj[name] || (obj[name] = factory());\n }\n\n var angular = ensure(window, 'angular', Object);\n\n // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n angular.$$minErr = angular.$$minErr || minErr;\n\n return ensure(angular, 'module', function() {\n /** @type {Object.} */\n var modules = {};\n\n /**\n * @ngdoc function\n * @name angular.module\n * @module ng\n * @description\n *\n * The `angular.module` is a global place for creating, registering and retrieving Angular\n * modules.\n * All modules (angular core or 3rd party) that should be available to an application must be\n * registered using this mechanism.\n *\n * When passed two or more arguments, a new module is created. If passed only one argument, an\n * existing module (the name passed as the first argument to `module`) is retrieved.\n *\n *\n * # Module\n *\n * A module is a collection of services, directives, controllers, filters, and configuration information.\n * `angular.module` is used to configure the {@link auto.$injector $injector}.\n *\n * ```js\n * // Create a new module\n * var myModule = angular.module('myModule', []);\n *\n * // register a new service\n * myModule.value('appName', 'MyCoolApp');\n *\n * // configure existing services inside initialization blocks.\n * myModule.config(['$locationProvider', function($locationProvider) {\n * // Configure existing providers\n * $locationProvider.hashPrefix('!');\n * }]);\n * ```\n *\n * Then you can create an injector and load your modules like this:\n *\n * ```js\n * var injector = angular.injector(['ng', 'myModule'])\n * ```\n *\n * However it's more likely that you'll just use\n * {@link ng.directive:ngApp ngApp} or\n * {@link angular.bootstrap} to simplify this process for you.\n *\n * @param {!string} name The name of the module to create or retrieve.\n * @param {!Array.=} requires If specified then new module is being created. If\n * unspecified then the module is being retrieved for further configuration.\n * @param {Function=} configFn Optional configuration function for the module. Same as\n * {@link angular.Module#config Module#config()}.\n * @returns {module} new module with the {@link angular.Module} api.\n */\n return function module(name, requires, configFn) {\n var assertNotHasOwnProperty = function(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n }\n };\n\n assertNotHasOwnProperty(name, 'module');\n if (requires && modules.hasOwnProperty(name)) {\n modules[name] = null;\n }\n return ensure(modules, name, function() {\n if (!requires) {\n throw $injectorMinErr('nomod', \"Module '{0}' is not available! You either misspelled \" +\n \"the module name or forgot to load it. If registering a module ensure that you \" +\n \"specify the dependencies as the second argument.\", name);\n }\n\n /** @type {!Array.>} */\n var invokeQueue = [];\n\n /** @type {!Array.} */\n var configBlocks = [];\n\n /** @type {!Array.} */\n var runBlocks = [];\n\n var config = invokeLater('$injector', 'invoke', 'push', configBlocks);\n\n /** @type {angular.Module} */\n var moduleInstance = {\n // Private state\n _invokeQueue: invokeQueue,\n _configBlocks: configBlocks,\n _runBlocks: runBlocks,\n\n /**\n * @ngdoc property\n * @name angular.Module#requires\n * @module ng\n *\n * @description\n * Holds the list of modules which the injector will load before the current module is\n * loaded.\n */\n requires: requires,\n\n /**\n * @ngdoc property\n * @name angular.Module#name\n * @module ng\n *\n * @description\n * Name of the module.\n */\n name: name,\n\n\n /**\n * @ngdoc method\n * @name angular.Module#provider\n * @module ng\n * @param {string} name service name\n * @param {Function} providerType Construction function for creating new instance of the\n * service.\n * @description\n * See {@link auto.$provide#provider $provide.provider()}.\n */\n provider: invokeLater('$provide', 'provider'),\n\n /**\n * @ngdoc method\n * @name angular.Module#factory\n * @module ng\n * @param {string} name service name\n * @param {Function} providerFunction Function for creating new instance of the service.\n * @description\n * See {@link auto.$provide#factory $provide.factory()}.\n */\n factory: invokeLater('$provide', 'factory'),\n\n /**\n * @ngdoc method\n * @name angular.Module#service\n * @module ng\n * @param {string} name service name\n * @param {Function} constructor A constructor function that will be instantiated.\n * @description\n * See {@link auto.$provide#service $provide.service()}.\n */\n service: invokeLater('$provide', 'service'),\n\n /**\n * @ngdoc method\n * @name angular.Module#value\n * @module ng\n * @param {string} name service name\n * @param {*} object Service instance object.\n * @description\n * See {@link auto.$provide#value $provide.value()}.\n */\n value: invokeLater('$provide', 'value'),\n\n /**\n * @ngdoc method\n * @name angular.Module#constant\n * @module ng\n * @param {string} name constant name\n * @param {*} object Constant value.\n * @description\n * Because the constant are fixed, they get applied before other provide methods.\n * See {@link auto.$provide#constant $provide.constant()}.\n */\n constant: invokeLater('$provide', 'constant', 'unshift'),\n\n /**\n * @ngdoc method\n * @name angular.Module#animation\n * @module ng\n * @param {string} name animation name\n * @param {Function} animationFactory Factory function for creating new instance of an\n * animation.\n * @description\n *\n * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n *\n *\n * Defines an animation hook that can be later used with\n * {@link ngAnimate.$animate $animate} service and directives that use this service.\n *\n * ```js\n * module.animation('.animation-name', function($inject1, $inject2) {\n * return {\n * eventName : function(element, done) {\n * //code to run the animation\n * //once complete, then run done()\n * return function cancellationFunction(element) {\n * //code to cancel the animation\n * }\n * }\n * }\n * })\n * ```\n *\n * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and\n * {@link ngAnimate ngAnimate module} for more information.\n */\n animation: invokeLater('$animateProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#filter\n * @module ng\n * @param {string} name Filter name.\n * @param {Function} filterFactory Factory function for creating new instance of filter.\n * @description\n * See {@link ng.$filterProvider#register $filterProvider.register()}.\n */\n filter: invokeLater('$filterProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#controller\n * @module ng\n * @param {string|Object} name Controller name, or an object map of controllers where the\n * keys are the names and the values are the constructors.\n * @param {Function} constructor Controller constructor function.\n * @description\n * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n */\n controller: invokeLater('$controllerProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#directive\n * @module ng\n * @param {string|Object} name Directive name, or an object map of directives where the\n * keys are the names and the values are the factories.\n * @param {Function} directiveFactory Factory function for creating new instance of\n * directives.\n * @description\n * See {@link ng.$compileProvider#directive $compileProvider.directive()}.\n */\n directive: invokeLater('$compileProvider', 'directive'),\n\n /**\n * @ngdoc method\n * @name angular.Module#config\n * @module ng\n * @param {Function} configFn Execute this function on module load. Useful for service\n * configuration.\n * @description\n * Use this method to register work which needs to be performed on module loading.\n * For more about how to configure services, see\n * {@link providers#providers_provider-recipe Provider Recipe}.\n */\n config: config,\n\n /**\n * @ngdoc method\n * @name angular.Module#run\n * @module ng\n * @param {Function} initializationFn Execute this function after injector creation.\n * Useful for application initialization.\n * @description\n * Use this method to register work which should be performed when the injector is done\n * loading all modules.\n */\n run: function(block) {\n runBlocks.push(block);\n return this;\n }\n };\n\n if (configFn) {\n config(configFn);\n }\n\n return moduleInstance;\n\n /**\n * @param {string} provider\n * @param {string} method\n * @param {String=} insertMethod\n * @returns {angular.Module}\n */\n function invokeLater(provider, method, insertMethod, queue) {\n if (!queue) queue = invokeQueue;\n return function() {\n queue[insertMethod || 'push']([provider, method, arguments]);\n return moduleInstance;\n };\n }\n });\n };\n });\n\n}\n\n/* global angularModule: true,\n version: true,\n\n $LocaleProvider,\n $CompileProvider,\n\n htmlAnchorDirective,\n inputDirective,\n inputDirective,\n formDirective,\n scriptDirective,\n selectDirective,\n styleDirective,\n optionDirective,\n ngBindDirective,\n ngBindHtmlDirective,\n ngBindTemplateDirective,\n ngClassDirective,\n ngClassEvenDirective,\n ngClassOddDirective,\n ngCspDirective,\n ngCloakDirective,\n ngControllerDirective,\n ngFormDirective,\n ngHideDirective,\n ngIfDirective,\n ngIncludeDirective,\n ngIncludeFillContentDirective,\n ngInitDirective,\n ngNonBindableDirective,\n ngPluralizeDirective,\n ngRepeatDirective,\n ngShowDirective,\n ngStyleDirective,\n ngSwitchDirective,\n ngSwitchWhenDirective,\n ngSwitchDefaultDirective,\n ngOptionsDirective,\n ngTranscludeDirective,\n ngModelDirective,\n ngListDirective,\n ngChangeDirective,\n patternDirective,\n patternDirective,\n requiredDirective,\n requiredDirective,\n minlengthDirective,\n minlengthDirective,\n maxlengthDirective,\n maxlengthDirective,\n ngValueDirective,\n ngModelOptionsDirective,\n ngAttributeAliasDirectives,\n ngEventDirectives,\n\n $AnchorScrollProvider,\n $AnimateProvider,\n $BrowserProvider,\n $CacheFactoryProvider,\n $ControllerProvider,\n $DocumentProvider,\n $ExceptionHandlerProvider,\n $FilterProvider,\n $InterpolateProvider,\n $IntervalProvider,\n $HttpProvider,\n $HttpBackendProvider,\n $LocationProvider,\n $LogProvider,\n $ParseProvider,\n $RootScopeProvider,\n $QProvider,\n $$QProvider,\n $$SanitizeUriProvider,\n $SceProvider,\n $SceDelegateProvider,\n $SnifferProvider,\n $TemplateCacheProvider,\n $TemplateRequestProvider,\n $$TestabilityProvider,\n $TimeoutProvider,\n $$RAFProvider,\n $$AsyncCallbackProvider,\n $WindowProvider\n*/\n\n\n/**\n * @ngdoc object\n * @name angular.version\n * @module ng\n * @description\n * An object that contains information about the current AngularJS version. This object has the\n * following properties:\n *\n * - `full` – `{string}` – Full version string, such as \"0.9.18\".\n * - `major` – `{number}` – Major version number, such as \"0\".\n * - `minor` – `{number}` – Minor version number, such as \"9\".\n * - `dot` – `{number}` – Dot version number, such as \"18\".\n * - `codeName` – `{string}` – Code name of the release, such as \"jiggling-armfat\".\n */\nvar version = {\n full: '1.3.0-rc.3', // all of these placeholder strings will be replaced by grunt's\n major: 1, // package task\n minor: 3,\n dot: 0,\n codeName: 'aggressive-pacifism'\n};\n\n\nfunction publishExternalAPI(angular){\n extend(angular, {\n 'bootstrap': bootstrap,\n 'copy': copy,\n 'extend': extend,\n 'equals': equals,\n 'element': jqLite,\n 'forEach': forEach,\n 'injector': createInjector,\n 'noop': noop,\n 'bind': bind,\n 'toJson': toJson,\n 'fromJson': fromJson,\n 'identity': identity,\n 'isUndefined': isUndefined,\n 'isDefined': isDefined,\n 'isString': isString,\n 'isFunction': isFunction,\n 'isObject': isObject,\n 'isNumber': isNumber,\n 'isElement': isElement,\n 'isArray': isArray,\n 'version': version,\n 'isDate': isDate,\n 'lowercase': lowercase,\n 'uppercase': uppercase,\n 'callbacks': {counter: 0},\n 'getTestability': getTestability,\n '$$minErr': minErr,\n '$$csp': csp,\n 'reloadWithDebugInfo': reloadWithDebugInfo,\n '$$hasClass': jqLiteHasClass\n });\n\n angularModule = setupModuleLoader(window);\n try {\n angularModule('ngLocale');\n } catch (e) {\n angularModule('ngLocale', []).provider('$locale', $LocaleProvider);\n }\n\n angularModule('ng', ['ngLocale'], ['$provide',\n function ngModule($provide) {\n // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n $provide.provider({\n $$sanitizeUri: $$SanitizeUriProvider\n });\n $provide.provider('$compile', $CompileProvider).\n directive({\n a: htmlAnchorDirective,\n input: inputDirective,\n textarea: inputDirective,\n form: formDirective,\n script: scriptDirective,\n select: selectDirective,\n style: styleDirective,\n option: optionDirective,\n ngBind: ngBindDirective,\n ngBindHtml: ngBindHtmlDirective,\n ngBindTemplate: ngBindTemplateDirective,\n ngClass: ngClassDirective,\n ngClassEven: ngClassEvenDirective,\n ngClassOdd: ngClassOddDirective,\n ngCloak: ngCloakDirective,\n ngController: ngControllerDirective,\n ngForm: ngFormDirective,\n ngHide: ngHideDirective,\n ngIf: ngIfDirective,\n ngInclude: ngIncludeDirective,\n ngInit: ngInitDirective,\n ngNonBindable: ngNonBindableDirective,\n ngPluralize: ngPluralizeDirective,\n ngRepeat: ngRepeatDirective,\n ngShow: ngShowDirective,\n ngStyle: ngStyleDirective,\n ngSwitch: ngSwitchDirective,\n ngSwitchWhen: ngSwitchWhenDirective,\n ngSwitchDefault: ngSwitchDefaultDirective,\n ngOptions: ngOptionsDirective,\n ngTransclude: ngTranscludeDirective,\n ngModel: ngModelDirective,\n ngList: ngListDirective,\n ngChange: ngChangeDirective,\n pattern: patternDirective,\n ngPattern: patternDirective,\n required: requiredDirective,\n ngRequired: requiredDirective,\n minlength: minlengthDirective,\n ngMinlength: minlengthDirective,\n maxlength: maxlengthDirective,\n ngMaxlength: maxlengthDirective,\n ngValue: ngValueDirective,\n ngModelOptions: ngModelOptionsDirective\n }).\n directive({\n ngInclude: ngIncludeFillContentDirective\n }).\n directive(ngAttributeAliasDirectives).\n directive(ngEventDirectives);\n $provide.provider({\n $anchorScroll: $AnchorScrollProvider,\n $animate: $AnimateProvider,\n $browser: $BrowserProvider,\n $cacheFactory: $CacheFactoryProvider,\n $controller: $ControllerProvider,\n $document: $DocumentProvider,\n $exceptionHandler: $ExceptionHandlerProvider,\n $filter: $FilterProvider,\n $interpolate: $InterpolateProvider,\n $interval: $IntervalProvider,\n $http: $HttpProvider,\n $httpBackend: $HttpBackendProvider,\n $location: $LocationProvider,\n $log: $LogProvider,\n $parse: $ParseProvider,\n $rootScope: $RootScopeProvider,\n $q: $QProvider,\n $$q: $$QProvider,\n $sce: $SceProvider,\n $sceDelegate: $SceDelegateProvider,\n $sniffer: $SnifferProvider,\n $templateCache: $TemplateCacheProvider,\n $templateRequest: $TemplateRequestProvider,\n $$testability: $$TestabilityProvider,\n $timeout: $TimeoutProvider,\n $window: $WindowProvider,\n $$rAF: $$RAFProvider,\n $$asyncCallback : $$AsyncCallbackProvider\n });\n }\n ]);\n}\n\n/* global JQLitePrototype: true,\n addEventListenerFn: true,\n removeEventListenerFn: true,\n BOOLEAN_ATTR: true,\n ALIASED_ATTR: true,\n*/\n\n//////////////////////////////////\n//JQLite\n//////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.element\n * @module ng\n * @kind function\n *\n * @description\n * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n *\n * If jQuery is available, `angular.element` is an alias for the\n * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n * delegates to Angular's built-in subset of jQuery, called \"jQuery lite\" or \"jqLite.\"\n *\n * jqLite is a tiny, API-compatible subset of jQuery that allows\n * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most\n * commonly needed functionality with the goal of having a very small footprint.\n *\n * To use jQuery, simply load it before `DOMContentLoaded` event fired.\n *\n * **Note:** all element references in Angular are always wrapped with jQuery or\n * jqLite; they are never raw DOM references.\n *\n * ## Angular's jqLite\n * jqLite provides only the following jQuery methods:\n *\n * - [`addClass()`](http://api.jquery.com/addClass/)\n * - [`after()`](http://api.jquery.com/after/)\n * - [`append()`](http://api.jquery.com/append/)\n * - [`attr()`](http://api.jquery.com/attr/)\n * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData\n * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n * - [`clone()`](http://api.jquery.com/clone/)\n * - [`contents()`](http://api.jquery.com/contents/)\n * - [`css()`](http://api.jquery.com/css/)\n * - [`data()`](http://api.jquery.com/data/)\n * - [`detach()`](http://api.jquery.com/detach/)\n * - [`empty()`](http://api.jquery.com/empty/)\n * - [`eq()`](http://api.jquery.com/eq/)\n * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n * - [`hasClass()`](http://api.jquery.com/hasClass/)\n * - [`html()`](http://api.jquery.com/html/)\n * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors\n * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n * - [`prepend()`](http://api.jquery.com/prepend/)\n * - [`prop()`](http://api.jquery.com/prop/)\n * - [`ready()`](http://api.jquery.com/ready/)\n * - [`remove()`](http://api.jquery.com/remove/)\n * - [`removeAttr()`](http://api.jquery.com/removeAttr/)\n * - [`removeClass()`](http://api.jquery.com/removeClass/)\n * - [`removeData()`](http://api.jquery.com/removeData/)\n * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n * - [`text()`](http://api.jquery.com/text/)\n * - [`toggleClass()`](http://api.jquery.com/toggleClass/)\n * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.\n * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces\n * - [`val()`](http://api.jquery.com/val/)\n * - [`wrap()`](http://api.jquery.com/wrap/)\n *\n * ## jQuery/jqLite Extras\n * Angular also provides the following additional methods and events to both jQuery and jqLite:\n *\n * ### Events\n * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM\n * element before it is removed.\n *\n * ### Methods\n * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n * retrieves controller associated with the `ngController` directive. If `name` is provided as\n * camelCase directive name, then the controller for this directive will be retrieved (e.g.\n * `'ngModel'`).\n * - `injector()` - retrieves the injector of the current element or its parent.\n * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current\n * element or its parent.\n * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the\n * current element. This getter should be used only on elements that contain a directive which starts a new isolate\n * scope. Calling `scope()` on this element always returns the original non-isolate scope.\n * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n * parent element is reached.\n *\n * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n * @returns {Object} jQuery object.\n */\n\nJQLite.expando = 'ng339';\n\nvar jqCache = JQLite.cache = {},\n jqId = 1,\n addEventListenerFn = function(element, type, fn) {\n element.addEventListener(type, fn, false);\n },\n removeEventListenerFn = function(element, type, fn) {\n element.removeEventListener(type, fn, false);\n };\n\n/*\n * !!! This is an undocumented \"private\" function !!!\n */\nJQLite._data = function(node) {\n //jQuery always returns an object on cache miss\n return this.cache[node[this.expando]] || {};\n};\n\nfunction jqNextId() { return ++jqId; }\n\n\nvar SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\nvar MOZ_HACK_REGEXP = /^moz([A-Z])/;\nvar MOUSE_EVENT_MAP= { mouseleave : \"mouseout\", mouseenter : \"mouseover\"};\nvar jqLiteMinErr = minErr('jqLite');\n\n/**\n * Converts snake_case to camelCase.\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction camelCase(name) {\n return name.\n replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n return offset ? letter.toUpperCase() : letter;\n }).\n replace(MOZ_HACK_REGEXP, 'Moz$1');\n}\n\nvar SINGLE_TAG_REGEXP = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/;\nvar HTML_REGEXP = /<|?\\w+;/;\nvar TAG_NAME_REGEXP = /<([\\w:]+)/;\nvar XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi;\n\nvar wrapMap = {\n 'option': [1, '', ''],\n\n 'thead': [1, '', ''],\n 'col': [2, '', ''],\n 'tr': [2, '', ''],\n 'td': [3, '', ''],\n '_default': [0, \"\", \"\"]\n};\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction jqLiteIsTextNode(html) {\n return !HTML_REGEXP.test(html);\n}\n\nfunction jqLiteAcceptsData(node) {\n // The window object can accept data but has no nodeType\n // Otherwise we are only interested in elements (1) and documents (9)\n var nodeType = node.nodeType;\n return nodeType === 1 || !nodeType || nodeType === 9;\n}\n\nfunction jqLiteBuildFragment(html, context) {\n var tmp, tag, wrap,\n fragment = context.createDocumentFragment(),\n nodes = [], i;\n\n if (jqLiteIsTextNode(html)) {\n // Convert non-html into a text node\n nodes.push(context.createTextNode(html));\n } else {\n // Convert html into DOM nodes\n tmp = tmp || fragment.appendChild(context.createElement(\"div\"));\n tag = (TAG_NAME_REGEXP.exec(html) || [\"\", \"\"])[1].toLowerCase();\n wrap = wrapMap[tag] || wrapMap._default;\n tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, \"<$1>$2>\") + wrap[2];\n\n // Descend through wrappers to the right content\n i = wrap[0];\n while (i--) {\n tmp = tmp.lastChild;\n }\n\n nodes = concat(nodes, tmp.childNodes);\n\n tmp = fragment.firstChild;\n tmp.textContent = \"\";\n }\n\n // Remove wrapper from fragment\n fragment.textContent = \"\";\n fragment.innerHTML = \"\"; // Clear inner HTML\n forEach(nodes, function(node) {\n fragment.appendChild(node);\n });\n\n return fragment;\n}\n\nfunction jqLiteParseHTML(html, context) {\n context = context || document;\n var parsed;\n\n if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {\n return [context.createElement(parsed[1])];\n }\n\n if ((parsed = jqLiteBuildFragment(html, context))) {\n return parsed.childNodes;\n }\n\n return [];\n}\n\n/////////////////////////////////////////////\nfunction JQLite(element) {\n if (element instanceof JQLite) {\n return element;\n }\n\n var argIsString;\n\n if (isString(element)) {\n element = trim(element);\n argIsString = true;\n }\n if (!(this instanceof JQLite)) {\n if (argIsString && element.charAt(0) != '<') {\n throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n }\n return new JQLite(element);\n }\n\n if (argIsString) {\n jqLiteAddNodes(this, jqLiteParseHTML(element));\n } else {\n jqLiteAddNodes(this, element);\n }\n}\n\nfunction jqLiteClone(element) {\n return element.cloneNode(true);\n}\n\nfunction jqLiteDealoc(element, onlyDescendants){\n if (!onlyDescendants) jqLiteRemoveData(element);\n\n if (element.querySelectorAll) {\n var descendants = element.querySelectorAll('*');\n for (var i = 0, l = descendants.length; i < l; i++) {\n jqLiteRemoveData(descendants[i]);\n }\n }\n}\n\nfunction jqLiteOff(element, type, fn, unsupported) {\n if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var handle = expandoStore && expandoStore.handle;\n\n if (!handle) return; //no listeners registered\n\n if (!type) {\n for (type in events) {\n if (type !== '$destroy') {\n removeEventListenerFn(element, type, events[type]);\n }\n delete events[type];\n }\n } else {\n forEach(type.split(' '), function(type) {\n if (isUndefined(fn)) {\n removeEventListenerFn(element, type, events[type]);\n delete events[type];\n } else {\n arrayRemove(events[type] || [], fn);\n }\n });\n }\n}\n\nfunction jqLiteRemoveData(element, name) {\n var expandoId = element.ng339;\n var expandoStore = expandoId && jqCache[expandoId];\n\n if (expandoStore) {\n if (name) {\n delete expandoStore.data[name];\n return;\n }\n\n if (expandoStore.handle) {\n if (expandoStore.events.$destroy) {\n expandoStore.handle({}, '$destroy');\n }\n jqLiteOff(element);\n }\n delete jqCache[expandoId];\n element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it\n }\n}\n\n\nfunction jqLiteExpandoStore(element, createIfNecessary) {\n var expandoId = element.ng339,\n expandoStore = expandoId && jqCache[expandoId];\n\n if (createIfNecessary && !expandoStore) {\n element.ng339 = expandoId = jqNextId();\n expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};\n }\n\n return expandoStore;\n}\n\n\nfunction jqLiteData(element, key, value) {\n if (jqLiteAcceptsData(element)) {\n\n var isSimpleSetter = isDefined(value);\n var isSimpleGetter = !isSimpleSetter && key && !isObject(key);\n var massGetter = !key;\n var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);\n var data = expandoStore && expandoStore.data;\n\n if (isSimpleSetter) { // data('key', value)\n data[key] = value;\n } else {\n if (massGetter) { // data()\n return data;\n } else {\n if (isSimpleGetter) { // data('key')\n // don't force creation of expandoStore if it doesn't exist yet\n return data && data[key];\n } else { // mass-setter: data({key1: val1, key2: val2})\n extend(data, key);\n }\n }\n }\n }\n}\n\nfunction jqLiteHasClass(element, selector) {\n if (!element.getAttribute) return false;\n return ((\" \" + (element.getAttribute('class') || '') + \" \").replace(/[\\n\\t]/g, \" \").\n indexOf( \" \" + selector + \" \" ) > -1);\n}\n\nfunction jqLiteRemoveClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n forEach(cssClasses.split(' '), function(cssClass) {\n element.setAttribute('class', trim(\n (\" \" + (element.getAttribute('class') || '') + \" \")\n .replace(/[\\n\\t]/g, \" \")\n .replace(\" \" + trim(cssClass) + \" \", \" \"))\n );\n });\n }\n}\n\nfunction jqLiteAddClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n .replace(/[\\n\\t]/g, \" \");\n\n forEach(cssClasses.split(' '), function(cssClass) {\n cssClass = trim(cssClass);\n if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n existingClasses += cssClass + ' ';\n }\n });\n\n element.setAttribute('class', trim(existingClasses));\n }\n}\n\n\nfunction jqLiteAddNodes(root, elements) {\n // THIS CODE IS VERY HOT. Don't make changes without benchmarking.\n\n if (elements) {\n\n // if a Node (the most common case)\n if (elements.nodeType) {\n root[root.length++] = elements;\n } else {\n var length = elements.length;\n\n // if an Array or NodeList and not a Window\n if (typeof length === 'number' && elements.window !== elements) {\n if (length) {\n for (var i = 0; i < length; i++) {\n root[root.length++] = elements[i];\n }\n }\n } else {\n root[root.length++] = elements;\n }\n }\n }\n}\n\n\nfunction jqLiteController(element, name) {\n return jqLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');\n}\n\nfunction jqLiteInheritedData(element, name, value) {\n // if element is the document object work with the html element instead\n // this makes $(document).scope() possible\n if(element.nodeType == 9) {\n element = element.documentElement;\n }\n var names = isArray(name) ? name : [name];\n\n while (element) {\n for (var i = 0, ii = names.length; i < ii; i++) {\n if ((value = jqLite.data(element, names[i])) !== undefined) return value;\n }\n\n // If dealing with a document fragment node with a host element, and no parent, use the host\n // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM\n // to lookup parent controllers.\n element = element.parentNode || (element.nodeType === 11 && element.host);\n }\n}\n\nfunction jqLiteEmpty(element) {\n jqLiteDealoc(element, true);\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n}\n\nfunction jqLiteRemove(element, keepData) {\n if (!keepData) jqLiteDealoc(element);\n var parent = element.parentNode;\n if (parent) parent.removeChild(element);\n}\n\n//////////////////////////////////////////\n// Functions which are declared directly.\n//////////////////////////////////////////\nvar JQLitePrototype = JQLite.prototype = {\n ready: function(fn) {\n var fired = false;\n\n function trigger() {\n if (fired) return;\n fired = true;\n fn();\n }\n\n // check if document is already loaded\n if (document.readyState === 'complete'){\n setTimeout(trigger);\n } else {\n this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9\n // we can not use jqLite since we are not done loading and jQuery could be loaded later.\n // jshint -W064\n JQLite(window).on('load', trigger); // fallback to window.onload for others\n // jshint +W064\n this.on('DOMContentLoaded', trigger);\n }\n },\n toString: function() {\n var value = [];\n forEach(this, function(e){ value.push('' + e);});\n return '[' + value.join(', ') + ']';\n },\n\n eq: function(index) {\n return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n },\n\n length: 0,\n push: push,\n sort: [].sort,\n splice: [].splice\n};\n\n//////////////////////////////////////////\n// Functions iterating getter/setters.\n// these functions return self on setter and\n// value on get.\n//////////////////////////////////////////\nvar BOOLEAN_ATTR = {};\nforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n BOOLEAN_ATTR[lowercase(value)] = value;\n});\nvar BOOLEAN_ELEMENTS = {};\nforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n BOOLEAN_ELEMENTS[value] = true;\n});\nvar ALIASED_ATTR = {\n 'ngMinlength' : 'minlength',\n 'ngMaxlength' : 'maxlength',\n 'ngMin' : 'min',\n 'ngMax' : 'max',\n 'ngPattern' : 'pattern'\n};\n\nfunction getBooleanAttrName(element, name) {\n // check dom last since we will most likely fail on name\n var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\n // booleanAttr is here twice to minimize DOM access\n return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;\n}\n\nfunction getAliasedAttrName(element, name) {\n var nodeName = element.nodeName;\n return (nodeName === 'INPUT' || nodeName === 'TEXTAREA') && ALIASED_ATTR[name];\n}\n\nforEach({\n data: jqLiteData,\n removeData: jqLiteRemoveData\n}, function(fn, name) {\n JQLite[name] = fn;\n});\n\nforEach({\n data: jqLiteData,\n inheritedData: jqLiteInheritedData,\n\n scope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n },\n\n isolateScope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');\n },\n\n controller: jqLiteController,\n\n injector: function(element) {\n return jqLiteInheritedData(element, '$injector');\n },\n\n removeAttr: function(element, name) {\n element.removeAttribute(name);\n },\n\n hasClass: jqLiteHasClass,\n\n css: function(element, name, value) {\n name = camelCase(name);\n\n if (isDefined(value)) {\n element.style[name] = value;\n } else {\n return element.style[name];\n }\n },\n\n attr: function(element, name, value){\n var lowercasedName = lowercase(name);\n if (BOOLEAN_ATTR[lowercasedName]) {\n if (isDefined(value)) {\n if (!!value) {\n element[name] = true;\n element.setAttribute(name, lowercasedName);\n } else {\n element[name] = false;\n element.removeAttribute(lowercasedName);\n }\n } else {\n return (element[name] ||\n (element.attributes.getNamedItem(name)|| noop).specified)\n ? lowercasedName\n : undefined;\n }\n } else if (isDefined(value)) {\n element.setAttribute(name, value);\n } else if (element.getAttribute) {\n // the extra argument \"2\" is to get the right thing for a.href in IE, see jQuery code\n // some elements (e.g. Document) don't have get attribute, so return undefined\n var ret = element.getAttribute(name, 2);\n // normalize non-existing attributes to undefined (as jQuery)\n return ret === null ? undefined : ret;\n }\n },\n\n prop: function(element, name, value) {\n if (isDefined(value)) {\n element[name] = value;\n } else {\n return element[name];\n }\n },\n\n text: (function() {\n getText.$dv = '';\n return getText;\n\n function getText(element, value) {\n if (isUndefined(value)) {\n var nodeType = element.nodeType;\n return (nodeType === 1 || nodeType === 3) ? element.textContent : '';\n }\n element.textContent = value;\n }\n })(),\n\n val: function(element, value) {\n if (isUndefined(value)) {\n if (element.multiple && nodeName_(element) === 'select') {\n var result = [];\n forEach(element.options, function (option) {\n if (option.selected) {\n result.push(option.value || option.text);\n }\n });\n return result.length === 0 ? null : result;\n }\n return element.value;\n }\n element.value = value;\n },\n\n html: function(element, value) {\n if (isUndefined(value)) {\n return element.innerHTML;\n }\n jqLiteDealoc(element, true);\n element.innerHTML = value;\n },\n\n empty: jqLiteEmpty\n}, function(fn, name){\n /**\n * Properties: writes return selection, reads return first value\n */\n JQLite.prototype[name] = function(arg1, arg2) {\n var i, key;\n var nodeCount = this.length;\n\n // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n // in a way that survives minification.\n // jqLiteEmpty takes no arguments but is a setter.\n if (fn !== jqLiteEmpty &&\n (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) {\n if (isObject(arg1)) {\n\n // we are a write, but the object properties are the key/values\n for (i = 0; i < nodeCount; i++) {\n if (fn === jqLiteData) {\n // data() takes the whole object in jQuery\n fn(this[i], arg1);\n } else {\n for (key in arg1) {\n fn(this[i], key, arg1[key]);\n }\n }\n }\n // return self for chaining\n return this;\n } else {\n // we are a read, so read the first child.\n // TODO: do we still need this?\n var value = fn.$dv;\n // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n var jj = (value === undefined) ? Math.min(nodeCount, 1) : nodeCount;\n for (var j = 0; j < jj; j++) {\n var nodeValue = fn(this[j], arg1, arg2);\n value = value ? value + nodeValue : nodeValue;\n }\n return value;\n }\n } else {\n // we are a write, so apply to all children\n for (i = 0; i < nodeCount; i++) {\n fn(this[i], arg1, arg2);\n }\n // return self for chaining\n return this;\n }\n };\n});\n\nfunction createEventHandler(element, events) {\n var eventHandler = function (event, type) {\n // jQuery specific api\n event.isDefaultPrevented = function() {\n return event.defaultPrevented;\n };\n\n var eventFns = events[type || event.type];\n var eventFnsLength = eventFns ? eventFns.length : 0;\n\n if (!eventFnsLength) return;\n\n if (isUndefined(event.immediatePropagationStopped)) {\n var originalStopImmediatePropagation = event.stopImmediatePropagation;\n event.stopImmediatePropagation = function() {\n event.immediatePropagationStopped = true;\n\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n\n if (originalStopImmediatePropagation) {\n originalStopImmediatePropagation.call(event);\n }\n };\n }\n\n event.isImmediatePropagationStopped = function() {\n return event.immediatePropagationStopped === true;\n };\n\n // Copy event handlers in case event handlers array is modified during execution.\n if ((eventFnsLength > 1)) {\n eventFns = shallowCopy(eventFns);\n }\n\n for (var i = 0; i < eventFnsLength; i++) {\n if (!event.isImmediatePropagationStopped()) {\n eventFns[i].call(element, event);\n }\n }\n };\n\n // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all\n // events on `element`\n eventHandler.elem = element;\n return eventHandler;\n}\n\n//////////////////////////////////////////\n// Functions iterating traversal.\n// These functions chain results into a single\n// selector.\n//////////////////////////////////////////\nforEach({\n removeData: jqLiteRemoveData,\n\n on: function jqLiteOn(element, type, fn, unsupported){\n if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\n // Do not add event handlers to non-elements because they will not be cleaned up.\n if (!jqLiteAcceptsData(element)) {\n return;\n }\n\n var expandoStore = jqLiteExpandoStore(element, true);\n var events = expandoStore.events;\n var handle = expandoStore.handle;\n\n if (!handle) {\n handle = expandoStore.handle = createEventHandler(element, events);\n }\n\n // http://jsperf.com/string-indexof-vs-split\n var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];\n var i = types.length;\n\n while (i--) {\n type = types[i];\n var eventFns = events[type];\n\n if (!eventFns) {\n events[type] = [];\n\n if (type === 'mouseenter' || type === 'mouseleave') {\n // Refer to jQuery's implementation of mouseenter & mouseleave\n // Read about mouseenter and mouseleave:\n // http://www.quirksmode.org/js/events_mouse.html#link8\n\n jqLiteOn(element, MOUSE_EVENT_MAP[type], function(event) {\n var target = this, related = event.relatedTarget;\n // For mousenter/leave call the handler if related is outside the target.\n // NB: No relatedTarget if the mouse left/entered the browser window\n if ( !related || (related !== target && !target.contains(related)) ){\n handle(event, type);\n }\n });\n\n } else {\n if (type !== '$destroy') {\n addEventListenerFn(element, type, handle);\n }\n }\n eventFns = events[type];\n }\n eventFns.push(fn);\n }\n },\n\n off: jqLiteOff,\n\n one: function(element, type, fn) {\n element = jqLite(element);\n\n //add the listener twice so that when it is called\n //you can remove the original function and still be\n //able to call element.off(ev, fn) normally\n element.on(type, function onFn() {\n element.off(type, fn);\n element.off(type, onFn);\n });\n element.on(type, fn);\n },\n\n replaceWith: function(element, replaceNode) {\n var index, parent = element.parentNode;\n jqLiteDealoc(element);\n forEach(new JQLite(replaceNode), function(node){\n if (index) {\n parent.insertBefore(node, index.nextSibling);\n } else {\n parent.replaceChild(node, element);\n }\n index = node;\n });\n },\n\n children: function(element) {\n var children = [];\n forEach(element.childNodes, function(element){\n if (element.nodeType === 1)\n children.push(element);\n });\n return children;\n },\n\n contents: function(element) {\n return element.contentDocument || element.childNodes || [];\n },\n\n append: function(element, node) {\n var nodeType = element.nodeType;\n if (nodeType !== 1 && nodeType !== 11) return;\n\n node = new JQLite(node);\n\n for (var i = 0, ii = node.length; i < ii; i++) {\n var child = node[i];\n element.appendChild(child);\n }\n },\n\n prepend: function(element, node) {\n if (element.nodeType === 1) {\n var index = element.firstChild;\n forEach(new JQLite(node), function(child){\n element.insertBefore(child, index);\n });\n }\n },\n\n wrap: function(element, wrapNode) {\n wrapNode = jqLite(wrapNode).eq(0).clone()[0];\n var parent = element.parentNode;\n if (parent) {\n parent.replaceChild(wrapNode, element);\n }\n wrapNode.appendChild(element);\n },\n\n remove: jqLiteRemove,\n\n detach: function(element) {\n jqLiteRemove(element, true);\n },\n\n after: function(element, newElement) {\n var index = element, parent = element.parentNode;\n newElement = new JQLite(newElement);\n\n for (var i = 0, ii = newElement.length; i < ii; i++) {\n var node = newElement[i];\n parent.insertBefore(node, index.nextSibling);\n index = node;\n }\n },\n\n addClass: jqLiteAddClass,\n removeClass: jqLiteRemoveClass,\n\n toggleClass: function(element, selector, condition) {\n if (selector) {\n forEach(selector.split(' '), function(className){\n var classCondition = condition;\n if (isUndefined(classCondition)) {\n classCondition = !jqLiteHasClass(element, className);\n }\n (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);\n });\n }\n },\n\n parent: function(element) {\n var parent = element.parentNode;\n return parent && parent.nodeType !== 11 ? parent : null;\n },\n\n next: function(element) {\n return element.nextElementSibling;\n },\n\n find: function(element, selector) {\n if (element.getElementsByTagName) {\n return element.getElementsByTagName(selector);\n } else {\n return [];\n }\n },\n\n clone: jqLiteClone,\n\n triggerHandler: function(element, event, extraParameters) {\n\n var dummyEvent, eventFnsCopy, handlerArgs;\n var eventName = event.type || event;\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var eventFns = events && events[eventName];\n\n if (eventFns) {\n // Create a dummy event to pass to the handlers\n dummyEvent = {\n preventDefault: function() { this.defaultPrevented = true; },\n isDefaultPrevented: function() { return this.defaultPrevented === true; },\n stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },\n isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },\n stopPropagation: noop,\n type: eventName,\n target: element\n };\n\n // If a custom event was provided then extend our dummy event with it\n if (event.type) {\n dummyEvent = extend(dummyEvent, event);\n }\n\n // Copy event handlers in case event handlers array is modified during execution.\n eventFnsCopy = shallowCopy(eventFns);\n handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];\n\n forEach(eventFnsCopy, function(fn) {\n if (!dummyEvent.isImmediatePropagationStopped()) {\n fn.apply(element, handlerArgs);\n }\n });\n }\n }\n}, function(fn, name){\n /**\n * chaining functions\n */\n JQLite.prototype[name] = function(arg1, arg2, arg3) {\n var value;\n\n for(var i = 0, ii = this.length; i < ii; i++) {\n if (isUndefined(value)) {\n value = fn(this[i], arg1, arg2, arg3);\n if (isDefined(value)) {\n // any function which returns a value needs to be wrapped\n value = jqLite(value);\n }\n } else {\n jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n }\n }\n return isDefined(value) ? value : this;\n };\n\n // bind legacy bind/unbind to on/off\n JQLite.prototype.bind = JQLite.prototype.on;\n JQLite.prototype.unbind = JQLite.prototype.off;\n});\n\n/**\n * Computes a hash of an 'obj'.\n * Hash of a:\n * string is string\n * number is number as string\n * object is either result of calling $$hashKey function on the object or uniquely generated id,\n * that is also assigned to the $$hashKey property of the object.\n *\n * @param obj\n * @returns {string} hash string such that the same input will have the same hash string.\n * The resulting string key is in 'type:hashKey' format.\n */\nfunction hashKey(obj, nextUidFn) {\n var key = obj && obj.$$hashKey;\n\n if (key) {\n if (typeof key === 'function') {\n key = obj.$$hashKey();\n }\n return key;\n }\n\n var objType = typeof obj;\n if (objType == 'function' || (objType == 'object' && obj !== null)) {\n key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();\n } else {\n key = objType + ':' + obj;\n }\n\n return key;\n}\n\n/**\n * HashMap which can use objects as keys\n */\nfunction HashMap(array, isolatedUid) {\n if (isolatedUid) {\n var uid = 0;\n this.nextUid = function() {\n return ++uid;\n };\n }\n forEach(array, this.put, this);\n}\nHashMap.prototype = {\n /**\n * Store key value pair\n * @param key key to store can be any type\n * @param value value to store can be any type\n */\n put: function(key, value) {\n this[hashKey(key, this.nextUid)] = value;\n },\n\n /**\n * @param key\n * @returns {Object} the value for the key\n */\n get: function(key) {\n return this[hashKey(key, this.nextUid)];\n },\n\n /**\n * Remove the key/value pair\n * @param key\n */\n remove: function(key) {\n var value = this[key = hashKey(key, this.nextUid)];\n delete this[key];\n return value;\n }\n};\n\n/**\n * @ngdoc function\n * @module ng\n * @name angular.injector\n * @kind function\n *\n * @description\n * Creates an injector function that can be used for retrieving services as well as for\n * dependency injection (see {@link guide/di dependency injection}).\n *\n\n * @param {Array.} modules A list of module functions or their aliases. See\n * {@link angular.module}. The `ng` module must be explicitly added.\n * @returns {function()} Injector function. See {@link auto.$injector $injector}.\n *\n * @example\n * Typical usage\n * ```js\n * // create an injector\n * var $injector = angular.injector(['ng']);\n *\n * // use the injector to kick off your application\n * // use the type inference to auto inject arguments, or use implicit injection\n * $injector.invoke(function($rootScope, $compile, $document) {\n * $compile($document)($rootScope);\n * $rootScope.$digest();\n * });\n * ```\n *\n * Sometimes you want to get access to the injector of a currently running Angular app\n * from outside Angular. Perhaps, you want to inject and compile some markup after the\n * application has been bootstrapped. You can do this using the extra `injector()` added\n * to JQuery/jqLite elements. See {@link angular.element}.\n *\n * *This is fairly rare but could be the case if a third party library is injecting the\n * markup.*\n *\n * In the following example a new block of HTML containing a `ng-controller`\n * directive is added to the end of the document body by JQuery. We then compile and link\n * it into the current AngularJS scope.\n *\n * ```js\n * var $div = $('{{content.label}}');\n * $(document.body).append($div);\n *\n * angular.element(document).injector().invoke(function($compile) {\n * var scope = angular.element($div).scope();\n * $compile($div)(scope);\n * });\n * ```\n */\n\n\n/**\n * @ngdoc module\n * @name auto\n * @description\n *\n * Implicit module which gets automatically added to each {@link auto.$injector $injector}.\n */\n\nvar FN_ARGS = /^function\\s*[^\\(]*\\(\\s*([^\\)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar $injectorMinErr = minErr('$injector');\n\nfunction anonFn(fn) {\n // For anonymous functions, showing at the very least the function signature can help in\n // debugging.\n var fnText = fn.toString().replace(STRIP_COMMENTS, ''),\n args = fnText.match(FN_ARGS);\n if (args) {\n return 'function(' + (args[1] || '').replace(/[\\s\\r\\n]+/, ' ') + ')';\n }\n return 'fn';\n}\n\nfunction annotate(fn, strictDi, name) {\n var $inject,\n fnText,\n argDecl,\n last;\n\n if (typeof fn === 'function') {\n if (!($inject = fn.$inject)) {\n $inject = [];\n if (fn.length) {\n if (strictDi) {\n if (!isString(name) || !name) {\n name = fn.name || anonFn(fn);\n }\n throw $injectorMinErr('strictdi',\n '{0} is not using explicit annotation and cannot be invoked in strict mode', name);\n }\n fnText = fn.toString().replace(STRIP_COMMENTS, '');\n argDecl = fnText.match(FN_ARGS);\n forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {\n arg.replace(FN_ARG, function(all, underscore, name) {\n $inject.push(name);\n });\n });\n }\n fn.$inject = $inject;\n }\n } else if (isArray(fn)) {\n last = fn.length - 1;\n assertArgFn(fn[last], 'fn');\n $inject = fn.slice(0, last);\n } else {\n assertArgFn(fn, 'fn', true);\n }\n return $inject;\n}\n\n///////////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $injector\n * @kind function\n *\n * @description\n *\n * `$injector` is used to retrieve object instances as defined by\n * {@link auto.$provide provider}, instantiate types, invoke methods,\n * and load modules.\n *\n * The following always holds true:\n *\n * ```js\n * var $injector = angular.injector();\n * expect($injector.get('$injector')).toBe($injector);\n * expect($injector.invoke(function($injector) {\n * return $injector;\n * }).toBe($injector);\n * ```\n *\n * # Injection Function Annotation\n *\n * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n * following are all valid ways of annotating function with injection arguments and are equivalent.\n *\n * ```js\n * // inferred (only works if code not minified/obfuscated)\n * $injector.invoke(function(serviceA){});\n *\n * // annotated\n * function explicit(serviceA) {};\n * explicit.$inject = ['serviceA'];\n * $injector.invoke(explicit);\n *\n * // inline\n * $injector.invoke(['serviceA', function(serviceA){}]);\n * ```\n *\n * ## Inference\n *\n * In JavaScript calling `toString()` on a function returns the function definition. The definition\n * can then be parsed and the function arguments can be extracted. *NOTE:* This does not work with\n * minification, and obfuscation tools since these tools change the argument names.\n *\n * ## `$inject` Annotation\n * By adding an `$inject` property onto a function the injection parameters can be specified.\n *\n * ## Inline\n * As an array of injection names, where the last item in the array is the function to call.\n */\n\n/**\n * @ngdoc method\n * @name $injector#get\n *\n * @description\n * Return an instance of the service.\n *\n * @param {string} name The name of the instance to retrieve.\n * @return {*} The instance.\n */\n\n/**\n * @ngdoc method\n * @name $injector#invoke\n *\n * @description\n * Invoke the method and supply the method arguments from the `$injector`.\n *\n * @param {!Function} fn The function to invoke. Function parameters are injected according to the\n * {@link guide/di $inject Annotation} rules.\n * @param {Object=} self The `this` for the invoked method.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {*} the value returned by the invoked `fn` function.\n */\n\n/**\n * @ngdoc method\n * @name $injector#has\n *\n * @description\n * Allows the user to query if the particular service exists.\n *\n * @param {string} Name of the service to query.\n * @returns {boolean} returns true if injector has given service.\n */\n\n/**\n * @ngdoc method\n * @name $injector#instantiate\n * @description\n * Create a new instance of JS type. The method takes a constructor function, invokes the new\n * operator, and supplies all of the arguments to the constructor function as specified by the\n * constructor annotation.\n *\n * @param {Function} Type Annotated constructor function.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {Object} new instance of `Type`.\n */\n\n/**\n * @ngdoc method\n * @name $injector#annotate\n *\n * @description\n * Returns an array of service names which the function is requesting for injection. This API is\n * used by the injector to determine which services need to be injected into the function when the\n * function is invoked. There are three ways in which the function can be annotated with the needed\n * dependencies.\n *\n * # Argument names\n *\n * The simplest form is to extract the dependencies from the arguments of the function. This is done\n * by converting the function into a string using `toString()` method and extracting the argument\n * names.\n * ```js\n * // Given\n * function MyController($scope, $route) {\n * // ...\n * }\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * This method does not work with code minification / obfuscation. For this reason the following\n * annotation strategies are supported.\n *\n * # The `$inject` property\n *\n * If a function has an `$inject` property and its value is an array of strings, then the strings\n * represent names of services to be injected into the function.\n * ```js\n * // Given\n * var MyController = function(obfuscatedScope, obfuscatedRoute) {\n * // ...\n * }\n * // Define function dependencies\n * MyController['$inject'] = ['$scope', '$route'];\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * # The array notation\n *\n * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n * is very inconvenient. In these situations using the array notation to specify the dependencies in\n * a way that survives minification is a better choice:\n *\n * ```js\n * // We wish to write this (not minification / obfuscation safe)\n * injector.invoke(function($compile, $rootScope) {\n * // ...\n * });\n *\n * // We are forced to write break inlining\n * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n * // ...\n * };\n * tmpFn.$inject = ['$compile', '$rootScope'];\n * injector.invoke(tmpFn);\n *\n * // To better support inline function the inline annotation is supported\n * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n * // ...\n * }]);\n *\n * // Therefore\n * expect(injector.annotate(\n * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n * ).toEqual(['$compile', '$rootScope']);\n * ```\n *\n * @param {Function|Array.} fn Function for which dependent service names need to\n * be retrieved as described above.\n *\n * @returns {Array.} The names of the services which the function requires.\n */\n\n\n\n\n/**\n * @ngdoc service\n * @name $provide\n *\n * @description\n *\n * The {@link auto.$provide $provide} service has a number of methods for registering components\n * with the {@link auto.$injector $injector}. Many of these functions are also exposed on\n * {@link angular.Module}.\n *\n * An Angular **service** is a singleton object created by a **service factory**. These **service\n * factories** are functions which, in turn, are created by a **service provider**.\n * The **service providers** are constructor functions. When instantiated they must contain a\n * property called `$get`, which holds the **service factory** function.\n *\n * When you request a service, the {@link auto.$injector $injector} is responsible for finding the\n * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n * function to get the instance of the **service**.\n *\n * Often services have no configuration options and there is no need to add methods to the service\n * provider. The provider will be no more than a constructor function with a `$get` property. For\n * these cases the {@link auto.$provide $provide} service has additional helper methods to register\n * services without specifying a provider.\n *\n * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the\n * {@link auto.$injector $injector}\n * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by\n * providers and services.\n * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by\n * services, not providers.\n * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,\n * that will be wrapped in a **service provider** object, whose `$get` property will contain the\n * given factory function.\n * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`\n * that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n * a new object using the given constructor function.\n *\n * See the individual methods for more information and examples.\n */\n\n/**\n * @ngdoc method\n * @name $provide#provider\n * @description\n *\n * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions\n * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n * service.\n *\n * Service provider names start with the name of the service they provide followed by `Provider`.\n * For example, the {@link ng.$log $log} service has a provider called\n * {@link ng.$logProvider $logProvider}.\n *\n * Service provider objects can have additional methods which allow configuration of the provider\n * and its service. Importantly, you can configure what kind of service is created by the `$get`\n * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n * method {@link ng.$logProvider#debugEnabled debugEnabled}\n * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n * console or not.\n *\n * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n 'Provider'` key.\n * @param {(Object|function())} provider If the provider is:\n *\n * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.\n * - `Constructor`: a new instance of the provider will be created using\n * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n *\n * @returns {Object} registered provider instance\n\n * @example\n *\n * The following example shows how to create a simple event tracking service and register it using\n * {@link auto.$provide#provider $provide.provider()}.\n *\n * ```js\n * // Define the eventTracker provider\n * function EventTrackerProvider() {\n * var trackingUrl = '/track';\n *\n * // A provider method for configuring where the tracked events should been saved\n * this.setTrackingUrl = function(url) {\n * trackingUrl = url;\n * };\n *\n * // The service factory function\n * this.$get = ['$http', function($http) {\n * var trackedEvents = {};\n * return {\n * // Call this to track an event\n * event: function(event) {\n * var count = trackedEvents[event] || 0;\n * count += 1;\n * trackedEvents[event] = count;\n * return count;\n * },\n * // Call this to save the tracked events to the trackingUrl\n * save: function() {\n * $http.post(trackingUrl, trackedEvents);\n * }\n * };\n * }];\n * }\n *\n * describe('eventTracker', function() {\n * var postSpy;\n *\n * beforeEach(module(function($provide) {\n * // Register the eventTracker provider\n * $provide.provider('eventTracker', EventTrackerProvider);\n * }));\n *\n * beforeEach(module(function(eventTrackerProvider) {\n * // Configure eventTracker provider\n * eventTrackerProvider.setTrackingUrl('/custom-track');\n * }));\n *\n * it('tracks events', inject(function(eventTracker) {\n * expect(eventTracker.event('login')).toEqual(1);\n * expect(eventTracker.event('login')).toEqual(2);\n * }));\n *\n * it('saves to the tracking url', inject(function(eventTracker, $http) {\n * postSpy = spyOn($http, 'post');\n * eventTracker.event('login');\n * eventTracker.save();\n * expect(postSpy).toHaveBeenCalled();\n * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n * }));\n * });\n * ```\n */\n\n/**\n * @ngdoc method\n * @name $provide#factory\n * @description\n *\n * Register a **service factory**, which will be called to return the service instance.\n * This is short for registering a service where its provider consists of only a `$get` property,\n * which is the given service factory function.\n * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to\n * configure your service in a provider.\n *\n * @param {string} name The name of the instance.\n * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand\n * for `$provide.provider(name, {$get: $getFn})`.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service\n * ```js\n * $provide.factory('ping', ['$http', function($http) {\n * return function ping() {\n * return $http.send('/ping');\n * };\n * }]);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#service\n * @description\n *\n * Register a **service constructor**, which will be invoked with `new` to create the service\n * instance.\n * This is short for registering a service where its provider's `$get` property is the service\n * constructor function that will be used to instantiate the service instance.\n *\n * You should use {@link auto.$provide#service $provide.service(class)} if you define your service\n * as a type/class.\n *\n * @param {string} name The name of the instance.\n * @param {Function} constructor A class (constructor function) that will be instantiated.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service using\n * {@link auto.$provide#service $provide.service(class)}.\n * ```js\n * var Ping = function($http) {\n * this.$http = $http;\n * };\n *\n * Ping.$inject = ['$http'];\n *\n * Ping.prototype.send = function() {\n * return this.$http.get('/ping');\n * };\n * $provide.service('ping', Ping);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping.send();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#value\n * @description\n *\n * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a\n * number, an array, an object or a function. This is short for registering a service where its\n * provider's `$get` property is a factory function that takes no arguments and returns the **value\n * service**.\n *\n * Value services are similar to constant services, except that they cannot be injected into a\n * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n * an Angular\n * {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the instance.\n * @param {*} value The value.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here are some examples of creating value services.\n * ```js\n * $provide.value('ADMIN_USER', 'admin');\n *\n * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n *\n * $provide.value('halfOf', function(value) {\n * return value / 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#constant\n * @description\n *\n * Register a **constant service**, such as a string, a number, an array, an object or a function,\n * with the {@link auto.$injector $injector}. Unlike {@link auto.$provide#value value} it can be\n * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n * be overridden by an Angular {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the constant.\n * @param {*} value The constant value.\n * @returns {Object} registered instance\n *\n * @example\n * Here a some examples of creating constants:\n * ```js\n * $provide.constant('SHARD_HEIGHT', 306);\n *\n * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n *\n * $provide.constant('double', function(value) {\n * return value * 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#decorator\n * @description\n *\n * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator\n * intercepts the creation of a service, allowing it to override or modify the behaviour of the\n * service. The object returned by the decorator may be the original service, or a new service\n * object which replaces or wraps and delegates to the original service.\n *\n * @param {string} name The name of the service to decorate.\n * @param {function()} decorator This function will be invoked when the service needs to be\n * instantiated and should return the decorated service instance. The function is called using\n * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.\n * Local injection arguments:\n *\n * * `$delegate` - The original service instance, which can be monkey patched, configured,\n * decorated or delegated to.\n *\n * @example\n * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n * calls to {@link ng.$log#error $log.warn()}.\n * ```js\n * $provide.decorator('$log', ['$delegate', function($delegate) {\n * $delegate.warn = $delegate.error;\n * return $delegate;\n * }]);\n * ```\n */\n\n\nfunction createInjector(modulesToLoad, strictDi) {\n strictDi = (strictDi === true);\n var INSTANTIATING = {},\n providerSuffix = 'Provider',\n path = [],\n loadedModules = new HashMap([], true),\n providerCache = {\n $provide: {\n provider: supportObject(provider),\n factory: supportObject(factory),\n service: supportObject(service),\n value: supportObject(value),\n constant: supportObject(constant),\n decorator: decorator\n }\n },\n providerInjector = (providerCache.$injector =\n createInternalInjector(providerCache, function() {\n throw $injectorMinErr('unpr', \"Unknown provider: {0}\", path.join(' <- '));\n })),\n instanceCache = {},\n instanceInjector = (instanceCache.$injector =\n createInternalInjector(instanceCache, function(servicename) {\n var provider = providerInjector.get(servicename + providerSuffix);\n return instanceInjector.invoke(provider.$get, provider, undefined, servicename);\n }));\n\n\n forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });\n\n return instanceInjector;\n\n ////////////////////////////////////\n // $provider\n ////////////////////////////////////\n\n function supportObject(delegate) {\n return function(key, value) {\n if (isObject(key)) {\n forEach(key, reverseParams(delegate));\n } else {\n return delegate(key, value);\n }\n };\n }\n\n function provider(name, provider_) {\n assertNotHasOwnProperty(name, 'service');\n if (isFunction(provider_) || isArray(provider_)) {\n provider_ = providerInjector.instantiate(provider_);\n }\n if (!provider_.$get) {\n throw $injectorMinErr('pget', \"Provider '{0}' must define $get factory method.\", name);\n }\n return providerCache[name + providerSuffix] = provider_;\n }\n\n function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }\n\n function service(name, constructor) {\n return factory(name, ['$injector', function($injector) {\n return $injector.instantiate(constructor);\n }]);\n }\n\n function value(name, val) { return factory(name, valueFn(val)); }\n\n function constant(name, value) {\n assertNotHasOwnProperty(name, 'constant');\n providerCache[name] = value;\n instanceCache[name] = value;\n }\n\n function decorator(serviceName, decorFn) {\n var origProvider = providerInjector.get(serviceName + providerSuffix),\n orig$get = origProvider.$get;\n\n origProvider.$get = function() {\n var origInstance = instanceInjector.invoke(orig$get, origProvider);\n return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n };\n }\n\n ////////////////////////////////////\n // Module Loading\n ////////////////////////////////////\n function loadModules(modulesToLoad){\n var runBlocks = [], moduleFn;\n forEach(modulesToLoad, function(module) {\n if (loadedModules.get(module)) return;\n loadedModules.put(module, true);\n\n function runInvokeQueue(queue) {\n var i, ii;\n for(i = 0, ii = queue.length; i < ii; i++) {\n var invokeArgs = queue[i],\n provider = providerInjector.get(invokeArgs[0]);\n\n provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n }\n }\n\n try {\n if (isString(module)) {\n moduleFn = angularModule(module);\n runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n runInvokeQueue(moduleFn._invokeQueue);\n runInvokeQueue(moduleFn._configBlocks);\n } else if (isFunction(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else if (isArray(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else {\n assertArgFn(module, 'module');\n }\n } catch (e) {\n if (isArray(module)) {\n module = module[module.length - 1];\n }\n if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {\n // Safari & FF's stack traces don't contain error.message content\n // unlike those of Chrome and IE\n // So if stack doesn't contain message, we create a new string that contains both.\n // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n /* jshint -W022 */\n e = e.message + '\\n' + e.stack;\n }\n throw $injectorMinErr('modulerr', \"Failed to instantiate module {0} due to:\\n{1}\",\n module, e.stack || e.message || e);\n }\n });\n return runBlocks;\n }\n\n ////////////////////////////////////\n // internal Injector\n ////////////////////////////////////\n\n function createInternalInjector(cache, factory) {\n\n function getService(serviceName) {\n if (cache.hasOwnProperty(serviceName)) {\n if (cache[serviceName] === INSTANTIATING) {\n throw $injectorMinErr('cdep', 'Circular dependency found: {0}',\n serviceName + ' <- ' + path.join(' <- '));\n }\n return cache[serviceName];\n } else {\n try {\n path.unshift(serviceName);\n cache[serviceName] = INSTANTIATING;\n return cache[serviceName] = factory(serviceName);\n } catch (err) {\n if (cache[serviceName] === INSTANTIATING) {\n delete cache[serviceName];\n }\n throw err;\n } finally {\n path.shift();\n }\n }\n }\n\n function invoke(fn, self, locals, serviceName) {\n if (typeof locals === 'string') {\n serviceName = locals;\n locals = null;\n }\n\n var args = [],\n $inject = annotate(fn, strictDi, serviceName),\n length, i,\n key;\n\n for(i = 0, length = $inject.length; i < length; i++) {\n key = $inject[i];\n if (typeof key !== 'string') {\n throw $injectorMinErr('itkn',\n 'Incorrect injection token! Expected service name as string, got {0}', key);\n }\n args.push(\n locals && locals.hasOwnProperty(key)\n ? locals[key]\n : getService(key)\n );\n }\n if (isArray(fn)) {\n fn = fn[length];\n }\n\n // http://jsperf.com/angularjs-invoke-apply-vs-switch\n // #5388\n return fn.apply(self, args);\n }\n\n function instantiate(Type, locals, serviceName) {\n var Constructor = function() {},\n instance, returnedValue;\n\n // Check if Type is annotated and use just the given function at n-1 as parameter\n // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;\n instance = new Constructor();\n returnedValue = invoke(Type, instance, locals, serviceName);\n\n return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;\n }\n\n return {\n invoke: invoke,\n instantiate: instantiate,\n get: getService,\n annotate: annotate,\n has: function(name) {\n return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n }\n };\n }\n}\n\ncreateInjector.$$annotate = annotate;\n\n/**\n * @ngdoc service\n * @name $anchorScroll\n * @kind function\n * @requires $window\n * @requires $location\n * @requires $rootScope\n *\n * @description\n * When called, it checks current value of `$location.hash()` and scrolls to the related element,\n * according to rules specified in\n * [Html5 spec](http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document).\n *\n * It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.\n * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.\n *\n * @example\n \n \n \n Go to bottom\n You're at the bottom!\n \n \n \n angular.module('anchorScrollExample', [])\n .controller('ScrollController', ['$scope', '$location', '$anchorScroll',\n function ($scope, $location, $anchorScroll) {\n $scope.gotoBottom = function() {\n // set the location.hash to the id of\n // the element you wish to scroll to.\n $location.hash('bottom');\n\n // call $anchorScroll()\n $anchorScroll();\n };\n }]);\n \n \n #scrollArea {\n height: 350px;\n overflow: auto;\n }\n\n #bottom {\n display: block;\n margin-top: 2000px;\n }\n \n \n */\nfunction $AnchorScrollProvider() {\n\n var autoScrollingEnabled = true;\n\n this.disableAutoScrolling = function() {\n autoScrollingEnabled = false;\n };\n\n this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n var document = $window.document;\n\n // helper function to get first anchor from a NodeList\n // can't use filter.filter, as it accepts only instances of Array\n // and IE can't convert NodeList to an array using [].slice\n // TODO(vojta): use filter if we change it to accept lists as well\n function getFirstAnchor(list) {\n var result = null;\n forEach(list, function(element) {\n if (!result && nodeName_(element) === 'a') result = element;\n });\n return result;\n }\n\n function scroll() {\n var hash = $location.hash(), elm;\n\n // empty hash, scroll to the top of the page\n if (!hash) $window.scrollTo(0, 0);\n\n // element with given id\n else if ((elm = document.getElementById(hash))) elm.scrollIntoView();\n\n // first anchor with given name :-D\n else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView();\n\n // no element and hash == 'top', scroll to the top of the page\n else if (hash === 'top') $window.scrollTo(0, 0);\n }\n\n // does not scroll when user clicks on anchor link that is currently on\n // (no url change, no $location.hash() change), browser native does scroll\n if (autoScrollingEnabled) {\n $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n function autoScrollWatchAction() {\n $rootScope.$evalAsync(scroll);\n });\n }\n\n return scroll;\n }];\n}\n\nvar $animateMinErr = minErr('$animate');\n\n/**\n * @ngdoc provider\n * @name $animateProvider\n *\n * @description\n * Default implementation of $animate that doesn't perform any animations, instead just\n * synchronously performs DOM\n * updates and calls done() callbacks.\n *\n * In order to enable animations the ngAnimate module has to be loaded.\n *\n * To see the functional implementation check out src/ngAnimate/animate.js\n */\nvar $AnimateProvider = ['$provide', function($provide) {\n\n\n this.$$selectors = {};\n\n\n /**\n * @ngdoc method\n * @name $animateProvider#register\n *\n * @description\n * Registers a new injectable animation factory function. The factory function produces the\n * animation object which contains callback functions for each event that is expected to be\n * animated.\n *\n * * `eventFn`: `function(Element, doneFunction)` The element to animate, the `doneFunction`\n * must be called once the element animation is complete. If a function is returned then the\n * animation service will use this function to cancel the animation whenever a cancel event is\n * triggered.\n *\n *\n * ```js\n * return {\n * eventFn : function(element, done) {\n * //code to run the animation\n * //once complete, then run done()\n * return function cancellationFunction() {\n * //code to cancel the animation\n * }\n * }\n * }\n * ```\n *\n * @param {string} name The name of the animation.\n * @param {Function} factory The factory function that will be executed to return the animation\n * object.\n */\n this.register = function(name, factory) {\n var key = name + '-animation';\n if (name && name.charAt(0) != '.') throw $animateMinErr('notcsel',\n \"Expecting class selector starting with '.' got '{0}'.\", name);\n this.$$selectors[name.substr(1)] = key;\n $provide.factory(key, factory);\n };\n\n /**\n * @ngdoc method\n * @name $animateProvider#classNameFilter\n *\n * @description\n * Sets and/or returns the CSS class regular expression that is checked when performing\n * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n * therefore enable $animate to attempt to perform an animation on any element.\n * When setting the classNameFilter value, animations will only be performed on elements\n * that successfully match the filter expression. This in turn can boost performance\n * for low-powered devices as well as applications containing a lot of structural operations.\n * @param {RegExp=} expression The className expression which will be checked against all animations\n * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n */\n this.classNameFilter = function(expression) {\n if(arguments.length === 1) {\n this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;\n }\n return this.$$classNameFilter;\n };\n\n this.$get = ['$$q', '$$asyncCallback', function($$q, $$asyncCallback) {\n\n var currentDefer;\n function asyncPromise() {\n // only serve one instance of a promise in order to save CPU cycles\n if (!currentDefer) {\n currentDefer = $$q.defer();\n $$asyncCallback(function() {\n currentDefer.resolve();\n currentDefer = null;\n });\n }\n return currentDefer.promise;\n }\n\n /**\n *\n * @ngdoc service\n * @name $animate\n * @description The $animate service provides rudimentary DOM manipulation functions to\n * insert, remove and move elements within the DOM, as well as adding and removing classes.\n * This service is the core service used by the ngAnimate $animator service which provides\n * high-level animation hooks for CSS and JavaScript.\n *\n * $animate is available in the AngularJS core, however, the ngAnimate module must be included\n * to enable full out animation support. Otherwise, $animate will only perform simple DOM\n * manipulation operations.\n *\n * To learn more about enabling animation support, click here to visit the {@link ngAnimate\n * ngAnimate module page} as well as the {@link ngAnimate.$animate ngAnimate $animate service\n * page}.\n */\n return {\n\n /**\n *\n * @ngdoc method\n * @name $animate#enter\n * @kind function\n * @description Inserts the element into the DOM either after the `after` element or\n * as the first child within the `parent` element. When the function is called a promise\n * is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will be inserted into the DOM\n * @param {DOMElement} parent the parent element which will append the element as\n * a child (if the after element is not present)\n * @param {DOMElement} after the sibling element which will append the element\n * after itself\n * @return {Promise} the animation callback promise\n */\n enter : function(element, parent, after) {\n after ? after.after(element)\n : parent.prepend(element);\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#leave\n * @kind function\n * @description Removes the element from the DOM. When the function is called a promise\n * is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will be removed from the DOM\n * @return {Promise} the animation callback promise\n */\n leave : function(element) {\n element.remove();\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#move\n * @kind function\n * @description Moves the position of the provided element within the DOM to be placed\n * either after the `after` element or inside of the `parent` element. When the function\n * is called a promise is returned that will be resolved at a later time.\n *\n * @param {DOMElement} element the element which will be moved around within the\n * DOM\n * @param {DOMElement} parent the parent element where the element will be\n * inserted into (if the after element is not present)\n * @param {DOMElement} after the sibling element where the element will be\n * positioned next to\n * @return {Promise} the animation callback promise\n */\n move : function(element, parent, after) {\n // Do not remove element before insert. Removing will cause data associated with the\n // element to be dropped. Insert will implicitly do the remove.\n return this.enter(element, parent, after);\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#addClass\n * @kind function\n * @description Adds the provided className CSS class value to the provided element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have the className value\n * added to it\n * @param {string} className the CSS class which will be added to the element\n * @return {Promise} the animation callback promise\n */\n addClass : function(element, className) {\n className = !isString(className)\n ? (isArray(className) ? className.join(' ') : '')\n : className;\n forEach(element, function (element) {\n jqLiteAddClass(element, className);\n });\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#removeClass\n * @kind function\n * @description Removes the provided className CSS class value from the provided element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have the className value\n * removed from it\n * @param {string} className the CSS class which will be removed from the element\n * @return {Promise} the animation callback promise\n */\n removeClass : function(element, className) {\n className = !isString(className)\n ? (isArray(className) ? className.join(' ') : '')\n : className;\n forEach(element, function (element) {\n jqLiteRemoveClass(element, className);\n });\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#setClass\n * @kind function\n * @description Adds and/or removes the given CSS classes to and from the element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have its CSS classes changed\n * removed from it\n * @param {string} add the CSS classes which will be added to the element\n * @param {string} remove the CSS class which will be removed from the element\n * @return {Promise} the animation callback promise\n */\n setClass : function(element, add, remove) {\n this.addClass(element, add);\n this.removeClass(element, remove);\n return asyncPromise();\n },\n\n enabled : noop,\n cancel : noop\n };\n }];\n}];\n\nfunction $$AsyncCallbackProvider(){\n this.$get = ['$$rAF', '$timeout', function($$rAF, $timeout) {\n return $$rAF.supported\n ? function(fn) { return $$rAF(fn); }\n : function(fn) {\n return $timeout(fn, 0, false);\n };\n }];\n}\n\n/**\n * ! This is a private undocumented service !\n *\n * @name $browser\n * @requires $log\n * @description\n * This object has two goals:\n *\n * - hide all the global state in the browser caused by the window object\n * - abstract away all the browser specific features and inconsistencies\n *\n * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n * service, which can be used for convenient testing of the application without the interaction with\n * the real browser apis.\n */\n/**\n * @param {object} window The global window object.\n * @param {object} document jQuery wrapped document.\n * @param {function()} XHR XMLHttpRequest constructor.\n * @param {object} $log console.log or an object with the same interface.\n * @param {object} $sniffer $sniffer service\n */\nfunction Browser(window, document, $log, $sniffer) {\n var self = this,\n rawDocument = document[0],\n location = window.location,\n history = window.history,\n setTimeout = window.setTimeout,\n clearTimeout = window.clearTimeout,\n pendingDeferIds = {};\n\n self.isMock = false;\n\n var outstandingRequestCount = 0;\n var outstandingRequestCallbacks = [];\n\n // TODO(vojta): remove this temporary api\n self.$$completeOutstandingRequest = completeOutstandingRequest;\n self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };\n\n /**\n * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`\n * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.\n */\n function completeOutstandingRequest(fn) {\n try {\n fn.apply(null, sliceArgs(arguments, 1));\n } finally {\n outstandingRequestCount--;\n if (outstandingRequestCount === 0) {\n while(outstandingRequestCallbacks.length) {\n try {\n outstandingRequestCallbacks.pop()();\n } catch (e) {\n $log.error(e);\n }\n }\n }\n }\n }\n\n /**\n * @private\n * Note: this method is used only by scenario runner\n * TODO(vojta): prefix this method with $$ ?\n * @param {function()} callback Function that will be called when no outstanding request\n */\n self.notifyWhenNoOutstandingRequests = function(callback) {\n // force browser to execute all pollFns - this is needed so that cookies and other pollers fire\n // at some deterministic time in respect to the test runner's actions. Leaving things up to the\n // regular poller would result in flaky tests.\n forEach(pollFns, function(pollFn){ pollFn(); });\n\n if (outstandingRequestCount === 0) {\n callback();\n } else {\n outstandingRequestCallbacks.push(callback);\n }\n };\n\n //////////////////////////////////////////////////////////////\n // Poll Watcher API\n //////////////////////////////////////////////////////////////\n var pollFns = [],\n pollTimeout;\n\n /**\n * @name $browser#addPollFn\n *\n * @param {function()} fn Poll function to add\n *\n * @description\n * Adds a function to the list of functions that poller periodically executes,\n * and starts polling if not started yet.\n *\n * @returns {function()} the added function\n */\n self.addPollFn = function(fn) {\n if (isUndefined(pollTimeout)) startPoller(100, setTimeout);\n pollFns.push(fn);\n return fn;\n };\n\n /**\n * @param {number} interval How often should browser call poll functions (ms)\n * @param {function()} setTimeout Reference to a real or fake `setTimeout` function.\n *\n * @description\n * Configures the poller to run in the specified intervals, using the specified\n * setTimeout fn and kicks it off.\n */\n function startPoller(interval, setTimeout) {\n (function check() {\n forEach(pollFns, function(pollFn){ pollFn(); });\n pollTimeout = setTimeout(check, interval);\n })();\n }\n\n //////////////////////////////////////////////////////////////\n // URL API\n //////////////////////////////////////////////////////////////\n\n var lastBrowserUrl = location.href,\n baseElement = document.find('base'),\n newLocation = null;\n\n /**\n * @name $browser#url\n *\n * @description\n * GETTER:\n * Without any argument, this method just returns current value of location.href.\n *\n * SETTER:\n * With at least one argument, this method sets url to new value.\n * If html5 history api supported, pushState/replaceState is used, otherwise\n * location.href/location.replace is used.\n * Returns its own instance to allow chaining\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to change url.\n *\n * @param {string} url New url (when used as setter)\n * @param {boolean=} replace Should new url replace current history record ?\n */\n self.url = function(url, replace) {\n // Android Browser BFCache causes location, history reference to become stale.\n if (location !== window.location) location = window.location;\n if (history !== window.history) history = window.history;\n\n // setter\n if (url) {\n if (lastBrowserUrl == url) return;\n lastBrowserUrl = url;\n if ($sniffer.history) {\n if (replace) history.replaceState(null, '', url);\n else {\n history.pushState(null, '', url);\n // Crazy Opera Bug: http://my.opera.com/community/forums/topic.dml?id=1185462\n baseElement.attr('href', baseElement.attr('href'));\n }\n } else {\n newLocation = url;\n if (replace) {\n location.replace(url);\n } else {\n location.href = url;\n }\n }\n return self;\n // getter\n } else {\n // - newLocation is a workaround for an IE7-9 issue with location.replace and location.href\n // methods not updating location.href synchronously.\n // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172\n return newLocation || location.href.replace(/%27/g,\"'\");\n }\n };\n\n var urlChangeListeners = [],\n urlChangeInit = false;\n\n function fireUrlChange() {\n newLocation = null;\n if (lastBrowserUrl == self.url()) return;\n\n lastBrowserUrl = self.url();\n forEach(urlChangeListeners, function(listener) {\n listener(self.url());\n });\n }\n\n /**\n * @name $browser#onUrlChange\n *\n * @description\n * Register callback function that will be called, when url changes.\n *\n * It's only called when the url is changed from outside of angular:\n * - user types different url into address bar\n * - user clicks on history (forward/back) button\n * - user clicks on a link\n *\n * It's not called when url is changed by $browser.url() method\n *\n * The listener gets called with new url as parameter.\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to monitor url changes in angular apps.\n *\n * @param {function(string)} listener Listener function to be called when url changes.\n * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n */\n self.onUrlChange = function(callback) {\n // TODO(vojta): refactor to use node's syntax for events\n if (!urlChangeInit) {\n // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)\n // don't fire popstate when user change the address bar and don't fire hashchange when url\n // changed by push/replaceState\n\n // html5 history api - popstate event\n if ($sniffer.history) jqLite(window).on('popstate', fireUrlChange);\n // hashchange event\n if ($sniffer.hashchange) jqLite(window).on('hashchange', fireUrlChange);\n // polling\n else self.addPollFn(fireUrlChange);\n\n urlChangeInit = true;\n }\n\n urlChangeListeners.push(callback);\n return callback;\n };\n\n /**\n * Checks whether the url has changed outside of Angular.\n * Needs to be exported to be able to check for changes that have been done in sync,\n * as hashchange/popstate events fire in async.\n */\n self.$$checkUrlChange = fireUrlChange;\n\n //////////////////////////////////////////////////////////////\n // Misc API\n //////////////////////////////////////////////////////////////\n\n /**\n * @name $browser#baseHref\n *\n * @description\n * Returns current \n * (always relative - without domain)\n *\n * @returns {string} The current base href\n */\n self.baseHref = function() {\n var href = baseElement.attr('href');\n return href ? href.replace(/^(https?\\:)?\\/\\/[^\\/]*/, '') : '';\n };\n\n //////////////////////////////////////////////////////////////\n // Cookies API\n //////////////////////////////////////////////////////////////\n var lastCookies = {};\n var lastCookieString = '';\n var cookiePath = self.baseHref();\n\n /**\n * @name $browser#cookies\n *\n * @param {string=} name Cookie name\n * @param {string=} value Cookie value\n *\n * @description\n * The cookies method provides a 'private' low level access to browser cookies.\n * It is not meant to be used directly, use the $cookie service instead.\n *\n * The return values vary depending on the arguments that the method was called with as follows:\n *\n * - cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify\n * it\n * - cookies(name, value) -> set name to value, if value is undefined delete the cookie\n * - cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that\n * way)\n *\n * @returns {Object} Hash of all cookies (if called without any parameter)\n */\n self.cookies = function(name, value) {\n var cookieLength, cookieArray, cookie, i, index;\n\n if (name) {\n if (value === undefined) {\n rawDocument.cookie = encodeURIComponent(name) + \"=;path=\" + cookiePath +\n \";expires=Thu, 01 Jan 1970 00:00:00 GMT\";\n } else {\n if (isString(value)) {\n cookieLength = (rawDocument.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value) +\n ';path=' + cookiePath).length + 1;\n\n // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:\n // - 300 cookies\n // - 20 cookies per unique domain\n // - 4096 bytes per cookie\n if (cookieLength > 4096) {\n $log.warn(\"Cookie '\"+ name +\n \"' possibly not set or overflowed because it was too large (\"+\n cookieLength + \" > 4096 bytes)!\");\n }\n }\n }\n } else {\n if (rawDocument.cookie !== lastCookieString) {\n lastCookieString = rawDocument.cookie;\n cookieArray = lastCookieString.split(\"; \");\n lastCookies = {};\n\n for (i = 0; i < cookieArray.length; i++) {\n cookie = cookieArray[i];\n index = cookie.indexOf('=');\n if (index > 0) { //ignore nameless cookies\n name = decodeURIComponent(cookie.substring(0, index));\n // the first value that is seen for a cookie is the most\n // specific one. values for the same cookie name that\n // follow are for less specific paths.\n if (lastCookies[name] === undefined) {\n lastCookies[name] = decodeURIComponent(cookie.substring(index + 1));\n }\n }\n }\n }\n return lastCookies;\n }\n };\n\n\n /**\n * @name $browser#defer\n * @param {function()} fn A function, who's execution should be deferred.\n * @param {number=} [delay=0] of milliseconds to defer the function execution.\n * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n *\n * @description\n * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n *\n * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n * via `$browser.defer.flush()`.\n *\n */\n self.defer = function(fn, delay) {\n var timeoutId;\n outstandingRequestCount++;\n timeoutId = setTimeout(function() {\n delete pendingDeferIds[timeoutId];\n completeOutstandingRequest(fn);\n }, delay || 0);\n pendingDeferIds[timeoutId] = true;\n return timeoutId;\n };\n\n\n /**\n * @name $browser#defer.cancel\n *\n * @description\n * Cancels a deferred task identified with `deferId`.\n *\n * @param {*} deferId Token returned by the `$browser.defer` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n self.defer.cancel = function(deferId) {\n if (pendingDeferIds[deferId]) {\n delete pendingDeferIds[deferId];\n clearTimeout(deferId);\n completeOutstandingRequest(noop);\n return true;\n }\n return false;\n };\n\n}\n\nfunction $BrowserProvider(){\n this.$get = ['$window', '$log', '$sniffer', '$document',\n function( $window, $log, $sniffer, $document){\n return new Browser($window, $document, $log, $sniffer);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $cacheFactory\n *\n * @description\n * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to\n * them.\n *\n * ```js\n *\n * var cache = $cacheFactory('cacheId');\n * expect($cacheFactory.get('cacheId')).toBe(cache);\n * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n *\n * cache.put(\"key\", \"value\");\n * cache.put(\"another key\", \"another value\");\n *\n * // We've specified no options on creation\n * expect(cache.info()).toEqual({id: 'cacheId', size: 2});\n *\n * ```\n *\n *\n * @param {string} cacheId Name or id of the newly created cache.\n * @param {object=} options Options object that specifies the cache behavior. Properties:\n *\n * - `{number=}` `capacity` — turns the cache into LRU cache.\n *\n * @returns {object} Newly created cache object with the following set of methods:\n *\n * - `{object}` `info()` — Returns id, size, and options of cache.\n * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n * it.\n * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n * - `{void}` `removeAll()` — Removes all cached values.\n * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n *\n * @example\n \n \n \n \n \n Cache\n\n Cached Values\n \n \n : \n \n \n\n Cache Info\n \n \n : \n \n \n \n \n \n angular.module('cacheExampleApp', []).\n controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {\n $scope.keys = [];\n $scope.cache = $cacheFactory('cacheId');\n $scope.put = function(key, value) {\n if ($scope.cache.get(key) === undefined) {\n $scope.keys.push(key);\n }\n $scope.cache.put(key, value === undefined ? null : value);\n };\n }]);\n \n \n p {\n margin: 10px 0 3px;\n }\n \n \n */\nfunction $CacheFactoryProvider() {\n\n this.$get = function() {\n var caches = {};\n\n function cacheFactory(cacheId, options) {\n if (cacheId in caches) {\n throw minErr('$cacheFactory')('iid', \"CacheId '{0}' is already taken!\", cacheId);\n }\n\n var size = 0,\n stats = extend({}, options, {id: cacheId}),\n data = {},\n capacity = (options && options.capacity) || Number.MAX_VALUE,\n lruHash = {},\n freshEnd = null,\n staleEnd = null;\n\n /**\n * @ngdoc type\n * @name $cacheFactory.Cache\n *\n * @description\n * A cache object used to store and retrieve data, primarily used by\n * {@link $http $http} and the {@link ng.directive:script script} directive to cache\n * templates and other data.\n *\n * ```js\n * angular.module('superCache')\n * .factory('superCache', ['$cacheFactory', function($cacheFactory) {\n * return $cacheFactory('super-cache');\n * }]);\n * ```\n *\n * Example test:\n *\n * ```js\n * it('should behave like a cache', inject(function(superCache) {\n * superCache.put('key', 'value');\n * superCache.put('another key', 'another value');\n *\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 2\n * });\n *\n * superCache.remove('another key');\n * expect(superCache.get('another key')).toBeUndefined();\n *\n * superCache.removeAll();\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 0\n * });\n * }));\n * ```\n */\n return caches[cacheId] = {\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#put\n * @kind function\n *\n * @description\n * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be\n * retrieved later, and incrementing the size of the cache if the key was not already\n * present in the cache. If behaving like an LRU cache, it will also remove stale\n * entries from the set.\n *\n * It will not insert undefined values into the cache.\n *\n * @param {string} key the key under which the cached data is stored.\n * @param {*} value the value to store alongside the key. If it is undefined, the key\n * will not be stored.\n * @returns {*} the value stored.\n */\n put: function(key, value) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\n refresh(lruEntry);\n }\n\n if (isUndefined(value)) return;\n if (!(key in data)) size++;\n data[key] = value;\n\n if (size > capacity) {\n this.remove(staleEnd.key);\n }\n\n return value;\n },\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#get\n * @kind function\n *\n * @description\n * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the data to be retrieved\n * @returns {*} the value stored.\n */\n get: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n refresh(lruEntry);\n }\n\n return data[key];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#remove\n * @kind function\n *\n * @description\n * Removes an entry from the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the entry to be removed\n */\n remove: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n if (lruEntry == freshEnd) freshEnd = lruEntry.p;\n if (lruEntry == staleEnd) staleEnd = lruEntry.n;\n link(lruEntry.n,lruEntry.p);\n\n delete lruHash[key];\n }\n\n delete data[key];\n size--;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#removeAll\n * @kind function\n *\n * @description\n * Clears the cache object of any entries.\n */\n removeAll: function() {\n data = {};\n size = 0;\n lruHash = {};\n freshEnd = staleEnd = null;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#destroy\n * @kind function\n *\n * @description\n * Destroys the {@link $cacheFactory.Cache Cache} object entirely,\n * removing it from the {@link $cacheFactory $cacheFactory} set.\n */\n destroy: function() {\n data = null;\n stats = null;\n lruHash = null;\n delete caches[cacheId];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#info\n * @kind function\n *\n * @description\n * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.\n *\n * @returns {object} an object with the following properties:\n * \n * **id**: the id of the cache instance\n * **size**: the number of entries kept in the cache instance\n * **...**: any additional properties from the options object when creating the\n * cache.\n * \n */\n info: function() {\n return extend({}, stats, {size: size});\n }\n };\n\n\n /**\n * makes the `entry` the freshEnd of the LRU linked list\n */\n function refresh(entry) {\n if (entry != freshEnd) {\n if (!staleEnd) {\n staleEnd = entry;\n } else if (staleEnd == entry) {\n staleEnd = entry.n;\n }\n\n link(entry.n, entry.p);\n link(entry, freshEnd);\n freshEnd = entry;\n freshEnd.n = null;\n }\n }\n\n\n /**\n * bidirectionally links two entries of the LRU linked list\n */\n function link(nextEntry, prevEntry) {\n if (nextEntry != prevEntry) {\n if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#info\n *\n * @description\n * Get information about all the caches that have been created\n *\n * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n */\n cacheFactory.info = function() {\n var info = {};\n forEach(caches, function(cache, cacheId) {\n info[cacheId] = cache.info();\n });\n return info;\n };\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#get\n *\n * @description\n * Get access to a cache object by the `cacheId` used when it was created.\n *\n * @param {string} cacheId Name or id of a cache to access.\n * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n */\n cacheFactory.get = function(cacheId) {\n return caches[cacheId];\n };\n\n\n return cacheFactory;\n };\n}\n\n/**\n * @ngdoc service\n * @name $templateCache\n *\n * @description\n * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n * can load templates directly into the cache in a `script` tag, or by consuming the\n * `$templateCache` service directly.\n *\n * Adding via the `script` tag:\n *\n * ```html\n * \n * ```\n *\n * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n * the document, but it must be below the `ng-app` definition.\n *\n * Adding via the $templateCache service:\n *\n * ```js\n * var myApp = angular.module('myApp', []);\n * myApp.run(function($templateCache) {\n * $templateCache.put('templateId.html', 'This is the content of the template');\n * });\n * ```\n *\n * To retrieve the template later, simply use it in your HTML:\n * ```html\n * \n * ```\n *\n * or get it via Javascript:\n * ```js\n * $templateCache.get('templateId.html')\n * ```\n *\n * See {@link ng.$cacheFactory $cacheFactory}.\n *\n */\nfunction $TemplateCacheProvider() {\n this.$get = ['$cacheFactory', function($cacheFactory) {\n return $cacheFactory('templates');\n }];\n}\n\n/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n *\n * DOM-related variables:\n *\n * - \"node\" - DOM Node\n * - \"element\" - DOM Element or Node\n * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n *\n *\n * Compiler related stuff:\n *\n * - \"linkFn\" - linking fn of a single directive\n * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n * - \"childLinkFn\" - function that aggregates all linking fns for child nodes of a particular node\n * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n */\n\n\n/**\n * @ngdoc service\n * @name $compile\n * @kind function\n *\n * @description\n * Compiles an HTML string or DOM into a template and produces a template function, which\n * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n *\n * The compilation is a process of walking the DOM tree and matching DOM elements to\n * {@link ng.$compileProvider#directive directives}.\n *\n * \n * **Note:** This document is an in-depth reference of all directive options.\n * For a gentle introduction to directives with examples of common use cases,\n * see the {@link guide/directive directive guide}.\n * \n *\n * ## Comprehensive Directive API\n *\n * There are many different options for a directive.\n *\n * The difference resides in the return value of the factory function.\n * You can either return a \"Directive Definition Object\" (see below) that defines the directive properties,\n * or just the `postLink` function (all other properties will have the default values).\n *\n * \n * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n * \n *\n * Here's an example directive declared with a Directive Definition Object:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * priority: 0,\n * template: '', // or // function(tElement, tAttrs) { ... },\n * // or\n * // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },\n * transclude: false,\n * restrict: 'A',\n * scope: false,\n * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n * controllerAs: 'stringAlias',\n * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n * compile: function compile(tElement, tAttrs, transclude) {\n * return {\n * pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n * post: function postLink(scope, iElement, iAttrs, controller) { ... }\n * }\n * // or\n * // return function postLink( ... ) { ... }\n * },\n * // or\n * // link: {\n * // pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n * // post: function postLink(scope, iElement, iAttrs, controller) { ... }\n * // }\n * // or\n * // link: function postLink( ... ) { ... }\n * };\n * return directiveDefinitionObject;\n * });\n * ```\n *\n * \n * **Note:** Any unspecified options will use the default value. You can see the default values below.\n * \n *\n * Therefore the above can be simplified as:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * link: function postLink(scope, iElement, iAttrs) { ... }\n * };\n * return directiveDefinitionObject;\n * // or\n * // return function postLink(scope, iElement, iAttrs) { ... }\n * });\n * ```\n *\n *\n *\n * ### Directive Definition Object\n *\n * The directive definition object provides instructions to the {@link ng.$compile\n * compiler}. The attributes are:\n *\n * #### `multiElement`\n * When this property is set to true, the HTML compiler will collect DOM nodes between\n * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them\n * together as the directive elements. It is recomended that this feature be used on directives\n * which are not strictly behavioural (such as {@link api/ng.directive:ngClick ngClick}), and which\n * do not manipulate or replace child nodes (such as {@link api/ng.directive:ngInclude ngInclude}).\n *\n * #### `priority`\n * When there are multiple directives defined on a single DOM element, sometimes it\n * is necessary to specify the order in which the directives are applied. The `priority` is used\n * to sort the directives before their `compile` functions get called. Priority is defined as a\n * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n * are also run in priority order, but post-link functions are run in reverse order. The order\n * of directives with the same priority is undefined. The default priority is `0`.\n *\n * #### `terminal`\n * If set to true then the current `priority` will be the last set of directives\n * which will execute (any directives at the current priority will still execute\n * as the order of execution on same `priority` is undefined).\n *\n * #### `scope`\n * **If set to `true`,** then a new scope will be created for this directive. If multiple directives on the\n * same element request a new scope, only one new scope is created. The new scope rule does not\n * apply for the root of the template since the root of the template always gets a new scope.\n *\n * **If set to `{}` (object hash),** then a new \"isolate\" scope is created. The 'isolate' scope differs from\n * normal scope in that it does not prototypically inherit from the parent scope. This is useful\n * when creating reusable components, which should not accidentally read or modify data in the\n * parent scope.\n *\n * The 'isolate' scope takes an object hash which defines a set of local scope properties\n * derived from the parent scope. These local properties are useful for aliasing values for\n * templates. Locals definition is a hash of local scope property to its source:\n *\n * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n * always a string since DOM attributes are strings. If no `attr` name is specified then the\n * attribute name is assumed to be the same as the local name.\n * Given `` and widget definition\n * of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect\n * the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the\n * `localName` property on the widget scope. The `name` is read from the parent scope (not\n * component scope).\n *\n * * `=` or `=attr` - set up bi-directional binding between a local scope property and the\n * parent scope property of name defined via the value of the `attr` attribute. If no `attr`\n * name is specified then the attribute name is assumed to be the same as the local name.\n * Given `` and widget definition of\n * `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the\n * value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected\n * in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent\n * scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You\n * can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional.\n *\n * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.\n * If no `attr` name is specified then the attribute name is assumed to be the same as the\n * local name. Given `` and widget definition of\n * `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to\n * a function wrapper for the `count = count + value` expression. Often it's desirable to\n * pass data from the isolated scope via an expression to the parent scope, this can be\n * done by passing a map of local variable names and values into the expression wrapper fn.\n * For example, if the expression is `increment(amount)` then we can specify the amount value\n * by calling the `localFn` as `localFn({amount: 22})`.\n *\n *\n * #### `bindToController`\n * When an isolate scope is used for a component (see above), and `controllerAs` is used, `bindToController` will\n * allow a component to have its properties bound to the controller, rather than to scope. When the controller\n * is instantiated, the initial values of the isolate scope bindings are already available.\n *\n * #### `controller`\n * Controller constructor function. The controller is instantiated before the\n * pre-linking phase and it is shared with other directives (see\n * `require` attribute). This allows the directives to communicate with each other and augment\n * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n *\n * * `$scope` - Current scope associated with the element\n * * `$element` - Current element\n * * `$attrs` - Current attributes object for the element\n * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n * * `scope`: optional argument to override the scope.\n * * `cloneLinkingFn`: optional argument to create clones of the original transcluded content.\n * * `futureParentElement`:\n * * defines the parent to which the `cloneLinkingFn` will add the cloned elements.\n * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.\n * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)\n * and when the `cloneLinkinFn` is passed,\n * as those elements need to created and cloned in a special way when they are defined outside their\n * usual containers (e.g. like ``).\n * * See also the `directive.templateNamespace` property.\n *\n *\n * #### `require`\n * Require another directive and inject its controller as the fourth argument to the linking function. The\n * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the\n * injected argument will be an array in corresponding order. If no such directive can be\n * found, or if the directive does not have a controller, then an error is raised. The name can be prefixed with:\n *\n * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.\n * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass\n * `null` to the `link` fn if not found.\n *\n *\n * #### `controllerAs`\n * Controller alias at the directive scope. An alias for the controller so it\n * can be referenced at the directive template. The directive needs to define a scope for this\n * configuration to be used. Useful in the case when directive is used as component.\n *\n *\n * #### `restrict`\n * String of subset of `EACM` which restricts the directive to a specific directive\n * declaration style. If omitted, the defaults (elements and attributes) are used.\n *\n * * `E` - Element name (default): ``\n * * `A` - Attribute (default): ``\n * * `C` - Class: ``\n * * `M` - Comment: ``\n *\n *\n * #### `templateNamespace`\n * String representing the document type used by the markup in the template.\n * AngularJS needs this information as those elements need to be created and cloned\n * in a special way when they are defined outside their usual containers like `` and ``.\n *\n * * `html` - All root nodes in the template are HTML. Root nodes may also be\n * top-level elements such as `` or ``.\n * * `svg` - The root nodes in the template are SVG elements (excluding ``).\n * * `math` - The root nodes in the template are MathML elements (excluding ``).\n *\n * If no `templateNamespace` is specified, then the namespace is considered to be `html`.\n *\n * #### `template`\n * HTML markup that may:\n * * Replace the contents of the directive's element (default).\n * * Replace the directive's element itself (if `replace` is true - DEPRECATED).\n * * Wrap the contents of the directive's element (if `transclude` is true).\n *\n * Value may be:\n *\n * * A string. For example `{{delete_str}}`.\n * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`\n * function api below) and returns a string value.\n *\n *\n * #### `templateUrl`\n * This is similar to `template` but the template is loaded from the specified URL, asynchronously.\n *\n * Because template loading is asynchronous the compiler will suspend compilation of directives on that element\n * for later when the template has been resolved. In the meantime it will continue to compile and link\n * sibling and parent elements as though this element had not contained any directives.\n *\n * The compiler does not suspend the entire compilation to wait for templates to be loaded because this\n * would result in the whole app \"stalling\" until all templates are loaded asynchronously - even in the\n * case when only one deeply nested directive has `templateUrl`.\n *\n * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}\n *\n * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n * a string value representing the url. In either case, the template URL is passed through {@link\n * api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n *\n *\n * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0)\n * specify what the template should replace. Defaults to `false`.\n *\n * * `true` - the template will replace the directive's element.\n * * `false` - the template will replace the contents of the directive's element.\n *\n * The replacement process migrates all of the attributes / classes from the old element to the new\n * one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive\n * Directives Guide} for an example.\n *\n * There are very few scenarios where element replacement is required for the application function,\n * the main one being reusable custom components that are used within SVG contexts\n * (because SVG doesn't work with custom elements in the DOM tree).\n *\n * #### `transclude`\n * compile the content of the element and make it available to the directive.\n * Typically used with {@link ng.directive:ngTransclude\n * ngTransclude}. The advantage of transclusion is that the linking function receives a\n * transclusion function which is pre-bound to the correct scope. In a typical setup the widget\n * creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`\n * scope. This makes it possible for the widget to have private state, and the transclusion to\n * be bound to the parent (pre-`isolate`) scope.\n *\n * * `true` - transclude the content of the directive.\n * * `'element'` - transclude the whole element including any directives defined at lower priority.\n *\n * \n * **Note:** When testing an element transclude directive you must not place the directive at the root of the\n * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives\n * Testing Transclusion Directives}.\n * \n *\n * #### `compile`\n *\n * ```js\n * function compile(tElement, tAttrs, transclude) { ... }\n * ```\n *\n * The compile function deals with transforming the template DOM. Since most directives do not do\n * template transformation, it is not used often. The compile function takes the following arguments:\n *\n * * `tElement` - template element - The element where the directive has been declared. It is\n * safe to do template transformation on the element and child elements only.\n *\n * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n * between all directive compile functions.\n *\n * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n *\n * \n * **Note:** The template instance and the link instance may be different objects if the template has\n * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n * should be done in a linking function rather than in a compile function.\n * \n\n * \n * **Note:** The compile function cannot handle directives that recursively use themselves in their\n * own templates or compile functions. Compiling these directives results in an infinite loop and a\n * stack overflow errors.\n *\n * This can be avoided by manually using $compile in the postLink function to imperatively compile\n * a directive's template instead of relying on automatic template compilation via `template` or\n * `templateUrl` declaration or manual compilation inside the compile function.\n * \n *\n * \n * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n * e.g. does not know about the right outer scope. Please use the transclude function that is passed\n * to the link function instead.\n * \n\n * A compile function can have a return value which can be either a function or an object.\n *\n * * returning a (post-link) function - is equivalent to registering the linking function via the\n * `link` property of the config object when the compile function is empty.\n *\n * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n * control when a linking function should be called during the linking phase. See info about\n * pre-linking and post-linking functions below.\n *\n *\n * #### `link`\n * This property is used only if the `compile` property is not defined.\n *\n * ```js\n * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n * ```\n *\n * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n * executed after the template has been cloned. This is where most of the directive logic will be\n * put.\n *\n * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the\n * directive for registering {@link ng.$rootScope.Scope#$watch watches}.\n *\n * * `iElement` - instance element - The element where the directive is to be used. It is safe to\n * manipulate the children of the element only in `postLink` function since the children have\n * already been linked.\n *\n * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n * between all directive linking functions.\n *\n * * `controller` - a controller instance - A controller instance if at least one directive on the\n * element defines a controller. The controller is shared among all the directives, which allows\n * the directives to use the controllers as a communication channel.\n *\n * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n * This is the same as the `$transclude`\n * parameter of directive controllers, see there for details.\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n *\n * #### Pre-linking function\n *\n * Executed before the child elements are linked. Not safe to do DOM transformation since the\n * compiler linking function will fail to locate the correct elements for linking.\n *\n * #### Post-linking function\n *\n * Executed after the child elements are linked.\n *\n * Note that child elements that contain `templateUrl` directives will not have been compiled\n * and linked since they are waiting for their template to load asynchronously and their own\n * compilation and linking has been suspended until that occurs.\n *\n * It is safe to do DOM transformation in the post-linking function on elements that are not waiting\n * for their async templates to be resolved.\n *\n * \n * ### Attributes\n *\n * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n * `link()` or `compile()` functions. It has a variety of uses.\n *\n * accessing *Normalized attribute names:*\n * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.\n * the attributes object allows for normalized access to\n * the attributes.\n *\n * * *Directive inter-communication:* All directives share the same instance of the attributes\n * object which allows the directives to use the attributes object as inter directive\n * communication.\n *\n * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n * allowing other directives to read the interpolated value.\n *\n * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n * that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n * the only way to easily get the actual value because during the linking phase the interpolation\n * hasn't been evaluated yet and so the value is at this time set to `undefined`.\n *\n * ```js\n * function linkingFn(scope, elm, attrs, ctrl) {\n * // get the attribute value\n * console.log(attrs.ngModel);\n *\n * // change the attribute\n * attrs.$set('ngModel', 'new value');\n *\n * // observe changes to interpolated attribute\n * attrs.$observe('ngModel', function(value) {\n * console.log('ngModel has changed value to ' + value);\n * });\n * }\n * ```\n *\n * Below is an example using `$compileProvider`.\n *\n * \n * **Note**: Typically directives are registered with `module.directive`. The example below is\n * to illustrate how `$compile` works.\n * \n *\n \n \n \n \n \n \n \n \n \n \n it('should auto compile', function() {\n var textarea = $('textarea');\n var output = $('div[compile]');\n // The initial state reads 'Hello Angular'.\n expect(output.getText()).toBe('Hello Angular');\n textarea.clear();\n textarea.sendKeys('{{name}}!');\n expect(output.getText()).toBe('Angular!');\n });\n \n \n\n *\n *\n * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives.\n * @param {number} maxPriority only apply directives lower than given priority (Only effects the\n * root element(s), not their children)\n * @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template\n * (a DOM element/tree) to a scope. Where:\n *\n * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n * `template` and call the `cloneAttachFn` function allowing the caller to attach the\n * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n * called as: `cloneAttachFn(clonedElement, scope)` where:\n *\n * * `clonedElement` - is a clone of the original `element` passed into the compiler.\n * * `scope` - is the current scope with which the linking function is working with.\n *\n * Calling the linking function returns the element of the template. It is either the original\n * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n *\n * After linking the view is not updated until after a call to $digest which typically is done by\n * Angular automatically.\n *\n * If you need access to the bound view, there are two ways to do it:\n *\n * - If you are not asking the linking function to clone the template, create the DOM element(s)\n * before you send them to the compiler and keep this reference around.\n * ```js\n * var element = $compile('{{total}}')(scope);\n * ```\n *\n * - if on the other hand, you need the element to be cloned, the view reference from the original\n * example would not point to the clone, but rather to the original template that was cloned. In\n * this case, you can access the clone via the cloneAttachFn:\n * ```js\n * var templateElement = angular.element('{{total}}'),\n * scope = ....;\n *\n * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n * //attach the clone to DOM document at the right place\n * });\n *\n * //now we have reference to the cloned DOM via `clonedElement`\n * ```\n *\n *\n * For information on how the compiler works, see the\n * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.\n */\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc provider\n * @name $compileProvider\n *\n * @description\n */\n$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\nfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n var hasDirectives = {},\n Suffix = 'Directive',\n COMMENT_DIRECTIVE_REGEXP = /^\\s*directive\\:\\s*([\\d\\w_\\-]+)\\s+(.*)$/,\n CLASS_DIRECTIVE_REGEXP = /(([\\d\\w_\\-]+)(?:\\:([^;]+))?;?)/,\n ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset');\n\n // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n // The assumption is that future DOM event attribute names will begin with\n // 'on' and be composed of only English letters.\n var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n\n function parseIsolateBindings(scope, directiveName) {\n var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n\n var bindings = {};\n\n forEach(scope, function(definition, scopeName) {\n var match = definition.match(LOCAL_REGEXP);\n\n if (!match) {\n throw $compileMinErr('iscp',\n \"Invalid isolate scope definition for directive '{0}'.\" +\n \" Definition: {... {1}: '{2}' ...}\",\n directiveName, scopeName, definition);\n }\n\n bindings[scopeName] = {\n attrName: match[3] || scopeName,\n mode: match[1],\n optional: match[2] === '?'\n };\n });\n\n return bindings;\n }\n\n /**\n * @ngdoc method\n * @name $compileProvider#directive\n * @kind function\n *\n * @description\n * Register a new directive with the compiler.\n *\n * @param {string|Object} name Name of the directive in camel-case (i.e. ngBind which\n * will match as ng-bind), or an object map of directives where the keys are the\n * names and the values are the factories.\n * @param {Function|Array} directiveFactory An injectable directive factory function. See\n * {@link guide/directive} for more info.\n * @returns {ng.$compileProvider} Self for chaining.\n */\n this.directive = function registerDirective(name, directiveFactory) {\n assertNotHasOwnProperty(name, 'directive');\n if (isString(name)) {\n assertArg(directiveFactory, 'directiveFactory');\n if (!hasDirectives.hasOwnProperty(name)) {\n hasDirectives[name] = [];\n $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n function($injector, $exceptionHandler) {\n var directives = [];\n forEach(hasDirectives[name], function(directiveFactory, index) {\n try {\n var directive = $injector.invoke(directiveFactory);\n if (isFunction(directive)) {\n directive = { compile: valueFn(directive) };\n } else if (!directive.compile && directive.link) {\n directive.compile = valueFn(directive.link);\n }\n directive.priority = directive.priority || 0;\n directive.index = index;\n directive.name = directive.name || name;\n directive.require = directive.require || (directive.controller && directive.name);\n directive.restrict = directive.restrict || 'EA';\n if (isObject(directive.scope)) {\n directive.$$isolateBindings = parseIsolateBindings(directive.scope, directive.name);\n }\n directives.push(directive);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n return directives;\n }]);\n }\n hasDirectives[name].push(directiveFactory);\n } else {\n forEach(name, reverseParams(registerDirective));\n }\n return this;\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#aHrefSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during a[href] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.aHrefSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.aHrefSanitizationWhitelist();\n }\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#imgSrcSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during img[src] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.imgSrcSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();\n }\n };\n\n /**\n * @ngdoc method\n * @name $compileProvider#debugInfoEnabled\n *\n * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the\n * current debugInfoEnabled state\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n *\n * @kind function\n *\n * @description\n * Call this method to enable/disable various debug runtime information in the compiler such as adding\n * binding information and a reference to the current scope on to DOM elements.\n * If enabled, the compiler will add the following to DOM elements that have been bound to the scope\n * * `ng-binding` CSS class\n * * `$binding` data property containing an array of the binding expressions\n *\n * You may want to use this in production for a significant performance boost. See\n * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.\n *\n * The default value is true.\n */\n var debugInfoEnabled = true;\n this.debugInfoEnabled = function(enabled) {\n if(isDefined(enabled)) {\n debugInfoEnabled = enabled;\n return this;\n }\n return debugInfoEnabled;\n };\n\n this.$get = [\n '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',\n '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri',\n function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse,\n $controller, $rootScope, $document, $sce, $animate, $$sanitizeUri) {\n\n var Attributes = function(element, attributesToCopy) {\n if (attributesToCopy) {\n var keys = Object.keys(attributesToCopy);\n var i, l, key;\n\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n this[key] = attributesToCopy[key];\n }\n } else {\n this.$attr = {};\n }\n\n this.$$element = element;\n };\n\n Attributes.prototype = {\n $normalize: directiveNormalize,\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$addClass\n * @kind function\n *\n * @description\n * Adds the CSS class value specified by the classVal parameter to the element. If animations\n * are enabled then an animation will be triggered for the class addition.\n *\n * @param {string} classVal The className value that will be added to the element\n */\n $addClass : function(classVal) {\n if(classVal && classVal.length > 0) {\n $animate.addClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$removeClass\n * @kind function\n *\n * @description\n * Removes the CSS class value specified by the classVal parameter from the element. If\n * animations are enabled then an animation will be triggered for the class removal.\n *\n * @param {string} classVal The className value that will be removed from the element\n */\n $removeClass : function(classVal) {\n if(classVal && classVal.length > 0) {\n $animate.removeClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$updateClass\n * @kind function\n *\n * @description\n * Adds and removes the appropriate CSS class values to the element based on the difference\n * between the new and old CSS class values (specified as newClasses and oldClasses).\n *\n * @param {string} newClasses The current CSS className value\n * @param {string} oldClasses The former CSS className value\n */\n $updateClass : function(newClasses, oldClasses) {\n var toAdd = tokenDifference(newClasses, oldClasses);\n if (toAdd && toAdd.length) {\n $animate.addClass(this.$$element, toAdd);\n }\n\n var toRemove = tokenDifference(oldClasses, newClasses);\n if (toRemove && toRemove.length) {\n $animate.removeClass(this.$$element, toRemove);\n }\n },\n\n /**\n * Set a normalized attribute on the element in a way such that all directives\n * can share the attribute. This function properly handles boolean attributes.\n * @param {string} key Normalized key. (ie ngAttribute)\n * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n * Defaults to true.\n * @param {string=} attrName Optional none normalized name. Defaults to key.\n */\n $set: function(key, value, writeAttr, attrName) {\n // TODO: decide whether or not to throw an error if \"class\"\n //is set through this function since it may cause $updateClass to\n //become unstable.\n\n var node = this.$$element[0],\n booleanKey = getBooleanAttrName(node, key),\n aliasedKey = getAliasedAttrName(node, key),\n observer = key,\n normalizedVal,\n nodeName;\n\n if (booleanKey) {\n this.$$element.prop(key, value);\n attrName = booleanKey;\n } else if(aliasedKey) {\n this[aliasedKey] = value;\n observer = aliasedKey;\n }\n\n this[key] = value;\n\n // translate normalized key to actual key\n if (attrName) {\n this.$attr[key] = attrName;\n } else {\n attrName = this.$attr[key];\n if (!attrName) {\n this.$attr[key] = attrName = snake_case(key, '-');\n }\n }\n\n nodeName = nodeName_(this.$$element);\n\n // sanitize a[href] and img[src] values\n if ((nodeName === 'a' && key === 'href') ||\n (nodeName === 'img' && key === 'src')) {\n this[key] = value = $$sanitizeUri(value, key === 'src');\n }\n\n if (writeAttr !== false) {\n if (value === null || value === undefined) {\n this.$$element.removeAttr(attrName);\n } else {\n this.$$element.attr(attrName, value);\n }\n }\n\n // fire observers\n var $$observers = this.$$observers;\n $$observers && forEach($$observers[observer], function(fn) {\n try {\n fn(value);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n },\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$observe\n * @kind function\n *\n * @description\n * Observes an interpolated attribute.\n *\n * The observer function will be invoked once during the next `$digest` following\n * compilation. The observer is then invoked whenever the interpolated value\n * changes.\n *\n * @param {string} key Normalized key. (ie ngAttribute) .\n * @param {function(interpolatedValue)} fn Function that will be called whenever\n the interpolated value of the attribute changes.\n * See the {@link guide/directive#Attributes Directives} guide for more info.\n * @returns {function()} Returns a deregistration function for this observer.\n */\n $observe: function(key, fn) {\n var attrs = this,\n $$observers = (attrs.$$observers || (attrs.$$observers = {})),\n listeners = ($$observers[key] || ($$observers[key] = []));\n\n listeners.push(fn);\n $rootScope.$evalAsync(function() {\n if (!listeners.$$inter) {\n // no one registered attribute interpolation function, so lets call it manually\n fn(attrs[key]);\n }\n });\n\n return function() {\n arrayRemove(listeners, fn);\n };\n }\n };\n\n\n function safeAddClass($element, className) {\n try {\n $element.addClass(className);\n } catch(e) {\n // ignore, since it means that we are trying to set class on\n // SVG element, where class name is read-only.\n }\n }\n\n\n var startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n denormalizeTemplate = (startSymbol == '{{' || endSymbol == '}}')\n ? identity\n : function denormalizeTemplate(template) {\n return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n },\n NG_ATTR_BINDING = /^ngAttr[A-Z]/;\n\n compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {\n var bindings = $element.data('$binding') || [];\n\n if (isArray(binding)) {\n bindings = bindings.concat(binding);\n } else {\n bindings.push(binding);\n }\n\n $element.data('$binding', bindings);\n } : noop;\n\n compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {\n safeAddClass($element, 'ng-binding');\n } : noop;\n\n compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {\n var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';\n $element.data(dataName, scope);\n } : noop;\n\n compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {\n safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');\n } : noop;\n\n return compile;\n\n //================================\n\n function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n previousCompileContext) {\n if (!($compileNodes instanceof jqLite)) {\n // jquery always rewraps, whereas we need to preserve the original selector so that we can\n // modify it.\n $compileNodes = jqLite($compileNodes);\n }\n // We can not compile top level text elements since text nodes can be merged and we will\n // not be able to attach scope data to them, so we will wrap them in \n forEach($compileNodes, function(node, index){\n if (node.nodeType == 3 /* text node */ && node.nodeValue.match(/\\S+/) /* non-empty */ ) {\n $compileNodes[index] = jqLite(node).wrap('').parent()[0];\n }\n });\n var compositeLinkFn =\n compileNodes($compileNodes, transcludeFn, $compileNodes,\n maxPriority, ignoreDirective, previousCompileContext);\n compile.$$addScopeClass($compileNodes);\n var namespace = null;\n var namespaceAdaptedCompileNodes = $compileNodes;\n var lastCompileNode;\n return function publicLinkFn(scope, cloneConnectFn, transcludeControllers, parentBoundTranscludeFn, futureParentElement){\n assertArg(scope, 'scope');\n if (!namespace) {\n namespace = detectNamespaceForChildElements(futureParentElement);\n }\n if (namespace !== 'html' && $compileNodes[0] !== lastCompileNode) {\n namespaceAdaptedCompileNodes = jqLite(\n wrapTemplate(namespace, jqLite('').append($compileNodes).html())\n );\n }\n // When using a directive with replace:true and templateUrl the $compileNodes\n // might change, so we need to recreate the namespace adapted compileNodes.\n lastCompileNode = $compileNodes[0];\n\n // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n // and sometimes changes the structure of the DOM.\n var $linkNode = cloneConnectFn\n ? JQLitePrototype.clone.call(namespaceAdaptedCompileNodes) // IMPORTANT!!!\n : namespaceAdaptedCompileNodes;\n\n if (transcludeControllers) {\n for (var controllerName in transcludeControllers) {\n $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);\n }\n }\n\n compile.$$addScopeInfo($linkNode, scope);\n\n if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);\n return $linkNode;\n };\n }\n\n function detectNamespaceForChildElements(parentElement) {\n // TODO: Make this detect MathML as well...\n var node = parentElement && parentElement[0];\n if (!node) {\n return 'html';\n } else {\n return nodeName_(node) !== 'foreignobject' && node.toString().match(/SVG/) ? 'svg': 'html';\n }\n }\n\n /**\n * Compile function matches each node in nodeList against the directives. Once all directives\n * for a particular node are collected their compile functions are executed. The compile\n * functions return values - the linking functions - are combined into a composite linking\n * function, which is the a linking function for the node.\n *\n * @param {NodeList} nodeList an array of nodes or NodeList to compile\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new child of the transcluded parent scope.\n * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n * the rootElement must be set the jqLite collection of the compile root. This is\n * needed so that the jqLite collection items can be replaced with widgets.\n * @param {number=} maxPriority Max directive priority.\n * @returns {Function} A composite linking function of all of the matched directives or null.\n */\n function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n previousCompileContext) {\n var linkFns = [],\n attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;\n\n for (var i = 0; i < nodeList.length; i++) {\n attrs = new Attributes();\n\n // we must always refer to nodeList[i] since the nodes can be replaced underneath us.\n directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n ignoreDirective);\n\n nodeLinkFn = (directives.length)\n ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n null, [], [], previousCompileContext)\n : null;\n\n if (nodeLinkFn && nodeLinkFn.scope) {\n compile.$$addScopeClass(attrs.$$element);\n }\n\n childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n !(childNodes = nodeList[i].childNodes) ||\n !childNodes.length)\n ? null\n : compileNodes(childNodes,\n nodeLinkFn ? (\n (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)\n && nodeLinkFn.transclude) : transcludeFn);\n\n if (nodeLinkFn || childLinkFn) {\n linkFns.push(i, nodeLinkFn, childLinkFn);\n linkFnFound = true;\n nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;\n }\n\n //use the previous context only for the first element in the virtual group\n previousCompileContext = null;\n }\n\n // return a linking function if we have found anything, null otherwise\n return linkFnFound ? compositeLinkFn : null;\n\n function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {\n var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;\n var stableNodeList;\n\n\n if (nodeLinkFnFound) {\n // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our\n // offsets don't get screwed up\n var nodeListLength = nodeList.length;\n stableNodeList = new Array(nodeListLength);\n\n // create a sparse array by only copying the elements which have a linkFn\n for (i = 0; i < linkFns.length; i+=3) {\n idx = linkFns[i];\n stableNodeList[idx] = nodeList[idx];\n }\n } else {\n stableNodeList = nodeList;\n }\n\n for(i = 0, ii = linkFns.length; i < ii;) {\n node = stableNodeList[linkFns[i++]];\n nodeLinkFn = linkFns[i++];\n childLinkFn = linkFns[i++];\n\n if (nodeLinkFn) {\n if (nodeLinkFn.scope) {\n childScope = scope.$new();\n compile.$$addScopeInfo(jqLite(node), childScope);\n } else {\n childScope = scope;\n }\n\n if ( nodeLinkFn.transcludeOnThisElement ) {\n childBoundTranscludeFn = createBoundTranscludeFn(\n scope, nodeLinkFn.transclude, parentBoundTranscludeFn,\n nodeLinkFn.elementTranscludeOnThisElement);\n\n } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {\n childBoundTranscludeFn = parentBoundTranscludeFn;\n\n } else if (!parentBoundTranscludeFn && transcludeFn) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);\n\n } else {\n childBoundTranscludeFn = null;\n }\n\n nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);\n\n } else if (childLinkFn) {\n childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);\n }\n }\n }\n }\n\n function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn, elementTransclusion) {\n\n var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement) {\n var scopeCreated = false;\n\n if (!transcludedScope) {\n transcludedScope = scope.$new();\n transcludedScope.$$transcluded = true;\n scopeCreated = true;\n }\n\n var clone = transcludeFn(transcludedScope, cloneFn, controllers, previousBoundTranscludeFn, futureParentElement);\n if (scopeCreated && !elementTransclusion) {\n clone.on('$destroy', function() { transcludedScope.$destroy(); });\n }\n return clone;\n };\n\n return boundTranscludeFn;\n }\n\n /**\n * Looks for directives on the given node and adds them to the directive collection which is\n * sorted.\n *\n * @param node Node to search.\n * @param directives An array to which the directives are added to. This array is sorted before\n * the function returns.\n * @param attrs The shared attrs object which is used to populate the normalized attributes.\n * @param {number=} maxPriority Max directive priority.\n */\n function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n var nodeType = node.nodeType,\n attrsMap = attrs.$attr,\n match,\n className;\n\n switch(nodeType) {\n case 1: /* Element */\n // use the node name: \n addDirective(directives,\n directiveNormalize(nodeName_(node)), 'E', maxPriority, ignoreDirective);\n\n // iterate over the attributes\n for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,\n j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n var attrStartName = false;\n var attrEndName = false;\n\n attr = nAttrs[j];\n if (!msie || msie >= 8 || attr.specified) {\n name = attr.name;\n value = trim(attr.value);\n\n // support ngAttr attribute binding\n ngAttrName = directiveNormalize(name);\n if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {\n name = snake_case(ngAttrName.substr(6), '-');\n }\n\n var directiveNName = ngAttrName.replace(/(Start|End)$/, '');\n if (directiveIsMultiElement(directiveNName)) {\n if (ngAttrName === directiveNName + 'Start') {\n attrStartName = name;\n attrEndName = name.substr(0, name.length - 5) + 'end';\n name = name.substr(0, name.length - 6);\n }\n }\n\n nName = directiveNormalize(name.toLowerCase());\n attrsMap[nName] = name;\n if (isNgAttr || !attrs.hasOwnProperty(nName)) {\n attrs[nName] = value;\n if (getBooleanAttrName(node, nName)) {\n attrs[nName] = true; // presence means true\n }\n }\n addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);\n addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n attrEndName);\n }\n }\n\n // use class as directive\n className = node.className;\n if (isString(className) && className !== '') {\n while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {\n nName = directiveNormalize(match[2]);\n if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[3]);\n }\n className = className.substr(match.index + match[0].length);\n }\n }\n break;\n case 3: /* Text Node */\n addTextInterpolateDirective(directives, node.nodeValue);\n break;\n case 8: /* Comment */\n try {\n match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n if (match) {\n nName = directiveNormalize(match[1]);\n if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[2]);\n }\n }\n } catch (e) {\n // turns out that under some circumstances IE9 throws errors when one attempts to read\n // comment's node value.\n // Just ignore it and continue. (Can't seem to reproduce in test case.)\n }\n break;\n }\n\n directives.sort(byPriority);\n return directives;\n }\n\n /**\n * Given a node with an directive-start it collects all of the siblings until it finds\n * directive-end.\n * @param node\n * @param attrStart\n * @param attrEnd\n * @returns {*}\n */\n function groupScan(node, attrStart, attrEnd) {\n var nodes = [];\n var depth = 0;\n if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n var startNode = node;\n do {\n if (!node) {\n throw $compileMinErr('uterdir',\n \"Unterminated attribute, found '{0}' but no matching '{1}' found.\",\n attrStart, attrEnd);\n }\n if (node.nodeType == 1 /** Element **/) {\n if (node.hasAttribute(attrStart)) depth++;\n if (node.hasAttribute(attrEnd)) depth--;\n }\n nodes.push(node);\n node = node.nextSibling;\n } while (depth > 0);\n } else {\n nodes.push(node);\n }\n\n return jqLite(nodes);\n }\n\n /**\n * Wrapper for linking function which converts normal linking function into a grouped\n * linking function.\n * @param linkFn\n * @param attrStart\n * @param attrEnd\n * @returns {Function}\n */\n function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n return function(scope, element, attrs, controllers, transcludeFn) {\n element = groupScan(element[0], attrStart, attrEnd);\n return linkFn(scope, element, attrs, controllers, transcludeFn);\n };\n }\n\n /**\n * Once the directives have been collected, their compile functions are executed. This method\n * is responsible for inlining directive templates as well as terminating the application\n * of the directives if the terminal directive has been reached.\n *\n * @param {Array} directives Array of collected directives to execute their compile function.\n * this needs to be pre-sorted by priority order.\n * @param {Node} compileNode The raw DOM node to apply the compile functions to\n * @param {Object} templateAttrs The shared attribute function\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new\n * child of the transcluded parent scope.\n * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n * argument has the root jqLite array so that we can replace nodes\n * on it.\n * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n * compiling the transclusion.\n * @param {Array.} preLinkFns\n * @param {Array.} postLinkFns\n * @param {Object} previousCompileContext Context used for previous compilation of the current\n * node\n * @returns {Function} linkFn\n */\n function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n previousCompileContext) {\n previousCompileContext = previousCompileContext || {};\n\n var terminalPriority = -Number.MAX_VALUE,\n newScopeDirective,\n controllerDirectives = previousCompileContext.controllerDirectives,\n controllers,\n newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n templateDirective = previousCompileContext.templateDirective,\n nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n hasTranscludeDirective = false,\n hasTemplate = false,\n hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,\n $compileNode = templateAttrs.$$element = jqLite(compileNode),\n directive,\n directiveName,\n $template,\n replaceDirective = originalReplaceDirective,\n childTranscludeFn = transcludeFn,\n linkFn,\n directiveValue;\n\n // executes all directives on the current element\n for(var i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n var attrStart = directive.$$start;\n var attrEnd = directive.$$end;\n\n // collect multiblock sections\n if (attrStart) {\n $compileNode = groupScan(compileNode, attrStart, attrEnd);\n }\n $template = undefined;\n\n if (terminalPriority > directive.priority) {\n break; // prevent further processing of directives\n }\n\n if (directiveValue = directive.scope) {\n\n // skip the check for directives with async templates, we'll check the derived sync\n // directive when the template arrives\n if (!directive.templateUrl) {\n if (isObject(directiveValue)) {\n // This directive is trying to add an isolated scope.\n // Check that there is no scope of any kind already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,\n directive, $compileNode);\n newIsolateScopeDirective = directive;\n } else {\n // This directive is trying to add a child scope.\n // Check that there is no isolated scope already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n $compileNode);\n }\n }\n\n newScopeDirective = newScopeDirective || directive;\n }\n\n directiveName = directive.name;\n\n if (!directive.templateUrl && directive.controller) {\n directiveValue = directive.controller;\n controllerDirectives = controllerDirectives || {};\n assertNoDuplicate(\"'\" + directiveName + \"' controller\",\n controllerDirectives[directiveName], directive, $compileNode);\n controllerDirectives[directiveName] = directive;\n }\n\n if (directiveValue = directive.transclude) {\n hasTranscludeDirective = true;\n\n // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n // This option should only be used by directives that know how to safely handle element transclusion,\n // where the transcluded nodes are added or replaced after linking.\n if (!directive.$$tlb) {\n assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n nonTlbTranscludeDirective = directive;\n }\n\n if (directiveValue == 'element') {\n hasElementTranscludeDirective = true;\n terminalPriority = directive.priority;\n $template = $compileNode;\n $compileNode = templateAttrs.$$element =\n jqLite(document.createComment(' ' + directiveName + ': ' +\n templateAttrs[directiveName] + ' '));\n compileNode = $compileNode[0];\n replaceWith(jqCollection, sliceArgs($template), compileNode);\n\n childTranscludeFn = compile($template, transcludeFn, terminalPriority,\n replaceDirective && replaceDirective.name, {\n // Don't pass in:\n // - controllerDirectives - otherwise we'll create duplicates controllers\n // - newIsolateScopeDirective or templateDirective - combining templates with\n // element transclusion doesn't make sense.\n //\n // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n // on the same element more than once.\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n } else {\n $template = jqLite(jqLiteClone(compileNode)).contents();\n $compileNode.empty(); // clear contents\n childTranscludeFn = compile($template, transcludeFn);\n }\n }\n\n if (directive.template) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n directiveValue = (isFunction(directive.template))\n ? directive.template($compileNode, templateAttrs)\n : directive.template;\n\n directiveValue = denormalizeTemplate(directiveValue);\n\n if (directive.replace) {\n replaceDirective = directive;\n if (jqLiteIsTextNode(directiveValue)) {\n $template = [];\n } else {\n $template = jqLite(wrapTemplate(directive.templateNamespace, trim(directiveValue)));\n }\n compileNode = $template[0];\n\n if ($template.length != 1 || compileNode.nodeType !== 1) {\n throw $compileMinErr('tplrt',\n \"Template for directive '{0}' must have exactly one root element. {1}\",\n directiveName, '');\n }\n\n replaceWith(jqCollection, $compileNode, compileNode);\n\n var newTemplateAttrs = {$attr: {}};\n\n // combine directives from the original node and from the template:\n // - take the array of directives for this element\n // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n // - collect directives from the template and sort them by priority\n // - combine directives as: processed + template + unprocessed\n var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\n if (newIsolateScopeDirective) {\n markDirectivesAsIsolate(templateDirectives);\n }\n directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\n ii = directives.length;\n } else {\n $compileNode.html(directiveValue);\n }\n }\n\n if (directive.templateUrl) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n if (directive.replace) {\n replaceDirective = directive;\n }\n\n nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {\n controllerDirectives: controllerDirectives,\n newIsolateScopeDirective: newIsolateScopeDirective,\n templateDirective: templateDirective,\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n ii = directives.length;\n } else if (directive.compile) {\n try {\n linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n if (isFunction(linkFn)) {\n addLinkFns(null, linkFn, attrStart, attrEnd);\n } else if (linkFn) {\n addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);\n }\n } catch (e) {\n $exceptionHandler(e, startingTag($compileNode));\n }\n }\n\n if (directive.terminal) {\n nodeLinkFn.terminal = true;\n terminalPriority = Math.max(terminalPriority, directive.priority);\n }\n\n }\n\n nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;\n nodeLinkFn.elementTranscludeOnThisElement = hasElementTranscludeDirective;\n nodeLinkFn.templateOnThisElement = hasTemplate;\n nodeLinkFn.transclude = childTranscludeFn;\n\n previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;\n\n // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n return nodeLinkFn;\n\n ////////////////////\n\n function addLinkFns(pre, post, attrStart, attrEnd) {\n if (pre) {\n if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n pre.require = directive.require;\n pre.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n }\n preLinkFns.push(pre);\n }\n if (post) {\n if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n post.require = directive.require;\n post.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n post = cloneAndAnnotateFn(post, {isolateScope: true});\n }\n postLinkFns.push(post);\n }\n }\n\n\n function getControllers(directiveName, require, $element, elementControllers) {\n var value, retrievalMethod = 'data', optional = false;\n if (isString(require)) {\n while((value = require.charAt(0)) == '^' || value == '?') {\n require = require.substr(1);\n if (value == '^') {\n retrievalMethod = 'inheritedData';\n }\n optional = optional || value == '?';\n }\n value = null;\n\n if (elementControllers && retrievalMethod === 'data') {\n if (value = elementControllers[require]) {\n value = value.instance;\n }\n }\n value = value || $element[retrievalMethod]('$' + require + 'Controller');\n\n if (!value && !optional) {\n throw $compileMinErr('ctreq',\n \"Controller '{0}', required by directive '{1}', can't be found!\",\n require, directiveName);\n }\n return value;\n } else if (isArray(require)) {\n value = [];\n forEach(require, function(require) {\n value.push(getControllers(directiveName, require, $element, elementControllers));\n });\n }\n return value;\n }\n\n\n function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n var i, ii, linkFn, controller, isolateScope, elementControllers, transcludeFn, $element,\n attrs;\n\n if (compileNode === linkNode) {\n attrs = templateAttrs;\n $element = templateAttrs.$$element;\n } else {\n $element = jqLite(linkNode);\n attrs = new Attributes($element, templateAttrs);\n }\n\n if (newIsolateScopeDirective) {\n isolateScope = scope.$new(true);\n }\n\n transcludeFn = boundTranscludeFn && controllersBoundTransclude;\n if (controllerDirectives) {\n // TODO: merge `controllers` and `elementControllers` into single object.\n controllers = {};\n elementControllers = {};\n forEach(controllerDirectives, function(directive) {\n var locals = {\n $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n $element: $element,\n $attrs: attrs,\n $transclude: transcludeFn\n }, controllerInstance;\n\n controller = directive.controller;\n if (controller == '@') {\n controller = attrs[directive.name];\n }\n\n controllerInstance = $controller(controller, locals, true, directive.controllerAs);\n\n // For directives with element transclusion the element is a comment,\n // but jQuery .data doesn't support attaching data to comment nodes as it's hard to\n // clean up (http://bugs.jquery.com/ticket/8335).\n // Instead, we save the controllers for the element in a local hash and attach to .data\n // later, once we have the actual element.\n elementControllers[directive.name] = controllerInstance;\n if (!hasElementTranscludeDirective) {\n $element.data('$' + directive.name + 'Controller', controllerInstance.instance);\n }\n\n controllers[directive.name] = controllerInstance;\n });\n }\n\n if (newIsolateScopeDirective) {\n var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n\n compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||\n templateDirective === newIsolateScopeDirective.$$originalDirective)));\n compile.$$addScopeClass($element, true);\n\n var isolateScopeController = controllers && controllers[newIsolateScopeDirective.name];\n var isolateBindingContext = isolateScope;\n if (isolateScopeController && isolateScopeController.identifier &&\n newIsolateScopeDirective.bindToController === true) {\n isolateBindingContext = isolateScopeController.instance;\n }\n\n forEach(isolateScope.$$isolateBindings = newIsolateScopeDirective.$$isolateBindings, function(definition, scopeName) {\n var attrName = definition.attrName,\n optional = definition.optional,\n mode = definition.mode, // @, =, or &\n lastValue,\n parentGet, parentSet, compare;\n\n switch (mode) {\n\n case '@':\n attrs.$observe(attrName, function(value) {\n isolateBindingContext[scopeName] = value;\n });\n attrs.$$observers[attrName].$$scope = scope;\n if( attrs[attrName] ) {\n // If the attribute has been provided then we trigger an interpolation to ensure\n // the value is there for use in the link fn\n isolateBindingContext[scopeName] = $interpolate(attrs[attrName])(scope);\n }\n break;\n\n case '=':\n if (optional && !attrs[attrName]) {\n return;\n }\n parentGet = $parse(attrs[attrName]);\n if (parentGet.literal) {\n compare = equals;\n } else {\n compare = function(a,b) { return a === b || (a !== a && b !== b); };\n }\n parentSet = parentGet.assign || function() {\n // reset the change, or we will throw this exception on every $digest\n lastValue = isolateBindingContext[scopeName] = parentGet(scope);\n throw $compileMinErr('nonassign',\n \"Expression '{0}' used with directive '{1}' is non-assignable!\",\n attrs[attrName], newIsolateScopeDirective.name);\n };\n lastValue = isolateBindingContext[scopeName] = parentGet(scope);\n var parentValueWatch = function parentValueWatch(parentValue) {\n if (!compare(parentValue, isolateBindingContext[scopeName])) {\n // we are out of sync and need to copy\n if (!compare(parentValue, lastValue)) {\n // parent changed and it has precedence\n isolateBindingContext[scopeName] = parentValue;\n } else {\n // if the parent can be assigned then do so\n parentSet(scope, parentValue = isolateBindingContext[scopeName]);\n }\n }\n return lastValue = parentValue;\n };\n parentValueWatch.$stateful = true;\n var unwatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);\n isolateScope.$on('$destroy', unwatch);\n break;\n\n case '&':\n parentGet = $parse(attrs[attrName]);\n isolateBindingContext[scopeName] = function(locals) {\n return parentGet(scope, locals);\n };\n break;\n }\n });\n }\n if (controllers) {\n forEach(controllers, function(controller) {\n controller();\n });\n controllers = null;\n }\n\n // PRELINKING\n for(i = 0, ii = preLinkFns.length; i < ii; i++) {\n linkFn = preLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // RECURSION\n // We only pass the isolate scope, if the isolate directive has a template,\n // otherwise the child elements do not belong to the isolate directive.\n var scopeToChild = scope;\n if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n scopeToChild = isolateScope;\n }\n childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n\n // POSTLINKING\n for(i = postLinkFns.length - 1; i >= 0; i--) {\n linkFn = postLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // This is the function that is injected as `$transclude`.\n // Note: all arguments are optional!\n function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement) {\n var transcludeControllers;\n\n // No scope passed in:\n if (!isScope(scope)) {\n futureParentElement = cloneAttachFn;\n cloneAttachFn = scope;\n scope = undefined;\n }\n\n if (hasElementTranscludeDirective) {\n transcludeControllers = elementControllers;\n }\n if (!futureParentElement) {\n futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;\n }\n return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement);\n }\n }\n }\n\n function markDirectivesAsIsolate(directives) {\n // mark all directives as needing isolate scope.\n for (var j = 0, jj = directives.length; j < jj; j++) {\n directives[j] = inherit(directives[j], {$$isolateScope: true});\n }\n }\n\n /**\n * looks up the directive and decorates it with exception handling and proper parameters. We\n * call this the boundDirective.\n *\n * @param {string} name name of the directive to look up.\n * @param {string} location The directive must be found in specific format.\n * String containing any of theses characters:\n *\n * * `E`: element name\n * * `A': attribute\n * * `C`: class\n * * `M`: comment\n * @returns {boolean} true if directive was added.\n */\n function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n endAttrName) {\n if (name === ignoreDirective) return null;\n var match = null;\n if (hasDirectives.hasOwnProperty(name)) {\n for(var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i directive.priority) &&\n directive.restrict.indexOf(location) != -1) {\n if (startAttrName) {\n directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n }\n tDirectives.push(directive);\n match = directive;\n }\n } catch(e) { $exceptionHandler(e); }\n }\n }\n return match;\n }\n\n\n /**\n * looks up the directive and returns true if it is a multi-element directive,\n * and therefore requires DOM nodes between -start and -end markers to be grouped\n * together.\n *\n * @param {string} name name of the directive to look up.\n * @returns true if directive was registered as multi-element.\n */\n function directiveIsMultiElement(name) {\n if (hasDirectives.hasOwnProperty(name)) {\n for(var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i'+template+''+type+'>';\n return wrapper.childNodes[0].childNodes;\n default:\n return template;\n }\n }\n\n\n function getTrustedContext(node, attrNormalizedName) {\n if (attrNormalizedName == \"srcdoc\") {\n return $sce.HTML;\n }\n var tag = nodeName_(node);\n // maction[xlink:href] can source SVG. It's not limited to .\n if (attrNormalizedName == \"xlinkHref\" ||\n (tag == \"form\" && attrNormalizedName == \"action\") ||\n (tag != \"img\" && (attrNormalizedName == \"src\" ||\n attrNormalizedName == \"ngSrc\"))) {\n return $sce.RESOURCE_URL;\n }\n }\n\n\n function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {\n var interpolateFn = $interpolate(value, true);\n\n // no interpolation found -> ignore\n if (!interpolateFn) return;\n\n\n if (name === \"multiple\" && nodeName_(node) === \"select\") {\n throw $compileMinErr(\"selmulti\",\n \"Binding to the 'multiple' attribute is not supported. Element: {0}\",\n startingTag(node));\n }\n\n directives.push({\n priority: 100,\n compile: function() {\n return {\n pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n var $$observers = (attr.$$observers || (attr.$$observers = {}));\n\n if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n throw $compileMinErr('nodomevents',\n \"Interpolations for HTML DOM event attributes are disallowed. Please use the \" +\n \"ng- versions (such as ng-click instead of onclick) instead.\");\n }\n\n // we need to interpolate again, in case the attribute value has been updated\n // (e.g. by another directive's compile function)\n interpolateFn = $interpolate(attr[name], true, getTrustedContext(node, name),\n ALL_OR_NOTHING_ATTRS[name] || allOrNothing);\n\n // if attribute was updated so that there is no interpolation going on we don't want to\n // register any observers\n if (!interpolateFn) return;\n\n // initialize attr object so that it's ready in case we need the value for isolate\n // scope initialization, otherwise the value would not be available from isolate\n // directive's linking fn during linking phase\n attr[name] = interpolateFn(scope);\n\n ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n (attr.$$observers && attr.$$observers[name].$$scope || scope).\n $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n //special case for class attribute addition + removal\n //so that class changes can tap into the animation\n //hooks provided by the $animate service. Be sure to\n //skip animations when the first digest occurs (when\n //both the new and the old values are the same) since\n //the CSS classes are the non-interpolated values\n if(name === 'class' && newValue != oldValue) {\n attr.$updateClass(newValue, oldValue);\n } else {\n attr.$set(name, newValue);\n }\n });\n }\n };\n }\n });\n }\n\n\n /**\n * This is a special jqLite.replaceWith, which can replace items which\n * have no parents, provided that the containing jqLite collection is provided.\n *\n * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n * in the root of the tree.\n * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n * the shell, but replace its DOM node reference.\n * @param {Node} newNode The new DOM node.\n */\n function replaceWith($rootElement, elementsToRemove, newNode) {\n var firstElementToRemove = elementsToRemove[0],\n removeCount = elementsToRemove.length,\n parent = firstElementToRemove.parentNode,\n i, ii;\n\n if ($rootElement) {\n for(i = 0, ii = $rootElement.length; i < ii; i++) {\n if ($rootElement[i] == firstElementToRemove) {\n $rootElement[i++] = newNode;\n for (var j = i, j2 = j + removeCount - 1,\n jj = $rootElement.length;\n j < jj; j++, j2++) {\n if (j2 < jj) {\n $rootElement[j] = $rootElement[j2];\n } else {\n delete $rootElement[j];\n }\n }\n $rootElement.length -= removeCount - 1;\n\n // If the replaced element is also the jQuery .context then replace it\n // .context is a deprecated jQuery api, so we should set it only when jQuery set it\n // http://api.jquery.com/context/\n if ($rootElement.context === firstElementToRemove) {\n $rootElement.context = newNode;\n }\n break;\n }\n }\n }\n\n if (parent) {\n parent.replaceChild(newNode, firstElementToRemove);\n }\n\n // TODO(perf): what's this document fragment for? is it needed? can we at least reuse it?\n var fragment = document.createDocumentFragment();\n fragment.appendChild(firstElementToRemove);\n\n // Copy over user data (that includes Angular's $scope etc.). Don't copy private\n // data here because there's no public interface in jQuery to do that and copying over\n // event listeners (which is the main use of private data) wouldn't work anyway.\n jqLite(newNode).data(jqLite(firstElementToRemove).data());\n\n // Remove data of the replaced element. We cannot just call .remove()\n // on the element it since that would deallocate scope that is needed\n // for the new node. Instead, remove the data \"manually\".\n if (!jQuery) {\n delete jqLite.cache[firstElementToRemove[jqLite.expando]];\n } else {\n // jQuery 2.x doesn't expose the data storage. Use jQuery.cleanData to clean up after\n // the replaced element. The cleanData version monkey-patched by Angular would cause\n // the scope to be trashed and we do need the very same scope to work with the new\n // element. However, we cannot just cache the non-patched version and use it here as\n // that would break if another library patches the method after Angular does (one\n // example is jQuery UI). Instead, set a flag indicating scope destroying should be\n // skipped this one time.\n skipDestroyOnNextJQueryCleanData = true;\n jQuery.cleanData([firstElementToRemove]);\n }\n\n for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {\n var element = elementsToRemove[k];\n jqLite(element).remove(); // must do this way to clean up expando\n fragment.appendChild(element);\n delete elementsToRemove[k];\n }\n\n elementsToRemove[0] = newNode;\n elementsToRemove.length = 1;\n }\n\n\n function cloneAndAnnotateFn(fn, annotation) {\n return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n }\n\n\n function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {\n try {\n linkFn(scope, $element, attrs, controllers, transcludeFn);\n } catch(e) {\n $exceptionHandler(e, startingTag($element));\n }\n }\n }];\n}\n\nvar PREFIX_REGEXP = /^(x[\\:\\-_]|data[\\:\\-_])/i;\n/**\n * Converts all accepted directives format into proper directive name.\n * All of these will become 'myDirective':\n * my:Directive\n * my-directive\n * x-my-directive\n * data-my:directive\n *\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction directiveNormalize(name) {\n return camelCase(name.replace(PREFIX_REGEXP, ''));\n}\n\n/**\n * @ngdoc type\n * @name $compile.directive.Attributes\n *\n * @description\n * A shared object between directive compile / linking functions which contains normalized DOM\n * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n * needed since all of these are treated as equivalent in Angular:\n *\n * ```\n * \n * ```\n */\n\n/**\n * @ngdoc property\n * @name $compile.directive.Attributes#$attr\n *\n * @description\n * A map of DOM element attribute names to the normalized name. This is\n * needed to do reverse lookup from normalized name back to actual name.\n */\n\n\n/**\n * @ngdoc method\n * @name $compile.directive.Attributes#$set\n * @kind function\n *\n * @description\n * Set DOM element attribute value.\n *\n *\n * @param {string} name Normalized element attribute name of the property to modify. The name is\n * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n * property to the original name.\n * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n */\n\n\n\n/**\n * Closure compiler type information\n */\n\nfunction nodesetLinkingFn(\n /* angular.Scope */ scope,\n /* NodeList */ nodeList,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n){}\n\nfunction directiveLinkingFn(\n /* nodesetLinkingFn */ nodesetLinkingFn,\n /* angular.Scope */ scope,\n /* Node */ node,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n){}\n\nfunction tokenDifference(str1, str2) {\n var values = '',\n tokens1 = str1.split(/\\s+/),\n tokens2 = str2.split(/\\s+/);\n\n outer:\n for(var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for(var j = 0; j < tokens2.length; j++) {\n if(token == tokens2[j]) continue outer;\n }\n values += (values.length > 0 ? ' ' : '') + token;\n }\n return values;\n}\n\n/**\n * @ngdoc provider\n * @name $controllerProvider\n * @description\n * The {@link ng.$controller $controller service} is used by Angular to create new\n * controllers.\n *\n * This provider allows controller registration via the\n * {@link ng.$controllerProvider#register register} method.\n */\nfunction $ControllerProvider() {\n var controllers = {},\n globals = false,\n CNTRL_REG = /^(\\S+)(\\s+as\\s+(\\w+))?$/;\n\n\n /**\n * @ngdoc method\n * @name $controllerProvider#register\n * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n * the names and the values are the constructors.\n * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n * annotations in the array notation).\n */\n this.register = function(name, constructor) {\n assertNotHasOwnProperty(name, 'controller');\n if (isObject(name)) {\n extend(controllers, name);\n } else {\n controllers[name] = constructor;\n }\n };\n\n /**\n * @ngdoc method\n * @name $controllerProvider#allowGlobals\n * @description If called, allows `$controller` to find controller constructors on `window`\n */\n this.allowGlobals = function() {\n globals = true;\n };\n\n\n this.$get = ['$injector', '$window', function($injector, $window) {\n\n /**\n * @ngdoc service\n * @name $controller\n * @requires $injector\n *\n * @param {Function|string} constructor If called with a function then it's considered to be the\n * controller constructor function. Otherwise it's considered to be a string which is used\n * to retrieve the controller constructor using the following steps:\n *\n * * check if a controller with given name is registered via `$controllerProvider`\n * * check if evaluating the string on the current scope returns a constructor\n * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global\n * `window` object (not recommended)\n *\n * @param {Object} locals Injection locals for Controller.\n * @return {Object} Instance of given controller.\n *\n * @description\n * `$controller` service is responsible for instantiating controllers.\n *\n * It's just a simple call to {@link auto.$injector $injector}, but extracted into\n * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).\n */\n return function(expression, locals, later, ident) {\n // PRIVATE API:\n // param `later` --- indicates that the controller's constructor is invoked at a later time.\n // If true, $controller will allocate the object with the correct\n // prototype chain, but will not invoke the controller until a returned\n // callback is invoked.\n // param `ident` --- An optional label which overrides the label parsed from the controller\n // expression, if any.\n var instance, match, constructor, identifier;\n later = later === true;\n if (ident && isString(ident)) {\n identifier = ident;\n }\n\n if(isString(expression)) {\n match = expression.match(CNTRL_REG),\n constructor = match[1],\n identifier = identifier || match[3];\n expression = controllers.hasOwnProperty(constructor)\n ? controllers[constructor]\n : getter(locals.$scope, constructor, true) ||\n (globals ? getter($window, constructor, true) : undefined);\n\n assertArgFn(expression, constructor, true);\n }\n\n if (later) {\n // Instantiate controller later:\n // This machinery is used to create an instance of the object before calling the\n // controller's constructor itself.\n //\n // This allows properties to be added to the controller before the constructor is\n // invoked. Primarily, this is used for isolate scope bindings in $compile.\n //\n // This feature is not intended for use by applications, and is thus not documented\n // publicly.\n var Constructor = function() {};\n Constructor.prototype = (isArray(expression) ?\n expression[expression.length - 1] : expression).prototype;\n instance = new Constructor();\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return extend(function() {\n $injector.invoke(expression, instance, locals, constructor);\n return instance;\n }, {\n instance: instance,\n identifier: identifier\n });\n }\n\n instance = $injector.instantiate(expression, locals, constructor);\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return instance;\n };\n\n function addIdentifier(locals, identifier, instance, name) {\n if (!(locals && isObject(locals.$scope))) {\n throw minErr('$controller')('noscp',\n \"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.\",\n name, identifier);\n }\n\n locals.$scope[identifier] = instance;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $document\n * @requires $window\n *\n * @description\n * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n *\n * @example\n \n \n \n $document title: \n window.document title: \n \n \n \n angular.module('documentExample', [])\n .controller('ExampleController', ['$scope', '$document', function($scope, $document) {\n $scope.title = $document[0].title;\n $scope.windowTitle = angular.element(window.document)[0].title;\n }]);\n \n \n */\nfunction $DocumentProvider(){\n this.$get = ['$window', function(window){\n return jqLite(window.document);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $exceptionHandler\n * @requires ng.$log\n *\n * @description\n * Any uncaught exception in angular expressions is delegated to this service.\n * The default implementation simply delegates to `$log.error` which logs it into\n * the browser console.\n *\n * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n *\n * ## Example:\n *\n * ```js\n * angular.module('exceptionOverride', []).factory('$exceptionHandler', function () {\n * return function (exception, cause) {\n * exception.message += ' (caused by \"' + cause + '\")';\n * throw exception;\n * };\n * });\n * ```\n *\n * This example will override the normal action of `$exceptionHandler`, to make angular\n * exceptions fail hard when they happen, instead of just logging to the console.\n *\n * @param {Error} exception Exception associated with the error.\n * @param {string=} cause optional information about the context in which\n * the error was thrown.\n *\n */\nfunction $ExceptionHandlerProvider() {\n this.$get = ['$log', function($log) {\n return function(exception, cause) {\n $log.error.apply($log, arguments);\n };\n }];\n}\n\n/**\n * Parse headers into key value object\n *\n * @param {string} headers Raw headers as a string\n * @returns {Object} Parsed headers as key value object\n */\nfunction parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = lowercase(trim(line.substr(0, i)));\n val = trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n}\n\n\n/**\n * Returns a function that provides access to parsed headers.\n *\n * Headers are lazy parsed when first requested.\n * @see parseHeaders\n *\n * @param {(string|Object)} headers Headers to provide access to.\n * @returns {function(string=)} Returns a getter function which if called with:\n *\n * - if called with single an argument returns a single header value or null\n * - if called with no arguments returns an object containing all headers.\n */\nfunction headersGetter(headers) {\n var headersObj = isObject(headers) ? headers : undefined;\n\n return function(name) {\n if (!headersObj) headersObj = parseHeaders(headers);\n\n if (name) {\n return headersObj[lowercase(name)] || null;\n }\n\n return headersObj;\n };\n}\n\n\n/**\n * Chain all given functions\n *\n * This function is used for both request and response transforming\n *\n * @param {*} data Data to transform.\n * @param {function(string=)} headers Http headers getter fn.\n * @param {(Function|Array.)} fns Function or an array of functions.\n * @returns {*} Transformed data.\n */\nfunction transformData(data, headers, fns) {\n if (isFunction(fns))\n return fns(data, headers);\n\n forEach(fns, function(fn) {\n data = fn(data, headers);\n });\n\n return data;\n}\n\n\nfunction isSuccess(status) {\n return 200 <= status && status < 300;\n}\n\n\n/**\n * @ngdoc provider\n * @name $httpProvider\n * @description\n * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.\n * */\nfunction $HttpProvider() {\n var JSON_START = /^\\s*(\\[|\\{[^\\{])/,\n JSON_END = /[\\}\\]]\\s*$/,\n PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/,\n CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': 'application/json;charset=utf-8'};\n\n /**\n * @ngdoc property\n * @name $httpProvider#defaults\n * @description\n *\n * Object containing default values for all {@link ng.$http $http} requests.\n *\n * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.\n * Defaults value is `'XSRF-TOKEN'`.\n *\n * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the\n * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.\n *\n * - **`defaults.headers`** - {Object} - Default headers for all $http requests.\n * Refer to {@link ng.$http#setting-http-headers $http} for documentation on\n * setting default headers.\n * - **`defaults.headers.common`**\n * - **`defaults.headers.post`**\n * - **`defaults.headers.put`**\n * - **`defaults.headers.patch`**\n **/\n var defaults = this.defaults = {\n // transform incoming response data\n transformResponse: [function(data) {\n if (isString(data)) {\n // strip json vulnerability protection prefix\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data))\n data = fromJson(data);\n }\n return data;\n }],\n\n // transform outgoing request data\n transformRequest: [function(d) {\n return isObject(d) && !isFile(d) && !isBlob(d) ? toJson(d) : d;\n }],\n\n // default headers\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n };\n\n var useApplyAsync = false;\n /**\n * @ngdoc method\n * @name $httpProvider#useApplyAsync\n * @description\n *\n * Configure $http service to combine processing of multiple http responses received at around\n * the same time via {@link ng.$rootScope#applyAsync $rootScope.$applyAsync}. This can result in\n * significant performance improvement for bigger applications that make many HTTP requests\n * concurrently (common during application bootstrap).\n *\n * Defaults to false. If no value is specifed, returns the current configured value.\n *\n * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred\n * \"apply\" on the next tick, giving time for subsequent requests in a roughly ~10ms window\n * to load and share the same digest cycle.\n *\n * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n * otherwise, returns the current configured value.\n **/\n this.useApplyAsync = function(value) {\n if (isDefined(value)) {\n useApplyAsync = !!value;\n return this;\n }\n return useApplyAsync;\n };\n\n /**\n * Are ordered by request, i.e. they are applied in the same order as the\n * array, on request, but reverse order, on response.\n */\n var interceptorFactories = this.interceptors = [];\n\n this.$get = ['$httpBackend', '$browser', '$cacheFactory', '$rootScope', '$q', '$injector',\n function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) {\n\n var defaultCache = $cacheFactory('$http');\n\n /**\n * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n * The reversal is needed so that we can build up the interception chain around the\n * server request.\n */\n var reversedInterceptors = [];\n\n forEach(interceptorFactories, function(interceptorFactory) {\n reversedInterceptors.unshift(isString(interceptorFactory)\n ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n });\n\n /**\n * @ngdoc service\n * @kind function\n * @name $http\n * @requires ng.$httpBackend\n * @requires $cacheFactory\n * @requires $rootScope\n * @requires $q\n * @requires $injector\n *\n * @description\n * The `$http` service is a core Angular service that facilitates communication with the remote\n * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)\n * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).\n *\n * For unit testing applications that use `$http` service, see\n * {@link ngMock.$httpBackend $httpBackend mock}.\n *\n * For a higher level of abstraction, please check out the {@link ngResource.$resource\n * $resource} service.\n *\n * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n * it is important to familiarize yourself with these APIs and the guarantees they provide.\n *\n *\n * ## General usage\n * The `$http` service is a function which takes a single argument — a configuration object —\n * that is used to generate an HTTP request and returns a {@link ng.$q promise}\n * with two $http specific methods: `success` and `error`.\n *\n * ```js\n * $http({method: 'GET', url: '/someUrl'}).\n * success(function(data, status, headers, config) {\n * // this callback will be called asynchronously\n * // when the response is available\n * }).\n * error(function(data, status, headers, config) {\n * // called asynchronously if an error occurs\n * // or server returns response with an error status.\n * });\n * ```\n *\n * Since the returned value of calling the $http function is a `promise`, you can also use\n * the `then` method to register callbacks, and these callbacks will receive a single argument –\n * an object representing the response. See the API signature and type info below for more\n * details.\n *\n * A response status code between 200 and 299 is considered a success status and\n * will result in the success callback being called. Note that if the response is a redirect,\n * XMLHttpRequest will transparently follow it, meaning that the error callback will not be\n * called for such responses.\n *\n * ## Writing Unit Tests that use $http\n * When unit testing (using {@link ngMock ngMock}), it is necessary to call\n * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending\n * request using trained responses.\n *\n * ```\n * $httpBackend.expectGET(...);\n * $http.get(...);\n * $httpBackend.flush();\n * ```\n *\n * ## Shortcut methods\n *\n * Shortcut methods are also available. All shortcut methods require passing in the URL, and\n * request data must be passed in for POST/PUT requests.\n *\n * ```js\n * $http.get('/someUrl').success(successCallback);\n * $http.post('/someUrl', data).success(successCallback);\n * ```\n *\n * Complete list of shortcut methods:\n *\n * - {@link ng.$http#get $http.get}\n * - {@link ng.$http#head $http.head}\n * - {@link ng.$http#post $http.post}\n * - {@link ng.$http#put $http.put}\n * - {@link ng.$http#delete $http.delete}\n * - {@link ng.$http#jsonp $http.jsonp}\n * - {@link ng.$http#patch $http.patch}\n *\n *\n * ## Setting HTTP Headers\n *\n * The $http service will automatically add certain HTTP headers to all requests. These defaults\n * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n * object, which currently contains this default configuration:\n *\n * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n * - `Accept: application/json, text/plain, * / *`\n * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n * - `Content-Type: application/json`\n * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n * - `Content-Type: application/json`\n *\n * To add or overwrite these defaults, simply add or remove a property from these configuration\n * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n * with the lowercased HTTP method name as the key, e.g.\n * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.\n *\n * The defaults can also be set at runtime via the `$http.defaults` object in the same\n * fashion. For example:\n *\n * ```\n * module.run(function($http) {\n * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'\n * });\n * ```\n *\n * In addition, you can supply a `headers` property in the config object passed when\n * calling `$http(config)`, which overrides the defaults without changing them globally.\n *\n *\n * ## Transforming Requests and Responses\n *\n * Both requests and responses can be transformed using transformation functions: `transformRequest`\n * and `transformResponse`. These properties can be a single function that returns\n * the transformed value (`{function(data, headersGetter)`) or an array of such transformation functions,\n * which allows you to `push` or `unshift` a new transformation function into the transformation chain.\n *\n * ### Default Transformations\n *\n * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and\n * `defaults.transformResponse` properties. If a request does not provide its own transformations\n * then these will be applied.\n *\n * You can augment or replace the default transformations by modifying these properties by adding to or\n * replacing the array.\n *\n * Angular provides the following default transformations:\n *\n * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`):\n *\n * - If the `data` property of the request configuration object contains an object, serialize it\n * into JSON format.\n *\n * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`):\n *\n * - If XSRF prefix is detected, strip it (see Security Considerations section below).\n * - If JSON response is detected, deserialize it using a JSON parser.\n *\n *\n * ### Overriding the Default Transformations Per Request\n *\n * If you wish override the request/response transformations only for a single request then provide\n * `transformRequest` and/or `transformResponse` properties on the configuration object passed\n * into `$http`.\n *\n * Note that if you provide these properties on the config object the default transformations will be\n * overwritten. If you wish to augment the default transformations then you must include them in your\n * local transformation array.\n *\n * The following code demonstrates adding a new response transformation to be run after the default response\n * transformations have been run.\n *\n * ```js\n * function appendTransform(defaults, transform) {\n *\n * // We can't guarantee that the default transformation is an array\n * defaults = angular.isArray(defaults) ? defaults : [defaults];\n *\n * // Append the new transformation to the defaults\n * return defaults.concat(transform);\n * }\n *\n * $http({\n * url: '...',\n * method: 'GET',\n * transformResponse: appendTransform($http.defaults.transformResponse, function(value) {\n * return doTransform(value);\n * })\n * });\n * ```\n *\n *\n * ## Caching\n *\n * To enable caching, set the request configuration `cache` property to `true` (to use default\n * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}).\n * When the cache is enabled, `$http` stores the response from the server in the specified\n * cache. The next time the same request is made, the response is served from the cache without\n * sending a request to the server.\n *\n * Note that even if the response is served from cache, delivery of the data is asynchronous in\n * the same way that real requests are.\n *\n * If there are multiple GET requests for the same URL that should be cached using the same\n * cache, but the cache is not populated yet, only one request to the server will be made and\n * the remaining requests will be fulfilled using the response from the first request.\n *\n * You can change the default cache to a new object (built with\n * {@link ng.$cacheFactory `$cacheFactory`}) by updating the\n * {@link ng.$http#properties_defaults `$http.defaults.cache`} property. All requests who set\n * their `cache` property to `true` will now use this cache object.\n *\n * If you set the default cache to `false` then only requests that specify their own custom\n * cache object will be cached.\n *\n * ## Interceptors\n *\n * Before you start creating interceptors, be sure to understand the\n * {@link ng.$q $q and deferred/promise APIs}.\n *\n * For purposes of global error handling, authentication, or any kind of synchronous or\n * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n * able to intercept requests before they are handed to the server and\n * responses before they are handed over to the application code that\n * initiated these requests. The interceptors leverage the {@link ng.$q\n * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n *\n * The interceptors are service factories that are registered with the `$httpProvider` by\n * adding them to the `$httpProvider.interceptors` array. The factory is called and\n * injected with dependencies (if specified) and returns the interceptor.\n *\n * There are two kinds of interceptors (and two kinds of rejection interceptors):\n *\n * * `request`: interceptors get called with a http `config` object. The function is free to\n * modify the `config` object or create a new one. The function needs to return the `config`\n * object directly, or a promise containing the `config` or a new `config` object.\n * * `requestError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n * * `response`: interceptors get called with http `response` object. The function is free to\n * modify the `response` object or create a new one. The function needs to return the `response`\n * object directly, or as a promise containing the `response` or a new `response` object.\n * * `responseError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n *\n *\n * ```js\n * // register the interceptor as a service\n * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n * return {\n * // optional method\n * 'request': function(config) {\n * // do something on success\n * return config;\n * },\n *\n * // optional method\n * 'requestError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * },\n *\n *\n *\n * // optional method\n * 'response': function(response) {\n * // do something on success\n * return response;\n * },\n *\n * // optional method\n * 'responseError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * }\n * };\n * });\n *\n * $httpProvider.interceptors.push('myHttpInterceptor');\n *\n *\n * // alternatively, register the interceptor via an anonymous factory\n * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n * return {\n * 'request': function(config) {\n * // same as above\n * },\n *\n * 'response': function(response) {\n * // same as above\n * }\n * };\n * });\n * ```\n *\n * ## Security Considerations\n *\n * When designing web applications, consider security threats from:\n *\n * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)\n *\n * Both server and the client must cooperate in order to eliminate these threats. Angular comes\n * pre-configured with strategies that address these issues, but for this to work backend server\n * cooperation is required.\n *\n * ### JSON Vulnerability Protection\n *\n * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * allows third party website to turn your JSON resource URL into\n * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To\n * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n * Angular will automatically strip the prefix before processing it as JSON.\n *\n * For example if your server needs to return:\n * ```js\n * ['one','two']\n * ```\n *\n * which is vulnerable to attack, your server can return:\n * ```js\n * )]}',\n * ['one','two']\n * ```\n *\n * Angular will strip the prefix, before processing the JSON.\n *\n *\n * ### Cross Site Request Forgery (XSRF) Protection\n *\n * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is a technique by which\n * an unauthorized site can gain your user's private data. Angular provides a mechanism\n * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie\n * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only\n * JavaScript that runs on your domain could read the cookie, your server can be assured that\n * the XHR came from JavaScript running on your domain. The header will not be set for\n * cross-domain requests.\n *\n * To take advantage of this, your server needs to set a token in a JavaScript readable session\n * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure\n * that only JavaScript running on your domain could have sent the request. The token must be\n * unique for each user and must be verifiable by the server (to prevent the JavaScript from\n * making up its own tokens). We recommend that the token is a digest of your site's\n * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography))\n * for added security.\n *\n * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName\n * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,\n * or the per-request config object.\n *\n *\n * @param {object} config Object describing the request to be made and how it should be\n * processed. The object has following properties:\n *\n * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)\n * - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.\n * - **params** – `{Object.}` – Map of strings or objects which will be turned\n * to `?key1=value1&key2=value2` after the url. If the value is not a string, it will be\n * JSONified.\n * - **data** – `{string|Object}` – Data to be sent as the request message data.\n * - **headers** – `{Object}` – Map of strings or functions which return strings representing\n * HTTP headers to send to the server. If the return value of a function is null, the\n * header will not be sent.\n * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.\n * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.\n * - **transformRequest** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * request body and headers and returns its transformed (typically serialized) version.\n * See {@link #overriding-the-default-transformations-per-request Overriding the Default Transformations}\n * - **transformResponse** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * response body and headers and returns its transformed (typically deserialized) version.\n * See {@link #overriding-the-default-transformations-per-request Overriding the Default Transformations}\n * - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the\n * GET request, otherwise if a cache instance built with\n * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for\n * caching.\n * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}\n * that should abort the request when resolved.\n * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the\n * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)\n * for more information.\n * - **responseType** - `{string}` - see\n * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).\n *\n * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the\n * standard `then` method and two http specific methods: `success` and `error`. The `then`\n * method takes two arguments a success and an error callback which will be called with a\n * response object. The `success` and `error` methods take a single argument - a function that\n * will be called when the request succeeds or fails respectively. The arguments passed into\n * these functions are destructured representation of the response object passed into the\n * `then` method. The response object has these properties:\n *\n * - **data** – `{string|Object}` – The response body transformed with the transform\n * functions.\n * - **status** – `{number}` – HTTP status code of the response.\n * - **headers** – `{function([headerName])}` – Header getter function.\n * - **config** – `{Object}` – The configuration object that was used to generate the request.\n * - **statusText** – `{string}` – HTTP status text of the response.\n *\n * @property {Array.} pendingRequests Array of config objects for currently pending\n * requests. This is primarily meant to be used for debugging purposes.\n *\n *\n * @example\n\n\n \n \n GET\n JSONP\n \n \n fetch\n Sample GET\n \n Sample JSONP\n \n \n Invalid JSONP\n \n http status code: {{status}}\n http response data: {{data}}\n \n\n\n angular.module('httpExample', [])\n .controller('FetchController', ['$scope', '$http', '$templateCache',\n function($scope, $http, $templateCache) {\n $scope.method = 'GET';\n $scope.url = 'http-hello.html';\n\n $scope.fetch = function() {\n $scope.code = null;\n $scope.response = null;\n\n $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n success(function(data, status) {\n $scope.status = status;\n $scope.data = data;\n }).\n error(function(data, status) {\n $scope.data = data || \"Request failed\";\n $scope.status = status;\n });\n };\n\n $scope.updateModel = function(method, url) {\n $scope.method = method;\n $scope.url = url;\n };\n }]);\n\n\n Hello, $http!\n\n\n var status = element(by.binding('status'));\n var data = element(by.binding('data'));\n var fetchBtn = element(by.id('fetchbtn'));\n var sampleGetBtn = element(by.id('samplegetbtn'));\n var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\n it('should make an xhr GET request', function() {\n sampleGetBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('200');\n expect(data.getText()).toMatch(/Hello, \\$http!/);\n });\n\n// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185\n// it('should make a JSONP request to angularjs.org', function() {\n// sampleJsonpBtn.click();\n// fetchBtn.click();\n// expect(status.getText()).toMatch('200');\n// expect(data.getText()).toMatch(/Super Hero!/);\n// });\n\n it('should make JSONP request to invalid URL and invoke the error handler',\n function() {\n invalidJsonpBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('0');\n expect(data.getText()).toMatch('Request failed');\n });\n\n\n */\n function $http(requestConfig) {\n var config = {\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n };\n var headers = mergeHeaders(requestConfig);\n\n extend(config, requestConfig);\n config.headers = headers;\n config.method = uppercase(config.method);\n\n var serverRequest = function(config) {\n headers = config.headers;\n var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);\n\n // strip content-type if data is undefined\n if (isUndefined(reqData)) {\n forEach(headers, function(value, header) {\n if (lowercase(header) === 'content-type') {\n delete headers[header];\n }\n });\n }\n\n if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n config.withCredentials = defaults.withCredentials;\n }\n\n // send request\n return sendReq(config, reqData, headers).then(transformResponse, transformResponse);\n };\n\n var chain = [serverRequest, undefined];\n var promise = $q.when(config);\n\n // apply interceptors\n forEach(reversedInterceptors, function(interceptor) {\n if (interceptor.request || interceptor.requestError) {\n chain.unshift(interceptor.request, interceptor.requestError);\n }\n if (interceptor.response || interceptor.responseError) {\n chain.push(interceptor.response, interceptor.responseError);\n }\n });\n\n while(chain.length) {\n var thenFn = chain.shift();\n var rejectFn = chain.shift();\n\n promise = promise.then(thenFn, rejectFn);\n }\n\n promise.success = function(fn) {\n promise.then(function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n promise.error = function(fn) {\n promise.then(null, function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n return promise;\n\n function transformResponse(response) {\n // make a copy since the response must be cacheable\n var resp = extend({}, response, {\n data: transformData(response.data, response.headers, config.transformResponse)\n });\n return (isSuccess(response.status))\n ? resp\n : $q.reject(resp);\n }\n\n function mergeHeaders(config) {\n var defHeaders = defaults.headers,\n reqHeaders = extend({}, config.headers),\n defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\n defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\n // using for-in instead of forEach to avoid unecessary iteration after header has been found\n defaultHeadersIteration:\n for (defHeaderName in defHeaders) {\n lowercaseDefHeaderName = lowercase(defHeaderName);\n\n for (reqHeaderName in reqHeaders) {\n if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n continue defaultHeadersIteration;\n }\n }\n\n reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n }\n\n // execute if header value is a function for merged headers\n execHeaders(reqHeaders);\n return reqHeaders;\n\n function execHeaders(headers) {\n var headerContent;\n\n forEach(headers, function(headerFn, header) {\n if (isFunction(headerFn)) {\n headerContent = headerFn();\n if (headerContent != null) {\n headers[header] = headerContent;\n } else {\n delete headers[header];\n }\n }\n });\n }\n }\n }\n\n $http.pendingRequests = [];\n\n /**\n * @ngdoc method\n * @name $http#get\n *\n * @description\n * Shortcut method to perform `GET` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#delete\n *\n * @description\n * Shortcut method to perform `DELETE` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#head\n *\n * @description\n * Shortcut method to perform `HEAD` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#jsonp\n *\n * @description\n * Shortcut method to perform `JSONP` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request.\n * The name of the callback should be the string `JSON_CALLBACK`.\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n createShortMethods('get', 'delete', 'head', 'jsonp');\n\n /**\n * @ngdoc method\n * @name $http#post\n *\n * @description\n * Shortcut method to perform `POST` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#put\n *\n * @description\n * Shortcut method to perform `PUT` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#patch\n *\n * @description\n * Shortcut method to perform `PATCH` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n createShortMethodsWithData('post', 'put', 'patch');\n\n /**\n * @ngdoc property\n * @name $http#defaults\n *\n * @description\n * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n * default headers, withCredentials as well as request and response transformations.\n *\n * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n */\n $http.defaults = defaults;\n\n\n return $http;\n\n\n function createShortMethods(names) {\n forEach(arguments, function(name) {\n $http[name] = function(url, config) {\n return $http(extend(config || {}, {\n method: name,\n url: url\n }));\n };\n });\n }\n\n\n function createShortMethodsWithData(name) {\n forEach(arguments, function(name) {\n $http[name] = function(url, data, config) {\n return $http(extend(config || {}, {\n method: name,\n url: url,\n data: data\n }));\n };\n });\n }\n\n\n /**\n * Makes the request.\n *\n * !!! ACCESSES CLOSURE VARS:\n * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n */\n function sendReq(config, reqData, reqHeaders) {\n var deferred = $q.defer(),\n promise = deferred.promise,\n cache,\n cachedResp,\n url = buildUrl(config.url, config.params);\n\n $http.pendingRequests.push(config);\n promise.then(removePendingReq, removePendingReq);\n\n\n if ((config.cache || defaults.cache) && config.cache !== false &&\n (config.method === 'GET' || config.method === 'JSONP')) {\n cache = isObject(config.cache) ? config.cache\n : isObject(defaults.cache) ? defaults.cache\n : defaultCache;\n }\n\n if (cache) {\n cachedResp = cache.get(url);\n if (isDefined(cachedResp)) {\n if (isPromiseLike(cachedResp)) {\n // cached request has already been sent, but there is no response yet\n cachedResp.then(removePendingReq, removePendingReq);\n return cachedResp;\n } else {\n // serving from cache\n if (isArray(cachedResp)) {\n resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);\n } else {\n resolvePromise(cachedResp, 200, {}, 'OK');\n }\n }\n } else {\n // put the promise for the non-transformed response into cache as a placeholder\n cache.put(url, promise);\n }\n }\n\n\n // if we won't have the response in cache, set the xsrf headers and\n // send the request to the backend\n if (isUndefined(cachedResp)) {\n var xsrfValue = urlIsSameOrigin(config.url)\n ? $browser.cookies()[config.xsrfCookieName || defaults.xsrfCookieName]\n : undefined;\n if (xsrfValue) {\n reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n }\n\n $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n config.withCredentials, config.responseType);\n }\n\n return promise;\n\n\n /**\n * Callback registered to $httpBackend():\n * - caches the response if desired\n * - resolves the raw $http promise\n * - calls $apply\n */\n function done(status, response, headersString, statusText) {\n if (cache) {\n if (isSuccess(status)) {\n cache.put(url, [status, response, parseHeaders(headersString), statusText]);\n } else {\n // remove promise from the cache\n cache.remove(url);\n }\n }\n\n function resolveHttpPromise() {\n resolvePromise(response, status, headersString, statusText);\n }\n\n if (useApplyAsync) {\n $rootScope.$applyAsync(resolveHttpPromise);\n } else {\n resolveHttpPromise();\n if (!$rootScope.$$phase) $rootScope.$apply();\n }\n }\n\n\n /**\n * Resolves the raw $http promise.\n */\n function resolvePromise(response, status, headers, statusText) {\n // normalize internal statuses to 0\n status = Math.max(status, 0);\n\n (isSuccess(status) ? deferred.resolve : deferred.reject)({\n data: response,\n status: status,\n headers: headersGetter(headers),\n config: config,\n statusText : statusText\n });\n }\n\n\n function removePendingReq() {\n var idx = $http.pendingRequests.indexOf(config);\n if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n }\n }\n\n\n function buildUrl(url, params) {\n if (!params) return url;\n var parts = [];\n forEachSorted(params, function(value, key) {\n if (value === null || isUndefined(value)) return;\n if (!isArray(value)) value = [value];\n\n forEach(value, function(v) {\n if (isObject(v)) {\n if (isDate(v)){\n v = v.toISOString();\n } else {\n v = toJson(v);\n }\n }\n parts.push(encodeUriQuery(key) + '=' +\n encodeUriQuery(v));\n });\n });\n if(parts.length > 0) {\n url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');\n }\n return url;\n }\n }];\n}\n\nfunction createXhr(method) {\n //if IE and the method is not RFC2616 compliant, or if XMLHttpRequest\n //is not available, try getting an ActiveXObject. Otherwise, use XMLHttpRequest\n //if it is available\n if (msie <= 8 && (!method.match(/^(get|post|head|put|delete|options)$/i) ||\n !window.XMLHttpRequest)) {\n return new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n } else if (window.XMLHttpRequest) {\n return new window.XMLHttpRequest();\n }\n\n throw minErr('$httpBackend')('noxhr', \"This browser does not support XMLHttpRequest.\");\n}\n\n/**\n * @ngdoc service\n * @name $httpBackend\n * @requires $window\n * @requires $document\n *\n * @description\n * HTTP backend used by the {@link ng.$http service} that delegates to\n * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n *\n * You should never need to use this service directly, instead use the higher-level abstractions:\n * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n *\n * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n * $httpBackend} which can be trained with responses.\n */\nfunction $HttpBackendProvider() {\n this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) {\n return createHttpBackend($browser, createXhr, $browser.defer, $window.angular.callbacks, $document[0]);\n }];\n}\n\nfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n var ABORTED = -1;\n\n // TODO(vojta): fix the signature\n return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {\n var status;\n $browser.$$incOutstandingRequestCount();\n url = url || $browser.url();\n\n if (lowercase(method) == 'jsonp') {\n var callbackId = '_' + (callbacks.counter++).toString(36);\n callbacks[callbackId] = function(data) {\n callbacks[callbackId].data = data;\n callbacks[callbackId].called = true;\n };\n\n var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),\n callbackId, function(status, text) {\n completeRequest(callback, status, callbacks[callbackId].data, \"\", text);\n callbacks[callbackId] = noop;\n });\n } else {\n\n var xhr = createXhr(method);\n\n xhr.open(method, url, true);\n forEach(headers, function(value, key) {\n if (isDefined(value)) {\n xhr.setRequestHeader(key, value);\n }\n });\n\n // In IE6 and 7, this might be called synchronously when xhr.send below is called and the\n // response is in the cache. the promise api will ensure that to the app code the api is\n // always async\n xhr.onreadystatechange = function() {\n // onreadystatechange might get called multiple times with readyState === 4 on mobile webkit caused by\n // xhrs that are resolved while the app is in the background (see #5426).\n // since calling completeRequest sets the `xhr` variable to null, we just check if it's not null before\n // continuing\n //\n // we can't set xhr.onreadystatechange to undefined or delete it because that breaks IE8 (method=PATCH) and\n // Safari respectively.\n if (xhr && xhr.readyState == 4) {\n var responseHeaders = null,\n response = null,\n statusText = '';\n\n if(status !== ABORTED) {\n responseHeaders = xhr.getAllResponseHeaders();\n\n // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n response = ('response' in xhr) ? xhr.response : xhr.responseText;\n }\n\n // Accessing statusText on an aborted xhr object will\n // throw an 'c00c023f error' in IE9 and lower, don't touch it.\n if (!(status === ABORTED && msie < 10)) {\n statusText = xhr.statusText;\n }\n\n completeRequest(callback,\n status || xhr.status,\n response,\n responseHeaders,\n statusText);\n }\n };\n\n if (withCredentials) {\n xhr.withCredentials = true;\n }\n\n if (responseType) {\n try {\n xhr.responseType = responseType;\n } catch (e) {\n // WebKit added support for the json responseType value on 09/03/2013\n // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n // known to throw when setting the value \"json\" as the response type. Other older\n // browsers implementing the responseType\n //\n // The json response type can be ignored if not supported, because JSON payloads are\n // parsed on the client-side regardless.\n if (responseType !== 'json') {\n throw e;\n }\n }\n }\n\n xhr.send(post || null);\n }\n\n if (timeout > 0) {\n var timeoutId = $browserDefer(timeoutRequest, timeout);\n } else if (isPromiseLike(timeout)) {\n timeout.then(timeoutRequest);\n }\n\n\n function timeoutRequest() {\n status = ABORTED;\n jsonpDone && jsonpDone();\n xhr && xhr.abort();\n }\n\n function completeRequest(callback, status, response, headersString, statusText) {\n // cancel timeout and subsequent timeout promise resolution\n timeoutId && $browserDefer.cancel(timeoutId);\n jsonpDone = xhr = null;\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;\n }\n\n // normalize IE bug (http://bugs.jquery.com/ticket/1450)\n status = status === 1223 ? 204 : status;\n statusText = statusText || '';\n\n callback(status, response, headersString, statusText);\n $browser.$$completeOutstandingRequest(noop);\n }\n };\n\n function jsonpReq(url, callbackId, done) {\n // we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:\n // - fetches local scripts via XHR and evals them\n // - adds and immediately removes script elements from the document\n var script = rawDocument.createElement('script'), callback = null;\n script.type = \"text/javascript\";\n script.src = url;\n script.async = true;\n\n callback = function(event) {\n removeEventListenerFn(script, \"load\", callback);\n removeEventListenerFn(script, \"error\", callback);\n rawDocument.body.removeChild(script);\n script = null;\n var status = -1;\n var text = \"unknown\";\n\n if (event) {\n if (event.type === \"load\" && !callbacks[callbackId].called) {\n event = { type: \"error\" };\n }\n text = event.type;\n status = event.type === \"error\" ? 404 : 200;\n }\n\n if (done) {\n done(status, text);\n }\n };\n\n addEventListenerFn(script, \"load\", callback);\n addEventListenerFn(script, \"error\", callback);\n rawDocument.body.appendChild(script);\n return callback;\n }\n}\n\nvar $interpolateMinErr = minErr('$interpolate');\n\n/**\n * @ngdoc provider\n * @name $interpolateProvider\n *\n * @description\n *\n * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n *\n * @example\n\n\n\n\n //demo.label//\n\n\n\n it('should interpolate binding with custom symbols', function() {\n expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n });\n\n\n */\nfunction $InterpolateProvider() {\n var startSymbol = '{{';\n var endSymbol = '}}';\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#startSymbol\n * @description\n * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n *\n * @param {string=} value new value to set the starting symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.startSymbol = function(value){\n if (value) {\n startSymbol = value;\n return this;\n } else {\n return startSymbol;\n }\n };\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * @param {string=} value new value to set the ending symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.endSymbol = function(value){\n if (value) {\n endSymbol = value;\n return this;\n } else {\n return endSymbol;\n }\n };\n\n\n this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n var startSymbolLength = startSymbol.length,\n endSymbolLength = endSymbol.length,\n escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),\n escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');\n\n function escape(ch) {\n return '\\\\\\\\\\\\' + ch;\n }\n\n /**\n * @ngdoc service\n * @name $interpolate\n * @kind function\n *\n * @requires $parse\n * @requires $sce\n *\n * @description\n *\n * Compiles a string with markup into an interpolation function. This service is used by the\n * HTML {@link ng.$compile $compile} service for data binding. See\n * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n * interpolation markup.\n *\n *\n * ```js\n * var $interpolate = ...; // injected\n * var exp = $interpolate('Hello {{name | uppercase}}!');\n * expect(exp({name:'Angular'}).toEqual('Hello ANGULAR!');\n * ```\n *\n * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is\n * `true`, the interpolation function will return `undefined` unless all embedded expressions\n * evaluate to a value other than `undefined`.\n *\n * ```js\n * var $interpolate = ...; // injected\n * var context = {greeting: 'Hello', name: undefined };\n *\n * // default \"forgiving\" mode\n * var exp = $interpolate('{{greeting}} {{name}}!');\n * expect(exp(context)).toEqual('Hello !');\n *\n * // \"allOrNothing\" mode\n * exp = $interpolate('{{greeting}} {{name}}!', false, null, true);\n * expect(exp(context)).toBeUndefined();\n * context.name = 'Angular';\n * expect(exp(context)).toEqual('Hello Angular!');\n * ```\n *\n * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.\n *\n * ####Escaped Interpolation\n * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers\n * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).\n * It will be rendered as a regular start/end marker, and will not be interpreted as an expression\n * or binding.\n *\n * This enables web-servers to prevent script injection attacks and defacing attacks, to some\n * degree, while also enabling code examples to work without relying on the\n * {@link ng.directive:ngNonBindable ngNonBindable} directive.\n *\n * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,\n * replacing angle brackets (<, >) with < and > respectively, and replacing all\n * interpolation start/end markers with their escaped counterparts.**\n *\n * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered\n * output when the $interpolate service processes the text. So, for HTML elements interpolated\n * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter\n * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,\n * this is typically useful only when user-data is used in rendering a template from the server, or\n * when otherwise untrusted data is used by a directive.\n *\n * \n * \n * \n * {{apptitle}}: \\{\\{ username = \"defaced value\"; \\}\\}\n * \n * {{username}} attempts to inject code which will deface the\n * application, but fails to accomplish their task, because the server has correctly\n * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)\n * characters.\n * Instead, the result of the attempted script injection is visible, and can be removed\n * from the database by an administrator.\n * \n * \n * \n *\n * @param {string} text The text with markup to interpolate.\n * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n * embedded expression in order to return an interpolation function. Strings with no\n * embedded expression will return null for the interpolation function.\n * @param {string=} trustedContext when provided, the returned function passes the interpolated\n * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,\n * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that\n * provides Strict Contextual Escaping for details.\n * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined\n * unless all embedded expressions evaluate to a value other than `undefined`.\n * @returns {function(context)} an interpolation function which is used to compute the\n * interpolated string. The function has these parameters:\n *\n * - `context`: evaluation context for all expressions embedded in the interpolated text\n */\n function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {\n allOrNothing = !!allOrNothing;\n var startIndex,\n endIndex,\n index = 0,\n expressions = [],\n parseFns = [],\n textLength = text.length,\n exp,\n concat = [],\n expressionPositions = [];\n\n while(index < textLength) {\n if ( ((startIndex = text.indexOf(startSymbol, index)) != -1) &&\n ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1) ) {\n if (index !== startIndex) {\n concat.push(unescapeText(text.substring(index, startIndex)));\n }\n exp = text.substring(startIndex + startSymbolLength, endIndex);\n expressions.push(exp);\n parseFns.push($parse(exp, parseStringifyInterceptor));\n index = endIndex + endSymbolLength;\n expressionPositions.push(concat.length);\n concat.push('');\n } else {\n // we did not find an interpolation, so we have to add the remainder to the separators array\n if (index !== textLength) {\n concat.push(unescapeText(text.substring(index)));\n }\n break;\n }\n }\n\n // Concatenating expressions makes it hard to reason about whether some combination of\n // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a\n // single expression be used for iframe[src], object[src], etc., we ensure that the value\n // that's used is assigned or constructed by some JS code somewhere that is more testable or\n // make it obvious that you bound the value to some user controlled value. This helps reduce\n // the load when auditing for XSS issues.\n if (trustedContext && concat.length > 1) {\n throw $interpolateMinErr('noconcat',\n \"Error while interpolating: {0}\\nStrict Contextual Escaping disallows \" +\n \"interpolations that concatenate multiple expressions when a trusted value is \" +\n \"required. See http://docs.angularjs.org/api/ng.$sce\", text);\n }\n\n if (!mustHaveExpression || expressions.length) {\n var compute = function(values) {\n for(var i = 0, ii = expressions.length; i < ii; i++) {\n if (allOrNothing && isUndefined(values[i])) return;\n concat[expressionPositions[i]] = values[i];\n }\n return concat.join('');\n };\n\n var getValue = function (value) {\n return trustedContext ?\n $sce.getTrusted(trustedContext, value) :\n $sce.valueOf(value);\n };\n\n var stringify = function (value) {\n if (value == null) { // null || undefined\n return '';\n }\n switch (typeof value) {\n case 'string': {\n break;\n }\n case 'number': {\n value = '' + value;\n break;\n }\n default: {\n value = toJson(value);\n }\n }\n\n return value;\n };\n\n return extend(function interpolationFn(context) {\n var i = 0;\n var ii = expressions.length;\n var values = new Array(ii);\n\n try {\n for (; i < ii; i++) {\n values[i] = parseFns[i](context);\n }\n\n return compute(values);\n } catch(err) {\n var newErr = $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text,\n err.toString());\n $exceptionHandler(newErr);\n }\n\n }, {\n // all of these properties are undocumented for now\n exp: text, //just for compatibility with regular watchers created via $watch\n expressions: expressions,\n $$watchDelegate: function (scope, listener, objectEquality) {\n var lastValue;\n return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) {\n var currValue = compute(values);\n if (isFunction(listener)) {\n listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);\n }\n lastValue = currValue;\n }, objectEquality);\n }\n });\n }\n\n function unescapeText(text) {\n return text.replace(escapedStartRegexp, startSymbol).\n replace(escapedEndRegexp, endSymbol);\n }\n\n function parseStringifyInterceptor(value) {\n try {\n return stringify(getValue(value));\n } catch(err) {\n var newErr = $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text,\n err.toString());\n $exceptionHandler(newErr);\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $interpolate#startSymbol\n * @description\n * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n *\n * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change\n * the symbol.\n *\n * @returns {string} start symbol.\n */\n $interpolate.startSymbol = function() {\n return startSymbol;\n };\n\n\n /**\n * @ngdoc method\n * @name $interpolate#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change\n * the symbol.\n *\n * @returns {string} end symbol.\n */\n $interpolate.endSymbol = function() {\n return endSymbol;\n };\n\n return $interpolate;\n }];\n}\n\nfunction $IntervalProvider() {\n this.$get = ['$rootScope', '$window', '$q', '$$q',\n function($rootScope, $window, $q, $$q) {\n var intervals = {};\n\n\n /**\n * @ngdoc service\n * @name $interval\n *\n * @description\n * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n * milliseconds.\n *\n * The return value of registering an interval function is a promise. This promise will be\n * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n * run indefinitely if `count` is not defined. The value of the notification will be the\n * number of iterations that have run.\n * To cancel an interval, call `$interval.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to\n * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n * time.\n *\n * \n * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n * with them. In particular they are not automatically destroyed when a controller's scope or a\n * directive's element are destroyed.\n * You should take this into consideration and make sure to always cancel the interval at the\n * appropriate moment. See the example below for more details on how and when to do this.\n * \n *\n * @param {function()} fn A function that should be called repeatedly.\n * @param {number} delay Number of milliseconds between each function call.\n * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n * indefinitely.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @returns {promise} A promise which will be notified on each iteration.\n *\n * @example\n * \n * \n * \n *\n * \n * \n * Date format: \n * Current time is: \n * \n * Blood 1 : {{blood_1}}\n * Blood 2 : {{blood_2}}\n * Fight\n * StopFight\n * resetFight\n * \n * \n *\n * \n * \n */\n function interval(fn, delay, count, invokeApply) {\n var setInterval = $window.setInterval,\n clearInterval = $window.clearInterval,\n iteration = 0,\n skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise;\n\n count = isDefined(count) ? count : 0;\n\n promise.then(null, null, fn);\n\n promise.$$intervalId = setInterval(function tick() {\n deferred.notify(iteration++);\n\n if (count > 0 && iteration >= count) {\n deferred.resolve(iteration);\n clearInterval(promise.$$intervalId);\n delete intervals[promise.$$intervalId];\n }\n\n if (!skipApply) $rootScope.$apply();\n\n }, delay);\n\n intervals[promise.$$intervalId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $interval#cancel\n *\n * @description\n * Cancels a task associated with the `promise`.\n *\n * @param {promise} promise returned by the `$interval` function.\n * @returns {boolean} Returns `true` if the task was successfully canceled.\n */\n interval.cancel = function(promise) {\n if (promise && promise.$$intervalId in intervals) {\n intervals[promise.$$intervalId].reject('canceled');\n $window.clearInterval(promise.$$intervalId);\n delete intervals[promise.$$intervalId];\n return true;\n }\n return false;\n };\n\n return interval;\n }];\n}\n\n/**\n * @ngdoc service\n * @name $locale\n *\n * @description\n * $locale service provides localization rules for various Angular components. As of right now the\n * only public api is:\n *\n * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)\n */\nfunction $LocaleProvider(){\n this.$get = function() {\n return {\n id: 'en-us',\n\n NUMBER_FORMATS: {\n DECIMAL_SEP: '.',\n GROUP_SEP: ',',\n PATTERNS: [\n { // Decimal Pattern\n minInt: 1,\n minFrac: 0,\n maxFrac: 3,\n posPre: '',\n posSuf: '',\n negPre: '-',\n negSuf: '',\n gSize: 3,\n lgSize: 3\n },{ //Currency Pattern\n minInt: 1,\n minFrac: 2,\n maxFrac: 2,\n posPre: '\\u00A4',\n posSuf: '',\n negPre: '(\\u00A4',\n negSuf: ')',\n gSize: 3,\n lgSize: 3\n }\n ],\n CURRENCY_SYM: '$'\n },\n\n DATETIME_FORMATS: {\n MONTH:\n 'January,February,March,April,May,June,July,August,September,October,November,December'\n .split(','),\n SHORTMONTH: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),\n DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),\n SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),\n AMPMS: ['AM','PM'],\n medium: 'MMM d, y h:mm:ss a',\n short: 'M/d/yy h:mm a',\n fullDate: 'EEEE, MMMM d, y',\n longDate: 'MMMM d, y',\n mediumDate: 'MMM d, y',\n shortDate: 'M/d/yy',\n mediumTime: 'h:mm:ss a',\n shortTime: 'h:mm a'\n },\n\n pluralCat: function(num) {\n if (num === 1) {\n return 'one';\n }\n return 'other';\n }\n };\n };\n}\n\nvar PATH_MATCH = /^([^\\?#]*)(\\?([^#]*))?(#(.*))?$/,\n DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\nvar $locationMinErr = minErr('$location');\n\n\n/**\n * Encode path using encodeUriSegment, ignoring forward slashes\n *\n * @param {string} path Path to encode\n * @returns {string}\n */\nfunction encodePath(path) {\n var segments = path.split('/'),\n i = segments.length;\n\n while (i--) {\n segments[i] = encodeUriSegment(segments[i]);\n }\n\n return segments.join('/');\n}\n\nfunction parseAbsoluteUrl(absoluteUrl, locationObj, appBase) {\n var parsedUrl = urlResolve(absoluteUrl, appBase);\n\n locationObj.$$protocol = parsedUrl.protocol;\n locationObj.$$host = parsedUrl.hostname;\n locationObj.$$port = int(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n}\n\n\nfunction parseAppUrl(relativeUrl, locationObj, appBase) {\n var prefixed = (relativeUrl.charAt(0) !== '/');\n if (prefixed) {\n relativeUrl = '/' + relativeUrl;\n }\n var match = urlResolve(relativeUrl, appBase);\n locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?\n match.pathname.substring(1) : match.pathname);\n locationObj.$$search = parseKeyValue(match.search);\n locationObj.$$hash = decodeURIComponent(match.hash);\n\n // make sure path starts with '/';\n if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {\n locationObj.$$path = '/' + locationObj.$$path;\n }\n}\n\n\n/**\n *\n * @param {string} begin\n * @param {string} whole\n * @returns {string} returns text from whole after begin or undefined if it does not begin with\n * expected string.\n */\nfunction beginsWith(begin, whole) {\n if (whole.indexOf(begin) === 0) {\n return whole.substr(begin.length);\n }\n}\n\n\nfunction stripHash(url) {\n var index = url.indexOf('#');\n return index == -1 ? url : url.substr(0, index);\n}\n\n\nfunction stripFile(url) {\n return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n}\n\n/* return the server only (scheme://host:port) */\nfunction serverBase(url) {\n return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n}\n\n\n/**\n * LocationHtml5Url represents an url\n * This object is exposed as $location service when HTML5 mode is enabled and supported\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} basePrefix url path prefix\n */\nfunction LocationHtml5Url(appBase, basePrefix) {\n this.$$html5 = true;\n basePrefix = basePrefix || '';\n var appBaseNoFile = stripFile(appBase);\n parseAbsoluteUrl(appBase, this, appBase);\n\n\n /**\n * Parse given html5 (regular) url string into properties\n * @param {string} newAbsoluteUrl HTML5 url\n * @private\n */\n this.$$parse = function(url) {\n var pathUrl = beginsWith(appBaseNoFile, url);\n if (!isString(pathUrl)) {\n throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n appBaseNoFile);\n }\n\n parseAppUrl(pathUrl, this, appBase);\n\n if (!this.$$path) {\n this.$$path = '/';\n }\n\n this.$$compose();\n };\n\n /**\n * Compose url and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n var appUrl, prevAppUrl;\n var rewrittenUrl;\n\n if ( (appUrl = beginsWith(appBase, url)) !== undefined ) {\n prevAppUrl = appUrl;\n if ( (appUrl = beginsWith(basePrefix, appUrl)) !== undefined ) {\n rewrittenUrl = appBaseNoFile + (beginsWith('/', appUrl) || appUrl);\n } else {\n rewrittenUrl = appBase + prevAppUrl;\n }\n } else if ( (appUrl = beginsWith(appBaseNoFile, url)) !== undefined ) {\n rewrittenUrl = appBaseNoFile + appUrl;\n } else if (appBaseNoFile == url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when developer doesn't opt into html5 mode.\n * It also serves as the base class for html5 mode fallback on legacy browsers.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangUrl(appBase, hashPrefix) {\n var appBaseNoFile = stripFile(appBase);\n\n parseAbsoluteUrl(appBase, this, appBase);\n\n\n /**\n * Parse given hashbang url into properties\n * @param {string} url Hashbang url\n * @private\n */\n this.$$parse = function(url) {\n var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);\n var withoutHashUrl = withoutBaseUrl.charAt(0) == '#'\n ? beginsWith(hashPrefix, withoutBaseUrl)\n : (this.$$html5)\n ? withoutBaseUrl\n : '';\n\n if (!isString(withoutHashUrl)) {\n throw $locationMinErr('ihshprfx', 'Invalid url \"{0}\", missing hash prefix \"{1}\".', url,\n hashPrefix);\n }\n parseAppUrl(withoutHashUrl, this, appBase);\n\n this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\n this.$$compose();\n\n /*\n * In Windows, on an anchor node on documents loaded from\n * the filesystem, the browser will return a pathname\n * prefixed with the drive name ('/C:/path') when a\n * pathname without a drive is set:\n * * a.setAttribute('href', '/foo')\n * * a.pathname === '/C:/foo' //true\n *\n * Inside of Angular, we're always using pathnames that\n * do not include drive names for routing.\n */\n function removeWindowsDriveName (path, url, base) {\n /*\n Matches paths for file protocol on windows,\n such as /C:/foo/bar, and captures only /foo/bar.\n */\n var windowsFilePathExp = /^\\/[A-Z]:(\\/.*)/;\n\n var firstPathSegmentMatch;\n\n //Get the relative path from the input URL.\n if (url.indexOf(base) === 0) {\n url = url.replace(base, '');\n }\n\n // The input URL intentionally contains a first path segment that ends with a colon.\n if (windowsFilePathExp.exec(url)) {\n return path;\n }\n\n firstPathSegmentMatch = windowsFilePathExp.exec(path);\n return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n }\n };\n\n /**\n * Compose hashbang url and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if(stripHash(appBase) == stripHash(url)) {\n this.$$parse(url);\n return true;\n }\n return false;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when html5 history api is enabled but the browser\n * does not support it.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangInHtml5Url(appBase, hashPrefix) {\n this.$$html5 = true;\n LocationHashbangUrl.apply(this, arguments);\n\n var appBaseNoFile = stripFile(appBase);\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n\n var rewrittenUrl;\n var appUrl;\n\n if ( appBase == stripHash(url) ) {\n rewrittenUrl = url;\n } else if ( (appUrl = beginsWith(appBaseNoFile, url)) ) {\n rewrittenUrl = appBase + hashPrefix + appUrl;\n } else if ( appBaseNoFile === url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n // include hashPrefix in $$absUrl when $$url is empty so IE8 & 9 do not reload page because of removal of '#'\n this.$$absUrl = appBase + hashPrefix + this.$$url;\n };\n\n}\n\n\nLocationHashbangInHtml5Url.prototype =\n LocationHashbangUrl.prototype =\n LocationHtml5Url.prototype = {\n\n /**\n * Are we in html5 mode?\n * @private\n */\n $$html5: false,\n\n /**\n * Has any change been replacing ?\n * @private\n */\n $$replace: false,\n\n /**\n * @ngdoc method\n * @name $location#absUrl\n *\n * @description\n * This method is getter only.\n *\n * Return full url representation with all segments encoded according to rules specified in\n * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).\n *\n * @return {string} full url\n */\n absUrl: locationGetter('$$absUrl'),\n\n /**\n * @ngdoc method\n * @name $location#url\n *\n * @description\n * This method is getter / setter.\n *\n * Return url (e.g. `/path?a=b#hash`) when called without any parameter.\n *\n * Change path, search and hash, when called with parameter and return `$location`.\n *\n * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)\n * @return {string} url\n */\n url: function(url) {\n if (isUndefined(url))\n return this.$$url;\n\n var match = PATH_MATCH.exec(url);\n if (match[1]) this.path(decodeURIComponent(match[1]));\n if (match[2] || match[1]) this.search(match[3] || '');\n this.hash(match[5] || '');\n\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#protocol\n *\n * @description\n * This method is getter only.\n *\n * Return protocol of current url.\n *\n * @return {string} protocol of current url\n */\n protocol: locationGetter('$$protocol'),\n\n /**\n * @ngdoc method\n * @name $location#host\n *\n * @description\n * This method is getter only.\n *\n * Return host of current url.\n *\n * @return {string} host of current url.\n */\n host: locationGetter('$$host'),\n\n /**\n * @ngdoc method\n * @name $location#port\n *\n * @description\n * This method is getter only.\n *\n * Return port of current url.\n *\n * @return {Number} port\n */\n port: locationGetter('$$port'),\n\n /**\n * @ngdoc method\n * @name $location#path\n *\n * @description\n * This method is getter / setter.\n *\n * Return path of current url when called without any parameter.\n *\n * Change path when called with parameter and return `$location`.\n *\n * Note: Path should always begin with forward slash (/), this method will add the forward slash\n * if it is missing.\n *\n * @param {(string|number)=} path New path\n * @return {string} path\n */\n path: locationGetterSetter('$$path', function(path) {\n path = path ? path.toString() : '';\n return path.charAt(0) == '/' ? path : '/' + path;\n }),\n\n /**\n * @ngdoc method\n * @name $location#search\n *\n * @description\n * This method is getter / setter.\n *\n * Return search part (as object) of current url when called without any parameter.\n *\n * Change search part when called with parameter and return `$location`.\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n * var searchObject = $location.search();\n * // => {foo: 'bar', baz: 'xoxo'}\n *\n *\n * // set foo to 'yipee'\n * $location.search('foo', 'yipee');\n * // => $location\n * ```\n *\n * @param {string|Object.|Object.>} search New search params - string or\n * hash object.\n *\n * When called with a single argument the method acts as a setter, setting the `search` component\n * of `$location` to the specified value.\n *\n * If the argument is a hash object containing an array of values, these values will be encoded\n * as duplicate search parameters in the url.\n *\n * @param {(string|Number|Array|boolean)=} paramValue If `search` is a string or number, then `paramValue`\n * will override only a single search property.\n *\n * If `paramValue` is an array, it will override the property of the `search` component of\n * `$location` specified via the first argument.\n *\n * If `paramValue` is `null`, the property specified via the first argument will be deleted.\n *\n * If `paramValue` is `true`, the property specified via the first argument will be added with no\n * value nor trailing equal sign.\n *\n * @return {Object} If called with no arguments returns the parsed `search` object. If called with\n * one or more arguments returns `$location` object itself.\n */\n search: function(search, paramValue) {\n switch (arguments.length) {\n case 0:\n return this.$$search;\n case 1:\n if (isString(search) || isNumber(search)) {\n search = search.toString();\n this.$$search = parseKeyValue(search);\n } else if (isObject(search)) {\n // remove object undefined or null properties\n forEach(search, function(value, key) {\n if (value == null) delete search[key];\n });\n\n this.$$search = search;\n } else {\n throw $locationMinErr('isrcharg',\n 'The first argument of the `$location#search()` call must be a string or an object.');\n }\n break;\n default:\n if (isUndefined(paramValue) || paramValue === null) {\n delete this.$$search[search];\n } else {\n this.$$search[search] = paramValue;\n }\n }\n\n this.$$compose();\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#hash\n *\n * @description\n * This method is getter / setter.\n *\n * Return hash fragment when called without any parameter.\n *\n * Change hash fragment when called with parameter and return `$location`.\n *\n * @param {(string|number)=} hash New hash fragment\n * @return {string} hash\n */\n hash: locationGetterSetter('$$hash', function(hash) {\n return hash ? hash.toString() : '';\n }),\n\n /**\n * @ngdoc method\n * @name $location#replace\n *\n * @description\n * If called, all changes to $location during current `$digest` will be replacing current history\n * record, instead of adding new one.\n */\n replace: function() {\n this.$$replace = true;\n return this;\n }\n};\n\nfunction locationGetter(property) {\n return function() {\n return this[property];\n };\n}\n\n\nfunction locationGetterSetter(property, preprocess) {\n return function(value) {\n if (isUndefined(value))\n return this[property];\n\n this[property] = preprocess(value);\n this.$$compose();\n\n return this;\n };\n}\n\n\n/**\n * @ngdoc service\n * @name $location\n *\n * @requires $rootElement\n *\n * @description\n * The $location service parses the URL in the browser address bar (based on the\n * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL\n * available to your application. Changes to the URL in the address bar are reflected into\n * $location service and changes to $location are reflected into the browser address bar.\n *\n * **The $location service:**\n *\n * - Exposes the current URL in the browser address bar, so you can\n * - Watch and observe the URL.\n * - Change the URL.\n * - Synchronizes the URL with the browser when the user\n * - Changes the address bar.\n * - Clicks the back or forward button (or clicks a History link).\n * - Clicks on a link.\n * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n *\n * For more information see {@link guide/$location Developer Guide: Using $location}\n */\n\n/**\n * @ngdoc provider\n * @name $locationProvider\n * @description\n * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n */\nfunction $LocationProvider(){\n var hashPrefix = '',\n html5Mode = {\n enabled: false,\n requireBase: true\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#hashPrefix\n * @description\n * @param {string=} prefix Prefix for hash part (containing path and search)\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.hashPrefix = function(prefix) {\n if (isDefined(prefix)) {\n hashPrefix = prefix;\n return this;\n } else {\n return hashPrefix;\n }\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#html5Mode\n * @description\n * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.\n * If object, sets `enabled` and `requireBase` to respective values.\n * - **enabled** – `{boolean}` – Sets `html5Mode.enabled`. If true, will rely on\n * `history.pushState` to change urls where supported. Will fall back to hash-prefixed paths\n * in browsers that do not support `pushState`.\n * - **requireBase** - `{boolean}` - Sets `html5Mode.requireBase` (default: `true`). When\n * html5Mode is enabled, specifies whether or not a tag is required to be present. If\n * `enabled` and `requireBase` are true, and a base tag is not present, an error will be\n * thrown when `$location` is injected. See the\n * {@link guide/$location $location guide for more information}\n *\n * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter\n */\n this.html5Mode = function(mode) {\n if (isBoolean(mode)) {\n html5Mode.enabled = mode;\n return this;\n } else if (isObject(mode)) {\n html5Mode.enabled = isBoolean(mode.enabled) ?\n mode.enabled :\n html5Mode.enabled;\n html5Mode.requireBase = isBoolean(mode.requireBase) ?\n mode.requireBase :\n html5Mode.requireBase;\n return this;\n } else {\n return html5Mode;\n }\n };\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeStart\n * @eventType broadcast on root scope\n * @description\n * Broadcasted before a URL will change. This change can be prevented by calling\n * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n * details about event object. Upon successful change\n * {@link ng.$location#events_$locationChangeSuccess $locationChangeSuccess} is fired.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n */\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeSuccess\n * @eventType broadcast on root scope\n * @description\n * Broadcasted after a URL was changed.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n */\n\n this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',\n function( $rootScope, $browser, $sniffer, $rootElement) {\n var $location,\n LocationMode,\n baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n initialUrl = $browser.url(),\n appBase;\n\n if (html5Mode.enabled) {\n if (!baseHref && html5Mode.requireBase) {\n throw $locationMinErr('nobase',\n \"$location in HTML5 mode requires a tag to be present!\");\n }\n appBase = serverBase(initialUrl) + (baseHref || '/');\n LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n } else {\n appBase = stripHash(initialUrl);\n LocationMode = LocationHashbangUrl;\n }\n $location = new LocationMode(appBase, '#' + hashPrefix);\n $location.$$parseLinkUrl(initialUrl, initialUrl);\n\n var IGNORE_URI_REGEXP = /^\\s*(javascript|mailto):/i;\n\n $rootElement.on('click', function(event) {\n // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n // currently we open nice url link and redirect then\n\n if (event.ctrlKey || event.metaKey || event.which == 2) return;\n\n var elm = jqLite(event.target);\n\n // traverse the DOM up to find first A tag\n while (nodeName_(elm[0]) !== 'a') {\n // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n }\n\n var absHref = elm.prop('href');\n // get the actual href attribute - see\n // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx\n var relHref = elm.attr('href') || elm.attr('xlink:href');\n\n if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n // an animation.\n absHref = urlResolve(absHref.animVal).href;\n }\n\n // Ignore when url is started with javascript: or mailto:\n if (IGNORE_URI_REGEXP.test(absHref)) return;\n\n if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {\n if ($location.$$parseLinkUrl(absHref, relHref)) {\n event.preventDefault();\n // update location manually\n if ($location.absUrl() != $browser.url()) {\n $rootScope.$apply();\n // hack to work around FF6 bug 684208 when scenario runner clicks on links\n window.angular['ff-684208-preventDefault'] = true;\n }\n }\n }\n });\n\n\n // rewrite hashbang url <> html5 url\n if ($location.absUrl() != initialUrl) {\n $browser.url($location.absUrl(), true);\n }\n\n // update $location when $browser url changes\n $browser.onUrlChange(function(newUrl) {\n if ($location.absUrl() != newUrl) {\n $rootScope.$evalAsync(function() {\n var oldUrl = $location.absUrl();\n\n $location.$$parse(newUrl);\n if ($rootScope.$broadcast('$locationChangeStart', newUrl,\n oldUrl).defaultPrevented) {\n $location.$$parse(oldUrl);\n $browser.url(oldUrl);\n } else {\n afterLocationChange(oldUrl);\n }\n });\n if (!$rootScope.$$phase) $rootScope.$digest();\n }\n });\n\n // update browser\n var changeCounter = 0;\n $rootScope.$watch(function $locationWatch() {\n var oldUrl = $browser.url();\n var currentReplace = $location.$$replace;\n\n if (!changeCounter || oldUrl != $location.absUrl()) {\n changeCounter++;\n $rootScope.$evalAsync(function() {\n if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n defaultPrevented) {\n $location.$$parse(oldUrl);\n } else {\n $browser.url($location.absUrl(), currentReplace);\n afterLocationChange(oldUrl);\n }\n });\n }\n $location.$$replace = false;\n\n return changeCounter;\n });\n\n return $location;\n\n function afterLocationChange(oldUrl) {\n $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl);\n }\n}];\n}\n\n/**\n * @ngdoc service\n * @name $log\n * @requires $window\n *\n * @description\n * Simple service for logging. Default implementation safely writes the message\n * into the browser's console (if present).\n *\n * The main purpose of this service is to simplify debugging and troubleshooting.\n *\n * The default is to log `debug` messages. You can use\n * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n *\n * @example\n \n \n angular.module('logExample', [])\n .controller('LogController', ['$scope', '$log', function($scope, $log) {\n $scope.$log = $log;\n $scope.message = 'Hello World!';\n }]);\n \n \n \n Reload this page with open console, enter text and hit the log button...\n Message:\n \n log\n warn\n info\n error\n \n \n \n */\n\n/**\n * @ngdoc provider\n * @name $logProvider\n * @description\n * Use the `$logProvider` to configure how the application logs messages\n */\nfunction $LogProvider(){\n var debug = true,\n self = this;\n\n /**\n * @ngdoc method\n * @name $logProvider#debugEnabled\n * @description\n * @param {boolean=} flag enable or disable debug level messages\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.debugEnabled = function(flag) {\n if (isDefined(flag)) {\n debug = flag;\n return this;\n } else {\n return debug;\n }\n };\n\n this.$get = ['$window', function($window){\n return {\n /**\n * @ngdoc method\n * @name $log#log\n *\n * @description\n * Write a log message\n */\n log: consoleLog('log'),\n\n /**\n * @ngdoc method\n * @name $log#info\n *\n * @description\n * Write an information message\n */\n info: consoleLog('info'),\n\n /**\n * @ngdoc method\n * @name $log#warn\n *\n * @description\n * Write a warning message\n */\n warn: consoleLog('warn'),\n\n /**\n * @ngdoc method\n * @name $log#error\n *\n * @description\n * Write an error message\n */\n error: consoleLog('error'),\n\n /**\n * @ngdoc method\n * @name $log#debug\n *\n * @description\n * Write a debug message\n */\n debug: (function () {\n var fn = consoleLog('debug');\n\n return function() {\n if (debug) {\n fn.apply(self, arguments);\n }\n };\n }())\n };\n\n function formatError(arg) {\n if (arg instanceof Error) {\n if (arg.stack) {\n arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n ? 'Error: ' + arg.message + '\\n' + arg.stack\n : arg.stack;\n } else if (arg.sourceURL) {\n arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n }\n }\n return arg;\n }\n\n function consoleLog(type) {\n var console = $window.console || {},\n logFn = console[type] || console.log || noop,\n hasApply = false;\n\n // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.\n // The reason behind this is that console.log has type \"object\" in IE8...\n try {\n hasApply = !!logFn.apply;\n } catch (e) {}\n\n if (hasApply) {\n return function() {\n var args = [];\n forEach(arguments, function(arg) {\n args.push(formatError(arg));\n });\n return logFn.apply(console, args);\n };\n }\n\n // we are IE which either doesn't have window.console => this is noop and we do nothing,\n // or we are IE where console.log doesn't have apply so we log at least first 2 args\n return function(arg1, arg2) {\n logFn(arg1, arg2 == null ? '' : arg2);\n };\n }\n }];\n}\n\nvar $parseMinErr = minErr('$parse');\n\n// Sandboxing Angular Expressions\n// ------------------------------\n// Angular expressions are generally considered safe because these expressions only have direct\n// access to $scope and locals. However, one can obtain the ability to execute arbitrary JS code by\n// obtaining a reference to native JS functions such as the Function constructor.\n//\n// As an example, consider the following Angular expression:\n//\n// {}.toString.constructor('alert(\"evil JS code\")')\n//\n// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits\n// against the expression language, but not to prevent exploits that were enabled by exposing\n// sensitive JavaScript or browser apis on Scope. Exposing such objects on a Scope is never a good\n// practice and therefore we are not even trying to protect against interaction with an object\n// explicitly exposed in this way.\n//\n// In general, it is not possible to access a Window object from an angular expression unless a\n// window or some DOM object that has a reference to window is published onto a Scope.\n// Similarly we prevent invocations of function known to be dangerous, as well as assignments to\n// native objects.\n\n\nfunction ensureSafeMemberName(name, fullExpression) {\n if (name === \"__defineGetter__\" || name === \"__defineSetter__\"\n || name === \"__lookupGetter__\" || name === \"__lookupSetter__\"\n || name === \"__proto__\") {\n throw $parseMinErr('isecfld',\n 'Attempting to access a disallowed field in Angular expressions! '\n +'Expression: {0}', fullExpression);\n }\n return name;\n}\n\nfunction ensureSafeObject(obj, fullExpression) {\n // nifty check if obj is Function that is fast and works across iframes and other contexts\n if (obj) {\n if (obj.constructor === obj) {\n throw $parseMinErr('isecfn',\n 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// isWindow(obj)\n obj.window === obj) {\n throw $parseMinErr('isecwindow',\n 'Referencing the Window in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// isElement(obj)\n obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {\n throw $parseMinErr('isecdom',\n 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// block Object so that we can't get hold of dangerous Object.* methods\n obj === Object) {\n throw $parseMinErr('isecobj',\n 'Referencing Object in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n }\n }\n return obj;\n}\n\nvar CALL = Function.prototype.call;\nvar APPLY = Function.prototype.apply;\nvar BIND = Function.prototype.bind;\n\nfunction ensureSafeFunction(obj, fullExpression) {\n if (obj) {\n if (obj.constructor === obj) {\n throw $parseMinErr('isecfn',\n 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (obj === CALL || obj === APPLY || obj === BIND) {\n throw $parseMinErr('isecff',\n 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n }\n }\n}\n\n//Keyword constants\nvar CONSTANTS = createMap();\nforEach({\n 'null': function() { return null; },\n 'true': function() { return true; },\n 'false': function() { return false; },\n 'undefined': function() {}\n}, function(constantGetter, name) {\n constantGetter.constant = constantGetter.literal = constantGetter.sharedGetter = true;\n CONSTANTS[name] = constantGetter;\n});\n\n//Operators - will be wrapped by binaryFn/unaryFn/assignment/filter\nvar OPERATORS = extend(createMap(), {\n /* jshint bitwise : false */\n '+':function(self, locals, a,b){\n a=a(self, locals); b=b(self, locals);\n if (isDefined(a)) {\n if (isDefined(b)) {\n return a + b;\n }\n return a;\n }\n return isDefined(b)?b:undefined;},\n '-':function(self, locals, a,b){\n a=a(self, locals); b=b(self, locals);\n return (isDefined(a)?a:0)-(isDefined(b)?b:0);\n },\n '*':function(self, locals, a,b){return a(self, locals)*b(self, locals);},\n '/':function(self, locals, a,b){return a(self, locals)/b(self, locals);},\n '%':function(self, locals, a,b){return a(self, locals)%b(self, locals);},\n '^':function(self, locals, a,b){return a(self, locals)^b(self, locals);},\n '===':function(self, locals, a, b){return a(self, locals)===b(self, locals);},\n '!==':function(self, locals, a, b){return a(self, locals)!==b(self, locals);},\n '==':function(self, locals, a,b){return a(self, locals)==b(self, locals);},\n '!=':function(self, locals, a,b){return a(self, locals)!=b(self, locals);},\n '<':function(self, locals, a,b){return a(self, locals)':function(self, locals, a,b){return a(self, locals)>b(self, locals);},\n '<=':function(self, locals, a,b){return a(self, locals)<=b(self, locals);},\n '>=':function(self, locals, a,b){return a(self, locals)>=b(self, locals);},\n '&&':function(self, locals, a,b){return a(self, locals)&&b(self, locals);},\n '||':function(self, locals, a,b){return a(self, locals)||b(self, locals);},\n '&':function(self, locals, a,b){return a(self, locals)&b(self, locals);},\n '!':function(self, locals, a){return !a(self, locals);},\n\n //Tokenized as operators but parsed as assignment/filters\n '=':true,\n '|':true\n});\n/* jshint bitwise: true */\nvar ESCAPE = {\"n\":\"\\n\", \"f\":\"\\f\", \"r\":\"\\r\", \"t\":\"\\t\", \"v\":\"\\v\", \"'\":\"'\", '\"':'\"'};\n\n\n/////////////////////////////////////////\n\n\n/**\n * @constructor\n */\nvar Lexer = function (options) {\n this.options = options;\n};\n\nLexer.prototype = {\n constructor: Lexer,\n\n lex: function (text) {\n this.text = text;\n this.index = 0;\n this.ch = undefined;\n this.tokens = [];\n\n while (this.index < this.text.length) {\n this.ch = this.text.charAt(this.index);\n if (this.is('\"\\'')) {\n this.readString(this.ch);\n } else if (this.isNumber(this.ch) || this.is('.') && this.isNumber(this.peek())) {\n this.readNumber();\n } else if (this.isIdent(this.ch)) {\n this.readIdent();\n } else if (this.is('(){}[].,;:?')) {\n this.tokens.push({\n index: this.index,\n text: this.ch\n });\n this.index++;\n } else if (this.isWhitespace(this.ch)) {\n this.index++;\n } else {\n var ch2 = this.ch + this.peek();\n var ch3 = ch2 + this.peek(2);\n var fn = OPERATORS[this.ch];\n var fn2 = OPERATORS[ch2];\n var fn3 = OPERATORS[ch3];\n if (fn3) {\n this.tokens.push({index: this.index, text: ch3, fn: fn3});\n this.index += 3;\n } else if (fn2) {\n this.tokens.push({index: this.index, text: ch2, fn: fn2});\n this.index += 2;\n } else if (fn) {\n this.tokens.push({\n index: this.index,\n text: this.ch,\n fn: fn\n });\n this.index += 1;\n } else {\n this.throwError('Unexpected next character ', this.index, this.index + 1);\n }\n }\n }\n return this.tokens;\n },\n\n is: function(chars) {\n return chars.indexOf(this.ch) !== -1;\n },\n\n peek: function(i) {\n var num = i || 1;\n return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n },\n\n isNumber: function(ch) {\n return ('0' <= ch && ch <= '9');\n },\n\n isWhitespace: function(ch) {\n // IE treats non-breaking space as \\u00A0\n return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n },\n\n isIdent: function(ch) {\n return ('a' <= ch && ch <= 'z' ||\n 'A' <= ch && ch <= 'Z' ||\n '_' === ch || ch === '$');\n },\n\n isExpOperator: function(ch) {\n return (ch === '-' || ch === '+' || this.isNumber(ch));\n },\n\n throwError: function(error, start, end) {\n end = end || this.index;\n var colStr = (isDefined(start)\n ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n : ' ' + end);\n throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n error, colStr, this.text);\n },\n\n readNumber: function() {\n var number = '';\n var start = this.index;\n while (this.index < this.text.length) {\n var ch = lowercase(this.text.charAt(this.index));\n if (ch == '.' || this.isNumber(ch)) {\n number += ch;\n } else {\n var peekCh = this.peek();\n if (ch == 'e' && this.isExpOperator(peekCh)) {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n peekCh && this.isNumber(peekCh) &&\n number.charAt(number.length - 1) == 'e') {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n (!peekCh || !this.isNumber(peekCh)) &&\n number.charAt(number.length - 1) == 'e') {\n this.throwError('Invalid exponent');\n } else {\n break;\n }\n }\n this.index++;\n }\n number = 1 * number;\n this.tokens.push({\n index: start,\n text: number,\n constant: true,\n fn: function() { return number; }\n });\n },\n\n readIdent: function() {\n var expression = this.text;\n\n var ident = '';\n var start = this.index;\n\n var lastDot, peekIndex, methodName, ch;\n\n while (this.index < this.text.length) {\n ch = this.text.charAt(this.index);\n if (ch === '.' || this.isIdent(ch) || this.isNumber(ch)) {\n if (ch === '.') lastDot = this.index;\n ident += ch;\n } else {\n break;\n }\n this.index++;\n }\n\n //check if the identifier ends with . and if so move back one char\n if (lastDot && ident[ident.length - 1] === '.') {\n this.index--;\n ident = ident.slice(0, -1);\n lastDot = ident.lastIndexOf('.');\n if (lastDot === -1) {\n lastDot = undefined;\n }\n }\n\n //check if this is not a method invocation and if it is back out to last dot\n if (lastDot) {\n peekIndex = this.index;\n while (peekIndex < this.text.length) {\n ch = this.text.charAt(peekIndex);\n if (ch === '(') {\n methodName = ident.substr(lastDot - start + 1);\n ident = ident.substr(0, lastDot - start);\n this.index = peekIndex;\n break;\n }\n if (this.isWhitespace(ch)) {\n peekIndex++;\n } else {\n break;\n }\n }\n }\n\n this.tokens.push({\n index: start,\n text: ident,\n fn: CONSTANTS[ident] || getterFn(ident, this.options, expression)\n });\n\n if (methodName) {\n this.tokens.push({\n index: lastDot,\n text: '.'\n });\n this.tokens.push({\n index: lastDot + 1,\n text: methodName\n });\n }\n },\n\n readString: function(quote) {\n var start = this.index;\n this.index++;\n var string = '';\n var rawString = quote;\n var escape = false;\n while (this.index < this.text.length) {\n var ch = this.text.charAt(this.index);\n rawString += ch;\n if (escape) {\n if (ch === 'u') {\n var hex = this.text.substring(this.index + 1, this.index + 5);\n if (!hex.match(/[\\da-f]{4}/i))\n this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n this.index += 4;\n string += String.fromCharCode(parseInt(hex, 16));\n } else {\n var rep = ESCAPE[ch];\n string = string + (rep || ch);\n }\n escape = false;\n } else if (ch === '\\\\') {\n escape = true;\n } else if (ch === quote) {\n this.index++;\n this.tokens.push({\n index: start,\n text: rawString,\n string: string,\n constant: true,\n fn: function() { return string; }\n });\n return;\n } else {\n string += ch;\n }\n this.index++;\n }\n this.throwError('Unterminated quote', start);\n }\n};\n\n\nfunction isConstant(exp) {\n return exp.constant;\n}\n\n/**\n * @constructor\n */\nvar Parser = function (lexer, $filter, options) {\n this.lexer = lexer;\n this.$filter = $filter;\n this.options = options;\n};\n\nParser.ZERO = extend(function () {\n return 0;\n}, {\n sharedGetter: true,\n constant: true\n});\n\nParser.prototype = {\n constructor: Parser,\n\n parse: function (text) {\n this.text = text;\n this.tokens = this.lexer.lex(text);\n\n var value = this.statements();\n\n if (this.tokens.length !== 0) {\n this.throwError('is an unexpected token', this.tokens[0]);\n }\n\n value.literal = !!value.literal;\n value.constant = !!value.constant;\n\n return value;\n },\n\n primary: function () {\n var primary;\n if (this.expect('(')) {\n primary = this.filterChain();\n this.consume(')');\n } else if (this.expect('[')) {\n primary = this.arrayDeclaration();\n } else if (this.expect('{')) {\n primary = this.object();\n } else {\n var token = this.expect();\n primary = token.fn;\n if (!primary) {\n this.throwError('not a primary expression', token);\n }\n if (token.constant) {\n primary.constant = true;\n primary.literal = true;\n }\n }\n\n var next, context;\n while ((next = this.expect('(', '[', '.'))) {\n if (next.text === '(') {\n primary = this.functionCall(primary, context);\n context = null;\n } else if (next.text === '[') {\n context = primary;\n primary = this.objectIndex(primary);\n } else if (next.text === '.') {\n context = primary;\n primary = this.fieldAccess(primary);\n } else {\n this.throwError('IMPOSSIBLE');\n }\n }\n return primary;\n },\n\n throwError: function(msg, token) {\n throw $parseMinErr('syntax',\n 'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n },\n\n peekToken: function() {\n if (this.tokens.length === 0)\n throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n return this.tokens[0];\n },\n\n peek: function(e1, e2, e3, e4) {\n if (this.tokens.length > 0) {\n var token = this.tokens[0];\n var t = token.text;\n if (t === e1 || t === e2 || t === e3 || t === e4 ||\n (!e1 && !e2 && !e3 && !e4)) {\n return token;\n }\n }\n return false;\n },\n\n expect: function(e1, e2, e3, e4){\n var token = this.peek(e1, e2, e3, e4);\n if (token) {\n this.tokens.shift();\n return token;\n }\n return false;\n },\n\n consume: function(e1){\n if (!this.expect(e1)) {\n this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n }\n },\n\n unaryFn: function(fn, right) {\n return extend(function $parseUnaryFn(self, locals) {\n return fn(self, locals, right);\n }, {\n constant:right.constant,\n inputs: [right]\n });\n },\n\n binaryFn: function(left, fn, right, isBranching) {\n return extend(function $parseBinaryFn(self, locals) {\n return fn(self, locals, left, right);\n }, {\n constant: left.constant && right.constant,\n inputs: !isBranching && [left, right]\n });\n },\n\n statements: function() {\n var statements = [];\n while (true) {\n if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n statements.push(this.filterChain());\n if (!this.expect(';')) {\n // optimize for the common case where there is only one statement.\n // TODO(size): maybe we should not support multiple statements?\n return (statements.length === 1)\n ? statements[0]\n : function $parseStatements(self, locals) {\n var value;\n for (var i = 0, ii = statements.length; i < ii; i++) {\n value = statements[i](self, locals);\n }\n return value;\n };\n }\n }\n },\n\n filterChain: function() {\n var left = this.expression();\n var token;\n while ((token = this.expect('|'))) {\n left = this.filter(left);\n }\n return left;\n },\n\n filter: function(inputFn) {\n var token = this.expect();\n var fn = this.$filter(token.text);\n var argsFn;\n var args;\n\n if (this.peek(':')) {\n argsFn = [];\n args = []; // we can safely reuse the array\n while (this.expect(':')) {\n argsFn.push(this.expression());\n }\n }\n\n var inputs = [inputFn].concat(argsFn || []);\n\n return extend(function $parseFilter(self, locals) {\n var input = inputFn(self, locals);\n if (args) {\n args[0] = input;\n\n var i = argsFn.length;\n while (i--) {\n args[i + 1] = argsFn[i](self, locals);\n }\n\n return fn.apply(undefined, args);\n }\n\n return fn(input);\n }, {\n constant: !fn.$stateful && inputs.every(isConstant),\n inputs: !fn.$stateful && inputs\n });\n },\n\n expression: function() {\n return this.assignment();\n },\n\n assignment: function() {\n var left = this.ternary();\n var right;\n var token;\n if ((token = this.expect('='))) {\n if (!left.assign) {\n this.throwError('implies assignment but [' +\n this.text.substring(0, token.index) + '] can not be assigned to', token);\n }\n right = this.ternary();\n return extend(function $parseAssignment(scope, locals) {\n return left.assign(scope, right(scope, locals), locals);\n }, {\n inputs: [left, right]\n });\n }\n return left;\n },\n\n ternary: function() {\n var left = this.logicalOR();\n var middle;\n var token;\n if ((token = this.expect('?'))) {\n middle = this.assignment();\n if ((token = this.expect(':'))) {\n var right = this.assignment();\n\n return extend(function $parseTernary(self, locals){\n return left(self, locals) ? middle(self, locals) : right(self, locals);\n }, {\n constant: left.constant && middle.constant && right.constant\n });\n\n } else {\n this.throwError('expected :', token);\n }\n }\n\n return left;\n },\n\n logicalOR: function() {\n var left = this.logicalAND();\n var token;\n while ((token = this.expect('||'))) {\n left = this.binaryFn(left, token.fn, this.logicalAND(), true);\n }\n return left;\n },\n\n logicalAND: function() {\n var left = this.equality();\n var token;\n if ((token = this.expect('&&'))) {\n left = this.binaryFn(left, token.fn, this.logicalAND(), true);\n }\n return left;\n },\n\n equality: function() {\n var left = this.relational();\n var token;\n if ((token = this.expect('==','!=','===','!=='))) {\n left = this.binaryFn(left, token.fn, this.equality());\n }\n return left;\n },\n\n relational: function() {\n var left = this.additive();\n var token;\n if ((token = this.expect('<', '>', '<=', '>='))) {\n left = this.binaryFn(left, token.fn, this.relational());\n }\n return left;\n },\n\n additive: function() {\n var left = this.multiplicative();\n var token;\n while ((token = this.expect('+','-'))) {\n left = this.binaryFn(left, token.fn, this.multiplicative());\n }\n return left;\n },\n\n multiplicative: function() {\n var left = this.unary();\n var token;\n while ((token = this.expect('*','/','%'))) {\n left = this.binaryFn(left, token.fn, this.unary());\n }\n return left;\n },\n\n unary: function() {\n var token;\n if (this.expect('+')) {\n return this.primary();\n } else if ((token = this.expect('-'))) {\n return this.binaryFn(Parser.ZERO, token.fn, this.unary());\n } else if ((token = this.expect('!'))) {\n return this.unaryFn(token.fn, this.unary());\n } else {\n return this.primary();\n }\n },\n\n fieldAccess: function(object) {\n var expression = this.text;\n var field = this.expect().text;\n var getter = getterFn(field, this.options, expression);\n\n return extend(function $parseFieldAccess(scope, locals, self) {\n return getter(self || object(scope, locals));\n }, {\n assign: function(scope, value, locals) {\n var o = object(scope, locals);\n if (!o) object.assign(scope, o = {});\n return setter(o, field, value, expression);\n }\n });\n },\n\n objectIndex: function(obj) {\n var expression = this.text;\n\n var indexFn = this.expression();\n this.consume(']');\n\n return extend(function $parseObjectIndex(self, locals) {\n var o = obj(self, locals),\n i = indexFn(self, locals),\n v;\n\n ensureSafeMemberName(i, expression);\n if (!o) return undefined;\n v = ensureSafeObject(o[i], expression);\n return v;\n }, {\n assign: function(self, value, locals) {\n var key = ensureSafeMemberName(indexFn(self, locals), expression);\n // prevent overwriting of Function.constructor which would break ensureSafeObject check\n var o = ensureSafeObject(obj(self, locals), expression);\n if (!o) obj.assign(self, o = {});\n return o[key] = value;\n }\n });\n },\n\n functionCall: function(fnGetter, contextGetter) {\n var argsFn = [];\n if (this.peekToken().text !== ')') {\n do {\n argsFn.push(this.expression());\n } while (this.expect(','));\n }\n this.consume(')');\n\n var expressionText = this.text;\n // we can safely reuse the array across invocations\n var args = argsFn.length ? [] : null;\n\n return function $parseFunctionCall(scope, locals) {\n var context = contextGetter ? contextGetter(scope, locals) : scope;\n var fn = fnGetter(scope, locals, context) || noop;\n\n if (args) {\n var i = argsFn.length;\n while (i--) {\n args[i] = ensureSafeObject(argsFn[i](scope, locals), expressionText);\n }\n }\n\n ensureSafeObject(context, expressionText);\n ensureSafeFunction(fn, expressionText);\n\n // IE stupidity! (IE doesn't have apply for some native functions)\n var v = fn.apply\n ? fn.apply(context, args)\n : fn(args[0], args[1], args[2], args[3], args[4]);\n\n return ensureSafeObject(v, expressionText);\n };\n },\n\n // This is used with json array declaration\n arrayDeclaration: function () {\n var elementFns = [];\n if (this.peekToken().text !== ']') {\n do {\n if (this.peek(']')) {\n // Support trailing commas per ES5.1.\n break;\n }\n var elementFn = this.expression();\n elementFns.push(elementFn);\n } while (this.expect(','));\n }\n this.consume(']');\n\n return extend(function $parseArrayLiteral(self, locals) {\n var array = [];\n for (var i = 0, ii = elementFns.length; i < ii; i++) {\n array.push(elementFns[i](self, locals));\n }\n return array;\n }, {\n literal: true,\n constant: elementFns.every(isConstant),\n inputs: elementFns\n });\n },\n\n object: function () {\n var keys = [], valueFns = [];\n if (this.peekToken().text !== '}') {\n do {\n if (this.peek('}')) {\n // Support trailing commas per ES5.1.\n break;\n }\n var token = this.expect();\n keys.push(token.string || token.text);\n this.consume(':');\n var value = this.expression();\n valueFns.push(value);\n } while (this.expect(','));\n }\n this.consume('}');\n\n return extend(function $parseObjectLiteral(self, locals) {\n var object = {};\n for (var i = 0, ii = valueFns.length; i < ii; i++) {\n object[keys[i]] = valueFns[i](self, locals);\n }\n return object;\n }, {\n literal: true,\n constant: valueFns.every(isConstant),\n inputs: valueFns\n });\n }\n};\n\n\n//////////////////////////////////////////////////\n// Parser helper functions\n//////////////////////////////////////////////////\n\nfunction setter(obj, path, setValue, fullExp) {\n ensureSafeObject(obj, fullExp);\n\n var element = path.split('.'), key;\n for (var i = 0; element.length > 1; i++) {\n key = ensureSafeMemberName(element.shift(), fullExp);\n var propertyObj = ensureSafeObject(obj[key], fullExp);\n if (!propertyObj) {\n propertyObj = {};\n obj[key] = propertyObj;\n }\n obj = propertyObj;\n }\n key = ensureSafeMemberName(element.shift(), fullExp);\n ensureSafeObject(obj[key], fullExp);\n obj[key] = setValue;\n return setValue;\n}\n\nvar getterFnCache = createMap();\n\n/**\n * Implementation of the \"Black Hole\" variant from:\n * - http://jsperf.com/angularjs-parse-getter/4\n * - http://jsperf.com/path-evaluation-simplified/7\n */\nfunction cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp) {\n ensureSafeMemberName(key0, fullExp);\n ensureSafeMemberName(key1, fullExp);\n ensureSafeMemberName(key2, fullExp);\n ensureSafeMemberName(key3, fullExp);\n ensureSafeMemberName(key4, fullExp);\n\n return function cspSafeGetter(scope, locals) {\n var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope;\n\n if (pathVal == null) return pathVal;\n pathVal = pathVal[key0];\n\n if (!key1) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key1];\n\n if (!key2) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key2];\n\n if (!key3) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key3];\n\n if (!key4) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key4];\n\n return pathVal;\n };\n}\n\nfunction getterFn(path, options, fullExp) {\n var fn = getterFnCache[path];\n\n if (fn) return fn;\n\n var pathKeys = path.split('.'),\n pathKeysLength = pathKeys.length;\n\n // http://jsperf.com/angularjs-parse-getter/6\n if (options.csp) {\n if (pathKeysLength < 6) {\n fn = cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4], fullExp);\n } else {\n fn = function cspSafeGetter(scope, locals) {\n var i = 0, val;\n do {\n val = cspSafeGetterFn(pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++],\n pathKeys[i++], fullExp)(scope, locals);\n\n locals = undefined; // clear after first iteration\n scope = val;\n } while (i < pathKeysLength);\n return val;\n };\n }\n } else {\n var code = '';\n forEach(pathKeys, function(key, index) {\n ensureSafeMemberName(key, fullExp);\n code += 'if(s == null) return undefined;\\n' +\n 's='+ (index\n // we simply dereference 's' on any .dot notation\n ? 's'\n // but if we are first then we check locals first, and if so read it first\n : '((l&&l.hasOwnProperty(\"' + key + '\"))?l:s)') + '.' + key + ';\\n';\n });\n code += 'return s;';\n\n /* jshint -W054 */\n var evaledFnGetter = new Function('s', 'l', code); // s=scope, l=locals\n /* jshint +W054 */\n evaledFnGetter.toString = valueFn(code);\n\n fn = evaledFnGetter;\n }\n\n fn.sharedGetter = true;\n fn.assign = function(self, value) {\n return setter(self, path, value, path);\n };\n getterFnCache[path] = fn;\n return fn;\n}\n\n///////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $parse\n * @kind function\n *\n * @description\n *\n * Converts Angular {@link guide/expression expression} into a function.\n *\n * ```js\n * var getter = $parse('user.name');\n * var setter = getter.assign;\n * var context = {user:{name:'angular'}};\n * var locals = {user:{name:'local'}};\n *\n * expect(getter(context)).toEqual('angular');\n * setter(context, 'newValue');\n * expect(context.user.name).toEqual('newValue');\n * expect(getter(context, locals)).toEqual('local');\n * ```\n *\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n *\n * The returned function also has the following properties:\n * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript\n * literal.\n * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript\n * constant literals.\n * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be\n * set to a function to change its value on the given context.\n *\n */\n\n\n/**\n * @ngdoc provider\n * @name $parseProvider\n *\n * @description\n * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n * service.\n */\nfunction $ParseProvider() {\n var cache = createMap();\n\n var $parseOptions = {\n csp: false\n };\n\n\n this.$get = ['$filter', '$sniffer', function($filter, $sniffer) {\n $parseOptions.csp = $sniffer.csp;\n\n function wrapSharedExpression(exp) {\n var wrapped = exp;\n\n if (exp.sharedGetter) {\n wrapped = function $parseWrapper(self, locals) {\n return exp(self, locals);\n };\n wrapped.literal = exp.literal;\n wrapped.constant = exp.constant;\n wrapped.assign = exp.assign;\n }\n\n return wrapped;\n }\n\n return function $parse(exp, interceptorFn) {\n var parsedExpression, oneTime, cacheKey;\n\n switch (typeof exp) {\n case 'string':\n cacheKey = exp = exp.trim();\n\n parsedExpression = cache[cacheKey];\n\n if (!parsedExpression) {\n if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {\n oneTime = true;\n exp = exp.substring(2);\n }\n\n var lexer = new Lexer($parseOptions);\n var parser = new Parser(lexer, $filter, $parseOptions);\n parsedExpression = parser.parse(exp);\n\n if (parsedExpression.constant) {\n parsedExpression.$$watchDelegate = constantWatchDelegate;\n } else if (oneTime) {\n //oneTime is not part of the exp passed to the Parser so we may have to\n //wrap the parsedExpression before adding a $$watchDelegate\n parsedExpression = wrapSharedExpression(parsedExpression);\n parsedExpression.$$watchDelegate = parsedExpression.literal ?\n oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;\n } else if (parsedExpression.inputs) {\n parsedExpression.$$watchDelegate = inputsWatchDelegate;\n }\n\n cache[cacheKey] = parsedExpression;\n }\n return addInterceptor(parsedExpression, interceptorFn);\n\n case 'function':\n return addInterceptor(exp, interceptorFn);\n\n default:\n return addInterceptor(noop, interceptorFn);\n }\n };\n\n function collectExpressionInputs(inputs, list) {\n for (var i = 0, ii = inputs.length; i < ii; i++) {\n var input = inputs[i];\n if (!input.constant) {\n if (input.inputs) {\n collectExpressionInputs(input.inputs, list);\n } else if (list.indexOf(input) === -1) { // TODO(perf) can we do better?\n list.push(input);\n }\n }\n }\n\n return list;\n }\n\n function expressionInputDirtyCheck(newValue, oldValueOfValue) {\n\n if (newValue == null || oldValueOfValue == null) { // null/undefined\n return newValue === oldValueOfValue;\n }\n\n if (typeof newValue === 'object') {\n\n // attempt to convert the value to a primitive type\n // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can\n // be cheaply dirty-checked\n newValue = newValue.valueOf();\n\n if (typeof newValue === 'object') {\n // objects/arrays are not supported - deep-watching them would be too expensive\n return false;\n }\n\n // fall-through to the primitive equality check\n }\n\n //Primitive or NaN\n return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);\n }\n\n function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var inputExpressions = parsedExpression.$$inputs ||\n (parsedExpression.$$inputs = collectExpressionInputs(parsedExpression.inputs, []));\n\n var lastResult;\n\n if (inputExpressions.length === 1) {\n var oldInputValue = expressionInputDirtyCheck; // init to something unique so that equals check fails\n inputExpressions = inputExpressions[0];\n return scope.$watch(function expressionInputWatch(scope) {\n var newInputValue = inputExpressions(scope);\n if (!expressionInputDirtyCheck(newInputValue, oldInputValue)) {\n lastResult = parsedExpression(scope);\n oldInputValue = newInputValue && newInputValue.valueOf();\n }\n return lastResult;\n }, listener, objectEquality);\n }\n\n var oldInputValueOfValues = [];\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails\n }\n\n return scope.$watch(function expressionInputsWatch(scope) {\n var changed = false;\n\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n var newInputValue = inputExpressions[i](scope);\n if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) {\n oldInputValueOfValues[i] = newInputValue && newInputValue.valueOf();\n }\n }\n\n if (changed) {\n lastResult = parsedExpression(scope);\n }\n\n return lastResult;\n }, listener, objectEquality);\n }\n\n function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch, lastValue;\n return unwatch = scope.$watch(function oneTimeWatch(scope) {\n return parsedExpression(scope);\n }, function oneTimeListener(value, old, scope) {\n lastValue = value;\n if (isFunction(listener)) {\n listener.apply(this, arguments);\n }\n if (isDefined(value)) {\n scope.$$postDigest(function () {\n if (isDefined(lastValue)) {\n unwatch();\n }\n });\n }\n }, objectEquality);\n }\n\n function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch;\n return unwatch = scope.$watch(function oneTimeWatch(scope) {\n return parsedExpression(scope);\n }, function oneTimeListener(value, old, scope) {\n if (isFunction(listener)) {\n listener.call(this, value, old, scope);\n }\n if (isAllDefined(value)) {\n scope.$$postDigest(function () {\n if(isAllDefined(value)) unwatch();\n });\n }\n }, objectEquality);\n\n function isAllDefined(value) {\n var allDefined = true;\n forEach(value, function (val) {\n if (!isDefined(val)) allDefined = false;\n });\n return allDefined;\n }\n }\n\n function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch;\n return unwatch = scope.$watch(function constantWatch(scope) {\n return parsedExpression(scope);\n }, function constantListener(value, old, scope) {\n if (isFunction(listener)) {\n listener.apply(this, arguments);\n }\n unwatch();\n }, objectEquality);\n }\n\n function addInterceptor(parsedExpression, interceptorFn) {\n if (!interceptorFn) return parsedExpression;\n\n var fn = function interceptedExpression(scope, locals) {\n var value = parsedExpression(scope, locals);\n var result = interceptorFn(value, scope, locals);\n // we only return the interceptor's result if the\n // initial value is defined (for bind-once)\n return isDefined(value) ? result : value;\n };\n\n // Propagate $$watchDelegates other then inputsWatchDelegate\n if (parsedExpression.$$watchDelegate &&\n parsedExpression.$$watchDelegate !== inputsWatchDelegate) {\n fn.$$watchDelegate = parsedExpression.$$watchDelegate;\n } else if (!interceptorFn.$stateful) {\n // If there is an interceptor, but no watchDelegate then treat the interceptor like\n // we treat filters - it is assumed to be a pure function unless flagged with $stateful\n fn.$$watchDelegate = inputsWatchDelegate;\n fn.inputs = [parsedExpression];\n }\n\n return fn;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $q\n * @requires $rootScope\n *\n * @description\n * A promise/deferred implementation inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).\n *\n * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred\n * implementations, and the other which resembles ES6 promises to some degree.\n *\n * # $q constructor\n *\n * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`\n * function as the first argument. This is similar to the native Promise implementation from ES6 Harmony,\n * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n *\n * While the constructor-style use is supported, not all of the supporting methods from ES6 Harmony promises are\n * available yet.\n *\n * It can be used like so:\n *\n * ```js\n * return $q(function(resolve, reject) {\n * // perform some asynchronous operation, resolve or reject the promise when appropriate.\n * setInterval(function() {\n * if (pollStatus > 0) {\n * resolve(polledValue);\n * } else if (pollStatus < 0) {\n * reject(polledValue);\n * } else {\n * pollStatus = pollAgain(function(value) {\n * polledValue = value;\n * });\n * }\n * }, 10000);\n * }).\n * then(function(value) {\n * // handle success\n * }, function(reason) {\n * // handle failure\n * });\n * ```\n *\n * Note: progress/notify callbacks are not currently supported via the ES6-style interface.\n *\n * However, the more traditional CommonJS-style usage is still available, and documented below.\n *\n * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n * interface for interacting with an object that represents the result of an action that is\n * performed asynchronously, and may or may not be finished at any given point in time.\n *\n * From the perspective of dealing with error handling, deferred and promise APIs are to\n * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n *\n * ```js\n * // for the purpose of this example let's assume that variables `$q`, `scope` and `okToGreet`\n * // are available in the current lexical scope (they could have been injected or passed in).\n *\n * function asyncGreet(name) {\n * var deferred = $q.defer();\n *\n * setTimeout(function() {\n * deferred.notify('About to greet ' + name + '.');\n *\n * if (okToGreet(name)) {\n * deferred.resolve('Hello, ' + name + '!');\n * } else {\n * deferred.reject('Greeting ' + name + ' is not allowed.');\n * }\n * }, 1000);\n *\n * return deferred.promise;\n * }\n *\n * var promise = asyncGreet('Robin Hood');\n * promise.then(function(greeting) {\n * alert('Success: ' + greeting);\n * }, function(reason) {\n * alert('Failed: ' + reason);\n * }, function(update) {\n * alert('Got notification: ' + update);\n * });\n * ```\n *\n * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n * comes in the way of guarantees that promise and deferred APIs make, see\n * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n *\n * Additionally the promise api allows for composition that is very hard to do with the\n * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n * section on serial or parallel joining of promises.\n *\n * # The Deferred API\n *\n * A new instance of deferred is constructed by calling `$q.defer()`.\n *\n * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n * that can be used for signaling the successful or unsuccessful completion, as well as the status\n * of the task.\n *\n * **Methods**\n *\n * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection\n * constructed via `$q.reject`, the promise will be rejected instead.\n * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to\n * resolving it with a rejection constructed via `$q.reject`.\n * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n * multiple times before the promise is either resolved or rejected.\n *\n * **Properties**\n *\n * - promise – `{Promise}` – promise object associated with this deferred.\n *\n *\n * # The Promise API\n *\n * A new promise instance is created when a deferred instance is created and can be retrieved by\n * calling `deferred.promise`.\n *\n * The purpose of the promise object is to allow for interested parties to get access to the result\n * of the deferred task when it completes.\n *\n * **Methods**\n *\n * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or\n * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n * as soon as the result is available. The callbacks are called with a single argument: the result\n * or rejection reason. Additionally, the notify callback may be called zero or more times to\n * provide a progress indication, before the promise is resolved or rejected.\n *\n * This method *returns a new promise* which is resolved or rejected via the return value of the\n * `successCallback`, `errorCallback`. It also notifies via the return value of the\n * `notifyCallback` method. The promise cannot be resolved or rejected from the notifyCallback\n * method.\n *\n * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`\n *\n * - `finally(callback)` – allows you to observe either the fulfillment or rejection of a promise,\n * but to do so without modifying the final value. This is useful to release resources or do some\n * clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n * more information.\n *\n * Because `finally` is a reserved word in JavaScript and reserved keywords are not supported as\n * property names by ES3, you'll need to invoke the method like `promise['finally'](callback)` to\n * make your code IE8 and Android 2.x compatible.\n *\n * # Chaining promises\n *\n * Because calling the `then` method of a promise returns a new derived promise, it is easily\n * possible to create a chain of promises:\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * return result + 1;\n * });\n *\n * // promiseB will be resolved immediately after promiseA is resolved and its value\n * // will be the result of promiseA incremented by 1\n * ```\n *\n * It is possible to create chains of any length and since a promise can be resolved with another\n * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n * $http's response interceptors.\n *\n *\n * # Differences between Kris Kowal's Q and $q\n *\n * There are two main differences:\n *\n * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n * mechanism in angular, which means faster propagation of resolution or rejection into your\n * models and avoiding unnecessary browser repaints, which would result in flickering UI.\n * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n * all the important functionality needed for common async tasks.\n *\n * # Testing\n *\n * ```js\n * it('should simulate promise', inject(function($q, $rootScope) {\n * var deferred = $q.defer();\n * var promise = deferred.promise;\n * var resolvedValue;\n *\n * promise.then(function(value) { resolvedValue = value; });\n * expect(resolvedValue).toBeUndefined();\n *\n * // Simulate resolving of promise\n * deferred.resolve(123);\n * // Note that the 'then' function does not get called synchronously.\n * // This is because we want the promise API to always be async, whether or not\n * // it got called synchronously or asynchronously.\n * expect(resolvedValue).toBeUndefined();\n *\n * // Propagate promise resolution to 'then' functions using $apply().\n * $rootScope.$apply();\n * expect(resolvedValue).toEqual(123);\n * }));\n * ```\n *\n * @param {function(function, function)} resolver Function which is responsible for resolving or\n * rejecting the newly created promise. The first parameter is a function which resolves the\n * promise, the second parameter is a function which rejects the promise.\n *\n * @returns {Promise} The newly created promise.\n */\nfunction $QProvider() {\n\n this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n return qFactory(function(callback) {\n $rootScope.$evalAsync(callback);\n }, $exceptionHandler);\n }];\n}\n\nfunction $$QProvider() {\n this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {\n return qFactory(function(callback) {\n $browser.defer(callback);\n }, $exceptionHandler);\n }];\n}\n\n/**\n * Constructs a promise manager.\n *\n * @param {function(function)} nextTick Function for executing functions in the next turn.\n * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n * debugging purposes.\n * @returns {object} Promise manager.\n */\nfunction qFactory(nextTick, exceptionHandler) {\n var $qMinErr = minErr('$q', TypeError);\n function callOnce(self, resolveFn, rejectFn) {\n var called = false;\n function wrap(fn) {\n return function(value) {\n if (called) return;\n called = true;\n fn.call(self, value);\n };\n }\n\n return [wrap(resolveFn), wrap(rejectFn)];\n }\n\n /**\n * @ngdoc method\n * @name ng.$q#defer\n * @kind function\n *\n * @description\n * Creates a `Deferred` object which represents a task which will finish in the future.\n *\n * @returns {Deferred} Returns a new instance of deferred.\n */\n var defer = function() {\n return new Deferred();\n };\n\n function Promise() {\n this.$$state = { status: 0 };\n }\n\n Promise.prototype = {\n then: function(onFulfilled, onRejected, progressBack) {\n var result = new Deferred();\n\n this.$$state.pending = this.$$state.pending || [];\n this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);\n if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);\n\n return result.promise;\n },\n\n \"catch\": function(callback) {\n return this.then(null, callback);\n },\n\n \"finally\": function(callback, progressBack) {\n return this.then(function(value) {\n return handleCallback(value, true, callback);\n }, function(error) {\n return handleCallback(error, false, callback);\n }, progressBack);\n }\n };\n\n //Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native\n function simpleBind(context, fn) {\n return function(value) {\n fn.call(context, value);\n };\n }\n\n function processQueue(state) {\n var fn, promise, pending;\n\n pending = state.pending;\n state.processScheduled = false;\n state.pending = undefined;\n for (var i = 0, ii = pending.length; i < ii; ++i) {\n promise = pending[i][0];\n fn = pending[i][state.status];\n try {\n if (isFunction(fn)) {\n promise.resolve(fn(state.value));\n } else if (state.status === 1) {\n promise.resolve(state.value);\n } else {\n promise.reject(state.value);\n }\n } catch(e) {\n promise.reject(e);\n exceptionHandler(e);\n }\n }\n }\n\n function scheduleProcessQueue(state) {\n if (state.processScheduled || !state.pending) return;\n state.processScheduled = true;\n nextTick(function() { processQueue(state); });\n }\n\n function Deferred() {\n this.promise = new Promise();\n //Necessary to support unbound execution :/\n this.resolve = simpleBind(this, this.resolve);\n this.reject = simpleBind(this, this.reject);\n this.notify = simpleBind(this, this.notify);\n }\n\n Deferred.prototype = {\n resolve: function(val) {\n if (this.promise.$$state.status) return;\n if (val === this.promise) {\n this.$$reject($qMinErr(\n 'qcycle',\n \"Expected promise to be resolved with value other than itself '{0}'\",\n val));\n }\n else {\n this.$$resolve(val);\n }\n\n },\n\n $$resolve: function(val) {\n var then, fns;\n\n fns = callOnce(this, this.$$resolve, this.$$reject);\n try {\n if ((isObject(val) || isFunction(val))) then = val && val.then;\n if (isFunction(then)) {\n this.promise.$$state.status = -1;\n then.call(val, fns[0], fns[1], this.notify);\n } else {\n this.promise.$$state.value = val;\n this.promise.$$state.status = 1;\n scheduleProcessQueue(this.promise.$$state);\n }\n } catch(e) {\n fns[1](e);\n exceptionHandler(e);\n }\n },\n\n reject: function(reason) {\n if (this.promise.$$state.status) return;\n this.$$reject(reason);\n },\n\n $$reject: function(reason) {\n this.promise.$$state.value = reason;\n this.promise.$$state.status = 2;\n scheduleProcessQueue(this.promise.$$state);\n },\n\n notify: function(progress) {\n var callbacks = this.promise.$$state.pending;\n\n if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) {\n nextTick(function() {\n var callback, result;\n for (var i = 0, ii = callbacks.length; i < ii; i++) {\n result = callbacks[i][0];\n callback = callbacks[i][3];\n try {\n result.notify(isFunction(callback) ? callback(progress) : progress);\n } catch(e) {\n exceptionHandler(e);\n }\n }\n });\n }\n }\n };\n\n /**\n * @ngdoc method\n * @name $q#reject\n * @kind function\n *\n * @description\n * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n * a promise chain, you don't need to worry about it.\n *\n * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n * a promise error callback and you want to forward the error to the promise derived from the\n * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n * `reject`.\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * // success: do something and resolve promiseB\n * // with the old or a new result\n * return result;\n * }, function(reason) {\n * // error: handle the error if possible and\n * // resolve promiseB with newPromiseOrValue,\n * // otherwise forward the rejection to promiseB\n * if (canHandle(reason)) {\n * // handle the error and recover\n * return newPromiseOrValue;\n * }\n * return $q.reject(reason);\n * });\n * ```\n *\n * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n */\n var reject = function(reason) {\n var result = new Deferred();\n result.reject(reason);\n return result.promise;\n };\n\n var makePromise = function makePromise(value, resolved) {\n var result = new Deferred();\n if (resolved) {\n result.resolve(value);\n } else {\n result.reject(value);\n }\n return result.promise;\n };\n\n var handleCallback = function handleCallback(value, isResolved, callback) {\n var callbackOutput = null;\n try {\n if (isFunction(callback)) callbackOutput = callback();\n } catch(e) {\n return makePromise(e, false);\n }\n if (isPromiseLike(callbackOutput)) {\n return callbackOutput.then(function() {\n return makePromise(value, isResolved);\n }, function(error) {\n return makePromise(error, false);\n });\n } else {\n return makePromise(value, isResolved);\n }\n };\n\n /**\n * @ngdoc method\n * @name $q#when\n * @kind function\n *\n * @description\n * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n * This is useful when you are dealing with an object that might or might not be a promise, or if\n * the promise comes from a source that can't be trusted.\n *\n * @param {*} value Value or a promise\n * @returns {Promise} Returns a promise of the passed value or promise\n */\n\n\n var when = function(value, callback, errback, progressBack) {\n var result = new Deferred();\n result.resolve(value);\n return result.promise.then(callback, errback, progressBack);\n };\n\n /**\n * @ngdoc method\n * @name $q#all\n * @kind function\n *\n * @description\n * Combines multiple promises into a single promise that is resolved when all of the input\n * promises are resolved.\n *\n * @param {Array.|Object.} promises An array or hash of promises.\n * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n * each value corresponding to the promise at the same index/key in the `promises` array/hash.\n * If any of the promises is resolved with a rejection, this resulting promise will be rejected\n * with the same rejection value.\n */\n\n function all(promises) {\n var deferred = new Deferred(),\n counter = 0,\n results = isArray(promises) ? [] : {};\n\n forEach(promises, function(promise, key) {\n counter++;\n when(promise).then(function(value) {\n if (results.hasOwnProperty(key)) return;\n results[key] = value;\n if (!(--counter)) deferred.resolve(results);\n }, function(reason) {\n if (results.hasOwnProperty(key)) return;\n deferred.reject(reason);\n });\n });\n\n if (counter === 0) {\n deferred.resolve(results);\n }\n\n return deferred.promise;\n }\n\n var $Q = function Q(resolver) {\n if (!isFunction(resolver)) {\n throw $qMinErr('norslvr', \"Expected resolverFn, got '{0}'\", resolver);\n }\n\n if (!(this instanceof Q)) {\n // More useful when $Q is the Promise itself.\n return new Q(resolver);\n }\n\n var deferred = new Deferred();\n\n function resolveFn(value) {\n deferred.resolve(value);\n }\n\n function rejectFn(reason) {\n deferred.reject(reason);\n }\n\n resolver(resolveFn, rejectFn);\n\n return deferred.promise;\n };\n\n $Q.defer = defer;\n $Q.reject = reject;\n $Q.when = when;\n $Q.all = all;\n\n return $Q;\n}\n\nfunction $$RAFProvider(){ //rAF\n this.$get = ['$window', '$timeout', function($window, $timeout) {\n var requestAnimationFrame = $window.requestAnimationFrame ||\n $window.webkitRequestAnimationFrame ||\n $window.mozRequestAnimationFrame;\n\n var cancelAnimationFrame = $window.cancelAnimationFrame ||\n $window.webkitCancelAnimationFrame ||\n $window.mozCancelAnimationFrame ||\n $window.webkitCancelRequestAnimationFrame;\n\n var rafSupported = !!requestAnimationFrame;\n var raf = rafSupported\n ? function(fn) {\n var id = requestAnimationFrame(fn);\n return function() {\n cancelAnimationFrame(id);\n };\n }\n : function(fn) {\n var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666\n return function() {\n $timeout.cancel(timer);\n };\n };\n\n raf.supported = rafSupported;\n\n return raf;\n }];\n}\n\n/**\n * DESIGN NOTES\n *\n * The design decisions behind the scope are heavily favored for speed and memory consumption.\n *\n * The typical use of scope is to watch the expressions, which most of the time return the same\n * value as last time so we optimize the operation.\n *\n * Closures construction is expensive in terms of speed as well as memory:\n * - No closures, instead use prototypical inheritance for API\n * - Internal state needs to be stored on scope directly, which means that private state is\n * exposed as $$____ properties\n *\n * Loop operations are optimized by using while(count--) { ... }\n * - this means that in order to keep the same order of execution as addition we have to add\n * items to the array at the beginning (unshift) instead of at the end (push)\n *\n * Child scopes are created and removed often\n * - Using an array would be slow since inserts in middle are expensive so we use linked list\n *\n * There are few watches then a lot of observers. This is why you don't want the observer to be\n * implemented in the same way as watch. Watch requires return of initialization function which\n * are expensive to construct.\n */\n\n\n/**\n * @ngdoc provider\n * @name $rootScopeProvider\n * @description\n *\n * Provider for the $rootScope service.\n */\n\n/**\n * @ngdoc method\n * @name $rootScopeProvider#digestTtl\n * @description\n *\n * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that the dependencies between `$watch`s will result in\n * several digest iterations. However if an application needs more than the default 10 digest\n * iterations for its model to stabilize then you should investigate what is causing the model to\n * continuously change during the digest.\n *\n * Increasing the TTL could have performance implications, so you should not change it without\n * proper justification.\n *\n * @param {number} limit The number of digest iterations.\n */\n\n\n/**\n * @ngdoc service\n * @name $rootScope\n * @description\n *\n * Every application has a single root {@link ng.$rootScope.Scope scope}.\n * All other scopes are descendant scopes of the root scope. Scopes provide separation\n * between the model and the view, via a mechanism for watching the model for changes.\n * They also provide an event emission/broadcast and subscription facility. See the\n * {@link guide/scope developer guide on scopes}.\n */\nfunction $RootScopeProvider(){\n var TTL = 10;\n var $rootScopeMinErr = minErr('$rootScope');\n var lastDirtyWatch = null;\n var applyAsyncId = null;\n\n this.digestTtl = function(value) {\n if (arguments.length) {\n TTL = value;\n }\n return TTL;\n };\n\n this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',\n function( $injector, $exceptionHandler, $parse, $browser) {\n\n /**\n * @ngdoc type\n * @name $rootScope.Scope\n *\n * @description\n * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n * {@link auto.$injector $injector}. Child scopes are created using the\n * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when\n * compiled HTML template is executed.)\n *\n * Here is a simple scope snippet to show how you can interact with the scope.\n * ```html\n * \n * ```\n *\n * # Inheritance\n * A scope can inherit from a parent scope, as in this example:\n * ```js\n var parent = $rootScope;\n var child = parent.$new();\n\n parent.salutation = \"Hello\";\n child.name = \"World\";\n expect(child.salutation).toEqual('Hello');\n\n child.salutation = \"Welcome\";\n expect(child.salutation).toEqual('Welcome');\n expect(parent.salutation).toEqual('Hello');\n * ```\n *\n *\n * @param {Object.=} providers Map of service factory which need to be\n * provided for the current scope. Defaults to {@link ng}.\n * @param {Object.=} instanceCache Provides pre-instantiated services which should\n * append/override services provided by `providers`. This is handy\n * when unit-testing and having the need to override a default\n * service.\n * @returns {Object} Newly created scope.\n *\n */\n function Scope() {\n this.$id = nextUid();\n this.$$phase = this.$parent = this.$$watchers =\n this.$$nextSibling = this.$$prevSibling =\n this.$$childHead = this.$$childTail = null;\n this['this'] = this.$root = this;\n this.$$destroyed = false;\n this.$$asyncQueue = [];\n this.$$postDigestQueue = [];\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$$isolateBindings = null;\n this.$$applyAsyncQueue = [];\n }\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$id\n *\n * @description\n * Unique scope ID (monotonically increasing) useful for debugging.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$parent\n *\n * @description\n * Reference to the parent scope.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$root\n *\n * @description\n * Reference to the root scope.\n */\n\n Scope.prototype = {\n constructor: Scope,\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$new\n * @kind function\n *\n * @description\n * Creates a new child {@link ng.$rootScope.Scope scope}.\n *\n * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.\n * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.\n *\n * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is\n * desired for the scope and its child scopes to be permanently detached from the parent and\n * thus stop participating in model change detection and listener notification by invoking.\n *\n * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n * parent scope. The scope is isolated, as it can not see parent scope properties.\n * When creating widgets, it is useful for the widget to not accidentally read parent\n * state.\n *\n * @returns {Object} The newly created child scope.\n *\n */\n $new: function(isolate) {\n var child;\n\n if (isolate) {\n child = new Scope();\n child.$root = this.$root;\n // ensure that there is just one async queue per $rootScope and its children\n child.$$asyncQueue = this.$$asyncQueue;\n child.$$postDigestQueue = this.$$postDigestQueue;\n } else {\n // Only create a child scope class if somebody asks for one,\n // but cache it to allow the VM to optimize lookups.\n if (!this.$$ChildScope) {\n this.$$ChildScope = function ChildScope() {\n this.$$watchers = this.$$nextSibling =\n this.$$childHead = this.$$childTail = null;\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$id = nextUid();\n this.$$ChildScope = null;\n };\n this.$$ChildScope.prototype = this;\n }\n child = new this.$$ChildScope();\n }\n child['this'] = child;\n child.$parent = this;\n child.$$prevSibling = this.$$childTail;\n if (this.$$childHead) {\n this.$$childTail.$$nextSibling = child;\n this.$$childTail = child;\n } else {\n this.$$childHead = this.$$childTail = child;\n }\n return child;\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watch\n * @kind function\n *\n * @description\n * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n *\n * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest\n * $digest()} and should return the value that will be watched. (Since\n * {@link ng.$rootScope.Scope#$digest $digest()} reruns when it detects changes the\n * `watchExpression` can execute multiple times per\n * {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)\n * - The `listener` is called only when the value from the current `watchExpression` and the\n * previous call to `watchExpression` are not equal (with the exception of the initial run,\n * see below). Inequality is determined according to reference inequality,\n * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)\n * via the `!==` Javascript operator, unless `objectEquality == true`\n * (see next point)\n * - When `objectEquality == true`, inequality of the `watchExpression` is determined\n * according to the {@link angular.equals} function. To save the value of the object for\n * later comparison, the {@link angular.copy} function is used. This therefore means that\n * watching complex objects will have adverse memory and performance implications.\n * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n * This is achieved by rerunning the watchers until no changes are detected. The rerun\n * iteration limit is 10 to prevent an infinite loop deadlock.\n *\n *\n * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,\n * you can register a `watchExpression` function with no `listener`. (Since `watchExpression`\n * can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a\n * change is detected, be prepared for multiple calls to your listener.)\n *\n * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the\n * watcher. In rare cases, this is undesirable because the listener is called when the result\n * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n * listener was called due to initialization.\n *\n *\n *\n * # Example\n * ```js\n // let's assume that scope was dependency injected as the $rootScope\n var scope = $rootScope;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n\n\n\n // Using a function as a watchExpression\n var food;\n scope.foodCounter = 0;\n expect(scope.foodCounter).toEqual(0);\n scope.$watch(\n // This function returns the value being watched. It is called for each turn of the $digest loop\n function() { return food; },\n // This is the change listener, called when the value returned from the above function changes\n function(newValue, oldValue) {\n if ( newValue !== oldValue ) {\n // Only increment the counter if the value changed\n scope.foodCounter = scope.foodCounter + 1;\n }\n }\n );\n // No digest has been run so the counter will be zero\n expect(scope.foodCounter).toEqual(0);\n\n // Run the digest but since food has not changed count will still be zero\n scope.$digest();\n expect(scope.foodCounter).toEqual(0);\n\n // Update food and run digest. Now the counter will increment\n food = 'cheeseburger';\n scope.$digest();\n expect(scope.foodCounter).toEqual(1);\n\n * ```\n *\n *\n *\n * @param {(function()|string)} watchExpression Expression that is evaluated on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers\n * a call to the `listener`.\n *\n * - `string`: Evaluated as {@link guide/expression expression}\n * - `function(scope)`: called with current `scope` as a parameter.\n * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value\n * of `watchExpression` changes.\n *\n * - `newVal` contains the current value of the `watchExpression`\n * - `oldVal` contains the previous value of the `watchExpression`\n * - `scope` refers to the current scope\n * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of\n * comparing for reference equality.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $watch: function(watchExp, listener, objectEquality) {\n var get = $parse(watchExp);\n\n if (get.$$watchDelegate) {\n return get.$$watchDelegate(this, listener, objectEquality, get);\n }\n var scope = this,\n array = scope.$$watchers,\n watcher = {\n fn: listener,\n last: initWatchVal,\n get: get,\n exp: watchExp,\n eq: !!objectEquality\n };\n\n lastDirtyWatch = null;\n\n if (!isFunction(listener)) {\n watcher.fn = noop;\n }\n\n if (!array) {\n array = scope.$$watchers = [];\n }\n // we use unshift since we use a while loop in $digest for speed.\n // the while loop reads in reverse order.\n array.unshift(watcher);\n\n return function deregisterWatch() {\n arrayRemove(array, watcher);\n lastDirtyWatch = null;\n };\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchGroup\n * @kind function\n *\n * @description\n * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.\n * If any one expression in the collection changes the `listener` is executed.\n *\n * - The items in the `watchExpressions` array are observed via standard $watch operation and are examined on every\n * call to $digest() to see if any items changes.\n * - The `listener` is called whenever any expression in the `watchExpressions` array changes.\n *\n * @param {Array.} watchExpressions Array of expressions that will be individually\n * watched using {@link ng.$rootScope.Scope#$watch $watch()}\n *\n * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any\n * expression in `watchExpressions` changes\n * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * The `scope` refers to the current scope.\n * @returns {function()} Returns a de-registration function for all listeners.\n */\n $watchGroup: function(watchExpressions, listener) {\n var oldValues = new Array(watchExpressions.length);\n var newValues = new Array(watchExpressions.length);\n var deregisterFns = [];\n var self = this;\n var changeReactionScheduled = false;\n var firstRun = true;\n\n if (!watchExpressions.length) {\n // No expressions means we call the listener ASAP\n var shouldCall = true;\n self.$evalAsync(function () {\n if (shouldCall) listener(newValues, newValues, self);\n });\n return function deregisterWatchGroup() {\n shouldCall = false;\n };\n }\n\n if (watchExpressions.length === 1) {\n // Special case size of one\n return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {\n newValues[0] = value;\n oldValues[0] = oldValue;\n listener(newValues, (value === oldValue) ? newValues : oldValues, scope);\n });\n }\n\n forEach(watchExpressions, function (expr, i) {\n var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) {\n newValues[i] = value;\n oldValues[i] = oldValue;\n if (!changeReactionScheduled) {\n changeReactionScheduled = true;\n self.$evalAsync(watchGroupAction);\n }\n });\n deregisterFns.push(unwatchFn);\n });\n\n function watchGroupAction() {\n changeReactionScheduled = false;\n\n if (firstRun) {\n firstRun = false;\n listener(newValues, newValues, self);\n } else {\n listener(newValues, oldValues, self);\n }\n }\n\n return function deregisterWatchGroup() {\n while (deregisterFns.length) {\n deregisterFns.shift()();\n }\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchCollection\n * @kind function\n *\n * @description\n * Shallow watches the properties of an object and fires whenever any of the properties change\n * (for arrays, this implies watching the array items; for object maps, this implies watching\n * the properties). If a change is detected, the `listener` callback is fired.\n *\n * - The `obj` collection is observed via standard $watch operation and is examined on every\n * call to $digest() to see if any items have been added, removed, or moved.\n * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n * adding, removing, and moving items belonging to an object or array.\n *\n *\n * # Example\n * ```js\n $scope.names = ['igor', 'matias', 'misko', 'james'];\n $scope.dataCount = 4;\n\n $scope.$watchCollection('names', function(newNames, oldNames) {\n $scope.dataCount = newNames.length;\n });\n\n expect($scope.dataCount).toEqual(4);\n $scope.$digest();\n\n //still at 4 ... no changes\n expect($scope.dataCount).toEqual(4);\n\n $scope.names.pop();\n $scope.$digest();\n\n //now there's been a change\n expect($scope.dataCount).toEqual(3);\n * ```\n *\n *\n * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The\n * expression value should evaluate to an object or an array which is observed on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the\n * collection will trigger a call to the `listener`.\n *\n * @param {function(newCollection, oldCollection, scope)} listener a callback function called\n * when a change is detected.\n * - The `newCollection` object is the newly modified data obtained from the `obj` expression\n * - The `oldCollection` object is a copy of the former collection data.\n * Due to performance considerations, the`oldCollection` value is computed only if the\n * `listener` function declares two or more arguments.\n * - The `scope` argument refers to the current scope.\n *\n * @returns {function()} Returns a de-registration function for this listener. When the\n * de-registration function is executed, the internal watch operation is terminated.\n */\n $watchCollection: function(obj, listener) {\n $watchCollectionInterceptor.$stateful = true;\n\n var self = this;\n // the current value, updated on each dirty-check run\n var newValue;\n // a shallow copy of the newValue from the last dirty-check run,\n // updated to match newValue during dirty-check run\n var oldValue;\n // a shallow copy of the newValue from when the last change happened\n var veryOldValue;\n // only track veryOldValue if the listener is asking for it\n var trackVeryOldValue = (listener.length > 1);\n var changeDetected = 0;\n var changeDetector = $parse(obj, $watchCollectionInterceptor);\n var internalArray = [];\n var internalObject = {};\n var initRun = true;\n var oldLength = 0;\n\n function $watchCollectionInterceptor(_value) {\n newValue = _value;\n var newLength, key, bothNaN, newItem, oldItem;\n\n if (!isObject(newValue)) { // if primitive\n if (oldValue !== newValue) {\n oldValue = newValue;\n changeDetected++;\n }\n } else if (isArrayLike(newValue)) {\n if (oldValue !== internalArray) {\n // we are transitioning from something which was not an array into array.\n oldValue = internalArray;\n oldLength = oldValue.length = 0;\n changeDetected++;\n }\n\n newLength = newValue.length;\n\n if (oldLength !== newLength) {\n // if lengths do not match we need to trigger change notification\n changeDetected++;\n oldValue.length = oldLength = newLength;\n }\n // copy the items to oldValue and look for changes.\n for (var i = 0; i < newLength; i++) {\n oldItem = oldValue[i];\n newItem = newValue[i];\n\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[i] = newItem;\n }\n }\n } else {\n if (oldValue !== internalObject) {\n // we are transitioning from something which was not an object into object.\n oldValue = internalObject = {};\n oldLength = 0;\n changeDetected++;\n }\n // copy the items to oldValue and look for changes.\n newLength = 0;\n for (key in newValue) {\n if (newValue.hasOwnProperty(key)) {\n newLength++;\n newItem = newValue[key];\n oldItem = oldValue[key];\n\n if (key in oldValue) {\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[key] = newItem;\n }\n } else {\n oldLength++;\n oldValue[key] = newItem;\n changeDetected++;\n }\n }\n }\n if (oldLength > newLength) {\n // we used to have more keys, need to find them and destroy them.\n changeDetected++;\n for(key in oldValue) {\n if (!newValue.hasOwnProperty(key)) {\n oldLength--;\n delete oldValue[key];\n }\n }\n }\n }\n return changeDetected;\n }\n\n function $watchCollectionAction() {\n if (initRun) {\n initRun = false;\n listener(newValue, newValue, self);\n } else {\n listener(newValue, veryOldValue, self);\n }\n\n // make a copy for the next time a collection is changed\n if (trackVeryOldValue) {\n if (!isObject(newValue)) {\n //primitive\n veryOldValue = newValue;\n } else if (isArrayLike(newValue)) {\n veryOldValue = new Array(newValue.length);\n for (var i = 0; i < newValue.length; i++) {\n veryOldValue[i] = newValue[i];\n }\n } else { // if object\n veryOldValue = {};\n for (var key in newValue) {\n if (hasOwnProperty.call(newValue, key)) {\n veryOldValue[key] = newValue[key];\n }\n }\n }\n }\n }\n\n return this.$watch(changeDetector, $watchCollectionAction);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$digest\n * @kind function\n *\n * @description\n * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and\n * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change\n * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}\n * until no more listeners are firing. This means that it is possible to get into an infinite\n * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n * iterations exceeds 10.\n *\n * Usually, you don't call `$digest()` directly in\n * {@link ng.directive:ngController controllers} or in\n * {@link ng.$compileProvider#directive directives}.\n * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within\n * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.\n *\n * If you want to be notified whenever `$digest()` is called,\n * you can register a `watchExpression` function with\n * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.\n *\n * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n *\n * # Example\n * ```js\n var scope = ...;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n * ```\n *\n */\n $digest: function() {\n var watch, value, last,\n watchers,\n asyncQueue = this.$$asyncQueue,\n postDigestQueue = this.$$postDigestQueue,\n length,\n dirty, ttl = TTL,\n next, current, target = this,\n watchLog = [],\n logIdx, logMsg, asyncTask;\n\n beginPhase('$digest');\n // Check for changes to browser url that happened in sync before the call to $digest\n $browser.$$checkUrlChange();\n\n if (this === $rootScope && applyAsyncId !== null) {\n // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then\n // cancel the scheduled $apply and flush the queue of expressions to be evaluated.\n $browser.defer.cancel(applyAsyncId);\n flushApplyAsync();\n }\n\n lastDirtyWatch = null;\n\n do { // \"while dirty\" loop\n dirty = false;\n current = target;\n\n while(asyncQueue.length) {\n try {\n asyncTask = asyncQueue.shift();\n asyncTask.scope.$eval(asyncTask.expression);\n } catch (e) {\n $exceptionHandler(e);\n }\n lastDirtyWatch = null;\n }\n\n traverseScopesLoop:\n do { // \"traverse the scopes\" loop\n if ((watchers = current.$$watchers)) {\n // process our watches\n length = watchers.length;\n while (length--) {\n try {\n watch = watchers[length];\n // Most common watches are on primitives, in which case we can short\n // circuit it with === operator, only when === fails do we use .equals\n if (watch) {\n if ((value = watch.get(current)) !== (last = watch.last) &&\n !(watch.eq\n ? equals(value, last)\n : (typeof value === 'number' && typeof last === 'number'\n && isNaN(value) && isNaN(last)))) {\n dirty = true;\n lastDirtyWatch = watch;\n watch.last = watch.eq ? copy(value, null) : value;\n watch.fn(value, ((last === initWatchVal) ? value : last), current);\n if (ttl < 5) {\n logIdx = 4 - ttl;\n if (!watchLog[logIdx]) watchLog[logIdx] = [];\n logMsg = (isFunction(watch.exp))\n ? 'fn: ' + (watch.exp.name || watch.exp.toString())\n : watch.exp;\n logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last);\n watchLog[logIdx].push(logMsg);\n }\n } else if (watch === lastDirtyWatch) {\n // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n // have already been tested.\n dirty = false;\n break traverseScopesLoop;\n }\n }\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n }\n\n // Insanity Warning: scope depth-first traversal\n // yes, this code is a bit crazy, but it works and we have tests to prove it!\n // this piece should be kept in sync with the traversal in $broadcast\n if (!(next = (current.$$childHead ||\n (current !== target && current.$$nextSibling)))) {\n while(current !== target && !(next = current.$$nextSibling)) {\n current = current.$parent;\n }\n }\n } while ((current = next));\n\n // `break traverseScopesLoop;` takes us to here\n\n if((dirty || asyncQueue.length) && !(ttl--)) {\n clearPhase();\n throw $rootScopeMinErr('infdig',\n '{0} $digest() iterations reached. Aborting!\\n' +\n 'Watchers fired in the last 5 iterations: {1}',\n TTL, toJson(watchLog));\n }\n\n } while (dirty || asyncQueue.length);\n\n clearPhase();\n\n while(postDigestQueue.length) {\n try {\n postDigestQueue.shift()();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n },\n\n\n /**\n * @ngdoc event\n * @name $rootScope.Scope#$destroy\n * @eventType broadcast on scope being destroyed\n *\n * @description\n * Broadcasted when a scope and its children are being destroyed.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$destroy\n * @kind function\n *\n * @description\n * Removes the current scope (and all of its children) from the parent scope. Removal implies\n * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer\n * propagate to the current scope and its children. Removal also implies that the current\n * scope is eligible for garbage collection.\n *\n * The `$destroy()` is usually used by directives such as\n * {@link ng.directive:ngRepeat ngRepeat} for managing the\n * unrolling of the loop.\n *\n * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n * Application code can register a `$destroy` event handler that will give it a chance to\n * perform any necessary cleanup.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n $destroy: function() {\n // we can't destroy the root scope or a scope that has been already destroyed\n if (this.$$destroyed) return;\n var parent = this.$parent;\n\n this.$broadcast('$destroy');\n this.$$destroyed = true;\n if (this === $rootScope) return;\n\n for (var eventName in this.$$listenerCount) {\n decrementListenerCount(this, this.$$listenerCount[eventName], eventName);\n }\n\n // sever all the references to parent scopes (after this cleanup, the current scope should\n // not be retained by any of our references and should be eligible for garbage collection)\n if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;\n if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;\n if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\n\n // All of the code below is bogus code that works around V8's memory leak via optimized code\n // and inline caches.\n //\n // see:\n // - https://code.google.com/p/v8/issues/detail?id=2073#c26\n // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909\n // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n\n this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =\n this.$$childTail = this.$root = null;\n\n // don't reset these to null in case some async task tries to register a listener/watch/task\n this.$$listeners = {};\n this.$$watchers = this.$$asyncQueue = this.$$postDigestQueue = [];\n\n // prevent NPEs since these methods have references to properties we nulled out\n this.$destroy = this.$digest = this.$apply = noop;\n this.$on = this.$watch = this.$watchGroup = function() { return noop; };\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$eval\n * @kind function\n *\n * @description\n * Executes the `expression` on the current scope and returns the result. Any exceptions in\n * the expression are propagated (uncaught). This is useful when evaluating Angular\n * expressions.\n *\n * # Example\n * ```js\n var scope = ng.$rootScope.Scope();\n scope.a = 1;\n scope.b = 2;\n\n expect(scope.$eval('a+b')).toEqual(3);\n expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n * ```\n *\n * @param {(string|function())=} expression An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n * @returns {*} The result of evaluating the expression.\n */\n $eval: function(expr, locals) {\n return $parse(expr)(this, locals);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$evalAsync\n * @kind function\n *\n * @description\n * Executes the expression on the current scope at a later point in time.\n *\n * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n * that:\n *\n * - it will execute after the function that scheduled the evaluation (preferably before DOM\n * rendering).\n * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after\n * `expression` execution.\n *\n * Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n * will be scheduled. However, it is encouraged to always call code that changes the model\n * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n *\n * @param {(string|function())=} expression An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n */\n $evalAsync: function(expr) {\n // if we are outside of an $digest loop and this is the first time we are scheduling async\n // task also schedule async auto-flush\n if (!$rootScope.$$phase && !$rootScope.$$asyncQueue.length) {\n $browser.defer(function() {\n if ($rootScope.$$asyncQueue.length) {\n $rootScope.$digest();\n }\n });\n }\n\n this.$$asyncQueue.push({scope: this, expression: expr});\n },\n\n $$postDigest : function(fn) {\n this.$$postDigestQueue.push(fn);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$apply\n * @kind function\n *\n * @description\n * `$apply()` is used to execute an expression in angular from outside of the angular\n * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n * Because we are calling into the angular framework we need to perform proper scope life\n * cycle of {@link ng.$exceptionHandler exception handling},\n * {@link ng.$rootScope.Scope#$digest executing watches}.\n *\n * ## Life cycle\n *\n * # Pseudo-Code of `$apply()`\n * ```js\n function $apply(expr) {\n try {\n return $eval(expr);\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n $root.$digest();\n }\n }\n * ```\n *\n *\n * Scope's `$apply()` method transitions through the following stages:\n *\n * 1. The {@link guide/expression expression} is executed using the\n * {@link ng.$rootScope.Scope#$eval $eval()} method.\n * 2. Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the\n * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.\n *\n *\n * @param {(string|function())=} exp An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n *\n * @returns {*} The result of evaluating the expression.\n */\n $apply: function(expr) {\n try {\n beginPhase('$apply');\n return this.$eval(expr);\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n clearPhase();\n try {\n $rootScope.$digest();\n } catch (e) {\n $exceptionHandler(e);\n throw e;\n }\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$applyAsync\n * @kind function\n *\n * @description\n * Schedule the invokation of $apply to occur at a later time. The actual time difference\n * varies across browsers, but is typically around ~10 milliseconds.\n *\n * This can be used to queue up multiple expressions which need to be evaluated in the same\n * digest.\n *\n * @param {(string|function())=} exp An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n */\n $applyAsync: function(expr) {\n var scope = this;\n expr && $rootScope.$$applyAsyncQueue.push($applyAsyncExpression);\n scheduleApplyAsync();\n\n function $applyAsyncExpression() {\n scope.$eval(expr);\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$on\n * @kind function\n *\n * @description\n * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for\n * discussion of event life cycle.\n *\n * The event listener function format is: `function(event, args...)`. The `event` object\n * passed into the listener has the following attributes:\n *\n * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n * `$broadcast`-ed.\n * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the\n * event propagates through the scope hierarchy, this property is set to null.\n * - `name` - `{string}`: name of the event.\n * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n * further event propagation (available only for events that were `$emit`-ed).\n * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n * to true.\n * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n *\n * @param {string} name Event name to listen on.\n * @param {function(event, ...args)} listener Function to call when the event is emitted.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $on: function(name, listener) {\n var namedListeners = this.$$listeners[name];\n if (!namedListeners) {\n this.$$listeners[name] = namedListeners = [];\n }\n namedListeners.push(listener);\n\n var current = this;\n do {\n if (!current.$$listenerCount[name]) {\n current.$$listenerCount[name] = 0;\n }\n current.$$listenerCount[name]++;\n } while ((current = current.$parent));\n\n var self = this;\n return function() {\n namedListeners[namedListeners.indexOf(listener)] = null;\n decrementListenerCount(self, 1, name);\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$emit\n * @kind function\n *\n * @description\n * Dispatches an event `name` upwards through the scope hierarchy notifying the\n * registered {@link ng.$rootScope.Scope#$on} listeners.\n *\n * The event life cycle starts at the scope on which `$emit` was called. All\n * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n * registered listeners along the way. The event will stop propagating if one of the listeners\n * cancels it.\n *\n * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * @param {string} name Event name to emit.\n * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).\n */\n $emit: function(name, args) {\n var empty = [],\n namedListeners,\n scope = this,\n stopPropagation = false,\n event = {\n name: name,\n targetScope: scope,\n stopPropagation: function() {stopPropagation = true;},\n preventDefault: function() {\n event.defaultPrevented = true;\n },\n defaultPrevented: false\n },\n listenerArgs = concat([event], arguments, 1),\n i, length;\n\n do {\n namedListeners = scope.$$listeners[name] || empty;\n event.currentScope = scope;\n for (i=0, length=namedListeners.length; i= 8 ) {\n normalizedVal = urlResolve(uri).href;\n if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n return 'unsafe:'+normalizedVal;\n }\n }\n return uri;\n };\n };\n}\n\nvar $sceMinErr = minErr('$sce');\n\nvar SCE_CONTEXTS = {\n HTML: 'html',\n CSS: 'css',\n URL: 'url',\n // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a\n // url. (e.g. ng-include, script src, templateUrl)\n RESOURCE_URL: 'resourceUrl',\n JS: 'js'\n};\n\n// Helper functions follow.\n\n// Copied from:\n// http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962\n// Prereq: s is a string.\nfunction escapeForRegexp(s) {\n return s.replace(/([-()\\[\\]{}+?*.$\\^|,:# -1) {\n throw $sceMinErr('iwcard',\n 'Illegal sequence *** in string matcher. String: {0}', matcher);\n }\n matcher = escapeForRegexp(matcher).\n replace('\\\\*\\\\*', '.*').\n replace('\\\\*', '[^:/.?&;]*');\n return new RegExp('^' + matcher + '$');\n } else if (isRegExp(matcher)) {\n // The only other type of matcher allowed is a Regexp.\n // Match entire URL / disallow partial matches.\n // Flags are reset (i.e. no global, ignoreCase or multiline)\n return new RegExp('^' + matcher.source + '$');\n } else {\n throw $sceMinErr('imatcher',\n 'Matchers may only be \"self\", string patterns or RegExp objects');\n }\n}\n\n\nfunction adjustMatchers(matchers) {\n var adjustedMatchers = [];\n if (isDefined(matchers)) {\n forEach(matchers, function(matcher) {\n adjustedMatchers.push(adjustMatcher(matcher));\n });\n }\n return adjustedMatchers;\n}\n\n\n/**\n * @ngdoc service\n * @name $sceDelegate\n * @kind function\n *\n * @description\n *\n * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n * Contextual Escaping (SCE)} services to AngularJS.\n *\n * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is\n * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n * work because `$sce` delegates to `$sceDelegate` for these operations.\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n *\n * The default instance of `$sceDelegate` should work out of the box with little pain. While you\n * can override it completely to change the behavior of `$sce`, the common case would\n * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as\n * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist\n * $sceDelegateProvider.resourceUrlWhitelist} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n */\n\n/**\n * @ngdoc provider\n * @name $sceDelegateProvider\n * @description\n *\n * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n * $sceDelegate} service. This allows one to get/set the whitelists and blacklists used to ensure\n * that the URLs used for sourcing Angular templates are safe. Refer {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and\n * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n *\n * For the general details about this service in Angular, read the main page for {@link ng.$sce\n * Strict Contextual Escaping (SCE)}.\n *\n * **Example**: Consider the following case. \n *\n * - your app is hosted at url `http://myapp.example.com/`\n * - but some of your templates are hosted on other domains you control such as\n * `http://srv01.assets.example.com/`, `http://srv02.assets.example.com/`, etc.\n * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n *\n * Here is what a secure configuration for this scenario might look like:\n *\n * ```\n * angular.module('myApp', []).config(function($sceDelegateProvider) {\n * $sceDelegateProvider.resourceUrlWhitelist([\n * // Allow same origin resource loads.\n * 'self',\n * // Allow loading from our assets domain. Notice the difference between * and **.\n * 'http://srv*.assets.example.com/**'\n * ]);\n *\n * // The blacklist overrides the whitelist so the open redirect here is blocked.\n * $sceDelegateProvider.resourceUrlBlacklist([\n * 'http://myapp.example.com/clickThru**'\n * ]);\n * });\n * ```\n */\n\nfunction $SceDelegateProvider() {\n this.SCE_CONTEXTS = SCE_CONTEXTS;\n\n // Resource URLs can also be trusted by policy.\n var resourceUrlWhitelist = ['self'],\n resourceUrlBlacklist = [];\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlWhitelist\n * @kind function\n *\n * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.\n *\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * Note: **an empty whitelist array will block all URLs**!\n *\n * @return {Array} the currently set whitelist array.\n *\n * The **default value** when no whitelist has been explicitly set is `['self']` allowing only\n * same origin resource requests.\n *\n * @description\n * Sets/Gets the whitelist of trusted resource URLs.\n */\n this.resourceUrlWhitelist = function (value) {\n if (arguments.length) {\n resourceUrlWhitelist = adjustMatchers(value);\n }\n return resourceUrlWhitelist;\n };\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlBlacklist\n * @kind function\n *\n * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.\n *\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * The typical usage for the blacklist is to **block\n * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n * these would otherwise be trusted but actually return content from the redirected domain.\n *\n * Finally, **the blacklist overrides the whitelist** and has the final say.\n *\n * @return {Array} the currently set blacklist array.\n *\n * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there\n * is no blacklist.)\n *\n * @description\n * Sets/Gets the blacklist of trusted resource URLs.\n */\n\n this.resourceUrlBlacklist = function (value) {\n if (arguments.length) {\n resourceUrlBlacklist = adjustMatchers(value);\n }\n return resourceUrlBlacklist;\n };\n\n this.$get = ['$injector', function($injector) {\n\n var htmlSanitizer = function htmlSanitizer(html) {\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n };\n\n if ($injector.has('$sanitize')) {\n htmlSanitizer = $injector.get('$sanitize');\n }\n\n\n function matchUrl(matcher, parsedUrl) {\n if (matcher === 'self') {\n return urlIsSameOrigin(parsedUrl);\n } else {\n // definitely a regex. See adjustMatchers()\n return !!matcher.exec(parsedUrl.href);\n }\n }\n\n function isResourceUrlAllowedByPolicy(url) {\n var parsedUrl = urlResolve(url.toString());\n var i, n, allowed = false;\n // Ensure that at least one item from the whitelist allows this url.\n for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {\n if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {\n allowed = true;\n break;\n }\n }\n if (allowed) {\n // Ensure that no item from the blacklist blocked this url.\n for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {\n if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {\n allowed = false;\n break;\n }\n }\n }\n return allowed;\n }\n\n function generateHolderType(Base) {\n var holderType = function TrustedValueHolderType(trustedValue) {\n this.$$unwrapTrustedValue = function() {\n return trustedValue;\n };\n };\n if (Base) {\n holderType.prototype = new Base();\n }\n holderType.prototype.valueOf = function sceValueOf() {\n return this.$$unwrapTrustedValue();\n };\n holderType.prototype.toString = function sceToString() {\n return this.$$unwrapTrustedValue().toString();\n };\n return holderType;\n }\n\n var trustedValueHolderBase = generateHolderType(),\n byType = {};\n\n byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\n /**\n * @ngdoc method\n * @name $sceDelegate#trustAs\n *\n * @description\n * Returns an object that is trusted by angular for use in specified strict\n * contextual escaping contexts (such as ng-bind-html, ng-include, any src\n * attribute interpolation, any dom event binding attribute interpolation\n * such as for onclick, etc.) that uses the provided value.\n * See {@link ng.$sce $sce} for enabling strict contextual escaping.\n *\n * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n * resourceUrl, html, js and css.\n * @param {*} value The value that that should be considered trusted/safe.\n * @returns {*} A value that can be used to stand in for the provided `value` in places\n * where Angular expects a $sce.trustAs() return value.\n */\n function trustAs(type, trustedValue) {\n var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (!Constructor) {\n throw $sceMinErr('icontext',\n 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n type, trustedValue);\n }\n if (trustedValue === null || trustedValue === undefined || trustedValue === '') {\n return trustedValue;\n }\n // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting\n // mutable objects, we ensure here that the value passed in is actually a string.\n if (typeof trustedValue !== 'string') {\n throw $sceMinErr('itype',\n 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n type);\n }\n return new Constructor(trustedValue);\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#valueOf\n *\n * @description\n * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.\n *\n * If the passed parameter is not a value that had been returned by {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.\n *\n * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}\n * call or anything else.\n * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns\n * `value` unchanged.\n */\n function valueOf(maybeTrusted) {\n if (maybeTrusted instanceof trustedValueHolderBase) {\n return maybeTrusted.$$unwrapTrustedValue();\n } else {\n return maybeTrusted;\n }\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#getTrusted\n *\n * @description\n * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and\n * returns the originally supplied value if the queried context type is a supertype of the\n * created type. If this condition isn't satisfied, throws an exception.\n *\n * @param {string} type The kind of context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} call.\n * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if valid in this context. Otherwise, throws an exception.\n */\n function getTrusted(type, maybeTrusted) {\n if (maybeTrusted === null || maybeTrusted === undefined || maybeTrusted === '') {\n return maybeTrusted;\n }\n var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (constructor && maybeTrusted instanceof constructor) {\n return maybeTrusted.$$unwrapTrustedValue();\n }\n // If we get here, then we may only take one of two actions.\n // 1. sanitize the value for the requested type, or\n // 2. throw an exception.\n if (type === SCE_CONTEXTS.RESOURCE_URL) {\n if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n return maybeTrusted;\n } else {\n throw $sceMinErr('insecurl',\n 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',\n maybeTrusted.toString());\n }\n } else if (type === SCE_CONTEXTS.HTML) {\n return htmlSanitizer(maybeTrusted);\n }\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n }\n\n return { trustAs: trustAs,\n getTrusted: getTrusted,\n valueOf: valueOf };\n }];\n}\n\n\n/**\n * @ngdoc provider\n * @name $sceProvider\n * @description\n *\n * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n * - enable/disable Strict Contextual Escaping (SCE) in a module\n * - override the default implementation with a custom delegate\n *\n * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n */\n\n/* jshint maxlen: false*/\n\n/**\n * @ngdoc service\n * @name $sce\n * @kind function\n *\n * @description\n *\n * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n *\n * # Strict Contextual Escaping\n *\n * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain\n * contexts to result in a value that is marked as safe to use for that context. One example of\n * such a context is binding arbitrary html controlled by the user via `ng-bind-html`. We refer\n * to these contexts as privileged or SCE contexts.\n *\n * As of version 1.2, Angular ships with SCE enabled by default.\n *\n * Note: When enabled (the default), IE8 in quirks mode is not supported. In this mode, IE8 allows\n * one to execute arbitrary javascript by the use of the expression() syntax. Refer\n * to learn more about them.\n * You can ensure your document is in standards mode and not quirks mode by adding ``\n * to the top of your HTML document.\n *\n * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for\n * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n *\n * Here's an example of a binding in a privileged context:\n *\n * ```\n * \n * \n * ```\n *\n * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE\n * disabled, this application allows the user to render arbitrary HTML into the DIV.\n * In a more realistic example, one may be rendering user comments, blog articles, etc. via\n * bindings. (HTML is just one example of a context where rendering user controlled input creates\n * security vulnerabilities.)\n *\n * For the case of HTML, you might use a library, either on the client side, or on the server side,\n * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n *\n * How would you ensure that every place that used these types of bindings was bound to a value that\n * was sanitized by your library (or returned as safe for rendering by your server?) How can you\n * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n * properties/fields and forgot to update the binding to the sanitized value?\n *\n * To be secure by default, you want to ensure that any such bindings are disallowed unless you can\n * determine that something explicitly says it's safe to use a value for binding in that\n * context. You can then audit your code (a simple grep would do) to ensure that this is only done\n * for those values that you can easily tell are safe - because they were received from your server,\n * sanitized by your library, etc. You can organize your codebase to help with this - perhaps\n * allowing only the files in a specific directory to do this. Ensuring that the internal API\n * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.\n *\n * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}\n * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to\n * obtain values that will be accepted by SCE / privileged contexts.\n *\n *\n * ## How does it work?\n *\n * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted\n * $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link\n * ng.$sce#parse $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the\n * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.\n *\n * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly\n * simplified):\n *\n * ```\n * var ngBindHtmlDirective = ['$sce', function($sce) {\n * return function(scope, element, attr) {\n * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n * element.html(value || '');\n * });\n * };\n * }];\n * ```\n *\n * ## Impact on loading templates\n *\n * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n * `templateUrl`'s specified by {@link guide/directive directives}.\n *\n * By default, Angular only loads templates from the same domain and protocol as the application\n * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or\n * protocols, you may either either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist\n * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.\n *\n * *Please note*:\n * The browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy apply in addition to this and may further restrict whether the template is successfully\n * loaded. This means that without the right CORS policy, loading templates from a different domain\n * won't work on all browsers. Also, loading templates from `file://` URL does not work on some\n * browsers.\n *\n * ## This feels like too much overhead\n *\n * It's important to remember that SCE only applies to interpolation expressions.\n *\n * If your expressions are constant literals, they're automatically trusted and you don't need to\n * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.\n * `implicitly trusted'\">`) just works.\n *\n * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them\n * through {@link ng.$sce#getTrusted $sce.getTrusted}. SCE doesn't play a role here.\n *\n * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n * templates in `ng-include` from your application's domain without having to even know about SCE.\n * It blocks loading templates from other domains or loading templates over http from an https\n * served document. You can change these by setting your own custom {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.\n *\n * This significantly reduces the overhead. It is far easier to pay the small overhead and have an\n * application that's secure and can be audited to verify that with much more ease than bolting\n * security onto an application later.\n *\n * \n * ## What trusted context types are supported?\n *\n * | Context | Notes |\n * |---------------------|----------------|\n * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |\n * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |\n * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |\n * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |\n *\n * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} \n *\n * Each element in these arrays must be one of the following:\n *\n * - **'self'**\n * - The special **string**, `'self'`, can be used to match against all URLs of the **same\n * domain** as the application document using the **same protocol**.\n * - **String** (except the special value `'self'`)\n * - The string is matched against the full *normalized / absolute URL* of the resource\n * being tested (substring matches are not good enough.)\n * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters\n * match themselves.\n * - `*`: matches zero or more occurrences of any character other than one of the following 6\n * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and ';'. It's a useful wildcard for use\n * in a whitelist.\n * - `**`: matches zero or more occurrences of *any* character. As such, it's not\n * not appropriate to use in for a scheme, domain, etc. as it would match too much. (e.g.\n * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n * not have been the intention.) Its usage at the very end of the path is ok. (e.g.\n * http://foo.example.com/templates/**).\n * - **RegExp** (*see caveat below*)\n * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax\n * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to\n * accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n * have good test coverage.). For instance, the use of `.` in the regex is correct only in a\n * small number of cases. A `.` character in the regex used when matching the scheme or a\n * subdomain could be matched against a `:` or literal `.` that was likely not intended. It\n * is highly recommended to use the string patterns and only fall back to regular expressions\n * if they as a last resort.\n * - The regular expression must be an instance of RegExp (i.e. not a string.) It is\n * matched against the **entire** *normalized / absolute URL* of the resource being tested\n * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags\n * present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n * - If you are generating your JavaScript from some other templating engine (not\n * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n * remember to escape your regular expression (and be aware that you might need more than\n * one level of escaping depending on your templating engine and the way you interpolated\n * the value.) Do make use of your platform's escaping mechanism as it might be good\n * enough before coding your own. e.g. Ruby has\n * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n * Javascript lacks a similar built in function for escaping. Take a look at Google\n * Closure library's [goog.string.regExpEscape(s)](\n * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n *\n * ## Show me an example using SCE.\n *\n * \n * \n * \n * \n * User comments\n * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n * $sanitize is available. If $sanitize isn't available, this results in an error instead of an\n * exploit.\n * \n * \n * {{userComment.name}}:\n * \n * \n * \n * \n * \n * \n *\n * \n * angular.module('mySceApp', ['ngSanitize'])\n * .controller('AppController', ['$http', '$templateCache', '$sce',\n * function($http, $templateCache, $sce) {\n * var self = this;\n * $http.get(\"test_data.json\", {cache: $templateCache}).success(function(userComments) {\n * self.userComments = userComments;\n * });\n * self.explicitlyTrustedHtml = $sce.trustAsHtml(\n * 'Hover over this text.');\n * }]);\n * \n *\n * \n * [\n * { \"name\": \"Alice\",\n * \"htmlComment\":\n * \"Is anyone reading this?\"\n * },\n * { \"name\": \"Bob\",\n * \"htmlComment\": \"Yes! Am I the only other one?\"\n * }\n * ]\n * \n *\n * \n * describe('SCE doc demo', function() {\n * it('should sanitize untrusted values', function() {\n * expect(element.all(by.css('.htmlComment')).first().getInnerHtml())\n * .toBe('Is anyone reading this?');\n * });\n *\n * it('should NOT sanitize explicitly trusted values', function() {\n * expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(\n * 'Hover over this text.');\n * });\n * });\n * \n * \n *\n *\n *\n * ## Can I disable SCE completely?\n *\n * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits\n * for little coding overhead. It will be much harder to take an SCE disabled application and\n * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE\n * for cases where you have a lot of existing code that was written before SCE was introduced and\n * you're migrating them a module at a time.\n *\n * That said, here's how you can completely disable SCE:\n *\n * ```\n * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n * // Completely disable SCE. For demonstration purposes only!\n * // Do not use in new projects.\n * $sceProvider.enabled(false);\n * });\n * ```\n *\n */\n/* jshint maxlen: 100 */\n\nfunction $SceProvider() {\n var enabled = true;\n\n /**\n * @ngdoc method\n * @name $sceProvider#enabled\n * @kind function\n *\n * @param {boolean=} value If provided, then enables/disables SCE.\n * @return {boolean} true if SCE is enabled, false otherwise.\n *\n * @description\n * Enables/disables SCE and returns the current value.\n */\n this.enabled = function (value) {\n if (arguments.length) {\n enabled = !!value;\n }\n return enabled;\n };\n\n\n /* Design notes on the default implementation for SCE.\n *\n * The API contract for the SCE delegate\n * -------------------------------------\n * The SCE delegate object must provide the following 3 methods:\n *\n * - trustAs(contextEnum, value)\n * This method is used to tell the SCE service that the provided value is OK to use in the\n * contexts specified by contextEnum. It must return an object that will be accepted by\n * getTrusted() for a compatible contextEnum and return this value.\n *\n * - valueOf(value)\n * For values that were not produced by trustAs(), return them as is. For values that were\n * produced by trustAs(), return the corresponding input value to trustAs. Basically, if\n * trustAs is wrapping the given values into some type, this operation unwraps it when given\n * such a value.\n *\n * - getTrusted(contextEnum, value)\n * This function should return the a value that is safe to use in the context specified by\n * contextEnum or throw and exception otherwise.\n *\n * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n * opaque or wrapped in some holder object. That happens to be an implementation detail. For\n * instance, an implementation could maintain a registry of all trusted objects by context. In\n * such a case, trustAs() would return the same object that was passed in. getTrusted() would\n * return the same object passed in if it was found in the registry under a compatible context or\n * throw an exception otherwise. An implementation might only wrap values some of the time based\n * on some criteria. getTrusted() might return a value and not throw an exception for special\n * constants or objects even if not wrapped. All such implementations fulfill this contract.\n *\n *\n * A note on the inheritance model for SCE contexts\n * ------------------------------------------------\n * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This\n * is purely an implementation details.\n *\n * The contract is simply this:\n *\n * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n * will also succeed.\n *\n * Inheritance happens to capture this in a natural way. In some future, we\n * may not use inheritance anymore. That is OK because no code outside of\n * sce.js and sceSpecs.js would need to be aware of this detail.\n */\n\n this.$get = ['$parse', '$sniffer', '$sceDelegate', function(\n $parse, $sniffer, $sceDelegate) {\n // Prereq: Ensure that we're not running in IE8 quirks mode. In that mode, IE allows\n // the \"expression(javascript expression)\" syntax which is insecure.\n if (enabled && $sniffer.msie && $sniffer.msieDocumentMode < 8) {\n throw $sceMinErr('iequirks',\n 'Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks ' +\n 'mode. You can fix this by adding the text to the top of your HTML ' +\n 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');\n }\n\n var sce = shallowCopy(SCE_CONTEXTS);\n\n /**\n * @ngdoc method\n * @name $sce#isEnabled\n * @kind function\n *\n * @return {Boolean} true if SCE is enabled, false otherwise. If you want to set the value, you\n * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n *\n * @description\n * Returns a boolean indicating if SCE is enabled.\n */\n sce.isEnabled = function () {\n return enabled;\n };\n sce.trustAs = $sceDelegate.trustAs;\n sce.getTrusted = $sceDelegate.getTrusted;\n sce.valueOf = $sceDelegate.valueOf;\n\n if (!enabled) {\n sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n sce.valueOf = identity;\n }\n\n /**\n * @ngdoc method\n * @name $sce#parseAs\n *\n * @description\n * Converts Angular {@link guide/expression expression} into a function. This is like {@link\n * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it\n * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,\n * *result*)}\n *\n * @param {string} type The kind of SCE context in which this result will be used.\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n sce.parseAs = function sceParseAs(type, expr) {\n var parsed = $parse(expr);\n if (parsed.literal && parsed.constant) {\n return parsed;\n } else {\n return $parse(expr, function (value) {\n return sce.getTrusted(type, value);\n });\n }\n };\n\n /**\n * @ngdoc method\n * @name $sce#trustAs\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such,\n * returns an object that is trusted by angular for use in specified strict contextual\n * escaping contexts (such as ng-bind-html, ng-include, any src attribute\n * interpolation, any dom event binding attribute interpolation such as for onclick, etc.)\n * that uses the provided value. See * {@link ng.$sce $sce} for enabling strict contextual\n * escaping.\n *\n * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n * resource_url, html, js and css.\n * @param {*} value The value that that should be considered trusted/safe.\n * @returns {*} A value that can be used to stand in for the provided `value` in places\n * where Angular expects a $sce.trustAs() return value.\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsHtml\n *\n * @description\n * Shorthand method. `$sce.trustAsHtml(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml\n * $sce.getTrustedHtml(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl\n * $sce.getTrustedUrl(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsResourceUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the return\n * value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsJs\n *\n * @description\n * Shorthand method. `$sce.trustAsJs(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs\n * $sce.getTrustedJs(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrusted\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,\n * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the\n * originally supplied value if the queried context type is a supertype of the created type.\n * If this condition isn't satisfied, throws an exception.\n *\n * @param {string} type The kind of context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}\n * call.\n * @returns {*} The value the was originally provided to\n * {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.\n * Otherwise, throws an exception.\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedHtml\n *\n * @description\n * Shorthand method. `$sce.getTrustedHtml(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedCss\n *\n * @description\n * Shorthand method. `$sce.getTrustedCss(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedResourceUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedResourceUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedJs\n *\n * @description\n * Shorthand method. `$sce.getTrustedJs(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsHtml\n *\n * @description\n * Shorthand method. `$sce.parseAsHtml(expression string)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.HTML, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsCss\n *\n * @description\n * Shorthand method. `$sce.parseAsCss(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.CSS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsUrl(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsResourceUrl(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.RESOURCE_URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsJs\n *\n * @description\n * Shorthand method. `$sce.parseAsJs(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.JS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n // Shorthand delegations.\n var parse = sce.parseAs,\n getTrusted = sce.getTrusted,\n trustAs = sce.trustAs;\n\n forEach(SCE_CONTEXTS, function (enumValue, name) {\n var lName = lowercase(name);\n sce[camelCase(\"parse_as_\" + lName)] = function (expr) {\n return parse(enumValue, expr);\n };\n sce[camelCase(\"get_trusted_\" + lName)] = function (value) {\n return getTrusted(enumValue, value);\n };\n sce[camelCase(\"trust_as_\" + lName)] = function (value) {\n return trustAs(enumValue, value);\n };\n });\n\n return sce;\n }];\n}\n\n/**\n * !!! This is an undocumented \"private\" service !!!\n *\n * @name $sniffer\n * @requires $window\n * @requires $document\n *\n * @property {boolean} history Does the browser support html5 history api ?\n * @property {boolean} hashchange Does the browser support hashchange event ?\n * @property {boolean} transitions Does the browser support CSS transition events ?\n * @property {boolean} animations Does the browser support CSS animation events ?\n *\n * @description\n * This is very simple implementation of testing browser's features.\n */\nfunction $SnifferProvider() {\n this.$get = ['$window', '$document', function($window, $document) {\n var eventSupport = {},\n android =\n int((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n document = $document[0] || {},\n documentMode = document.documentMode,\n vendorPrefix,\n vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/,\n bodyStyle = document.body && document.body.style,\n transitions = false,\n animations = false,\n match;\n\n if (bodyStyle) {\n for(var prop in bodyStyle) {\n if(match = vendorRegex.exec(prop)) {\n vendorPrefix = match[0];\n vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);\n break;\n }\n }\n\n if(!vendorPrefix) {\n vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';\n }\n\n transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));\n animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));\n\n if (android && (!transitions||!animations)) {\n transitions = isString(document.body.style.webkitTransition);\n animations = isString(document.body.style.webkitAnimation);\n }\n }\n\n\n return {\n // Android has history.pushState, but it does not update location correctly\n // so let's not use the history API at all.\n // http://code.google.com/p/android/issues/detail?id=17471\n // https://github.com/angular/angular.js/issues/904\n\n // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n // so let's not use the history API also\n // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n // jshint -W018\n history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),\n // jshint +W018\n hashchange: 'onhashchange' in $window &&\n // IE8 compatible mode lies\n (!documentMode || documentMode > 7),\n hasEvent: function(event) {\n // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n // it. In particular the event is not fired when backspace or delete key are pressed or\n // when cut operation is performed.\n if (event == 'input' && msie == 9) return false;\n\n if (isUndefined(eventSupport[event])) {\n var divElm = document.createElement('div');\n eventSupport[event] = 'on' + event in divElm;\n }\n\n return eventSupport[event];\n },\n csp: csp(),\n vendorPrefix: vendorPrefix,\n transitions : transitions,\n animations : animations,\n android: android,\n msie : msie,\n msieDocumentMode: documentMode\n };\n }];\n}\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc service\n * @name $templateRequest\n *\n * @description\n * The `$templateRequest` service downloads the provided template using `$http` and, upon success,\n * stores the contents inside of `$templateCache`. If the HTTP request fails or the response data\n * of the HTTP request is empty then a `$compile` error will be thrown (the exception can be thwarted\n * by setting the 2nd parameter of the function to true).\n *\n * @param {string} tpl The HTTP request template URL\n * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty\n *\n * @return {Promise} the HTTP Promise for the given.\n *\n * @property {number} totalPendingRequests total amount of pending template requests being downloaded.\n */\nfunction $TemplateRequestProvider() {\n this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) {\n function handleRequestFn(tpl, ignoreRequestError) {\n var self = handleRequestFn;\n self.totalPendingRequests++;\n\n return $http.get(tpl, { cache : $templateCache })\n .then(function(response) {\n var html = response.data;\n if(!html || html.length === 0) {\n return handleError();\n }\n\n self.totalPendingRequests--;\n $templateCache.put(tpl, html);\n return html;\n }, handleError);\n\n function handleError() {\n self.totalPendingRequests--;\n if (!ignoreRequestError) {\n throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl);\n }\n return $q.reject();\n }\n }\n\n handleRequestFn.totalPendingRequests = 0;\n\n return handleRequestFn;\n }];\n}\n\nfunction $$TestabilityProvider() {\n this.$get = ['$rootScope', '$browser', '$location',\n function($rootScope, $browser, $location) {\n\n /**\n * @name $testability\n *\n * @description\n * The private $$testability service provides a collection of methods for use when debugging\n * or by automated test and debugging tools.\n */\n var testability = {};\n\n /**\n * @name $$testability#findBindings\n *\n * @description\n * Returns an array of elements that are bound (via ng-bind or {{}})\n * to expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The binding expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression. Filters and whitespace are ignored.\n */\n testability.findBindings = function(element, expression, opt_exactMatch) {\n var bindings = element.getElementsByClassName('ng-binding');\n var matches = [];\n forEach(bindings, function(binding) {\n var dataBinding = angular.element(binding).data('$binding');\n if (dataBinding) {\n forEach(dataBinding, function(bindingName) {\n if (opt_exactMatch) {\n var matcher = new RegExp('(^|\\\\s)' + expression + '(\\\\s|\\\\||$)');\n if (matcher.test(bindingName)) {\n matches.push(binding);\n }\n } else {\n if (bindingName.indexOf(expression) != -1) {\n matches.push(binding);\n }\n }\n });\n }\n });\n return matches;\n };\n\n /**\n * @name $$testability#findModels\n *\n * @description\n * Returns an array of elements that are two-way found via ng-model to\n * expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The model expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression.\n */\n testability.findModels = function(element, expression, opt_exactMatch) {\n var prefixes = ['ng-', 'data-ng-', 'ng\\\\:'];\n for (var p = 0; p < prefixes.length; ++p) {\n var attributeEquals = opt_exactMatch ? '=' : '*=';\n var selector = '[' + prefixes[p] + 'model' + attributeEquals + '\"' + expression + '\"]';\n var elements = element.querySelectorAll(selector);\n if (elements.length) {\n return elements;\n }\n }\n };\n\n /**\n * @name $$testability#getLocation\n *\n * @description\n * Shortcut for getting the location in a browser agnostic way. Returns\n * the path, search, and hash. (e.g. /path?a=b#hash)\n */\n testability.getLocation = function() {\n return $location.url();\n };\n\n /**\n * @name $$testability#setLocation\n *\n * @description\n * Shortcut for navigating to a location without doing a full page reload.\n *\n * @param {string} url The location url (path, search and hash,\n * e.g. /path?a=b#hash) to go to.\n */\n testability.setLocation = function(url) {\n if (url !== $location.url()) {\n $location.url(url);\n $rootScope.$digest();\n }\n };\n\n /**\n * @name $$testability#whenStable\n *\n * @description\n * Calls the callback when $timeout and $http requests are completed.\n *\n * @param {function} callback\n */\n testability.whenStable = function(callback) {\n $browser.notifyWhenNoOutstandingRequests(callback);\n };\n\n return testability;\n }];\n}\n\nfunction $TimeoutProvider() {\n this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',\n function($rootScope, $browser, $q, $$q, $exceptionHandler) {\n var deferreds = {};\n\n\n /**\n * @ngdoc service\n * @name $timeout\n *\n * @description\n * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n * block and delegates any exceptions to\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * The return value of registering a timeout function is a promise, which will be resolved when\n * the timeout is reached and the timeout function is executed.\n *\n * To cancel a timeout request, call `$timeout.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n * synchronously flush the queue of deferred functions.\n *\n * @param {function()} fn A function, whose execution should be delayed.\n * @param {number=} [delay=0] Delay in milliseconds.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this\n * promise will be resolved with is the return value of the `fn` function.\n *\n */\n function timeout(fn, delay, invokeApply) {\n var skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise,\n timeoutId;\n\n timeoutId = $browser.defer(function() {\n try {\n deferred.resolve(fn());\n } catch(e) {\n deferred.reject(e);\n $exceptionHandler(e);\n }\n finally {\n delete deferreds[promise.$$timeoutId];\n }\n\n if (!skipApply) $rootScope.$apply();\n }, delay);\n\n promise.$$timeoutId = timeoutId;\n deferreds[timeoutId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $timeout#cancel\n *\n * @description\n * Cancels a task associated with the `promise`. As a result of this, the promise will be\n * resolved with a rejection.\n *\n * @param {Promise=} promise Promise returned by the `$timeout` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n timeout.cancel = function(promise) {\n if (promise && promise.$$timeoutId in deferreds) {\n deferreds[promise.$$timeoutId].reject('canceled');\n delete deferreds[promise.$$timeoutId];\n return $browser.defer.cancel(promise.$$timeoutId);\n }\n return false;\n };\n\n return timeout;\n }];\n}\n\n// NOTE: The usage of window and document instead of $window and $document here is\n// deliberate. This service depends on the specific behavior of anchor nodes created by the\n// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n// cause us to break tests. In addition, when the browser resolves a URL for XHR, it\n// doesn't know about mocked locations and resolves URLs to the real document - which is\n// exactly the behavior needed here. There is little value is mocking these out for this\n// service.\nvar urlParsingNode = document.createElement(\"a\");\nvar originUrl = urlResolve(window.location.href, true);\n\n\n/**\n *\n * Implementation Notes for non-IE browsers\n * ----------------------------------------\n * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n * results both in the normalizing and parsing of the URL. Normalizing means that a relative\n * URL will be resolved into an absolute URL in the context of the application document.\n * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n * properties are all populated to reflect the normalized URL. This approach has wide\n * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc. See\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *\n * Implementation Notes for IE\n * ---------------------------\n * IE >= 8 and <= 10 normalizes the URL when assigned to the anchor node similar to the other\n * browsers. However, the parsed components will not be set if the URL assigned did not specify\n * them. (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.) We\n * work around that by performing the parsing in a 2nd step by taking a previously normalized\n * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the\n * properties such as protocol, hostname, port, etc.\n *\n * IE7 does not normalize the URL when assigned to an anchor node. (Apparently, it does, if one\n * uses the inner HTML approach to assign the URL as part of an HTML snippet -\n * http://stackoverflow.com/a/472729) However, setting img[src] does normalize the URL.\n * Unfortunately, setting img[src] to something like \"javascript:foo\" on IE throws an exception.\n * Since the primary usage for normalizing URLs is to sanitize such URLs, we can't use that\n * method and IE < 8 is unsupported.\n *\n * References:\n * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n * http://url.spec.whatwg.org/#urlutils\n * https://github.com/angular/angular.js/pull/2902\n * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n *\n * @kind function\n * @param {string} url The URL to be parsed.\n * @description Normalizes and parses a URL.\n * @returns {object} Returns the normalized URL as a dictionary.\n *\n * | member name | Description |\n * |---------------|----------------|\n * | href | A normalized version of the provided URL if it was not an absolute URL |\n * | protocol | The protocol including the trailing colon |\n * | host | The host and port (if the port is non-default) of the normalizedUrl |\n * | search | The search params, minus the question mark |\n * | hash | The hash string, minus the hash symbol\n * | hostname | The hostname\n * | port | The port, without \":\"\n * | pathname | The pathname, beginning with \"/\"\n *\n */\nfunction urlResolve(url, base) {\n var href = url;\n\n if (msie) {\n // Normalize before parse. Refer Implementation Notes on why this is\n // done in two steps on IE.\n urlParsingNode.setAttribute(\"href\", href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/')\n ? urlParsingNode.pathname\n : '/' + urlParsingNode.pathname\n };\n}\n\n/**\n * Parse a request URL and determine whether this is a same-origin request as the application document.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the request is for the same origin as the application document.\n */\nfunction urlIsSameOrigin(requestUrl) {\n var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n return (parsed.protocol === originUrl.protocol &&\n parsed.host === originUrl.host);\n}\n\n/**\n * @ngdoc service\n * @name $window\n *\n * @description\n * A reference to the browser's `window` object. While `window`\n * is globally available in JavaScript, it causes testability problems, because\n * it is a global variable. In angular we always refer to it through the\n * `$window` service, so it may be overridden, removed or mocked for testing.\n *\n * Expressions, like the one defined for the `ngClick` directive in the example\n * below, are evaluated with respect to the current scope. Therefore, there is\n * no risk of inadvertently coding in a dependency on a global value in such an\n * expression.\n *\n * @example\n \n \n \n \n \n ALERT\n \n \n \n it('should display the greeting in the input box', function() {\n element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n // If we click the button it will block the test runner\n // element(':button').click();\n });\n \n \n */\nfunction $WindowProvider(){\n this.$get = valueFn(window);\n}\n\n/* global currencyFilter: true,\n dateFilter: true,\n filterFilter: true,\n jsonFilter: true,\n limitToFilter: true,\n lowercaseFilter: true,\n numberFilter: true,\n orderByFilter: true,\n uppercaseFilter: true,\n */\n\n/**\n * @ngdoc provider\n * @name $filterProvider\n * @description\n *\n * Filters are just functions which transform input to an output. However filters need to be\n * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n * annotated with dependencies and is responsible for creating a filter function.\n *\n * ```js\n * // Filter registration\n * function MyModule($provide, $filterProvider) {\n * // create a service to demonstrate injection (not always needed)\n * $provide.value('greet', function(name){\n * return 'Hello ' + name + '!';\n * });\n *\n * // register a filter factory which uses the\n * // greet service to demonstrate DI.\n * $filterProvider.register('greet', function(greet){\n * // return the filter function which uses the greet service\n * // to generate salutation\n * return function(text) {\n * // filters need to be forgiving so check input validity\n * return text && greet(text) || text;\n * };\n * });\n * }\n * ```\n *\n * The filter function is registered with the `$injector` under the filter name suffix with\n * `Filter`.\n *\n * ```js\n * it('should be the same instance', inject(\n * function($filterProvider) {\n * $filterProvider.register('reverse', function(){\n * return ...;\n * });\n * },\n * function($filter, reverseFilter) {\n * expect($filter('reverse')).toBe(reverseFilter);\n * });\n * ```\n *\n *\n * For more information about how angular filters work, and how to create your own filters, see\n * {@link guide/filter Filters} in the Angular Developer Guide.\n */\n\n/**\n * @ngdoc service\n * @name $filter\n * @kind function\n * @description\n * Filters are used for formatting data displayed to the user.\n *\n * The general syntax in templates is as follows:\n *\n * {{ expression [| filter_name[:parameter_value] ... ] }}\n *\n * @param {String} name Name of the filter function to retrieve\n * @return {Function} the filter function\n * @example\n \n \n \n {{ originalText }}\n {{ filteredText }}\n \n \n\n \n angular.module('filterExample', [])\n .controller('MainCtrl', function($scope, $filter) {\n $scope.originalText = 'hello';\n $scope.filteredText = $filter('uppercase')($scope.originalText);\n });\n \n \n */\n$FilterProvider.$inject = ['$provide'];\nfunction $FilterProvider($provide) {\n var suffix = 'Filter';\n\n /**\n * @ngdoc method\n * @name $filterProvider#register\n * @param {string|Object} name Name of the filter function, or an object map of filters where\n * the keys are the filter names and the values are the filter factories.\n * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n * of the registered filter instances.\n */\n function register(name, factory) {\n if(isObject(name)) {\n var filters = {};\n forEach(name, function(filter, key) {\n filters[key] = register(key, filter);\n });\n return filters;\n } else {\n return $provide.factory(name + suffix, factory);\n }\n }\n this.register = register;\n\n this.$get = ['$injector', function($injector) {\n return function(name) {\n return $injector.get(name + suffix);\n };\n }];\n\n ////////////////////////////////////////\n\n /* global\n currencyFilter: false,\n dateFilter: false,\n filterFilter: false,\n jsonFilter: false,\n limitToFilter: false,\n lowercaseFilter: false,\n numberFilter: false,\n orderByFilter: false,\n uppercaseFilter: false,\n */\n\n register('currency', currencyFilter);\n register('date', dateFilter);\n register('filter', filterFilter);\n register('json', jsonFilter);\n register('limitTo', limitToFilter);\n register('lowercase', lowercaseFilter);\n register('number', numberFilter);\n register('orderBy', orderByFilter);\n register('uppercase', uppercaseFilter);\n}\n\n/**\n * @ngdoc filter\n * @name filter\n * @kind function\n *\n * @description\n * Selects a subset of items from `array` and returns it as a new array.\n *\n * @param {Array} array The source array.\n * @param {string|Object|function()} expression The predicate to be used for selecting items from\n * `array`.\n *\n * Can be one of:\n *\n * - `string`: The string is evaluated as an expression and the resulting value is used for substring match against\n * the contents of the `array`. All strings or objects with string properties in `array` that contain this string\n * will be returned. The predicate can be negated by prefixing the string with `!`.\n *\n * - `Object`: A pattern object can be used to filter specific properties on objects contained\n * by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n * which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n * property name `$` can be used (as in `{$:\"text\"}`) to accept a match against any\n * property of the object. That's equivalent to the simple substring match with a `string`\n * as described above. The predicate can be negated by prefixing the string with `!`.\n * For Example `{name: \"!M\"}` predicate will return an array of items which have property `name`\n * not containing \"M\".\n *\n * - `function(value, index)`: A predicate function can be used to write arbitrary filters. The\n * function is called for each element of `array`. The final result is an array of those\n * elements that the predicate returned true for.\n *\n * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in\n * determining if the expected value (from the filter expression) and actual value (from\n * the object in the array) should be considered a match.\n *\n * Can be one of:\n *\n * - `function(actual, expected)`:\n * The function will be given the object value and the predicate value to compare and\n * should return true if the item should be included in filtered result.\n *\n * - `true`: A shorthand for `function(actual, expected) { return angular.equals(expected, actual)}`.\n * this is essentially strict comparison of expected and actual.\n *\n * - `false|undefined`: A short hand for a function which will look for a substring match in case\n * insensitive way.\n *\n * @example\n \n \n \n\n Search: \n \n NamePhone\n \n {{friend.name}}\n {{friend.phone}}\n \n \n \n Any: \n Name only \n Phone only \n Equality \n \n NamePhone\n \n {{friendObj.name}}\n {{friendObj.phone}}\n \n \n \n \n var expectFriendNames = function(expectedNames, key) {\n element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n arr.forEach(function(wd, i) {\n expect(wd.getText()).toMatch(expectedNames[i]);\n });\n });\n };\n\n it('should search across all fields when filtering with a string', function() {\n var searchText = element(by.model('searchText'));\n searchText.clear();\n searchText.sendKeys('m');\n expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\n searchText.clear();\n searchText.sendKeys('76');\n expectFriendNames(['John', 'Julie'], 'friend');\n });\n\n it('should search in specific fields when filtering with a predicate object', function() {\n var searchAny = element(by.model('search.$'));\n searchAny.clear();\n searchAny.sendKeys('i');\n expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n });\n it('should use a equal comparison when comparator is true', function() {\n var searchName = element(by.model('search.name'));\n var strict = element(by.model('strict'));\n searchName.clear();\n searchName.sendKeys('Julie');\n strict.click();\n expectFriendNames(['Julie'], 'friendObj');\n });\n \n \n */\nfunction filterFilter() {\n return function(array, expression, comparator) {\n if (!isArray(array)) return array;\n\n var comparatorType = typeof(comparator),\n predicates = [];\n\n predicates.check = function(value, index) {\n for (var j = 0; j < predicates.length; j++) {\n if(!predicates[j](value, index)) {\n return false;\n }\n }\n return true;\n };\n\n if (comparatorType !== 'function') {\n if (comparatorType === 'boolean' && comparator) {\n comparator = function(obj, text) {\n return angular.equals(obj, text);\n };\n } else {\n comparator = function(obj, text) {\n if (obj && text && typeof obj === 'object' && typeof text === 'object') {\n for (var objKey in obj) {\n if (objKey.charAt(0) !== '$' && hasOwnProperty.call(obj, objKey) &&\n comparator(obj[objKey], text[objKey])) {\n return true;\n }\n }\n return false;\n }\n text = (''+text).toLowerCase();\n return (''+obj).toLowerCase().indexOf(text) > -1;\n };\n }\n }\n\n var search = function(obj, text){\n if (typeof text == 'string' && text.charAt(0) === '!') {\n return !search(obj, text.substr(1));\n }\n switch (typeof obj) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n return comparator(obj, text);\n case \"object\":\n switch (typeof text) {\n case \"object\":\n return comparator(obj, text);\n default:\n for ( var objKey in obj) {\n if (objKey.charAt(0) !== '$' && search(obj[objKey], text)) {\n return true;\n }\n }\n break;\n }\n return false;\n case \"array\":\n for ( var i = 0; i < obj.length; i++) {\n if (search(obj[i], text)) {\n return true;\n }\n }\n return false;\n default:\n return false;\n }\n };\n switch (typeof expression) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n // Set up expression object and fall through\n expression = {$:expression};\n // jshint -W086\n case \"object\":\n // jshint +W086\n for (var key in expression) {\n (function(path) {\n if (typeof expression[path] === 'undefined') return;\n predicates.push(function(value) {\n return search(path == '$' ? value : (value && value[path]), expression[path]);\n });\n })(key);\n }\n break;\n case 'function':\n predicates.push(expression);\n break;\n default:\n return array;\n }\n var filtered = [];\n for ( var j = 0; j < array.length; j++) {\n var value = array[j];\n if (predicates.check(value, j)) {\n filtered.push(value);\n }\n }\n return filtered;\n };\n}\n\n/**\n * @ngdoc filter\n * @name currency\n * @kind function\n *\n * @description\n * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n * symbol for current locale is used.\n *\n * @param {number} amount Input to filter.\n * @param {string=} symbol Currency symbol or identifier to be displayed.\n * @returns {string} Formatted number.\n *\n *\n * @example\n \n \n \n \n \n default currency symbol ($): {{amount | currency}}\n custom currency identifier (USD$): {{amount | currency:\"USD$\"}}\n \n \n \n it('should init with 1234.56', function() {\n expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('USD$1,234.56');\n });\n it('should update', function() {\n if (browser.params.browser == 'safari') {\n // Safari does not understand the minus key. See\n // https://github.com/angular/protractor/issues/481\n return;\n }\n element(by.model('amount')).clear();\n element(by.model('amount')).sendKeys('-1234');\n expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)');\n expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('(USD$1,234.00)');\n });\n \n \n */\ncurrencyFilter.$inject = ['$locale'];\nfunction currencyFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(amount, currencySymbol){\n if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;\n\n // if null or undefined pass it through\n return (amount == null)\n ? amount\n : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2).\n replace(/\\u00A4/g, currencySymbol);\n };\n}\n\n/**\n * @ngdoc filter\n * @name number\n * @kind function\n *\n * @description\n * Formats a number as text.\n *\n * If the input is not a number an empty string is returned.\n *\n * @param {number|string} number Number to format.\n * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n * If this is not provided then the fraction size is computed from the current locale's number\n * formatting pattern. In the case of the default locale, it will be 3.\n * @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit.\n *\n * @example\n \n \n \n \n Enter number: \n Default formatting: {{val | number}}\n No fractions: {{val | number:0}}\n Negative number: {{-val | number:4}}\n \n \n \n it('should format numbers', function() {\n expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n });\n\n it('should update', function() {\n element(by.model('val')).clear();\n element(by.model('val')).sendKeys('3374.333');\n expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n });\n \n \n */\n\n\nnumberFilter.$inject = ['$locale'];\nfunction numberFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(number, fractionSize) {\n\n // if null or undefined pass it through\n return (number == null)\n ? number\n : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n fractionSize);\n };\n}\n\nvar DECIMAL_SEP = '.';\nfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n if (!isFinite(number) || isObject(number)) return '';\n\n var isNegative = number < 0;\n number = Math.abs(number);\n var numStr = number + '',\n formatedText = '',\n parts = [];\n\n var hasExponent = false;\n if (numStr.indexOf('e') !== -1) {\n var match = numStr.match(/([\\d\\.]+)e(-?)(\\d+)/);\n if (match && match[2] == '-' && match[3] > fractionSize + 1) {\n numStr = '0';\n number = 0;\n } else {\n formatedText = numStr;\n hasExponent = true;\n }\n }\n\n if (!hasExponent) {\n var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;\n\n // determine fractionSize if it is not specified\n if (isUndefined(fractionSize)) {\n fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);\n }\n\n // safely round numbers in JS without hitting imprecisions of floating-point arithmetics\n // inspired by:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\n number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize);\n\n if (number === 0) {\n isNegative = false;\n }\n\n var fraction = ('' + number).split(DECIMAL_SEP);\n var whole = fraction[0];\n fraction = fraction[1] || '';\n\n var i, pos = 0,\n lgroup = pattern.lgSize,\n group = pattern.gSize;\n\n if (whole.length >= (lgroup + group)) {\n pos = whole.length - lgroup;\n for (i = 0; i < pos; i++) {\n if ((pos - i)%group === 0 && i !== 0) {\n formatedText += groupSep;\n }\n formatedText += whole.charAt(i);\n }\n }\n\n for (i = pos; i < whole.length; i++) {\n if ((whole.length - i)%lgroup === 0 && i !== 0) {\n formatedText += groupSep;\n }\n formatedText += whole.charAt(i);\n }\n\n // format fraction part.\n while(fraction.length < fractionSize) {\n fraction += '0';\n }\n\n if (fractionSize && fractionSize !== \"0\") formatedText += decimalSep + fraction.substr(0, fractionSize);\n } else {\n\n if (fractionSize > 0 && number > -1 && number < 1) {\n formatedText = number.toFixed(fractionSize);\n }\n }\n\n parts.push(isNegative ? pattern.negPre : pattern.posPre);\n parts.push(formatedText);\n parts.push(isNegative ? pattern.negSuf : pattern.posSuf);\n return parts.join('');\n}\n\nfunction padNumber(num, digits, trim) {\n var neg = '';\n if (num < 0) {\n neg = '-';\n num = -num;\n }\n num = '' + num;\n while(num.length < digits) num = '0' + num;\n if (trim)\n num = num.substr(num.length - digits);\n return neg + num;\n}\n\n\nfunction dateGetter(name, size, offset, trim) {\n offset = offset || 0;\n return function(date) {\n var value = date['get' + name]();\n if (offset > 0 || value > -offset)\n value += offset;\n if (value === 0 && offset == -12 ) value = 12;\n return padNumber(value, size, trim);\n };\n}\n\nfunction dateStrGetter(name, shortForm) {\n return function(date, formats) {\n var value = date['get' + name]();\n var get = uppercase(shortForm ? ('SHORT' + name) : name);\n\n return formats[get][value];\n };\n}\n\nfunction timeZoneGetter(date) {\n var zone = -1 * date.getTimezoneOffset();\n var paddedZone = (zone >= 0) ? \"+\" : \"\";\n\n paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n padNumber(Math.abs(zone % 60), 2);\n\n return paddedZone;\n}\n\nfunction getFirstThursdayOfYear(year) {\n // 0 = index of January\n var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();\n // 4 = index of Thursday (+1 to account for 1st = 5)\n // 11 = index of *next* Thursday (+1 account for 1st = 12)\n return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);\n}\n\nfunction getThursdayThisWeek(datetime) {\n return new Date(datetime.getFullYear(), datetime.getMonth(),\n // 4 = index of Thursday\n datetime.getDate() + (4 - datetime.getDay()));\n}\n\nfunction weekGetter(size) {\n return function(date) {\n var firstThurs = getFirstThursdayOfYear(date.getFullYear()),\n thisThurs = getThursdayThisWeek(date);\n\n var diff = +thisThurs - +firstThurs,\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n\n return padNumber(result, size);\n };\n}\n\nfunction ampmGetter(date, formats) {\n return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n}\n\nvar DATE_FORMATS = {\n yyyy: dateGetter('FullYear', 4),\n yy: dateGetter('FullYear', 2, 0, true),\n y: dateGetter('FullYear', 1),\n MMMM: dateStrGetter('Month'),\n MMM: dateStrGetter('Month', true),\n MM: dateGetter('Month', 2, 1),\n M: dateGetter('Month', 1, 1),\n dd: dateGetter('Date', 2),\n d: dateGetter('Date', 1),\n HH: dateGetter('Hours', 2),\n H: dateGetter('Hours', 1),\n hh: dateGetter('Hours', 2, -12),\n h: dateGetter('Hours', 1, -12),\n mm: dateGetter('Minutes', 2),\n m: dateGetter('Minutes', 1),\n ss: dateGetter('Seconds', 2),\n s: dateGetter('Seconds', 1),\n // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n sss: dateGetter('Milliseconds', 3),\n EEEE: dateStrGetter('Day'),\n EEE: dateStrGetter('Day', true),\n a: ampmGetter,\n Z: timeZoneGetter,\n ww: weekGetter(2),\n w: weekGetter(1)\n};\n\nvar DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,\n NUMBER_STRING = /^\\-?\\d+$/;\n\n/**\n * @ngdoc filter\n * @name date\n * @kind function\n *\n * @description\n * Formats `date` to a string based on the requested `format`.\n *\n * `format` string can be composed of the following elements:\n *\n * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n * * `'MMMM'`: Month in year (January-December)\n * * `'MMM'`: Month in year (Jan-Dec)\n * * `'MM'`: Month in year, padded (01-12)\n * * `'M'`: Month in year (1-12)\n * * `'dd'`: Day in month, padded (01-31)\n * * `'d'`: Day in month (1-31)\n * * `'EEEE'`: Day in Week,(Sunday-Saturday)\n * * `'EEE'`: Day in Week, (Sun-Sat)\n * * `'HH'`: Hour in day, padded (00-23)\n * * `'H'`: Hour in day (0-23)\n * * `'hh'`: Hour in AM/PM, padded (01-12)\n * * `'h'`: Hour in AM/PM, (1-12)\n * * `'mm'`: Minute in hour, padded (00-59)\n * * `'m'`: Minute in hour (0-59)\n * * `'ss'`: Second in minute, padded (00-59)\n * * `'s'`: Second in minute (0-59)\n * * `'.sss' or ',sss'`: Millisecond in second, padded (000-999)\n * * `'a'`: AM/PM marker\n * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n * * `'ww'`: ISO-8601 week of year (00-53)\n * * `'w'`: ISO-8601 week of year (0-53)\n *\n * `format` string can also be one of the following predefined\n * {@link guide/i18n localizable formats}:\n *\n * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n * (e.g. Sep 3, 2010 12:05:08 PM)\n * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM)\n * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale\n * (e.g. Friday, September 3, 2010)\n * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)\n * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)\n * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)\n * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)\n *\n * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.\n * `\"h 'in the morning'\"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence\n * (e.g. `\"h 'o''clock'\"`).\n *\n * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its\n * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n * specified in the string input, the time is considered to be in the local timezone.\n * @param {string=} format Formatting rules (see Description). If not specified,\n * `mediumDate` is used.\n * @param {string=} timezone Timezone to be used for formatting. Right now, only `'UTC'` is supported.\n * If not specified, the timezone of the browser will be used.\n * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n *\n * @example\n \n \n {{1288323623006 | date:'medium'}}:\n {{1288323623006 | date:'medium'}}\n {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}:\n {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}\n {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}:\n {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}\n {{1288323623006 | date:\"MM/dd/yyyy 'at' h:mma\"}}:\n {{'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"}}\n \n \n it('should format date', function() {\n expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n toMatch(/2010\\-10\\-2\\d \\d{2}:\\d{2}:\\d{2} (\\-|\\+)?\\d{4}/);\n expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n expect(element(by.binding(\"'1288323623006' | date:\\\"MM/dd/yyyy 'at' h:mma\\\"\")).getText()).\n toMatch(/10\\/2\\d\\/2010 at \\d{1,2}:\\d{2}(AM|PM)/);\n });\n \n \n */\ndateFilter.$inject = ['$locale'];\nfunction dateFilter($locale) {\n\n\n var R_ISO8601_STR = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n // 1 2 3 4 5 6 7 8 9 10 11\n function jsonStringToDate(string) {\n var match;\n if (match = string.match(R_ISO8601_STR)) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = int(match[9] + match[10]);\n tzMin = int(match[9] + match[11]);\n }\n dateSetter.call(date, int(match[1]), int(match[2]) - 1, int(match[3]));\n var h = int(match[4]||0) - tzHour;\n var m = int(match[5]||0) - tzMin;\n var s = int(match[6]||0);\n var ms = Math.round(parseFloat('0.' + (match[7]||0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }\n\n\n return function(date, format, timezone) {\n var text = '',\n parts = [],\n fn, match;\n\n format = format || 'mediumDate';\n format = $locale.DATETIME_FORMATS[format] || format;\n if (isString(date)) {\n date = NUMBER_STRING.test(date) ? int(date) : jsonStringToDate(date);\n }\n\n if (isNumber(date)) {\n date = new Date(date);\n }\n\n if (!isDate(date)) {\n return date;\n }\n\n while(format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = concat(parts, match, 1);\n format = parts.pop();\n } else {\n parts.push(format);\n format = null;\n }\n }\n\n if (timezone && timezone === 'UTC') {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + date.getTimezoneOffset());\n }\n forEach(parts, function(value){\n fn = DATE_FORMATS[value];\n text += fn ? fn(date, $locale.DATETIME_FORMATS)\n : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n });\n\n return text;\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name json\n * @kind function\n *\n * @description\n * Allows you to convert a JavaScript object into JSON string.\n *\n * This filter is mostly useful for debugging. When using the double curly {{value}} notation\n * the binding is automatically converted to JSON.\n *\n * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n * @returns {string} JSON string.\n *\n *\n * @example\n \n \n {{ {'name':'value'} | json }}\n \n \n it('should jsonify filtered objects', function() {\n expect(element(by.binding(\"{'name':'value'}\")).getText()).toMatch(/\\{\\n \"name\": ?\"value\"\\n}/);\n });\n \n \n *\n */\nfunction jsonFilter() {\n return function(object) {\n return toJson(object, true);\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name lowercase\n * @kind function\n * @description\n * Converts string to lowercase.\n * @see angular.lowercase\n */\nvar lowercaseFilter = valueFn(lowercase);\n\n\n/**\n * @ngdoc filter\n * @name uppercase\n * @kind function\n * @description\n * Converts string to uppercase.\n * @see angular.uppercase\n */\nvar uppercaseFilter = valueFn(uppercase);\n\n/**\n * @ngdoc filter\n * @name limitTo\n * @kind function\n *\n * @description\n * Creates a new array or string containing only a specified number of elements. The elements\n * are taken from either the beginning or the end of the source array, string or number, as specified by\n * the value and sign (positive or negative) of `limit`. If a number is used as input, it is\n * converted to a string.\n *\n * @param {Array|string|number} input Source array, string or number to be limited.\n * @param {string|number} limit The length of the returned array or string. If the `limit` number\n * is positive, `limit` number of items from the beginning of the source array/string are copied.\n * If the number is negative, `limit` number of items from the end of the source array/string\n * are copied. The `limit` will be trimmed if it exceeds `array.length`\n * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array\n * had less than `limit` elements.\n *\n * @example\n \n \n \n \n Limit {{numbers}} to: \n Output numbers: {{ numbers | limitTo:numLimit }}\n Limit {{letters}} to: \n Output letters: {{ letters | limitTo:letterLimit }}\n Limit {{longNumber}} to: \n Output long number: {{ longNumber | limitTo:longNumberLimit }}\n \n \n \n var numLimitInput = element(by.model('numLimit'));\n var letterLimitInput = element(by.model('letterLimit'));\n var longNumberLimitInput = element(by.model('longNumberLimit'));\n var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));\n\n it('should limit the number array to first three items', function() {\n expect(numLimitInput.getAttribute('value')).toBe('3');\n expect(letterLimitInput.getAttribute('value')).toBe('3');\n expect(longNumberLimitInput.getAttribute('value')).toBe('3');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n expect(limitedLetters.getText()).toEqual('Output letters: abc');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 234');\n });\n\n // There is a bug in safari and protractor that doesn't like the minus key\n // it('should update the output when -3 is entered', function() {\n // numLimitInput.clear();\n // numLimitInput.sendKeys('-3');\n // letterLimitInput.clear();\n // letterLimitInput.sendKeys('-3');\n // longNumberLimitInput.clear();\n // longNumberLimitInput.sendKeys('-3');\n // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n // expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n // expect(limitedLongNumber.getText()).toEqual('Output long number: 342');\n // });\n\n it('should not exceed the maximum size of input array', function() {\n numLimitInput.clear();\n numLimitInput.sendKeys('100');\n letterLimitInput.clear();\n letterLimitInput.sendKeys('100');\n longNumberLimitInput.clear();\n longNumberLimitInput.sendKeys('100');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');\n });\n \n \n*/\nfunction limitToFilter(){\n return function(input, limit) {\n if (isNumber(input)) input = input.toString();\n if (!isArray(input) && !isString(input)) return input;\n\n if (Math.abs(Number(limit)) === Infinity) {\n limit = Number(limit);\n } else {\n limit = int(limit);\n }\n\n if (isString(input)) {\n //NaN check on limit\n if (limit) {\n return limit >= 0 ? input.slice(0, limit) : input.slice(limit, input.length);\n } else {\n return \"\";\n }\n }\n\n var out = [],\n i, n;\n\n // if abs(limit) exceeds maximum length, trim it\n if (limit > input.length)\n limit = input.length;\n else if (limit < -input.length)\n limit = -input.length;\n\n if (limit > 0) {\n i = 0;\n n = limit;\n } else {\n i = input.length + limit;\n n = input.length;\n }\n\n for (; i} expression A predicate to be\n * used by the comparator to determine the order of elements.\n *\n * Can be one of:\n *\n * - `function`: Getter function. The result of this function will be sorted using the\n * `<`, `=`, `>` operator.\n * - `string`: An Angular expression. The result of this expression is used to compare elements\n * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by\n * 3 first characters of a property called `name`). The result of a constant expression\n * is interpreted as a property name to be used in comparisons (for example `\"special name\"`\n * to sort object by the value of their `special name` property). An expression can be\n * optionally prefixed with `+` or `-` to control ascending or descending sort order\n * (for example, `+name` or `-name`).\n * - `Array`: An array of function or string predicates. The first predicate in the array\n * is used for sorting, but when two items are equivalent, the next predicate is used.\n *\n * @param {boolean=} reverse Reverse the order of the array.\n * @returns {Array} Sorted copy of the source array.\n *\n * @example\n \n \n \n \n Sorting predicate = {{predicate}}; reverse = {{reverse}}\n \n [ unsorted ]\n \n \n Name\n (^)\n Phone Number\n Age\n \n \n {{friend.name}}\n {{friend.phone}}\n {{friend.age}}\n \n \n \n \n \n *\n * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the\n * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the\n * desired parameters.\n *\n * Example:\n *\n * @example\n \n \n \n \n \n Name\n (^)\n Phone Number\n Age\n \n \n {{friend.name}}\n {{friend.phone}}\n {{friend.age}}\n \n \n \n \n\n \n angular.module('orderByExample', [])\n .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {\n var orderBy = $filter('orderBy');\n $scope.friends = [\n { name: 'John', phone: '555-1212', age: 10 },\n { name: 'Mary', phone: '555-9876', age: 19 },\n { name: 'Mike', phone: '555-4321', age: 21 },\n { name: 'Adam', phone: '555-5678', age: 35 },\n { name: 'Julie', phone: '555-8765', age: 29 }\n ];\n $scope.order = function(predicate, reverse) {\n $scope.friends = orderBy($scope.friends, predicate, reverse);\n };\n $scope.order('-age',false);\n }]);\n \n\n */\norderByFilter.$inject = ['$parse'];\nfunction orderByFilter($parse){\n return function(array, sortPredicate, reverseOrder) {\n if (!(isArrayLike(array))) return array;\n if (!sortPredicate) return array;\n sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];\n sortPredicate = sortPredicate.map(function(predicate){\n var descending = false, get = predicate || identity;\n if (isString(predicate)) {\n if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {\n descending = predicate.charAt(0) == '-';\n predicate = predicate.substring(1);\n }\n get = $parse(predicate);\n if (get.constant) {\n var key = get();\n return reverseComparator(function(a,b) {\n return compare(a[key], b[key]);\n }, descending);\n }\n }\n return reverseComparator(function(a,b){\n return compare(get(a),get(b));\n }, descending);\n });\n var arrayCopy = [];\n for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); }\n return arrayCopy.sort(reverseComparator(comparator, reverseOrder));\n\n function comparator(o1, o2){\n for ( var i = 0; i < sortPredicate.length; i++) {\n var comp = sortPredicate[i](o1, o2);\n if (comp !== 0) return comp;\n }\n return 0;\n }\n function reverseComparator(comp, descending) {\n return descending\n ? function(a,b){return comp(b,a);}\n : comp;\n }\n function compare(v1, v2){\n var t1 = typeof v1;\n var t2 = typeof v2;\n if (t1 == t2) {\n if (isDate(v1) && isDate(v2)) {\n v1 = v1.valueOf();\n v2 = v2.valueOf();\n }\n if (t1 == \"string\") {\n v1 = v1.toLowerCase();\n v2 = v2.toLowerCase();\n }\n if (v1 === v2) return 0;\n return v1 < v2 ? -1 : 1;\n } else {\n return t1 < t2 ? -1 : 1;\n }\n }\n };\n}\n\nfunction ngDirective(directive) {\n if (isFunction(directive)) {\n directive = {\n link: directive\n };\n }\n directive.restrict = directive.restrict || 'AC';\n return valueFn(directive);\n}\n\n/**\n * @ngdoc directive\n * @name a\n * @restrict E\n *\n * @description\n * Modifies the default behavior of the html A tag so that the default action is prevented when\n * the href attribute is empty.\n *\n * This change permits the easy creation of action links with the `ngClick` directive\n * without changing the location or causing page reloads, e.g.:\n * `Add Item`\n */\nvar htmlAnchorDirective = valueFn({\n restrict: 'E',\n compile: function(element, attr) {\n\n if (msie <= 8) {\n\n // turn link into a stylable link in IE\n // but only if it doesn't have name attribute, in which case it's an anchor\n if (!attr.href && !attr.name) {\n attr.$set('href', '');\n }\n\n // add a comment node to anchors to workaround IE bug that causes element content to be reset\n // to new attribute content if attribute is updated with value containing @ and element also\n // contains value with @\n // see issue #1949\n element.append(document.createComment('IE fix'));\n }\n\n if (!attr.href && !attr.xlinkHref && !attr.name) {\n return function(scope, element) {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n 'xlink:href' : 'href';\n element.on('click', function(event){\n // if we have no href url, then don't navigate anywhere.\n if (!element.attr(href)) {\n event.preventDefault();\n }\n });\n };\n }\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngHref\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in an href attribute will\n * make the link go to the wrong URL if the user clicks it before\n * Angular has a chance to replace the `{{hash}}` markup with its\n * value. Until Angular replaces the markup the link will be broken\n * and will most likely return a 404 error.\n *\n * The `ngHref` directive solves this problem.\n *\n * The wrong way to write it:\n * ```html\n * link1\n * ```\n *\n * The correct way to write it:\n * ```html\n * link1\n * ```\n *\n * @element A\n * @param {template} ngHref any string which can contain `{{}}` markup.\n *\n * @example\n * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n * in links and their different behaviors:\n \n \n \n link 1 (link, don't reload)\n link 2 (link, don't reload)\n link 3 (link, reload!)\n anchor (link, don't reload)\n anchor (no link)\n link (link, change location)\n \n \n it('should execute ng-click but not reload when href without value', function() {\n element(by.id('link-1')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when href empty string', function() {\n element(by.id('link-2')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click and change url when ng-href specified', function() {\n expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\n element(by.id('link-3')).click();\n\n // At this point, we navigate away from an Angular page, so we need\n // to use browser.driver to get the base webdriver.\n\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/123$/);\n });\n }, 5000, 'page should navigate to /123');\n });\n\n xit('should execute ng-click but not reload when href empty string and name specified', function() {\n element(by.id('link-4')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when no href but name specified', function() {\n element(by.id('link-5')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n });\n\n it('should only change url when only ng-href', function() {\n element(by.model('value')).clear();\n element(by.model('value')).sendKeys('6');\n expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\n element(by.id('link-6')).click();\n\n // At this point, we navigate away from an Angular page, so we need\n // to use browser.driver to get the base webdriver.\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/6$/);\n });\n }, 5000, 'page should navigate to /6');\n });\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngSrc\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `src` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrc` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * \n * ```\n *\n * The correct way to write it:\n * ```html\n * \n * ```\n *\n * @element IMG\n * @param {template} ngSrc any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngSrcset\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrcset` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * \n * ```\n *\n * The correct way to write it:\n * ```html\n * \n * ```\n *\n * @element IMG\n * @param {template} ngSrcset any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngDisabled\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * We shouldn't do this, because it will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:\n * ```html\n * \n * Disabled\n * \n * ```\n *\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as disabled. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngDisabled` directive solves this problem for the `disabled` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n \n \n Click me to toggle: \n Button\n \n \n it('should toggle button', function() {\n expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();\n });\n \n \n *\n * @element INPUT\n * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,\n * then special attribute \"disabled\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngChecked\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as checked. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngChecked` directive solves this problem for the `checked` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me to check both: \n \n \n \n it('should check both checkBoxes', function() {\n expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();\n element(by.model('master')).click();\n expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();\n });\n \n \n *\n * @element INPUT\n * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,\n * then special attribute \"checked\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngReadonly\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as readonly. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngReadonly` directive solves this problem for the `readonly` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me to make text readonly: \n \n \n \n it('should toggle readonly attr', function() {\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n });\n \n \n *\n * @element INPUT\n * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,\n * then special attribute \"readonly\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSelected\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as selected. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngSelected` directive solves this problem for the `selected` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n \n \n Check me to select: \n \n Hello!\n Greetings!\n \n \n \n it('should select Greetings!', function() {\n expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n element(by.model('selected')).click();\n expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n });\n \n \n *\n * @element OPTION\n * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,\n * then special attribute \"selected\" will be set on the element\n */\n\n/**\n * @ngdoc directive\n * @name ngOpen\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as open. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngOpen` directive solves this problem for the `open` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me check multiple: \n \n Show/Hide me\n \n \n \n it('should toggle open', function() {\n expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n element(by.model('open')).click();\n expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n });\n \n \n *\n * @element DETAILS\n * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,\n * then special attribute \"open\" will be set on the element\n */\n\nvar ngAttributeAliasDirectives = {};\n\n\n// boolean attrs are evaluated\nforEach(BOOLEAN_ATTR, function(propName, attrName) {\n // binding to multiple is not supported\n if (propName == \"multiple\") return;\n\n var normalized = directiveNormalize('ng-' + attrName);\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n restrict: 'A',\n priority: 100,\n link: function(scope, element, attr) {\n scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n attr.$set(attrName, !!value);\n });\n }\n };\n };\n});\n\n// aliased input attrs are evaluated\nforEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {\n ngAttributeAliasDirectives[ngAttr] = function() {\n return {\n priority: 100,\n link: function(scope, element, attr) {\n //special case ngPattern when a literal regular expression value\n //is used as the expression (this way we don't have to watch anything).\n if (ngAttr === \"ngPattern\" && attr.ngPattern.charAt(0) == \"/\") {\n var match = attr.ngPattern.match(REGEX_STRING_REGEXP);\n if (match) {\n attr.$set(\"ngPattern\", new RegExp(match[1], match[2]));\n return;\n }\n }\n\n scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {\n attr.$set(ngAttr, value);\n });\n }\n };\n };\n});\n\n// ng-src, ng-srcset, ng-href are interpolated\nforEach(['src', 'srcset', 'href'], function(attrName) {\n var normalized = directiveNormalize('ng-' + attrName);\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n priority: 99, // it needs to run after the attributes are interpolated\n link: function(scope, element, attr) {\n var propName = attrName,\n name = attrName;\n\n if (attrName === 'href' &&\n toString.call(element.prop('href')) === '[object SVGAnimatedString]') {\n name = 'xlinkHref';\n attr.$attr[name] = 'xlink:href';\n propName = null;\n }\n\n attr.$observe(normalized, function(value) {\n if (!value) {\n if (attrName === 'href') {\n attr.$set(name, null);\n }\n return;\n }\n\n attr.$set(name, value);\n\n // on IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n // to set the property as well to achieve the desired effect.\n // we use attr[attrName] value since $set can sanitize the url.\n if (msie && propName) element.prop(propName, attr[name]);\n });\n }\n };\n };\n});\n\n/* global -nullFormCtrl, -SUBMITTED_CLASS, addSetValidityMethod: true\n */\nvar nullFormCtrl = {\n $addControl: noop,\n $$renameControl: nullFormRenameControl,\n $removeControl: noop,\n $setValidity: noop,\n $$setPending: noop,\n $setDirty: noop,\n $setPristine: noop,\n $setSubmitted: noop,\n $$clearControlValidity: noop\n},\nSUBMITTED_CLASS = 'ng-submitted';\n\nfunction nullFormRenameControl(control, name) {\n control.$name = name;\n}\n\n/**\n * @ngdoc type\n * @name form.FormController\n *\n * @property {boolean} $pristine True if user has not interacted with the form yet.\n * @property {boolean} $dirty True if user has already interacted with the form.\n * @property {boolean} $valid True if all of the containing forms and controls are valid.\n * @property {boolean} $invalid True if at least one containing control or form is invalid.\n * @property {boolean} $submitted True if user has submitted the form even if its invalid.\n *\n * @property {Object} $error Is an object hash, containing references to controls or\n * forms with failing validators, where:\n *\n * - keys are validation tokens (error names),\n * - values are arrays of controls or forms that have a failing validator for given error name.\n *\n * Built-in validation tokens:\n *\n * - `email`\n * - `max`\n * - `maxlength`\n * - `min`\n * - `minlength`\n * - `number`\n * - `pattern`\n * - `required`\n * - `url`\n *\n * @description\n * `FormController` keeps track of all its controls and nested forms as well as the state of them,\n * such as being valid/invalid or dirty/pristine.\n *\n * Each {@link ng.directive:form form} directive creates an instance\n * of `FormController`.\n *\n */\n//asks for $scope to fool the BC controller module\nFormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];\nfunction FormController(element, attrs, $scope, $animate, $interpolate) {\n var form = this,\n controls = [];\n\n var parentForm = form.$$parentForm = element.parent().controller('form') || nullFormCtrl;\n\n // init state\n form.$error = {};\n form.$$success = {};\n form.$pending = undefined;\n form.$name = $interpolate(attrs.name || attrs.ngForm || '')($scope);\n form.$dirty = false;\n form.$pristine = true;\n form.$valid = true;\n form.$invalid = false;\n form.$submitted = false;\n\n parentForm.$addControl(form);\n\n // Setup initial state of the control\n element.addClass(PRISTINE_CLASS);\n\n /**\n * @ngdoc method\n * @name form.FormController#$rollbackViewValue\n *\n * @description\n * Rollback all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is typically needed by the reset button of\n * a form that uses `ng-model-options` to pend updates.\n */\n form.$rollbackViewValue = function() {\n forEach(controls, function(control) {\n control.$rollbackViewValue();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$commitViewValue\n *\n * @description\n * Commit all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n form.$commitViewValue = function() {\n forEach(controls, function(control) {\n control.$commitViewValue();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$addControl\n *\n * @description\n * Register a control with the form.\n *\n * Input elements using ngModelController do this automatically when they are linked.\n */\n form.$addControl = function(control) {\n // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n // and not added to the scope. Now we throw an error.\n assertNotHasOwnProperty(control.$name, 'input');\n controls.push(control);\n\n if (control.$name) {\n form[control.$name] = control;\n }\n };\n\n // Private API: rename a form control\n form.$$renameControl = function(control, newName) {\n var oldName = control.$name;\n\n if (form[oldName] === control) {\n delete form[oldName];\n }\n form[newName] = control;\n control.$name = newName;\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$removeControl\n *\n * @description\n * Deregister a control from the form.\n *\n * Input elements using ngModelController do this automatically when they are destroyed.\n */\n form.$removeControl = function(control) {\n if (control.$name && form[control.$name] === control) {\n delete form[control.$name];\n }\n forEach(form.$pending, function(value, name) {\n form.$setValidity(name, null, control);\n });\n forEach(form.$error, function(value, name) {\n form.$setValidity(name, null, control);\n });\n\n arrayRemove(controls, control);\n };\n\n\n /**\n * @ngdoc method\n * @name form.FormController#$setValidity\n *\n * @description\n * Sets the validity of a form control.\n *\n * This method will also propagate to parent forms.\n */\n addSetValidityMethod({\n ctrl: this,\n $element: element,\n set: function(object, property, control) {\n var list = object[property];\n if (!list) {\n object[property] = [control];\n } else {\n var index = list.indexOf(control);\n if (index === -1) {\n list.push(control);\n }\n }\n },\n unset: function(object, property, control) {\n var list = object[property];\n if (!list) {\n return;\n }\n arrayRemove(list, control);\n if (list.length === 0) {\n delete object[property];\n }\n },\n parentForm: parentForm,\n $animate: $animate\n });\n\n /**\n * @ngdoc method\n * @name form.FormController#$setDirty\n *\n * @description\n * Sets the form to a dirty state.\n *\n * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n * state (ng-dirty class). This method will also propagate to parent forms.\n */\n form.$setDirty = function() {\n $animate.removeClass(element, PRISTINE_CLASS);\n $animate.addClass(element, DIRTY_CLASS);\n form.$dirty = true;\n form.$pristine = false;\n parentForm.$setDirty();\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setPristine\n *\n * @description\n * Sets the form to its pristine state.\n *\n * This method can be called to remove the 'ng-dirty' class and set the form to its pristine\n * state (ng-pristine class). This method will also propagate to all the controls contained\n * in this form.\n *\n * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n * saving or resetting it.\n */\n form.$setPristine = function () {\n $animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);\n form.$dirty = false;\n form.$pristine = true;\n form.$submitted = false;\n forEach(controls, function(control) {\n control.$setPristine();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setUntouched\n *\n * @description\n * Sets the form to its untouched state.\n *\n * This method can be called to remove the 'ng-touched' class and set the form controls to their\n * untouched state (ng-untouched class).\n *\n * Setting a form controls back to their untouched state is often useful when setting the form\n * back to its pristine state.\n */\n form.$setUntouched = function () {\n forEach(controls, function(control) {\n control.$setUntouched();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setSubmitted\n *\n * @description\n * Sets the form to its submitted state.\n */\n form.$setSubmitted = function () {\n $animate.addClass(element, SUBMITTED_CLASS);\n form.$submitted = true;\n parentForm.$setSubmitted();\n };\n}\n\n/**\n * @ngdoc directive\n * @name ngForm\n * @restrict EAC\n *\n * @description\n * Nestable alias of {@link ng.directive:form `form`} directive. HTML\n * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a\n * sub-group of controls needs to be determined.\n *\n * Note: the purpose of `ngForm` is to group controls,\n * but not to be a replacement for the `` tag with all of its capabilities\n * (e.g. posting to the server, ...).\n *\n * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n *\n */\n\n /**\n * @ngdoc directive\n * @name form\n * @restrict E\n *\n * @description\n * Directive that instantiates\n * {@link form.FormController FormController}.\n *\n * If the `name` attribute is specified, the form controller is published onto the current scope under\n * this name.\n *\n * # Alias: {@link ng.directive:ngForm `ngForm`}\n *\n * In Angular forms can be nested. This means that the outer form is valid when all of the child\n * forms are valid as well. However, browsers do not allow nesting of `` elements, so\n * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to\n * `` but can be nested. This allows you to have nested forms, which is very useful when\n * using Angular validation directives in forms that are dynamically generated using the\n * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`\n * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an\n * `ngForm` directive and nest these in an outer `form` element.\n *\n *\n * # CSS classes\n * - `ng-valid` is set if the form is valid.\n * - `ng-invalid` is set if the form is invalid.\n * - `ng-pristine` is set if the form is pristine.\n * - `ng-dirty` is set if the form is dirty.\n * - `ng-submitted` is set if the form was submitted.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n *\n * # Submitting a form and preventing the default action\n *\n * Since the role of forms in client-side Angular applications is different than in classical\n * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n * page reload that sends the data to the server. Instead some javascript logic should be triggered\n * to handle the form submission in an application-specific way.\n *\n * For this reason, Angular prevents the default action (form submission to the server) unless the\n * `` element has an `action` attribute specified.\n *\n * You can use one of the following two ways to specify what javascript method should be called when\n * a form is submitted:\n *\n * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n * - {@link ng.directive:ngClick ngClick} directive on the first\n * button or input field of type submit (input[type=submit])\n *\n * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n * or {@link ng.directive:ngClick ngClick} directives.\n * This is because of the following form submission rules in the HTML specification:\n *\n * - If a form has only one input field then hitting enter in this field triggers form submit\n * (`ngSubmit`)\n * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n * doesn't trigger submit\n * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n *\n * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is\n * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * ## Animation Hooks\n *\n * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.\n * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any\n * other validations that are performed within the form. Animations in ngForm are similar to how\n * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well\n * as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style a form element\n * that has been rendered as invalid after it has been validated:\n *\n * \n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-form {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-form.ng-invalid {\n * background: red;\n * color:white;\n * }\n * \n *\n * @example\n \n \n \n \n \n userType: \n Required!\n userType = {{userType}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n it('should initialize to model', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n expect(userType.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n var userInput = element(by.model('userType'));\n\n userInput.clear();\n userInput.sendKeys('');\n\n expect(userType.getText()).toEqual('userType =');\n expect(valid.getText()).toContain('false');\n });\n \n \n *\n * @param {string=} name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n */\nvar formDirectiveFactory = function(isNgForm) {\n return ['$timeout', function($timeout) {\n var formDirective = {\n name: 'form',\n restrict: isNgForm ? 'EAC' : 'E',\n controller: FormController,\n compile: function() {\n return {\n pre: function(scope, formElement, attr, controller) {\n if (!attr.action) {\n // we can't use jq events because if a form is destroyed during submission the default\n // action is not prevented. see #1238\n //\n // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n // page reload if the form was destroyed by submission of the form via a click handler\n // on a button in the form. Looks like an IE9 specific bug.\n var handleFormSubmission = function(event) {\n scope.$apply(function() {\n controller.$commitViewValue();\n controller.$setSubmitted();\n });\n\n event.preventDefault\n ? event.preventDefault()\n : event.returnValue = false; // IE\n };\n\n addEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n\n // unregister the preventDefault listener so that we don't not leak memory but in a\n // way that will achieve the prevention of the default action.\n formElement.on('$destroy', function() {\n $timeout(function() {\n removeEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n }, 0, false);\n });\n }\n\n var parentFormCtrl = controller.$$parentForm,\n alias = controller.$name;\n\n if (alias) {\n setter(scope, alias, controller, alias);\n attr.$observe(attr.name ? 'name' : 'ngForm', function(newValue) {\n if (alias === newValue) return;\n setter(scope, alias, undefined, alias);\n alias = newValue;\n setter(scope, alias, controller, alias);\n parentFormCtrl.$$renameControl(controller, alias);\n });\n }\n if (parentFormCtrl !== nullFormCtrl) {\n formElement.on('$destroy', function() {\n parentFormCtrl.$removeControl(controller);\n if (alias) {\n setter(scope, alias, undefined, alias);\n }\n extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n });\n }\n }\n };\n }\n };\n\n return formDirective;\n }];\n};\n\nvar formDirective = formDirectiveFactory();\nvar ngFormDirective = formDirectiveFactory(true);\n\n/* global VALID_CLASS: true,\n INVALID_CLASS: true,\n PRISTINE_CLASS: true,\n DIRTY_CLASS: true,\n UNTOUCHED_CLASS: true,\n TOUCHED_CLASS: true,\n*/\n\n// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231\nvar ISO_DATE_REGEXP = /\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z)/;\nvar URL_REGEXP = /^(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$/;\nvar EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;\nvar NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))\\s*$/;\nvar DATE_REGEXP = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nvar DATETIMELOCAL_REGEXP = /^(\\d{4})-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar WEEK_REGEXP = /^(\\d{4})-W(\\d\\d)$/;\nvar MONTH_REGEXP = /^(\\d{4})-(\\d\\d)$/;\nvar TIME_REGEXP = /^(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar DEFAULT_REGEXP = /(\\s+|^)default(\\s+|$)/;\n\nvar $ngModelMinErr = new minErr('ngModel');\n\nvar inputType = {\n\n /**\n * @ngdoc input\n * @name input[text]\n *\n * @description\n * Standard HTML text input with angular data binding, inherited by most of the `input` elements.\n *\n * *NOTE* Not every feature offered is available for all input types.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Adds `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n \n \n \n \n Single word: \n \n Required!\n \n Single word only!\n\n text = {{text}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if multi word', function() {\n input.clear();\n input.sendKeys('hello world');\n\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'text': textInputType,\n\n /**\n * @ngdoc input\n * @name input[date]\n *\n * @description\n * Input with date validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601\n * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many\n * modern browsers do not yet support this input type, it is important to provide cues to users on the\n * expected input format via a placeholder or label. The model must always be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO date string (yyyy-MM-dd).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO date string (yyyy-MM-dd).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a date in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-MM-dd\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-MM-dd\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (see https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10-22');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'date': createDateInputType('date', DATE_REGEXP,\n createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),\n 'yyyy-MM-dd'),\n\n /**\n * @ngdoc input\n * @name input[dateTimeLocal]\n *\n * @description\n * Input with datetime validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`. The model must be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO datetime format (yyyy-MM-ddTHH:mm:ss).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a date between in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-MM-ddTHH:mm:ss\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-MM-ddTHH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2010-12-28T14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01T23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,\n createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),\n 'yyyy-MM-ddTHH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[time]\n *\n * @description\n * Input with time validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a\n * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO time format (HH:mm:ss).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be a\n * valid ISO time format (HH:mm:ss).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a between 8am and 5pm:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"HH:mm:ss\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"HH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'time': createDateInputType('time', TIME_REGEXP,\n createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),\n 'HH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[week]\n *\n * @description\n * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support\n * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * week format (yyyy-W##), for example: `2013-W02`. The model must always be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO week format (yyyy-W##).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO week format (yyyy-W##).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a date between in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-Www\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-Www\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-W01');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-W01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),\n\n /**\n * @ngdoc input\n * @name input[month]\n *\n * @description\n * Input with month validation and transformation. In browsers that do not yet support\n * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * month format (yyyy-MM), for example: `2009-01`. The model must always be a Date object. In the event the model is\n * not set to the first of the month, the first of that model's month is assumed.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be\n * a valid ISO month format (yyyy-MM).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must\n * be a valid ISO month format (yyyy-MM).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a month int 2013:\n \n \n Required!\n \n Not a valid month!\n value = {{value | date: \"yyyy-MM\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-MM\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'month': createDateInputType('month', MONTH_REGEXP,\n createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),\n 'yyyy-MM'),\n\n /**\n * @ngdoc input\n * @name input[number]\n *\n * @description\n * Text input with number validation and transformation. Sets the `number` validation\n * error if not a valid number.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Number: \n \n Required!\n \n Not valid number!\n value = {{value}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('12');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if over max', function() {\n input.clear();\n input.sendKeys('123');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'number': numberInputType,\n\n\n /**\n * @ngdoc input\n * @name input[url]\n *\n * @description\n * Text input with URL validation. Sets the `url` validation error key if the content is not a\n * valid URL.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n URL: \n \n Required!\n \n Not valid url!\n text = {{text}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n myForm.$error.url = {{!!myForm.$error.url}}\n \n \n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('http://google.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not url', function() {\n input.clear();\n input.sendKeys('box');\n\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'url': urlInputType,\n\n\n /**\n * @ngdoc input\n * @name input[email]\n *\n * @description\n * Text input with email validation. Sets the `email` validation error key if not a valid email\n * address.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Email: \n \n Required!\n \n Not valid email!\n text = {{text}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n myForm.$error.email = {{!!myForm.$error.email}}\n \n \n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('me@example.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not email', function() {\n input.clear();\n input.sendKeys('xxx');\n\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'email': emailInputType,\n\n\n /**\n * @ngdoc input\n * @name input[radio]\n *\n * @description\n * HTML radio button.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string} value The value to which the expression should be set when selected.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {string} ngValue Angular expression which sets the value to which the expression should\n * be set when selected.\n *\n * @example\n \n \n \n \n Red \n Green \n Blue \n color = {{color | json}}\n \n Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n \n \n it('should change state', function() {\n var color = element(by.binding('color'));\n\n expect(color.getText()).toContain('blue');\n\n element.all(by.model('color')).get(0).click();\n\n expect(color.getText()).toContain('red');\n });\n \n \n */\n 'radio': radioInputType,\n\n\n /**\n * @ngdoc input\n * @name input[checkbox]\n *\n * @description\n * HTML checkbox.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {expression=} ngTrueValue The value to which the expression should be set when selected.\n * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Value1: \n Value2: \n value1 = {{value1}}\n value2 = {{value2}}\n \n \n \n it('should change state', function() {\n var value1 = element(by.binding('value1'));\n var value2 = element(by.binding('value2'));\n\n expect(value1.getText()).toContain('true');\n expect(value2.getText()).toContain('YES');\n\n element(by.model('value1')).click();\n element(by.model('value2')).click();\n\n expect(value1.getText()).toContain('false');\n expect(value2.getText()).toContain('NO');\n });\n \n \n */\n 'checkbox': checkboxInputType,\n\n 'hidden': noop,\n 'button': noop,\n 'submit': noop,\n 'reset': noop,\n 'file': noop\n};\n\nfunction testFlags(validity, flags) {\n var i, flag;\n if (flags) {\n for (i=0; i= minVal;\n };\n attr.$observe('min', function(val) {\n minVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n if (isDefined(attr.max) || attr.ngMax) {\n var maxVal;\n ctrl.$validators.max = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(maxVal) || parseDate(value) <= maxVal;\n };\n attr.$observe('max', function(val) {\n maxVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n function parseObservedDateValue(val) {\n return isDefined(val) ? (isDate(val) ? val : parseDate(val)) : undefined;\n }\n };\n}\n\nfunction badInputChecker(scope, element, attr, ctrl) {\n var node = element[0];\n var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);\n if (nativeValidation) {\n ctrl.$parsers.push(function(value) {\n var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};\n // Detect bug in FF35 for input[email] (https://bugzilla.mozilla.org/show_bug.cgi?id=1064430):\n // - also sets validity.badInput (should only be validity.typeMismatch).\n // - see http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email)\n // - can ignore this case as we can still read out the erroneous email...\n return validity.badInput && !validity.typeMismatch ? undefined : value;\n });\n }\n}\n\nfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n badInputChecker(scope, element, attr, ctrl);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n ctrl.$$parserName = 'number';\n ctrl.$parsers.push(function(value) {\n if (ctrl.$isEmpty(value)) return null;\n if (NUMBER_REGEXP.test(value)) return parseFloat(value);\n return undefined;\n });\n\n ctrl.$formatters.push(function(value) {\n if (!ctrl.$isEmpty(value)) {\n if (!isNumber(value)) {\n throw $ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);\n }\n value = value.toString();\n }\n return value;\n });\n\n if (attr.min || attr.ngMin) {\n var minVal;\n ctrl.$validators.min = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;\n };\n\n attr.$observe('min', function(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val, 10);\n }\n minVal = isNumber(val) && !isNaN(val) ? val : undefined;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n\n if (attr.max || attr.ngMax) {\n var maxVal;\n ctrl.$validators.max = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;\n };\n\n attr.$observe('max', function(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val, 10);\n }\n maxVal = isNumber(val) && !isNaN(val) ? val : undefined;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n}\n\nfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$$parserName = 'url';\n ctrl.$validators.url = function(value) {\n return ctrl.$isEmpty(value) || URL_REGEXP.test(value);\n };\n}\n\nfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$$parserName = 'email';\n ctrl.$validators.email = function(value) {\n return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);\n };\n}\n\nfunction radioInputType(scope, element, attr, ctrl) {\n // make the name unique, if not defined\n if (isUndefined(attr.name)) {\n element.attr('name', nextUid());\n }\n\n var listener = function(ev) {\n if (element[0].checked) {\n ctrl.$setViewValue(attr.value, ev && ev.type);\n }\n };\n\n element.on('click', listener);\n\n ctrl.$render = function() {\n var value = attr.value;\n element[0].checked = (value == ctrl.$viewValue);\n };\n\n attr.$observe('value', ctrl.$render);\n}\n\nfunction parseConstantExpr($parse, context, name, expression, fallback) {\n var parseFn;\n if (isDefined(expression)) {\n parseFn = $parse(expression);\n if (!parseFn.constant) {\n throw minErr('ngModel')('constexpr', 'Expected constant expression for `{0}`, but saw ' +\n '`{1}`.', name, expression);\n }\n return parseFn(context);\n }\n return fallback;\n}\n\nfunction checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {\n var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);\n var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);\n\n var listener = function(ev) {\n ctrl.$setViewValue(element[0].checked, ev && ev.type);\n };\n\n element.on('click', listener);\n\n ctrl.$render = function() {\n element[0].checked = ctrl.$viewValue;\n };\n\n // Override the standard `$isEmpty` because an empty checkbox is never equal to the trueValue\n ctrl.$isEmpty = function(value) {\n return value !== trueValue;\n };\n\n ctrl.$formatters.push(function(value) {\n return equals(value, trueValue);\n });\n\n ctrl.$parsers.push(function(value) {\n return value ? trueValue : falseValue;\n });\n}\n\n\n/**\n * @ngdoc directive\n * @name textarea\n * @restrict E\n *\n * @description\n * HTML textarea element control with angular data-binding. The data-binding and validation\n * properties of this element are exactly the same as those of the\n * {@link ng.directive:input input element}.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n */\n\n\n/**\n * @ngdoc directive\n * @name input\n * @restrict E\n *\n * @description\n * HTML input element control with angular data-binding. Input control follows HTML5 input types\n * and polyfills the HTML5 validation behavior for older browsers.\n *\n * *NOTE* Not every feature offered is available for all input types.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {boolean=} ngRequired Sets `required` attribute if set to true\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n \n \n \n \n \n User name: \n \n Required!\n Last name: \n \n Too short!\n \n Too long!\n \n \n user = {{user}}\n myForm.userName.$valid = {{myForm.userName.$valid}}\n myForm.userName.$error = {{myForm.userName.$error}}\n myForm.lastName.$valid = {{myForm.lastName.$valid}}\n myForm.lastName.$error = {{myForm.lastName.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n myForm.$error.minlength = {{!!myForm.$error.minlength}}\n myForm.$error.maxlength = {{!!myForm.$error.maxlength}}\n \n \n \n var user = element(by.exactBinding('user'));\n var userNameValid = element(by.binding('myForm.userName.$valid'));\n var lastNameValid = element(by.binding('myForm.lastName.$valid'));\n var lastNameError = element(by.binding('myForm.lastName.$error'));\n var formValid = element(by.binding('myForm.$valid'));\n var userNameInput = element(by.model('user.name'));\n var userLastInput = element(by.model('user.last'));\n\n it('should initialize to model', function() {\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if empty when required', function() {\n userNameInput.clear();\n userNameInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('false');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be valid if empty when min length is set', function() {\n userLastInput.clear();\n userLastInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"\"}');\n expect(lastNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if less than required min length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('xx');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('minlength');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be invalid if longer than max length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('some ridiculously long name');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('maxlength');\n expect(formValid.getText()).toContain('false');\n });\n \n \n */\nvar inputDirective = ['$browser', '$sniffer', '$filter', '$parse',\n function($browser, $sniffer, $filter, $parse) {\n return {\n restrict: 'E',\n require: ['?ngModel'],\n link: function(scope, element, attr, ctrls) {\n if (ctrls[0]) {\n (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,\n $browser, $filter, $parse);\n }\n }\n };\n}];\n\nvar VALID_CLASS = 'ng-valid',\n INVALID_CLASS = 'ng-invalid',\n PRISTINE_CLASS = 'ng-pristine',\n DIRTY_CLASS = 'ng-dirty',\n UNTOUCHED_CLASS = 'ng-untouched',\n TOUCHED_CLASS = 'ng-touched',\n PENDING_CLASS = 'ng-pending';\n\n/**\n * @ngdoc type\n * @name ngModel.NgModelController\n *\n * @property {string} $viewValue Actual string value in the view.\n * @property {*} $modelValue The value in the model, that the control is bound to.\n * @property {Array.} $parsers Array of functions to execute, as a pipeline, whenever\n the control reads value from the DOM. Each function is called, in turn, passing the value\n through to the next. The last return value is used to populate the model.\n Used to sanitize / convert the value as well as validation. For validation,\n the parsers should update the validity state using\n {@link ngModel.NgModelController#$setValidity $setValidity()},\n and return `undefined` for invalid values.\n\n *\n * @property {Array.} $formatters Array of functions to execute, as a pipeline, whenever\n the model value changes. Each function is called, in turn, passing the value through to the\n next. Used to format / convert values for display in the control and validation.\n * ```js\n * function formatter(value) {\n * if (value) {\n * return value.toUpperCase();\n * }\n * }\n * ngModel.$formatters.push(formatter);\n * ```\n *\n * @property {Object.} $validators A collection of validators that are applied\n * whenever the model value changes. The key value within the object refers to the name of the\n * validator while the function refers to the validation operation. The validation operation is\n * provided with the model value as an argument and must return a true or false value depending\n * on the response of that validation.\n *\n * ```js\n * ngModel.$validators.validCharacters = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n * return /[0-9]+/.test(value) &&\n * /[a-z]+/.test(value) &&\n * /[A-Z]+/.test(value) &&\n * /\\W+/.test(value);\n * };\n * ```\n *\n * @property {Object.} $asyncValidators A collection of validations that are expected to\n * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided\n * is expected to return a promise when it is run during the model validation process. Once the promise\n * is delivered then the validation status will be set to true when fulfilled and false when rejected.\n * When the asynchronous validators are triggered, each of the validators will run in parallel and the model\n * value will only be updated once all validators have been fulfilled. Also, keep in mind that all\n * asynchronous validators will only run once all synchronous validators have passed.\n *\n * Please note that if $http is used then it is important that the server returns a success HTTP response code\n * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.\n *\n * ```js\n * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n *\n * // Lookup user by username\n * return $http.get('/api/users/' + value).\n * then(function resolved() {\n * //username exists, this means validation fails\n * return $q.reject('exists');\n * }, function rejected() {\n * //username does not exist, therefore this validation passes\n * return true;\n * });\n * };\n * ```\n *\n * @param {string} name The name of the validator.\n * @param {Function} validationFn The validation function that will be run.\n *\n * @property {Array.} $viewChangeListeners Array of functions to execute whenever the\n * view value has changed. It is called with no arguments, and its return value is ignored.\n * This can be used in place of additional $watches against the model value.\n *\n * @property {Object} $error An object hash with all failing validator ids as keys.\n * @property {Object} $pending An object hash with all pending validator ids as keys.\n *\n * @property {boolean} $untouched True if control has not lost focus yet.\n * @property {boolean} $touched True if control has lost focus.\n * @property {boolean} $pristine True if user has not interacted with the control yet.\n * @property {boolean} $dirty True if user has already interacted with the control.\n * @property {boolean} $valid True if there is no error.\n * @property {boolean} $invalid True if at least one error on the control.\n *\n * @description\n *\n * `NgModelController` provides API for the `ng-model` directive. The controller contains\n * services for data-binding, validation, CSS updates, and value formatting and parsing. It\n * purposefully does not contain any logic which deals with DOM rendering or listening to\n * DOM events. Such DOM related logic should be provided by other directives which make use of\n * `NgModelController` for data-binding.\n *\n * ## Custom Control Example\n * This example shows how to use `NgModelController` with a custom control to achieve\n * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n * collaborate together to achieve the desired result.\n *\n * Note that `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n * contents be edited in place by the user. This will not work on older browsers.\n *\n * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}\n * module to automatically remove \"bad\" content like inline event listener (e.g. ``).\n * However, as we are using `$sce` the model can still decide to to provide unsafe content if it marks\n * that content using the `$sce` service.\n *\n * \n \n [contenteditable] {\n border: 1px solid black;\n background-color: white;\n min-height: 20px;\n }\n\n .ng-invalid {\n border: 1px solid red;\n }\n\n \n \n angular.module('customControl', ['ngSanitize']).\n directive('contenteditable', ['$sce', function($sce) {\n return {\n restrict: 'A', // only activate on element attribute\n require: '?ngModel', // get a hold of NgModelController\n link: function(scope, element, attrs, ngModel) {\n if (!ngModel) return; // do nothing if no ng-model\n\n // Specify how UI should be updated\n ngModel.$render = function() {\n element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));\n };\n\n // Listen for change events to enable binding\n element.on('blur keyup change', function() {\n scope.$apply(read);\n });\n read(); // initialize\n\n // Write data to the model\n function read() {\n var html = element.html();\n // When we clear the content editable the browser leaves a behind\n // If strip-br attribute is provided then we strip this out\n if ( attrs.stripBr && html == '' ) {\n html = '';\n }\n ngModel.$setViewValue(html);\n }\n }\n };\n }]);\n \n \n \n Change me!\n Required!\n \n \n \n \n \n it('should data-bind and become invalid', function() {\n if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {\n // SafariDriver can't handle contenteditable\n // and Firefox driver can't clear contenteditables very well\n return;\n }\n var contentEditable = element(by.css('[contenteditable]'));\n var content = 'Change me!';\n\n expect(contentEditable.getText()).toEqual(content);\n\n contentEditable.clear();\n contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n expect(contentEditable.getText()).toEqual('');\n expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n });\n \n * \n *\n *\n */\nvar NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$rootScope', '$q', '$interpolate',\n function($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $rootScope, $q, $interpolate) {\n this.$viewValue = Number.NaN;\n this.$modelValue = Number.NaN;\n this.$validators = {};\n this.$asyncValidators = {};\n this.$parsers = [];\n this.$formatters = [];\n this.$viewChangeListeners = [];\n this.$untouched = true;\n this.$touched = false;\n this.$pristine = true;\n this.$dirty = false;\n this.$valid = true;\n this.$invalid = false;\n this.$error = {}; // keep invalid keys here\n this.$$success = {}; // keep valid keys here\n this.$pending = undefined; // keep pending keys here\n this.$name = $interpolate($attr.name || '', false)($scope);\n\n\n var parsedNgModel = $parse($attr.ngModel),\n pendingDebounce = null,\n ctrl = this;\n\n var ngModelGet = function ngModelGet() {\n var modelValue = parsedNgModel($scope);\n if (ctrl.$options && ctrl.$options.getterSetter && isFunction(modelValue)) {\n modelValue = modelValue();\n }\n return modelValue;\n };\n\n var ngModelSet = function ngModelSet(newValue) {\n var getterSetter;\n if (ctrl.$options && ctrl.$options.getterSetter &&\n isFunction(getterSetter = parsedNgModel($scope))) {\n\n getterSetter(ctrl.$modelValue);\n } else {\n parsedNgModel.assign($scope, ctrl.$modelValue);\n }\n };\n\n this.$$setOptions = function(options) {\n ctrl.$options = options;\n\n if (!parsedNgModel.assign && (!options || !options.getterSetter)) {\n throw $ngModelMinErr('nonassign', \"Expression '{0}' is non-assignable. Element: {1}\",\n $attr.ngModel, startingTag($element));\n }\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$render\n *\n * @description\n * Called when the view needs to be updated. It is expected that the user of the ng-model\n * directive will implement this method.\n *\n * The `$render()` method is invoked in the following situations:\n *\n * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last\n * committed value then `$render()` is called to update the input control.\n * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and\n * the `$viewValue` are different to last time.\n *\n * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of\n * `$modelValue` and `$viewValue` are actually different to their previous value. If `$modelValue`\n * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be\n * invoked if you only change a property on the objects.\n */\n this.$render = noop;\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$isEmpty\n *\n * @description\n * This is called when we need to determine if the value of the input is empty.\n *\n * For instance, the required directive does this to work out if the input has data or not.\n * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n *\n * You can override this for input directives whose concept of being empty is different to the\n * default. The `checkboxInputType` directive does this because in its case a value of `false`\n * implies empty.\n *\n * @param {*} value Model value to check.\n * @returns {boolean} True if `value` is empty.\n */\n this.$isEmpty = function(value) {\n return isUndefined(value) || value === '' || value === null || value !== value;\n };\n\n var parentForm = $element.inheritedData('$formController') || nullFormCtrl,\n currentValidationRunId = 0;\n\n // Setup initial state of the control\n $element\n .addClass(PRISTINE_CLASS)\n .addClass(UNTOUCHED_CLASS);\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setValidity\n *\n * @description\n * Change the validity state, and notifies the form.\n *\n * This method can be called within $parsers/$formatters. However, if possible, please use the\n * `ngModel.$validators` pipeline which is designed to call this method automatically.\n *\n * @param {string} validationErrorKey Name of the validator. the `validationErrorKey` will assign\n * to `$error[validationErrorKey]` and `$pending[validationErrorKey]`\n * so that it is available for data-binding.\n * The `validationErrorKey` should be in camelCase and will get converted into dash-case\n * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n * class and can be bound to as `{{someForm.someControl.$error.myError}}` .\n * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),\n * or skipped (null).\n */\n addSetValidityMethod({\n ctrl: this,\n $element: $element,\n set: function(object, property) {\n object[property] = true;\n },\n unset: function(object, property) {\n delete object[property];\n },\n parentForm: parentForm,\n $animate: $animate\n });\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setPristine\n *\n * @description\n * Sets the control to its pristine state.\n *\n * This method can be called to remove the 'ng-dirty' class and set the control to its pristine\n * state (ng-pristine class). A model is considered to be pristine when the model has not been changed\n * from when first compiled within then form.\n */\n this.$setPristine = function () {\n ctrl.$dirty = false;\n ctrl.$pristine = true;\n $animate.removeClass($element, DIRTY_CLASS);\n $animate.addClass($element, PRISTINE_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setUntouched\n *\n * @description\n * Sets the control to its untouched state.\n *\n * This method can be called to remove the 'ng-touched' class and set the control to its\n * untouched state (ng-untouched class). Upon compilation, a model is set as untouched\n * by default, however this function can be used to restore that state if the model has\n * already been touched by the user.\n */\n this.$setUntouched = function() {\n ctrl.$touched = false;\n ctrl.$untouched = true;\n $animate.setClass($element, UNTOUCHED_CLASS, TOUCHED_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setTouched\n *\n * @description\n * Sets the control to its touched state.\n *\n * This method can be called to remove the 'ng-untouched' class and set the control to its\n * touched state (ng-touched class). A model is considered to be touched when the user has\n * first interacted (focussed) on the model input element and then shifted focus away (blurred)\n * from the input element.\n */\n this.$setTouched = function() {\n ctrl.$touched = true;\n ctrl.$untouched = false;\n $animate.setClass($element, TOUCHED_CLASS, UNTOUCHED_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$rollbackViewValue\n *\n * @description\n * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,\n * which may be caused by a pending debounced event or because the input is waiting for a some\n * future event.\n *\n * If you have an input that uses `ng-model-options` to set up debounced events or events such\n * as blur you can have a situation where there is a period when the `$viewValue`\n * is out of synch with the ngModel's `$modelValue`.\n *\n * In this case, you can run into difficulties if you try to update the ngModel's `$modelValue`\n * programmatically before these debounced/future events have resolved/occurred, because Angular's\n * dirty checking mechanism is not able to tell whether the model has actually changed or not.\n *\n * The `$rollbackViewValue()` method should be called before programmatically changing the model of an\n * input which may have such events pending. This is important in order to make sure that the\n * input field will be updated with the new model value and any pending operations are cancelled.\n *\n * \n * \n * angular.module('cancel-update-example', [])\n *\n * .controller('CancelUpdateController', ['$scope', function($scope) {\n * $scope.resetWithCancel = function (e) {\n * if (e.keyCode == 27) {\n * $scope.myForm.myInput1.$rollbackViewValue();\n * $scope.myValue = '';\n * }\n * };\n * $scope.resetWithoutCancel = function (e) {\n * if (e.keyCode == 27) {\n * $scope.myValue = '';\n * }\n * };\n * }]);\n * \n * \n * \n * Try typing something in each input. See that the model only updates when you\n * blur off the input.\n * \n * Now see what happens if you start typing then press the Escape key\n *\n * \n * With $rollbackViewValue()\n * \n * myValue: \"{{ myValue }}\"\n *\n * Without $rollbackViewValue()\n * \n * myValue: \"{{ myValue }}\"\n * \n * \n * \n * \n */\n this.$rollbackViewValue = function() {\n $timeout.cancel(pendingDebounce);\n ctrl.$viewValue = ctrl.$$lastCommittedViewValue;\n ctrl.$render();\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$validate\n *\n * @description\n * Runs each of the registered validators (first synchronous validators and then asynchronous validators).\n */\n this.$validate = function() {\n // ignore $validate before model is initialized\n if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n return;\n }\n this.$$parseAndValidate();\n };\n\n this.$$runValidators = function(parseValid, modelValue, viewValue, doneCallback) {\n currentValidationRunId++;\n var localValidationRunId = currentValidationRunId;\n\n // check parser error\n if (!processParseErrors(parseValid)) {\n validationDone(false);\n return;\n }\n if (!processSyncValidators()) {\n validationDone(false);\n return;\n }\n processAsyncValidators();\n\n function processParseErrors(parseValid) {\n var errorKey = ctrl.$$parserName || 'parse';\n if (parseValid === undefined) {\n setValidity(errorKey, null);\n } else {\n setValidity(errorKey, parseValid);\n if (!parseValid) {\n forEach(ctrl.$validators, function(v, name) {\n setValidity(name, null);\n });\n forEach(ctrl.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n return false;\n }\n }\n return true;\n }\n\n function processSyncValidators() {\n var syncValidatorsValid = true;\n forEach(ctrl.$validators, function(validator, name) {\n var result = validator(modelValue, viewValue);\n syncValidatorsValid = syncValidatorsValid && result;\n setValidity(name, result);\n });\n if (!syncValidatorsValid) {\n forEach(ctrl.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n return false;\n }\n return true;\n }\n\n function processAsyncValidators() {\n var validatorPromises = [];\n var allValid = true;\n forEach(ctrl.$asyncValidators, function(validator, name) {\n var promise = validator(modelValue, viewValue);\n if (!isPromiseLike(promise)) {\n throw $ngModelMinErr(\"$asyncValidators\",\n \"Expected asynchronous validator to return a promise but got '{0}' instead.\", promise);\n }\n setValidity(name, undefined);\n validatorPromises.push(promise.then(function() {\n setValidity(name, true);\n }, function(error) {\n allValid = false;\n setValidity(name, false);\n }));\n });\n if (!validatorPromises.length) {\n validationDone(true);\n } else {\n $q.all(validatorPromises).then(function() {\n validationDone(allValid);\n }, noop);\n }\n }\n\n function setValidity(name, isValid) {\n if (localValidationRunId === currentValidationRunId) {\n ctrl.$setValidity(name, isValid);\n }\n }\n\n function validationDone(allValid) {\n if (localValidationRunId === currentValidationRunId) {\n\n doneCallback(allValid);\n }\n }\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$commitViewValue\n *\n * @description\n * Commit a pending update to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n this.$commitViewValue = function() {\n var viewValue = ctrl.$viewValue;\n\n $timeout.cancel(pendingDebounce);\n\n // If the view value has not changed then we should just exit, except in the case where there is\n // a native validator on the element. In this case the validation state may have changed even though\n // the viewValue has stayed empty.\n if (ctrl.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !ctrl.$$hasNativeValidators)) {\n return;\n }\n ctrl.$$lastCommittedViewValue = viewValue;\n\n // change to dirty\n if (ctrl.$pristine) {\n ctrl.$dirty = true;\n ctrl.$pristine = false;\n $animate.removeClass($element, PRISTINE_CLASS);\n $animate.addClass($element, DIRTY_CLASS);\n parentForm.$setDirty();\n }\n this.$$parseAndValidate();\n };\n\n this.$$parseAndValidate = function() {\n var parserValid = true,\n viewValue = ctrl.$$lastCommittedViewValue,\n modelValue = viewValue;\n for(var i = 0; i < ctrl.$parsers.length; i++) {\n modelValue = ctrl.$parsers[i](modelValue);\n if (isUndefined(modelValue)) {\n parserValid = false;\n break;\n }\n }\n if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n // ctrl.$modelValue has not been touched yet...\n ctrl.$modelValue = ngModelGet();\n }\n var prevModelValue = ctrl.$modelValue;\n var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;\n if (allowInvalid) {\n ctrl.$modelValue = modelValue;\n writeToModelIfNeeded();\n }\n ctrl.$$runValidators(parserValid, modelValue, viewValue, function(allValid) {\n if (!allowInvalid) {\n // Note: Don't check ctrl.$valid here, as we could have\n // external validators (e.g. calculated on the server),\n // that just call $setValidity and need the model value\n // to calculate their validity.\n ctrl.$modelValue = allValid ? modelValue : undefined;\n writeToModelIfNeeded();\n }\n });\n\n function writeToModelIfNeeded() {\n if (ctrl.$modelValue !== prevModelValue) {\n ctrl.$$writeModelToScope();\n }\n }\n };\n\n this.$$writeModelToScope = function() {\n ngModelSet(ctrl.$modelValue);\n forEach(ctrl.$viewChangeListeners, function(listener) {\n try {\n listener();\n } catch(e) {\n $exceptionHandler(e);\n }\n });\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setViewValue\n *\n * @description\n * Update the view value.\n *\n * This method should be called when an input directive want to change the view value; typically,\n * this is done from within a DOM event handler.\n *\n * For example {@link ng.directive:input input} calls it when the value of the input changes and\n * {@link ng.directive:select select} calls it when an option is selected.\n *\n * If the new `value` is an object (rather than a string or a number), we should make a copy of the\n * object before passing it to `$setViewValue`. This is because `ngModel` does not perform a deep\n * watch of objects, it only looks for a change of identity. If you only change the property of\n * the object then ngModel will not realise that the object has changed and will not invoke the\n * `$parsers` and `$validators` pipelines.\n *\n * For this reason, you should not change properties of the copy once it has been passed to\n * `$setViewValue`. Otherwise you may cause the model value on the scope to change incorrectly.\n *\n * When this method is called, the new `value` will be staged for committing through the `$parsers`\n * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged\n * value sent directly for processing, finally to be applied to `$modelValue` and then the\n * **expression** specified in the `ng-model` attribute.\n *\n * Lastly, all the registered change listeners, in the `$viewChangeListeners` list, are called.\n *\n * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`\n * and the `default` trigger is not listed, all those actions will remain pending until one of the\n * `updateOn` events is triggered on the DOM element.\n * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}\n * directive is used with a custom debounce for this particular event.\n *\n * Note that calling this function does not trigger a `$digest`.\n *\n * @param {string} value Value from the view.\n * @param {string} trigger Event that triggered the update.\n */\n this.$setViewValue = function(value, trigger) {\n ctrl.$viewValue = value;\n if (!ctrl.$options || ctrl.$options.updateOnDefault) {\n ctrl.$$debounceViewValueCommit(trigger);\n }\n };\n\n this.$$debounceViewValueCommit = function(trigger) {\n var debounceDelay = 0,\n options = ctrl.$options,\n debounce;\n\n if (options && isDefined(options.debounce)) {\n debounce = options.debounce;\n if (isNumber(debounce)) {\n debounceDelay = debounce;\n } else if (isNumber(debounce[trigger])) {\n debounceDelay = debounce[trigger];\n } else if (isNumber(debounce['default'])) {\n debounceDelay = debounce['default'];\n }\n }\n\n $timeout.cancel(pendingDebounce);\n if (debounceDelay) {\n pendingDebounce = $timeout(function() {\n ctrl.$commitViewValue();\n }, debounceDelay);\n } else if ($rootScope.$$phase) {\n ctrl.$commitViewValue();\n } else {\n $scope.$apply(function() {\n ctrl.$commitViewValue();\n });\n }\n };\n\n // model -> value\n // Note: we cannot use a normal scope.$watch as we want to detect the following:\n // 1. scope value is 'a'\n // 2. user enters 'b'\n // 3. ng-change kicks in and reverts scope value to 'a'\n // -> scope value did not change since the last digest as\n // ng-change executes in apply phase\n // 4. view should be changed back to 'a'\n $scope.$watch(function ngModelWatch() {\n var modelValue = ngModelGet();\n\n // if scope model value and ngModel value are out of sync\n // TODO(perf): why not move this to the action fn?\n if (modelValue !== ctrl.$modelValue) {\n ctrl.$modelValue = modelValue;\n\n var formatters = ctrl.$formatters,\n idx = formatters.length;\n\n var viewValue = modelValue;\n while(idx--) {\n viewValue = formatters[idx](viewValue);\n }\n if (ctrl.$viewValue !== viewValue) {\n ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;\n ctrl.$render();\n\n ctrl.$$runValidators(undefined, modelValue, viewValue, noop);\n }\n }\n\n return modelValue;\n });\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngModel\n *\n * @element input\n *\n * @description\n * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n * property on the scope using {@link ngModel.NgModelController NgModelController},\n * which is created and exposed by this directive.\n *\n * `ngModel` is responsible for:\n *\n * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n * require.\n * - Providing validation behavior (i.e. required, number, email, url).\n * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).\n * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`, `ng-untouched`) including animations.\n * - Registering the control with its parent {@link ng.directive:form form}.\n *\n * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n * current scope. If the property doesn't already exist on this scope, it will be created\n * implicitly and added to the scope.\n *\n * For best practices on using `ngModel`, see:\n *\n * - [https://github.com/angular/angular.js/wiki/Understanding-Scopes]\n *\n * For basic examples, how to use `ngModel`, see:\n *\n * - {@link ng.directive:input input}\n * - {@link input[text] text}\n * - {@link input[checkbox] checkbox}\n * - {@link input[radio] radio}\n * - {@link input[number] number}\n * - {@link input[email] email}\n * - {@link input[url] url}\n * - {@link input[date] date}\n * - {@link input[dateTimeLocal] dateTimeLocal}\n * - {@link input[time] time}\n * - {@link input[month] month}\n * - {@link input[week] week}\n * - {@link ng.directive:select select}\n * - {@link ng.directive:textarea textarea}\n *\n * # CSS classes\n * The following CSS classes are added and removed on the associated input/select/textarea element\n * depending on the validity of the model.\n *\n * - `ng-valid` is set if the model is valid.\n * - `ng-invalid` is set if the model is invalid.\n * - `ng-pristine` is set if the model is pristine.\n * - `ng-dirty` is set if the model is dirty.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n * ## Animation Hooks\n *\n * Animations within models are triggered when any of the associated CSS classes are added and removed\n * on the input element which is attached to the model. These classes are: `.ng-pristine`, `.ng-dirty`,\n * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.\n * The animations that are triggered within ngModel are similar to how they work in ngClass and\n * animations can be hooked into using CSS transitions, keyframes as well as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style an input element\n * that has been rendered as invalid after it has been validated:\n *\n * \n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-input {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-input.ng-invalid {\n * background: red;\n * color:white;\n * }\n * \n *\n * @example\n * \n \n \n \n Update input to see transitions when valid/invalid.\n Integer is a valid value.\n \n \n \n \n * \n *\n * ## Binding to a getter/setter\n *\n * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a\n * function that returns a representation of the model when called with zero arguments, and sets\n * the internal state of a model when called with an argument. It's sometimes useful to use this\n * for models that have an internal representation that's different than what the model exposes\n * to the view.\n *\n * \n * **Best Practice:** It's best to keep getters fast because Angular is likely to call them more\n * frequently than other parts of your code.\n * \n *\n * You use this behavior by adding `ng-model-options=\"{ getterSetter: true }\"` to an element that\n * has `ng-model` attached to it. You can also add `ng-model-options=\"{ getterSetter: true }\"` to\n * a ``, which will enable this behavior for all ``s within it. See\n * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.\n *\n * The following example shows how to use `ngModel` with a getter/setter:\n *\n * @example\n * \n \n \n \n Name:\n \n \n user.name = \n \n \n \n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function (newName) {\n if (angular.isDefined(newName)) {\n _name = newName;\n }\n return _name;\n }\n };\n }]);\n \n * \n */\nvar ngModelDirective = function() {\n return {\n restrict: 'A',\n require: ['ngModel', '^?form', '^?ngModelOptions'],\n controller: NgModelController,\n link: {\n pre: function(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0],\n formCtrl = ctrls[1] || nullFormCtrl;\n\n modelCtrl.$$setOptions(ctrls[2] && ctrls[2].$options);\n\n // notify others, especially parent forms\n formCtrl.$addControl(modelCtrl);\n\n attr.$observe('name', function(newValue) {\n if (modelCtrl.$name !== newValue) {\n formCtrl.$$renameControl(modelCtrl, newValue);\n }\n });\n\n scope.$on('$destroy', function() {\n formCtrl.$removeControl(modelCtrl);\n });\n },\n post: function(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0];\n if (modelCtrl.$options && modelCtrl.$options.updateOn) {\n element.on(modelCtrl.$options.updateOn, function(ev) {\n modelCtrl.$$debounceViewValueCommit(ev && ev.type);\n });\n }\n\n element.on('blur', function(ev) {\n if (modelCtrl.$touched) return;\n\n scope.$apply(function() {\n modelCtrl.$setTouched();\n });\n });\n }\n }\n };\n};\n\n\n/**\n * @ngdoc directive\n * @name ngChange\n *\n * @description\n * Evaluate the given expression when the user changes the input.\n * The expression is evaluated immediately, unlike the JavaScript onchange event\n * which only triggers at the end of a change (usually, when the user leaves the\n * form element or presses the return key).\n *\n * The `ngChange` expression is only evaluated when a change in the input value causes\n * a new value to be committed to the model.\n *\n * It will not be evaluated:\n * * if the value returned from the `$parsers` transformation pipeline has not changed\n * * if the input has continued to be invalid since the model will stay `null`\n * * if the model is changed programmatically and not by a change to the input value\n *\n *\n * Note, this directive requires `ngModel` to be present.\n *\n * @element input\n * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change\n * in input value.\n *\n * @example\n * \n * \n * \n * \n * \n * \n * Confirmed\n * debug = {{confirmed}}\n * counter = {{counter}}\n * \n * \n * \n * var counter = element(by.binding('counter'));\n * var debug = element(by.binding('confirmed'));\n *\n * it('should evaluate the expression if changing from view', function() {\n * expect(counter.getText()).toContain('0');\n *\n * element(by.id('ng-change-example1')).click();\n *\n * expect(counter.getText()).toContain('1');\n * expect(debug.getText()).toContain('true');\n * });\n *\n * it('should not evaluate the expression if changing from model', function() {\n * element(by.id('ng-change-example2')).click();\n\n * expect(counter.getText()).toContain('0');\n * expect(debug.getText()).toContain('true');\n * });\n * \n * \n */\nvar ngChangeDirective = valueFn({\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n ctrl.$viewChangeListeners.push(function() {\n scope.$eval(attr.ngChange);\n });\n }\n});\n\n\nvar requiredDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n attr.required = true; // force truthy in case we are on non input element\n\n ctrl.$validators.required = function(value) {\n return !attr.required || !ctrl.$isEmpty(value);\n };\n\n attr.$observe('required', function() {\n ctrl.$validate();\n });\n }\n };\n};\n\n\nvar patternDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var regexp, patternExp = attr.ngPattern || attr.pattern;\n attr.$observe('pattern', function(regex) {\n if (isString(regex) && regex.length > 0) {\n regex = new RegExp(regex);\n }\n\n if (regex && !regex.test) {\n throw minErr('ngPattern')('noregexp',\n 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,\n regex, startingTag(elm));\n }\n\n regexp = regex || undefined;\n ctrl.$validate();\n });\n\n ctrl.$validators.pattern = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(regexp) || regexp.test(value);\n };\n }\n };\n};\n\n\nvar maxlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var maxlength = 0;\n attr.$observe('maxlength', function(value) {\n maxlength = int(value) || 0;\n ctrl.$validate();\n });\n ctrl.$validators.maxlength = function(modelValue, viewValue) {\n return ctrl.$isEmpty(modelValue) || viewValue.length <= maxlength;\n };\n }\n };\n};\n\nvar minlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var minlength = 0;\n attr.$observe('minlength', function(value) {\n minlength = int(value) || 0;\n ctrl.$validate();\n });\n ctrl.$validators.minlength = function(modelValue, viewValue) {\n return ctrl.$isEmpty(modelValue) || viewValue.length >= minlength;\n };\n }\n };\n};\n\n\n/**\n * @ngdoc directive\n * @name ngList\n *\n * @description\n * Text input that converts between a delimited string and an array of strings. The default\n * delimiter is a comma followed by a space - equivalent to `ng-list=\", \"`. You can specify a custom\n * delimiter as the value of the `ngList` attribute - for example, `ng-list=\" | \"`.\n *\n * The behaviour of the directive is affected by the use of the `ngTrim` attribute.\n * * If `ngTrim` is set to `\"false\"` then whitespace around both the separator and each\n * list item is respected. This implies that the user of the directive is responsible for\n * dealing with whitespace but also allows you to use whitespace as a delimiter, such as a\n * tab or newline character.\n * * Otherwise whitespace around the delimiter is ignored when splitting (although it is respected\n * when joining the list items back together) and whitespace around each list item is stripped\n * before it is added to the model.\n *\n * ### Example with Validation\n *\n * \n * \n * angular.module('listExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.names = ['morpheus', 'neo', 'trinity'];\n * }]);\n * \n * \n * \n * List: \n * \n * Required!\n * \n * names = {{names}}\n * myForm.namesInput.$valid = {{myForm.namesInput.$valid}}\n * myForm.namesInput.$error = {{myForm.namesInput.$error}}\n * myForm.$valid = {{myForm.$valid}}\n * myForm.$error.required = {{!!myForm.$error.required}}\n * \n * \n * \n * var listInput = element(by.model('names'));\n * var names = element(by.exactBinding('names'));\n * var valid = element(by.binding('myForm.namesInput.$valid'));\n * var error = element(by.css('span.error'));\n *\n * it('should initialize to model', function() {\n * expect(names.getText()).toContain('[\"morpheus\",\"neo\",\"trinity\"]');\n * expect(valid.getText()).toContain('true');\n * expect(error.getCssValue('display')).toBe('none');\n * });\n *\n * it('should be invalid if empty', function() {\n * listInput.clear();\n * listInput.sendKeys('');\n *\n * expect(names.getText()).toContain('');\n * expect(valid.getText()).toContain('false');\n * expect(error.getCssValue('display')).not.toBe('none');\n * });\n * \n * \n *\n * ### Example - splitting on whitespace\n * \n * \n * \n * {{ list | json }}\n * \n * \n * it(\"should split the text by newlines\", function() {\n * var listInput = element(by.model('list'));\n * var output = element(by.binding('list | json'));\n * listInput.sendKeys('abc\\ndef\\nghi');\n * expect(output.getText()).toContain('[\\n \"abc\",\\n \"def\",\\n \"ghi\"\\n]');\n * });\n * \n * \n *\n * @element input\n * @param {string=} ngList optional delimiter that should be used to split the value.\n */\nvar ngListDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n // We want to control whitespace trimming so we use this convoluted approach\n // to access the ngList attribute, which doesn't pre-trim the attribute\n var ngList = element.attr(attr.$attr.ngList) || ', ';\n var trimValues = attr.ngTrim !== 'false';\n var separator = trimValues ? trim(ngList) : ngList;\n\n var parse = function(viewValue) {\n // If the viewValue is invalid (say required but empty) it will be `undefined`\n if (isUndefined(viewValue)) return;\n\n var list = [];\n\n if (viewValue) {\n forEach(viewValue.split(separator), function(value) {\n if (value) list.push(trimValues ? trim(value) : value);\n });\n }\n\n return list;\n };\n\n ctrl.$parsers.push(parse);\n ctrl.$formatters.push(function(value) {\n if (isArray(value)) {\n return value.join(ngList);\n }\n\n return undefined;\n });\n\n // Override the standard $isEmpty because an empty array means the input is empty.\n ctrl.$isEmpty = function(value) {\n return !value || !value.length;\n };\n }\n };\n};\n\n\nvar CONSTANT_VALUE_REGEXP = /^(true|false|\\d+)$/;\n/**\n * @ngdoc directive\n * @name ngValue\n *\n * @description\n * Binds the given expression to the value of `input[select]` or `input[radio]`, so\n * that when the element is selected, the `ngModel` of that element is set to the\n * bound value.\n *\n * `ngValue` is useful when dynamically generating lists of radio buttons using `ng-repeat`, as\n * shown below.\n *\n * @element input\n * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute\n * of the `input` element\n *\n * @example\n \n \n \n \n Which is your favorite?\n \n {{name}}\n \n \n You chose {{my.favorite}}\n \n \n \n var favorite = element(by.binding('my.favorite'));\n\n it('should initialize to model', function() {\n expect(favorite.getText()).toContain('unicorns');\n });\n it('should bind the values to the inputs', function() {\n element.all(by.model('my.favorite')).get(0).click();\n expect(favorite.getText()).toContain('pizza');\n });\n \n \n */\nvar ngValueDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n compile: function(tpl, tplAttr) {\n if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {\n return function ngValueConstantLink(scope, elm, attr) {\n attr.$set('value', scope.$eval(attr.ngValue));\n };\n } else {\n return function ngValueLink(scope, elm, attr) {\n scope.$watch(attr.ngValue, function valueWatchAction(value) {\n attr.$set('value', value);\n });\n };\n }\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngModelOptions\n *\n * @description\n * Allows tuning how model updates are done. Using `ngModelOptions` you can specify a custom list of\n * events that will trigger a model update and/or a debouncing delay so that the actual update only\n * takes place when a timer expires; this timer will be reset after another change takes place.\n *\n * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might\n * be different than the value in the actual model. This means that if you update the model you\n * should also invoke {@link ngModel.NgModelController `$rollbackViewValue`} on the relevant input field in\n * order to make sure it is synchronized with the model and that any debounced action is canceled.\n *\n * The easiest way to reference the control's {@link ngModel.NgModelController `$rollbackViewValue`}\n * method is by making sure the input is placed inside a form that has a `name` attribute. This is\n * important because `form` controllers are published to the related scope under the name in their\n * `name` attribute.\n *\n * Any pending changes will take place immediately when an enclosing form is submitted via the\n * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * `ngModelOptions` has an effect on the element it's declared on and its descendants.\n *\n * @param {Object} ngModelOptions options to apply to the current model. Valid keys are:\n * - `updateOn`: string specifying which event should be the input bound to. You can set several\n * events using an space delimited list. There is a special event called `default` that\n * matches the default events belonging of the control.\n * - `debounce`: integer value which contains the debounce model update value in milliseconds. A\n * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a\n * custom value for each event. For example:\n * `ng-model-options=\"{ updateOn: 'default blur', debounce: {'default': 500, 'blur': 0} }\"`\n * - `allowInvalid`: boolean value which indicates that the model can be set with values that did\n * not validate correctly instead of the default behavior of setting the model to undefined.\n * - `getterSetter`: boolean value which determines whether or not to treat functions bound to\n `ngModel` as getters/setters.\n * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for\n * ``, ``, ... . Right now, the only supported value is `'UTC'`,\n * otherwise the default timezone of the browser will be used.\n *\n * @example\n\n The following example shows how to override immediate updates. Changes on the inputs within the\n form will update the model only when the control loses focus (blur event). If `escape` key is\n pressed while the input field is focused, the value is reset to the value in the current model.\n\n \n \n \n \n Name:\n \n\n Other data:\n \n \n user.name = \n \n \n \n angular.module('optionsExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = { name: 'say', data: '' };\n\n $scope.cancel = function (e) {\n if (e.keyCode == 27) {\n $scope.userForm.userName.$rollbackViewValue();\n }\n };\n }]);\n \n \n var model = element(by.binding('user.name'));\n var input = element(by.model('user.name'));\n var other = element(by.model('user.data'));\n\n it('should allow custom events', function() {\n input.sendKeys(' hello');\n input.click();\n expect(model.getText()).toEqual('say');\n other.click();\n expect(model.getText()).toEqual('say hello');\n });\n\n it('should $rollbackViewValue when model changes', function() {\n input.sendKeys(' hello');\n expect(input.getAttribute('value')).toEqual('say hello');\n input.sendKeys(protractor.Key.ESCAPE);\n expect(input.getAttribute('value')).toEqual('say');\n other.click();\n expect(model.getText()).toEqual('say');\n });\n \n \n\n This one shows how to debounce model changes. Model will be updated only 1 sec after last change.\n If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.\n\n \n \n \n \n Name:\n \n Clear\n \n user.name = \n \n \n \n angular.module('optionsExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = { name: 'say' };\n }]);\n \n \n\n This one shows how to bind to getter/setters:\n\n \n \n \n \n Name:\n \n \n user.name = \n \n \n \n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function (newName) {\n return angular.isDefined(newName) ? (_name = newName) : _name;\n }\n };\n }]);\n \n \n */\nvar ngModelOptionsDirective = function() {\n return {\n restrict: 'A',\n controller: ['$scope', '$attrs', function($scope, $attrs) {\n var that = this;\n this.$options = $scope.$eval($attrs.ngModelOptions);\n // Allow adding/overriding bound events\n if (this.$options.updateOn !== undefined) {\n this.$options.updateOnDefault = false;\n // extract \"default\" pseudo-event from list of events that can trigger a model update\n this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {\n that.$options.updateOnDefault = true;\n return ' ';\n }));\n } else {\n this.$options.updateOnDefault = true;\n }\n }]\n };\n};\n\n// helper methods\nfunction addSetValidityMethod(context) {\n var ctrl = context.ctrl,\n $element = context.$element,\n classCache = {},\n set = context.set,\n unset = context.unset,\n parentForm = context.parentForm,\n $animate = context.$animate;\n\n ctrl.$setValidity = setValidity;\n toggleValidationCss('', true);\n\n function setValidity(validationErrorKey, state, options) {\n if (state === undefined) {\n createAndSet('$pending', validationErrorKey, options);\n } else {\n unsetAndCleanup('$pending', validationErrorKey, options);\n }\n if (!isBoolean(state)) {\n unset(ctrl.$error, validationErrorKey, options);\n unset(ctrl.$$success, validationErrorKey, options);\n } else {\n if (state) {\n unset(ctrl.$error, validationErrorKey, options);\n set(ctrl.$$success, validationErrorKey, options);\n } else {\n set(ctrl.$error, validationErrorKey, options);\n unset(ctrl.$$success, validationErrorKey, options);\n }\n }\n if (ctrl.$pending) {\n cachedToggleClass(PENDING_CLASS, true);\n ctrl.$valid = ctrl.$invalid = undefined;\n toggleValidationCss('', null);\n } else {\n cachedToggleClass(PENDING_CLASS, false);\n ctrl.$valid = isObjectEmpty(ctrl.$error);\n ctrl.$invalid = !ctrl.$valid;\n toggleValidationCss('', ctrl.$valid);\n }\n\n // re-read the state as the set/unset methods could have\n // combined state in ctrl.$error[validationError] (used for forms),\n // where setting/unsetting only increments/decrements the value,\n // and does not replace it.\n var combinedState;\n if (ctrl.$pending && ctrl.$pending[validationErrorKey]) {\n combinedState = undefined;\n } else if (ctrl.$error[validationErrorKey]) {\n combinedState = false;\n } else if (ctrl.$$success[validationErrorKey]) {\n combinedState = true;\n } else {\n combinedState = null;\n }\n toggleValidationCss(validationErrorKey, combinedState);\n parentForm.$setValidity(validationErrorKey, combinedState, ctrl);\n }\n\n function createAndSet(name, value, options) {\n if (!ctrl[name]) {\n ctrl[name] = {};\n }\n set(ctrl[name], value, options);\n }\n\n function unsetAndCleanup(name, value, options) {\n if (ctrl[name]) {\n unset(ctrl[name], value, options);\n }\n if (isObjectEmpty(ctrl[name])) {\n ctrl[name] = undefined;\n }\n }\n\n function cachedToggleClass(className, switchValue) {\n if (switchValue && !classCache[className]) {\n $animate.addClass($element, className);\n classCache[className] = true;\n } else if (!switchValue && classCache[className]) {\n $animate.removeClass($element, className);\n classCache[className] = false;\n }\n }\n\n function toggleValidationCss(validationErrorKey, isValid) {\n validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n\n cachedToggleClass(VALID_CLASS + validationErrorKey, isValid === true);\n cachedToggleClass(INVALID_CLASS + validationErrorKey, isValid === false);\n }\n}\n\nfunction isObjectEmpty(obj) {\n if (obj) {\n for (var prop in obj) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @ngdoc directive\n * @name ngBind\n * @restrict AC\n *\n * @description\n * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element\n * with the value of a given expression, and to update the text content when the value of that\n * expression changes.\n *\n * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like\n * `{{ expression }}` which is similar but less verbose.\n *\n * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily\n * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an\n * element attribute, it makes the bindings invisible to the user while the page is loading.\n *\n * An alternative solution to this problem would be using the\n * {@link ng.directive:ngCloak ngCloak} directive.\n *\n *\n * @element ANY\n * @param {expression} ngBind {@link guide/expression Expression} to evaluate.\n *\n * @example\n * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.\n \n \n \n \n Enter name: \n Hello !\n \n \n \n it('should check ng-bind', function() {\n var nameInput = element(by.model('name'));\n\n expect(element(by.binding('name')).getText()).toBe('Whirled');\n nameInput.clear();\n nameInput.sendKeys('world');\n expect(element(by.binding('name')).getText()).toBe('world');\n });\n \n \n */\nvar ngBindDirective = ['$compile', function($compile) {\n return {\n restrict: 'AC',\n compile: function ngBindCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBind);\n scope.$watch(attr.ngBind, function ngBindWatchAction(value) {\n // We are purposefully using == here rather than === because we want to\n // catch when value is \"null or undefined\"\n // jshint -W041\n element.text(value == undefined ? '' : value);\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindTemplate\n *\n * @description\n * The `ngBindTemplate` directive specifies that the element\n * text content should be replaced with the interpolation of the template\n * in the `ngBindTemplate` attribute.\n * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`\n * expressions. This directive is needed since some HTML elements\n * (such as TITLE and OPTION) cannot contain SPAN elements.\n *\n * @element ANY\n * @param {string} ngBindTemplate template of form\n * {{ expression }} to eval.\n *\n * @example\n * Try it here: enter text in text box and watch the greeting change.\n \n \n \n \n Salutation: \n Name: \n \n \n \n \n it('should check ng-bind', function() {\n var salutationElem = element(by.binding('salutation'));\n var salutationInput = element(by.model('salutation'));\n var nameInput = element(by.model('name'));\n\n expect(salutationElem.getText()).toBe('Hello World!');\n\n salutationInput.clear();\n salutationInput.sendKeys('Greetings');\n nameInput.clear();\n nameInput.sendKeys('user');\n\n expect(salutationElem.getText()).toBe('Greetings user!');\n });\n \n \n */\nvar ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {\n return {\n compile: function ngBindTemplateCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindTemplateLink(scope, element, attr) {\n var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));\n $compile.$$addBindingInfo(element, interpolateFn.expressions);\n attr.$observe('ngBindTemplate', function(value) {\n element.text(value);\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindHtml\n *\n * @description\n * Creates a binding that will innerHTML the result of evaluating the `expression` into the current\n * element in a secure way. By default, the innerHTML-ed content will be sanitized using the {@link\n * ngSanitize.$sanitize $sanitize} service. To utilize this functionality, ensure that `$sanitize`\n * is available, for example, by including {@link ngSanitize} in your module's dependencies (not in\n * core Angular.) You may also bypass sanitization for values you know are safe. To do so, bind to\n * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example\n * under {@link ng.$sce#Example Strict Contextual Escaping (SCE)}.\n *\n * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you\n * will have an exception (instead of an exploit.)\n *\n * @element ANY\n * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.\n *\n * @example\n\n \n \n \n \n \n \n\n \n angular.module('bindHtmlExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.myHTML =\n 'I am an HTMLstring with ' +\n 'links! and other stuff';\n }]);\n \n\n \n it('should check ng-bind-html', function() {\n expect(element(by.binding('myHTML')).getText()).toBe(\n 'I am an HTMLstring with links! and other stuff');\n });\n \n \n */\nvar ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {\n return {\n restrict: 'A',\n compile: function ngBindHtmlCompile(tElement, tAttrs) {\n var ngBindHtmlGetter = $parse(tAttrs.ngBindHtml);\n var ngBindHtmlWatch = $parse(tAttrs.ngBindHtml, function getStringValue(value) {\n return (value || '').toString();\n });\n $compile.$$addBindingClass(tElement);\n\n return function ngBindHtmlLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBindHtml);\n\n scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {\n // we re-evaluate the expr because we want a TrustedValueHolderType\n // for $sce, not a string\n element.html($sce.getTrustedHtml(ngBindHtmlGetter(scope)) || '');\n });\n };\n }\n };\n}];\n\nfunction classDirective(name, selector) {\n name = 'ngClass' + name;\n return ['$animate', function($animate) {\n return {\n restrict: 'AC',\n link: function(scope, element, attr) {\n var oldVal;\n\n scope.$watch(attr[name], ngClassWatchAction, true);\n\n attr.$observe('class', function(value) {\n ngClassWatchAction(scope.$eval(attr[name]));\n });\n\n\n if (name !== 'ngClass') {\n scope.$watch('$index', function($index, old$index) {\n // jshint bitwise: false\n var mod = $index & 1;\n if (mod !== (old$index & 1)) {\n var classes = arrayClasses(scope.$eval(attr[name]));\n mod === selector ?\n addClasses(classes) :\n removeClasses(classes);\n }\n });\n }\n\n function addClasses(classes) {\n var newClasses = digestClassCounts(classes, 1);\n attr.$addClass(newClasses);\n }\n\n function removeClasses(classes) {\n var newClasses = digestClassCounts(classes, -1);\n attr.$removeClass(newClasses);\n }\n\n function digestClassCounts (classes, count) {\n var classCounts = element.data('$classCounts') || {};\n var classesToUpdate = [];\n forEach(classes, function (className) {\n if (count > 0 || classCounts[className]) {\n classCounts[className] = (classCounts[className] || 0) + count;\n if (classCounts[className] === +(count > 0)) {\n classesToUpdate.push(className);\n }\n }\n });\n element.data('$classCounts', classCounts);\n return classesToUpdate.join(' ');\n }\n\n function updateClasses (oldClasses, newClasses) {\n var toAdd = arrayDifference(newClasses, oldClasses);\n var toRemove = arrayDifference(oldClasses, newClasses);\n toAdd = digestClassCounts(toAdd, 1);\n toRemove = digestClassCounts(toRemove, -1);\n if (toAdd && toAdd.length) {\n $animate.addClass(element, toAdd);\n }\n if (toRemove && toRemove.length) {\n $animate.removeClass(element, toRemove);\n }\n }\n\n function ngClassWatchAction(newVal) {\n if (selector === true || scope.$index % 2 === selector) {\n var newClasses = arrayClasses(newVal || []);\n if (!oldVal) {\n addClasses(newClasses);\n } else if (!equals(newVal,oldVal)) {\n var oldClasses = arrayClasses(oldVal);\n updateClasses(oldClasses, newClasses);\n }\n }\n oldVal = shallowCopy(newVal);\n }\n }\n };\n\n function arrayDifference(tokens1, tokens2) {\n var values = [];\n\n outer:\n for(var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for(var j = 0; j < tokens2.length; j++) {\n if(token == tokens2[j]) continue outer;\n }\n values.push(token);\n }\n return values;\n }\n\n function arrayClasses (classVal) {\n if (isArray(classVal)) {\n return classVal;\n } else if (isString(classVal)) {\n return classVal.split(' ');\n } else if (isObject(classVal)) {\n var classes = [], i = 0;\n forEach(classVal, function(v, k) {\n if (v) {\n classes = classes.concat(k.split(' '));\n }\n });\n return classes;\n }\n return classVal;\n }\n }];\n}\n\n/**\n * @ngdoc directive\n * @name ngClass\n * @restrict AC\n *\n * @description\n * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding\n * an expression that represents all classes to be added.\n *\n * The directive operates in three different ways, depending on which of three types the expression\n * evaluates to:\n *\n * 1. If the expression evaluates to a string, the string should be one or more space-delimited class\n * names.\n *\n * 2. If the expression evaluates to an array, each element of the array should be a string that is\n * one or more space-delimited class names.\n *\n * 3. If the expression evaluates to an object, then for each key-value pair of the\n * object with a truthy value the corresponding key is used as a class name.\n *\n * The directive won't add duplicate classes if a particular class was already set.\n *\n * When the expression changes, the previously added classes are removed and only then the\n * new classes are added.\n *\n * @animations\n * add - happens just before the class is applied to the element\n * remove - happens just before the class is removed from the element\n *\n * @element ANY\n * @param {expression} ngClass {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class\n * names, an array, or a map of class names to boolean values. In the case of a map, the\n * names of the properties whose values are truthy will be added as css classes to the\n * element.\n *\n * @example Example that demonstrates basic bindings via ngClass directive.\n \n \n Map Syntax Example\n deleted (apply \"strike\" class)\n important (apply \"bold\" class)\n error (apply \"red\" class)\n \n Using String Syntax\n \n \n Using Array Syntax\n \n \n \n \n \n .strike {\n text-decoration: line-through;\n }\n .bold {\n font-weight: bold;\n }\n .red {\n color: red;\n }\n \n \n var ps = element.all(by.css('p'));\n\n it('should let you toggle the class', function() {\n\n expect(ps.first().getAttribute('class')).not.toMatch(/bold/);\n expect(ps.first().getAttribute('class')).not.toMatch(/red/);\n\n element(by.model('important')).click();\n expect(ps.first().getAttribute('class')).toMatch(/bold/);\n\n element(by.model('error')).click();\n expect(ps.first().getAttribute('class')).toMatch(/red/);\n });\n\n it('should let you toggle string example', function() {\n expect(ps.get(1).getAttribute('class')).toBe('');\n element(by.model('style')).clear();\n element(by.model('style')).sendKeys('red');\n expect(ps.get(1).getAttribute('class')).toBe('red');\n });\n\n it('array example should have 3 classes', function() {\n expect(ps.last().getAttribute('class')).toBe('');\n element(by.model('style1')).sendKeys('bold');\n element(by.model('style2')).sendKeys('strike');\n element(by.model('style3')).sendKeys('red');\n expect(ps.last().getAttribute('class')).toBe('bold strike red');\n });\n \n \n\n ## Animations\n\n The example below demonstrates how to perform animations using ngClass.\n\n \n \n \n \n \n Sample Text\n \n \n .base-class {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .base-class.my-class {\n color: red;\n font-size:3em;\n }\n \n \n it('should check ng-class', function() {\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n\n element(by.id('setbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).\n toMatch(/my-class/);\n\n element(by.id('clearbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n });\n \n \n\n\n ## ngClass and pre-existing CSS3 Transitions/Animations\n The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.\n Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder\n any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure\n to view the step by step details of {@link ngAnimate.$animate#addclass $animate.addClass} and\n {@link ngAnimate.$animate#removeclass $animate.removeClass}.\n */\nvar ngClassDirective = classDirective('', true);\n\n/**\n * @ngdoc directive\n * @name ngClassOdd\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n \n \n \n \n \n {{name}}\n \n \n \n \n \n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n \n \n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n \n \n */\nvar ngClassOddDirective = classDirective('Odd', 0);\n\n/**\n * @ngdoc directive\n * @name ngClassEven\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The\n * result of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n \n \n \n \n \n {{name}} \n \n \n \n \n \n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n \n \n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n \n \n */\nvar ngClassEvenDirective = classDirective('Even', 1);\n\n/**\n * @ngdoc directive\n * @name ngCloak\n * @restrict AC\n *\n * @description\n * The `ngCloak` directive is used to prevent the Angular html template from being briefly\n * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this\n * directive to avoid the undesirable flicker effect caused by the html template display.\n *\n * The directive can be applied to the `` element, but the preferred usage is to apply\n * multiple `ngCloak` directives to small portions of the page to permit progressive rendering\n * of the browser view.\n *\n * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and\n * `angular.min.js`.\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```css\n * [ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {\n * display: none !important;\n * }\n * ```\n *\n * When this css rule is loaded by the browser, all html elements (including their children) that\n * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive\n * during the compilation of the template it deletes the `ngCloak` element attribute, making\n * the compiled element visible.\n *\n * For the best result, the `angular.js` script must be loaded in the head section of the html\n * document; alternatively, the css rule above must be included in the external stylesheet of the\n * application.\n *\n * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they\n * cannot match the `[ng\\:cloak]` selector. To work around this limitation, you must add the css\n * class `ng-cloak` in addition to the `ngCloak` directive as shown in the example below.\n *\n * @element ANY\n *\n * @example\n \n \n {{ 'hello' }}\n {{ 'hello IE7' }}\n \n \n it('should remove the template directive and css class', function() {\n expect($('#template1').getAttribute('ng-cloak')).\n toBeNull();\n expect($('#template2').getAttribute('ng-cloak')).\n toBeNull();\n });\n \n \n *\n */\nvar ngCloakDirective = ngDirective({\n compile: function(element, attr) {\n attr.$set('ngCloak', undefined);\n element.removeClass('ng-cloak');\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngController\n *\n * @description\n * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular\n * supports the principles behind the Model-View-Controller design pattern.\n *\n * MVC components in angular:\n *\n * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties\n * are accessed through bindings.\n * * View — The template (HTML with data bindings) that is rendered into the View.\n * * Controller — The `ngController` directive specifies a Controller class; the class contains business\n * logic behind the application to decorate the scope with functions and values\n *\n * Note that you can also attach controllers to the DOM by declaring it in a route definition\n * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller\n * again using `ng-controller` in the template itself. This will cause the controller to be attached\n * and executed twice.\n *\n * @element ANY\n * @scope\n * @priority 500\n * @param {expression} ngController Name of a constructor function registered with the current\n * {@link ng.$controllerProvider $controllerProvider} or an {@link guide/expression expression}\n * that on the current scope evaluates to a constructor function.\n *\n * The controller instance can be published into a scope property by specifying\n * `ng-controller=\"as propertyName\"`.\n *\n * If the current `$controllerProvider` is configured to use globals (via\n * {@link ng.$controllerProvider#allowGlobals `$controllerProvider.allowGlobals()` }), this may\n * also be the name of a globally accessible constructor function (not recommended).\n *\n * @example\n * Here is a simple form for editing user contact information. Adding, removing, clearing, and\n * greeting are methods declared on the controller (see source tab). These methods can\n * easily be called from the angular markup. Any changes to the data are automatically reflected\n * in the View without the need for a manual update.\n *\n * Two different declaration styles are included below:\n *\n * * one binds methods and properties directly onto the controller using `this`:\n * `ng-controller=\"SettingsController1 as settings\"`\n * * one injects `$scope` into the controller:\n * `ng-controller=\"SettingsController2\"`\n *\n * The second option is more common in the Angular community, and is generally used in boilerplates\n * and in this guide. However, there are advantages to binding properties directly to the controller\n * and avoiding scope.\n *\n * * Using `controller as` makes it obvious which controller you are accessing in the template when\n * multiple controllers apply to an element.\n * * If you are writing your controllers as classes you have easier access to the properties and\n * methods, which will appear on the scope, from inside the controller code.\n * * Since there is always a `.` in the bindings, you don't have to worry about prototypal\n * inheritance masking primitives.\n *\n * This example demonstrates the `controller as` syntax.\n *\n * \n * \n * \n * Name: \n * [ greet ]\n * Contact:\n * \n * \n * \n * phone\n * email\n * \n * \n * [ clear\n * | X ]\n * \n * [ add ]\n * \n * \n * \n * \n * angular.module('controllerAsExample', [])\n * .controller('SettingsController1', SettingsController1);\n *\n * function SettingsController1() {\n * this.name = \"John Smith\";\n * this.contacts = [\n * {type: 'phone', value: '408 555 1212'},\n * {type: 'email', value: 'john.smith@example.org'} ];\n * }\n *\n * SettingsController1.prototype.greet = function() {\n * alert(this.name);\n * };\n *\n * SettingsController1.prototype.addContact = function() {\n * this.contacts.push({type: 'email', value: 'yourname@example.org'});\n * };\n *\n * SettingsController1.prototype.removeContact = function(contactToRemove) {\n * var index = this.contacts.indexOf(contactToRemove);\n * this.contacts.splice(index, 1);\n * };\n *\n * SettingsController1.prototype.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * \n * \n * it('should check controller as', function() {\n * var container = element(by.id('ctrl-as-exmpl'));\n * expect(container.element(by.model('settings.name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n *\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.linkText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.linkText('add')).click();\n *\n * expect(container.element(by.repeater('contact in settings.contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * \n * \n *\n * This example demonstrates the \"attach to `$scope`\" style of controller.\n *\n * \n * \n * \n * Name: \n * [ greet ]\n * Contact:\n * \n * \n * \n * phone\n * email\n * \n * \n * [ clear\n * | X ]\n * \n * [ add ]\n * \n * \n * \n * \n * angular.module('controllerExample', [])\n * .controller('SettingsController2', ['$scope', SettingsController2]);\n *\n * function SettingsController2($scope) {\n * $scope.name = \"John Smith\";\n * $scope.contacts = [\n * {type:'phone', value:'408 555 1212'},\n * {type:'email', value:'john.smith@example.org'} ];\n *\n * $scope.greet = function() {\n * alert($scope.name);\n * };\n *\n * $scope.addContact = function() {\n * $scope.contacts.push({type:'email', value:'yourname@example.org'});\n * };\n *\n * $scope.removeContact = function(contactToRemove) {\n * var index = $scope.contacts.indexOf(contactToRemove);\n * $scope.contacts.splice(index, 1);\n * };\n *\n * $scope.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * }\n * \n * \n * it('should check controller', function() {\n * var container = element(by.id('ctrl-exmpl'));\n *\n * expect(container.element(by.model('name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.linkText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.linkText('add')).click();\n *\n * expect(container.element(by.repeater('contact in contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * \n *\n\n */\nvar ngControllerDirective = [function() {\n return {\n restrict: 'A',\n scope: true,\n controller: '@',\n priority: 500\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngCsp\n *\n * @element html\n * @description\n * Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support.\n *\n * This is necessary when developing things like Google Chrome Extensions.\n *\n * CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).\n * For Angular to be CSP compatible there are only two things that we need to do differently:\n *\n * - don't use `Function` constructor to generate optimized value getters\n * - don't inject custom stylesheet into the document\n *\n * AngularJS uses `Function(string)` generated functions as a speed optimization. Applying the `ngCsp`\n * directive will cause Angular to use CSP compatibility mode. When this mode is on AngularJS will\n * evaluate all expressions up to 30% slower than in non-CSP mode, but no security violations will\n * be raised.\n *\n * CSP forbids JavaScript to inline stylesheet rules. In non CSP mode Angular automatically\n * includes some CSS rules (e.g. {@link ng.directive:ngCloak ngCloak}).\n * To make those directives work in CSP mode, include the `angular-csp.css` manually.\n *\n * Angular tries to autodetect if CSP is active and automatically turn on the CSP-safe mode. This\n * autodetection however triggers a CSP error to be logged in the console:\n *\n * ```\n * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of\n * script in the following Content Security Policy directive: \"default-src 'self'\". Note that\n * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.\n * ```\n *\n * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`\n * directive on the root element of the application or on the `angular.js` script tag, whichever\n * appears first in the html document.\n *\n * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*\n *\n * @example\n * This example shows how to apply the `ngCsp` directive to the `html` tag.\n ```html\n \n \n ...\n ...\n \n ```\n */\n\n// ngCsp is not implemented as a proper directive any more, because we need it be processed while we\n// bootstrap the system (before $parse is instantiated), for this reason we just have\n// the csp.isActive() fn that looks for ng-csp attribute anywhere in the current doc\n\n/**\n * @ngdoc directive\n * @name ngClick\n *\n * @description\n * The ngClick directive allows you to specify custom behavior when\n * an element is clicked.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon\n * click. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment\n \n \n count: {{count}}\n \n \n \n it('should check ng-click', function() {\n expect(element(by.binding('count')).getText()).toMatch('0');\n element(by.css('button')).click();\n expect(element(by.binding('count')).getText()).toMatch('1');\n });\n \n \n */\n/*\n * A directive that allows creation of custom onclick handlers that are defined as angular\n * expressions and are compiled and executed within the current scope.\n *\n * Events that are handled via these handler are always configured not to propagate further.\n */\nvar ngEventDirectives = {};\n\n// For events that might fire synchronously during DOM manipulation\n// we need to execute their event handlers asynchronously using $evalAsync,\n// so that they are not executed in an inconsistent state.\nvar forceAsyncEvents = {\n 'blur': true,\n 'focus': true\n};\nforEach(\n 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),\n function(eventName) {\n var directiveName = directiveNormalize('ng-' + eventName);\n ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {\n return {\n restrict: 'A',\n compile: function($element, attr) {\n var fn = $parse(attr[directiveName]);\n return function ngEventHandler(scope, element) {\n element.on(eventName, function(event) {\n var callback = function() {\n fn(scope, {$event:event});\n };\n if (forceAsyncEvents[eventName] && $rootScope.$$phase) {\n scope.$evalAsync(callback);\n } else {\n scope.$apply(callback);\n }\n });\n };\n }\n };\n }];\n }\n);\n\n/**\n * @ngdoc directive\n * @name ngDblclick\n *\n * @description\n * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon\n * a dblclick. (The Event object is available as `$event`)\n *\n * @example\n \n \n \n Increment (on double click)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousedown\n *\n * @description\n * The ngMousedown directive allows you to specify custom behavior on mousedown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon\n * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (on mouse down)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseup\n *\n * @description\n * Specify custom behavior on mouseup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon\n * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (on mouse up)\n \n count: {{count}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngMouseover\n *\n * @description\n * Specify custom behavior on mouseover event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon\n * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse is over)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseenter\n *\n * @description\n * Specify custom behavior on mouseenter event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon\n * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse enters)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseleave\n *\n * @description\n * Specify custom behavior on mouseleave event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon\n * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse leaves)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousemove\n *\n * @description\n * Specify custom behavior on mousemove event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon\n * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse moves)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeydown\n *\n * @description\n * Specify custom behavior on keydown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon\n * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n \n key down count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeyup\n *\n * @description\n * Specify custom behavior on keyup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon\n * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n Typing in the input box below updates the key count\n key up count: {{count}}\n\n Typing in the input box below updates the keycode\n \n event keyCode: {{ event.keyCode }}\n event altKey: {{ event.altKey }}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeypress\n *\n * @description\n * Specify custom behavior on keypress event.\n *\n * @element ANY\n * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon\n * keypress. ({@link guide/expression#-event- Event object is available as `$event`}\n * and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n \n key press count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngSubmit\n *\n * @description\n * Enables binding angular expressions to onsubmit events.\n *\n * Additionally it prevents the default action (which for form means sending the request to the\n * server and reloading the current page), but only if the form does not contain `action`,\n * `data-action`, or `x-action` attributes.\n *\n * \n * **Warning:** Be careful not to cause \"double-submission\" by using both the `ngClick` and\n * `ngSubmit` handlers together. See the\n * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}\n * for a detailed discussion of when `ngSubmit` may be triggered.\n * \n *\n * @element form\n * @priority 0\n * @param {expression} ngSubmit {@link guide/expression Expression} to eval.\n * ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n \n Enter text and hit enter:\n \n \n list={{list}}\n \n \n \n it('should check ng-submit', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n expect(element(by.model('text')).getAttribute('value')).toBe('');\n });\n it('should ignore empty strings', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n });\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngFocus\n *\n * @description\n * Specify custom behavior on focus event.\n *\n * Note: As the `focus` event is executed synchronously when calling `input.focus()`\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon\n * focus. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngBlur\n *\n * @description\n * Specify custom behavior on blur event.\n *\n * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when\n * an element has lost focus.\n *\n * Note: As the `blur` event is executed synchronously also during DOM manipulations\n * (e.g. removing a focussed input),\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon\n * blur. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngCopy\n *\n * @description\n * Specify custom behavior on copy event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon\n * copy. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n copied: {{copied}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngCut\n *\n * @description\n * Specify custom behavior on cut event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon\n * cut. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n cut: {{cut}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngPaste\n *\n * @description\n * Specify custom behavior on paste event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon\n * paste. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n pasted: {{paste}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngIf\n * @restrict A\n *\n * @description\n * The `ngIf` directive removes or recreates a portion of the DOM tree based on an\n * {expression}. If the expression assigned to `ngIf` evaluates to a false\n * value then the element is removed from the DOM, otherwise a clone of the\n * element is reinserted into the DOM.\n *\n * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the\n * element in the DOM rather than changing its visibility via the `display` css property. A common\n * case when this difference is significant is when using css selectors that rely on an element's\n * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.\n *\n * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope\n * is created when the element is restored. The scope created within `ngIf` inherits from\n * its parent scope using\n * [prototypal inheritance](https://github.com/angular/angular.js/wiki/The-Nuances-of-Scope-Prototypal-Inheritance).\n * An important implication of this is if `ngModel` is used within `ngIf` to bind to\n * a javascript primitive defined in the parent scope. In this case any modifications made to the\n * variable within the child scope will override (hide) the value in the parent scope.\n *\n * Also, `ngIf` recreates elements using their compiled state. An example of this behavior\n * is if an element's class attribute is directly modified after it's compiled, using something like\n * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element\n * the added class will be lost because the original compiled state is used to regenerate the element.\n *\n * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`\n * and `leave` effects.\n *\n * @animations\n * enter - happens just after the ngIf contents change and a new DOM element is created and injected into the ngIf container\n * leave - happens just before the ngIf contents are removed from the DOM\n *\n * @element ANY\n * @scope\n * @priority 600\n * @param {expression} ngIf If the {@link guide/expression expression} is falsy then\n * the element is removed from the DOM tree. If it is truthy a copy of the compiled\n * element is added to the DOM tree.\n *\n * @example\n \n \n Click me: \n Show when checked:\n \n I'm removed when the checkbox is unchecked.\n \n \n \n .animate-if {\n background:white;\n border:1px solid black;\n padding:10px;\n }\n\n .animate-if.ng-enter, .animate-if.ng-leave {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .animate-if.ng-enter,\n .animate-if.ng-leave.ng-leave-active {\n opacity:0;\n }\n\n .animate-if.ng-leave,\n .animate-if.ng-enter.ng-enter-active {\n opacity:1;\n }\n \n \n */\nvar ngIfDirective = ['$animate', function($animate) {\n return {\n multiElement: true,\n transclude: 'element',\n priority: 600,\n terminal: true,\n restrict: 'A',\n $$tlb: true,\n link: function ($scope, $element, $attr, ctrl, $transclude) {\n var block, childScope, previousElements;\n $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {\n\n if (value) {\n if (!childScope) {\n $transclude(function (clone, newScope) {\n childScope = newScope;\n clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block = {\n clone: clone\n };\n $animate.enter(clone, $element.parent(), $element);\n });\n }\n } else {\n if(previousElements) {\n previousElements.remove();\n previousElements = null;\n }\n if(childScope) {\n childScope.$destroy();\n childScope = null;\n }\n if(block) {\n previousElements = getBlockNodes(block.clone);\n $animate.leave(previousElements).then(function() {\n previousElements = null;\n });\n block = null;\n }\n }\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngInclude\n * @restrict ECA\n *\n * @description\n * Fetches, compiles and includes an external HTML fragment.\n *\n * By default, the template URL is restricted to the same domain and protocol as the\n * application document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols\n * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or\n * [wrap them](ng.$sce#trustAsResourceUrl) as trusted values. Refer to Angular's {@link\n * ng.$sce Strict Contextual Escaping}.\n *\n * In addition, the browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy may further restrict whether the template is successfully loaded.\n * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`\n * access on some browsers.\n *\n * @animations\n * enter - animation is used to bring new content into the browser.\n * leave - animation is used to animate existing content away.\n *\n * The enter and leave animation occur concurrently.\n *\n * @scope\n * @priority 400\n *\n * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,\n * make sure you wrap it in **single** quotes, e.g. `src=\"'myPartialTemplate.html'\"`.\n * @param {string=} onload Expression to evaluate when a new partial is loaded.\n *\n * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll\n * $anchorScroll} to scroll the viewport after the content is loaded.\n *\n * - If the attribute is not set, disable scrolling.\n * - If the attribute is set without value, enable scrolling.\n * - Otherwise enable scrolling only if the expression evaluates to truthy value.\n *\n * @example\n \n \n \n \n (blank)\n \n url of the template: {{template.url}}\n \n \n \n \n \n \n \n angular.module('includeExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.templates =\n [ { name: 'template1.html', url: 'template1.html'},\n { name: 'template2.html', url: 'template2.html'} ];\n $scope.template = $scope.templates[0];\n }]);\n \n \n Content of template1.html\n \n \n Content of template2.html\n \n \n .slide-animate-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .slide-animate {\n padding:10px;\n }\n\n .slide-animate.ng-enter, .slide-animate.ng-leave {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n display:block;\n padding:10px;\n }\n\n .slide-animate.ng-enter {\n top:-50px;\n }\n .slide-animate.ng-enter.ng-enter-active {\n top:0;\n }\n\n .slide-animate.ng-leave {\n top:0;\n }\n .slide-animate.ng-leave.ng-leave-active {\n top:50px;\n }\n \n \n var templateSelect = element(by.model('template'));\n var includeElem = element(by.css('[ng-include]'));\n\n it('should load template1.html', function() {\n expect(includeElem.getText()).toMatch(/Content of template1.html/);\n });\n\n it('should load template2.html', function() {\n if (browser.params.browser == 'firefox') {\n // Firefox can't handle using selects\n // See https://github.com/angular/protractor/issues/480\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(2).click();\n expect(includeElem.getText()).toMatch(/Content of template2.html/);\n });\n\n it('should change to blank', function() {\n if (browser.params.browser == 'firefox') {\n // Firefox can't handle using selects\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(0).click();\n expect(includeElem.isPresent()).toBe(false);\n });\n \n \n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentRequested\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted every time the ngInclude content is requested.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentLoaded\n * @eventType emit on the current ngInclude scope\n * @description\n * Emitted every time the ngInclude content is reloaded.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentError\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted when a template HTTP request yields an erronous response (status < 200 || status > 299)\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\nvar ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', '$sce',\n function($templateRequest, $anchorScroll, $animate, $sce) {\n return {\n restrict: 'ECA',\n priority: 400,\n terminal: true,\n transclude: 'element',\n controller: angular.noop,\n compile: function(element, attr) {\n var srcExp = attr.ngInclude || attr.src,\n onloadExp = attr.onload || '',\n autoScrollExp = attr.autoscroll;\n\n return function(scope, $element, $attr, ctrl, $transclude) {\n var changeCounter = 0,\n currentScope,\n previousElement,\n currentElement;\n\n var cleanupLastIncludeContent = function() {\n if(previousElement) {\n previousElement.remove();\n previousElement = null;\n }\n if(currentScope) {\n currentScope.$destroy();\n currentScope = null;\n }\n if(currentElement) {\n $animate.leave(currentElement).then(function() {\n previousElement = null;\n });\n previousElement = currentElement;\n currentElement = null;\n }\n };\n\n scope.$watch($sce.parseAsResourceUrl(srcExp), function ngIncludeWatchAction(src) {\n var afterAnimation = function() {\n if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n $anchorScroll();\n }\n };\n var thisChangeId = ++changeCounter;\n\n if (src) {\n //set the 2nd param to true to ignore the template request error so that the inner\n //contents and scope can be cleaned up.\n $templateRequest(src, true).then(function(response) {\n if (thisChangeId !== changeCounter) return;\n var newScope = scope.$new();\n ctrl.template = response;\n\n // Note: This will also link all children of ng-include that were contained in the original\n // html. If that content contains controllers, ... they could pollute/change the scope.\n // However, using ng-include on an element with additional content does not make sense...\n // Note: We can't remove them in the cloneAttchFn of $transclude as that\n // function is called before linking the content, which would apply child\n // directives to non existing elements.\n var clone = $transclude(newScope, function(clone) {\n cleanupLastIncludeContent();\n $animate.enter(clone, null, $element).then(afterAnimation);\n });\n\n currentScope = newScope;\n currentElement = clone;\n\n currentScope.$emit('$includeContentLoaded', src);\n scope.$eval(onloadExp);\n }, function() {\n if (thisChangeId === changeCounter) {\n cleanupLastIncludeContent();\n scope.$emit('$includeContentError', src);\n }\n });\n scope.$emit('$includeContentRequested', src);\n } else {\n cleanupLastIncludeContent();\n ctrl.template = null;\n }\n });\n };\n }\n };\n}];\n\n// This directive is called during the $transclude call of the first `ngInclude` directive.\n// It will replace and compile the content of the element with the loaded template.\n// We need this directive so that the element content is already filled when\n// the link function of another directive on the same element as ngInclude\n// is called.\nvar ngIncludeFillContentDirective = ['$compile',\n function($compile) {\n return {\n restrict: 'ECA',\n priority: -400,\n require: 'ngInclude',\n link: function(scope, $element, $attr, ctrl) {\n if (/SVG/.test($element[0].toString())) {\n // WebKit: https://bugs.webkit.org/show_bug.cgi?id=135698 --- SVG elements do not\n // support innerHTML, so detect this here and try to generate the contents\n // specially.\n $element.empty();\n $compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,\n function namespaceAdaptedClone(clone) {\n $element.append(clone);\n }, undefined, undefined, $element);\n return;\n }\n\n $element.html(ctrl.template);\n $compile($element.contents())(scope);\n }\n };\n }];\n\n/**\n * @ngdoc directive\n * @name ngInit\n * @restrict AC\n *\n * @description\n * The `ngInit` directive allows you to evaluate an expression in the\n * current scope.\n *\n * \n * The only appropriate use of `ngInit` is for aliasing special properties of\n * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below. Besides this case, you\n * should use {@link guide/controller controllers} rather than `ngInit`\n * to initialize values on a scope.\n * \n * \n * **Note**: If you have assignment in `ngInit` along with {@link ng.$filter `$filter`}, make\n * sure you have parenthesis for correct precedence:\n * \n * \n * \n * \n *\n * @priority 450\n *\n * @element ANY\n * @param {expression} ngInit {@link guide/expression Expression} to eval.\n *\n * @example\n \n \n \n \n \n \n list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};\n \n \n \n \n \n it('should alias index positions', function() {\n var elements = element.all(by.css('.example-init'));\n expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');\n expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');\n expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');\n expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');\n });\n \n \n */\nvar ngInitDirective = ngDirective({\n priority: 450,\n compile: function() {\n return {\n pre: function(scope, element, attrs) {\n scope.$eval(attrs.ngInit);\n }\n };\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngNonBindable\n * @restrict AC\n * @priority 1000\n *\n * @description\n * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current\n * DOM element. This is useful if the element contains what appears to be Angular directives and\n * bindings but which should be ignored by Angular. This could be the case if you have a site that\n * displays snippets of code, for instance.\n *\n * @element ANY\n *\n * @example\n * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n * but the one wrapped in `ngNonBindable` is left alone.\n *\n * @example\n \n \n Normal: {{1 + 2}}\n Ignored: {{1 + 2}}\n \n \n it('should check ng-non-bindable', function() {\n expect(element(by.binding('1 + 2')).getText()).toContain('3');\n expect(element.all(by.css('div')).last().getText()).toMatch(/1 \\+ 2/);\n });\n \n \n */\nvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\n/**\n * @ngdoc directive\n * @name ngPluralize\n * @restrict EA\n *\n * @description\n * `ngPluralize` is a directive that displays messages according to en-US localization rules.\n * These rules are bundled with angular.js, but can be overridden\n * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive\n * by specifying the mappings between\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * and the strings to be displayed.\n *\n * # Plural categories and explicit number rules\n * There are two\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * in Angular's default en-US locale: \"one\" and \"other\".\n *\n * While a plural category may match many numbers (for example, in en-US locale, \"other\" can match\n * any number that is not 1), an explicit number rule can only match one number. For example, the\n * explicit number rule for \"3\" matches the number 3. There are examples of plural categories\n * and explicit number rules throughout the rest of this documentation.\n *\n * # Configuring ngPluralize\n * You configure ngPluralize by providing 2 attributes: `count` and `when`.\n * You can also provide an optional attribute, `offset`.\n *\n * The value of the `count` attribute can be either a string or an {@link guide/expression\n * Angular expression}; these are evaluated on the current scope for its bound value.\n *\n * The `when` attribute specifies the mappings between plural categories and the actual\n * string to be displayed. The value of the attribute should be a JSON object.\n *\n * The following example shows how to configure ngPluralize:\n *\n * ```html\n * \n * \n *```\n *\n * In the example, `\"0: Nobody is viewing.\"` is an explicit number rule. If you did not\n * specify this rule, 0 would be matched to the \"other\" category and \"0 people are viewing\"\n * would be shown instead of \"Nobody is viewing\". You can specify an explicit number rule for\n * other numbers, for example 12, so that instead of showing \"12 people are viewing\", you can\n * show \"a dozen people are viewing\".\n *\n * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted\n * into pluralized strings. In the previous example, Angular will replace `{}` with\n * `{{personCount}}`. The closed braces `{}` is a placeholder\n * for {{numberExpression}}.\n *\n * # Configuring ngPluralize with offset\n * The `offset` attribute allows further customization of pluralized text, which can result in\n * a better user experience. For example, instead of the message \"4 people are viewing this document\",\n * you might display \"John, Kate and 2 others are viewing this document\".\n * The offset attribute allows you to offset a number by any desired value.\n * Let's take a look at an example:\n *\n * ```html\n * \n * \n * ```\n *\n * Notice that we are still using two plural categories(one, other), but we added\n * three explicit number rules 0, 1 and 2.\n * When one person, perhaps John, views the document, \"John is viewing\" will be shown.\n * When three people view the document, no explicit number rule is found, so\n * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.\n * In this case, plural category 'one' is matched and \"John, Mary and one other person are viewing\"\n * is shown.\n *\n * Note that when you specify offsets, you must provide explicit number rules for\n * numbers from 0 up to and including the offset. If you use an offset of 3, for example,\n * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for\n * plural categories \"one\" and \"other\".\n *\n * @param {string|expression} count The variable to be bound to.\n * @param {string} when The mapping between plural category to its corresponding strings.\n * @param {number=} offset Offset to deduct from the total number.\n *\n * @example\n \n \n \n \n Person 1:\n Person 2:\n Number of People:\n\n \n Without Offset:\n \n \n\n \n With Offset(2):\n \n \n \n \n \n it('should show correct pluralized string', function() {\n var withoutOffset = element.all(by.css('ng-pluralize')).get(0);\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var countInput = element(by.model('personCount'));\n\n expect(withoutOffset.getText()).toEqual('1 person is viewing.');\n expect(withOffset.getText()).toEqual('Igor is viewing.');\n\n countInput.clear();\n countInput.sendKeys('0');\n\n expect(withoutOffset.getText()).toEqual('Nobody is viewing.');\n expect(withOffset.getText()).toEqual('Nobody is viewing.');\n\n countInput.clear();\n countInput.sendKeys('2');\n\n expect(withoutOffset.getText()).toEqual('2 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');\n\n countInput.clear();\n countInput.sendKeys('3');\n\n expect(withoutOffset.getText()).toEqual('3 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');\n\n countInput.clear();\n countInput.sendKeys('4');\n\n expect(withoutOffset.getText()).toEqual('4 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');\n });\n it('should show data-bound names', function() {\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var personCount = element(by.model('personCount'));\n var person1 = element(by.model('person1'));\n var person2 = element(by.model('person2'));\n personCount.clear();\n personCount.sendKeys('4');\n person1.clear();\n person1.sendKeys('Di');\n person2.clear();\n person2.sendKeys('Vojta');\n expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');\n });\n \n \n */\nvar ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interpolate) {\n var BRACE = /{}/g;\n return {\n restrict: 'EA',\n link: function(scope, element, attr) {\n var numberExp = attr.count,\n whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs\n offset = attr.offset || 0,\n whens = scope.$eval(whenExp) || {},\n whensExpFns = {},\n startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n isWhen = /^when(Minus)?(.+)$/;\n\n forEach(attr, function(expression, attributeName) {\n if (isWhen.test(attributeName)) {\n whens[lowercase(attributeName.replace('when', '').replace('Minus', '-'))] =\n element.attr(attr.$attr[attributeName]);\n }\n });\n forEach(whens, function(expression, key) {\n whensExpFns[key] =\n $interpolate(expression.replace(BRACE, startSymbol + numberExp + '-' +\n offset + endSymbol));\n });\n\n scope.$watch(function ngPluralizeWatch() {\n var value = parseFloat(scope.$eval(numberExp));\n\n if (!isNaN(value)) {\n //if explicit number rule such as 1, 2, 3... is defined, just use it. Otherwise,\n //check it against pluralization rules in $locale service\n if (!(value in whens)) value = $locale.pluralCat(value - offset);\n return whensExpFns[value](scope);\n } else {\n return '';\n }\n }, function ngPluralizeWatchAction(newVal) {\n element.text(newVal);\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngRepeat\n *\n * @description\n * The `ngRepeat` directive instantiates a template once per item from a collection. Each template\n * instance gets its own scope, where the given loop variable is set to the current collection item,\n * and `$index` is set to the item index or key.\n *\n * Special properties are exposed on the local scope of each template instance, including:\n *\n * | Variable | Type | Details |\n * |-----------|-----------------|-----------------------------------------------------------------------------|\n * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |\n * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |\n * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |\n * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |\n * | `$even` | {@type boolean} | true if the iterator position `$index` is even (otherwise false). |\n * | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |\n *\n * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.\n * This may be useful when, for instance, nesting ngRepeats.\n *\n * # Special repeat start and end points\n * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending\n * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.\n * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)\n * up to and including the ending HTML tag where **ng-repeat-end** is placed.\n *\n * The example below makes use of this feature:\n * ```html\n * \n * Header {{ item }}\n * \n * \n * Body {{ item }}\n * \n * \n * ```\n *\n * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:\n * ```html\n * \n * Header A\n * \n * \n * Body A\n * \n * \n * \n * Header B\n * \n * \n * Body B\n * \n * \n * ```\n *\n * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such\n * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).\n *\n * @animations\n * **.enter** - when a new item is added to the list or when an item is revealed after a filter\n *\n * **.leave** - when an item is removed from the list or when an item is filtered out\n *\n * **.move** - when an adjacent item is filtered out causing a reorder or when the item contents are reordered\n *\n * @element ANY\n * @scope\n * @priority 1000\n * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These\n * formats are currently supported:\n *\n * * `variable in expression` – where variable is the user defined loop variable and `expression`\n * is a scope expression giving the collection to enumerate.\n *\n * For example: `album in artist.albums`.\n *\n * * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,\n * and `expression` is the scope expression giving the collection to enumerate.\n *\n * For example: `(name, age) in {'adam':10, 'amalie':12}`.\n *\n * * `variable in expression track by tracking_expression` – You can also provide an optional tracking function\n * which can be used to associate the objects in the collection with the DOM elements. If no tracking function\n * is specified the ng-repeat associates elements by identity in the collection. It is an error to have\n * more than one tracking function to resolve to the same key. (This would mean that two distinct objects are\n * mapped to the same DOM element, which is not possible.) Filters should be applied to the expression,\n * before specifying a tracking expression.\n *\n * For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements\n * will be associated by item identity in the array.\n *\n * * `variable in expression as alias_expression` – You can also provide an optional alias expression which will then store the\n * intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message\n * when a filter is active on the repeater, but the filtered result set is empty.\n *\n * For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after\n * the items have been processed through the filter.\n *\n * For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique\n * `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements\n * with the corresponding item in the array by identity. Moving the same object in array would move the DOM\n * element in the same way in the DOM.\n *\n * For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this\n * case the object identity does not matter. Two objects are considered equivalent as long as their `id`\n * property is same.\n *\n * For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter\n * to items in conjunction with a tracking expression.\n *\n * @example\n * This example initializes the scope to a list of names and\n * then uses `ngRepeat` to display every person:\n \n \n \n I have {{friends.length}} friends. They are:\n \n \n \n [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.\n \n \n No results found...\n \n \n \n \n \n .example-animate-container {\n background:white;\n border:1px solid black;\n list-style:none;\n margin:0;\n padding:0 10px;\n }\n\n .animate-repeat {\n line-height:40px;\n list-style:none;\n box-sizing:border-box;\n }\n\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter,\n .animate-repeat.ng-leave {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n }\n\n .animate-repeat.ng-leave.ng-leave-active,\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter {\n opacity:0;\n max-height:0;\n }\n\n .animate-repeat.ng-leave,\n .animate-repeat.ng-move.ng-move-active,\n .animate-repeat.ng-enter.ng-enter-active {\n opacity:1;\n max-height:40px;\n }\n \n \n var friends = element.all(by.repeater('friend in friends'));\n\n it('should render initial data set', function() {\n expect(friends.count()).toBe(10);\n expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');\n expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');\n expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');\n expect(element(by.binding('friends.length')).getText())\n .toMatch(\"I have 10 friends. They are:\");\n });\n\n it('should update repeater when filter predicate changes', function() {\n expect(friends.count()).toBe(10);\n\n element(by.model('q')).sendKeys('ma');\n\n expect(friends.count()).toBe(2);\n expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');\n expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');\n });\n \n \n */\nvar ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {\n var NG_REMOVED = '$$NG_REMOVED';\n var ngRepeatMinErr = minErr('ngRepeat');\n\n var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {\n // TODO(perf): generate setters to shave off ~40ms or 1-1.5%\n scope[valueIdentifier] = value;\n if (keyIdentifier) scope[keyIdentifier] = key;\n scope.$index = index;\n scope.$first = (index === 0);\n scope.$last = (index === (arrayLength - 1));\n scope.$middle = !(scope.$first || scope.$last);\n // jshint bitwise: false\n scope.$odd = !(scope.$even = (index&1) === 0);\n // jshint bitwise: true\n };\n\n var getBlockStart = function(block) {\n return block.clone[0];\n };\n\n var getBlockEnd = function(block) {\n return block.clone[block.clone.length - 1];\n };\n\n\n return {\n restrict: 'A',\n multiElement: true,\n transclude: 'element',\n priority: 1000,\n terminal: true,\n $$tlb: true,\n compile: function ngRepeatCompile($element, $attr) {\n var expression = $attr.ngRepeat;\n var ngRepeatEndComment = document.createComment(' end ngRepeat: ' + expression + ' ');\n\n var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n\n if (!match) {\n throw ngRepeatMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n expression);\n }\n\n var lhs = match[1];\n var rhs = match[2];\n var aliasAs = match[3];\n var trackByExp = match[4];\n\n match = lhs.match(/^(?:([\\$\\w]+)|\\(([\\$\\w]+)\\s*,\\s*([\\$\\w]+)\\))$/);\n\n if (!match) {\n throw ngRepeatMinErr('iidexp', \"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.\",\n lhs);\n }\n var valueIdentifier = match[3] || match[1];\n var keyIdentifier = match[2];\n\n if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||\n /^(null|undefined|this|\\$index|\\$first|\\$middle|\\$last|\\$even|\\$odd|\\$parent)$/.test(aliasAs))) {\n throw ngRepeatMinErr('badident', \"alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.\",\n aliasAs);\n }\n\n var trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn;\n var hashFnLocals = {$id: hashKey};\n\n if (trackByExp) {\n trackByExpGetter = $parse(trackByExp);\n } else {\n trackByIdArrayFn = function (key, value) {\n return hashKey(value);\n };\n trackByIdObjFn = function (key) {\n return key;\n };\n }\n\n return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {\n\n if (trackByExpGetter) {\n trackByIdExpFn = function(key, value, index) {\n // assign key, value, and $index to the locals so that they can be used in hash functions\n if (keyIdentifier) hashFnLocals[keyIdentifier] = key;\n hashFnLocals[valueIdentifier] = value;\n hashFnLocals.$index = index;\n return trackByExpGetter($scope, hashFnLocals);\n };\n }\n\n // Store a list of elements from previous run. This is a hash where key is the item from the\n // iterator, and the value is objects with following properties.\n // - scope: bound scope\n // - element: previous element.\n // - index: position\n //\n // We are using no-proto object so that we don't need to guard against inherited props via\n // hasOwnProperty.\n var lastBlockMap = createMap();\n\n //watch props\n $scope.$watchCollection(rhs, function ngRepeatAction(collection) {\n var index, length,\n previousNode = $element[0], // node that cloned nodes should be inserted after\n // initialized to the comment node anchor\n nextNode,\n // Same as lastBlockMap but it has the current state. It will become the\n // lastBlockMap on the next iteration.\n nextBlockMap = createMap(),\n collectionLength,\n key, value, // key/value of iteration\n trackById,\n trackByIdFn,\n collectionKeys,\n block, // last object information {scope, element, id}\n nextBlockOrder,\n elementsToRemove;\n\n if (aliasAs) {\n $scope[aliasAs] = collection;\n }\n\n if (isArrayLike(collection)) {\n collectionKeys = collection;\n trackByIdFn = trackByIdExpFn || trackByIdArrayFn;\n } else {\n trackByIdFn = trackByIdExpFn || trackByIdObjFn;\n // if object, extract keys, sort them and use to determine order of iteration over obj props\n collectionKeys = [];\n for (var itemKey in collection) {\n if (collection.hasOwnProperty(itemKey) && itemKey.charAt(0) != '$') {\n collectionKeys.push(itemKey);\n }\n }\n collectionKeys.sort();\n }\n\n collectionLength = collectionKeys.length;\n nextBlockOrder = new Array(collectionLength);\n\n // locate existing items\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n trackById = trackByIdFn(key, value, index);\n if (lastBlockMap[trackById]) {\n // found previously seen block\n block = lastBlockMap[trackById];\n delete lastBlockMap[trackById];\n nextBlockMap[trackById] = block;\n nextBlockOrder[index] = block;\n } else if (nextBlockMap[trackById]) {\n // if collision detected. restore lastBlockMap and throw an error\n forEach(nextBlockOrder, function (block) {\n if (block && block.scope) lastBlockMap[block.id] = block;\n });\n throw ngRepeatMinErr('dupes',\n \"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}\",\n expression, trackById, toJson(value));\n } else {\n // new never before seen block\n nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};\n nextBlockMap[trackById] = true;\n }\n }\n\n // remove leftover items\n for (var blockKey in lastBlockMap) {\n block = lastBlockMap[blockKey];\n elementsToRemove = getBlockNodes(block.clone);\n $animate.leave(elementsToRemove);\n if (elementsToRemove[0].parentNode) {\n // if the element was not removed yet because of pending animation, mark it as deleted\n // so that we can ignore it later\n for (index = 0, length = elementsToRemove.length; index < length; index++) {\n elementsToRemove[index][NG_REMOVED] = true;\n }\n }\n block.scope.$destroy();\n }\n\n // we are not using forEach for perf reasons (trying to avoid #call)\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n block = nextBlockOrder[index];\n\n if (block.scope) {\n // if we have already seen this object, then we need to reuse the\n // associated scope/element\n\n nextNode = previousNode;\n\n // skip nodes that are already pending removal via leave animation\n do {\n nextNode = nextNode.nextSibling;\n } while (nextNode && nextNode[NG_REMOVED]);\n\n if (getBlockStart(block) != nextNode) {\n // existing item which got moved\n $animate.move(getBlockNodes(block.clone), null, jqLite(previousNode));\n }\n previousNode = getBlockEnd(block);\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n } else {\n // new item which we don't know about\n $transclude(function ngRepeatTransclude(clone, scope) {\n block.scope = scope;\n // http://jsperf.com/clone-vs-createcomment\n var endNode = ngRepeatEndComment.cloneNode(false);\n clone[clone.length++] = endNode;\n\n // TODO(perf): support naked previousNode in `enter` to avoid creation of jqLite wrapper?\n $animate.enter(clone, null, jqLite(previousNode));\n previousNode = endNode;\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block.clone = clone;\n nextBlockMap[block.id] = block;\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n });\n }\n }\n lastBlockMap = nextBlockMap;\n });\n };\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngShow\n *\n * @description\n * The `ngShow` directive shows or hides the given HTML element based on the expression\n * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding\n * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * \n * \n *\n * \n * \n * ```\n *\n * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When truthy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n * /* this is just another form of hiding an element */\n * display:block!important;\n * position:absolute;\n * top:-9999px;\n * left:-9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngShow`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass except that\n * you must also include the !important flag to override the display property\n * so that you can perform an animation when the element is hidden during the time of the animation.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * /* this is required as of 1.3x to properly\n * apply all styling in a show/hide animation */\n * transition:0s linear all;\n * }\n *\n * .my-element.ng-hide-add-active,\n * .my-element.ng-hide-remove-active {\n * /* the transition is defined in the active class */\n * transition:1s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * addClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a truthy value and the just before contents are set to visible\n * removeClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden\n *\n * @element ANY\n * @param {expression} ngShow If the {@link guide/expression expression} is truthy\n * then the element is shown or hidden respectively.\n *\n * @example\n \n \n Click me: \n \n Show:\n \n I show up when your checkbox is checked.\n \n \n \n Hide:\n \n I hide when your checkbox is checked.\n \n \n \n \n @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);\n \n \n .animate-show {\n line-height:20px;\n opacity:1;\n padding:10px;\n border:1px solid black;\n background:white;\n }\n\n .animate-show.ng-hide-add.ng-hide-add-active,\n .animate-show.ng-hide-remove.ng-hide-remove-active {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n }\n\n .animate-show.ng-hide {\n line-height:0;\n opacity:0;\n padding:0 10px;\n }\n\n .check-element {\n padding:10px;\n border:1px solid black;\n background:white;\n }\n \n \n var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n it('should check ng-show / ng-hide', function() {\n expect(thumbsUp.isDisplayed()).toBeFalsy();\n expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n element(by.model('checked')).click();\n\n expect(thumbsUp.isDisplayed()).toBeTruthy();\n expect(thumbsDown.isDisplayed()).toBeFalsy();\n });\n \n \n */\nvar ngShowDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngShow, function ngShowWatchAction(value){\n $animate[value ? 'removeClass' : 'addClass'](element, 'ng-hide');\n });\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngHide\n *\n * @description\n * The `ngHide` directive shows or hides the given HTML element based on the expression\n * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * \n * \n *\n * \n * \n * ```\n *\n * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When falsy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n * /* this is just another form of hiding an element */\n * display:block!important;\n * position:absolute;\n * top:-9999px;\n * left:-9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngHide`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`\n * CSS class is added and removed for you instead of your own CSS class.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * transition:0.5s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * removeClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden\n * addClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a non truthy value and just before the contents are set to visible\n *\n * @element ANY\n * @param {expression} ngHide If the {@link guide/expression expression} is truthy then\n * the element is shown or hidden respectively.\n *\n * @example\n \n \n Click me: \n \n Show:\n \n I show up when your checkbox is checked.\n \n \n \n Hide:\n \n I hide when your checkbox is checked.\n \n \n \n \n @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);\n \n \n .animate-hide {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n line-height:20px;\n opacity:1;\n padding:10px;\n border:1px solid black;\n background:white;\n }\n\n .animate-hide.ng-hide {\n line-height:0;\n opacity:0;\n padding:0 10px;\n }\n\n .check-element {\n padding:10px;\n border:1px solid black;\n background:white;\n }\n \n \n var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n it('should check ng-show / ng-hide', function() {\n expect(thumbsUp.isDisplayed()).toBeFalsy();\n expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n element(by.model('checked')).click();\n\n expect(thumbsUp.isDisplayed()).toBeTruthy();\n expect(thumbsDown.isDisplayed()).toBeFalsy();\n });\n \n \n */\nvar ngHideDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngHide, function ngHideWatchAction(value){\n $animate[value ? 'addClass' : 'removeClass'](element, 'ng-hide');\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngStyle\n * @restrict AC\n *\n * @description\n * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.\n *\n * @element ANY\n * @param {expression} ngStyle\n *\n * {@link guide/expression Expression} which evals to an\n * object whose keys are CSS style names and values are corresponding values for those CSS\n * keys.\n *\n * Since some CSS style names are not valid keys for an object, they must be quoted.\n * See the 'background-color' style in the example below.\n *\n * @example\n \n \n \n \n \n \n Sample Text\n myStyle={{myStyle}}\n \n \n span {\n color: black;\n }\n \n \n var colorSpan = element(by.css('span'));\n\n it('should check ng-style', function() {\n expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n element(by.css('input[value=\\'set color\\']')).click();\n expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');\n element(by.css('input[value=clear]')).click();\n expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n });\n \n \n */\nvar ngStyleDirective = ngDirective(function(scope, element, attr) {\n scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {\n if (oldStyles && (newStyles !== oldStyles)) {\n forEach(oldStyles, function(val, style) { element.css(style, '');});\n }\n if (newStyles) element.css(newStyles);\n }, true);\n});\n\n/**\n * @ngdoc directive\n * @name ngSwitch\n * @restrict EA\n *\n * @description\n * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.\n * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location\n * as specified in the template.\n *\n * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it\n * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element\n * matches the value obtained from the evaluated expression. In other words, you define a container element\n * (where you place the directive), place an expression on the **`on=\"...\"` attribute**\n * (or the **`ng-switch=\"...\"` attribute**), define any inner elements inside of the directive and place\n * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on\n * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default\n * attribute is displayed.\n *\n * \n * Be aware that the attribute values to match against cannot be expressions. They are interpreted\n * as literal string values to match against.\n * For example, **`ng-switch-when=\"someVal\"`** will match against the string `\"someVal\"` not against the\n * value of the expression `$scope.someVal`.\n * \n\n * @animations\n * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container\n * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM\n *\n * @usage\n *\n * ```\n * \n * ...\n * ...\n * ...\n * \n * ```\n *\n *\n * @scope\n * @priority 1200\n * @param {*} ngSwitch|on expression to match against ng-switch-when.\n * On child elements add:\n *\n * * `ngSwitchWhen`: the case statement to match against. If match then this\n * case will be displayed. If the same match appears multiple times, all the\n * elements will be displayed.\n * * `ngSwitchDefault`: the default case when no other case match. If there\n * are multiple default cases, all of them will be displayed when no other\n * case match.\n *\n *\n * @example\n \n \n \n \n \n selection={{selection}}\n \n \n Settings Div\n Home Span\n default\n \n \n \n \n angular.module('switchExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.items = ['settings', 'home', 'other'];\n $scope.selection = $scope.items[0];\n }]);\n \n \n .animate-switch-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .animate-switch {\n padding:10px;\n }\n\n .animate-switch.ng-animate {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n }\n\n .animate-switch.ng-leave.ng-leave-active,\n .animate-switch.ng-enter {\n top:-50px;\n }\n .animate-switch.ng-leave,\n .animate-switch.ng-enter.ng-enter-active {\n top:0;\n }\n \n \n var switchElem = element(by.css('[ng-switch]'));\n var select = element(by.model('selection'));\n\n it('should start in settings', function() {\n expect(switchElem.getText()).toMatch(/Settings Div/);\n });\n it('should change to home', function() {\n select.all(by.css('option')).get(1).click();\n expect(switchElem.getText()).toMatch(/Home Span/);\n });\n it('should select default', function() {\n select.all(by.css('option')).get(2).click();\n expect(switchElem.getText()).toMatch(/default/);\n });\n \n \n */\nvar ngSwitchDirective = ['$animate', function($animate) {\n return {\n restrict: 'EA',\n require: 'ngSwitch',\n\n // asks for $scope to fool the BC controller module\n controller: ['$scope', function ngSwitchController() {\n this.cases = {};\n }],\n link: function(scope, element, attr, ngSwitchController) {\n var watchExpr = attr.ngSwitch || attr.on,\n selectedTranscludes = [],\n selectedElements = [],\n previousLeaveAnimations = [],\n selectedScopes = [];\n\n var spliceFactory = function(array, index) {\n return function() { array.splice(index, 1); };\n };\n\n scope.$watch(watchExpr, function ngSwitchWatchAction(value) {\n var i, ii;\n for (i = 0, ii = previousLeaveAnimations.length; i < ii; ++i) {\n $animate.cancel(previousLeaveAnimations[i]);\n }\n previousLeaveAnimations.length = 0;\n\n for (i = 0, ii = selectedScopes.length; i < ii; ++i) {\n var selected = getBlockNodes(selectedElements[i].clone);\n selectedScopes[i].$destroy();\n var promise = previousLeaveAnimations[i] = $animate.leave(selected);\n promise.then(spliceFactory(previousLeaveAnimations, i));\n }\n\n selectedElements.length = 0;\n selectedScopes.length = 0;\n\n if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {\n forEach(selectedTranscludes, function(selectedTransclude) {\n selectedTransclude.transclude(function(caseElement, selectedScope) {\n selectedScopes.push(selectedScope);\n var anchor = selectedTransclude.element;\n caseElement[caseElement.length++] = document.createComment(' end ngSwitchWhen: ');\n var block = { clone: caseElement };\n\n selectedElements.push(block);\n $animate.enter(caseElement, anchor.parent(), anchor);\n });\n });\n }\n });\n }\n };\n}];\n\nvar ngSwitchWhenDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attrs, ctrl, $transclude) {\n ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);\n ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });\n }\n});\n\nvar ngSwitchDefaultDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attr, ctrl, $transclude) {\n ctrl.cases['?'] = (ctrl.cases['?'] || []);\n ctrl.cases['?'].push({ transclude: $transclude, element: element });\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngTransclude\n * @restrict EAC\n *\n * @description\n * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n *\n * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.\n *\n * @element ANY\n *\n * @example\n \n \n \n \n \n \n {{text}}\n \n \n \n it('should have transcluded', function() {\n var titleElement = element(by.model('title'));\n titleElement.clear();\n titleElement.sendKeys('TITLE');\n var textElement = element(by.model('text'));\n textElement.clear();\n textElement.sendKeys('TEXT');\n expect(element(by.binding('title')).getText()).toEqual('TITLE');\n expect(element(by.binding('text')).getText()).toEqual('TEXT');\n });\n \n \n *\n */\nvar ngTranscludeDirective = ngDirective({\n restrict: 'EAC',\n link: function($scope, $element, $attrs, controller, $transclude) {\n if (!$transclude) {\n throw minErr('ngTransclude')('orphan',\n 'Illegal use of ngTransclude directive in the template! ' +\n 'No parent directive that requires a transclusion found. ' +\n 'Element: {0}',\n startingTag($element));\n }\n\n $transclude(function(clone) {\n $element.empty();\n $element.append(clone);\n });\n }\n});\n\n/**\n * @ngdoc directive\n * @name script\n * @restrict E\n *\n * @description\n * Load the content of a `\n\n Load inlined template\n \n \n \n it('should load template defined inside script tag', function() {\n element(by.css('#tpl-link')).click();\n expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);\n });\n \n \n */\nvar scriptDirective = ['$templateCache', function($templateCache) {\n return {\n restrict: 'E',\n terminal: true,\n compile: function(element, attr) {\n if (attr.type == 'text/ng-template') {\n var templateUrl = attr.id,\n // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent\n text = element[0].text;\n\n $templateCache.put(templateUrl, text);\n }\n }\n };\n}];\n\nvar ngOptionsMinErr = minErr('ngOptions');\n/**\n * @ngdoc directive\n * @name select\n * @restrict E\n *\n * @description\n * HTML `SELECT` element with angular data-binding.\n *\n * # `ngOptions`\n *\n * The `ngOptions` attribute can be used to dynamically generate a list of ``\n * elements for the `` element using the array or object obtained by evaluating the\n * `ngOptions` comprehension_expression.\n *\n * When an item in the `` menu is selected, the array element or object property\n * represented by the selected option will be bound to the model identified by the `ngModel`\n * directive.\n *\n * \n * **Note:** `ngModel` compares by reference, not value. This is important when binding to an\n * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/).\n * \n *\n * Optionally, a single hard-coded `` element, with the value set to an empty string, can\n * be nested into the `` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * \n * **Note:** `ngOptions` provides an iterator facility for the `` element which should be used instead\n * of {@link ng.directive:ngRepeat ngRepeat} when you want the\n * `select` model to be bound to a non-string value. This is because an option element can only\n * be bound to string values at present.\n * \n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required The control is considered valid only if value is entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {comprehension_expression=} ngOptions in one of the following forms:\n *\n * * for array data sources:\n * * `label` **`for`** `value` **`in`** `array`\n * * `select` **`as`** `label` **`for`** `value` **`in`** `array`\n * * `label` **`group by`** `group` **`for`** `value` **`in`** `array`\n * * `select` **`as`** `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n * * for object data sources:\n * * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n * * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`group by`** `group`\n * **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n *\n * Where:\n *\n * * `array` / `object`: an expression which evaluates to an array / object to iterate over.\n * * `value`: local variable which will refer to each item in the `array` or each property value\n * of `object` during iteration.\n * * `key`: local variable which will refer to a property name in `object` during iteration.\n * * `label`: The result of this expression will be the label for `` element. The\n * `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).\n * * `select`: The result of this expression will be bound to the model of the parent ``\n * element. If not specified, `select` expression will default to `value`.\n * * `group`: The result of this expression will be used to group options using the ``\n * DOM element.\n * * `trackexpr`: Used when working with an array of objects. The result of this expression will be\n * used to identify the objects in the array. The `trackexpr` will most likely refer to the\n * `value` variable (e.g. `value.propertyName`).\n *\n * @example\n \n \n \n \n \n \n Name: \n [X]\n \n \n [add]\n \n \n \n Color (null not allowed):\n \n\n Color (null allowed):\n \n \n -- choose color --\n \n \n\n Color grouped by shade:\n \n \n\n\n Select bogus.\n \n Currently selected: {{ {selected_color:myColor} }}\n \n \n \n \n \n it('should check ng-options', function() {\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');\n element.all(by.model('myColor')).first().click();\n element.all(by.css('select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');\n element(by.css('.nullable select[ng-model=\"myColor\"]')).click();\n element.all(by.css('.nullable select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');\n });\n \n \n */\n\nvar ngOptionsDirective = valueFn({\n restrict: 'A',\n terminal: true\n});\n\n// jshint maxlen: false\nvar selectDirective = ['$compile', '$parse', function($compile, $parse) {\n //000011111111110000000000022222222220000000000000000000003333333333000000000000004444444444444440000000005555555555555550000000666666666666666000000000000000777777777700000000000000000008888888888\n var NG_OPTIONS_REGEXP = /^\\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]+?))?$/,\n nullModelCtrl = {$setViewValue: noop};\n// jshint maxlen: 100\n\n return {\n restrict: 'E',\n require: ['select', '?ngModel'],\n controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {\n var self = this,\n optionsMap = {},\n ngModelCtrl = nullModelCtrl,\n nullOption,\n unknownOption;\n\n\n self.databound = $attrs.ngModel;\n\n\n self.init = function(ngModelCtrl_, nullOption_, unknownOption_) {\n ngModelCtrl = ngModelCtrl_;\n nullOption = nullOption_;\n unknownOption = unknownOption_;\n };\n\n\n self.addOption = function(value, element) {\n assertNotHasOwnProperty(value, '\"option value\"');\n optionsMap[value] = true;\n\n if (ngModelCtrl.$viewValue == value) {\n $element.val(value);\n if (unknownOption.parent()) unknownOption.remove();\n }\n // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459\n // Adding an element to a should\n // automatically select the new element\n if (element[0].hasAttribute('selected')) {\n element[0].selected = true;\n }\n };\n\n\n self.removeOption = function(value) {\n if (this.hasOption(value)) {\n delete optionsMap[value];\n if (ngModelCtrl.$viewValue == value) {\n this.renderUnknownOption(value);\n }\n }\n };\n\n\n self.renderUnknownOption = function(val) {\n var unknownVal = '? ' + hashKey(val) + ' ?';\n unknownOption.val(unknownVal);\n $element.prepend(unknownOption);\n $element.val(unknownVal);\n unknownOption.prop('selected', true); // needed for IE\n };\n\n\n self.hasOption = function(value) {\n return optionsMap.hasOwnProperty(value);\n };\n\n $scope.$on('$destroy', function() {\n // disable unknown option so that we don't do work when the whole select is being destroyed\n self.renderUnknownOption = noop;\n });\n }],\n\n link: function(scope, element, attr, ctrls) {\n // if ngModel is not defined, we don't need to do anything\n if (!ctrls[1]) return;\n\n var selectCtrl = ctrls[0],\n ngModelCtrl = ctrls[1],\n multiple = attr.multiple,\n optionsExp = attr.ngOptions,\n nullOption = false, // if false, user will not be able to select it (used by ngOptions)\n emptyOption,\n renderScheduled = false,\n // we can't just jqLite('') since jqLite is not smart enough\n // to create it in and IE barfs otherwise.\n optionTemplate = jqLite(document.createElement('option')),\n optGroupTemplate =jqLite(document.createElement('optgroup')),\n unknownOption = optionTemplate.clone();\n\n // find \"null\" option\n for(var i = 0, children = element.children(), ii = children.length; i < ii; i++) {\n if (children[i].value === '') {\n emptyOption = nullOption = children.eq(i);\n break;\n }\n }\n\n selectCtrl.init(ngModelCtrl, nullOption, unknownOption);\n\n // required validator\n if (multiple) {\n ngModelCtrl.$isEmpty = function(value) {\n return !value || value.length === 0;\n };\n }\n\n if (optionsExp) setupAsOptions(scope, element, ngModelCtrl);\n else if (multiple) setupAsMultiple(scope, element, ngModelCtrl);\n else setupAsSingle(scope, element, ngModelCtrl, selectCtrl);\n\n\n ////////////////////////////\n\n\n\n function setupAsSingle(scope, selectElement, ngModelCtrl, selectCtrl) {\n ngModelCtrl.$render = function() {\n var viewValue = ngModelCtrl.$viewValue;\n\n if (selectCtrl.hasOption(viewValue)) {\n if (unknownOption.parent()) unknownOption.remove();\n selectElement.val(viewValue);\n if (viewValue === '') emptyOption.prop('selected', true); // to make IE9 happy\n } else {\n if (isUndefined(viewValue) && emptyOption) {\n selectElement.val('');\n } else {\n selectCtrl.renderUnknownOption(viewValue);\n }\n }\n };\n\n selectElement.on('change', function() {\n scope.$apply(function() {\n if (unknownOption.parent()) unknownOption.remove();\n ngModelCtrl.$setViewValue(selectElement.val());\n });\n });\n }\n\n function setupAsMultiple(scope, selectElement, ctrl) {\n var lastView;\n ctrl.$render = function() {\n var items = new HashMap(ctrl.$viewValue);\n forEach(selectElement.find('option'), function(option) {\n option.selected = isDefined(items.get(option.value));\n });\n };\n\n // we have to do it on each watch since ngModel watches reference, but\n // we need to work of an array, so we need to see if anything was inserted/removed\n scope.$watch(function selectMultipleWatch() {\n if (!equals(lastView, ctrl.$viewValue)) {\n lastView = shallowCopy(ctrl.$viewValue);\n ctrl.$render();\n }\n });\n\n selectElement.on('change', function() {\n scope.$apply(function() {\n var array = [];\n forEach(selectElement.find('option'), function(option) {\n if (option.selected) {\n array.push(option.value);\n }\n });\n ctrl.$setViewValue(array);\n });\n });\n }\n\n function setupAsOptions(scope, selectElement, ctrl) {\n var match;\n\n if (!(match = optionsExp.match(NG_OPTIONS_REGEXP))) {\n throw ngOptionsMinErr('iexp',\n \"Expected expression in form of \" +\n \"'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'\" +\n \" but got '{0}'. Element: {1}\",\n optionsExp, startingTag(selectElement));\n }\n\n var displayFn = $parse(match[2] || match[1]),\n valueName = match[4] || match[6],\n keyName = match[5],\n groupByFn = $parse(match[3] || ''),\n valueFn = $parse(match[2] ? match[1] : valueName),\n valuesFn = $parse(match[7]),\n track = match[8],\n trackFn = track ? $parse(match[8]) : null,\n // This is an array of array of existing option groups in DOM.\n // We try to reuse these if possible\n // - optionGroupsCache[0] is the options with no option group\n // - optionGroupsCache[?][0] is the parent: either the SELECT or OPTGROUP element\n optionGroupsCache = [[{element: selectElement, label:''}]];\n\n if (nullOption) {\n // compile the element since there might be bindings in it\n $compile(nullOption)(scope);\n\n // remove the class, which is added automatically because we recompile the element and it\n // becomes the compilation root\n nullOption.removeClass('ng-scope');\n\n // we need to remove it before calling selectElement.empty() because otherwise IE will\n // remove the label from the element. wtf?\n nullOption.remove();\n }\n\n // clear contents, we'll add what's needed based on the model\n selectElement.empty();\n\n selectElement.on('change', function() {\n scope.$apply(function() {\n var optionGroup,\n collection = valuesFn(scope) || [],\n locals = {},\n key, value, optionElement, index, groupIndex, length, groupLength, trackIndex;\n\n if (multiple) {\n value = [];\n for (groupIndex = 0, groupLength = optionGroupsCache.length;\n groupIndex < groupLength;\n groupIndex++) {\n // list of options for that group. (first item has the parent)\n optionGroup = optionGroupsCache[groupIndex];\n\n for(index = 1, length = optionGroup.length; index < length; index++) {\n if ((optionElement = optionGroup[index].element)[0].selected) {\n key = optionElement.val();\n if (keyName) locals[keyName] = key;\n if (trackFn) {\n for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n locals[valueName] = collection[trackIndex];\n if (trackFn(scope, locals) == key) break;\n }\n } else {\n locals[valueName] = collection[key];\n }\n value.push(valueFn(scope, locals));\n }\n }\n }\n } else {\n key = selectElement.val();\n if (key == '?') {\n value = undefined;\n } else if (key === ''){\n value = null;\n } else {\n if (trackFn) {\n for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n locals[valueName] = collection[trackIndex];\n if (trackFn(scope, locals) == key) {\n value = valueFn(scope, locals);\n break;\n }\n }\n } else {\n locals[valueName] = collection[key];\n if (keyName) locals[keyName] = key;\n value = valueFn(scope, locals);\n }\n }\n }\n ctrl.$setViewValue(value);\n render();\n });\n });\n\n ctrl.$render = render;\n\n scope.$watchCollection(valuesFn, scheduleRendering);\n scope.$watchCollection(function () {\n var locals = {},\n values = valuesFn(scope);\n if (values) {\n var toDisplay = new Array(values.length);\n for (var i = 0, ii = values.length; i < ii; i++) {\n locals[valueName] = values[i];\n toDisplay[i] = displayFn(scope, locals);\n }\n return toDisplay;\n }\n }, scheduleRendering);\n\n if (multiple) {\n scope.$watchCollection(function() { return ctrl.$modelValue; }, scheduleRendering);\n }\n\n\n function getSelectedSet() {\n var selectedSet = false;\n if (multiple) {\n var modelValue = ctrl.$modelValue;\n if (trackFn && isArray(modelValue)) {\n selectedSet = new HashMap([]);\n var locals = {};\n for (var trackIndex = 0; trackIndex < modelValue.length; trackIndex++) {\n locals[valueName] = modelValue[trackIndex];\n selectedSet.put(trackFn(scope, locals), modelValue[trackIndex]);\n }\n } else {\n selectedSet = new HashMap(modelValue);\n }\n }\n return selectedSet;\n }\n\n\n function scheduleRendering() {\n if (!renderScheduled) {\n scope.$$postDigest(render);\n renderScheduled = true;\n }\n }\n\n\n function render() {\n renderScheduled = false;\n\n // Temporary location for the option groups before we render them\n var optionGroups = {'':[]},\n optionGroupNames = [''],\n optionGroupName,\n optionGroup,\n option,\n existingParent, existingOptions, existingOption,\n modelValue = ctrl.$modelValue,\n values = valuesFn(scope) || [],\n keys = keyName ? sortedKeys(values) : values,\n key,\n groupLength, length,\n groupIndex, index,\n locals = {},\n selected,\n selectedSet = getSelectedSet(),\n lastElement,\n element,\n label;\n\n\n // We now build up the list of options we need (we merge later)\n for (index = 0; length = keys.length, index < length; index++) {\n\n key = index;\n if (keyName) {\n key = keys[index];\n if ( key.charAt(0) === '$' ) continue;\n locals[keyName] = key;\n }\n\n locals[valueName] = values[key];\n\n optionGroupName = groupByFn(scope, locals) || '';\n if (!(optionGroup = optionGroups[optionGroupName])) {\n optionGroup = optionGroups[optionGroupName] = [];\n optionGroupNames.push(optionGroupName);\n }\n if (multiple) {\n selected = isDefined(\n selectedSet.remove(trackFn ? trackFn(scope, locals) : valueFn(scope, locals))\n );\n } else {\n if (trackFn) {\n var modelCast = {};\n modelCast[valueName] = modelValue;\n selected = trackFn(scope, modelCast) === trackFn(scope, locals);\n } else {\n selected = modelValue === valueFn(scope, locals);\n }\n selectedSet = selectedSet || selected; // see if at least one item is selected\n }\n label = displayFn(scope, locals); // what will be seen by the user\n\n // doing displayFn(scope, locals) || '' overwrites zero values\n label = isDefined(label) ? label : '';\n optionGroup.push({\n // either the index into array or key from object\n id: trackFn ? trackFn(scope, locals) : (keyName ? keys[index] : index),\n label: label,\n selected: selected // determine if we should be selected\n });\n }\n if (!multiple) {\n if (nullOption || modelValue === null) {\n // insert null option if we have a placeholder, or the model is null\n optionGroups[''].unshift({id:'', label:'', selected:!selectedSet});\n } else if (!selectedSet) {\n // option could not be found, we have to insert the undefined item\n optionGroups[''].unshift({id:'?', label:'', selected:true});\n }\n }\n\n // Now we need to update the list of DOM nodes to match the optionGroups we computed above\n for (groupIndex = 0, groupLength = optionGroupNames.length;\n groupIndex < groupLength;\n groupIndex++) {\n // current option group name or '' if no group\n optionGroupName = optionGroupNames[groupIndex];\n\n // list of options for that group. (first item has the parent)\n optionGroup = optionGroups[optionGroupName];\n\n if (optionGroupsCache.length <= groupIndex) {\n // we need to grow the optionGroups\n existingParent = {\n element: optGroupTemplate.clone().attr('label', optionGroupName),\n label: optionGroup.label\n };\n existingOptions = [existingParent];\n optionGroupsCache.push(existingOptions);\n selectElement.append(existingParent.element);\n } else {\n existingOptions = optionGroupsCache[groupIndex];\n existingParent = existingOptions[0]; // either SELECT (no group) or OPTGROUP element\n\n // update the OPTGROUP label if not the same.\n if (existingParent.label != optionGroupName) {\n existingParent.element.attr('label', existingParent.label = optionGroupName);\n }\n }\n\n lastElement = null; // start at the beginning\n for(index = 0, length = optionGroup.length; index < length; index++) {\n option = optionGroup[index];\n if ((existingOption = existingOptions[index+1])) {\n // reuse elements\n lastElement = existingOption.element;\n if (existingOption.label !== option.label) {\n lastElement.text(existingOption.label = option.label);\n }\n if (existingOption.id !== option.id) {\n lastElement.val(existingOption.id = option.id);\n }\n // lastElement.prop('selected') provided by jQuery has side-effects\n if (lastElement[0].selected !== option.selected) {\n lastElement.prop('selected', (existingOption.selected = option.selected));\n if (msie) {\n // See #7692\n // The selected item wouldn't visually update on IE without this.\n // Tested on Win7: IE9, IE10 and IE11. Future IEs should be tested as well\n lastElement.prop('selected', existingOption.selected);\n }\n }\n } else {\n // grow elements\n\n // if it's a null option\n if (option.id === '' && nullOption) {\n // put back the pre-compiled element\n element = nullOption;\n } else {\n // jQuery(v1.4.2) Bug: We should be able to chain the method calls, but\n // in this version of jQuery on some browser the .text() returns a string\n // rather then the element.\n (element = optionTemplate.clone())\n .val(option.id)\n .prop('selected', option.selected)\n .attr('selected', option.selected)\n .text(option.label);\n }\n\n existingOptions.push(existingOption = {\n element: element,\n label: option.label,\n id: option.id,\n selected: option.selected\n });\n if (lastElement) {\n lastElement.after(element);\n } else {\n existingParent.element.append(element);\n }\n lastElement = element;\n }\n }\n // remove any excessive OPTIONs in a group\n index++; // increment since the existingOptions[0] is parent element not OPTION\n while(existingOptions.length > index) {\n existingOptions.pop().element.remove();\n }\n }\n // remove any excessive OPTGROUPs from select\n while(optionGroupsCache.length > groupIndex) {\n optionGroupsCache.pop()[0].element.remove();\n }\n }\n }\n }\n };\n}];\n\nvar optionDirective = ['$interpolate', function($interpolate) {\n var nullSelectCtrl = {\n addOption: noop,\n removeOption: noop\n };\n\n return {\n restrict: 'E',\n priority: 100,\n compile: function(element, attr) {\n if (isUndefined(attr.value)) {\n var interpolateFn = $interpolate(element.text(), true);\n if (!interpolateFn) {\n attr.$set('value', element.text());\n }\n }\n\n return function (scope, element, attr) {\n var selectCtrlName = '$selectController',\n parent = element.parent(),\n selectCtrl = parent.data(selectCtrlName) ||\n parent.parent().data(selectCtrlName); // in case we are in optgroup\n\n if (selectCtrl && selectCtrl.databound) {\n // For some reason Opera defaults to true and if not overridden this messes up the repeater.\n // We don't want the view to drive the initialization of the model anyway.\n element.prop('selected', false);\n } else {\n selectCtrl = nullSelectCtrl;\n }\n\n if (interpolateFn) {\n scope.$watch(interpolateFn, function interpolateWatchAction(newVal, oldVal) {\n attr.$set('value', newVal);\n if (oldVal !== newVal) {\n selectCtrl.removeOption(oldVal);\n }\n selectCtrl.addOption(newVal, element);\n });\n } else {\n selectCtrl.addOption(attr.value, element);\n }\n\n element.on('$destroy', function() {\n selectCtrl.removeOption(attr.value);\n });\n };\n }\n };\n}];\n\nvar styleDirective = valueFn({\n restrict: 'E',\n terminal: false\n});\n\n if (window.angular.bootstrap) {\n //AngularJS is already loaded, so we can return here...\n console.log('WARNING: Tried to load angular more than once.');\n return;\n }\n\n //try to bind to jquery now so that one can write jqLite(document).ready()\n //but we will rebind on bootstrap again.\n bindJQuery();\n\n publishExternalAPI(angular);\n\n jqLite(document).ready(function() {\n angularInit(document, bootstrap);\n });\n\n})(window, document);\n\n!window.angular.$$csp() && window.angular.element(document).find('head').prepend('');","/**\n * @license AngularJS v1.3.0-rc.3\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/* jshint maxlen: false */\n\n/**\n * @ngdoc module\n * @name ngAnimate\n * @description\n *\n * The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives.\n *\n * \n *\n * # Usage\n *\n * To see animations in action, all that is required is to define the appropriate CSS classes\n * or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are:\n * `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation\n * by using the `$animate` service.\n *\n * Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives:\n *\n * | Directive | Supported Animations |\n * |-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|\n * | {@link ng.directive:ngRepeat#usage_animations ngRepeat} | enter, leave and move |\n * | {@link ngRoute.directive:ngView#usage_animations ngView} | enter and leave |\n * | {@link ng.directive:ngInclude#usage_animations ngInclude} | enter and leave |\n * | {@link ng.directive:ngSwitch#usage_animations ngSwitch} | enter and leave |\n * | {@link ng.directive:ngIf#usage_animations ngIf} | enter and leave |\n * | {@link ng.directive:ngClass#usage_animations ngClass} | add and remove (the CSS class(es) present) |\n * | {@link ng.directive:ngShow#usage_animations ngShow} & {@link ng.directive:ngHide#usage_animations ngHide} | add and remove (the ng-hide class value) |\n * | {@link ng.directive:form#usage_animations form} & {@link ng.directive:ngModel#usage_animations ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) |\n * | {@link ngMessages.directive:ngMessage#usage_animations ngMessages} | add and remove (ng-active & ng-inactive) |\n * | {@link ngMessages.directive:ngMessage#usage_animations ngMessage} | enter and leave |\n *\n * You can find out more information about animations upon visiting each directive page.\n *\n * Below is an example of how to apply animations to a directive that supports animation hooks:\n *\n * ```html\n * \n *\n * \n * \n * ```\n *\n * Keep in mind that, by default, if an animation is running, any child elements cannot be animated\n * until the parent element's animation has completed. This blocking feature can be overridden by\n * placing the `ng-animate-children` attribute on a parent container tag.\n *\n * ```html\n * \n * \n * \n * ...\n * \n * \n * \n * ```\n *\n * When the `on` expression value changes and an animation is triggered then each of the elements within\n * will all animate without the block being applied to child elements.\n *\n * ## Are animations run when the application starts?\n * No they are not. When an application is bootstrapped Angular will disable animations from running to avoid\n * a frenzy of animations from being triggered as soon as the browser has rendered the screen. For this to work,\n * Angular will wait for two digest cycles until enabling animations. From there on, any animation-triggering\n * layout changes in the application will trigger animations as normal.\n *\n * In addition, upon bootstrap, if the routing system or any directives or load remote data (via $http) then Angular\n * will automatically extend the wait time to enable animations once **all** of the outbound HTTP requests\n * are complete.\n *\n * CSS-defined Animations\n * The animate service will automatically apply two CSS classes to the animated element and these two CSS classes\n * are designed to contain the start and end CSS styling. Both CSS transitions and keyframe animations are supported\n * and can be used to play along with this naming structure.\n *\n * The following code below demonstrates how to perform animations using **CSS transitions** with Angular:\n *\n * ```html\n * \n *\n * \n * \n * \n * ```\n *\n * The following code below demonstrates how to perform animations using **CSS animations** with Angular:\n *\n * ```html\n * \n *\n * \n * \n * \n * ```\n *\n * Both CSS3 animations and transitions can be used together and the animate service will figure out the correct duration and delay timing.\n *\n * Upon DOM mutation, the event class is added first (something like `ng-enter`), then the browser prepares itself to add\n * the active class (in this case `ng-enter-active`) which then triggers the animation. The animation module will automatically\n * detect the CSS code to determine when the animation ends. Once the animation is over then both CSS classes will be\n * removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end\n * immediately resulting in a DOM element that is at its final state. This final state is when the DOM element\n * has no CSS transition/animation classes applied to it.\n *\n * ### Structural transition animations\n *\n * Structural transitions (such as enter, leave and move) will always apply a `0s none` transition\n * value to force the browser into rendering the styles defined in the setup (.ng-enter, .ng-leave\n * or .ng-move) class. This means that any active transition animations operating on the element\n * will be cut off to make way for the enter, leave or move animation.\n *\n * ### Class-based transition animations\n *\n * Class-based transitions refer to transition animations that are triggered when a CSS class is\n * added to or removed from the element (via `$animate.addClass`, `$animate.removeClass`,\n * `$animate.setClass`, or by directives such as `ngClass`, `ngModel` and `form`).\n * They are different when compared to structural animations since they **do not cancel existing\n * animations** nor do they **block successive transitions** from rendering on the same element.\n * This distinction allows for **multiple class-based transitions** to be performed on the same element.\n *\n * In addition to ngAnimate supporting the default (natural) functionality of class-based transition\n * animations, ngAnimate also decorates the element with starting and ending CSS classes to aid the\n * developer in further styling the element throughout the transition animation. Earlier versions\n * of ngAnimate may have caused natural CSS transitions to break and not render properly due to\n * $animate temporarily blocking transitions using `0s none` in order to allow the setup CSS class\n * (the `-add` or `-remove` class) to be applied without triggering an animation. However, as of\n * **version 1.3**, this workaround has been removed with ngAnimate and all non-ngAnimate CSS\n * class transitions are compatible with ngAnimate.\n *\n * There is, however, one special case when dealing with class-based transitions in ngAnimate.\n * When rendering class-based transitions that make use of the setup and active CSS classes\n * (e.g. `.fade-add` and `.fade-add-active` for when `.fade` is added) be sure to define\n * the transition value **on the active CSS class** and not the setup class.\n *\n * ```css\n * .fade-add {\n * /* remember to place a 0s transition here\n * to ensure that the styles are applied instantly\n * even if the element already has a transition style */\n * transition:0s linear all;\n *\n * /* starting CSS styles */\n * opacity:1;\n * }\n * .fade-add.fade-add-active {\n * /* this will be the length of the animation */\n * transition:1s linear all;\n * opacity:0;\n * }\n * ```\n *\n * The setup CSS class (in this case `.fade-add`) also has a transition style property, however, it\n * has a duration of zero. This may not be required, however, incase the browser is unable to render\n * the styling present in this CSS class instantly then it could be that the browser is attempting\n * to perform an unnecessary transition.\n *\n * This workaround, however, does not apply to standard class-based transitions that are rendered\n * when a CSS class containing a transition is applied to an element:\n *\n * ```css\n * .fade {\n * /* this works as expected */\n * transition:1s linear all;\n * opacity:0;\n * }\n * ```\n *\n * Please keep this in mind when coding the CSS markup that will be used within class-based transitions.\n * Also, try not to mix the two class-based animation flavors together since the CSS code may become\n * overly complex.\n *\n * ### CSS Staggering Animations\n * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a\n * curtain-like effect. The ngAnimate module, as of 1.2.0, supports staggering animations and the stagger effect can be\n * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for\n * the animation. The style property expected within the stagger class can either be a **transition-delay** or an\n * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).\n *\n * ```css\n * .my-animation.ng-enter {\n * /* standard transition code */\n * -webkit-transition: 1s linear all;\n * transition: 1s linear all;\n * opacity:0;\n * }\n * .my-animation.ng-enter-stagger {\n * /* this will have a 100ms delay between each successive leave animation */\n * -webkit-transition-delay: 0.1s;\n * transition-delay: 0.1s;\n *\n * /* in case the stagger doesn't work then these two values\n * must be set to 0 to avoid an accidental CSS inheritance */\n * -webkit-transition-duration: 0s;\n * transition-duration: 0s;\n * }\n * .my-animation.ng-enter.ng-enter-active {\n * /* standard transition styles */\n * opacity:1;\n * }\n * ```\n *\n * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations\n * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this\n * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation\n * will also be reset if more than 10ms has passed after the last animation has been fired.\n *\n * The following code will issue the **ng-leave-stagger** event on the element provided:\n *\n * ```js\n * var kids = parent.children();\n *\n * $animate.leave(kids[0]); //stagger index=0\n * $animate.leave(kids[1]); //stagger index=1\n * $animate.leave(kids[2]); //stagger index=2\n * $animate.leave(kids[3]); //stagger index=3\n * $animate.leave(kids[4]); //stagger index=4\n *\n * $timeout(function() {\n * //stagger has reset itself\n * $animate.leave(kids[5]); //stagger index=0\n * $animate.leave(kids[6]); //stagger index=1\n * }, 100, false);\n * ```\n *\n * Stagger animations are currently only supported within CSS-defined animations.\n *\n * ## JavaScript-defined Animations\n * In the event that you do not want to use CSS3 transitions or CSS3 animations or if you wish to offer animations on browsers that do not\n * yet support CSS transitions/animations, then you can make use of JavaScript animations defined inside of your AngularJS module.\n *\n * ```js\n * //!annotate=\"YourApp\" Your AngularJS Module|Replace this or ngModule with the module that you used to define your application.\n * var ngModule = angular.module('YourApp', ['ngAnimate']);\n * ngModule.animation('.my-crazy-animation', function() {\n * return {\n * enter: function(element, done) {\n * //run the animation here and call done when the animation is complete\n * return function(cancelled) {\n * //this (optional) function will be called when the animation\n * //completes or when the animation is cancelled (the cancelled\n * //flag will be set to true if cancelled).\n * };\n * },\n * leave: function(element, done) { },\n * move: function(element, done) { },\n *\n * //animation that can be triggered before the class is added\n * beforeAddClass: function(element, className, done) { },\n *\n * //animation that can be triggered after the class is added\n * addClass: function(element, className, done) { },\n *\n * //animation that can be triggered before the class is removed\n * beforeRemoveClass: function(element, className, done) { },\n *\n * //animation that can be triggered after the class is removed\n * removeClass: function(element, className, done) { }\n * };\n * });\n * ```\n *\n * JavaScript-defined animations are created with a CSS-like class selector and a collection of events which are set to run\n * a javascript callback function. When an animation is triggered, $animate will look for a matching animation which fits\n * the element's CSS class attribute value and then run the matching animation event function (if found).\n * In other words, if the CSS classes present on the animated element match any of the JavaScript animations then the callback function will\n * be executed. It should be also noted that only simple, single class selectors are allowed (compound class selectors are not supported).\n *\n * Within a JavaScript animation, an object containing various event callback animation functions is expected to be returned.\n * As explained above, these callbacks are triggered based on the animation event. Therefore if an enter animation is run,\n * and the JavaScript animation is found, then the enter callback will handle that animation (in addition to the CSS keyframe animation\n * or transition code that is defined via a stylesheet).\n *\n */\n\nangular.module('ngAnimate', ['ng'])\n\n /**\n * @ngdoc provider\n * @name $animateProvider\n * @description\n *\n * The `$animateProvider` allows developers to register JavaScript animation event handlers directly inside of a module.\n * When an animation is triggered, the $animate service will query the $animate service to find any animations that match\n * the provided name value.\n *\n * Requires the {@link ngAnimate `ngAnimate`} module to be installed.\n *\n * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.\n *\n */\n .directive('ngAnimateChildren', function() {\n var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren';\n return function(scope, element, attrs) {\n var val = attrs.ngAnimateChildren;\n if (angular.isString(val) && val.length === 0) { //empty attribute\n element.data(NG_ANIMATE_CHILDREN, true);\n } else {\n scope.$watch(val, function(value) {\n element.data(NG_ANIMATE_CHILDREN, !!value);\n });\n }\n };\n })\n\n //this private service is only used within CSS-enabled animations\n //IE8 + IE9 do not support rAF natively, but that is fine since they\n //also don't support transitions and keyframes which means that the code\n //below will never be used by the two browsers.\n .factory('$$animateReflow', ['$$rAF', '$document', function($$rAF, $document) {\n var bod = $document[0].body;\n return function(fn) {\n //the returned function acts as the cancellation function\n return $$rAF(function() {\n //the line below will force the browser to perform a repaint\n //so that all the animated elements within the animation frame\n //will be properly updated and drawn on screen. This is\n //required to perform multi-class CSS based animations with\n //Firefox. DO NOT REMOVE THIS LINE.\n var a = bod.offsetWidth + 1;\n fn();\n });\n };\n }])\n\n .config(['$provide', '$animateProvider', function($provide, $animateProvider) {\n var noop = angular.noop;\n var forEach = angular.forEach;\n var selectors = $animateProvider.$$selectors;\n var isArray = angular.isArray;\n\n var ELEMENT_NODE = 1;\n var NG_ANIMATE_STATE = '$$ngAnimateState';\n var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren';\n var NG_ANIMATE_CLASS_NAME = 'ng-animate';\n var rootAnimateState = {running: true};\n\n function extractElementNode(element) {\n for(var i = 0; i < element.length; i++) {\n var elm = element[i];\n if (elm.nodeType == ELEMENT_NODE) {\n return elm;\n }\n }\n }\n\n function prepareElement(element) {\n return element && angular.element(element);\n }\n\n function stripCommentsFromElement(element) {\n return angular.element(extractElementNode(element));\n }\n\n function isMatchingElement(elm1, elm2) {\n return extractElementNode(elm1) == extractElementNode(elm2);\n }\n\n $provide.decorator('$animate',\n ['$delegate', '$$q', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', '$templateRequest',\n function($delegate, $$q, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document, $templateRequest) {\n\n $rootElement.data(NG_ANIMATE_STATE, rootAnimateState);\n\n // Wait until all directive and route-related templates are downloaded and\n // compiled. The $templateRequest.totalPendingRequests variable keeps track of\n // all of the remote templates being currently downloaded. If there are no\n // templates currently downloading then the watcher will still fire anyway.\n var deregisterWatch = $rootScope.$watch(\n function() { return $templateRequest.totalPendingRequests; },\n function(val, oldVal) {\n if (val !== 0) return;\n deregisterWatch();\n\n // Now that all templates have been downloaded, $animate will wait until\n // the post digest queue is empty before enabling animations. By having two\n // calls to $postDigest calls we can ensure that the flag is enabled at the\n // very end of the post digest queue. Since all of the animations in $animate\n // use $postDigest, it's important that the code below executes at the end.\n // This basically means that the page is fully downloaded and compiled before\n // any animations are triggered.\n $rootScope.$$postDigest(function() {\n $rootScope.$$postDigest(function() {\n rootAnimateState.running = false;\n });\n });\n }\n );\n\n var globalAnimationCounter = 0;\n var classNameFilter = $animateProvider.classNameFilter();\n var isAnimatableClassName = !classNameFilter\n ? function() { return true; }\n : function(className) {\n return classNameFilter.test(className);\n };\n\n function classBasedAnimationsBlocked(element, setter) {\n var data = element.data(NG_ANIMATE_STATE) || {};\n if (setter) {\n data.running = true;\n data.structural = true;\n element.data(NG_ANIMATE_STATE, data);\n }\n return data.disabled || (data.running && data.structural);\n }\n\n function runAnimationPostDigest(fn) {\n var cancelFn, defer = $$q.defer();\n defer.promise.$$cancelFn = function() {\n cancelFn && cancelFn();\n };\n $rootScope.$$postDigest(function() {\n cancelFn = fn(function() {\n defer.resolve();\n });\n });\n return defer.promise;\n }\n\n function resolveElementClasses(element, cache, runningAnimations) {\n runningAnimations = runningAnimations || {};\n var map = {};\n\n forEach(cache.add, function(className) {\n if (className && className.length) {\n map[className] = map[className] || 0;\n map[className]++;\n }\n });\n\n forEach(cache.remove, function(className) {\n if (className && className.length) {\n map[className] = map[className] || 0;\n map[className]--;\n }\n });\n\n var lookup = [];\n forEach(runningAnimations, function(data, selector) {\n forEach(selector.split(' '), function(s) {\n lookup[s]=data;\n });\n });\n\n var toAdd = [], toRemove = [];\n forEach(map, function(status, className) {\n var hasClass = angular.$$hasClass(element[0], className);\n var matchingAnimation = lookup[className] || {};\n\n // When addClass and removeClass is called then $animate will check to\n // see if addClass and removeClass cancel each other out. When there are\n // more calls to removeClass than addClass then the count falls below 0\n // and then the removeClass animation will be allowed. Otherwise if the\n // count is above 0 then that means an addClass animation will commence.\n // Once an animation is allowed then the code will also check to see if\n // there exists any on-going animation that is already adding or remvoing\n // the matching CSS class.\n if (status < 0) {\n //does it have the class or will it have the class\n if (hasClass || matchingAnimation.event == 'addClass') {\n toRemove.push(className);\n }\n } else if (status > 0) {\n //is the class missing or will it be removed?\n if (!hasClass || matchingAnimation.event == 'removeClass') {\n toAdd.push(className);\n }\n }\n });\n\n return (toAdd.length + toRemove.length) > 0 && [toAdd.join(' '), toRemove.join(' ')];\n }\n\n function lookup(name) {\n if (name) {\n var matches = [],\n flagMap = {},\n classes = name.substr(1).split('.');\n\n //the empty string value is the default animation\n //operation which performs CSS transition and keyframe\n //animations sniffing. This is always included for each\n //element animation procedure if the browser supports\n //transitions and/or keyframe animations. The default\n //animation is added to the top of the list to prevent\n //any previous animations from affecting the element styling\n //prior to the element being animated.\n if ($sniffer.transitions || $sniffer.animations) {\n matches.push($injector.get(selectors['']));\n }\n\n for(var i=0; i < classes.length; i++) {\n var klass = classes[i],\n selectorFactoryName = selectors[klass];\n if (selectorFactoryName && !flagMap[klass]) {\n matches.push($injector.get(selectorFactoryName));\n flagMap[klass] = true;\n }\n }\n return matches;\n }\n }\n\n function animationRunner(element, animationEvent, className) {\n //transcluded directives may sometimes fire an animation using only comment nodes\n //best to catch this early on to prevent any animation operations from occurring\n var node = element[0];\n if (!node) {\n return;\n }\n\n var classNameAdd;\n var classNameRemove;\n if (isArray(className)) {\n classNameAdd = className[0];\n classNameRemove = className[1];\n if (!classNameAdd) {\n className = classNameRemove;\n animationEvent = 'removeClass';\n } else if (!classNameRemove) {\n className = classNameAdd;\n animationEvent = 'addClass';\n } else {\n className = classNameAdd + ' ' + classNameRemove;\n }\n }\n\n var isSetClassOperation = animationEvent == 'setClass';\n var isClassBased = isSetClassOperation ||\n animationEvent == 'addClass' ||\n animationEvent == 'removeClass';\n\n var currentClassName = element.attr('class');\n var classes = currentClassName + ' ' + className;\n if (!isAnimatableClassName(classes)) {\n return;\n }\n\n var beforeComplete = noop,\n beforeCancel = [],\n before = [],\n afterComplete = noop,\n afterCancel = [],\n after = [];\n\n var animationLookup = (' ' + classes).replace(/\\s+/g,'.');\n forEach(lookup(animationLookup), function(animationFactory) {\n var created = registerAnimation(animationFactory, animationEvent);\n if (!created && isSetClassOperation) {\n registerAnimation(animationFactory, 'addClass');\n registerAnimation(animationFactory, 'removeClass');\n }\n });\n\n function registerAnimation(animationFactory, event) {\n var afterFn = animationFactory[event];\n var beforeFn = animationFactory['before' + event.charAt(0).toUpperCase() + event.substr(1)];\n if (afterFn || beforeFn) {\n if (event == 'leave') {\n beforeFn = afterFn;\n //when set as null then animation knows to skip this phase\n afterFn = null;\n }\n after.push({\n event : event, fn : afterFn\n });\n before.push({\n event : event, fn : beforeFn\n });\n return true;\n }\n }\n\n function run(fns, cancellations, allCompleteFn) {\n var animations = [];\n forEach(fns, function(animation) {\n animation.fn && animations.push(animation);\n });\n\n var count = 0;\n function afterAnimationComplete(index) {\n if (cancellations) {\n (cancellations[index] || noop)();\n if (++count < animations.length) return;\n cancellations = null;\n }\n allCompleteFn();\n }\n\n //The code below adds directly to the array in order to work with\n //both sync and async animations. Sync animations are when the done()\n //operation is called right away. DO NOT REFACTOR!\n forEach(animations, function(animation, index) {\n var progress = function() {\n afterAnimationComplete(index);\n };\n switch(animation.event) {\n case 'setClass':\n cancellations.push(animation.fn(element, classNameAdd, classNameRemove, progress));\n break;\n case 'addClass':\n cancellations.push(animation.fn(element, classNameAdd || className, progress));\n break;\n case 'removeClass':\n cancellations.push(animation.fn(element, classNameRemove || className, progress));\n break;\n default:\n cancellations.push(animation.fn(element, progress));\n break;\n }\n });\n\n if (cancellations && cancellations.length === 0) {\n allCompleteFn();\n }\n }\n\n return {\n node : node,\n event : animationEvent,\n className : className,\n isClassBased : isClassBased,\n isSetClassOperation : isSetClassOperation,\n before : function(allCompleteFn) {\n beforeComplete = allCompleteFn;\n run(before, beforeCancel, function() {\n beforeComplete = noop;\n allCompleteFn();\n });\n },\n after : function(allCompleteFn) {\n afterComplete = allCompleteFn;\n run(after, afterCancel, function() {\n afterComplete = noop;\n allCompleteFn();\n });\n },\n cancel : function() {\n if (beforeCancel) {\n forEach(beforeCancel, function(cancelFn) {\n (cancelFn || noop)(true);\n });\n beforeComplete(true);\n }\n if (afterCancel) {\n forEach(afterCancel, function(cancelFn) {\n (cancelFn || noop)(true);\n });\n afterComplete(true);\n }\n }\n };\n }\n\n /**\n * @ngdoc service\n * @name $animate\n * @kind object\n *\n * @description\n * The `$animate` service provides animation detection support while performing DOM operations (enter, leave and move) as well as during addClass and removeClass operations.\n * When any of these operations are run, the $animate service\n * will examine any JavaScript-defined animations (which are defined by using the $animateProvider provider object)\n * as well as any CSS-defined animations against the CSS classes present on the element once the DOM operation is run.\n *\n * The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives\n * will work out of the box without any extra configuration.\n *\n * Requires the {@link ngAnimate `ngAnimate`} module to be installed.\n *\n * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.\n * ## Callback Promises\n * With AngularJS 1.3, each of the animation methods, on the `$animate` service, return a promise when called. The\n * promise itself is then resolved once the animation has completed itself, has been cancelled or has been\n * skipped due to animations being disabled. (Note that even if the animation is cancelled it will still\n * call the resolve function of the animation.)\n *\n * ```js\n * $animate.enter(element, container).then(function() {\n * //...this is called once the animation is complete...\n * });\n * ```\n *\n * Also note that, due to the nature of the callback promise, if any Angular-specific code (like changing the scope,\n * location of the page, etc...) is executed within the callback promise then be sure to wrap the code using\n * `$scope.$apply(...)`;\n *\n * ```js\n * $animate.leave(element).then(function() {\n * $scope.$apply(function() {\n * $location.path('/new-page');\n * });\n * });\n * ```\n *\n * An animation can also be cancelled by calling the `$animate.cancel(promise)` method with the provided\n * promise that was returned when the animation was started.\n *\n * ```js\n * var promise = $animate.addClass(element, 'super-long-animation').then(function() {\n * //this will still be called even if cancelled\n * });\n *\n * element.on('click', function() {\n * //tooo lazy to wait for the animation to end\n * $animate.cancel(promise);\n * });\n * ```\n *\n * (Keep in mind that the promise cancellation is unique to `$animate` since promises in\n * general cannot be cancelled.)\n *\n */\n return {\n /**\n * @ngdoc method\n * @name $animate#enter\n * @kind function\n *\n * @description\n * Appends the element to the parentElement element that resides in the document and then runs the enter animation. Once\n * the animation is started, the following CSS classes will be present on the element for the duration of the animation:\n *\n * Below is a breakdown of each step that occurs during enter animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|\n * | 1. $animate.enter(...) is called | class=\"my-animation\" |\n * | 2. element is inserted into the parentElement element or beside the afterElement element | class=\"my-animation\" |\n * | 3. $animate waits for the next digest to start the animation | class=\"my-animation ng-animate\" |\n * | 4. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 5. the .ng-enter class is added to the element | class=\"my-animation ng-animate ng-enter\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate ng-enter\" |\n * | 7. $animate blocks all CSS transitions on the element to ensure the .ng-enter class styling is applied right away | class=\"my-animation ng-animate ng-enter\" |\n * | 8. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate ng-enter\" |\n * | 9. $animate removes the CSS transition block placed on the element | class=\"my-animation ng-animate ng-enter\" |\n * | 10. the .ng-enter-active class is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-enter ng-enter-active\" |\n * | 11. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate ng-enter ng-enter-active\" |\n * | 12. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 13. The returned promise is resolved. | class=\"my-animation\" |\n *\n * @param {DOMElement} element the element that will be the focus of the enter animation\n * @param {DOMElement} parentElement the parent element of the element that will be the focus of the enter animation\n * @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation\n * @return {Promise} the animation callback promise\n */\n enter : function(element, parentElement, afterElement) {\n element = angular.element(element);\n parentElement = prepareElement(parentElement);\n afterElement = prepareElement(afterElement);\n\n classBasedAnimationsBlocked(element, true);\n $delegate.enter(element, parentElement, afterElement);\n return runAnimationPostDigest(function(done) {\n return performAnimation('enter', 'ng-enter', stripCommentsFromElement(element), parentElement, afterElement, noop, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#leave\n * @kind function\n *\n * @description\n * Runs the leave animation operation and, upon completion, removes the element from the DOM. Once\n * the animation is started, the following CSS classes will be added for the duration of the animation:\n *\n * Below is a breakdown of each step that occurs during leave animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|\n * | 1. $animate.leave(...) is called | class=\"my-animation\" |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 3. $animate waits for the next digest to start the animation | class=\"my-animation ng-animate\" |\n * | 4. the .ng-leave class is added to the element | class=\"my-animation ng-animate ng-leave\" |\n * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate ng-leave\" |\n * | 6. $animate blocks all CSS transitions on the element to ensure the .ng-leave class styling is applied right away | class=\"my-animation ng-animate ng-leave” |\n * | 7. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate ng-leave\" |\n * | 8. $animate removes the CSS transition block placed on the element | class=\"my-animation ng-animate ng-leave” |\n * | 9. the .ng-leave-active class is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-leave ng-leave-active\" |\n * | 10. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate ng-leave ng-leave-active\" |\n * | 11. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 12. The element is removed from the DOM | ... |\n * | 13. The returned promise is resolved. | ... |\n *\n * @param {DOMElement} element the element that will be the focus of the leave animation\n * @return {Promise} the animation callback promise\n */\n leave : function(element) {\n element = angular.element(element);\n\n cancelChildAnimations(element);\n classBasedAnimationsBlocked(element, true);\n this.enabled(false, element);\n return runAnimationPostDigest(function(done) {\n return performAnimation('leave', 'ng-leave', stripCommentsFromElement(element), null, null, function() {\n $delegate.leave(element);\n }, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#move\n * @kind function\n *\n * @description\n * Fires the move DOM operation. Just before the animation starts, the animate service will either append it into the parentElement container or\n * add the element directly after the afterElement element if present. Then the move animation will be run. Once\n * the animation is started, the following CSS classes will be added for the duration of the animation:\n *\n * Below is a breakdown of each step that occurs during move animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|\n * | 1. $animate.move(...) is called | class=\"my-animation\" |\n * | 2. element is moved into the parentElement element or beside the afterElement element | class=\"my-animation\" |\n * | 3. $animate waits for the next digest to start the animation | class=\"my-animation ng-animate\" |\n * | 4. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 5. the .ng-move class is added to the element | class=\"my-animation ng-animate ng-move\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate ng-move\" |\n * | 7. $animate blocks all CSS transitions on the element to ensure the .ng-move class styling is applied right away | class=\"my-animation ng-animate ng-move” |\n * | 8. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate ng-move\" |\n * | 9. $animate removes the CSS transition block placed on the element | class=\"my-animation ng-animate ng-move” |\n * | 10. the .ng-move-active class is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-move ng-move-active\" |\n * | 11. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate ng-move ng-move-active\" |\n * | 12. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 13. The returned promise is resolved. | class=\"my-animation\" |\n *\n * @param {DOMElement} element the element that will be the focus of the move animation\n * @param {DOMElement} parentElement the parentElement element of the element that will be the focus of the move animation\n * @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation\n * @return {Promise} the animation callback promise\n */\n move : function(element, parentElement, afterElement) {\n element = angular.element(element);\n parentElement = prepareElement(parentElement);\n afterElement = prepareElement(afterElement);\n\n cancelChildAnimations(element);\n classBasedAnimationsBlocked(element, true);\n $delegate.move(element, parentElement, afterElement);\n return runAnimationPostDigest(function(done) {\n return performAnimation('move', 'ng-move', stripCommentsFromElement(element), parentElement, afterElement, noop, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#addClass\n *\n * @description\n * Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class.\n * Unlike the other animation methods, the animate service will suffix the className value with {@type -add} in order to provide\n * the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions\n * or keyframes are defined on the -add-active or base CSS class).\n *\n * Below is a breakdown of each step that occurs during addClass animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |----------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n * | 1. $animate.addClass(element, 'super') is called | class=\"my-animation\" |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 3. the .super-add class is added to the element | class=\"my-animation ng-animate super-add\" |\n * | 4. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate super-add\" |\n * | 5. the .super and .super-add-active classes are added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate super super-add super-add-active\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate super-add\" |\n * | 7. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation super super-add super-add-active\" |\n * | 8. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation super\" |\n * | 9. The super class is kept on the element | class=\"my-animation super\" |\n * | 10. The returned promise is resolved. | class=\"my-animation super\" |\n *\n * @param {DOMElement} element the element that will be animated\n * @param {string} className the CSS class that will be added to the element and then animated\n * @return {Promise} the animation callback promise\n */\n addClass : function(element, className) {\n return this.setClass(element, className, []);\n },\n\n /**\n * @ngdoc method\n * @name $animate#removeClass\n *\n * @description\n * Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value\n * from the element. Unlike the other animation methods, the animate service will suffix the className value with {@type -remove} in\n * order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if\n * no CSS transitions or keyframes are defined on the -remove or base CSS classes).\n *\n * Below is a breakdown of each step that occurs during removeClass animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n * | 1. $animate.removeClass(element, 'super') is called | class=\"my-animation super\" |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation super ng-animate\" |\n * | 3. the .super-remove class is added to the element | class=\"my-animation super ng-animate super-remove\" |\n * | 4. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation super ng-animate super-remove\" |\n * | 5. the .super-remove-active classes are added and .super is removed (this triggers the CSS transition/animation) | class=\"my-animation ng-animate super-remove super-remove-active\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation super ng-animate super-remove\" |\n * | 7. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate super-remove super-remove-active\" |\n * | 8. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 9. The returned promise is resolved. | class=\"my-animation\" |\n *\n *\n * @param {DOMElement} element the element that will be animated\n * @param {string} className the CSS class that will be animated and then removed from the element\n * @return {Promise} the animation callback promise\n */\n removeClass : function(element, className) {\n return this.setClass(element, [], className);\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#setClass\n *\n * @description Adds and/or removes the given CSS classes to and from the element.\n * Once complete, the done() callback will be fired (if provided).\n *\n * | Animation Step | What the element class attribute looks like |\n * |--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n * | 1. $animate.removeClass(element, ‘on’, ‘off’) is called | class=\"my-animation super off” |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation super ng-animate off” |\n * | 3. the .on-add and .off-remove classes are added to the element | class=\"my-animation ng-animate on-add off-remove off” |\n * | 4. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate on-add off-remove off” |\n * | 5. the .on, .on-add-active and .off-remove-active classes are added and .off is removed (this triggers the CSS transition/animation) | class=\"my-animation ng-animate on on-add on-add-active off-remove off-remove-active” |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate on on-add on-add-active off-remove off-remove-active\" |\n * | 7. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate on on-add on-add-active off-remove off-remove-active\" |\n * | 8. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation on\" |\n * | 9. The returned promise is resolved. | class=\"my-animation on\" |\n *\n * @param {DOMElement} element the element which will have its CSS classes changed\n * removed from it\n * @param {string} add the CSS classes which will be added to the element\n * @param {string} remove the CSS class which will be removed from the element\n * CSS classes have been set on the element\n * @return {Promise} the animation callback promise\n */\n setClass : function(element, add, remove) {\n var STORAGE_KEY = '$$animateClasses';\n element = angular.element(element);\n element = stripCommentsFromElement(element);\n\n if (classBasedAnimationsBlocked(element)) {\n return $delegate.setClass(element, add, remove);\n }\n\n add = isArray(add) ? add : add.split(' ');\n remove = isArray(remove) ? remove : remove.split(' ');\n\n var cache = element.data(STORAGE_KEY);\n if (cache) {\n cache.add = cache.add.concat(add);\n cache.remove = cache.remove.concat(remove);\n\n //the digest cycle will combine all the animations into one function\n return cache.promise;\n } else {\n element.data(STORAGE_KEY, cache = {\n add : add,\n remove : remove\n });\n }\n\n return cache.promise = runAnimationPostDigest(function(done) {\n var cache = element.data(STORAGE_KEY);\n element.removeData(STORAGE_KEY);\n\n var state = element.data(NG_ANIMATE_STATE) || {};\n var classes = resolveElementClasses(element, cache, state.active);\n return !classes\n ? done()\n : performAnimation('setClass', classes, element, null, null, function() {\n $delegate.setClass(element, classes[0], classes[1]);\n }, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#cancel\n * @kind function\n *\n * @param {Promise} animationPromise The animation promise that is returned when an animation is started.\n *\n * @description\n * Cancels the provided animation.\n */\n cancel : function(promise) {\n promise.$$cancelFn();\n },\n\n /**\n * @ngdoc method\n * @name $animate#enabled\n * @kind function\n *\n * @param {boolean=} value If provided then set the animation on or off.\n * @param {DOMElement=} element If provided then the element will be used to represent the enable/disable operation\n * @return {boolean} Current animation state.\n *\n * @description\n * Globally enables/disables animations.\n *\n */\n enabled : function(value, element) {\n switch(arguments.length) {\n case 2:\n if (value) {\n cleanup(element);\n } else {\n var data = element.data(NG_ANIMATE_STATE) || {};\n data.disabled = true;\n element.data(NG_ANIMATE_STATE, data);\n }\n break;\n\n case 1:\n rootAnimateState.disabled = !value;\n break;\n\n default:\n value = !rootAnimateState.disabled;\n break;\n }\n return !!value;\n }\n };\n\n /*\n all animations call this shared animation triggering function internally.\n The animationEvent variable refers to the JavaScript animation event that will be triggered\n and the className value is the name of the animation that will be applied within the\n CSS code. Element, parentElement and afterElement are provided DOM elements for the animation\n and the onComplete callback will be fired once the animation is fully complete.\n */\n function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {\n\n var noopCancel = noop;\n var runner = animationRunner(element, animationEvent, className);\n if (!runner) {\n fireDOMOperation();\n fireBeforeCallbackAsync();\n fireAfterCallbackAsync();\n closeAnimation();\n return noopCancel;\n }\n\n animationEvent = runner.event;\n className = runner.className;\n var elementEvents = angular.element._data(runner.node);\n elementEvents = elementEvents && elementEvents.events;\n\n if (!parentElement) {\n parentElement = afterElement ? afterElement.parent() : element.parent();\n }\n\n //skip the animation if animations are disabled, a parent is already being animated,\n //the element is not currently attached to the document body or then completely close\n //the animation if any matching animations are not found at all.\n //NOTE: IE8 + IE9 should close properly (run closeAnimation()) in case an animation was found.\n if (animationsDisabled(element, parentElement)) {\n fireDOMOperation();\n fireBeforeCallbackAsync();\n fireAfterCallbackAsync();\n closeAnimation();\n return noopCancel;\n }\n\n var ngAnimateState = element.data(NG_ANIMATE_STATE) || {};\n var runningAnimations = ngAnimateState.active || {};\n var totalActiveAnimations = ngAnimateState.totalActive || 0;\n var lastAnimation = ngAnimateState.last;\n var skipAnimation = false;\n\n if (totalActiveAnimations > 0) {\n var animationsToCancel = [];\n if (!runner.isClassBased) {\n if (animationEvent == 'leave' && runningAnimations['ng-leave']) {\n skipAnimation = true;\n } else {\n //cancel all animations when a structural animation takes place\n for(var klass in runningAnimations) {\n animationsToCancel.push(runningAnimations[klass]);\n }\n ngAnimateState = {};\n cleanup(element, true);\n }\n } else if (lastAnimation.event == 'setClass') {\n animationsToCancel.push(lastAnimation);\n cleanup(element, className);\n }\n else if (runningAnimations[className]) {\n var current = runningAnimations[className];\n if (current.event == animationEvent) {\n skipAnimation = true;\n } else {\n animationsToCancel.push(current);\n cleanup(element, className);\n }\n }\n\n if (animationsToCancel.length > 0) {\n forEach(animationsToCancel, function(operation) {\n operation.cancel();\n });\n }\n }\n\n if (runner.isClassBased && !runner.isSetClassOperation && !skipAnimation) {\n skipAnimation = (animationEvent == 'addClass') == element.hasClass(className); //opposite of XOR\n }\n\n if (skipAnimation) {\n fireDOMOperation();\n fireBeforeCallbackAsync();\n fireAfterCallbackAsync();\n fireDoneCallbackAsync();\n return noopCancel;\n }\n\n runningAnimations = ngAnimateState.active || {};\n totalActiveAnimations = ngAnimateState.totalActive || 0;\n\n if (animationEvent == 'leave') {\n //there's no need to ever remove the listener since the element\n //will be removed (destroyed) after the leave animation ends or\n //is cancelled midway\n element.one('$destroy', function(e) {\n var element = angular.element(this);\n var state = element.data(NG_ANIMATE_STATE);\n if (state) {\n var activeLeaveAnimation = state.active['ng-leave'];\n if (activeLeaveAnimation) {\n activeLeaveAnimation.cancel();\n cleanup(element, 'ng-leave');\n }\n }\n });\n }\n\n //the ng-animate class does nothing, but it's here to allow for\n //parent animations to find and cancel child animations when needed\n element.addClass(NG_ANIMATE_CLASS_NAME);\n\n var localAnimationCount = globalAnimationCounter++;\n totalActiveAnimations++;\n runningAnimations[className] = runner;\n\n element.data(NG_ANIMATE_STATE, {\n last : runner,\n active : runningAnimations,\n index : localAnimationCount,\n totalActive : totalActiveAnimations\n });\n\n //first we run the before animations and when all of those are complete\n //then we perform the DOM operation and run the next set of animations\n fireBeforeCallbackAsync();\n runner.before(function(cancelled) {\n var data = element.data(NG_ANIMATE_STATE);\n cancelled = cancelled ||\n !data || !data.active[className] ||\n (runner.isClassBased && data.active[className].event != animationEvent);\n\n fireDOMOperation();\n if (cancelled === true) {\n closeAnimation();\n } else {\n fireAfterCallbackAsync();\n runner.after(closeAnimation);\n }\n });\n\n return runner.cancel;\n\n function fireDOMCallback(animationPhase) {\n var eventName = '$animate:' + animationPhase;\n if (elementEvents && elementEvents[eventName] && elementEvents[eventName].length > 0) {\n $$asyncCallback(function() {\n element.triggerHandler(eventName, {\n event : animationEvent,\n className : className\n });\n });\n }\n }\n\n function fireBeforeCallbackAsync() {\n fireDOMCallback('before');\n }\n\n function fireAfterCallbackAsync() {\n fireDOMCallback('after');\n }\n\n function fireDoneCallbackAsync() {\n fireDOMCallback('close');\n doneCallback();\n }\n\n //it is less complicated to use a flag than managing and canceling\n //timeouts containing multiple callbacks.\n function fireDOMOperation() {\n if (!fireDOMOperation.hasBeenRun) {\n fireDOMOperation.hasBeenRun = true;\n domOperation();\n }\n }\n\n function closeAnimation() {\n if (!closeAnimation.hasBeenRun) {\n closeAnimation.hasBeenRun = true;\n var data = element.data(NG_ANIMATE_STATE);\n if (data) {\n /* only structural animations wait for reflow before removing an\n animation, but class-based animations don't. An example of this\n failing would be when a parent HTML tag has a ng-class attribute\n causing ALL directives below to skip animations during the digest */\n if (runner && runner.isClassBased) {\n cleanup(element, className);\n } else {\n $$asyncCallback(function() {\n var data = element.data(NG_ANIMATE_STATE) || {};\n if (localAnimationCount == data.index) {\n cleanup(element, className, animationEvent);\n }\n });\n element.data(NG_ANIMATE_STATE, data);\n }\n }\n fireDoneCallbackAsync();\n }\n }\n }\n\n function cancelChildAnimations(element) {\n var node = extractElementNode(element);\n if (node) {\n var nodes = angular.isFunction(node.getElementsByClassName) ?\n node.getElementsByClassName(NG_ANIMATE_CLASS_NAME) :\n node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME);\n forEach(nodes, function(element) {\n element = angular.element(element);\n var data = element.data(NG_ANIMATE_STATE);\n if (data && data.active) {\n forEach(data.active, function(runner) {\n runner.cancel();\n });\n }\n });\n }\n }\n\n function cleanup(element, className) {\n if (isMatchingElement(element, $rootElement)) {\n if (!rootAnimateState.disabled) {\n rootAnimateState.running = false;\n rootAnimateState.structural = false;\n }\n } else if (className) {\n var data = element.data(NG_ANIMATE_STATE) || {};\n\n var removeAnimations = className === true;\n if (!removeAnimations && data.active && data.active[className]) {\n data.totalActive--;\n delete data.active[className];\n }\n\n if (removeAnimations || !data.totalActive) {\n element.removeClass(NG_ANIMATE_CLASS_NAME);\n element.removeData(NG_ANIMATE_STATE);\n }\n }\n }\n\n function animationsDisabled(element, parentElement) {\n if (rootAnimateState.disabled) {\n return true;\n }\n\n if (isMatchingElement(element, $rootElement)) {\n return rootAnimateState.running;\n }\n\n var allowChildAnimations, parentRunningAnimation, hasParent;\n do {\n //the element did not reach the root element which means that it\n //is not apart of the DOM. Therefore there is no reason to do\n //any animations on it\n if (parentElement.length === 0) break;\n\n var isRoot = isMatchingElement(parentElement, $rootElement);\n var state = isRoot ? rootAnimateState : (parentElement.data(NG_ANIMATE_STATE) || {});\n if (state.disabled) {\n return true;\n }\n\n //no matter what, for an animation to work it must reach the root element\n //this implies that the element is attached to the DOM when the animation is run\n if (isRoot) {\n hasParent = true;\n }\n\n //once a flag is found that is strictly false then everything before\n //it will be discarded and all child animations will be restricted\n if (allowChildAnimations !== false) {\n var animateChildrenFlag = parentElement.data(NG_ANIMATE_CHILDREN);\n if (angular.isDefined(animateChildrenFlag)) {\n allowChildAnimations = animateChildrenFlag;\n }\n }\n\n parentRunningAnimation = parentRunningAnimation ||\n state.running ||\n (state.last && !state.last.isClassBased);\n }\n while(parentElement = parentElement.parent());\n\n return !hasParent || (!allowChildAnimations && parentRunningAnimation);\n }\n }]);\n\n $animateProvider.register('', ['$window', '$sniffer', '$timeout', '$$animateReflow',\n function($window, $sniffer, $timeout, $$animateReflow) {\n // Detect proper transitionend/animationend event names.\n var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;\n\n // If unprefixed events are not supported but webkit-prefixed are, use the latter.\n // Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.\n // Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`\n // but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.\n // Register both events in case `window.onanimationend` is not supported because of that,\n // do the same for `transitionend` as Safari is likely to exhibit similar behavior.\n // Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit\n // therefore there is no reason to test anymore for other vendor prefixes: http://caniuse.com/#search=transition\n if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {\n CSS_PREFIX = '-webkit-';\n TRANSITION_PROP = 'WebkitTransition';\n TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';\n } else {\n TRANSITION_PROP = 'transition';\n TRANSITIONEND_EVENT = 'transitionend';\n }\n\n if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {\n CSS_PREFIX = '-webkit-';\n ANIMATION_PROP = 'WebkitAnimation';\n ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';\n } else {\n ANIMATION_PROP = 'animation';\n ANIMATIONEND_EVENT = 'animationend';\n }\n\n var DURATION_KEY = 'Duration';\n var PROPERTY_KEY = 'Property';\n var DELAY_KEY = 'Delay';\n var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';\n var ANIMATION_PLAYSTATE_KEY = 'PlayState';\n var NG_ANIMATE_PARENT_KEY = '$$ngAnimateKey';\n var NG_ANIMATE_CSS_DATA_KEY = '$$ngAnimateCSS3Data';\n var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\n var CLOSING_TIME_BUFFER = 1.5;\n var ONE_SECOND = 1000;\n\n var lookupCache = {};\n var parentCounter = 0;\n var animationReflowQueue = [];\n var cancelAnimationReflow;\n function afterReflow(element, callback) {\n if (cancelAnimationReflow) {\n cancelAnimationReflow();\n }\n animationReflowQueue.push(callback);\n cancelAnimationReflow = $$animateReflow(function() {\n forEach(animationReflowQueue, function(fn) {\n fn();\n });\n\n animationReflowQueue = [];\n cancelAnimationReflow = null;\n lookupCache = {};\n });\n }\n\n var closingTimer = null;\n var closingTimestamp = 0;\n var animationElementQueue = [];\n function animationCloseHandler(element, totalTime) {\n var node = extractElementNode(element);\n element = angular.element(node);\n\n //this item will be garbage collected by the closing\n //animation timeout\n animationElementQueue.push(element);\n\n //but it may not need to cancel out the existing timeout\n //if the timestamp is less than the previous one\n var futureTimestamp = Date.now() + totalTime;\n if (futureTimestamp <= closingTimestamp) {\n return;\n }\n\n $timeout.cancel(closingTimer);\n\n closingTimestamp = futureTimestamp;\n closingTimer = $timeout(function() {\n closeAllAnimations(animationElementQueue);\n animationElementQueue = [];\n }, totalTime, false);\n }\n\n function closeAllAnimations(elements) {\n forEach(elements, function(element) {\n var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n if (elementData) {\n forEach(elementData.closeAnimationFns, function(fn) {\n fn();\n });\n }\n });\n }\n\n function getElementAnimationDetails(element, cacheKey) {\n var data = cacheKey ? lookupCache[cacheKey] : null;\n if (!data) {\n var transitionDuration = 0;\n var transitionDelay = 0;\n var animationDuration = 0;\n var animationDelay = 0;\n\n //we want all the styles defined before and after\n forEach(element, function(element) {\n if (element.nodeType == ELEMENT_NODE) {\n var elementStyles = $window.getComputedStyle(element) || {};\n\n var transitionDurationStyle = elementStyles[TRANSITION_PROP + DURATION_KEY];\n transitionDuration = Math.max(parseMaxTime(transitionDurationStyle), transitionDuration);\n\n var transitionDelayStyle = elementStyles[TRANSITION_PROP + DELAY_KEY];\n transitionDelay = Math.max(parseMaxTime(transitionDelayStyle), transitionDelay);\n\n var animationDelayStyle = elementStyles[ANIMATION_PROP + DELAY_KEY];\n animationDelay = Math.max(parseMaxTime(elementStyles[ANIMATION_PROP + DELAY_KEY]), animationDelay);\n\n var aDuration = parseMaxTime(elementStyles[ANIMATION_PROP + DURATION_KEY]);\n\n if (aDuration > 0) {\n aDuration *= parseInt(elementStyles[ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY], 10) || 1;\n }\n animationDuration = Math.max(aDuration, animationDuration);\n }\n });\n data = {\n total : 0,\n transitionDelay: transitionDelay,\n transitionDuration: transitionDuration,\n animationDelay: animationDelay,\n animationDuration: animationDuration\n };\n if (cacheKey) {\n lookupCache[cacheKey] = data;\n }\n }\n return data;\n }\n\n function parseMaxTime(str) {\n var maxValue = 0;\n var values = angular.isString(str) ?\n str.split(/\\s*,\\s*/) :\n [];\n forEach(values, function(value) {\n maxValue = Math.max(parseFloat(value) || 0, maxValue);\n });\n return maxValue;\n }\n\n function getCacheKey(element) {\n var parentElement = element.parent();\n var parentID = parentElement.data(NG_ANIMATE_PARENT_KEY);\n if (!parentID) {\n parentElement.data(NG_ANIMATE_PARENT_KEY, ++parentCounter);\n parentID = parentCounter;\n }\n return parentID + '-' + extractElementNode(element).getAttribute('class');\n }\n\n function animateSetup(animationEvent, element, className) {\n var structural = ['ng-enter','ng-leave','ng-move'].indexOf(className) >= 0;\n\n var cacheKey = getCacheKey(element);\n var eventCacheKey = cacheKey + ' ' + className;\n var itemIndex = lookupCache[eventCacheKey] ? ++lookupCache[eventCacheKey].total : 0;\n\n var stagger = {};\n if (itemIndex > 0) {\n var staggerClassName = className + '-stagger';\n var staggerCacheKey = cacheKey + ' ' + staggerClassName;\n var applyClasses = !lookupCache[staggerCacheKey];\n\n applyClasses && element.addClass(staggerClassName);\n\n stagger = getElementAnimationDetails(element, staggerCacheKey);\n\n applyClasses && element.removeClass(staggerClassName);\n }\n\n element.addClass(className);\n\n var formerData = element.data(NG_ANIMATE_CSS_DATA_KEY) || {};\n var timings = getElementAnimationDetails(element, eventCacheKey);\n var transitionDuration = timings.transitionDuration;\n var animationDuration = timings.animationDuration;\n\n if (structural && transitionDuration === 0 && animationDuration === 0) {\n element.removeClass(className);\n return false;\n }\n\n var blockTransition = structural && transitionDuration > 0;\n var blockAnimation = animationDuration > 0 &&\n stagger.animationDelay > 0 &&\n stagger.animationDuration === 0;\n\n var closeAnimationFns = formerData.closeAnimationFns || [];\n element.data(NG_ANIMATE_CSS_DATA_KEY, {\n stagger : stagger,\n cacheKey : eventCacheKey,\n running : formerData.running || 0,\n itemIndex : itemIndex,\n blockTransition : blockTransition,\n closeAnimationFns : closeAnimationFns\n });\n\n var node = extractElementNode(element);\n\n if (blockTransition) {\n blockTransitions(node, true);\n }\n\n if (blockAnimation) {\n blockAnimations(node, true);\n }\n\n return true;\n }\n\n function animateRun(animationEvent, element, className, activeAnimationComplete) {\n var node = extractElementNode(element);\n var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n if (node.getAttribute('class').indexOf(className) == -1 || !elementData) {\n activeAnimationComplete();\n return;\n }\n\n if (elementData.blockTransition) {\n blockTransitions(node, false);\n }\n\n var activeClassName = '';\n var pendingClassName = '';\n forEach(className.split(' '), function(klass, i) {\n var prefix = (i > 0 ? ' ' : '') + klass;\n activeClassName += prefix + '-active';\n pendingClassName += prefix + '-pending';\n });\n\n var style = '';\n var appliedStyles = [];\n var itemIndex = elementData.itemIndex;\n var stagger = elementData.stagger;\n var staggerTime = 0;\n if (itemIndex > 0) {\n var transitionStaggerDelay = 0;\n if (stagger.transitionDelay > 0 && stagger.transitionDuration === 0) {\n transitionStaggerDelay = stagger.transitionDelay * itemIndex;\n }\n\n var animationStaggerDelay = 0;\n if (stagger.animationDelay > 0 && stagger.animationDuration === 0) {\n animationStaggerDelay = stagger.animationDelay * itemIndex;\n appliedStyles.push(CSS_PREFIX + 'animation-play-state');\n }\n\n staggerTime = Math.round(Math.max(transitionStaggerDelay, animationStaggerDelay) * 100) / 100;\n }\n\n if (!staggerTime) {\n element.addClass(activeClassName);\n }\n\n var eventCacheKey = elementData.cacheKey + ' ' + activeClassName;\n var timings = getElementAnimationDetails(element, eventCacheKey);\n var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration);\n if (maxDuration === 0) {\n element.removeClass(activeClassName);\n animateClose(element, className);\n activeAnimationComplete();\n return;\n }\n\n var maxDelay = Math.max(timings.transitionDelay, timings.animationDelay);\n var maxDelayTime = maxDelay * ONE_SECOND;\n\n if (appliedStyles.length > 0) {\n //the element being animated may sometimes contain comment nodes in\n //the jqLite object, so we're safe to use a single variable to house\n //the styles since there is always only one element being animated\n var oldStyle = node.getAttribute('style') || '';\n if (oldStyle.charAt(oldStyle.length-1) !== ';') {\n oldStyle += ';';\n }\n node.setAttribute('style', oldStyle + ' ' + style);\n }\n\n var startTime = Date.now();\n var css3AnimationEvents = ANIMATIONEND_EVENT + ' ' + TRANSITIONEND_EVENT;\n var animationTime = (maxDelay + maxDuration) * CLOSING_TIME_BUFFER;\n var totalTime = (staggerTime + animationTime) * ONE_SECOND;\n\n var staggerTimeout;\n if (staggerTime > 0) {\n element.addClass(pendingClassName);\n staggerTimeout = $timeout(function() {\n staggerTimeout = null;\n element.addClass(activeClassName);\n element.removeClass(pendingClassName);\n if (timings.animationDuration > 0) {\n blockAnimations(node, false);\n }\n }, staggerTime * ONE_SECOND, false);\n }\n\n element.on(css3AnimationEvents, onAnimationProgress);\n elementData.closeAnimationFns.push(function() {\n onEnd();\n activeAnimationComplete();\n });\n\n elementData.running++;\n animationCloseHandler(element, totalTime);\n return onEnd;\n\n // This will automatically be called by $animate so\n // there is no need to attach this internally to the\n // timeout done method.\n function onEnd(cancelled) {\n element.off(css3AnimationEvents, onAnimationProgress);\n element.removeClass(activeClassName);\n element.removeClass(pendingClassName);\n if (staggerTimeout) {\n $timeout.cancel(staggerTimeout);\n }\n animateClose(element, className);\n var node = extractElementNode(element);\n for (var i in appliedStyles) {\n node.style.removeProperty(appliedStyles[i]);\n }\n }\n\n function onAnimationProgress(event) {\n event.stopPropagation();\n var ev = event.originalEvent || event;\n var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now();\n\n /* Firefox (or possibly just Gecko) likes to not round values up\n * when a ms measurement is used for the animation */\n var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));\n\n /* $manualTimeStamp is a mocked timeStamp value which is set\n * within browserTrigger(). This is only here so that tests can\n * mock animations properly. Real events fallback to event.timeStamp,\n * or, if they don't, then a timeStamp is automatically created for them.\n * We're checking to see if the timeStamp surpasses the expected delay,\n * but we're using elapsedTime instead of the timeStamp on the 2nd\n * pre-condition since animations sometimes close off early */\n if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {\n activeAnimationComplete();\n }\n }\n }\n\n function blockTransitions(node, bool) {\n node.style[TRANSITION_PROP + PROPERTY_KEY] = bool ? 'none' : '';\n }\n\n function blockAnimations(node, bool) {\n node.style[ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY] = bool ? 'paused' : '';\n }\n\n function animateBefore(animationEvent, element, className, calculationDecorator) {\n if (animateSetup(animationEvent, element, className, calculationDecorator)) {\n return function(cancelled) {\n cancelled && animateClose(element, className);\n };\n }\n }\n\n function animateAfter(animationEvent, element, className, afterAnimationComplete) {\n if (element.data(NG_ANIMATE_CSS_DATA_KEY)) {\n return animateRun(animationEvent, element, className, afterAnimationComplete);\n } else {\n animateClose(element, className);\n afterAnimationComplete();\n }\n }\n\n function animate(animationEvent, element, className, animationComplete) {\n //If the animateSetup function doesn't bother returning a\n //cancellation function then it means that there is no animation\n //to perform at all\n var preReflowCancellation = animateBefore(animationEvent, element, className);\n if (!preReflowCancellation) {\n animationComplete();\n return;\n }\n\n //There are two cancellation functions: one is before the first\n //reflow animation and the second is during the active state\n //animation. The first function will take care of removing the\n //data from the element which will not make the 2nd animation\n //happen in the first place\n var cancel = preReflowCancellation;\n afterReflow(element, function() {\n //once the reflow is complete then we point cancel to\n //the new cancellation function which will remove all of the\n //animation properties from the active animation\n cancel = animateAfter(animationEvent, element, className, animationComplete);\n });\n\n return function(cancelled) {\n (cancel || noop)(cancelled);\n };\n }\n\n function animateClose(element, className) {\n element.removeClass(className);\n var data = element.data(NG_ANIMATE_CSS_DATA_KEY);\n if (data) {\n if (data.running) {\n data.running--;\n }\n if (!data.running || data.running === 0) {\n element.removeData(NG_ANIMATE_CSS_DATA_KEY);\n }\n }\n }\n\n return {\n enter : function(element, animationCompleted) {\n return animate('enter', element, 'ng-enter', animationCompleted);\n },\n\n leave : function(element, animationCompleted) {\n return animate('leave', element, 'ng-leave', animationCompleted);\n },\n\n move : function(element, animationCompleted) {\n return animate('move', element, 'ng-move', animationCompleted);\n },\n\n beforeSetClass : function(element, add, remove, animationCompleted) {\n var className = suffixClasses(remove, '-remove') + ' ' +\n suffixClasses(add, '-add');\n var cancellationMethod = animateBefore('setClass', element, className);\n if (cancellationMethod) {\n afterReflow(element, animationCompleted);\n return cancellationMethod;\n }\n animationCompleted();\n },\n\n beforeAddClass : function(element, className, animationCompleted) {\n var cancellationMethod = animateBefore('addClass', element, suffixClasses(className, '-add'));\n if (cancellationMethod) {\n afterReflow(element, animationCompleted);\n return cancellationMethod;\n }\n animationCompleted();\n },\n\n beforeRemoveClass : function(element, className, animationCompleted) {\n var cancellationMethod = animateBefore('removeClass', element, suffixClasses(className, '-remove'));\n if (cancellationMethod) {\n afterReflow(element, animationCompleted);\n return cancellationMethod;\n }\n animationCompleted();\n },\n\n setClass : function(element, add, remove, animationCompleted) {\n remove = suffixClasses(remove, '-remove');\n add = suffixClasses(add, '-add');\n var className = remove + ' ' + add;\n return animateAfter('setClass', element, className, animationCompleted);\n },\n\n addClass : function(element, className, animationCompleted) {\n return animateAfter('addClass', element, suffixClasses(className, '-add'), animationCompleted);\n },\n\n removeClass : function(element, className, animationCompleted) {\n return animateAfter('removeClass', element, suffixClasses(className, '-remove'), animationCompleted);\n }\n };\n\n function suffixClasses(classes, suffix) {\n var className = '';\n classes = isArray(classes) ? classes : classes.split(/\\s+/);\n forEach(classes, function(klass, i) {\n if (klass && klass.length > 0) {\n className += (i > 0 ? ' ' : '') + klass + suffix;\n }\n });\n return className;\n }\n }]);\n }]);\n\n\n})(window, window.angular);\n","/*\n * angular-elastic v2.3.6\n * (c) 2014 Monospaced http://monospaced.com\n * License: MIT\n */\n\nangular.module('monospaced.elastic', [])\n\n .constant('msdElasticConfig', {\n append: ''\n })\n\n .directive('msdElastic', [\n '$timeout', '$window', 'msdElasticConfig',\n function($timeout, $window, config) {\n 'use strict';\n\n return {\n require: 'ngModel',\n restrict: 'A, C',\n link: function(scope, element, attrs, ngModel) {\n\n // cache a reference to the DOM element\n var ta = element[0],\n $ta = element;\n\n // ensure the element is a textarea, and browser is capable\n if (ta.nodeName !== 'TEXTAREA' || !$window.getComputedStyle) {\n return;\n }\n\n // set these properties before measuring dimensions\n $ta.css({\n 'overflow': 'hidden',\n 'overflow-y': 'hidden',\n 'word-wrap': 'break-word'\n });\n\n // force text reflow\n var text = ta.value;\n ta.value = '';\n ta.value = text;\n\n var append = attrs.msdElastic ? attrs.msdElastic.replace(/\\\\n/g, '\\n') : config.append,\n $win = angular.element($window),\n mirrorStyle = 'position: absolute; top: -999px; right: auto; bottom: auto;' +\n 'left: 0; overflow: hidden; -webkit-box-sizing: content-box;' +\n '-moz-box-sizing: content-box; box-sizing: content-box;' +\n 'min-height: 0 !important; height: 0 !important; padding: 0;' +\n 'word-wrap: break-word; border: 0;',\n $mirror = angular.element('').data('elastic', true),\n mirror = $mirror[0],\n taStyle = getComputedStyle(ta),\n resize = taStyle.getPropertyValue('resize'),\n borderBox = taStyle.getPropertyValue('box-sizing') === 'border-box' ||\n taStyle.getPropertyValue('-moz-box-sizing') === 'border-box' ||\n taStyle.getPropertyValue('-webkit-box-sizing') === 'border-box',\n boxOuter = !borderBox ? {width: 0, height: 0} : {\n width: parseInt(taStyle.getPropertyValue('border-right-width'), 10) +\n parseInt(taStyle.getPropertyValue('padding-right'), 10) +\n parseInt(taStyle.getPropertyValue('padding-left'), 10) +\n parseInt(taStyle.getPropertyValue('border-left-width'), 10),\n height: parseInt(taStyle.getPropertyValue('border-top-width'), 10) +\n parseInt(taStyle.getPropertyValue('padding-top'), 10) +\n parseInt(taStyle.getPropertyValue('padding-bottom'), 10) +\n parseInt(taStyle.getPropertyValue('border-bottom-width'), 10)\n },\n minHeightValue = parseInt(taStyle.getPropertyValue('min-height'), 10),\n heightValue = parseInt(taStyle.getPropertyValue('height'), 10),\n minHeight = Math.max(minHeightValue, heightValue) - boxOuter.height,\n maxHeight = parseInt(taStyle.getPropertyValue('max-height'), 10),\n mirrored,\n active,\n copyStyle = ['font-family',\n 'font-size',\n 'font-weight',\n 'font-style',\n 'letter-spacing',\n 'line-height',\n 'text-transform',\n 'word-spacing',\n 'text-indent'];\n\n // exit if elastic already applied (or is the mirror element)\n if ($ta.data('elastic')) {\n return;\n }\n\n // Opera returns max-height of -1 if not set\n maxHeight = maxHeight && maxHeight > 0 ? maxHeight : 9e4;\n\n // append mirror to the DOM\n if (mirror.parentNode !== document.body) {\n angular.element(document.body).append(mirror);\n }\n\n // set resize and apply elastic\n $ta.css({\n 'resize': (resize === 'none' || resize === 'vertical') ? 'none' : 'horizontal'\n }).data('elastic', true);\n\n /*\n * methods\n */\n\n function initMirror() {\n mirrored = ta;\n // copy the essential styles from the textarea to the mirror\n taStyle = getComputedStyle(ta);\n angular.forEach(copyStyle, function(val) {\n mirrorStyle += val + ':' + taStyle.getPropertyValue(val) + ';';\n });\n mirror.setAttribute('style', mirrorStyle);\n }\n\n function adjust() {\n var taHeight,\n taComputedStyleWidth,\n mirrorHeight,\n width,\n overflow;\n\n if (mirrored !== ta) {\n initMirror();\n }\n\n // active flag prevents actions in function from calling adjust again\n if (!active) {\n active = true;\n\n mirror.value = ta.value + append; // optional whitespace to improve animation\n mirror.style.overflowY = ta.style.overflowY;\n\n taHeight = ta.style.height === '' ? 'auto' : parseInt(ta.style.height, 10);\n\n taComputedStyleWidth = getComputedStyle(ta).getPropertyValue('width');\n\n // ensure getComputedStyle has returned a readable 'used value' pixel width\n if (taComputedStyleWidth.substr(taComputedStyleWidth.length - 2, 2) === 'px') {\n // update mirror width in case the textarea width has changed\n width = parseInt(taComputedStyleWidth, 10) - boxOuter.width;\n mirror.style.width = width + 'px';\n }\n\n mirrorHeight = mirror.scrollHeight;\n\n if (mirrorHeight > maxHeight) {\n mirrorHeight = maxHeight;\n overflow = 'scroll';\n } else if (mirrorHeight < minHeight) {\n mirrorHeight = minHeight;\n }\n mirrorHeight += boxOuter.height;\n\n ta.style.overflowY = overflow || 'hidden';\n\n if (taHeight !== mirrorHeight) {\n ta.style.height = mirrorHeight + 'px';\n scope.$emit('elastic:resize', $ta);\n }\n\n // small delay to prevent an infinite loop\n $timeout(function() {\n active = false;\n }, 1);\n\n }\n }\n\n function forceAdjust() {\n active = false;\n adjust();\n }\n\n /*\n * initialise\n */\n\n // listen\n if ('onpropertychange' in ta && 'oninput' in ta) {\n // IE9\n ta['oninput'] = ta.onkeyup = adjust;\n } else {\n ta['oninput'] = adjust;\n }\n\n $win.bind('resize', forceAdjust);\n\n scope.$watch(function() {\n return ngModel.$modelValue;\n }, function(newValue) {\n forceAdjust();\n });\n\n scope.$on('elastic:adjust', function() {\n forceAdjust();\n });\n\n $timeout(adjust);\n\n /*\n * destroy\n */\n\n scope.$on('$destroy', function() {\n $mirror.remove();\n $win.unbind('resize', forceAdjust);\n });\n }\n };\n }\n ]);\n","/**\n * @license AngularJS v1.3.0-rc.3\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\nvar $resourceMinErr = angular.$$minErr('$resource');\n\n// Helper functions and regex to lookup a dotted path on an object\n// stopping at undefined/null. The path must be composed of ASCII\n// identifiers (just like $parse)\nvar MEMBER_NAME_REGEX = /^(\\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;\n\nfunction isValidDottedPath(path) {\n return (path != null && path !== '' && path !== 'hasOwnProperty' &&\n MEMBER_NAME_REGEX.test('.' + path));\n}\n\nfunction lookupDottedPath(obj, path) {\n if (!isValidDottedPath(path)) {\n throw $resourceMinErr('badmember', 'Dotted member path \"@{0}\" is invalid.', path);\n }\n var keys = path.split('.');\n for (var i = 0, ii = keys.length; i < ii && obj !== undefined; i++) {\n var key = keys[i];\n obj = (obj !== null) ? obj[key] : undefined;\n }\n return obj;\n}\n\n/**\n * Create a shallow copy of an object and clear other fields from the destination\n */\nfunction shallowClearAndCopy(src, dst) {\n dst = dst || {};\n\n angular.forEach(dst, function(value, key){\n delete dst[key];\n });\n\n for (var key in src) {\n if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n dst[key] = src[key];\n }\n }\n\n return dst;\n}\n\n/**\n * @ngdoc module\n * @name ngResource\n * @description\n *\n * # ngResource\n *\n * The `ngResource` module provides interaction support with RESTful services\n * via the $resource service.\n *\n *\n * \n *\n * See {@link ngResource.$resource `$resource`} for usage.\n */\n\n/**\n * @ngdoc service\n * @name $resource\n * @requires $http\n *\n * @description\n * A factory which creates a resource object that lets you interact with\n * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.\n *\n * The returned resource object has action methods which provide high-level behaviors without\n * the need to interact with the low level {@link ng.$http $http} service.\n *\n * Requires the {@link ngResource `ngResource`} module to be installed.\n *\n * By default, trailing slashes will be stripped from the calculated URLs,\n * which can pose problems with server backends that do not expect that\n * behavior. This can be disabled by configuring the `$resourceProvider` like\n * this:\n *\n * ```js\n app.config(['$resourceProvider', function ($resourceProvider) {\n // Don't strip trailing slashes from calculated URLs\n $resourceProvider.defaults.stripTrailingSlashes = false;\n }]);\n * ```\n *\n * @param {string} url A parametrized URL template with parameters prefixed by `:` as in\n * `/user/:username`. If you are using a URL with a port number (e.g.\n * `http://example.com:8080/api`), it will be respected.\n *\n * If you are using a url with a suffix, just add the suffix, like this:\n * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')`\n * or even `$resource('http://example.com/resource/:resource_id.:format')`\n * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be\n * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you\n * can escape it with `/\\.`.\n *\n * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in\n * `actions` methods. If any of the parameter value is a function, it will be executed every time\n * when a param value needs to be obtained for a request (unless the param was overridden).\n *\n * Each key value in the parameter object is first bound to url template if present and then any\n * excess keys are appended to the url search query after the `?`.\n *\n * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in\n * URL `/path/greet?salutation=Hello`.\n *\n * If the parameter value is prefixed with `@` then the value for that parameter will be extracted\n * from the corresponding property on the `data` object (provided when calling an action method). For\n * example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam`\n * will be `data.someProp`.\n *\n * @param {Object.=} actions Hash with declaration of custom action that should extend\n * the default set of resource actions. The declaration should be created in the format of {@link\n * ng.$http#usage_parameters $http.config}:\n *\n * {action1: {method:?, params:?, isArray:?, headers:?, ...},\n * action2: {method:?, params:?, isArray:?, headers:?, ...},\n * ...}\n *\n * Where:\n *\n * - **`action`** – {string} – The name of action. This name becomes the name of the method on\n * your resource object.\n * - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`,\n * `DELETE`, `JSONP`, etc).\n * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of\n * the parameter value is a function, it will be executed every time when a param value needs to\n * be obtained for a request (unless the param was overridden).\n * - **`url`** – {string} – action specific `url` override. The url templating is supported just\n * like for the resource-level urls.\n * - **`isArray`** – {boolean=} – If true then the returned object for this action is an array,\n * see `returns` section.\n * - **`transformRequest`** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * request body and headers and returns its transformed (typically serialized) version.\n * By default, transformRequest will contain one function that checks if the request data is\n * an object and serializes to using `angular.toJson`. To prevent this behavior, set\n * `transformRequest` to an empty array: `transformRequest: []`\n * - **`transformResponse`** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * response body and headers and returns its transformed (typically deserialized) version.\n * By default, transformResponse will contain one function that checks if the response looks like\n * a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior, set\n * `transformResponse` to an empty array: `transformResponse: []`\n * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the\n * GET request, otherwise if a cache instance built with\n * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for\n * caching.\n * - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that\n * should abort the request when resolved.\n * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the\n * XHR object. See\n * [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)\n * for more information.\n * - **`responseType`** - `{string}` - see\n * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).\n * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -\n * `response` and `responseError`. Both `response` and `responseError` interceptors get called\n * with `http response` object. See {@link ng.$http $http interceptors}.\n *\n * @param {Object} options Hash with custom settings that should extend the\n * default `$resourceProvider` behavior. The only supported option is\n *\n * Where:\n *\n * - **`stripTrailingSlashes`** – {boolean} – If true then the trailing\n * slashes from any calculated URL will be stripped. (Defaults to true.)\n *\n * @returns {Object} A resource \"class\" object with methods for the default set of resource actions\n * optionally extended with custom `actions`. The default set contains these actions:\n * ```js\n * { 'get': {method:'GET'},\n * 'save': {method:'POST'},\n * 'query': {method:'GET', isArray:true},\n * 'remove': {method:'DELETE'},\n * 'delete': {method:'DELETE'} };\n * ```\n *\n * Calling these methods invoke an {@link ng.$http} with the specified http method,\n * destination and parameters. When the data is returned from the server then the object is an\n * instance of the resource class. The actions `save`, `remove` and `delete` are available on it\n * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create,\n * read, update, delete) on server-side data like this:\n * ```js\n * var User = $resource('/user/:userId', {userId:'@id'});\n * var user = User.get({userId:123}, function() {\n * user.abc = true;\n * user.$save();\n * });\n * ```\n *\n * It is important to realize that invoking a $resource object method immediately returns an\n * empty reference (object or array depending on `isArray`). Once the data is returned from the\n * server the existing reference is populated with the actual data. This is a useful trick since\n * usually the resource is assigned to a model which is then rendered by the view. Having an empty\n * object results in no rendering, once the data arrives from the server then the object is\n * populated with the data and the view automatically re-renders itself showing the new data. This\n * means that in most cases one never has to write a callback function for the action methods.\n *\n * The action methods on the class object or instance object can be invoked with the following\n * parameters:\n *\n * - HTTP GET \"class\" actions: `Resource.action([parameters], [success], [error])`\n * - non-GET \"class\" actions: `Resource.action([parameters], postData, [success], [error])`\n * - non-GET instance actions: `instance.$action([parameters], [success], [error])`\n *\n * Success callback is called with (value, responseHeaders) arguments. Error callback is called\n * with (httpResponse) argument.\n *\n * Class actions return empty instance (with additional properties below).\n * Instance actions return promise of the action.\n *\n * The Resource instances and collection have these additional properties:\n *\n * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this\n * instance or collection.\n *\n * On success, the promise is resolved with the same resource instance or collection object,\n * updated with data from server. This makes it easy to use in\n * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view\n * rendering until the resource(s) are loaded.\n *\n * On failure, the promise is resolved with the {@link ng.$http http response} object, without\n * the `resource` property.\n *\n * If an interceptor object was provided, the promise will instead be resolved with the value\n * returned by the interceptor.\n *\n * - `$resolved`: `true` after first server interaction is completed (either with success or\n * rejection), `false` before that. Knowing if the Resource has been resolved is useful in\n * data-binding.\n *\n * @example\n *\n * # Credit card resource\n *\n * ```js\n // Define CreditCard class\n var CreditCard = $resource('/user/:userId/card/:cardId',\n {userId:123, cardId:'@id'}, {\n charge: {method:'POST', params:{charge:true}}\n });\n\n // We can retrieve a collection from the server\n var cards = CreditCard.query(function() {\n // GET: /user/123/card\n // server returns: [ {id:456, number:'1234', name:'Smith'} ];\n\n var card = cards[0];\n // each item is an instance of CreditCard\n expect(card instanceof CreditCard).toEqual(true);\n card.name = \"J. Smith\";\n // non GET methods are mapped onto the instances\n card.$save();\n // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}\n // server returns: {id:456, number:'1234', name: 'J. Smith'};\n\n // our custom method is mapped as well.\n card.$charge({amount:9.99});\n // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}\n });\n\n // we can create an instance as well\n var newCard = new CreditCard({number:'0123'});\n newCard.name = \"Mike Smith\";\n newCard.$save();\n // POST: /user/123/card {number:'0123', name:'Mike Smith'}\n // server returns: {id:789, number:'0123', name: 'Mike Smith'};\n expect(newCard.id).toEqual(789);\n * ```\n *\n * The object returned from this function execution is a resource \"class\" which has \"static\" method\n * for each action in the definition.\n *\n * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and\n * `headers`.\n * When the data is returned from the server then the object is an instance of the resource type and\n * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD\n * operations (create, read, update, delete) on server-side data.\n\n ```js\n var User = $resource('/user/:userId', {userId:'@id'});\n User.get({userId:123}, function(user) {\n user.abc = true;\n user.$save();\n });\n ```\n *\n * It's worth noting that the success callback for `get`, `query` and other methods gets passed\n * in the response that came from the server as well as $http header getter function, so one\n * could rewrite the above example and get access to http headers as:\n *\n ```js\n var User = $resource('/user/:userId', {userId:'@id'});\n User.get({userId:123}, function(u, getResponseHeaders){\n u.abc = true;\n u.$save(function(u, putResponseHeaders) {\n //u => saved user object\n //putResponseHeaders => $http header getter\n });\n });\n ```\n *\n * You can also access the raw `$http` promise via the `$promise` property on the object returned\n *\n ```\n var User = $resource('/user/:userId', {userId:'@id'});\n User.get({userId:123})\n .$promise.then(function(user) {\n $scope.user = user;\n });\n ```\n\n * # Creating a custom 'PUT' request\n * In this example we create a custom method on our resource to make a PUT request\n * ```js\n * var app = angular.module('app', ['ngResource', 'ngRoute']);\n *\n * // Some APIs expect a PUT request in the format URL/object/ID\n * // Here we are creating an 'update' method\n * app.factory('Notes', ['$resource', function($resource) {\n * return $resource('/notes/:id', null,\n * {\n * 'update': { method:'PUT' }\n * });\n * }]);\n *\n * // In our controller we get the ID from the URL using ngRoute and $routeParams\n * // We pass in $routeParams and our Notes factory along with $scope\n * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',\n function($scope, $routeParams, Notes) {\n * // First get a note object from the factory\n * var note = Notes.get({ id:$routeParams.id });\n * $id = note.id;\n *\n * // Now call update passing in the ID first then the object you are updating\n * Notes.update({ id:$id }, note);\n *\n * // This will PUT /notes/ID with the note object in the request payload\n * }]);\n * ```\n */\nangular.module('ngResource', ['ng']).\n provider('$resource', function () {\n var provider = this;\n\n this.defaults = {\n // Strip slashes by default\n stripTrailingSlashes: true,\n\n // Default actions configuration\n actions: {\n 'get': {method: 'GET'},\n 'save': {method: 'POST'},\n 'query': {method: 'GET', isArray: true},\n 'remove': {method: 'DELETE'},\n 'delete': {method: 'DELETE'}\n }\n };\n\n this.$get = ['$http', '$q', function ($http, $q) {\n\n var noop = angular.noop,\n forEach = angular.forEach,\n extend = angular.extend,\n copy = angular.copy,\n isFunction = angular.isFunction;\n\n /**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set\n * (pchar) allowed in path segments:\n * segment = *pchar\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\n function encodeUriSegment(val) {\n return encodeUriQuery(val, true).\n replace(/%26/gi, '&').\n replace(/%3D/gi, '=').\n replace(/%2B/gi, '+');\n }\n\n\n /**\n * This method is intended for encoding *key* or *value* parts of query component. We need a\n * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per http://tools.ietf.org/html/rfc3986:\n * query = *( pchar / \"/\" / \"?\" )\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\n function encodeUriQuery(val, pctEncodeSpaces) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n }\n\n function Route(template, defaults) {\n this.template = template;\n this.defaults = extend({}, provider.defaults, defaults);\n this.urlParams = {};\n }\n\n Route.prototype = {\n setUrlParams: function (config, params, actionUrl) {\n var self = this,\n url = actionUrl || self.template,\n val,\n encodedVal;\n\n var urlParams = self.urlParams = {};\n forEach(url.split(/\\W/), function (param) {\n if (param === 'hasOwnProperty') {\n throw $resourceMinErr('badname', \"hasOwnProperty is not a valid parameter name.\");\n }\n if (!(new RegExp(\"^\\\\d+$\").test(param)) && param &&\n (new RegExp(\"(^|[^\\\\\\\\]):\" + param + \"(\\\\W|$)\").test(url))) {\n urlParams[param] = true;\n }\n });\n url = url.replace(/\\\\:/g, ':');\n\n params = params || {};\n forEach(self.urlParams, function (_, urlParam) {\n val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];\n if (angular.isDefined(val) && val !== null) {\n encodedVal = encodeUriSegment(val);\n url = url.replace(new RegExp(\":\" + urlParam + \"(\\\\W|$)\", \"g\"), function (match, p1) {\n return encodedVal + p1;\n });\n } else {\n url = url.replace(new RegExp(\"(\\/?):\" + urlParam + \"(\\\\W|$)\", \"g\"), function (match,\n leadingSlashes, tail) {\n if (tail.charAt(0) == '/') {\n return tail;\n } else {\n return leadingSlashes + tail;\n }\n });\n }\n });\n\n // strip trailing slashes and set the url (unless this behavior is specifically disabled)\n if (self.defaults.stripTrailingSlashes) {\n url = url.replace(/\\/+$/, '') || '/';\n }\n\n // then replace collapse `/.` if found in the last URL path segment before the query\n // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`\n url = url.replace(/\\/\\.(?=\\w+($|\\?))/, '.');\n // replace escaped `/\\.` with `/.`\n config.url = url.replace(/\\/\\\\\\./, '/.');\n\n\n // set params - delegate param encoding to $http\n forEach(params, function (value, key) {\n if (!self.urlParams[key]) {\n config.params = config.params || {};\n config.params[key] = value;\n }\n });\n }\n };\n\n\n function resourceFactory(url, paramDefaults, actions, options) {\n var route = new Route(url, options);\n\n actions = extend({}, provider.defaults.actions, actions);\n\n function extractParams(data, actionParams) {\n var ids = {};\n actionParams = extend({}, paramDefaults, actionParams);\n forEach(actionParams, function (value, key) {\n if (isFunction(value)) { value = value(); }\n ids[key] = value && value.charAt && value.charAt(0) == '@' ?\n lookupDottedPath(data, value.substr(1)) : value;\n });\n return ids;\n }\n\n function defaultResponseInterceptor(response) {\n return response.resource;\n }\n\n function Resource(value) {\n shallowClearAndCopy(value || {}, this);\n }\n\n Resource.prototype.toJSON = function () {\n var data = extend({}, this);\n delete data.$promise;\n delete data.$resolved;\n return data;\n };\n\n forEach(actions, function (action, name) {\n var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);\n\n Resource[name] = function (a1, a2, a3, a4) {\n var params = {}, data, success, error;\n\n /* jshint -W086 */ /* (purposefully fall through case statements) */\n switch (arguments.length) {\n case 4:\n error = a4;\n success = a3;\n //fallthrough\n case 3:\n case 2:\n if (isFunction(a2)) {\n if (isFunction(a1)) {\n success = a1;\n error = a2;\n break;\n }\n\n success = a2;\n error = a3;\n //fallthrough\n } else {\n params = a1;\n data = a2;\n success = a3;\n break;\n }\n case 1:\n if (isFunction(a1)) success = a1;\n else if (hasBody) data = a1;\n else params = a1;\n break;\n case 0: break;\n default:\n throw $resourceMinErr('badargs',\n \"Expected up to 4 arguments [params, data, success, error], got {0} arguments\",\n arguments.length);\n }\n /* jshint +W086 */ /* (purposefully fall through case statements) */\n\n var isInstanceCall = this instanceof Resource;\n var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));\n var httpConfig = {};\n var responseInterceptor = action.interceptor && action.interceptor.response ||\n defaultResponseInterceptor;\n var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||\n undefined;\n\n forEach(action, function (value, key) {\n if (key != 'params' && key != 'isArray' && key != 'interceptor') {\n httpConfig[key] = copy(value);\n }\n });\n\n if (hasBody) httpConfig.data = data;\n route.setUrlParams(httpConfig,\n extend({}, extractParams(data, action.params || {}), params),\n action.url);\n\n var promise = $http(httpConfig).then(function (response) {\n var data = response.data,\n promise = value.$promise;\n\n if (data) {\n // Need to convert action.isArray to boolean in case it is undefined\n // jshint -W018\n if (angular.isArray(data) !== (!!action.isArray)) {\n throw $resourceMinErr('badcfg',\n 'Error in resource configuration for action `{0}`. Expected response to ' +\n 'contain an {1} but got an {2}', name, action.isArray ? 'array' : 'object',\n angular.isArray(data) ? 'array' : 'object');\n }\n // jshint +W018\n if (action.isArray) {\n value.length = 0;\n forEach(data, function (item) {\n if (typeof item === \"object\") {\n value.push(new Resource(item));\n } else {\n // Valid JSON values may be string literals, and these should not be converted\n // into objects. These items will not have access to the Resource prototype\n // methods, but unfortunately there\n value.push(item);\n }\n });\n } else {\n shallowClearAndCopy(data, value);\n value.$promise = promise;\n }\n }\n\n value.$resolved = true;\n\n response.resource = value;\n\n return response;\n }, function (response) {\n value.$resolved = true;\n\n (error || noop)(response);\n\n return $q.reject(response);\n });\n\n promise = promise.then(\n function (response) {\n var value = responseInterceptor(response);\n (success || noop)(value, response.headers);\n return value;\n },\n responseErrorInterceptor);\n\n if (!isInstanceCall) {\n // we are creating instance / collection\n // - set the initial promise\n // - return the instance / collection\n value.$promise = promise;\n value.$resolved = false;\n\n return value;\n }\n\n // instance call\n return promise;\n };\n\n\n Resource.prototype['$' + name] = function (params, success, error) {\n if (isFunction(params)) {\n error = success; success = params; params = {};\n }\n var result = Resource[name].call(this, params, this, success, error);\n return result.$promise || result;\n };\n });\n\n Resource.bind = function (additionalParamDefaults) {\n return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);\n };\n\n return Resource;\n }\n\n return resourceFactory;\n }];\n });\n\n\n})(window, window.angular);\n","var hljs=new function(){function k(v){return v.replace(/&/gm,\"&\").replace(//gm,\">\")}function t(v){return v.nodeName.toLowerCase()}function i(w,x){var v=w&&w.exec(x);return v&&v.index==0}function d(v){return Array.prototype.map.call(v.childNodes,function(w){if(w.nodeType==3){return b.useBR?w.nodeValue.replace(/\\n/g,\"\"):w.nodeValue}if(t(w)==\"br\"){return\"\\n\"}return d(w)}).join(\"\")}function r(w){var v=(w.className+\" \"+(w.parentNode?w.parentNode.className:\"\")).split(/\\s+/);v=v.map(function(x){return x.replace(/^language-/,\"\")});return v.filter(function(x){return j(x)||x==\"no-highlight\"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)==\"br\"){z+=1}else{if(A.nodeType==1){v.push({event:\"start\",offset:z,node:A});z=w(A,z);v.push({event:\"stop\",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F=\"\";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset
tag\n * @ngInject\n */\n function renderWhitespaceCharacters() {\n var WHITESPACES = {\n 'space' : {\n 'regex' : / /g,\n 'template' : ' '\n },\n 'newline' : {\n 'regex' : /\\n/g,\n 'template' : '\\n'\n },\n 'tab' : {\n 'regex' : /\\t/g,\n 'template' : '\\t'\n }\n };\n\n return {\n restrict: 'A',\n required: ['ngBind'],\n scope: {\n ngBind: '='\n },\n\n link: function compile(scope, element) {\n scope.$watch('ngBind', function (value) {\n value = replaceChar(value, WHITESPACES.space);\n value = replaceChar(value, WHITESPACES.newline);\n value = replaceChar(value, WHITESPACES.tab);\n element.html(value);\n });\n }\n };\n\n function replaceChar(value, whitespaceChar) {\n return value.replace(whitespaceChar.regex, whitespaceChar.template);\n }\n }\n\n angular\n .module('app')\n .directive('renderWhitespaceCharacters', renderWhitespaceCharacters);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name ScrollbarWidthCtrl\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n function ScrollbarWidthCtrl() {\n var scrollbarWidthCtrl = this;\n\n scrollbarWidthCtrl.init = function() {\n var container = scrollbarWidthCtrl.container[0],\n child = scrollbarWidthCtrl.child[0],\n scrollbarWidth = child.offsetWidth - container.offsetWidth;\n\n scrollbarWidthCtrl.width = scrollbarWidth / 2;\n };\n\n }\n\n angular\n .module('app')\n .controller('ScrollbarWidthCtrl', ScrollbarWidthCtrl);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name scrollbarWidth\n *\n * @description\n * Scrollbar width container\n * Needed for the controller to reference all properties\n */\n function scrollbarWidth() {\n return {\n restrict: 'A',\n controller: 'ScrollbarWidthCtrl as scrollbarWidthCtrl',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n scrollbarWidthCtrl.init(element);\n }\n };\n }\n\n /**\n * @name scrollbarWidthElement\n *\n * @description\n * The element to add the scrollbar width to\n */\n function scrollbarWidthElement() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n // Use the attribute to decide which property to set\n element.css(attrs.scrollbarWidthElement, scrollbarWidthCtrl.width);\n }\n };\n }\n\n /**\n * @name scrollbarWidthContainer\n *\n * @description\n * Get the scrollbar container width\n */\n function scrollbarWidthContainer() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.container = element;\n }\n };\n }\n\n /**\n * @name scrollbarWidthChild\n *\n * @description\n * Get the scrollbar child width\n */\n function scrollbarWidthChild() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.child = element;\n }\n };\n }\n\n angular\n .module('app')\n .directive('scrollbarWidth', scrollbarWidth)\n .directive('scrollbarWidthElement', scrollbarWidthElement)\n .directive('scrollbarWidthContainer', scrollbarWidthContainer)\n .directive('scrollbarWidthChild', scrollbarWidthChild);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name toggle-checkbox\n * @description Add an extra element to a checkbox to\n * so we can style it differently\n * @ngInject\n */\n function toggleCheckbox() {\n return {\n restrict: 'A',\n link: function(scope, element) {\n element.after('');\n }\n };\n }\n\n angular\n .module('app')\n .directive('toggleCheckbox', toggleCheckbox);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * @typedef {Object} StatusInfo\n * @property {string} ID lower case translation status (content state)\n * @property {string} NAME capitalized representation\n * @property {string} CSSCLASS css class to use for this status\n *\n */\n /**\n * TransStatusService.js\n *\n * @ngInject\n */\n function TransStatusService(_) {\n var transStatusService = this,\n STATUSES = {\n 'UNTRANSLATED': {\n 'ID': 'untranslated',\n 'NAME': 'Untranslated',\n 'CSSCLASS': 'neutral'\n },\n 'NEEDSWORK': {\n 'ID': 'needswork',\n 'NAME': 'Needs Work',\n 'CSSCLASS': 'unsure'\n },\n 'TRANSLATED' : {\n 'ID': 'translated',\n 'NAME': 'Translated',\n 'CSSCLASS': 'success'\n },\n 'APPROVED': {\n 'ID': 'approved',\n 'NAME': 'Approved',\n 'CSSCLASS': 'highlight'\n }\n };\n\n transStatusService.getAll = function() {\n return STATUSES;\n };\n\n transStatusService.getAllAsArray = function() {\n return _.values(STATUSES);\n };\n\n /**\n *\n * @param {string} statusKey string representation of the status.\n * @returns {StatusInfo}\n */\n transStatusService.getStatusInfo = function(statusKey) {\n return STATUSES[conformStatus(statusKey)];\n };\n\n transStatusService.getId = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].ID;\n };\n\n transStatusService.getServerId = function(statusId) {\n return serverStatusId(statusId);\n };\n\n transStatusService.getName = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].NAME;\n };\n\n transStatusService.getCSSClass = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].CSSCLASS;\n };\n\n /**\n * Conform it to uppercase for lookups and\n * temporary fix for server sending \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function conformStatus(statusKey) {\n statusKey = angular.uppercase(statusKey);\n if (!statusKey || statusKey === 'NEW') {\n statusKey = 'UNTRANSLATED';\n } else if (statusKey === 'NEEDREVIEW') {\n statusKey = 'NEEDSWORK';\n }\n return statusKey;\n }\n\n /**\n * Conform it to PascalCase for lookups and\n * temporary fix for server receiving \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function serverStatusId(statusId) {\n statusId = angular.lowercase(statusId);\n if (!statusId || statusId === 'untranslated') {\n return 'New';\n } else if (statusId === 'needswork') {\n return 'NeedReview';\n }\n return statusId.charAt(0).toUpperCase() + statusId.slice(1).toLowerCase();\n }\n\n return transStatusService;\n }\n\n angular\n .module('app')\n .factory('TransStatusService', TransStatusService);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitCtrl.js\n * @ngInject\n */\n function TransUnitCtrl($scope, $element, $stateParams, _,\n TransUnitService, EventService, LocaleService, focus,\n EditorShortcuts, PhraseUtil) {\n\n var transUnitCtrl = this;\n\n transUnitCtrl.selected = false;\n transUnitCtrl.focused = false;\n transUnitCtrl.focusedTranslationIndex = 0;\n\n transUnitCtrl.hasTranslationChanged =\n PhraseUtil.hasTranslationChanged;\n\n transUnitCtrl.focusTranslation = function() {\n if(transUnitCtrl.selected) {\n focus('phrase-' + $scope.phrase.id + '-' +\n transUnitCtrl.focusedTranslationIndex);\n }\n };\n\n // when user clicked on TU or using tab to nav\n transUnitCtrl.onTextAreaFocus = function(phrase, index) {\n transUnitCtrl.focused = true;\n if (!_.isUndefined(index)) {\n transUnitCtrl.focusedTranslationIndex = index;\n }\n if(!transUnitCtrl.selected) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': phrase.id,\n 'updateURL': true,\n 'focus': true\n }, $scope);\n }\n };\n\n transUnitCtrl.translationTextModified = function(phrase) {\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n };\n\n transUnitCtrl.getPhrase = function() {\n return $scope.phrase;\n };\n\n transUnitCtrl.init = function() {\n TransUnitService.addController($scope.phrase.id, transUnitCtrl);\n if($stateParams.id && parseInt($stateParams.id) === $scope.phrase.id) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $stateParams.id,\n 'updateURL': false,\n 'focus' : $stateParams.selected});\n }\n };\n\n transUnitCtrl.copySource = function($event, phrase, sourceIndex) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n {'phrase': phrase, 'sourceIndex': sourceIndex}, $scope);\n };\n\n transUnitCtrl.undoEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.cancelEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.saveAs = function($event, phrase, status) {\n EditorShortcuts.saveTranslationCallBack($event, phrase, status);\n };\n\n transUnitCtrl.getLocaleName = function(localeId) {\n return LocaleService.getName(localeId);\n };\n\n transUnitCtrl.toggleSaveAsOptions = function(open) {\n EventService.broadcastEvent( open ? 'openDropdown': 'closeDropdown',\n {}, $scope);\n if (open) {\n // focus on the first dropdown option\n focus($scope.phrase.id + '-saveAsOption-0');\n }\n };\n\n transUnitCtrl.cancelSaveAsMode = function() {\n EditorShortcuts.cancelSaveAsModeIfOn();\n };\n\n $scope.$on('$destroy', function () {\n $element.unbind('click', onTransUnitClick);\n $element.unbind('focus', onTransUnitClick);\n });\n\n transUnitCtrl.updateSaveButton = function (phrase) {\n transUnitCtrl.saveButtonStatus =\n PhraseUtil.getSaveButtonStatus($scope.phrase);\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n $scope.phrase);\n transUnitCtrl.saveButtonText = transUnitCtrl.saveButtonStatus.NAME;\n transUnitCtrl.saveButtonDisabled =\n !PhraseUtil.hasTranslationChanged(phrase);\n transUnitCtrl.loadingClass = '';\n transUnitCtrl.savingStatus = '';\n };\n\n transUnitCtrl.phraseSaving = function (data) {\n transUnitCtrl.loadingClass = 'is-loading';\n transUnitCtrl.saveButtonStatus =\n transUnitCtrl.savingStatus = data.status;\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n data.phrase);\n transUnitCtrl.saveButtonText = 'Saving…';\n transUnitCtrl.saveButtonDisabled = true;\n };\n\n transUnitCtrl.saveButtonOptionsAvailable = function() {\n return !_.isEmpty(transUnitCtrl.saveButtonOptions);\n };\n\n transUnitCtrl.selectTransUnit = function(phrase) {\n if (!transUnitCtrl.selected) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': phrase.id,\n 'updateURL': true,\n 'focus': true\n }, $scope);\n }\n };\n\n function onTransUnitClick() {\n if(!transUnitCtrl.selected) {\n $scope.$apply(function () {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $scope.phrase.id,\n 'updateURL': true,\n 'focus': true}, $scope);\n });\n }\n }\n\n return transUnitCtrl;\n }\n\n angular\n .module('app')\n .controller('TransUnitCtrl', TransUnitCtrl);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitService\n *\n * See PhraseService.transformToPhrases function for phrase definition.\n *\n * @ngInject\n */\n function TransUnitService(_, $location, $rootScope, $state, $stateParams,\n $filter, MessageHandler, EventService, TransStatusService, PRODUCTION,\n EditorShortcuts, PhraseUtil, $timeout) {\n var transUnitService = this,\n controllerList = {},\n selectedTUId;\n\n transUnitService.addController = function(id, controller) {\n controllerList[id] = controller;\n };\n\n transUnitService.getSaveButtonOptions = function(saveButtonStatus, phrase) {\n return filterSaveButtonOptions(saveButtonStatus, phrase);\n };\n\n $rootScope.$on(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n function(event, data) {\n var transUnitCtrl = controllerList[data.id];\n if (transUnitCtrl) {\n transUnitCtrl.toggleSaveAsOptions(data.open);\n }\n });\n\n /**\n * EventService.EVENT.SELECT_TRANS_UNIT listener\n * - Select and focus a trans-unit.\n * - Perform implicit save on previous selected TU if changed\n * - Update url with TU id without reload state\n */\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n var newTuController = controllerList[data.id],\n oldTUController = controllerList[selectedTUId],\n updateURL = data.updateURL;\n\n if(newTuController) {\n EditorShortcuts.selectedTUCtrl = newTuController;\n\n if (selectedTUId && selectedTUId !== data.id) {\n setSelected(oldTUController, false);\n\n //perform implicit save if changed\n if(PhraseUtil.hasTranslationChanged(\n oldTUController.getPhrase())) {\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase' : oldTUController.getPhrase(),\n 'status' : TransStatusService.getStatusInfo('TRANSLATED'),\n 'locale' : $stateParams.localeId,\n 'docId' : $stateParams.docId\n });\n }\n }\n\n updateSaveButton(event, newTuController.getPhrase());\n selectedTUId = data.id;\n setSelected(newTuController, true);\n\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION, data);\n\n //Update url without reload state\n if(updateURL) {\n if($state.current.name !== 'editor.selectedContext.tu') {\n $state.go('editor.selectedContext.tu', {\n 'id': data.id,\n 'selected': data.focus.toString()\n });\n } else {\n $location.search('id', data.id);\n $location.search('selected', data.focus.toString());\n }\n }\n } else {\n MessageHandler.displayWarning('Trans-unit not found:' + data.id);\n }\n });\n\n /**\n * EventService.EVENT.COPY_FROM_SOURCE listener\n * Copy translation from source\n */\n $rootScope.$on(EventService.EVENT.COPY_FROM_SOURCE,\n function (event, data) {\n var sourceIndex = 0;\n if(data.phrase.plural) {\n //clicked copy source button\n sourceIndex = data.sourceIndex;\n if(_.isUndefined(sourceIndex)) {\n //copy source key shortcut, copy corresponding source to target\n var transUnitCtrl = controllerList[data.phrase.id];\n sourceIndex = transUnitCtrl.focusedTranslationIndex;\n if(data.phrase.sources.length <\n transUnitCtrl.focusedTranslationIndex + 1) {\n sourceIndex = data.phrase.sources.length - 1;\n }\n }\n }\n setTranslationText(data.phrase, data.phrase.sources[sourceIndex]);\n });\n\n /**\n * EventService.EVENT.UNDO_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.UNDO_EDIT,\n function (event, phrase) {\n if (PhraseUtil.hasTranslationChanged(phrase)) {\n setAllTranslations(phrase, phrase.translations);\n }\n });\n\n /**\n * EventService.EVENT.CANCEL_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function (event, phrase) {\n if(selectedTUId) {\n setSelected(controllerList[selectedTUId], false);\n selectedTUId = false;\n EditorShortcuts.selectedTUCtrl = null;\n }\n\n $location.search('selected', null);\n if(!phrase) {\n $location.search('id', null);\n }\n\n // EditorContentCtrl#changePage doesn't provide a phrase object\n if (phrase) {\n $timeout(function() {\n return $rootScope.$broadcast('blurOn', 'phrase-' + phrase.id);\n });\n }\n });\n\n /**\n * EventService.EVENT.TRANSLATION_TEXT_MODIFIED listener\n *\n */\n $rootScope.$on(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n updateSaveButton);\n\n /**\n * EventService.EVENT.FOCUS_TRANSLATION listener\n *\n */\n $rootScope.$on(EventService.EVENT.FOCUS_TRANSLATION,\n setFocus);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_INITIATED,\n phraseSaving);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_COMPLETED,\n updateSaveButton);\n\n function setTranslationText(phrase, newText) {\n var index = 0;\n if (phrase.plural) {\n var transUnitCtrl = controllerList[phrase.id];\n index = transUnitCtrl.focusedTranslationIndex;\n }\n phrase.newTranslations[index] = newText;\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n phrase);\n }\n\n function setAllTranslations(phrase, newTexts) {\n //need slice() for new instance of array\n phrase.newTranslations = newTexts.slice();\n\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n phrase);\n }\n\n function updateSaveButton(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.updateSaveButton(phrase);\n }\n\n function phraseSaving(event, data) {\n var transUnitCtrl = controllerList[data.phrase.id];\n transUnitCtrl.phraseSaving(data);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n data.phrase);\n }\n\n function setSelected(transUnitCtrl, isSelected) {\n //This check is to prevent selected event being triggered repeatedly.\n if(transUnitCtrl.selected !== isSelected) {\n transUnitCtrl.selected = isSelected || false;\n }\n }\n\n function setFocus(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.focusTranslation();\n }\n\n /**\n * Filters the dropdown options for saving a translation\n * Unless the translation is empty, remove untranslated as an option\n * Filter the current default save state out of the list and show remaining\n *\n * @param {Object} saveStatus The current default translation *save* status\n * @return {Array} Is used to construct the dropdown list\n */\n function filterSaveButtonOptions(saveStatus, phrase) {\n var filteredOptions = [];\n if (saveStatus.ID === 'untranslated') {\n return filteredOptions;\n }\n filteredOptions = $filter('filter')\n (TransStatusService.getAllAsArray(), {ID: '!untranslated'});\n\n if(phrase.plural) {\n if(PhraseUtil.hasNoTranslation(phrase)) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!needswork'});\n } else if(PhraseUtil.hasEmptyTranslation(phrase)) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!translated'});\n }\n }\n\n if (PRODUCTION) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!approved'});\n }\n\n return $filter('filter')(filteredOptions, {ID: '!'+saveStatus.ID});\n }\n\n return transUnitService;\n }\n\n angular\n .module('app')\n .factory('TransUnitService', TransUnitService);\n})();\n\n\n","(function() {\n 'use strict';\n\n /**\n * @name trans-unit\n * @description transUnit container\n * @ngInject\n */\n function transUnit() {\n return {\n restrict: 'E',\n required: ['phrase', 'editorContext'],\n scope: {\n phrase: '=',\n firstPhrase: '=',\n editorContext: '='\n },\n controller: 'TransUnitCtrl as transUnitCtrl',\n templateUrl: 'components/transUnit/trans-unit.html',\n link: function(scope, element, attr, TransUnitCtrl) {\n TransUnitCtrl.init();\n }\n };\n }\n\n angular\n .module('app')\n .directive('transUnit', transUnit);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name trans-unit\n * @description transUnit container\n * @ngInject\n */\n function transUnitFilter() {\n return {\n restrict: 'E',\n required: ['editor'],\n scope: {\n editor: '='\n },\n templateUrl: 'components/transUnitFilter/trans-unit-filter.html'\n };\n }\n\n angular\n .module('app')\n .directive('transUnitFilter', transUnitFilter);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * UserService.js\n *\n * @ngInject\n */\n function UserService($resource, UrlService) {\n\n function getUserInfo(username) {\n var UserInfo = $resource(UrlService.USER_INFO_URL, {}, {\n query: {\n method: 'GET',\n params: {\n username: username\n }\n }\n });\n return UserInfo.query().$promise;\n }\n\n function getMyInfo() {\n var MyInfo = $resource(UrlService.MY_INFO_URL, {}, {\n query: {\n method: 'GET'\n }\n });\n return MyInfo.query().$promise;\n }\n\n return {\n settings: {\n editor: {\n hideMainNav: false\n }\n },\n getUserInfo: getUserInfo,\n getMyInfo: getMyInfo\n };\n }\n angular\n .module('app')\n .factory('UserService', UserService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * FilterUtil.js\n *\n * @ngInject\n */\n function FilterUtil(StringUtil, _) {\n\n /**\n * Filter in resources on given fields with matched terms\n *\n * @param resources - list of resources\n * @param fields - list of fields to check\n * @param terms - list of term to check\n * @returns {*}\n */\n function filterResources(resources, fields, terms) {\n if(!resources || !fields || !terms) {\n return resources;\n }\n return _.filter(resources, function (resource) {\n return isInclude(resource, fields, terms);\n });\n }\n\n /**\n * Filter out properties starting with $ (added by promise)\n * @param resources\n */\n function cleanResourceMap(resources) {\n var filteredList = {};\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList[id] = (resources[id]);\n });\n return filteredList;\n }\n\n function cleanResourceList(resources) {\n var filteredList = [];\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList.push(resources[id]);\n });\n return filteredList;\n }\n\n\n function isInclude(resource, fields, terms) {\n if(!resource || !fields || !terms) {\n return false;\n }\n return _.any(fields, function(field) {\n return _.any(terms, function(term) {\n return StringUtil.equals(resource[field], term, true);\n });\n });\n }\n\n return {\n filterResources : filterResources,\n cleanResourceList:cleanResourceList,\n cleanResourceMap : cleanResourceMap\n };\n }\n angular\n .module('app')\n .factory('FilterUtil', FilterUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * PhraseUtil.js\n *\n * @ngInject\n */\n function PhraseUtil(TransStatusService, _) {\n\n function getSaveButtonStatus(phrase) {\n if (hasNoTranslation(phrase)) {\n return TransStatusService.getStatusInfo('untranslated');\n }\n else if (hasEmptyTranslation(phrase)) {\n return TransStatusService.getStatusInfo('needswork');\n }\n else if (hasTranslationChanged(phrase)) {\n return TransStatusService.getStatusInfo('translated');\n }\n else {\n return phrase.status;\n }\n }\n\n function hasTranslationChanged(phrase) {\n // on Firefox with input method turned on,\n // when hitting tab it seems to turn undefined value into ''\n var allSame = _.every(phrase.translations,\n function(translation, index) {\n return nullToEmpty(translation) ===\n nullToEmpty(phrase.newTranslations[index]);\n });\n return !allSame;\n }\n\n function hasNoTranslation(phrase) {\n return _.isEmpty(_.compact(phrase.newTranslations));\n }\n\n function hasEmptyTranslation(phrase) {\n return _.compact(phrase.newTranslations).length !==\n phrase.newTranslations.length;\n }\n\n function nullToEmpty(value) {\n return value || '';\n }\n\n return {\n getSaveButtonStatus : getSaveButtonStatus,\n hasTranslationChanged : hasTranslationChanged,\n hasNoTranslation : hasNoTranslation,\n hasEmptyTranslation : hasEmptyTranslation\n };\n }\n angular\n .module('app')\n .factory('PhraseUtil', PhraseUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility method for handling $resource.statistic\n *\n * StatisticUtil.js\n * @ngInject\n *\n */\n\n function StatisticUtil() {\n return {\n getWordStatistic: function(statistics) {\n return statistics[0].unit === 'WORD' ? statistics[0] : statistics[1];\n },\n getMsgStatistic: function(statistics) {\n return statistics[0].unit === 'MESSAGE' ? statistics[0] : statistics[1];\n }\n };\n }\n angular\n .module('app')\n .factory('StatisticUtil', StatisticUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * StringUtil\n *\n * @ngInject\n */\n\n function StringUtil() {\n function startsWith(str, prefix, ignoreCase) {\n if (ignoreCase && str && prefix) {\n str = str.toUpperCase();\n prefix = prefix.toUpperCase();\n }\n return str.lastIndexOf(prefix, 0) === 0;\n }\n\n function endsWith(str, suffix, ignoreCase) {\n if (ignoreCase && str && suffix) {\n str = str.toUpperCase();\n suffix = suffix.toUpperCase();\n }\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\n }\n\n function equals(from, to, ignoreCase) {\n if (ignoreCase && from && to) {\n from = from.toUpperCase();\n to = to.toUpperCase();\n }\n return from === to;\n }\n\n return {\n startsWith : startsWith,\n endsWith : endsWith,\n equals : equals\n };\n }\n angular\n .module('app')\n .factory('StringUtil', StringUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility to handles URL related request.\n *\n * UrlService.js\n * @ngInject\n */\n function UrlService($location, $http, $q, $stateParams, _) {\n //IE doesn't support location.origin\n if (!location.origin) {\n location.origin =\n window.location.protocol + '//' + window.location.hostname +\n (window.location.port ? (':' + window.location.port) : '');\n }\n\n var urlService = this,\n gravatarBaseUrl = 'http://www.gravatar.com/avatar',\n configFile = 'config.json',\n baseUrl = '',\n urls = {},\n uiTranslationsURL = location.origin + location.pathname +\n 'translations';\n\n urlService.serverContextPath = '';\n\n urlService.init = function () {\n if (baseUrl) {\n return $q.when(baseUrl);\n }\n else {\n /**\n * Temporary solution to handle dynamic context path deployed for\n * Zanata server in JBOSS (/ or /zanata).\n *\n * If config.baseUrl exist and not empty,\n * baseUrl = config.baseUrl\n *\n * ELSE\n * baseUrl = full.url - appPath onwards\n */\n return $http.get(configFile).then(function (response) {\n var config = response.data;\n if (config.baseUrl) {\n baseUrl = config.baseUrl;\n } else {\n var deployPath = config.appPath.replace(/^\\//g, ''),\n index = location.href.indexOf(deployPath);\n\n urlService.serverContextPath = location.origin + location.pathname;\n if(index >= 0) {\n urlService.serverContextPath = location.href.substring(0, index);\n }\n urlService.serverContextPath = urlService.serverContextPath.\n replace(/\\/?$/, '/');\n baseUrl = urlService.serverContextPath + 'rest';\n }\n\n /* jshint -W101 */\n // URLs over multiple lines are hard to read, allowing long lines here.\n // Warnings for jshint are turned off/on with -/+ before the warning code.\n // See: https://github.com/jshint/jshint/blob/2.1.4/src/shared/messages.js\n urls = _.mapValues({\n project: '/project/:projectSlug',\n docs: '/project/:projectSlug/version/:versionSlug/docs',\n locales: '/project/:projectSlug/version/:versionSlug/locales',\n status: '/project/:projectSlug/version/:versionSlug/doc/:docId/status/:localeId',\n textFlows: '/source+trans/:localeId',\n docStats: '/stats/project/:projectSlug/version/:versionSlug/doc/:docId/locale/:localeId',\n myInfo: '/user',\n userInfo: '/user/:username',\n translation: '/trans/:localeId',\n allLocales: '/locales'\n }, unary(restUrl));\n /* jshint +W101 */\n\n urlService.PROJECT_URL = urls.project;\n urlService.LOCALE_LIST_URL = urls.locales;\n urlService.DOCUMENT_LIST_URL = urls.docs;\n urlService.TRANSLATION_STATUS_URL = urls.status;\n urlService.TEXT_FLOWS_URL = urls.textFlows;\n urlService.DOC_STATISTIC_URL = urls.docStats;\n urlService.MY_INFO_URL = urls.myInfo;\n urlService.USER_INFO_URL = urls.userInfo;\n urlService.TRANSLATION_URL = urls.translation;\n urlService.ALL_LOCALE_URL = urls.allLocales;\n\n urlService.PROJECT_PAGE = function(projectSlug, versionSlug) {\n return urlService.serverContextPath + 'iteration/view/' +\n projectSlug + '/' + versionSlug;\n };\n\n urlService.DASHBOARD_PAGE = urlService.serverContextPath +\n 'dashboard';\n });\n }\n };\n\n /**\n * Get the value of a query string parameter.\n */\n urlService.readValue = function (key) {\n return $location.search()[key];\n };\n\n urlService.gravatarUrl = function (gravatarHash, size) {\n return gravatarBaseUrl + '/' + gravatarHash +\n '?d=mm&r=g&s=' + size;\n };\n\n urlService.uiTranslationURL = function (locale) {\n return uiTranslationsURL + '/' + locale + '.json';\n };\n\n urlService.uiTranslationListURL = uiTranslationsURL + '/locales';\n\n return urlService;\n\n /**\n * Create a REST URL by appending all the given URL part arguments to the\n * base URL.\n *\n * No separators will be added or removed, so all parts should include\n * leading / and exclude trailing / to avoid problems.\n */\n function restUrl() {\n return baseUrl + Array.prototype.join.call(arguments, '');\n }\n\n /**\n * Decorate a function to ignore all but the first argument.\n */\n function unary(fun) {\n return function(arg) {\n return fun(arg);\n };\n }\n }\n\n angular\n .module('app')\n .factory('UrlService', UrlService);\n})();\n"],"sourceRoot":"/source/"} \ No newline at end of file +{"version":3,"sources":["app.js","AppConfig.js","AppConstants.js","AppCtrl.js","editor/EditorContentCtrl.js","editor/EditorCtrl.js","editor/EditorDetailsCtrl.js","editor/EditorService.js","editor/EditorShortcuts.js","editor/EditorSuggestionsCtrl.js","components/blur-on/blurOnDirective.js","components/clickElsewhere/clickElsewhereDirective.js","components/document/DocumentService.js","components/dropdown/DropdownController.js","components/dropdown/DropdownService.js","components/dropdown/dropdown.js","components/dropdown/dropdownDirective.js","components/event/EventService.js","components/icon/iconDirective.js","components/locale/LocaleService.js","components/logo-loader/logoLoaderDirective.js","components/message/MessageHandler.js","components/notification/NotificationService.js","components/phrases/PhraseCache.js","components/phrases/PhraseService.js","components/progressbar/progressbarDirective.js","components/project/ProjectService.js","components/renderWhitespaceCharacters/renderWhitespaceCharacters.js","components/resizer/resizerDirective.js","components/scrollbar-width/ScrollbarWidthCtrl.js","components/scrollbar-width/scrollbarWidthDirective.js","components/settings/SettingsService.js","components/suggestions/SuggestionCtrl.js","components/suggestions/SuggestionsService.js","components/suggestions/suggestionDirective.js","components/toggle/toggleDirective.js","components/transStatus/TransStatusService.js","components/transUnit/TransUnitCtrl.js","components/transUnit/TransUnitService.js","components/transUnit/transUnitDirective.js","components/transUnitFilter/transUnitFilterDirective.js","components/user/UserService.js","components/util/FilterUtil.js","components/util/PhraseUtil.js","components/util/StatisticUtil.js","components/util/StringUtil.js","components/util/UrlService.js"],"names":[],"mappings":"AAAA,CAAC,WAAW;EACV;;;;;;EAMA,QAAQ;IACN,OAAO;MACL;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;;;AAIN;ACrBA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,UAAU,gBAAgB,oBAAoB;IACrD,iBAAiB;;;IAGjB,IAAI,cAAc,SAAS,IAAI,YAAY;MACzC,OAAO;QACL,SAAS,SAAS,QAAQ;;UAExB,WAAW,WAAW;UACtB,OAAO;;QAET,cAAc,SAAS,WAAW;;UAEhC,WAAW,WAAW;UACtB,QAAQ,MAAM,yBAAyB;UACvC,OAAO,GAAG,OAAO;;QAEnB,UAAU,SAAS,UAAU;;UAE3B,WAAW,WAAW;UACtB,OAAO,YAAY,GAAG,KAAK;;QAE7B,eAAe,SAAS,WAAW;;UAEjC,WAAW,WAAW;UACtB,IAAI,UAAU,WAAW,KAAK;YAC5B,QAAQ,MAAM;iBACT,IAAI,UAAU,WAAW,KAAK;YACnC,QAAQ,MAAM;cACZ,UAAU,OAAO;iBACd;YACL,QAAQ,MAAM,sBAAsB;;UAEtC,OAAO,GAAG,OAAO;;;;;;IAKvB,cAAc,aAAa,KAAK;;;IAGhC,mBAAmB,UAAU;;IAE7B;OACG,MAAM,UAAU;QACf,KAAK;QACL,aAAa;QACb,YAAY;QACZ,SAAS;UACP,qBAAM,SAAS,YAAY;YACzB,OAAO,WAAW;;;SAGrB,MAAM,0BAA0B;QACjC,KAAK;QACL,OAAO;UACL,kBAAkB;YAChB,aAAa;YACb,YAAY;;UAEd,sBAAsB;YACpB,aAAa;YACb,YAAY;;UAEd,kBAAkB;YAChB,aAAa;YACb,YAAY;;;SAGf,MAAM,6BAA6B;QACpC,KAAK;QACL,gBAAgB;;;MAGlB,gBAAgB,oBAAoB;;;;;;;EAMxC;KACG,OAAO;KACP,OAAO;;;;;;AAMZ;AChGA,CAAC,WAAW;EACV;;;;;;EAMA;KACG,OAAO;KACP,SAAS,KAAK,OAAO;KACrB,SAAS,OAAO,OAAO,EAAE;KACzB,SAAS,aAAa,OAAO;;KAE7B,SAAS,cAAc;;;;;AAK5B;AClBA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,QAAQ,QAAQ,aAAa,YAAY;mBACjC,gBAAgB,gBAAgB,YAAY,YAAY;IACvE,IAAI,UAAU;;;IAGd,QAAQ,aAAa;IACrB,QAAQ,WAAW,YAAY;IAC/B,QAAQ,eAAe,EAAE,cAAc;;;;;;;;;;;;;;;IAevC,WAAW,OAAO,KAAK;MACrB,KAAK;MACL,KAAK;;;IAGP,QAAQ,mBAAmB,SAAS,QAAQ;MAC1C,QAAQ,OAAO,SAAS;MACxB,IAAI,aAAa,QAAQ,OAAO,OAAO;MACvC,IAAI,CAAC,WAAW,WAAW;QACzB,cAAc,eAAe,UAAU,OAAO;QAC9C,eAAe,WAAW,WAAW,iBAAiB;aACjD;gBACG,WAAW;kBACT,eAAe,mBAAmB;;gBAEpC,SAAS,OAAO;kBACd,eAAe,YAAY;oBACzB,kBAAkB,cAAc,eAAe;oBAC/C,SAAS;kBACX,eAAe;oBACb,cAAc;kBAChB,QAAQ,OAAO,SAAS,cAAc;;aAE3C;QACL,eAAe;UACb,cAAc,eAAe;;;;IAInC,QAAQ,gBAAgB,WAAW;MACjC,OAAO,WAAW;;;IAGpB,SAAS,cAAc;MACrB,OAAO,cAAc;;;IAGvB,SAAS,sBAAsB;MAC7B,OAAO,YAAY,YAAY;QAC7B,SAAS,QAAQ;UACf,QAAQ,SAAS;UACjB,QAAQ,OAAO,SAAS,cAAc;UACtC,QAAQ,OAAO,cAAc,WAAW;YACtC,QAAQ,OAAO,cAAc;WAC9B,SAAS,OAAO;UACjB,eAAe,aAAa,4BAA4B;;;;IAI9D,SAAS,eAAe;MACtB,cAAc,kBAAkB;QAC9B,SAAS,iBAAiB;UACxB,MAAM,IAAI,KAAK,gBAAgB,SAAS;YACtC,IAAI,WAAW;cACb,aAAa,gBAAgB,QAAQ;cACrC,SAAS;;YAEX,QAAQ,aAAa,KAAK;;UAE5B,QAAQ,OAAO,SAAS,cAAc;YACpC,QAAQ,cAAc,cAAc,eAAe;UACrD,IAAI,CAAC,QAAQ,OAAO,QAAQ;YAC1B,QAAQ,OAAO,SAAS,cAAc;;;QAG1C,SAAS,OAAO;UACd,eAAe,YAAY;YACzB,kBAAkB,cAAc,eAAe;YAC/C,SAAS;UACX,QAAQ,OAAO,SAAS,cAAc;;;;;;EAK9C;KACG,OAAO;KACP,WAAW,WAAW;;;;;;AAM3B;AChHA,CAAC,WAAW;EACV;;;;;;EAMA,SAAS,kBAAkB,YAAY,eAAe;6BAC3B,iBAAiB,YAAY;6BAC7B,cAAc,YAAY,WAAW;6BACrC,oBAAoB;;;IAG7C,IAAI,iBAAiB;QACjB,oBAAoB,MAAM,QAAQ;IACtC;;IAEA,kBAAkB,UAAU;;IAE5B,cAAc,cAAc,aAAa;MACvC,aAAa,aAAa,gBAAgB,YAAY,aAAa;MACnE,aAAa;;IAEf;;IAEA,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,QAAQ;QACvB,GAAG,OAAO,OAAO,QAAQ,MAAM;UAC7B,UAAU,OAAO,UAAU;eACtB;UACL,IAAI,UAAU;UACd,EAAE,QAAQ,OAAO,QAAQ,SAAS,KAAK,KAAK;YAC1C,GAAG,KAAK;cACN,QAAQ,KAAK;;;UAGjB,UAAU,OAAO,UAAU,QAAQ,KAAK;;QAE1C;QACA;;;IAGJ,SAAS,4BAA4B;MACnC,SAAS,WAAW,UAAU;;MAE9B,GAAG,CAAC,EAAE,YAAY,SAAS;QACzB,SAAS,OAAO,MAAM;QACtB,SAAS,EAAE,UAAU,QAAQ,SAAS,QAAQ,OAAO;UACnD,QAAQ,mBAAmB,YAAY;UACvC,OAAO,OAAO,KAAK;;;MAGvB,SAAS;QACP,UAAU;;;;;IAKd,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,GAAG,cAAc,mBAAmB,GAAG;UACrC,cAAc,mBAAmB;UACjC,WAAW,cAAc;;;;IAI/B,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,GAAG,cAAc,mBAAmB,GAAG;UACrC,cAAc,oBAAoB;UAClC,WAAW,cAAc;;;;IAI/B,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,GAAG,cAAc,mBAAmB,cAAc,cAAc;UAC9D,cAAc,mBAAmB;UACjC,WAAW,cAAc;;;;IAI/B,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,GAAG,cAAc,mBAAmB,cAAc,cAAc;UAC9D,cAAc,mBAAmB,cAAc;UAC/C,WAAW,cAAc;;;;;;;;;IAS/B,WAAW,IAAI,aAAa,MAAM,eAAe;;;IAGjD,WAAW,IAAI,aAAa,MAAM,mBAAmB;;;IAGrD,WAAW,IAAI,aAAa,MAAM;mBACnB;;IAEf,SAAS,YAAY,OAAO,MAAM;MAChC,IAAI,UAAU,kBAAkB;QAC9B;QACA;QACA;QACA;;MAEF,eAAe,EAAE,UAAU,SAAS,UAAU,QAAQ;QACpD,OAAO,OAAO,OAAO,KAAK;;MAE5B,YAAY,KAAK,IAAI,eAAe,GAAG,QAAQ,SAAS;MACxD,SAAS,QAAQ,WAAW;;MAE5B,IAAI,WAAW,KAAK,WAAW;QAC7B,aAAa,UAAU,aAAa,MAAM;+BACnB;iCACE,MAAM;iCACN,aAAa;iCACb,SAAS;kCACR;aACrB;;QAEL,SAAS,QAAQ;QACjB,aAAa,UAAU,aAAa,MAAM;WACvC;aACE,UAAU;aACV,UAAU,WAAW,oBAAoB;aACzC,UAAU,aAAa;aACvB,SAAS,aAAa;;;;;IAK/B,SAAS,gBAAgB,OAAO,MAAM;MACpC,IAAI,UAAU,kBAAkB;QAC9B;QACA;QACA;QACA;;MAEF,eAAe,EAAE,UAAU,SAAS,UAAU,QAAQ;QACpD,OAAO,OAAO,OAAO,KAAK;;MAE5B,gBAAgB,KAAK,IAAI,eAAe,GAAG;MAC3C,SAAS,QAAQ,eAAe;;MAEhC,IAAI,WAAW,KAAK,WAAW;QAC7B,aAAa,UAAU,aAAa,MAAM;+BACnB;iCACE,MAAM;iCACN,aAAa;iCACb,SAAS;kCACR;aACrB;QACL,SAAS,QAAQ;;QAEjB,aAAa,UAAU,aAAa,MAAM;WACvC;aACE,UAAU;aACV,UAAU,WAAW,oBAAoB;aACzC,UAAU,aAAa;aACvB,SAAS,aAAa;;;;;IAK/B,SAAS,qBAAqB,OAAO,MAAM;MACzC,IAAI,UAAU,kBAAkB;QAC9B,gBAAgB,mBAAmB,cAAc;QACjD;QACA;;MAEF,eAAe,EAAE,UAAU,SAAS,UAAU,QAAQ;QACpD,OAAO,OAAO,OAAO,KAAK;;;MAG5B,KAAK,IAAI,IAAI,eAAe,GAAG,IAAI,QAAQ,QAAQ,KAAK;QACtD,iBAAiB,mBAAmB;UAClC,QAAQ,GAAG;QACb,IAAI,eAAe,OAAO,cAAc,IAAI;UAC1C,aAAa,UAAU,aAAa,MAAM;iCACnB;mCACE,MAAM,QAAQ,GAAG;mCACjB,aAAa;mCACb,SAAS;oCACR;UAC1B;;;;;;;IAON,SAAS,WAAW,WAAW;MAC7B,WAAW;MACX,aAAa,UAAU,aAAa,MAAM;;;;;;;;;;;IAW5C,SAAS,OAAO;MACd,aAAa,UAAU,aAAa,MAAM;QACxC;UACE,aAAa,cAAc,QAAQ;UACnC,aAAa,cAAc,QAAQ;UACnC,OAAO,cAAc,QAAQ;UAC7B,UAAU,cAAc,QAAQ;;;;MAIpC,cAAc,eAAe,cAAc,SAAS;QAClD,KAAK,SAAS,OAAO;UACnB,cAAc,eAAe,SAAS,QAAQ;UAC9C,GAAG,QAAQ,gBAAgB;YACzB,cAAc,eAAe,QAAQ,mBAAmB;cACtD,cAAc,eAAe,IAAI,cAAc;;;UAGnD,cAAc,gBAAgB,cAAc,cAAc,IAAI,IAAI;YAChE,cAAc,cAAc;;UAE9B,WAAW,cAAc;;;;IAI/B,SAAS,WAAW,WAAW;MAC7B,IAAI,aAAa,YAAY;MAC7B,cAAc,eAAe,cAAc,SAAS;QAClD,YAAY,gBAAgB,KAAK;;;IAGrC,SAAS,eAAe,SAAS;MAC/B,kBAAkB,UAAU;;;IAG9B,OAAO;;;;EAGT;KACG,OAAO;KACP,WAAW,qBAAqB;;AAErC;AC5PA,CAAC,WAAW;EACV;;;;;;EAMA,SAAS,WAAW,QAAQ,aAAa,iBAAiB;IACxD,gBAAgB,eAAe,iBAAiB;IAChD,YAAY,cAAc,QAAQ,gBAAgB;IAClD,cAAc,iBAAiB,GAAG,WAAW;IAC7C,IAAI,aAAa;IACjB,WAAW,aAAa;IACxB,WAAW,iBAAiB;IAC5B,WAAW,YAAY,EAAE;MACvB,EAAE,OAAO,gBAAgB,YAAY,SAAS,cAAc;;QAE1D,IAAI,YAAY,EAAE,QAAQ,aAAa,WAAW;QAClD,OAAO;QACP,QAAQ,EAAE,IAAI,WAAW,SAAS,KAAK;UACrC,OAAO,gBAAgB,aAAa;;QAEtC,aAAa,aAAa,UAAU,GAAG;;;;;IAK3C,WAAW,SAAS;MAClB,WAAW;QACT,OAAO;QACP,aAAa;QACb,eAAe;QACf,aAAa;QACb,gBAAgB;;;;IAIpB;;;;IAIA,SAAS,qBAAqB;;MAE5B,IAAI,SAAS,WAAW,UAAU;;MAElC,GAAG,CAAC,EAAE,YAAY,SAAS;QACzB,SAAS,OAAO,MAAM;QACtB,EAAE,QAAQ,QAAQ,SAAS,KAAK;UAC9B,GAAG,CAAC,EAAE,YAAY,WAAW,OAAO,OAAO,OAAO;YAChD,WAAW,OAAO,OAAO,OAAO;;;QAGpC;;;;IAIJ,UAAU,KAAK,KAAK,SAAS,OAAO;MAClC,IAAI,aAAa,MAAM;MACvB,IAAI,CAAC,WAAW,kBAAkB,CAAC,uBAAuB,aAAa;QACrE,WAAW;QACX,OAAO;;OAER;;;;;;;IAOH,SAAS,uBAAuB,SAAS;;MAEvC,IAAI,CAAC,MAAM,QAAQ,YAAY,KAAK,QAAQ,iBAAiB,CAAC,GAAG;QAC/D,OAAO;;;;MAIT,OAAO,QAAQ,YAAY,WAAW,QAAQ,YAAY;QACxD,QAAQ,YAAY,cAAc,QAAQ;;;;;;;;IAQ9C,WAAW,UAAU,cAAc,YAAY,aAAa;MAC1D,aAAa,aAAa,gBAAgB,YAAY,aAAa;MACnE,cAAc,gBAAgB,cAAc,eAAe;MAC3D;;IAEF,WAAW,+BAA+B,WAAW;MACnD,WAAW,iBAAiB,CAAC,WAAW;;;IAG1C,IAAI,mBAAmB,gBAAgB,QAAQ;IAC/C,OAAO,kBAAkB,gBAAgB,UAAU;MACjD,UAAU,MAAM;QACd,OAAO,kBAAkB;;IAE7B,WAAW,wBAAwB,YAAY;MAC7C,gBAAgB,OAAO,kBAAkB,CAAC,OAAO;;;;IAInD,WAAW,cAAc,WAAW;MAClC,OAAO,WAAW,aAAa,WAAW,QAAQ;QAChD,WAAW,QAAQ;;;IAGvB,WAAW,cAAc,SAAS,OAAO;MACvC,OAAO,gBAAgB,YAAY;;;IAGrC,eAAe,eAAe,aAAa,aAAa;MACtD,SAAS,aAAa;QACpB,WAAW,cAAc;;MAE3B,SAAS,OAAO;QACd,eAAe,aAAa;UAC1B,iBAAiB;;;IAGvB,cAAc,oBAAoB,WAAW,QAAQ;MACnD,WAAW,QAAQ,aAAa;MAChC,SAAS,SAAS;QAChB,WAAW,UAAU;QACrB,IAAI,CAAC,WAAW,WAAW,WAAW,QAAQ,UAAU,GAAG;;UAEzD,eAAe,aAAa;YAC1B,WAAW,QAAQ,cAAc;YACjC,WAAW,QAAQ;eAChB;;UAEL,IAAI,mBAAmB,OAAO,OAAO;UACrC,IAAI,UAAU,WAAW;;UAEzB,IAAI,CAAC,kBAAkB;YACrB,QAAQ,WAAW,WAAW,QAAQ,GAAG;YACzC;iBACK;YACL,QAAQ,WAAW;YACnB,IAAI,CAAC,cAAc,eAAe,WAAW;cAC3C,mBAAmB;cACnB,QAAQ,WAAW,WAAW,QAAQ,GAAG;;;;SAI9C,SAAS,OAAO;QACjB,eAAe,aAAa,gCAAgC;;;IAGhE,gBAAgB,QAAQ,WAAW,QAAQ;MACzC,WAAW,QAAQ,aAAa;MAChC,SAAS,WAAW;QAClB,WAAW,YAAY;;QAEvB,IAAI,CAAC,WAAW,aAAa,WAAW,UAAU,UAAU,GAAG;;UAE7D,eAAe,aAAa;YAC1B,WAAW,QAAQ,cAAc;YACjC,WAAW,QAAQ;eAChB;;UAEL,IAAI,gBAAgB,OAAO,OAAO;cAC9B,UAAU,WAAW;UACzB,IAAI,CAAC,eAAe;YAClB,QAAQ,QAAQ,WAAW,UAAU,GAAG;YACxC;iBACK;YACL,QAAQ,QAAQ,gBAAgB,YAAY;YAC5C,IAAI,CAAC,gBAAgB,YAAY,WAAW;cAC1C,QAAQ,QAAQ;cAChB,QAAQ,QAAQ,WAAW,UAAU,GAAG;;;;SAI7C,SAAS,OAAO;QACjB,eAAe,aAAa,kCAAkC;;;IAGlE,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,WAAW,eAAe,KAAK;QAC/B,WAAW,UAAU,KAAK;;;IAG9B,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,WAAW,eAAe;QAC1B,WAAW,UAAU;;;IAGzB,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;;QAErB,cAAc,KAAK,aAAa,KAAK,aAAa,KAAK;UACrD,KAAK;;QAEP,WAAW,QAAQ,QAAQ,KAAK;QAChC,WAAW,QAAQ,WAAW,KAAK;;;IAGvC,WAAW,aAAa,WAAW;MACjC,GAAG,cAAc,iBAAiB,GAAG;QACnC,OAAO,cAAc,mBAAmB;aACnC;QACL,OAAO,CAAC,cAAc,mBAAmB,KAAK;WAC3C,cAAc,eAAe;;;;IAIpC,WAAW,gBAAgB,SAAS,UAAU;MAC5C,OAAO,cAAc,QAAQ;;;IAG/B,WAAW,YAAY,WAAW;MAChC,aAAa,UAAU,aAAa,MAAM;;;IAG5C,WAAW,WAAW,WAAW;MAC/B,aAAa,UAAU,aAAa,MAAM;;;;IAI5C,WAAW,WAAW,WAAW;MAC/B,aAAa,UAAU,aAAa,MAAM;;;IAG5C,WAAW,eAAe,WAAW;MACnC,aAAa,UAAU,aAAa,MAAM;;;IAG5C,WAAW,cAAc,WAAW;MAClC,YAAY;;;IAGd,WAAW,eAAe,WAAW;MACnC,aAAa;;;IAGf,SAAS,aAAa,WAAW;MAC/B,GAAG,aAAa,WAAW,OAAO,SAAS;QACzC,YAAY;aACP;QACL,WAAW,OAAO,OAAO,MAAM;QAC/B,GAAG,WAAW;UACZ,aAAa,UAAU,aAAa,MAAM;YACxC,WAAW;;;;;IAKnB,SAAS,YAAY,WAAW;MAC9B,WAAW,OAAO,OAAO,MAAM;MAC/B,WAAW,OAAO,OAAO,WAAW;MACpC,WAAW,OAAO,OAAO,aAAa;MACtC,WAAW,OAAO,OAAO,YAAY;MACrC,WAAW,OAAO,OAAO,eAAe;;MAExC,GAAG,WAAW;QACZ,aAAa,UAAU,aAAa,MAAM;UACxC,WAAW;;;;IAIjB,SAAS,aAAa,UAAU;MAC9B,OAAO,SAAS,aAAa,SAAS;QACpC,SAAS,eAAe,SAAS;QACjC,SAAS,cAAc,SAAS;;;IAGpC,SAAS,iCAAiC;MACxC,IAAI,+BAA+B;QACjC,OAAO,GAAG,0BAA0B;UAClC,SAAS,WAAW,QAAQ;UAC5B,YAAY,WAAW,QAAQ;;;;;IAKrC,SAAS,8BAA8B;MACrC,OAAO,WAAW,QAAQ,SAAS,WAAW,QAAQ;;;;;;;;;;;IAWxD,SAAS,cAAc,aAAa,aAAa,OAAO,UAAU;MAChE,gBAAgB,cAAc,aAAa,aAAa,OAAO;SAC5D,KAAK,SAAS,YAAY;YACvB,WAAW,gBAAgB;eACxB,iBAAiB;YACpB,WAAW,mBAAmB;eAC3B,gBAAgB;;UAErB,SAAS,OAAO;YACd,eAAe,aAAa,8BAA8B;;;;IAIlE,KAAK,WAAW,YAAY,SAAS;;IAErC,gBAAgB;;;;EAGlB;KACG,OAAO;KACP,WAAW,cAAc;;AAE9B;AC1TA,CAAC,WAAW;EACV;;;;;;EAMA,SAAS,oBAAoB;IAC3B,IAAI,oBAAoB;;IAExB,OAAO;;;EAGT;KACG,OAAO;KACP,WAAW,qBAAqB;;AAErC;ACjBA,CAAC,YAAY;EACX;;;;;;;EAOA,SAAS,cAAc,YAAY,WAAW,GAAG;IAC/C,cAAc,eAAe,YAAY,iBAAiB;IAC1D,oBAAoB;IACpB,IAAI,gBAAgB;QAChB,QAAQ;;IAEZ,cAAc,UAAU;;IAExB,cAAc,mBAAmB;IACjC,cAAc,eAAe;;IAE7B,cAAc;MACZ,UAAU,aAAa,aAAa,OAAO,WAAW,UAAU,MAAM;QACpE,cAAc,UAAU;UACtB,aAAa;UACb,aAAa;UACb,OAAO;UACP,WAAW;UACX,UAAU;UACV,MAAM;;QAER,OAAO,cAAc;;;IAGzB,cAAc,gBAAgB,SAAS,aAAa,aAAa;2CAC1B,UAAU;MAC/C,GAAG,cAAc,QAAQ,gBAAgB,aAAa;QACpD,cAAc,QAAQ,cAAc;;MAEtC,GAAG,cAAc,QAAQ,gBAAgB,aAAa;QACpD,cAAc,QAAQ,cAAc;;MAEtC,GAAG,cAAc,QAAQ,UAAU,OAAO;QACxC,cAAc,QAAQ,QAAQ;;MAEhC,GAAG,cAAc,QAAQ,aAAa,UAAU;QAC9C,cAAc,QAAQ,WAAW;;;;;;;;;;;IAWrC,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,SAAS,KAAK;YACd,SAAS,KAAK;QAClB,IAAI,CAAC,iBAAiB,QAAQ,SAAS;;UAErC;;;;QAIF,IAAI,EAAE,IAAI,OAAO,OAAO,KAAK;UAC3B,IAAI,iBAAiB,MAAM,OAAO;UAClC,eAAe,SAAS;UACxB,eAAe,SAAS;eACnB;UACL,SAAS,wBAAwB,QAAQ;UACzC,MAAM,OAAO,MAAM;YACjB,UAAU;YACV,UAAU;YACV,UAAU,KAAK;YACf,SAAS,KAAK;;;QAGlB,aAAa,UAAU,aAAa,MAAM,gBAAgB;QAC1D,mBAAmB,OAAO;;;IAG9B,SAAS,iBAAiB,QAAQ,QAAQ;MACxC,OAAO,WAAW,sBAAsB;QACtC,OAAO,WAAW;;;;IAItB,SAAS,mBAAmB,IAAI;MAC9B,IAAI,UAAU,EAAE,UAAU,cAAc;;MAExC,IAAI,UAAU,MAAM;;MAEpB,IAAI,cAAc,UAAU,WAAW,iBAAiB,IAAI;QAC1D,QAAQ;UACN,QAAQ;UACR,QAAQ;YACN,UAAU,QAAQ;;;;MAIxB,IAAI,OAAO;QACT,IAAI,QAAQ,OAAO;QACnB,UAAU,QAAQ,OAAO,YAAY;QACrC,SAAS,QAAQ,OAAO,gBAAgB;QACxC,UAAU,QAAQ,OAAO;;QAEzB,QAAQ,mBAAmB,YAAY,QAAQ,OAAO;QACtD,QAAQ,QAAQ,OAAO;;;MAGzB,YAAY,OAAO,MAAM,SAAS;QAChC,SAAS,UAAU;UACjB,IAAI,aAAa,QAAQ,OAAO,OAAO;;UAEvC,cAAc,mBAAmB,SAAS,KAAK,IAAI,QAAQ;YACzD,SAAS,UAAU,SAAS,QAAQ,QAAQ;;UAE9C,gBAAgB,gBAAgB,QAAQ;YACtC,QAAQ,aAAa,QAAQ,OAAO,QAAQ;YAC5C,WAAW,mBAAmB,MAAM,SAAS;YAC7C,QAAQ,OAAO;;UAEjB,aAAa,UAAU,aAAa,MAAM;YACxC,QAAQ;;QAEZ,SAAS,UAAU;UACjB,eAAe,eAAe;YAC5B,KAAK,KAAK,OAAO;UACnB,cAAc,wBAAwB,KAAK;UAC3C,aAAa,UAAU,aAAa,MAAM;YACxC,QAAQ;;MAEd,OAAO,MAAM;;;IAGf,SAAS,wBAAwB,QAAQ,eAAe;MACtD,IAAI,EAAE,QAAQ,EAAE,QAAQ,OAAO,mBAAmB;QAChD,OAAO,mBAAmB,cAAc;;MAE1C,OAAO;;;IAGT,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,iBAAiB;;;;AAI9B;ACxJA,CAAC,YAAY;EACX;;;;;;;EAOA,SAAS,gBAAgB,cAAc,cAAc,GAAG,SAAS;2BACxC,oBAAoB,WAAW,KAAK,SAAS;IACpE,IAAI,kBAAkB;MACpB,eAAe;;;;IAIjB,gBAAgB,iBAAiB;;IAEjC,SAAS,mBAAmB,OAAO;MACjC,IAAI,gBAAgB,gBAAgB;QAClC,MAAM;QACN,aAAa,UAAU,aAAa,MAAM;UACxC,CAAC,UAAU,gBAAgB,eAAe;;;;IAIhD,SAAS,oBAAoB,OAAO;MAClC,IAAI,gBAAgB,gBAAgB;QAClC,MAAM;QACN,MAAM;QACN,aAAa,UAAU,aAAa,MAAM;UACxC;;;;IAIN,SAAS,wBAAwB,OAAO;MACtC,IAAI,gBAAgB,gBAAgB;QAClC,MAAM;QACN,MAAM;QACN,aAAa,UAAU,aAAa,MAAM;UACxC;;;;IAIN,SAAS,mBAAmB,OAAO;MACjC,MAAM;MACN,MAAM;MACN,IAAI,cAAc;QAChB,gBAAgB;QAChB,IAAI,gBAAgB,gBAAgB;UAClC,gBAAgB,eAAe;;aAE5B,IAAI,gBAAgB,gBAAgB;QACzC,IAAI,SAAS,gBAAgB,eAAe;QAC5C,IAAI,WAAW,sBAAsB,SAAS;;UAE5C,aAAa,UAAU,aAAa,MAAM;YACxC;eACG;;UAEL,aAAa,UAAU,aAAa,MAAM;YACxC;;;;;IAKR,SAAS,kCAAkC,OAAO;MAChD,IAAI,gBAAgB,gBAAgB;QAClC,MAAM;QACN,IAAI,SAAS,gBAAgB,eAAe;QAC5C,aAAa,UAAU,aAAa,MAAM;UACxC;YACE,UAAU;YACV,UAAU,WAAW,oBAAoB;YACzC,UAAU,aAAa;YACvB,SAAS,aAAa;;;;;;;;;;IAU9B,SAAS,mBAAmB,OAAO;MACjC,MAAM;MACN,gBAAgB;MAChB,IAAI,SAAS,gBAAgB,eAAe;MAC5C,IAAI,QAAQ;QACV,aAAa,UAAU,aAAa,MAAM;UACxC;YACE,MAAM,OAAO;YACb,QAAQ;;;QAGZ,0BAA0B,QAAQ,KAAK;QACvC,0BAA0B,QAAQ,KAAK;QACvC,0BAA0B,QAAQ,KAAK;;;;;;;;;;;IAW3C,SAAS,uBAAuB,eAAe;MAC7C,QAAQ,UAAU,OAAO;QACvB,MAAM;QACN,aAAa,UAAU,aAAa,MAAM;UACxC,cAAc;;;;;;;;IAQpB,gBAAgB,YAAY;MAC1B,aAAa,IAAI;QACf,SAAS,oBAAoB,8BAA8B;;MAE7D,mBAAmB,IAAI;QACrB,aAAa,uBAAuB;QACpC;;MAEF,mBAAmB,IAAI;QACrB,aAAa,uBAAuB;QACpC;;MAEF,mBAAmB,IAAI;QACrB,aAAa,uBAAuB;QACpC;;MAEF,mBAAmB,IAAI;QACrB,aAAa,uBAAuB;QACpC;;MAEF,aAAa,IAAI,aAAa,OAAO,oBAAoB;;MAEzD,+BAA+B,IAAI;QACjC,SAAS,mCAAmC;;MAE9C,cAAc,IAAI;QAChB,eAAe,oBAAoB;;;;MAIrC,mBAAmB;QACjB,WAAW,CAAC,CAAC,OAAO,iBAAiB,aAAa;;;MAGpD,oBAAoB;QAClB,WAAW,CAAC,CAAC,OAAO,iBAAiB,aAAa;;;MAGpD,kBAAkB;QAChB,WAAW,CAAC,CAAC,OAAO,iBAAiB,aAAa;;;MAGpD,oBAAoB,IAAI;QACtB,aAAa;QACb;QACA,CAAC,SAAS;;MAEZ,mBAAmB,IAAI;QACrB,mBAAmB;QACnB;QACA,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoCd,SAAS,aAAa,YAAY,UAAU,aAAa,WAAW;IACpE;MACE,KAAK,aAAa;MAClB,KAAK,YAAY;QACf,gBAAgB,YAAY,aAAa,QAAQ;;MAEnD,IAAI,WAAW;QACb,KAAK,YAAY,qBAAqB,QAAQ,YAAY,CAAC;QAC3D,KAAK,UAAU;UACb,gBAAgB,KAAK,WAAW,IAAI,QAAQ;;MAEhD,OAAO;;;IAGT,SAAS,gBAAgB,OAAO,aAAa,QAAQ,UAAU;MAC7D,IAAI,YAAY;QACd,SAAS,CAAC;QACV,UAAU;;MAEZ,UAAU,QAAQ;MAClB,IAAI,aAAa;QACf,UAAU,cAAc;;MAE1B,IAAI,QAAQ;QACV,UAAU,SAAS;;MAErB,OAAO;;;IAGT,gBAAgB,mBAAmB,YAAY;;;MAG7C,IAAI,CAAC,QAAQ,IAAI,gBAAgB,UAAU,YAAY,aAAa;QAClE,EAAE,OAAO,gBAAgB,WAAW,SAAS,OAAO;UAClD,IAAI,iBAAiB,cAAc;YACjC,eAAe;;;;;;IAMvB,gBAAgB,oBAAoB,YAAY;MAC9C,EAAE,OAAO,gBAAgB,WAAW,SAAS,OAAO;QAClD,EAAE,QAAQ,MAAM,WAAW,SAAS,QAAQ;UAC1C,gBAAgB,WAAW,OAAO,OAAO,OAAO;;;;;IAKtD,SAAS,eAAe,cAAc;MACpC,IAAI,CAAC,QAAQ,IAAI,aAAa,aAAa;QACzC,EAAE,QAAQ,aAAa;UACrB,SAAS,OAAO;YACd,QAAQ,IAAI;;;;;IAKpB,SAAS,iBAAiB;MACxB,OAAO;QACL,aAAa,gBAAgB,eAAe,YAAY;;;;IAI5D,SAAS,0BAA0B,QAAQ,OAAO,QAAQ;MACxD,IAAI,aAAa,mBAAmB,cAAc;MAClD,OAAO,QAAQ,IAAI;QACjB,OAAO;QACP,aAAa,IAAI,QAAQ,cAAc;QACvC,SAAS,CAAC,SAAS;QACnB,QAAQ;QACR,UAAU,UAAU,OAAO;UACzB,gBAAgB,wBAAwB,OAAO,QAAQ;;;;;IAK7D,gBAAgB,0BAA0B,SAAS,OAAO;uDACP,YAAY;MAC7D,eAAe;;MAEf,MAAM;MACN,MAAM;;MAEN,aAAa,UAAU,aAAa,MAAM;QACxC;UACE,UAAU;UACV,UAAU;UACV,UAAU,aAAa;UACvB,SAAS,aAAa;;MAE1B,gBAAgB;;;IAGlB,gBAAgB,uBAAuB,WAAW;MAChD,IAAI,gBAAgB,gBAAgB,gBAAgB;QAClD,eAAe;QACf,gBAAgB,WAAW,CAAC,KAAK,KAAK;QACtC,aAAa,UAAU,aAAa,MAAM;UACxC;YACE,MAAM,gBAAgB,eAAe,YAAY;YACjD,QAAQ;;;;;;;;;;;;IAYhB,gBAAgB,aAAa,SAAS,MAAM,QAAQ;MAClD,IAAI,eAAe,gBAAgB,QAAQ,OAAO,CAAC;MACnD,SAAS,UAAU;MACnB,EAAE,QAAQ,cAAc,SAAS,KAAK;QACpC,QAAQ,IAAI;QACZ,UAAU,OAAO,KAAK;;;;;;;;;;IAU1B,gBAAgB,eAAe,UAAU,OAAO;MAC9C,IAAI,MAAM;QACR,SAAS;QACT,OAAO;QACP,MAAM;QACN,OAAO;QACP,IAAI;QACJ,MAAM;QACN,UAAU;QACV,WAAW;;MAEb,QAAQ,MAAM,MAAM;;MAEpB,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;;QAErC,IAAI,MAAM,OAAO,OAAO;UACtB,IAAI,QAAQ;YACV,QAAQ,UAAU,SAAS,QAAQ,UAAU,GAAG;YAChD,MAAM,KAAK;iBACN;YACL,MAAM,KAAK;;;;QAIf,MAAM,KAAK,IAAI,MAAM,OAAO,MAAM;;;MAGpC,OAAO,MAAM,KAAK;;;IAGpB,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,mBAAmB;;;AAGhC;ACpXA,CAAC,WAAW;EACV;;;;;;EAMA,SAAS,sBAAsB,QAAQ,GAAG,iBAAiB;IACzD,cAAc,YAAY,UAAU,OAAO;IAC3C,IAAI,2BAA2B,gBAAgB,QAAQ;IACvD,IAAI;MACF,gBAAgB,QAAQ;;IAE1B,IAAI,wBAAwB;;IAE5B,sBAAsB,cAAc;IACpC,sBAAsB,eAAe;IACrC,sBAAsB,qBAAqB;IAC3C,sBAAsB,aAAa;IACnC,sBAAsB,wBAAwB;IAC9C,sBAAsB,eAAe;IACrC,sBAAsB,eAAe;;IAErC,OAAO,kBAAkB;IACzB,OAAO,kBAAkB;;IAEzB,OAAO,OAAO,gBAAgB,UAAU;MACtC,UAAU,MAAM;QACd,OAAO,OAAO;;;IAGlB,OAAO,OAAO,gBAAgB,UAAU;MACtC,UAAU,MAAM;QACd,OAAO,OAAO;;;IAGlB,OAAO,cAAc,SAAS,QAAQ;MACpC,IAAI,QAAQ;QACV,OAAO;;MAET,MAAM;;;IAGR,sBAAsB,mBAAmB,YAAY;MACnD,gBAAgB,OAAO,0BAA0B;MACjD,aAAa,UAAU,aAAa,MAAM;QACxC;;;IAGJ,sBAAsB;MACpB,SAAS,QAAQ,gBAAgB;MACjC,sBAAsB,aAAa;MACnC,sBAAsB,cAAc;MACpC,IAAI,CAAC,kBAAkB,QAAQ;QAC7B,OAAO,YAAY;;;;IAIvB,sBAAsB,gBAAgB,UAAU,SAAS;MACvD,sBAAsB,eAAe;MACrC,SAAS,OAAO,sBAAsB;MACtC,sBAAsB,mBAAmB,SAAS,WAAW;QAC3D,aAAa,UAAU,aAAa,MAAM;UACxC;SACD;;;IAGL,sBAAsB,eAAe,WAAW;MAC9C,IAAI,OAAO,iBAAiB;QAC1B,aAAa,UAAU,aAAa,MAAM;UACxC;;WAEC;QACH,aAAa,UAAU,aAAa,MAAM;UACxC;;;;;IAKN,IAAI,CAAC,sBAAsB,gBAAgB,OAAO,MAAM;MACtD,sBAAsB,wBAAwB;MAC9C;;;IAGF,SAAS,mBAAmB,aAAa;MACvC,IAAI,sBAAsB;MAC1B,sBAAsB,EAAE,MAAM;SAC3B,OAAO,CAAC,qBAAqB;SAC7B;SACA;;MAEH,IAAI,CAAC,sBAAsB,cAAc;QACvC,iBAAiB;;;MAGnB,IAAI,OAAO,iBAAiB;QAC1B,qBAAqB,sBAAsB;UACzC;QACF,sBAAsB;UACpB,sBAAsB,YAAY;;WAEjC;QACH,qBAAqB,sBAAsB;UACzC;QACF,sBAAsB,qBAAqB;;;MAG7C,OAAO,kBAAkB;;;;IAI3B,SAAS,kBAAkB,cAAc;MACvC,sBAAsB,sBAAsB;;;IAG9C,SAAS,iBAAiB,aAAa;MACrC,sBAAsB,2BAA2B;;;IAGnD,SAAS,qBAAqB,cAAc,aAAa;MACvD,sBAAsB,eAAe;MACrC,sBAAsB,cAAc;;;IAGtC,SAAS,2BAA2B;MAClC,SAAS,WAAW;QAClB,sBAAsB;UACpB,sBAAsB;QACxB,sBAAsB;UACpB,sBAAsB;;;;IAI5B,SAAS,aAAa;MACpB,OAAO,kBAAkB;MACzB,sBAAsB,mBAAmB,MAAM;MAC/C,IAAI,sBAAsB,cAAc;QACtC,sBAAsB,eAAe;QACrC;;;;IAIJ,SAAS,WAAW,QAAQ,gBAAgB;MAC1C,OAAO,kBAAkB;MACzB,IAAI,CAAC,kBAAkB,QAAQ;QAC7B,OAAO,YAAY;;MAErB,sBAAsB,cAAc;;;IAGtC,SAAS,aAAa,OAAO;MAC3B,QAAQ,MAAM,gBAAgB;;;IAGhC,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,sBAAsB,eAAe,KAAK;QAC1C,IAAI,sBAAsB,eAAe,MAAM,OAAO,iBAAiB;UACrE,aAAa,UAAU,aAAa,MAAM;WACzC;;QAEH,sBAAsB,wBAAwB;;;IAGlD,WAAW,IAAI,aAAa,MAAM;MAChC,YAAY;QACV,IAAI,OAAO,MAAM;UACf,WAAW,MAAM;UACjB,sBAAsB,wBAAwB;;;;GAIrD,WAAW,IAAI,aAAa,MAAM;MAC/B,SAAS,OAAO,UAAU;QACxB,IAAI,UAAU;UACZ,WAAW;;aAER;UACH,WAAW;;;;;IAKjB,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,sBAAsB,eAAe;QACrC,mBAAmB,wBAAwB,KAAK;WAC7C,KAAK,oBAAoB;QAC5B,kBAAkB,KAAK;;;;IAI3B,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,SAAS,IAAI;UACf,mBAAmB;;UAEnB,OAAO;;QAET,OAAO,kBAAkB;QACzB,mBAAmB,sBAAsB;WACtC,KAAK,oBAAoB;QAC5B,sBAAsB,eAAe;;;IAGzC,OAAO;;;;EAGT;KACG,OAAO;KACP,WAAW,yBAAyB;;AAEzC;ACpNA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,SAAS;IAChB,OAAO;MACL,UAAU;MACV,MAAM,SAAS,OAAO,MAAM,MAAM;QAChC,OAAO,MAAM,IAAI,UAAU,UAAU,GAAG,MAAM;UAC5C,IAAI,SAAS,KAAK,QAAQ;cACtB,OAAO,KAAK,GAAG;;;;;;;EAO3B;KACG,OAAO;KACP,UAAU,UAAU;;;AAGzB;AC1BA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,eAAe,WAAW;IACjC,OAAO;MACL,UAAU;MACV,OAAO;QACL,UAAU;;MAEZ,MAAM,SAAS,OAAO,SAAS;QAC7B,IAAI,UAAU,SAAS,GAAG;UACxB,IAAI,CAAC,QAAQ,GAAG,SAAS,EAAE,SAAS;YAClC,MAAM,OAAO,MAAM,SAAS;;;;QAIhC,UAAU,GAAG,SAAS;;QAEtB,MAAM,IAAI,YAAY,WAAW;UAC/B,UAAU,IAAI,SAAS;;;;;;;EAM/B;KACG,OAAO;KACP,UAAU,kBAAkB;;;AAGjC;ACnCA,CAAC,WAAW;EACV;;;;;;;;;EASA,SAAS,gBAAgB,IAAI,WAAW,YAAY;2BAC3B,eAAe,cAAc,GAAG,oBAAoB;IAC3E,IAAI,kBAAkB;QAClB,eAAe;;;;;;;;;IASnB,gBAAgB,UAAU,SAAS,QAAQ,cAAc,cAAc;MACrE,IAAI,YAAY,UAAU,WAAW,mBAAmB,IAAI;QAC1D,OAAO;UACL,QAAQ;UACR,QAAQ;YACN,aAAa;YACb,aAAa;;UAEf,SAAS;;;MAGb,OAAO,UAAU,QAAQ;;;;;;;;;;;;IAY3B,gBAAgB,gBAAgB,UAAU,cAAc;MACtD,QAAQ,WAAW;MACnB,IAAI,UAAU,WAAW;QACvB,IAAI,MAAM,qBAAqB,SAAS;QACxC,IAAI,EAAE,IAAI,cAAc,MAAM;UAC5B,OAAO,GAAG,KAAK,aAAa;eACvB;UACL,IAAI,eAAe,gBAAgB,YAAY;UAC/C,IAAI,aAAa,UAAU,WAAW,mBAAmB,IAAI;YAC3D,OAAO;cACL,QAAQ;cACR,QAAQ;gBACN,aAAa;gBACb,aAAa;gBACb,OAAO;gBACP,UAAU;;cAEZ,SAAS;;;UAGb,OAAO,WAAW,QAAQ,SAAS,KAAK,SAAS,YAAY;;;YAG3D,EAAE,QAAQ,YAAY,SAAS,WAAW;cACxC,UAAU,mBAAmB,MAAM;gBACjC,UAAU,cAAc;;;YAG5B,aAAa,OAAO;YACpB,OAAO,aAAa;;;;;;;;;;;IAW5B,gBAAgB,cAAc,SAAS,OAAO;MAC5C,OAAO,QAAQ,MAAM,QAAQ,OAAO,OAAO;;;;;;;;IAQ7C,gBAAgB,cAAc,SAAS,OAAO;MAC5C,OAAO,QAAQ,MAAM,QAAQ,OAAO,OAAO;;;IAG7C,gBAAgB,cAAc,UAAU,WAAW,OAAO;MACxD,OAAO,EAAE,IAAI,WAAW,SAAS,UAAU;SACxC,OAAO,WAAW,OAAO,SAAS,MAAM,OAAO;;;;IAIpD,gBAAgB,kBAAkB,SAAS,aAAa,aAAa;+CAC1B,UAAU;+CACV,UAAU,WAAW;MAC9D,IAAI,MAAM,qBAAqB,OAAO;MACtC,GAAG,EAAE,IAAI,cAAc,MAAM;QAC3B,gBAAgB,aAAa,MAAM,UAAU;UAC3C;;QAEF,aAAa,UAAU,aAAa,MAAM;UACxC;YACE,aAAa;YACb,aAAa;YACb,OAAO;YACP,UAAU;;;;;;;IAOlB,SAAS,qBAAqB,OAAO,UAAU;MAC7C,OAAO,QAAQ,MAAM;;;;;;;;IAQvB,SAAS,gBAAgB,YAAY,UAAU,UAAU,WAAW;;MAElE,IAAI,gBAAgB,cAAc,iBAAiB;QACjD,eAAe,cAAc,gBAAgB;;MAE/C,GAAG,eAAe;QAChB,YAAY,SAAS;QACrB,IAAI,eAAe,SAAS,cAAc,aAAa;QACvD,cAAc,YAAY,eAAe,IAAI,IAAI;QACjD,cAAc,YAAY,SAAS,cAAc,aAAa;;;MAGhE,GAAG,cAAc;QACf,IAAI,cAAc,SAAS,aAAa,aAAa;QACrD,aAAa,YAAY,cAAc,IAAI,IAAI;QAC/C,aAAa,YAAY,SAAS,aAAa,aAAa;;;;IAIhE,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,mBAAmB;;AAEhC;AC/JA,CAAC,WAAW;EACV;;;;;;;;;;EAUA,SAAS,aAAa,QAAQ,QAAQ,QAAQ;IAC5C,iBAAiB,UAAU,UAAU;IACrC,IAAI,eAAe;;QAEf,QAAQ,OAAO;QACf,YAAY,eAAe;QAC3B;QACA,YAAY,QAAQ;QACpB,gBAAgB,OAAO;UACrB,OAAO,OAAO,YAAY,QAAQ;;IAExC,KAAK,OAAO,SAAS,SAAS;MAC5B,aAAa,WAAW;;MAExB,IAAI,OAAO,QAAQ;QACjB,YAAY,OAAO,OAAO;QAC1B,YAAY,UAAU;;QAEtB,OAAO,OAAO,WAAW,SAAS,OAAO;UACvC,MAAM,SAAS,CAAC,CAAC;;;;;IAKvB,KAAK,SAAS,SAAS,MAAM;MAC3B,MAAM,SAAS,UAAU,SAAS,CAAC,CAAC,OAAO,CAAC,MAAM;MAClD,OAAO,MAAM;;;;IAIf,KAAK,SAAS,WAAW;MACvB,OAAO,MAAM;;;IAGf,MAAM,mBAAmB,WAAW;MAClC,OAAO,aAAa;;;IAGtB,MAAM,qBAAqB,WAAW;MACpC,IAAI,aAAa,eAAe;QAC9B,aAAa,cAAc,GAAG;;;;IAIlC,MAAM,OAAO,UAAU,SAAS,QAAQ,SAAS;MAC/C,SAAS,SAAS,aAAa;SAC5B,aAAa,UAAU;;MAE1B,IAAI,QAAQ;;;;QAIV,SAAS,WAAW;UAClB,MAAM;;QAER,gBAAgB,KAAK;aAChB;QACL,gBAAgB,MAAM;;;MAGxB,UAAU,QAAQ;MAClB,IAAI,QAAQ,UAAU,WAAW,WAAW,SAAS;QACnD,cAAc,QAAQ;UACpB,MAAM,CAAC,CAAC;;;;;IAKd,OAAO,IAAI,0BAA0B,WAAW;MAC9C,MAAM,SAAS;;;IAGjB,OAAO,IAAI,YAAY,WAAW;MAChC,MAAM;;;IAGR,OAAO,IAAI,gBAAgB,WAAW;MACpC,MAAM,SAAS;;;IAGjB,OAAO,IAAI,iBAAiB,WAAW;MACrC,MAAM,SAAS;;;;;EAInB;KACG,OAAO;KACP,WAAW,gBAAgB;;;AAGhC;ACrGA,CAAC,WAAW;EACV;;;;;;;;;;;EAWA,SAAS,gBAAgB,WAAW;IAClC,IAAI,YAAY;QACZ,kBAAkB;;IAEtB,gBAAgB,OAAO,SAAS,eAAe;MAC7C,IAAI,CAAC,WAAW;QACd,UAAU,KAAK,SAAS;QACxB,UAAU,KAAK,WAAW;;;MAG5B,IAAI,aAAa,cAAc,eAAe;QAC5C,UAAU,SAAS;;;MAGrB,YAAY;;;IAGd,gBAAgB,QAAQ,SAAS,eAAe;MAC9C,IAAI,cAAc,eAAe;QAC/B,YAAY;QACZ,UAAU,OAAO,SAAS;QAC1B,UAAU,OAAO,WAAW;;;;IAIhC,IAAI,gBAAgB,SAAS,KAAK;MAChC,IAAI,CAAC,WAAW;QACd;;MAEF,IAAI,gBAAgB,UAAU;MAC9B,IAAI,OAAO,iBAAiB,cAAc,GAAG,SAAS,IAAI,SAAS;QACjE;;;MAGF,UAAU,OAAO,WAAW;QAC1B,UAAU,SAAS;;;;IAIvB,IAAI,gBAAgB,SAAS,KAAK;MAChC,IAAI,IAAI,UAAU,IAAI;QACpB,UAAU;QACV;;;;;;EAKN;KACG,OAAO;KACP,QAAQ,mBAAmB;;;;AAIhC;ACjEA,CAAC,WAAW;EACV;;;;;;;;;EASA,IAAI,iBAAiB;IACnB,WAAW;;;EAGb;KACG,OAAO;KACP,SAAS,kBAAkB;;;AAGhC;ACnBA,CAAC,WAAW;EACV;;;;;;;;;;EAUA,SAAS,WAAW;IAClB,OAAO;MACL,UAAU;MACV,YAAY;MACZ,MAAM,SAAS,OAAO,SAAS,OAAO,cAAc;QAClD,aAAa,KAAK;;;;;EAKxB,SAAS,kBAAkB;IACzB,OAAO;MACL,UAAU;MACV,SAAS;MACT,OAAO;QACL,UAAU;;MAEZ,MAAM,SAAS,OAAO,MAAM,OAAO,cAAc;QAC/C,aAAa,kBAAkB,MAAM;;;;;;;;;;;;;EAa3C,SAAS,iBAAiB;IACxB,OAAO;MACL,UAAU;MACV,SAAS;MACT,MAAM,SAAS,OAAO,SAAS,OAAO,cAAc;QAClD,IAAI,CAAC,cAAc;UACjB;;;QAGF,aAAa,gBAAgB;;QAE7B,IAAI,iBAAiB,SAAS,OAAO;UACnC,MAAM;UACN,MAAM;;UAEN,IAAI,CAAC,QAAQ,SAAS,eAAe,CAAC,MAAM,UAAU;YACpD,MAAM,OAAO,WAAW;cACtB,aAAa;;;;;QAKnB,QAAQ,KAAK,SAAS;;;QAGtB,QAAQ,KAAK;UACX,iBAAiB;UACjB,iBAAiB;;QAEnB,MAAM,OAAO,aAAa,QAAQ,SAAS,QAAQ;UACjD,QAAQ,KAAK,iBAAiB,CAAC,CAAC;UAChC,IAAI,aAAa,mBAAmB,CAAC,QAAQ;YAC3C,MAAM,YAAY,aAAa;;;;QAInC,MAAM,IAAI,YAAY,WAAW;UAC/B,QAAQ,OAAO,SAAS;;;;;;EAMhC;KACG,OAAO;KACP,UAAU,YAAY;KACtB,UAAU,mBAAmB;KAC7B,UAAU,kBAAkB;;;;AAIjC;AC7FA,CAAC,YAAY;EACX;;;;;;;;;;EAUA,SAAS,aAAa,YAAY;IAChC,IAAI,eAAe;;;;;IAKnB,aAAa,QAAQ;;;;;;MAMnB,eAAe;MACf,cAAc;;;;;;;;;MASd,mBAAmB;;;MAGnB,kBAAkB;;;MAGlB,sBAAsB;;;;;;;MAOtB,wBAAwB;;;MAGxB,WAAW;;;MAGX,aAAa;;;MAGb,mBAAmB;;;;;;;;;;;MAWnB,kBAAkB;;;;;;MAMlB,gBAAgB;;;;;;MAMhB,gBAAgB;;;;;;MAMhB,2BAA2B;;;;;;;;MAQ3B,mBAAmB;;MAEnB,gBAAgB;;MAEhB,gBAAgB;;MAEhB,iBAAiB;;MAEjB,gBAAgB;;;;;MAKhB,eAAe;MACf,mBAAmB;MACnB,wBAAwB;;;;;;MAMxB,qBAAqB;;;;;;MAMrB,mBAAmB;;;;;;;MAOnB,yBAAyB;;;;;;;MAOzB,4BAA4B;;;;;;;MAO5B,0BAA0B;;;;;;;MAO1B,2BAA2B;;;;;;;;;;MAU3B,sBAAsB;;;;;;;;;;IAUxB,aAAa,iBAAiB,SAAS,OAAO,MAAM,OAAO;MACzD,QAAQ,SAAS;MACjB,MAAM,WAAW,OAAO;;;;;;;;;;IAU1B,aAAa,YAAY,SAAS,OAAO,MAAM,OAAO;MACpD,QAAQ,SAAS;MACjB,MAAM,MAAM,OAAO;;;IAGrB,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,gBAAgB;;AAE7B;AC/LA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,KAAK,MAAM;IAClB,OAAO;MACL,UAAU;MACV,UAAU,CAAC;MACX,OAAO;QACL,MAAM;QACN,OAAO;QACP,MAAM;;;MAGR,MAAM,SAAS,OAAO,SAAS;QAC7B,IAAI,MAAM;YACN,YAAY;;QAEhB,QAAQ,SAAS;;QAEjB,IAAI,MAAM,OAAO;UACf,YAAY,YAAY,MAAM,QAAQ;;;;QAIxC,MAAM;UACJ;YACE,4BAA4B,MAAM,OAAO;YACzC;UACF;QACF,QAAQ,KAAK,KAAK,YAAY;;;;;;EAKpC;KACG,OAAO;KACP,UAAU,QAAQ;;;AAGvB;AC5CA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,cAAc,YAAY,YAAY,YAAY,WAAW,GAAG;;IAEvE,IAAI,UAAU;;;;;;;;IAQd,SAAS,oBAAoB,aAAa,aAAa;;MAErD,IAAI,UAAU,UAAU,WAAW,iBAAiB,IAAI;QACtD,OAAO;UACL,QAAQ;UACR,QAAQ;YACN,aAAa;YACb,aAAa;;UAEf,SAAS;;;;MAIb,OAAO,QAAQ,QAAQ;;;;IAIzB,SAAS,gBAAgB;MACvB,IAAI,UAAU,UAAU,WAAW,gBAAgB,IAAI;QACrD,OAAO;UACL,QAAQ;UACR,SAAS;;;MAGb,OAAO,QAAQ,QAAQ,SAAS,KAAK,SAAS,SAAS;QACrD,UAAU,WAAW,kBAAkB;;;;IAI3C,SAAS,kBAAkB;MACzB,IAAI,OAAO,UAAU,WAAW,sBAAsB,IAAI;QACxD,OAAO;UACL,QAAQ;;;;MAIZ,OAAO,KAAK,QAAQ;;;IAGtB,SAAS,oBAAoB,SAAS,UAAU;MAC9C,GAAG,SAAS;QACV,OAAO,EAAE,KAAK,SAAS,SAAS,QAAQ;UACtC,OAAO,WAAW,OAAO,OAAO,UAAU,UAAU;;;;;IAK1D,SAAS,gBAAgB,SAAS,UAAU;MAC1C,OAAO,EAAE,IAAI,SAAS,SAAS,QAAQ;QACrC,OAAO,WAAW,OAAO,OAAO,UAAU,UAAU;;;;IAIxD,SAAS,QAAQ,UAAU;MACzB,IAAI,SAAS,oBAAoB,SAAS;MAC1C,GAAG,QAAQ;QACT,OAAO,OAAO;;MAEhB,OAAO;;;IAGT,OAAO;MACL,sBAAsB;MACtB,sBAAsB;MACtB,sBAAsB;MACtB,gBAAgB;MAChB,iBAAiB;MACjB,UAAU;MACV,gBAAgB;QACd,aAAa;QACb,SAAS;;;;;;EAKf;KACG,OAAO;KACP,QAAQ,iBAAiB;;AAE9B;AClGA,CAAC,WAAW;;EAEV;;;;;;;;;;EAUA,SAAS,WAAW,cAAc;IAChC,OAAO;MACL,UAAU;MACV,OAAO;QACL,SAAS;QACT,UAAU;;MAEZ,MAAM,SAAS,OAAO;QACpB,MAAM,UAAU;;QAEhB,MAAM,IAAI,aAAa,MAAM,eAAe,WAAW;UACrD,MAAM,WAAW;;;QAGnB,MAAM,IAAI,aAAa,MAAM,cAAc,WAAW;UACpD,MAAM,UAAU,MAAM,QAAQ,QAAQ,cAAc;;;QAGtD,MAAM,OAAO,YAAY,SAAS,aAAa;UAC7C,IAAI,aAAa;YACf,MAAM,WAAW;iBACZ;YACL,MAAM,UAAU,MAAM,QAAQ,QAAQ,wBAAwB;;;;MAIpE,aAAa;;;;;EAIjB;KACG,OAAO;KACP,UAAU,cAAc;;;AAG7B;AC/CA,CAAC,WAAW;EACV;;;;;;EAMA,SAAS,iBAAiB;IACxB,OAAO;MACL,cAAc,SAAS,KAAK;QAC1B,QAAQ,MAAM;;MAEhB,gBAAgB,SAAS,KAAK;QAC5B,QAAQ,KAAK;;MAEf,aAAa,SAAS,KAAK;QACzB,QAAQ,KAAK;;;;;EAKnB;KACG,OAAO;KACP,QAAQ,kBAAkB;;;AAG/B;AC1BA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,sBAAsB;;;;EAI/B;KACG,OAAO;KACP,QAAQ,uBAAuB;;;AAGpC;AClBA,CAAC,YAAY;EACX;;;;;;;;EAQA,SAAS,YAAY,IAAI,WAAW,YAAY,YAAY;uBACvC,GAAG;IACtB,IAAI,cAAc;MAChB,SAAS;MACT,aAAa;;IAEf,YAAY;MACV,UAAU,aAAa,aAAa,YAAY,UAAU;QACxD,IAAI,MAAM,YAAY,aAAa,aAAa,YAAY;QAC5D,IAAI,EAAE,IAAI,QAAQ,MAAM;UACtB,OAAO,GAAG,KAAK,OAAO;eACjB;UACL,IAAI,eAAe,gBAAgB,YAAY;UAC/C,IAAI,UAAU;cACV,OAAO;gBACL,QAAQ;gBACR,QAAQ;kBACN,aAAa;kBACb,aAAa;kBACb,OAAO;kBACP,UAAU;;gBAEZ,SAAS;;;YAGb,SAAS,UAAU,WAAW,wBAAwB,IAAI;UAC5D,OAAO,OAAO,QAAQ,SAAS,KAAK,UAAU,OAAO;YACnD,QAAQ,WAAW,kBAAkB;YACrC,OAAO,OAAO;YACd,OAAO,OAAO;;;;;IAKtB,YAAY,gBAAgB,UAAU,KAAK,UAAU;MACnD,IAAI,UAAU;QACZ,cAAc;QACd,oBAAoB;MACtB,IAAI,QAAQ,UAAU,IAAI;QACxB,IAAI,EAAE,IAAI,YAAY,KAAK;UACzB,GAAG,WAAW,IAAI,WAAW;YAC3B,QAAQ,MAAM,WAAW;iBACpB;YACL,kBAAkB,KAAK;;eAEpB;UACL,YAAY,KAAK;;;MAGrB,IAAI,EAAE,QAAQ,gBAAgB,EAAE,QAAQ,oBAAoB;QAC1D,OAAO,GAAG,KAAK;;WAEZ;QACH,IAAI,WAAW;QACf,GAAG,CAAC,EAAE,QAAQ,cAAc;UAC1B,YAAY,UAAU,WAAW,gBAAgB,IAAI;YACnD,OAAO;cACL,QAAQ;cACR,QAAQ;gBACN,UAAU;gBACV,KAAK,YAAY,KAAK;;;;;QAK9B,GAAG,CAAC,EAAE,QAAQ,oBAAoB;UAChC,eAAe,UAAU,WAAW,iBAAiB,IAAI;YACvD,OAAO;cACL,QAAQ;cACR,QAAQ;gBACN,UAAU;gBACV,KAAK,kBAAkB,KAAK;;;;;;;QAOpC,GAAG,aAAa,cAAc;UAC5B,OAAO,UAAU,QAAQ,SAAS,KAAK;YACrC,KAAK,aAAa,QAAQ,SAAS,KAAK;eACrC,GAAG,WAAW;UACnB,OAAO,UAAU,QAAQ,SAAS,KAAK;eAClC,GAAG,cAAc;UACtB,OAAO,aAAa,QAAQ,SAAS,KAAK;;;;MAI9C,SAAS,0BAA0B,eAAe;QAChD,gBAAgB,WAAW,iBAAiB;QAC5C,KAAK,IAAI,OAAO,eAAe;;UAE7B,WAAW,KAAK,YAAY,cAAc,KAAK;UAC/C,QAAQ,OAAO,WAAW;;QAE5B,OAAO;;;MAGT,SAAS,qBAAqB,eAAe;QAC3C,gBAAgB,WAAW,iBAAiB;QAC5C,KAAK,IAAI,OAAO,eAAe;UAC7B,WAAW,OAAO,cAAc;UAChC,QAAQ,OAAO,WAAW;;QAE5B,OAAO;;;;;;;;;;;;;IAaX,YAAY;MACV,UAAU,SAAS,IAAI,UAAU,UAAU,QAAQ,QAAQ;;QAEzD,IAAI,MAAM,YAAY,QAAQ,aAAa,QAAQ;UACjD,QAAQ,OAAO;;QAEjB,IAAI,aAAa,EAAE,KAAK,OAAO,MAAM,SAAS,YAAY;UACxD,OAAO,WAAW,OAAO;;;QAG3B,GAAG,YAAY;UACb,WAAW,QAAQ;;;;QAIrB,IAAI,cAAc,WAAW,IAAI;QACjC,IAAI,CAAC,aAAa;UAChB,cAAc;;QAEhB,YAAY,WAAW,SAAS;QAChC,YAAY,QAAQ;QACpB,YAAY,WAAW,OAAO,gBAAgB;;;IAGlD,SAAS,YAAY,WAAW,WAAW,YAAY,UAAU;MAC/D,OAAO,YAAY,MAAM,YAAY;QACnC,aAAa,MAAM;;;IAGvB,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,eAAe;;;AAG5B;ACnKA,CAAC,YAAY;EACX;;;;;;;;;;;;;;;;;;;EAmBA,SAAS,cAAc,YAAY,aAAa,oBAAoB;yBAC7C,cAAc;IACnC,IAAI,gBAAgB;;IAEpB,cAAc,UAAU;;;;;;;IAOxB,cAAc,iBAAiB,SAAS,SAAS,QAAQ;MACvD,OAAO,YAAY,UAAU,QAAQ,aAAa,QAAQ;QACxD,QAAQ,OAAO,QAAQ,UAAU,KAAK,SAAS,QAAQ;UACrD,IAAI,MAAM,OAAO,QAAQ,OAAO;UAChC,OAAO,IAAI;;;;;;;IAOjB,cAAc,iBAAiB,UAAU,SAAS;6CACT,QAAQ,WAAW;;MAE1D,IAAI,WAAW,QAAQ;;MAEvB,OAAO,YAAY,UAAU,QAAQ,aAAa,QAAQ;QACxD,QAAQ,OAAO,UAAU,KAAK;;MAEhC,SAAS,cAAc,QAAQ;QAC7B,IAAI,MAAM,OAAO,QAAQ,OAAO;QAChC,IAAI,CAAC,MAAM,SAAS;UAClB,GAAG,CAAC,MAAM,YAAY;YACpB,MAAM,IAAI,MAAM,QAAQ,SAAS;iBAC5B;YACL,MAAM,IAAI,MAAM;;;;;QAKpB,OAAO,YAAY,cAAc,KAAK;UACpC,KAAK,oBAAoB,KAAK;;;;;;;;;MASlC,SAAS,mBAAmB,YAAY;QACtC,OAAO,EAAE,IAAI,YAAY,SAAS,WAAW,IAAI;UAC/C,IAAI,SAAS,UAAU;cACnB,QAAQ,UAAU;UACtB,OAAO;YACL,IAAI,SAAS;YACb,SAAS,OAAO,SAAS,OAAO,WAAW,CAAC,OAAO;;YAEnD,cAAc,oBAAoB,QAAQ;;YAE1C,iBAAiB,oBAAoB,QAAQ;YAC7C,QAAQ,OAAO;;YAEf,QAAQ,QAAQ,mBAAmB,cAAc,MAAM;cACrD,mBAAmB,cAAc;YACnC,UAAU,QAAQ,SAAS,MAAM,YAAY;YAC7C,WAAW,SAAS,OAAO;;;;;MAKjC,SAAS,oBAAoB,QAAQ,OAAO;QAC1C,GAAG,OAAO,QAAQ;UAChB,OAAO,SAAS,MAAM,WAAW,MAAM,SAAS,UAAU;;QAE5D,OAAO,QAAQ,CAAC,MAAM,WAAW;;;MAGnC,SAAS,YAAY,SAAS;QAC5B,OAAO,YAAY,UAAU,QAAQ,aAAa,QAAQ;UACxD,QAAQ,OAAO,UAAU,KAAK,SAAS,QAAQ;YAC7C,cAAc,UAAU,EAAE,OAAO,SAAS,SAAS,QAAQ;cACzD,IAAI,QAAQ,EAAE,UAAU,QAAQ,SAAS,OAAO;gBAC9C,OAAO,MAAM,OAAO,OAAO;;cAE7B,OAAO,SAAS,IAAI,QAAQ,QAAQ;;YAEtC,OAAO,cAAc;;;;;;IAM7B,cAAc,qBAAqB,SAAS,SAAS,IAAI,UAAU;MACjE,QAAQ,QAAQ;;MAEhB,YAAY,mBAAmB,SAAS,IAAI,UAAU,UAAU;QAC9D;;MAEF,IAAI,eAAe,WAAW,IAAI,cAAc;;MAEhD,GAAG,cAAc;QACf,aAAa,eAAe,OAAO,gBAAgB;QACnD,aAAa,WAAW;QACxB,aAAa,SAAS,mBAAmB,cAAc;;;;;IAK3D,cAAc,0BAA0B,SAAS,IAAI;MACnD,IAAI,SAAS,WAAW,IAAI,cAAc;MAC1C,GAAG,QAAQ;QACT,OAAO,kBAAkB,OAAO,aAAa;;;;;IAKjD,cAAc,aAAa,SAAS,WAAW;MAC7C,OAAO,YAAY,UAAU,aAAa;mCACb,aAAa,aAAa,aAAa;mCACvC,aAAa;SACvC,KAAK,UAAU,QAAQ;UACtB,IAAI;YACF;UACF,eAAe,EAAE,UAAU,QAAQ,UAAU,OAAO;YAClD,OAAO,MAAM,OAAO;;UAEtB,YAAY,eAAe,IAAI,OAAO;YACpC,eAAe,IAAI,OAAO,SAAS;UACrC,OAAO,OAAO,WAAW;;;;;IAK/B,cAAc,iBAAiB,SAAS,WAAW;MACjD,OAAO,YAAY,UAAU,aAAa;mCACb,aAAa,aAAa,aAAa;mCACvC,aAAa;SACvC,KAAK,UAAU,QAAQ;UACtB,IAAI;YACF;UACF,eAAe,EAAE,UAAU,QAAQ,UAAU,OAAO;YAClD,OAAO,MAAM,OAAO;;UAEtB,gBAAgB,eAAe,KAAK,IAAI,eAAe,IAAI;UAC3D,OAAO,OAAO,eAAe;;;;;IAKnC,cAAc,iBAAiB,SAAS,WAAW,QAAQ;MACzD,OAAO,YAAY,UAAU,aAAa;mCACb,aAAa,aAAa,aAAa;mCACvC,aAAa;SACvC,KAAK,UAAU,YAAY;UAC1B,IAAI;YACF;YACA,gBAAgB,mBAAmB,cAAc;;UAEnD,eAAe,EAAE,UAAU,YAAY,UAAU,OAAO;YACtD,OAAO,MAAM,OAAO;;;UAGtB,KAAK,IAAI,IAAI,eAAe,GAAG,IAAI,WAAW,QAAQ,KAAK;YACzD,iBAAiB,mBAAmB;cAClC,WAAW,GAAG;YAChB,IAAI,eAAe,OAAO,cAAc,IAAI;cAC1C,OAAO,WAAW,GAAG;;;UAGzB,OAAO;;;;IAIb,SAAS,WAAW,IAAI,SAAS;MAC/B,OAAO,EAAE,KAAK,SAAS,SAAS,QAAQ;QACtC,OAAO,OAAO,OAAO;;;;IAIzB,SAAS,OAAO,WAAW,QAAQ;MACjC,GAAG,QAAQ;QACT,YAAY,WAAW,gBAAgB,WAAW,CAAC,WAAW;;MAEhE,OAAO,EAAE,IAAI,WAAW,UAAU,MAAM;QACtC,OAAO,KAAK;;;;;;;;;;;;;IAahB,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,iBAAiB;;;;AAI9B;ACpOA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,cAAc;IACrB,OAAO;MACL,UAAU;MACV,UAAU;MACV,OAAO;QACL,WAAW;QACX,MAAM;;MAER,aAAa;MACb,uBAAY,SAAS,QAAQ;;;;;QAK3B,OAAO,OAAO,aAAa,SAAS,WAAW;UAC7C,IAAI,WAAW;YACb,OAAO,QAAQ,SAAS;;WAEzB;;;;;EAKT,SAAS,SAAS,WAAW;IAC3B,IAAI,QAAQ,UAAU;QAClB,gBAAgB,gBAAgB,UAAU,UAAU;QACpD,kBAAkB,gBAAgB,UAAU,YAAY;QACxD,uBAAuB;QACvB,iBAAiB,gBAAgB,UAAU,WAAW;QACtD,sBAAsB,gBAAgB;QACtC,oBAAoB,gBAAgB,UAAU,cAAc;QAC5D,yBAAyB;UACvB,kBAAkB;QACpB,QAAQ;;IAEZ,MAAM,WAAW;MACf,SAAS,gBAAgB;MACzB,cAAc;;IAEhB,MAAM,aAAa;MACjB,SAAS,kBAAkB;MAC3B,cAAc,uBAAuB;;IAEvC,MAAM,YAAY;MAChB,SAAS,iBAAiB;MAC1B,cAAc,sBAAsB;;IAEtC,MAAM,eAAe;MACnB,SAAS,oBAAoB;MAC7B,cAAc,yBAAyB;;IAEzC,OAAO;;;EAGT,SAAS,gBAAgB,OAAO,OAAO;IACrC,IAAI,UAAU;IACd,IAAI,OAAO;MACT,UAAU,QAAQ,QAAQ;;IAE5B,OAAO;;;EAGT;KACG,OAAO;KACP,UAAU,eAAe;;;AAG9B;AC3EA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,eAAe,YAAY,WAAW;;;;;;;;IAQ7C,SAAS,eAAe,aAAa;MACnC,IAAI,UAAU;UACV,OAAO;YACL,QAAQ;YACR,QAAQ;cACN,aAAa;;;;;MAKrB,IAAI,UAAU,UAAU,WAAW,aAAa,IAAI;MACpD,OAAO,QAAQ,QAAQ;;;IAGzB,OAAO;MACL,gBAAgB;;;;EAGpB;KACG,OAAO;KACP,QAAQ,kBAAkB;;AAE/B;ACvCA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,6BAA6B;IACpC,IAAI,cAAc;MAChB,UAAU;QACR,UAAU;QACV,aAAa;;MAEf,YAAY;QACV,UAAU;QACV,aAAa;;MAEf,QAAQ;QACN,UAAU;QACV,aAAa;;;;IAIjB,OAAO;MACL,UAAU;MACV,UAAU,CAAC;MACX,OAAO;QACL,QAAQ;;;MAGV,MAAM,SAAS,QAAQ,OAAO,SAAS;QACrC,MAAM,OAAO,UAAU,UAAU,OAAO;UACtC,QAAQ,YAAY,OAAO,YAAY;UACvC,QAAQ,YAAY,OAAO,YAAY;UACvC,QAAQ,YAAY,OAAO,YAAY;UACvC,QAAQ,KAAK;;;;;IAKnB,SAAS,YAAY,OAAO,gBAAgB;MAC1C,OAAO,MAAM,QAAQ,eAAe,OAAO,eAAe;;;;EAI9D;KACG,OAAO;KACP,UAAU,8BAA8B;;;AAG7C;ACpDA,CAAC,WAAW;EACV;;;;;;;;;;EAUA,SAAS,QAAQ,iBAAiB,SAAS,WAAW,UAAU;;IAE9D,SAAS,KAAK,OAAO,SAAS,OAAO;;;;;;;MAOnC,MAAM,SAAS,SAAS,MAAM;;;;;;;MAO9B,MAAM,eAAe,MAAM;;MAE3B,MAAM,WAAW,oBAAoB,gBAAgB;QACnD,gBAAgB,QAAQ,2BAA2B,QAAQ;MAC7D,MAAM,iBAAiB,MAAM;;MAE7B,MAAM;QACJ,gBAAgB,UAAU,gBAAgB,QAAQ;QAClD,UAAU,MAAM;UACd,MAAM,OAAO;UACb,yBAAyB;;;;;;MAM7B,SAAS,kBAAkB;QACzB,gBAAgB,OAAO,gBAAgB,QAAQ;UAC7C,MAAM;;;MAGV,SAAS,yBAAyB,SAAS;QACzC,IAAI,SAAS;UACX,MAAM,iBAAiB,MAAM;UAC7B,MAAM,eAAe,MAAM;eACtB;;;UAGL,IAAI,aAAa,MAAM;UACvB,MAAM,WAAW;UACjB,MAAM,iBAAiB;UACvB,MAAM,eAAe;;;;QAIvB,WAAW;;;MAGb,yBAAyB,MAAM;;MAE/B,QAAQ,SAAS;;;MAGjB,IAAI,MAAM,YAAY,YAAY;QAChC,QAAQ,SAAS;QACjB,SAAS,WAAW;UAClB,oBAAoB,MAAM;;;WAGzB;QACH,QAAQ,SAAS;QACjB,SAAS,WAAW;UAClB,sBAAsB,MAAM;;;;MAIhC,QAAQ,GAAG,aAAa,SAAS,OAAO;QACtC,MAAM;QACN,UAAU,GAAG,aAAa;QAC1B,UAAU,GAAG,WAAW;;;MAG1B,QAAQ,QAAQ,SAAS,KAAK,UAAU,WAAW;QACjD,SAAS,OAAO,MAAM;QACtB,MAAM,WAAW,SAAS;;;MAG5B,SAAS,UAAU,OAAO;QACxB,IAAI,MAAM,YAAY,YAAY;UAChC,oBAAoB,MAAM;eACrB;UACL,sBAAsB,QAAQ,cAAc,MAAM;;;;MAItD,SAAS,oBAAoB,kBAAkB;QAC7C,IAAI,IAAI;YACJ,YAAY,QAAQ,QAAQ;eACzB,cAAc,MAAM;YACvB,aAAa,QAAQ,QAAQ;eAC1B,cAAc,MAAM;YACvB;cACE,oBAAoB,MAAM,YAAY,QAAQ;YAChD,mBAAmB,MAAM;cACvB,SAAS,MAAM;;QAErB,MAAM,iBAAiB;QACvB,IAAI,iBAAiB,GAAG,kBAAkB;;QAE1C,QAAQ,IAAI;UACV,MAAM,CAAC,KAAK,MAAM,eAAe,OAAO;;;QAG1C,UAAU,IAAI;UACZ,OAAO,IAAI;;;QAGb,WAAW,IAAI;UACb,MAAM,IAAI;;;;MAId,SAAS,sBAAsB,kBAAkB;QAC/C,IAAI,IAAI;YACJ,WAAW,QAAQ,QAAQ;eACxB,cAAc,MAAM;YACvB,cAAc,QAAQ,QAAQ;eAC3B,cAAc,MAAM;YACvB;cACE,oBAAoB,MAAM,YAAY,QAAQ;YAChD,mBAAmB,MAAM,cAAc,MAAM;;QAEjD,MAAM,iBAAiB;QACvB,IAAI,iBAAiB,GAAG,kBAAkB;;QAE1C,QAAQ,IAAI;UACV,QAAQ,CAAC,KAAK,MAAM,eAAe,OAAO;;;QAG5C,SAAS,IAAI;UACX,QAAQ,IAAI;;;QAGd,YAAY,IAAI;UACd,QAAQ,IAAI;;;;MAIhB,SAAS,UAAU;QACjB,UAAU,OAAO,aAAa;QAC9B,UAAU,OAAO,WAAW;;;QAG5B;;;MAGF,SAAS,gBAAgB;QACvB,IAAI,MAAM,YAAY,YAAY;UAChC,oBAAoB,MAAM;;aAEvB;UACH,sBAAsB,MAAM;;;;MAIhC,SAAS,iBAAiB,aAAa,SAAS,SAAS;;QAEvD,IAAI,WAAW,cAAc,SAAS;UACpC,OAAO;;;aAGJ,IAAI,cAAc,SAAS;UAC9B,OAAO;;aAEJ;UACH,OAAO;;;;MAIX,SAAS,oBAAoB,UAAU,OAAO;QAC5C,IAAI,CAAC,oBAAoB,KAAK,WAAW;UACvC,OAAO,KAAK,MAAM,SAAS,SAAS,SAAS,QAAQ,IAAI,OAAO;;aAE7D;UACH,OAAO,SAAS;;;;;;IAMtB,OAAO;MACL,MAAM;;;;;EAIV;KACG,OAAO;KACP,UAAU,WAAW;;;AAG1B;AC/MA,CAAC,WAAW;EACV;;;;;;;;;;EAUA,SAAS,qBAAqB;IAC5B,IAAI,qBAAqB;;IAEzB,mBAAmB,OAAO,WAAW;MACnC,IAAI,YAAY,mBAAmB,UAAU;UACzC,QAAQ,mBAAmB,MAAM;UACjC,iBAAiB,MAAM,cAAc,UAAU;;MAEnD,mBAAmB,QAAQ,iBAAiB;;;;;EAKhD;KACG,OAAO;KACP,WAAW,sBAAsB;;;AAGtC;AC7BA,CAAC,WAAW;EACV;;;;;;;;;EASA,SAAS,iBAAiB;IACxB,OAAO;MACL,UAAU;MACV,YAAY;MACZ,MAAM,SAAS,OAAO,SAAS,OAAO,oBAAoB;QACxD,mBAAmB,KAAK;;;;;;;;;;;EAW9B,SAAS,wBAAwB;IAC/B,OAAO;MACL,UAAU;MACV,SAAS;MACT,MAAM,SAAS,OAAO,SAAS,OAAO,oBAAoB;QACxD,IAAI,CAAC,oBAAoB;UACvB;;;QAGF,QAAQ,IAAI,MAAM,uBAAuB,mBAAmB;;;;;;;;;;;EAWlE,SAAS,0BAA0B;IACjC,OAAO;MACL,UAAU;MACV,SAAS;MACT,MAAM,SAAS,OAAO,SAAS,OAAO,oBAAoB;QACxD,IAAI,CAAC,oBAAoB;UACvB;;QAEF,mBAAmB,YAAY;;;;;;;;;;;EAWrC,SAAS,sBAAsB;IAC7B,OAAO;MACL,UAAU;MACV,SAAS;MACT,MAAM,SAAS,OAAO,SAAS,OAAO,oBAAoB;QACxD,IAAI,CAAC,oBAAoB;UACvB;;QAEF,mBAAmB,QAAQ;;;;;EAKjC;KACG,OAAO;KACP,UAAU,kBAAkB;KAC5B,UAAU,yBAAyB;KACnC,UAAU,2BAA2B;KACrC,UAAU,uBAAuB;;;AAGtC;ACtFA,CAAC,WAAW;EACV;;;;;;;;;;;;;;;;;;;EAmBA,SAAS,gBAAgB,cAAc,IAAI,YAAY,GAAG;IACxD,IAAI,kBAAkB;;;;;;;;;IAStB,gBAAgB,UAAU;MACxB,oCAAoC;MACpC,6BAA6B;MAC7B,kBAAkB;MAClB,0BAA0B;;;IAG5B,IAAI,UAAU,gBAAgB;;;;;;IAM9B,IAAI,kBAAkB;IACtB,gBAAgB,QAAQ,sCAAsC;IAC9D,gBAAgB,QAAQ,+BAA+B;IACvD,gBAAgB,QAAQ,oBAAoB;IAC5C,gBAAgB,QAAQ,4BAA4B;;;;;;;IAOpD,IAAI,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;IAoBvB,SAAS,OAAO,SAAS,OAAO;MAC9B,qBAAqB;MACrB,IAAI,aAAa;MACjB,WAAW,WAAW;MACtB,EAAE,OAAO,UAAU;;MAEnB,aAAa,UAAU,aAAa,MAAM,sBAAsB;QAC9D,SAAS;QACT,OAAO;;;;;;;;;;;IAWX,SAAS,UAAU,UAAU;MAC3B,EAAE,KAAK,UAAU,UAAU,OAAO,KAAK;QACrC,OAAO,KAAK;;;;;;;;;;;;;;IAchB,SAAS,IAAI,SAAS;MACpB,IAAI,EAAE,IAAI,UAAU,UAAU;QAC5B,OAAO,SAAS;;;;MAIlB,QAAQ,MAAM;QACZ;;;;;;;;;;;IAWJ,SAAS,UAAU,SAAS,UAAU;MACpC,WAAW,IAAI,aAAa,MAAM;QAChC,UAAU,OAAO,MAAM;UACrB,IAAI,KAAK,YAAY,SAAS;YAC5B,SAAS,KAAK;;;MAGpB,OAAO,IAAI;;;;;;;;IAQb,SAAS,qBAAqB,OAAO;MACnC,QAAQ,OAAO;QACb,KAAK;QACL,KAAK;QACL,KAAK;UACH;QACF;UACE,MAAM,IAAI,MAAM,sCAAsC,OAAO;YAC3D;;;;;;IAMR,OAAO;MACL,SAAS;MACT,QAAQ;MACR,WAAW;MACX,KAAK;MACL,WAAW;;;;;EAIf;KACG,OAAO;KACP,QAAQ,mBAAmB;;AAEhC;ACzKA,CAAC,YAAY;EACX;;;;;;EAMA,SAAS,eAAe,cAAc,YAAY,QAAQ,GAAG,UAAU;IACrE,IAAI,iBAAiB;;IAErB,eAAe,iBAAiB;;IAEhC,OAAO,aAAa,CAAC,OAAO,OAAO,WAAW;MAC5C,CAAC,OAAO;MACR,OAAO,OAAO;;;;;;;;;;;;IAYhB,eAAe,iBAAiB,YAAY;;MAE1C,IAAI,WAAW,eAAe;;MAE9B,IAAI,SAAS,SAAS,eAAe;QACnC,OAAO;;MAET,IAAI,SAAS,SAAS,iBAAiB;QACrC,IAAI,SAAS,iBAAiB,cAAc;UAC1C,OAAO;;QAET,IAAI,SAAS,iBAAiB,YAAY;UACxC,OAAO;;;MAGX,QAAQ,MAAM;;;;;;;IAOhB,eAAe,qBAAqB,YAAY;MAC9C,IAAI,OAAO,eAAe;MAC1B,OAAO,KAAK,OAAO,GAAG,gBAAgB,KAAK,UAAU;;;;;;;;;;;IAWvD,eAAe,UAAU,YAAY;MACnC,IAAI,UAAU,OAAO,WAAW;;;MAGhC,IAAI,UAAU,SAAS,UAAU,KAAK;QACpC,OAAO;;MAET,IAAI,WAAW,SAAS,UAAU,KAAK;QACrC,OAAO;;;;MAIT,IAAI,KAAK,MAAM,aAAa,SAAS;QACnC,OAAO,QAAQ,QAAQ;;;MAGzB,OAAO;;;;;;;;;;;;IAYT,eAAe,WAAW,YAAY;MACpC,OAAO,OAAO,cAAc;;;;;;;;;;;;IAY9B,SAAS,iBAAiB,QAAQ;;MAEhC,IAAI,OAAO,SAAS,eAAe;QACjC,OAAO,MAAM,OAAO;;MAEtB,IAAI,OAAO,SAAS,iBAAiB;QACnC,IAAI,OAAO,iBAAiB,cAAc;UACxC,OAAO,MAAM,OAAO;;QAEtB,IAAI,OAAO,iBAAiB,YAAY;UACtC,OAAO,MAAM,OAAO;;;;MAIxB,OAAO;;;;;;;;IAQT,eAAe,iBAAiB,YAAY;MAC1C,eAAe,iBAAiB;MAChC,eAAe,qBAAqB;MACpC,SAAS,WAAW;QAClB,eAAe,qBAAqB;QACpC,eAAe,iBAAiB;SAC/B;MACH,aAAa,UAAU,aAAa,MAAM;QACxC,EAAE,YAAY,OAAO;;;;;IAKzB,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,SAAS,OAAO,OAAO;UACzB,eAAe;;;;;IAKrB,OAAO;MACL,EAAE,OAAO,OAAO,WAAW,cAAc;;;;IAI3C,OAAO,aAAa,eAAe,WAAW;;;IAG9C,OAAO;;;;EAGT;KACG,OAAO;KACP,WAAW,kBAAkB;;;AAGlC;ACjKA,CAAC,WAAW;EACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+DA,SAAS,mBAAmB,eAAe,cAAc;8BAC7B,WAAW;;;;;;;;;IASrC,SAAS,sBAAsB,YAAY;MACzC,OAAO,0BAA0B,CAAC;;;;;;;;;;IAUpC,SAAS,wBAAwB,QAAQ;MACvC,OAAO,0BAA0B,OAAO;SACrC,KAAK,UAAU,aAAa;UAC3B,aAAa,UAAU,aAAa,MAAM;YACxC,EAAE,IAAI,OAAO,IAAI,OAAO,YAAY;UACtC,OAAO;;;;;;;;;;IAUb,SAAS,0BAA0B,UAAU;MAC3C,IAAI,eAAe,cAAc,QAAQ,UAAU;MACnD,IAAI,cAAc,cAAc,QAAQ;;MAExC,IAAI,YAAY;QACd,OAAO;UACL,QAAQ;UACR,QAAQ;YACN,MAAM;YACN,IAAI;YACJ,YAAY;;UAEd,SAAS;;;;MAIb,IAAI,cAAc,UAAU,WAAW,iBAAiB,IAAI;MAC5D,OAAO,YAAY,MAAM,IAAI,UAAU;;;IAGzC,OAAO;MACL,yBAAyB;MACzB,uBAAuB;;;;;EAI3B;KACG,OAAO;KACP,QAAQ,sBAAsB;;AAEnC;AClIA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,aAAa;IACpB,OAAO;;;MAGL,UAAU;;;;MAIV,OAAO;;;;QAIL,YAAY;QACZ,OAAO;QACP,QAAQ;QACR,aAAa;;;;;;MAMf,YAAY;MACZ,aAAa;;;;EAIjB;KACG,OAAO;KACP,UAAU,cAAc;;;AAG7B;ACvCA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,iBAAiB;IACxB,OAAO;MACL,UAAU;MACV,MAAM,SAAS,OAAO,SAAS;QAC7B,QAAQ,MAAM;;;;;EAKpB;KACG,OAAO;KACP,UAAU,kBAAkB;;;AAGjC;ACvBA,CAAC,YAAY;EACX;;;;;;;;;;;;;;EAcA,SAAS,mBAAmB,GAAG;IAC7B,IAAI,qBAAqB;QACrB,WAAW;UACT,gBAAgB;YACd,MAAM;YACN,QAAQ;YACR,YAAY;;UAEd,aAAa;YACX,MAAM;YACN,QAAQ;YACR,YAAY;;UAEd,eAAe;YACb,MAAM;YACN,QAAQ;YACR,YAAY;;UAEd,YAAY;YACV,MAAM;YACN,QAAQ;YACR,YAAY;;;;IAIpB,mBAAmB,SAAS,WAAW;MACrC,OAAO;;;IAGT,mBAAmB,gBAAgB,WAAW;MAC5C,OAAO,EAAE,OAAO;;;;;;;;IAQlB,mBAAmB,gBAAgB,SAAS,WAAW;MACrD,OAAO,SAAS,cAAc;;;IAGhC,mBAAmB,QAAQ,SAAS,WAAW;MAC7C,OAAO,SAAS,cAAc,YAAY;;;IAG5C,mBAAmB,cAAc,SAAS,UAAU;MAClD,OAAO,eAAe;;;IAGxB,mBAAmB,UAAU,SAAS,WAAW;MAC/C,OAAO,SAAS,cAAc,YAAY;;;IAG5C,mBAAmB,cAAc,SAAS,WAAW;MACnD,OAAO,SAAS,cAAc,YAAY;;;;;;;;;;IAU5C,SAAS,cAAc,WAAW;MAChC,YAAY,QAAQ,UAAU;MAC9B,IAAI,CAAC,aAAa,cAAc,OAAO;QACrC,YAAY;aACP,IAAI,cAAc,cAAc;QACrC,YAAY;;MAEd,OAAO;;;;;;;;;;IAUT,SAAS,eAAe,UAAU;MAChC,WAAW,QAAQ,UAAU;MAC7B,IAAI,CAAC,YAAY,aAAa,gBAAgB;QAC5C,OAAO;aACF,IAAI,aAAa,aAAa;QACnC,OAAO;;MAET,OAAO,SAAS,OAAO,GAAG,gBAAgB,SAAS,MAAM,GAAG;;;IAG9D,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,sBAAsB;;;AAGnC;ACnHA,CAAC,YAAY;EACX;;;;;;EAMA,SAAS,cAAc,YAAY,QAAQ,UAAU,cAAc;yBAC5C,kBAAkB,cAAc,eAAe;yBAC/C,iBAAiB,YAAY,iBAAiB;;IAEnE,IAAI,gBAAgB;;IAEpB,cAAc,WAAW;IACzB,cAAc,UAAU;IACxB,cAAc,0BAA0B;;IAExC,cAAc;MACZ,WAAW;;IAEb,cAAc,mBAAmB,WAAW;MAC1C,GAAG,cAAc,UAAU;QACzB,MAAM,YAAY,OAAO,OAAO,KAAK;QACrC,cAAc;;;;;IAKlB,cAAc,kBAAkB,SAAS,QAAQ,OAAO;MACtD,cAAc,UAAU;MACxB,IAAI,CAAC,EAAE,YAAY,QAAQ;QACzB,cAAc,0BAA0B;;MAE1C,GAAG,CAAC,cAAc,UAAU;QAC1B,aAAa,UAAU,aAAa,MAAM;UACxC,CAAC,MAAM,OAAO;YACZ,aAAa;YACb,SAAS;aACR;;;;IAIT,cAAc,0BAA0B,SAAS,QAAQ;MACvD,aAAa,UAAU,aAAa,MAAM;UACtC;;;IAGN,cAAc,YAAY,WAAW;MACnC,OAAO,OAAO;;;IAGhB,cAAc,OAAO,WAAW;MAC9B,iBAAiB,cAAc,OAAO,OAAO,IAAI;MACjD,GAAG,aAAa,MAAM,SAAS,aAAa,QAAQ,OAAO,OAAO,IAAI;QACpE,aAAa,UAAU,aAAa,MAAM;UACxC,CAAC,MAAM,aAAa;YAClB,aAAa;YACb,UAAU,aAAa;;;;IAI/B,cAAc,aAAa,SAAS,QAAQ,QAAQ,aAAa;MAC/D,OAAO;MACP,aAAa,UAAU,aAAa,MAAM;QACxC,CAAC,UAAU,QAAQ,eAAe,cAAc;;;IAGpD,cAAc,WAAW,SAAS,QAAQ,QAAQ;MAChD,OAAO;MACP,aAAa,UAAU,aAAa,MAAM;QACxC,QAAQ;;;IAGZ,cAAc,aAAa,SAAS,QAAQ,QAAQ;MAClD,OAAO;MACP,aAAa,UAAU,aAAa,MAAM;QACxC,QAAQ;;;IAGZ,cAAc,SAAS,SAAS,QAAQ,QAAQ,QAAQ;MACtD,gBAAgB,wBAAwB,QAAQ,QAAQ;;;IAG1D,cAAc,gBAAgB,SAAS,UAAU;MAC/C,OAAO,cAAc,QAAQ;;;IAG/B,cAAc,sBAAsB,SAAS,MAAM;MACjD,aAAa,gBAAgB,OAAO,gBAAgB;QAClD,IAAI;MACN,IAAI,MAAM;;QAER,MAAM,OAAO,OAAO,KAAK;;;;IAI7B,IAAI,mBAAmB,gBAAgB,QAAQ;IAC/C,OAAO,kBAAkB,gBAAgB,UAAU;MACjD,UAAU,MAAM;QACd,OAAO,kBAAkB;;;IAG7B,WAAW,IAAI,aAAa,MAAM;MAChC,SAAS,OAAO,MAAM;QACpB,cAAc,4BAA4B;;;IAG9C,cAAc,wBAAwB,YAAY;MAChD,IAAI,cAAc,2BAA2B;QAC3C,aAAa,UAAU,aAAa,MAAM;UACxC;;WAEC;QACH,gBAAgB,OAAO,kBAAkB,CAAC,OAAO;;;;IAIrD,OAAO,kBAAkB;IACzB,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,KAAK,OAAO,OAAO,OAAO,IAAI;UAChC,OAAO,kBAAkB,KAAK;;;;IAIpC,cAAc,mBAAmB,WAAW;MAC1C,gBAAgB;;;IAGlB,OAAO,IAAI,YAAY,YAAY;MACjC,SAAS,OAAO,SAAS;MACzB,SAAS,OAAO,SAAS;;;IAG3B,cAAc,mBAAmB,UAAU,QAAQ;MACjD,cAAc;QACZ,WAAW,oBAAoB,OAAO;MACxC,cAAc;QACZ,iBAAiB,qBAAqB,cAAc;UAClD,OAAO;MACX,cAAc,iBAAiB,cAAc,iBAAiB;MAC9D,cAAc;QACZ,CAAC,WAAW,sBAAsB;MACpC,cAAc,eAAe;MAC7B,cAAc,eAAe;;;IAG/B,cAAc,eAAe,UAAU,MAAM;MAC3C,cAAc,eAAe;MAC7B,cAAc;QACZ,cAAc,eAAe,KAAK;MACpC,cAAc;QACZ,iBAAiB,qBAAqB,cAAc;UAClD,KAAK;MACT,cAAc,iBAAiB;MAC/B,cAAc,qBAAqB;;;IAGrC,cAAc,6BAA6B,WAAW;MACpD,OAAO,CAAC,EAAE,QAAQ,cAAc;;;IAGlC,cAAc,kBAAkB,SAAS,QAAQ;MAC/C,IAAI,CAAC,cAAc,UAAU;QAC3B,aAAa,UAAU,aAAa,MAAM;+BACnB,CAAC,MAAM,OAAO;iCACZ,aAAa;iCACb,SAAS;kCACR;;;;IAI9B,SAAS,mBAAmB;MAC1B,GAAG,CAAC,cAAc,UAAU;QAC1B,OAAO,OAAO,YAAY;UACxB,aAAa,UAAU,aAAa,MAAM;YACxC,CAAC,MAAM,OAAO,OAAO;cACnB,aAAa;cACb,SAAS,OAAO;;;;;IAK1B,OAAO;;;;EAGT;KACG,OAAO;KACP,WAAW,iBAAiB;;;AAGjC;AC/LA,CAAC,YAAY;EACX;;;;;;;;;EASA,SAAS,iBAAiB,GAAG,WAAW,YAAY,QAAQ;IAC1D,SAAS,gBAAgB,cAAc,oBAAoB;IAC3D,iBAAiB,YAAY,UAAU;IACvC,IAAI,mBAAmB;QACnB,iBAAiB;QACjB;;IAEJ,iBAAiB,gBAAgB,SAAS,IAAI,YAAY;MACxD,eAAe,MAAM;;;IAGvB,iBAAiB,uBAAuB,SAAS,kBAAkB,QAAQ;MACzE,OAAO,wBAAwB,kBAAkB;;;IAGnD,WAAW,IAAI,aAAa,MAAM;MAChC,SAAS,OAAO,MAAM;QACpB,IAAI,gBAAgB,eAAe,KAAK;QACxC,IAAI,eAAe;UACjB,cAAc,oBAAoB,KAAK;;;;;;;;;;IAU7C,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,kBAAkB,eAAe,KAAK;YACtC,kBAAkB,eAAe;YACjC,YAAY,KAAK;;QAErB,aAAa,UAAU,aAAa,MAAM;UACxC;YACE,WAAW,gBAAgB;;;QAG/B,GAAG,iBAAiB;UAClB,gBAAgB,iBAAiB;;UAEjC,IAAI,gBAAgB,iBAAiB,KAAK,IAAI;YAC5C,YAAY,iBAAiB;;;YAG7B,GAAG,WAAW;cACZ,gBAAgB,cAAc;cAC9B,aAAa,UAAU,aAAa,MAAM;gBACxC;kBACE,WAAW,gBAAgB;kBAC3B,WAAW,mBAAmB,cAAc;kBAC5C,WAAW,aAAa;kBACxB,WAAW,aAAa;;;;;UAKhC,iBAAiB,OAAO,gBAAgB;UACxC,eAAe,KAAK;UACpB,YAAY,iBAAiB;;UAE7B,aAAa,UAAU,aAAa,MAAM,mBAAmB;;;UAG7D,GAAG,WAAW;YACZ,GAAG,OAAO,QAAQ,SAAS,6BAA6B;cACtD,OAAO,GAAG,6BAA6B;gBACrC,MAAM,KAAK;gBACX,YAAY,KAAK,MAAM;;mBAEpB;cACL,UAAU,OAAO,MAAM,KAAK;cAC5B,UAAU,OAAO,YAAY,KAAK,MAAM;;;eAGvC;UACL,eAAe,eAAe,0BAA0B,KAAK;;;;;;;;IAQnE,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,cAAc;QAClB,GAAG,KAAK,OAAO,QAAQ;;UAErB,cAAc,KAAK;UACnB,GAAG,EAAE,YAAY,cAAc;;YAE7B,IAAI,gBAAgB,eAAe,KAAK,OAAO;YAC/C,cAAc,cAAc;YAC5B,GAAG,KAAK,OAAO,QAAQ;cACrB,cAAc,0BAA0B,GAAG;cAC3C,cAAc,KAAK,OAAO,QAAQ,SAAS;;;;QAIjD,mBAAmB,KAAK,QAAQ,KAAK,OAAO,QAAQ;;;IAGxD,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,MAAM;QACrB,IAAI,cAAc;UAChB,IAAI,gBAAgB,eAAe;UACnC,IAAI,SAAS,cAAc;;UAE3B,IAAI,aAAa,KAAK;UACtB,IAAI,UAAU,WAAW;;UAEzB,IAAI,gBAAgB,OAAO,UAAU,QAAQ,SAAS;;;UAGtD,IAAI,eAAe;YACjB,IAAI,cAAc,OAAO,aAAa;;YAEtC,IAAI,QAAQ,SAAS,aAAa;cAChC,IAAI,iBAAiB,EAAE,KAAK;;;cAG5B,UAAU,EAAE,OAAO,OAAO,aAAa,SAAS;gBAC9C,UAAU,SAAS,WAAW;kBAC5B,IAAI,WAAW,OAAO;kBACtB,IAAI,SAAS,OAAO;kBACpB,OAAO;;;YAGb,IAAI,QAAQ,SAAS,aAAa;cAChC,UAAU,EAAE,MAAM,SAAS;;;YAG7B,mBAAmB,QAAQ;iBACtB;YACL,mBAAmB,QAAQ,QAAQ;;;;;;;;;IAS3C,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,QAAQ;QACvB,IAAI,WAAW,sBAAsB,SAAS;UAC5C,mBAAmB,QAAQ,OAAO;;;;;;;;IAQxC,WAAW,IAAI,aAAa,MAAM;MAChC,UAAU,OAAO,QAAQ;QACvB,GAAG,cAAc;UACf,YAAY,eAAe,eAAe;UAC1C,eAAe;UACf,gBAAgB,iBAAiB;;;QAGnC,UAAU,OAAO,YAAY;QAC7B,GAAG,CAAC,QAAQ;UACV,UAAU,OAAO,MAAM;;;;QAIzB,IAAI,QAAQ;UACV,SAAS,WAAW;YAClB,OAAO,WAAW,WAAW,UAAU,YAAY,OAAO;;;;;;;;;IASlE,WAAW,IAAI,aAAa,MAAM;OAC/B;;;;;;IAMH,WAAW,IAAI,aAAa,MAAM;OAC/B;;;;;;IAMH,WAAW,IAAI,aAAa,MAAM;OAC/B;;;;;;IAMH,WAAW,IAAI,aAAa,MAAM;OAC/B;;IAEH,SAAS,mBAAmB,QAAQ,SAAS;MAC3C,IAAI,QAAQ;MACZ,IAAI,OAAO,QAAQ;QACjB,IAAI,gBAAgB,eAAe,OAAO;QAC1C,QAAQ,cAAc;;MAExB,OAAO,gBAAgB,SAAS;MAChC,aAAa,UAAU,aAAa,MAAM;QACxC;MACF,aAAa,UAAU,aAAa,MAAM;QACxC;;;IAGJ,SAAS,mBAAmB,QAAQ,UAAU;;MAE5C,OAAO,kBAAkB,SAAS;;MAElC,aAAa,UAAU,aAAa,MAAM;QACxC;MACF,aAAa,UAAU,aAAa,MAAM;QACxC;;;IAGJ,SAAS,iBAAiB,OAAO,QAAQ;OACtC,IAAI,gBAAgB,eAAe,OAAO;OAC1C,cAAc,iBAAiB;;;IAGlC,SAAS,aAAa,OAAO,MAAM;MACjC,IAAI,gBAAgB,eAAe,KAAK,OAAO;MAC/C,cAAc,aAAa;MAC3B,aAAa,UAAU,aAAa,MAAM;QACxC,KAAK;;;IAGT,SAAS,YAAY,eAAe,YAAY;;MAE9C,GAAG,cAAc,aAAa,YAAY;QACxC,cAAc,WAAW,cAAc;;;;IAI3C,SAAS,SAAS,OAAO,QAAQ;MAC/B,IAAI,gBAAgB,eAAe,OAAO;MAC1C,cAAc;;;;;;;;;;;IAWhB,SAAS,wBAAwB,YAAY,QAAQ;MACnD,IAAI,kBAAkB;MACtB,IAAI,WAAW,OAAO,gBAAgB;QACpC,OAAO;;MAET,kBAAkB,QAAQ;OACzB,mBAAmB,iBAAiB,CAAC,IAAI;;MAE1C,GAAG,OAAO,QAAQ;QAChB,GAAG,WAAW,iBAAiB,SAAS;UACtC,kBAAkB,QAAQ;WACzB,iBAAiB,CAAC,IAAI;eAClB,GAAG,WAAW,oBAAoB,SAAS;YAC9C,kBAAkB,QAAQ;aACzB,iBAAiB,CAAC,IAAI;;;;MAI7B,IAAI,YAAY;QACd,kBAAkB,QAAQ;SACzB,iBAAiB,CAAC,IAAI;;;MAGzB,OAAO,QAAQ,UAAU,iBAAiB,CAAC,IAAI,IAAI,WAAW;;;IAGhE,OAAO;;;;EAGT;KACG,OAAO;KACP,QAAQ,oBAAoB;;;;AAIjC;AClTA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,YAAY;IACnB,OAAO;MACL,UAAU;MACV,UAAU,CAAC,UAAU;MACrB,OAAO;QACL,QAAQ;QACR,aAAa;QACb,eAAe;;MAEjB,YAAY;MACZ,aAAa;MACb,MAAM,SAAS,OAAO,SAAS,MAAM,eAAe;QAClD,cAAc;;;;;EAKpB;KACG,OAAO;KACP,UAAU,aAAa;;;AAG5B;AC9BA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,kBAAkB;IACzB,OAAO;MACL,UAAU;MACV,UAAU,CAAC;MACX,OAAO;QACL,QAAQ;;MAEV,aAAa;;;;EAIjB;KACG,OAAO;KACP,UAAU,mBAAmB;;;AAGlC;ACxBA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,YAAY,WAAW,YAAY;;IAE1C,SAAS,YAAY,UAAU;MAC7B,IAAI,WAAW,UAAU,WAAW,eAAe,IAAI;QACrD,OAAO;UACL,QAAQ;UACR,QAAQ;YACN,UAAU;;;;MAIhB,OAAO,SAAS,QAAQ;;;IAG1B,SAAS,YAAY;MACnB,IAAI,SAAS,UAAU,WAAW,aAAa,IAAI;QACjD,OAAO;UACL,QAAQ;;;MAGZ,OAAO,OAAO,QAAQ;;;IAGxB,OAAO;MACL,UAAU;QACR,QAAQ;UACN,aAAa;;;MAGjB,aAAa;MACb,WAAW;;;;EAGf;KACG,OAAO;KACP,QAAQ,eAAe;;AAE5B;AC7CA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,WAAW,YAAY,GAAG;;;;;;;;;;IAUjC,SAAS,gBAAgB,WAAW,QAAQ,OAAO;MACjD,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO;QAClC,OAAO;;MAET,OAAO,EAAE,OAAO,WAAW,UAAU,UAAU;QAC7C,OAAO,UAAU,UAAU,QAAQ;;;;;;;;IAQvC,SAAS,iBAAiB,WAAW;MACnC,IAAI,eAAe;MACnB,IAAI,MAAM,OAAO,KAAK,WAAW,OAAO,UAAU,IAAI;QACpD,OAAO,GAAG,QAAQ,SAAS,CAAC;;MAE9B,IAAI,QAAQ,SAAS,IAAI;QACvB,aAAa,OAAO,UAAU;;MAEhC,OAAO;;;IAGT,SAAS,kBAAkB,WAAW;MACpC,IAAI,eAAe;MACnB,IAAI,MAAM,OAAO,KAAK,WAAW,OAAO,UAAU,IAAI;QACpD,OAAO,GAAG,QAAQ,SAAS,CAAC;;MAE9B,IAAI,QAAQ,SAAS,IAAI;QACvB,aAAa,KAAK,UAAU;;MAE9B,OAAO;;;;IAIT,SAAS,UAAU,UAAU,QAAQ,OAAO;MAC1C,GAAG,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO;QACjC,OAAO;;MAET,OAAO,EAAE,IAAI,QAAQ,SAAS,OAAO;QACnC,OAAO,EAAE,IAAI,OAAO,SAAS,MAAM;UACjC,OAAO,WAAW,OAAO,SAAS,QAAQ,MAAM;;;;;IAKtD,OAAO;MACL,mBAAmB;MACnB,kBAAkB;MAClB,qBAAqB;;;;EAGzB;KACG,OAAO;KACP,QAAQ,cAAc;;AAE3B;AC3EA,CAAC,WAAW;EACV;;;;;;;EAOA,SAAS,WAAW,oBAAoB,GAAG;;IAEzC,SAAS,oBAAoB,QAAQ;MACnC,IAAI,iBAAiB,SAAS;QAC5B,OAAO,mBAAmB,cAAc;;WAErC,IAAI,oBAAoB,SAAS;QACpC,OAAO,mBAAmB,cAAc;;WAErC,IAAI,sBAAsB,SAAS;QACtC,OAAO,mBAAmB,cAAc;;WAErC;QACH,OAAO,OAAO;;;;IAIlB,SAAS,sBAAsB,QAAQ;;;MAGrC,IAAI,UAAU,EAAE,MAAM,OAAO;QAC3B,SAAS,aAAa,OAAO;UAC3B,OAAO,YAAY;YACjB,YAAY,OAAO,gBAAgB;;MAEzC,OAAO,CAAC;;;IAGV,SAAS,iBAAiB,QAAQ;MAChC,OAAO,EAAE,QAAQ,EAAE,QAAQ,OAAO;;;IAGpC,SAAS,oBAAoB,QAAQ;MACnC,OAAO,EAAE,QAAQ,OAAO,iBAAiB;QACvC,OAAO,gBAAgB;;;IAG3B,SAAS,YAAY,OAAO;MAC1B,OAAO,SAAS;;;IAGlB,OAAO;MACL,uBAAuB;MACvB,wBAAwB;MACxB,mBAAmB;MACnB,sBAAsB;;;;EAG1B;KACG,OAAO;KACP,QAAQ,cAAc;;AAE3B;AC5DA,CAAC,WAAW;EACV;;;;;;;;;;EAUA,SAAS,gBAAgB;IACvB,OAAO;MACL,kBAAkB,SAAS,YAAY;QACrC,OAAO,WAAW,GAAG,SAAS,SAAS,WAAW,KAAK,WAAW;;MAEpE,iBAAiB,SAAS,YAAY;QACpC,OAAO,WAAW,GAAG,SAAS,YAAY,WAAW,KAAK,WAAW;;;;EAI3E;KACG,OAAO;KACP,QAAQ,iBAAiB;;AAE9B;ACzBA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,aAAa;IACpB,SAAS,WAAW,KAAK,QAAQ,YAAY;MAC3C,IAAI,cAAc,OAAO,QAAQ;QAC/B,MAAM,IAAI;QACV,SAAS,OAAO;;MAElB,OAAO,IAAI,YAAY,QAAQ,OAAO;;;IAGxC,SAAS,SAAS,KAAK,QAAQ,YAAY;MACzC,IAAI,cAAc,OAAO,QAAQ;QAC/B,MAAM,IAAI;QACV,SAAS,OAAO;;MAElB,OAAO,IAAI,QAAQ,QAAQ,IAAI,SAAS,OAAO,YAAY,CAAC;;;IAG9D,SAAS,OAAO,MAAM,IAAI,YAAY;MACpC,IAAI,cAAc,QAAQ,IAAI;QAC5B,OAAO,KAAK;QACZ,KAAK,GAAG;;MAEV,OAAO,SAAS;;;IAGlB,OAAO;MACL,aAAa;MACb,aAAa;MACb,aAAa;;;EAGjB;KACG,OAAO;KACP,QAAQ,cAAc;;AAE3B;AC5CA,CAAC,WAAW;EACV;;;;;;;;EAQA,SAAS,WAAW,WAAW,OAAO,IAAI,cAAc,GAAG;;IAEzD,IAAI,CAAC,SAAS,QAAQ;MACpB,SAAS;QACP,OAAO,SAAS,WAAW,OAAO,OAAO,SAAS;SACjD,OAAO,SAAS,QAAQ,MAAM,OAAO,SAAS,QAAQ;;;IAG3D,IAAI,aAAa;MACf,kBAAkB;MAClB,aAAa;MACb,UAAU;MACV,OAAO;MACP,oBAAoB,SAAS,SAAS,SAAS;QAC7C;;IAEJ,WAAW,oBAAoB;;IAE/B,WAAW,OAAO,YAAY;MAC5B,IAAI,SAAS;QACX,OAAO,GAAG,KAAK;;WAEZ;;;;;;;;;;;QAWH,OAAO,MAAM,IAAI,YAAY,KAAK,UAAU,UAAU;UACpD,IAAI,SAAS,SAAS;UACtB,IAAI,OAAO,SAAS;YAClB,UAAU,OAAO;iBACZ;YACL,IAAI,aAAa,OAAO,QAAQ,QAAQ,QAAQ;gBAC5C,QAAQ,SAAS,KAAK,QAAQ;;YAElC,WAAW,oBAAoB,SAAS,SAAS,SAAS;YAC1D,GAAG,SAAS,GAAG;cACb,WAAW,oBAAoB,SAAS,KAAK,UAAU,GAAG;;YAE5D,WAAW,oBAAoB,WAAW;cACxC,QAAQ,QAAQ;YAClB,UAAU,WAAW,oBAAoB;;;;;;;UAO3C,OAAO,EAAE,UAAU;YACjB,SAAS;YACT,MAAM;YACN,SAAS;YACT,QAAQ;YACR,WAAW;YACX,UAAU;YACV,QAAQ;YACR,UAAU;YACV,aAAa;YACb,YAAY;YACZ,aAAa;aACZ,MAAM;;;UAGT,WAAW,cAAc,KAAK;UAC9B,WAAW,kBAAkB,KAAK;UAClC,WAAW,oBAAoB,KAAK;UACpC,WAAW,yBAAyB,KAAK;UACzC,WAAW,iBAAiB,KAAK;UACjC,WAAW,oBAAoB,KAAK;UACpC,WAAW,cAAc,KAAK;UAC9B,WAAW,gBAAgB,KAAK;UAChC,WAAW,kBAAkB,KAAK;UAClC,WAAW,iBAAiB,KAAK;UACjC,WAAW,kBAAkB,KAAK;;UAElC,WAAW,eAAe,SAAS,aAAa,aAAa;YAC3D,OAAO,WAAW,oBAAoB;cACpC,cAAc,OAAO;;;UAGzB,WAAW,iBAAiB,WAAW;YACrC;;;;;;;;IAQR,WAAW,YAAY,UAAU,KAAK;MACpC,OAAO,UAAU,SAAS;;;IAG5B,WAAW,cAAc,UAAU,cAAc,MAAM;MACrD,OAAO,kBAAkB,MAAM;QAC7B,yBAAyB;;;IAG7B,WAAW,mBAAmB,UAAU,QAAQ;MAC9C,OAAO,oBAAoB,MAAM,SAAS;;;IAG5C,WAAW,uBAAuB,oBAAoB;;IAEtD,OAAO;;;;;;;;;IASP,SAAS,UAAU;MACjB,OAAO,UAAU,MAAM,UAAU,KAAK,KAAK,WAAW;;;;;;IAMxD,SAAS,MAAM,KAAK;MAClB,OAAO,SAAS,KAAK;QACnB,OAAO,IAAI;;;;;;EAKjB;KACG,OAAO;KACP,QAAQ,cAAc;;AAE3B","file":"app.js","sourcesContent":["(function() {\n 'use strict';\n\n /**\n * Root application\n * app.js\n */\n angular.module(\n 'app', [\n 'ngResource',\n 'ngAnimate',\n 'ui.router',\n 'templates',\n 'cfp.hotkeys',\n 'focusOn',\n 'monospaced.elastic',\n 'gettext',\n 'diff-match-patch'\n ]);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name AppConfig\n * @description Main config for the entire app\n * @ngInject\n */\n function AppConfig($stateProvider, $urlRouterProvider, $httpProvider,\n hotkeysProvider) {\n\n //Can't use injection for EventService as this module is out of the scope\n var interceptor = function($q, $rootScope) {\n return {\n request: function(config) {\n // See EventService.EVENT.LOADING_START\n $rootScope.$broadcast('loadingStart');\n return config;\n },\n requestError: function(rejection) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n console.error('Request error due to ', rejection);\n return $q.reject(rejection);\n },\n response: function(response) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n return response || $q.when(response);\n },\n responseError: function(rejection) {\n // See EventService.EVENT.LOADING_STOP\n $rootScope.$broadcast('loadingStop');\n if (rejection.status === 401) {\n console.error('Unauthorized access. Please login');\n } else if (rejection.status === 404) {\n console.error('Service end point not found- ',\n rejection.config.url);\n } else {\n console.error('Error in response ', rejection);\n }\n return $q.reject(rejection);\n }\n };\n };\n\n $httpProvider.interceptors.push(interceptor);\n\n // For any unmatched url, redirect to /editor\n $urlRouterProvider.otherwise('/');\n\n $stateProvider\n .state('editor', {\n url: '/:projectSlug/:versionSlug/translate',\n templateUrl: 'editor/editor.html',\n controller: 'EditorCtrl as editor',\n resolve: {\n url : function(UrlService) {\n return UrlService.init();\n }\n }\n }).state('editor.selectedContext', {\n url: '/:docId/:localeId',\n views: {\n 'editor-content': {\n templateUrl: 'editor/editor-content.html',\n controller: 'EditorContentCtrl as editorContent'\n },\n 'editor-suggestions': {\n templateUrl: 'editor/editor-suggestions.html',\n controller: 'EditorSuggestionsCtrl as editorSuggestions'\n },\n 'editor-details': {\n templateUrl: 'editor/editor-details.html',\n controller: 'EditorDetailsCtrl as editorDetails'\n }\n }\n }).state('editor.selectedContext.tu', {\n url: '/?id&selected?states',\n reloadOnSearch: false\n });\n\n hotkeysProvider.includeCheatSheet = false;\n\n // $locationProvider.html5Mode(true);\n // .hashPrefix('!');\n }\n\n angular\n .module('app')\n .config(AppConfig);\n\n})();\n\n\n\n","(function() {\n 'use strict';\n\n /**\n * AddConstants\n * \"Global\" app variables. Don't worry David, they're not really global.\n */\n angular\n .module('app')\n .constant('_', window._)\n .constant('str', window._.string)\n .constant('Mousetrap', window.Mousetrap)\n // Toggle to hide/show features that are ready for production\n .constant('PRODUCTION', true);\n\n})();\n\n\n","(function() {\n 'use strict';\n\n /**\n * @name AppCtrl\n * @description Main controler for the entire app\n * @ngInject\n */\n function AppCtrl($scope, UserService, UrlService, LocaleService,\n MessageHandler, gettextCatalog, StringUtil, PRODUCTION) {\n var appCtrl = this;\n\n // See AppConstants.js\n appCtrl.PRODUCTION = PRODUCTION;\n appCtrl.settings = UserService.settings;\n appCtrl.uiLocaleList = [ LocaleService.DEFAULT_LOCALE ];\n\n /*\n Not used for the time being. But should show loading when change state\n $scope.$on('$stateChangeStart', function(event, toState) {\n if (toState.resolve) {\n }\n });\n\n $scope.$on('$stateChangeSuccess', function(event, toState) {\n if (toState.resolve) {\n }\n });\n */\n\n UrlService.init().then(loadLocales).\n then(loadUserInformation).\n then(loadUILocale);\n\n // On UI locale changes listener\n appCtrl.onChangeUILocale = function(locale) {\n appCtrl.myInfo.locale = locale;\n var uiLocaleId = appCtrl.myInfo.locale.localeId;\n if (!StringUtil.startsWith(uiLocaleId,\n LocaleService.DEFAULT_LOCALE.localeId, true)) {\n gettextCatalog.loadRemote(UrlService.uiTranslationURL(uiLocaleId))\n .then(\n function() {\n gettextCatalog.setCurrentLanguage(uiLocaleId);\n },\n function(error) {\n MessageHandler.displayInfo('Error loading UI locale. ' +\n 'Default to \\'' + LocaleService.DEFAULT_LOCALE.name +\n '\\': ' + error);\n gettextCatalog.setCurrentLanguage(\n LocaleService.DEFAULT_LOCALE);\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n });\n } else {\n gettextCatalog.setCurrentLanguage(\n LocaleService.DEFAULT_LOCALE.localeId);\n }\n };\n\n appCtrl.dashboardPage = function() {\n return UrlService.DASHBOARD_PAGE;\n };\n\n function loadLocales() {\n return LocaleService.getAllLocales();\n }\n\n function loadUserInformation() {\n return UserService.getMyInfo().then(\n function(myInfo) {\n appCtrl.myInfo = myInfo;\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n appCtrl.myInfo.gravatarUrl = UrlService.gravatarUrl(\n appCtrl.myInfo.gravatarHash, 72);\n }, function(error) {\n MessageHandler.displayError('Error loading my info: ' + error);\n });\n }\n\n function loadUILocale() {\n LocaleService.getUILocaleList().then(\n function(translationList) {\n for ( var i in translationList.locales) {\n var language = {\n 'localeId' : translationList.locales[i],\n 'name' : ''\n };\n appCtrl.uiLocaleList.push(language);\n }\n appCtrl.myInfo.locale = LocaleService.getLocaleByLocaleId(\n appCtrl.uiLocaleList, LocaleService.DEFAULT_LOCALE.localeId);\n if (!appCtrl.myInfo.locale) {\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n }\n },\n function(error) {\n MessageHandler.displayInfo('Error loading UI locale. ' +\n 'Default to \\'' + LocaleService.DEFAULT_LOCALE.name +\n '\\': ' + error);\n appCtrl.myInfo.locale = LocaleService.DEFAULT_LOCALE;\n });\n }\n }\n\n angular\n .module('app')\n .controller('AppCtrl', AppCtrl);\n\n})();\n\n\n\n","(function() {\n 'use strict';\n\n /**\n * EditorContentCtrl.js\n * @ngInject\n */\n function EditorContentCtrl($rootScope, EditorService, PhraseService,\n DocumentService, UrlService, EventService,\n $stateParams, PhraseUtil, $location, _,\n TransStatusService) {\n\n //TODO: move pager to directives/convert to infinite scroll\n var COUNT_PER_PAGE = 50,\n editorContentCtrl = this, status, filter;\n refreshFilterQueryFromUrl();\n\n editorContentCtrl.phrases = [];\n\n EditorService.updateContext($stateParams.projectSlug,\n $stateParams.versionSlug, DocumentService.decodeDocId($stateParams.docId),\n $stateParams.localeId);\n\n init();\n\n $rootScope.$on(EventService.EVENT.FILTER_TRANS_UNIT,\n function (event, filter) {\n if(filter.status.all === true) {\n $location.search('status', null);\n } else {\n var queries = [];\n _.forEach(filter.status, function(val, key) {\n if(val) {\n queries.push(key);\n }\n });\n $location.search('status', queries.join(','));\n }\n refreshFilterQueryFromUrl();\n init();\n });\n\n function refreshFilterQueryFromUrl() {\n status = UrlService.readValue('status');\n\n if(!_.isUndefined(status)) {\n status = status.split(',');\n status = _.transform(status, function(result, state) {\n state = TransStatusService.getServerId(state);\n return result.push(state);\n });\n }\n filter = {\n 'status': status\n };\n }\n\n\n $rootScope.$on(EventService.EVENT.GOTO_FIRST_PAGE,\n function () {\n if(EditorService.currentPageIndex > 0) {\n EditorService.currentPageIndex = 0;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_PREV_PAGE,\n function () {\n if(EditorService.currentPageIndex > 0) {\n EditorService.currentPageIndex -= 1;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_PAGE,\n function () {\n if(EditorService.currentPageIndex < EditorService.maxPageIndex) {\n EditorService.currentPageIndex +=1;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n $rootScope.$on(EventService.EVENT.GOTO_LAST_PAGE,\n function () {\n if(EditorService.currentPageIndex < EditorService.maxPageIndex) {\n EditorService.currentPageIndex = EditorService.maxPageIndex;\n changePage(EditorService.currentPageIndex);\n }\n });\n\n /*\n TODO: after moving to infinite scroll, all these go to event handler\n should move back to TransUnitService and use PhraseService.findNextId etc\n */\n // EventService.EVENT.GOTO_NEXT_ROW listener\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_ROW, goToNextRow);\n\n // EventService.EVENT.GOTO_PREVIOUS_ROW listener\n $rootScope.$on(EventService.EVENT.GOTO_PREVIOUS_ROW, goToPreviousRow);\n\n // EventService.EVENT.GOTO_NEXT_UNTRANSLATED listener\n $rootScope.$on(EventService.EVENT.GOTO_NEXT_UNTRANSLATED,\n goToNextUntranslated);\n\n function goToNextRow(event, data) {\n var phrases = editorContentCtrl.phrases,\n phrase,\n currentIndex,\n nextIndex,\n nextId;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n nextIndex = Math.min(currentIndex + 1, phrases.length - 1);\n nextId = phrases[nextIndex].id;\n\n if (nextId !== data.currentId) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': nextId,\n 'updateURL': true,\n 'focus': true\n }, null);\n } else {\n // we have reach the end\n phrase = phrases[currentIndex];\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n function goToPreviousRow(event, data) {\n var phrases = editorContentCtrl.phrases,\n phrase,\n currentIndex,\n previousIndex,\n prevId;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n previousIndex = Math.max(currentIndex - 1, 0);\n prevId = phrases[previousIndex].id;\n\n if (prevId !== data.currentId) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': prevId,\n 'updateURL': true,\n 'focus': true\n }, null);\n } else {\n phrase = phrases[currentIndex];\n // have reach the start\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n function goToNextUntranslated(event, data) {\n var phrases = editorContentCtrl.phrases,\n requestStatus = TransStatusService.getStatusInfo(status),\n currentIndex,\n nextStatusInfo;\n\n currentIndex = _.findIndex(phrases, function (phrase) {\n return phrase.id === data.currentId;\n });\n\n for (var i = currentIndex + 1; i < phrases.length; i++) {\n nextStatusInfo = TransStatusService.getStatusInfo(\n phrases[i].state);\n if (nextStatusInfo.ID === requestStatus.ID) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {\n 'id': phrases[i].id,\n 'updateURL': true,\n 'focus': true\n }, null);\n return;\n }\n }\n // can not find next untranslated\n //TransUnitService.saveCurrentRowIfModifiedAndUnfocus(data);\n }\n\n function changePage(pageIndex) {\n loadPhrase(pageIndex);\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT);\n }\n\n /**\n * Load transUnit\n *\n * @param projectSlug\n * @param versionSlug\n * @param docId\n * @param localeId\n */\n function init() {\n EventService.emitEvent(EventService.EVENT.REFRESH_STATISTIC,\n {\n projectSlug: EditorService.context.projectSlug,\n versionSlug: EditorService.context.versionSlug,\n docId: EditorService.context.docId,\n localeId: EditorService.context.localeId\n }\n );\n\n PhraseService.getPhraseCount(EditorService.context, filter).\n then(function(count) {\n EditorService.maxPageIndex = parseInt(count / COUNT_PER_PAGE);\n if(count > COUNT_PER_PAGE) {\n EditorService.maxPageIndex = count % COUNT_PER_PAGE !== 0 ?\n EditorService.maxPageIndex +=1 : EditorService.maxPageIndex;\n }\n\n EditorService.maxPageIndex = EditorService.maxPageIndex -1 < 0 ? 0 :\n EditorService.maxPageIndex -1;\n\n loadPhrase(EditorService.currentPageIndex);\n });\n }\n\n function loadPhrase(pageIndex) {\n var startIndex = pageIndex * COUNT_PER_PAGE;\n PhraseService.fetchAllPhrase(EditorService.context, filter,\n startIndex, COUNT_PER_PAGE).then(displayPhrases);\n }\n\n function displayPhrases(phrases) {\n editorContentCtrl.phrases = phrases;\n }\n\n return editorContentCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorContentCtrl', EditorContentCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * EditorCtrl.js\n * @ngInject\n */\n function EditorCtrl($scope, UserService, DocumentService, LocaleService,\n ProjectService, EditorService, SettingsService, StatisticUtil,\n UrlService, $stateParams, $state, MessageHandler, $rootScope,\n EventService, EditorShortcuts, _, Mousetrap) {\n var editorCtrl = this;\n editorCtrl.pageNumber = 1;\n editorCtrl.showCheatsheet = false;\n editorCtrl.shortcuts = _.mapValues(\n _.values(EditorShortcuts.SHORTCUTS), function(shortcutInfo) {\n // second combo (secondary keys) is an array. We have to flatten it\n var keyCombos = _.flatten(shortcutInfo.keyCombos, 'combo');\n return {\n combos: _.map(keyCombos, function(key) {\n return EditorShortcuts.symbolizeKey(key);\n }),\n description: shortcutInfo.keyCombos[0].description\n };\n });\n\n //tu status to include for display\n editorCtrl.filter = {\n 'status' : {\n 'all': true,\n 'approved' : false,\n 'translated' : false,\n 'needsWork': false,\n 'untranslated': false\n }\n };\n\n processFilterQuery();\n\n //This is just processing UI during startup,\n //phrase filtering are done in EditorContentCtrl during init\n function processFilterQuery() {\n //process filter query\n var status = UrlService.readValue('status');\n\n if(!_.isUndefined(status)) {\n status = status.split(',');\n _.forEach(status, function(val) {\n if(!_.isUndefined(editorCtrl.filter.status[val])) {\n editorCtrl.filter.status[val] = true;\n }\n });\n updateFilter();\n }\n }\n\n Mousetrap.bind('?', function(event) {\n var srcElement = event.srcElement;\n if (!editorCtrl.showCheatsheet && !stopCheatsheetCallback(srcElement)) {\n editorCtrl.toggleKeyboardShortcutsModal();\n $scope.$digest();\n }\n }, 'keyup');\n\n /**\n * Mousetrap by default stops callback on input elements BUT\n * hotkeys monkey patched it!!!\n * TODO change this hack once we remove angular hotkeys\n */\n function stopCheatsheetCallback(element) {\n // if the element has the class \"mousetrap\" then no need to stop\n if ((' ' + element.className + ' ').indexOf(' mousetrap ') > -1) {\n return false;\n }\n\n // stop for input, select, and textarea\n return element.tagName === 'INPUT' || element.tagName === 'SELECT' ||\n element.tagName === 'TEXTAREA' || element.isContentEditable;\n }\n\n //TODO: cross domain rest\n //TODO: Unit test\n\n //Working URL: http://localhost:8000/#/tiny-project/1/translate or\n // http://localhost:8000/#/tiny-project/1/translate/hello.txt/fr\n editorCtrl.context = EditorService.initContext($stateParams.projectSlug,\n $stateParams.versionSlug, DocumentService.decodeDocId($stateParams.docId),\n LocaleService.DEFAULT_LOCALE, LocaleService.DEFAULT_LOCALE.localeId,\n 'READ_WRITE');\n\n editorCtrl.toggleKeyboardShortcutsModal = function() {\n editorCtrl.showCheatsheet = !editorCtrl.showCheatsheet;\n };\n\n var SHOW_SUGGESTIONS = SettingsService.SETTING.SHOW_SUGGESTIONS;\n $scope.showSuggestions = SettingsService.subscribe(SHOW_SUGGESTIONS,\n function (show) {\n $scope.showSuggestions = show;\n });\n editorCtrl.toggleSuggestionPanel = function () {\n SettingsService.update(SHOW_SUGGESTIONS, !$scope.showSuggestions);\n };\n\n\n editorCtrl.versionPage = function() {\n return UrlService.PROJECT_PAGE(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug);\n };\n\n editorCtrl.encodeDocId = function(docId) {\n return DocumentService.encodeDocId(docId);\n };\n\n ProjectService.getProjectInfo($stateParams.projectSlug).then(\n function(projectInfo) {\n editorCtrl.projectInfo = projectInfo;\n },\n function(error) {\n MessageHandler.displayError('Error getting project ' +\n 'information:' + error);\n });\n\n LocaleService.getSupportedLocales(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug).then(\n function(locales) {\n editorCtrl.locales = locales;\n if (!editorCtrl.locales || editorCtrl.locales.length <= 0) {\n //redirect if no supported locale in version\n MessageHandler.displayError('No supported locales in ' +\n editorCtrl.context.projectSlug + ' : ' +\n editorCtrl.context.versionSlug);\n } else {\n //if localeId is not defined in url, set to first from list\n var selectedLocaleId = $state.params.localeId;\n var context = editorCtrl.context;\n\n if (!selectedLocaleId) {\n context.localeId = editorCtrl.locales[0].localeId;\n transitionToEditorSelectedView();\n } else {\n context.localeId = selectedLocaleId;\n if (!LocaleService.containsLocale(editorCtrl.locales,\n selectedLocaleId)) {\n context.localeId = editorCtrl.locales[0].localeId;\n }\n }\n }\n }, function(error) {\n MessageHandler.displayError('Error getting locale list: ' + error);\n });\n\n DocumentService.findAll(editorCtrl.context.projectSlug,\n editorCtrl.context.versionSlug).then(\n function(documents) {\n editorCtrl.documents = documents;\n\n if (!editorCtrl.documents || editorCtrl.documents.length <= 0) {\n //redirect if no documents in version\n MessageHandler.displayError('No documents in ' +\n editorCtrl.context.projectSlug + ' : ' +\n editorCtrl.context.versionSlug);\n } else {\n //if docId is not defined in url, set to first from list\n var selectedDocId = $state.params.docId,\n context = editorCtrl.context;\n if (!selectedDocId) {\n context.docId = editorCtrl.documents[0].name;\n transitionToEditorSelectedView();\n } else {\n context.docId = DocumentService.decodeDocId(selectedDocId);\n if (!DocumentService.containsDoc(editorCtrl.documents,\n context.docId)) {\n context.docId = editorCtrl.documents[0].name;\n }\n }\n }\n }, function(error) {\n MessageHandler.displayError('Error getting document list: ' + error);\n });\n\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n editorCtrl.unitSelected = data.id;\n editorCtrl.focused = data.focus;\n });\n\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function () {\n editorCtrl.unitSelected = false;\n editorCtrl.focused = false;\n });\n\n $rootScope.$on(EventService.EVENT.REFRESH_STATISTIC,\n function (event, data) {\n\n loadStatistic(data.projectSlug, data.versionSlug, data.docId,\n data.localeId);\n\n editorCtrl.context.docId = data.docId;\n editorCtrl.context.localeId = data.localeId;\n });\n\n editorCtrl.pageNumber = function() {\n if(EditorService.maxPageIndex === 0) {\n return EditorService.currentPageIndex + 1;\n } else {\n return (EditorService.currentPageIndex + 1) + ' of ' +\n (EditorService.maxPageIndex + 1);\n }\n };\n\n editorCtrl.getLocaleName = function(localeId) {\n return LocaleService.getName(localeId);\n };\n\n editorCtrl.firstPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_FIRST_PAGE);\n };\n\n editorCtrl.lastPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_LAST_PAGE);\n };\n\n\n editorCtrl.nextPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_PAGE);\n };\n\n editorCtrl.previousPage = function() {\n EventService.emitEvent(EventService.EVENT.GOTO_PREV_PAGE);\n };\n\n editorCtrl.resetFilter = function() {\n resetFilter(true);\n };\n\n editorCtrl.updateFilter = function() {\n updateFilter(true);\n };\n\n function updateFilter(fireEvent) {\n if(isStatusSame(editorCtrl.filter.status)) {\n resetFilter(fireEvent);\n } else {\n editorCtrl.filter.status.all = false;\n if(fireEvent) {\n EventService.emitEvent(EventService.EVENT.FILTER_TRANS_UNIT,\n editorCtrl.filter);\n }\n }\n }\n\n function resetFilter(fireEvent) {\n editorCtrl.filter.status.all = true;\n editorCtrl.filter.status.approved = false;\n editorCtrl.filter.status.translated = false;\n editorCtrl.filter.status.needsWork = false;\n editorCtrl.filter.status.untranslated = false;\n\n if(fireEvent) {\n EventService.emitEvent(EventService.EVENT.FILTER_TRANS_UNIT,\n editorCtrl.filter);\n }\n }\n\n function isStatusSame(statuses) {\n return statuses.approved === statuses.translated &&\n statuses.translated === statuses.needsWork &&\n statuses.needsWork === statuses.untranslated;\n }\n\n function transitionToEditorSelectedView() {\n if (isDocumentAndLocaleSelected()) {\n $state.go('editor.selectedContext', {\n 'docId': editorCtrl.context.docId,\n 'localeId': editorCtrl.context.localeId\n });\n }\n }\n\n function isDocumentAndLocaleSelected() {\n return editorCtrl.context.docId && editorCtrl.context.localeId;\n }\n\n /**\n * Load document statistics (word and message)\n *\n * @param projectSlug\n * @param versionSlug\n * @param docId\n * @param localeId\n */\n function loadStatistic(projectSlug, versionSlug, docId, localeId) {\n DocumentService.getStatistics(projectSlug, versionSlug, docId, localeId)\n .then(function(statistics) {\n editorCtrl.wordStatistic = StatisticUtil\n .getWordStatistic(statistics);\n editorCtrl.messageStatistic = StatisticUtil\n .getMsgStatistic(statistics);\n },\n function(error) {\n MessageHandler.displayError('Error loading statistic: ' + error);\n });\n }\n\n this.settings = UserService.settings.editor;\n\n EditorShortcuts.enableEditorKeys();\n }\n\n angular\n .module('app')\n .controller('EditorCtrl', EditorCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * EditorDetailsCtrl.js\n * @ngInject\n */\n function EditorDetailsCtrl() {\n var editorDetailsCtrl = this;\n\n return editorDetailsCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorDetailsCtrl', EditorDetailsCtrl);\n})();\n","(function () {\n 'use strict';\n\n /**\n * EditorService.js\n * //TODO: parse editorContext in functions\n * @ngInject\n */\n function EditorService($rootScope, $resource, _, UrlService,\n EventService, PhraseService, PhraseUtil, DocumentService, MessageHandler,\n TransStatusService) {\n var editorService = this,\n queue = {};\n\n editorService.context = {};\n\n editorService.currentPageIndex = 0;\n editorService.maxPageIndex = 0;\n\n editorService.initContext =\n function (projectSlug, versionSlug, docId, srcLocale, localeId, mode) {\n editorService.context = {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: docId,\n srcLocale: srcLocale,\n localeId: localeId,\n mode: mode // READ_WRITE, READ_ONLY, REVIEW\n };\n return editorService.context;\n };\n\n editorService.updateContext = function(projectSlug, versionSlug, docId,\n localeId) {\n if(editorService.context.projectSlug !== projectSlug) {\n editorService.context.projectSlug = projectSlug;\n }\n if(editorService.context.versionSlug !== versionSlug) {\n editorService.context.versionSlug = versionSlug;\n }\n if(editorService.context.docId !== docId) {\n editorService.context.docId = docId;\n }\n if(editorService.context.localeId !== localeId) {\n editorService.context.localeId = localeId;\n }\n };\n\n /**\n * EventService.EVENT.SAVE_TRANSLATION listener\n * Perform save translation with given status\n *\n * - queue save translation request (1 global queue, 1 for each TU)\n * - if queue contains request id, replace old request with new request\n */\n $rootScope.$on(EventService.EVENT.SAVE_TRANSLATION,\n function (event, data) {\n var phrase = data.phrase,\n status = data.status;\n if (!needToSavePhrase(phrase, status)) {\n // nothing has changed\n return;\n }\n\n //update pending queue if contains\n if (_.has(queue, phrase.id)) {\n var pendingRequest = queue[phrase.id];\n pendingRequest.phrase = phrase;\n pendingRequest.status = status;\n } else {\n status = resolveTranslationState(phrase, status);\n queue[phrase.id] = {\n 'phrase': phrase,\n 'status': status,\n 'locale': data.locale,\n 'docId': data.docId\n };\n }\n EventService.emitEvent(EventService.EVENT.SAVE_INITIATED, data);\n processSaveRequest(phrase.id);\n });\n\n function needToSavePhrase(phrase, status) {\n return PhraseUtil.hasTranslationChanged(phrase) ||\n phrase.status !== status;\n }\n\n // Process save translation request\n function processSaveRequest(id) {\n var context = _.cloneDeep(editorService.context);\n\n var request = queue[id];\n\n var Translation = $resource(UrlService.TRANSLATION_URL, {}, {\n update: {\n method: 'PUT',\n params: {\n localeId: request.locale\n }\n }\n });\n var data = {\n id: request.phrase.id,\n revision: request.phrase.revision || 0,\n content: request.phrase.newTranslations[0],\n contents: request.phrase.newTranslations,\n // Return status object to PascalCase Id for the server\n status: TransStatusService.getServerId(request.status.ID),\n plural: request.phrase.plural\n };\n\n Translation.update(data).$promise.then(\n function(response) {\n var oldStatus = request.phrase.status.ID;\n\n PhraseService.onTransUnitUpdated(context, data.id, request.locale,\n response.revision, response.status, request.phrase);\n\n DocumentService.updateStatistic(context.projectSlug,\n context.versionSlug, request.docId, request.locale,\n oldStatus, TransStatusService.getId(response.status),\n request.phrase.wordCount);\n\n EventService.emitEvent(EventService.EVENT.SAVE_COMPLETED,\n request.phrase);\n },\n function(response) {\n MessageHandler.displayWarning('Update translation failed for ' +\n data.id + ' -' + response);\n PhraseService.onTransUnitUpdateFailed(data.id);\n EventService.emitEvent(EventService.EVENT.SAVE_COMPLETED,\n request.phrase);\n });\n delete queue[id];\n }\n\n function resolveTranslationState(phrase, requestStatus) {\n if (_.isEmpty(_.compact(phrase.newTranslations))) {\n return TransStatusService.getStatusInfo('UNTRANSLATED');\n }\n return requestStatus;\n }\n\n return editorService;\n }\n\n angular\n .module('app')\n .factory('EditorService', EditorService);\n\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * @name EditorShortcuts\n * @description service for editor keyboard shortcuts\n * @ngInject\n */\n function EditorShortcuts(EventService, $stateParams, _, hotkeys, PhraseUtil,\n TransStatusService, Mousetrap, str, $window) {\n var editorShortcuts = this,\n inSaveAsMode = false;\n\n // this will be set by TransUnitService\n // on EVENT.SELECT_TRANS_UNIT and unset on EVENT.CANCEL_EDIT\n editorShortcuts.selectedTUCtrl = null;\n\n function copySourceCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n {'phrase': editorShortcuts.selectedTUCtrl.getPhrase()});\n }\n }\n\n function gotoNextRowCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n event.stopPropagation();\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_ROW,\n currentContext());\n }\n }\n\n function gotoPreviousRowCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n event.stopPropagation();\n EventService.emitEvent(EventService.EVENT.GOTO_PREVIOUS_ROW,\n currentContext());\n }\n }\n\n function cancelEditCallback(event) {\n event.preventDefault();\n event.stopPropagation();\n if (inSaveAsMode) {\n editorShortcuts.cancelSaveAsModeIfOn();\n if (editorShortcuts.selectedTUCtrl) {\n editorShortcuts.selectedTUCtrl.focusTranslation();\n }\n } else if (editorShortcuts.selectedTUCtrl) {\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n if (PhraseUtil.hasTranslationChanged(phrase)) {\n // if it has changed translation, undo edit\n EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n phrase);\n } else {\n // otherwise cancel edit\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n phrase);\n }\n }\n }\n\n function saveAsCurrentButtonOptionCallback(event) {\n if (editorShortcuts.selectedTUCtrl) {\n event.preventDefault();\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': PhraseUtil.getSaveButtonStatus(phrase),\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n }\n }\n\n /**\n * This is to mimic sequence shortcut.\n * e.g. press ctlr-shift-s then press 'n' to save as\n * 'needs work'.\n */\n function saveAsModeCallback(event) {\n event.preventDefault();\n editorShortcuts.cancelSaveAsModeIfOn();\n var phrase = editorShortcuts.selectedTUCtrl.getPhrase();\n if (phrase) {\n EventService.emitEvent(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n {\n 'id': phrase.id,\n 'open': true\n });\n\n addSaveAsModeExtensionKey(phrase, 'n', 'needsWork');\n addSaveAsModeExtensionKey(phrase, 't', 'translated');\n addSaveAsModeExtensionKey(phrase, 'a', 'approved');\n }\n }\n\n /**\n * Generate a callback that will copy one of the suggestions to the editor.\n *\n * @param {number} oneBasedIndex the 1-based index of the suggestion that\n * this callback will copy\n * @return {function} callback that will copy the nth suggestion.\n */\n function copySuggestionCallback(oneBasedIndex) {\n return (function (event) {\n event.preventDefault();\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SUGGESTION_N,\n oneBasedIndex-1);\n });\n }\n\n /**\n * mod will be replaced by ctrl if on windows/linux or cmd if on mac.\n * By default it listens on keydown event.\n */\n editorShortcuts.SHORTCUTS = {\n COPY_SOURCE: new ShortcutInfo(\n 'alt+c', copySourceCallback, 'Copy source as translation', 'alt+g'),\n\n COPY_SUGGESTION_1: new ShortcutInfo(\n 'mod+alt+1', copySuggestionCallback(1),\n 'Copy first suggestion as translation'),\n\n COPY_SUGGESTION_2: new ShortcutInfo(\n 'mod+alt+2', copySuggestionCallback(2),\n 'Copy second suggestion as translation'),\n\n COPY_SUGGESTION_3: new ShortcutInfo(\n 'mod+alt+3', copySuggestionCallback(3),\n 'Copy third suggestion as translation'),\n\n COPY_SUGGESTION_4: new ShortcutInfo(\n 'mod+alt+4', copySuggestionCallback(4),\n 'Copy fourth suggestion as translation'),\n\n CANCEL_EDIT: new ShortcutInfo('esc', cancelEditCallback, 'Cancel edit'),\n\n SAVE_AS_CURRENT_BUTTON_OPTION: new ShortcutInfo(\n 'mod+s', saveAsCurrentButtonOptionCallback, 'Save'),\n\n SAVE_AS_MODE: new ShortcutInfo(\n 'mod+shift+s', saveAsModeCallback, 'Save as…'),\n\n // this is just so we can show it in cheatsheet.\n // see app/editor/EditorCtrl.shortcuts\n SAVE_AS_NEEDSWORK: {\n keyCombos: [{combo: 'mod+shift+s n', description: 'Save as needs work'}]\n },\n\n SAVE_AS_TRANSLATED: {\n keyCombos: [{combo: 'mod+shift+s t', description: 'Save as translated'}]\n },\n\n SAVE_AS_APPROVED: {\n keyCombos: [{combo: 'mod+shift+s a', description: 'Save as approved'}]\n },\n\n GOTO_NEXT_ROW_FAST: new ShortcutInfo(\n 'mod+enter', gotoNextRowCallback,\n 'Save (if changed) and go to next string',\n ['alt+k', 'alt+down']),\n\n GOTO_PREVIOUS_ROW: new ShortcutInfo(\n 'mod+shift+enter', gotoPreviousRowCallback,\n 'Save (if changed) and go to previous string',\n ['alt+j', 'alt+up'])\n /*\n Disable for now until status navigation implementation\n GOTO_NEXT_UNTRANSLATED: new ShortcutInfo(\n 'tab+u', gotoToNextUntranslatedCallback)\n */\n };\n\n /*\n Disable for now until status navigation implementation\n\n function gotoToNextUntranslatedCallback(event) {\n event.preventDefault();\n event.stopPropagation();\n if (editorShortcuts.selectedTUCtrl) {\n EventService.emitEvent(EventService.EVENT.GOTO_NEXT_UNTRANSLATED,\n currentContext());\n }\n // the shortcut is a tab + u combination\n // we don't want other tab event to trigger\n tabCombinationPressed = true;\n }\n */\n\n /**\n *\n * @param {string} defaultKey default key combo for a shortcut\n * @param {function} callback callback to execute\n * @param {string} [description]\n * optional. If not empty will apply to default key (shows in cheatsheet)\n * @param {(string|string[])} [otherKeys]\n * optional other keys that will do the same (won't show in cheatsheet)\n * @param {string} [action] optional event to listen to. e.g. 'keyup'\n * @returns {EditorShortcuts.ShortcutInfo}\n * @constructor\n */\n function ShortcutInfo(defaultKey, callback, description, otherKeys, action)\n {\n this.defaultKey = defaultKey;\n this.keyCombos = [\n singleKeyConfig(defaultKey, description, action, callback)\n ];\n if (otherKeys) {\n this.otherKeys = otherKeys instanceof Array ? otherKeys : [otherKeys];\n this.keyCombos.push(\n singleKeyConfig(this.otherKeys, '', action, callback));\n }\n return this;\n }\n\n function singleKeyConfig(combo, description, action, callback) {\n var keyConfig = {\n allowIn: ['TEXTAREA'],\n callback: callback\n };\n keyConfig.combo = combo;\n if (description) {\n keyConfig.description = description;\n }\n if (action) {\n keyConfig.action = action;\n }\n return keyConfig;\n }\n\n editorShortcuts.enableEditorKeys = function () {\n // here we only check copy source shortcut since we always enable keys in\n // bundle.\n if (!hotkeys.get(editorShortcuts.SHORTCUTS.COPY_SOURCE.defaultKey)) {\n _.forOwn(editorShortcuts.SHORTCUTS, function(value) {\n if (value instanceof ShortcutInfo) { // a hack to handle sequence keys\n enableShortcut(value);\n }\n });\n }\n };\n\n editorShortcuts.disableEditorKeys = function () {\n _.forOwn(editorShortcuts.SHORTCUTS, function(value) {\n _.forEach(value.keyCombos, function(hotkey) {\n editorShortcuts.deleteKeys(hotkey.combo, hotkey.action);\n });\n });\n };\n\n function enableShortcut(shortcutInfo) {\n if (!hotkeys.get(shortcutInfo.defaultKey)) {\n _.forEach(shortcutInfo.keyCombos,\n function(combo) {\n hotkeys.add(combo);\n });\n }\n }\n\n function currentContext() {\n return {\n 'currentId': editorShortcuts.selectedTUCtrl.getPhrase().id\n };\n }\n\n function addSaveAsModeExtensionKey(phrase, combo, status) {\n var statusInfo = TransStatusService.getStatusInfo(status);\n return hotkeys.add({\n combo: combo,\n description: str.sprintf('Save as %s', status),\n allowIn: ['INPUT', 'TEXTAREA'],\n action: 'keydown',\n callback: function (event) {\n editorShortcuts.saveTranslationCallBack(event, phrase, statusInfo);\n }\n });\n }\n\n editorShortcuts.saveTranslationCallBack = function(event, phrase,\n statusInfo) {\n inSaveAsMode = true;\n\n event.preventDefault();\n event.stopPropagation();\n\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase': phrase,\n 'status': statusInfo,\n 'locale': $stateParams.localeId,\n 'docId': $stateParams.docId\n });\n editorShortcuts.cancelSaveAsModeIfOn();\n };\n\n editorShortcuts.cancelSaveAsModeIfOn = function() {\n if (inSaveAsMode && editorShortcuts.selectedTUCtrl) {\n inSaveAsMode = false;\n editorShortcuts.deleteKeys(['n', 't', 'a']);\n EventService.emitEvent(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n {\n 'id': editorShortcuts.selectedTUCtrl.getPhrase().id,\n 'open': false\n });\n }\n };\n\n /**\n * This is a workaround for augular-hotkeys not being able to delete hotkey.\n * @see https://github.com/chieffancypants/angular-hotkeys/issues/100\n *\n * @param {(string|string[])} keys single key or array of keys to be deleted\n * @param {string} [action='keydown'] 'keyup' or 'keydown' etc.\n */\n editorShortcuts.deleteKeys = function(keys, action) {\n var keysToDelete = keys instanceof Array ? keys : [keys];\n action = action || 'keydown';\n _.forEach(keysToDelete, function(key) {\n hotkeys.del(key);\n Mousetrap.unbind(key, action);\n });\n };\n\n /**\n * Copied from angular-hotkeys.\n * Convert strings like cmd into symbols like ⌘\n * @param {String} combo Key combination, e.g. 'mod+f'\n * @return {String} The key combination with symbols\n */\n editorShortcuts.symbolizeKey = function (combo) {\n var map = {\n command: '⌘',\n shift: '⇧',\n left: '←',\n right: '→',\n up: '↑',\n down: '↓',\n 'return': '↩',\n backspace: '⌫'\n };\n combo = combo.split('+');\n\n for (var i = 0; i < combo.length; i++) {\n // try to resolve command / ctrl based on OS:\n if (combo[i] === 'mod') {\n if ($window.navigator &&\n $window.navigator.platform.indexOf('Mac') >= 0) {\n combo[i] = 'command';\n } else {\n combo[i] = 'ctrl';\n }\n }\n\n combo[i] = map[combo[i]] || combo[i];\n }\n\n return combo.join(' + ');\n };\n\n return editorShortcuts;\n }\n\n angular\n .module('app')\n .factory('EditorShortcuts', EditorShortcuts);\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * EditorSuggestionsCtrl.js\n * @ngInject\n */\n function EditorSuggestionsCtrl($scope, _, SettingsService, SuggestionsService,\n EventService, $rootScope, $timeout, focus) {\n var SHOW_SUGGESTIONS_SETTING = SettingsService.SETTING.SHOW_SUGGESTIONS;\n var SUGGESTIONS_SHOW_DIFFERENCE_SETTING =\n SettingsService.SETTING.SUGGESTIONS_SHOW_DIFFERENCE;\n\n var editorSuggestionsCtrl = this;\n\n editorSuggestionsCtrl.suggestions = [];\n editorSuggestionsCtrl.searchPhrase = null;\n editorSuggestionsCtrl.searchResultsTotal = 0;\n editorSuggestionsCtrl.searchText = '';\n editorSuggestionsCtrl.searchDisplayRequired = false;\n editorSuggestionsCtrl.searchIsText = false;\n editorSuggestionsCtrl.unitSelected = false;\n\n $scope.searchIsVisible = false;\n $scope.searchIsLoading = false;\n\n $scope.show = SettingsService.subscribe(SHOW_SUGGESTIONS_SETTING,\n function (show) {\n $scope.show = show;\n });\n\n $scope.diff = SettingsService.subscribe(SUGGESTIONS_SHOW_DIFFERENCE_SETTING,\n function (diff) {\n $scope.diff = diff;\n });\n\n $scope.focusSearch = function($event) {\n if ($event) {\n $event.preventDefault();\n }\n focus('searchSugInput');\n };\n\n editorSuggestionsCtrl.closeSuggestions = function () {\n SettingsService.update(SHOW_SUGGESTIONS_SETTING, false);\n EventService.emitEvent(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n false);\n };\n\n editorSuggestionsCtrl.clearSearchResults =\n function($event, dontFocusInput) {\n editorSuggestionsCtrl.searchText = '';\n editorSuggestionsCtrl.suggestions = [];\n if (!dontFocusInput && $event) {\n $scope.focusSearch($event);\n }\n };\n\n editorSuggestionsCtrl.searchForText = function (newText) {\n editorSuggestionsCtrl.searchIsText = true;\n $timeout.cancel(editorSuggestionsCtrl.searchInProgress);\n editorSuggestionsCtrl.searchInProgress = $timeout(function() {\n EventService.emitEvent(EventService.EVENT.REQUEST_TEXT_SUGGESTIONS,\n newText);\n }, 300);\n };\n\n editorSuggestionsCtrl.toggleSearch = function() {\n if ($scope.searchIsVisible) {\n EventService.emitEvent(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n false);\n }\n else {\n EventService.emitEvent(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n true);\n }\n };\n\n // Init\n if (!editorSuggestionsCtrl.unitSelected && $scope.show) {\n editorSuggestionsCtrl.searchDisplayRequired = true;\n showSearch();\n }\n\n function displaySuggestions(suggestions) {\n var filteredSuggestions = [];\n filteredSuggestions = _.chain(suggestions)\n .sortBy(['similarityPercent', 'relevanceScore'])\n .reverse()\n .value();\n\n if (!editorSuggestionsCtrl.searchIsText) {\n cacheSuggestions(filteredSuggestions);\n }\n\n if ($scope.searchIsVisible) {\n setPhraseSuggestions(editorSuggestionsCtrl.searchPhrase,\n filteredSuggestions);\n editorSuggestionsCtrl.searchResultsTotal =\n editorSuggestionsCtrl.suggestions.length;\n }\n else {\n setPhraseSuggestions(editorSuggestionsCtrl.currentSearchPhrase,\n filteredSuggestions);\n editorSuggestionsCtrl.searchResultsTotal = 0;\n }\n\n $scope.searchIsLoading = false;\n\n }\n\n function cacheSearchPhrase(searchPhrase) {\n editorSuggestionsCtrl.currentSearchPhrase = searchPhrase;\n }\n\n function cacheSuggestions(suggestions) {\n editorSuggestionsCtrl.currentPhraseSuggestions = suggestions;\n }\n\n function setPhraseSuggestions(searchPhrase, suggestions) {\n editorSuggestionsCtrl.searchPhrase = searchPhrase;\n editorSuggestionsCtrl.suggestions = suggestions;\n }\n\n function restorePhraseSuggestions() {\n $timeout(function() {\n editorSuggestionsCtrl.searchPhrase =\n editorSuggestionsCtrl.currentSearchPhrase;\n editorSuggestionsCtrl.suggestions =\n editorSuggestionsCtrl.currentPhraseSuggestions;\n });\n }\n\n function hideSearch() {\n $scope.searchIsVisible = false;\n editorSuggestionsCtrl.clearSearchResults(null, true);\n if (editorSuggestionsCtrl.unitSelected) {\n editorSuggestionsCtrl.searchIsText = false;\n restorePhraseSuggestions();\n }\n }\n\n function showSearch($event, dontFocusInput) {\n $scope.searchIsVisible = true;\n if (!dontFocusInput && $event) {\n $scope.focusSearch($event);\n }\n editorSuggestionsCtrl.searchForText('');\n }\n\n function handleError (error) {\n console.error('It\\'s over! ', error);\n }\n\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n editorSuggestionsCtrl.unitSelected = data.id;\n if (editorSuggestionsCtrl.searchText === '' && $scope.searchIsVisible) {\n EventService.emitEvent(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n false);\n }\n editorSuggestionsCtrl.searchDisplayRequired = false;\n });\n\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function () {\n if ($scope.show) {\n showSearch(null, true);\n editorSuggestionsCtrl.searchDisplayRequired = true;\n }\n });\n\n $rootScope.$on(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n function(event, activate) {\n if (activate) {\n showSearch(event);\n }\n else {\n hideSearch(event);\n }\n });\n\n // Automatic suggestions search on row select\n $rootScope.$on(EventService.EVENT.REQUEST_PHRASE_SUGGESTIONS,\n function (event, data) {\n editorSuggestionsCtrl.searchIsText = false;\n SuggestionsService.getSuggestionsForPhrase(data.phrase)\n .then(displaySuggestions, handleError);\n cacheSearchPhrase(data.phrase);\n });\n\n // Manual suggestions search\n $rootScope.$on(EventService.EVENT.REQUEST_TEXT_SUGGESTIONS,\n function (event, data) {\n if (data === '') {\n displaySuggestions('');\n // editorSuggestionsCtrl.suggestions = [];\n return false;\n }\n $scope.searchIsLoading = true;\n SuggestionsService.getSuggestionsForText(data)\n .then(displaySuggestions, handleError);\n editorSuggestionsCtrl.searchPhrase = data;\n });\n\n return editorSuggestionsCtrl;\n }\n\n angular\n .module('app')\n .controller('EditorSuggestionsCtrl', EditorSuggestionsCtrl);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name blur-on\n * @description When you put attribute 'blur-on=\"something\"',\n * you can then blur this element. It works the same way as focus-on library.\n */\n function blurOn() {\n return {\n restrict: 'A',\n link: function(scope, elem, attr) {\n return scope.$on('blurOn', function (e, name) {\n if (name === attr.blurOn) {\n return elem[0].blur();\n }\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('blurOn', blurOn);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name clickElsewhere\n * @description Initiate expression when clicking somewhere else\n * @ngInject\n */\n function clickElsewhere($document) {\n return {\n restrict: 'A',\n scope: {\n callback: '&clickElsewhere'\n },\n link: function(scope, element) {\n var handler = function(e) {\n if (!element[0].contains(e.target)) {\n scope.$apply(scope.callback(e));\n }\n };\n\n $document.on('click', handler);\n\n scope.$on('$destroy', function() {\n $document.off('click', handler);\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('clickElsewhere', clickElsewhere);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle server communication on document related\n * information in project-version.\n *\n * DocumentService.js\n * @ngInject\n */\n function DocumentService($q, $resource, UrlService, StringUtil,\n StatisticUtil, EventService, _, TransStatusService) {\n var documentService = this,\n statisticMap = {};\n\n /**\n * Finds all documents in given project version\n *\n * @param _projectSlug\n * @param _versionSlug\n * @returns {$promise|*|N.$promise}\n */\n documentService.findAll = function findAll(_projectSlug, _versionSlug) {\n var Documents = $resource(UrlService.DOCUMENT_LIST_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: _projectSlug,\n versionSlug: _versionSlug\n },\n isArray: true\n }\n });\n return Documents.query().$promise;\n };\n\n /**\n * Get statistic of document in locale (word and message)\n *\n * @param _projectSlug\n * @param _versionSlug\n * @param _docId\n * @param _localeId\n * @returns {*}\n */\n documentService.getStatistics = function (_projectSlug, _versionSlug,\n _docId, _localeId) {\n if (_docId && _localeId) {\n var key = generateStatisticKey(_docId, _localeId);\n if (_.has(statisticMap, key)) {\n return $q.when(statisticMap[key]);\n } else {\n var encodedDocId = documentService.encodeDocId(_docId);\n var Statistics = $resource(UrlService.DOC_STATISTIC_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: _projectSlug,\n versionSlug: _versionSlug,\n docId: encodedDocId,\n localeId: _localeId\n },\n isArray: true\n }\n });\n return Statistics.query().$promise.then(function(statistics) {\n\n // Make needReview(server) available to needswork\n _.forEach(statistics, function(statistic) {\n statistic[TransStatusService.getId('needswork')] =\n statistic.needReview || 0;\n });\n\n statisticMap[key] = statistics;\n return statisticMap[key];\n });\n }\n }\n };\n\n /**\n * Encode docId, replace '/' with ',' when REST call\n * @param docId\n * @returns {*}\n */\n documentService.encodeDocId = function(docId) {\n return docId ? docId.replace(/\\//g, ',') : docId;\n };\n\n /**\n * Encode docId, replace ',' with '/' when REST call\n * @param docId\n * @returns {*}\n */\n documentService.decodeDocId = function(docId) {\n return docId ? docId.replace(/\\,/g, '/') : docId;\n };\n\n documentService.containsDoc = function (documents, docId) {\n return _.any(documents, function(document) {\n return StringUtil.equals(document.name, docId, true);\n });\n };\n\n documentService.updateStatistic = function(projectSlug, versionSlug, docId,\n localeId, oldState,\n newState, wordCount) {\n var key = generateStatisticKey(docId, localeId);\n if(_.has(statisticMap, key)) {\n adjustStatistic(statisticMap[key], oldState, newState,\n wordCount);\n\n EventService.emitEvent(EventService.EVENT.REFRESH_STATISTIC,\n {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: docId,\n localeId: localeId\n }\n );\n }\n };\n\n //Generate unique key from docId and localeId for statistic cache\n function generateStatisticKey(docId, localeId) {\n return docId + '-' + localeId;\n }\n\n /**\n * Adjust statistic based on translation change of state\n * word - -wordCount of oldState, +wordCount of newState\n * msg - -1 of oldState, +1 of newState\n */\n function adjustStatistic(statistics, oldState, newState, wordCount) {\n\n var wordStatistic = StatisticUtil.getWordStatistic(statistics),\n msgStatistic = StatisticUtil.getMsgStatistic(statistics);\n\n if(wordStatistic) {\n wordCount = parseInt(wordCount);\n var wordOldState = parseInt(wordStatistic[oldState]) - wordCount;\n wordStatistic[oldState] = wordOldState < 0 ? 0 : wordOldState;\n wordStatistic[newState] = parseInt(wordStatistic[newState]) + wordCount;\n }\n\n if(msgStatistic) {\n var msgOldState = parseInt(msgStatistic[oldState]) - 1;\n msgStatistic[oldState] = msgOldState < 0 ? 0 : msgOldState;\n msgStatistic[newState] = parseInt(msgStatistic[newState]) + 1;\n }\n }\n\n return documentService;\n }\n\n angular\n .module('app')\n .factory('DocumentService', DocumentService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name DropdownCtrl\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n function DropdownCtrl($scope, $attrs, $parse, dropdownConfig,\n DropdownService, $animate, $timeout) {\n var dropdownCtrl = this,\n // create a child scope so we are not polluting original one\n scope = $scope.$new(),\n openClass = dropdownConfig.openClass,\n getIsOpen,\n setIsOpen = angular.noop,\n toggleInvoker = $attrs.onToggle ?\n $parse($attrs.onToggle) : angular.noop;\n\n this.init = function(element) {\n dropdownCtrl.$element = element;\n\n if ($attrs.isOpen) {\n getIsOpen = $parse($attrs.isOpen);\n setIsOpen = getIsOpen.assign;\n\n $scope.$watch(getIsOpen, function(value) {\n scope.isOpen = !!value;\n });\n }\n };\n\n this.toggle = function(open) {\n scope.isOpen = arguments.length ? !!open : !scope.isOpen;\n return scope.isOpen;\n };\n\n // Allow other directives to watch status\n this.isOpen = function() {\n return scope.isOpen;\n };\n\n scope.getToggleElement = function() {\n return dropdownCtrl.toggleElement;\n };\n\n scope.focusToggleElement = function() {\n if (dropdownCtrl.toggleElement) {\n dropdownCtrl.toggleElement[0].focus();\n }\n };\n\n scope.$watch('isOpen', function(isOpen, wasOpen) {\n $animate[isOpen ? 'addClass' : 'removeClass']\n (dropdownCtrl.$element, openClass);\n\n if (isOpen) {\n // need to wrap it in a timeout\n // see http://stackoverflow.com/questions/12729122/\n // prevent-error-digest-already-in-progress-when-calling-scope-apply\n $timeout(function() {\n scope.focusToggleElement();\n });\n DropdownService.open(scope);\n } else {\n DropdownService.close(scope);\n }\n\n setIsOpen($scope, isOpen);\n if (angular.isDefined(isOpen) && isOpen !== wasOpen) {\n toggleInvoker($scope, {\n open: !!isOpen\n });\n }\n });\n\n $scope.$on('$locationChangeSuccess', function() {\n scope.isOpen = false;\n });\n\n $scope.$on('$destroy', function() {\n scope.$destroy();\n });\n\n $scope.$on('openDropdown', function() {\n scope.isOpen = true;\n });\n\n $scope.$on('closeDropdown', function() {\n scope.isOpen = false;\n });\n }\n\n angular\n .module('app')\n .controller('DropdownCtrl', DropdownCtrl);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name dropdownService\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n\n function DropdownService($document) {\n var openScope = null,\n dropdownService = this;\n\n dropdownService.open = function(dropdownScope) {\n if (!openScope) {\n $document.bind('click', closeDropdown);\n $document.bind('keydown', escapeKeyBind);\n }\n\n if (openScope && openScope !== dropdownScope) {\n openScope.isOpen = false;\n }\n\n openScope = dropdownScope;\n };\n\n dropdownService.close = function(dropdownScope) {\n if (openScope === dropdownScope) {\n openScope = null;\n $document.unbind('click', closeDropdown);\n $document.unbind('keydown', escapeKeyBind);\n }\n };\n\n var closeDropdown = function(evt) {\n if (!openScope) {\n return;\n }\n var toggleElement = openScope.getToggleElement();\n if (evt && toggleElement && toggleElement[0].contains(evt.target)) {\n return;\n }\n\n openScope.$apply(function() {\n openScope.isOpen = false;\n });\n };\n\n var escapeKeyBind = function(evt) {\n if (evt.which === 27) {\n openScope.focusToggleElement();\n closeDropdown();\n }\n };\n }\n\n angular\n .module('app')\n .service('DropdownService', DropdownService);\n\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @name Dropdown\n *\n * @description\n * Custom module for dropdowns\n *\n */\n var dropdownConfig = {\n openClass: 'is-active'\n };\n\n angular\n .module('app')\n .constant('dropdownConfig', dropdownConfig);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name dropdown\n *\n * @description\n * Main dropdown container\n *\n */\n\n function dropdown() {\n return {\n restrict: 'EA',\n controller: 'DropdownCtrl',\n link: function(scope, element, attrs, dropdownCtrl) {\n dropdownCtrl.init(element);\n }\n };\n }\n\n function onCloseDropdown() {\n return {\n restrict: 'A',\n require: '?^dropdown',\n scope: {\n callback: '&onCloseDropdown'\n },\n link: function(scope, elem, attrs, dropdownCtrl) {\n dropdownCtrl.onCloseDropdown = scope.callback;\n }\n };\n }\n\n /**\n * @name dropdown-toggle\n *\n * @description\n * Main dropdown toggle\n *\n */\n\n function dropdownToggle() {\n return {\n restrict: 'EA',\n require: '?^dropdown',\n link: function(scope, element, attrs, dropdownCtrl) {\n if (!dropdownCtrl) {\n return;\n }\n\n dropdownCtrl.toggleElement = element;\n\n var toggleDropdown = function(event) {\n event.preventDefault();\n event.stopPropagation();\n\n if (!element.hasClass('disabled') && !attrs.disabled) {\n scope.$apply(function() {\n dropdownCtrl.toggle();\n });\n }\n };\n\n element.bind('click', toggleDropdown);\n\n // WAI-ARIA\n element.attr({\n 'aria-haspopup': true,\n 'aria-expanded': false\n });\n scope.$watch(dropdownCtrl.isOpen, function(isOpen) {\n element.attr('aria-expanded', !!isOpen);\n if (dropdownCtrl.onCloseDropdown && !isOpen) {\n scope.$applyAsync(dropdownCtrl.onCloseDropdown);\n }\n });\n\n scope.$on('$destroy', function() {\n element.unbind('click', toggleDropdown);\n });\n }\n };\n }\n\n angular\n .module('app')\n .directive('dropdown', dropdown)\n .directive('onCloseDropdown', onCloseDropdown)\n .directive('dropdownToggle', dropdownToggle);\n\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * EventService.js\n * Broadcast events service in app.\n * Usage: EventService.emitEvent( event, data, scope)\n * See EventService.emitEvent\n *\n * @ngInject\n */\n function EventService($rootScope) {\n var eventService = this;\n\n /**\n * @enum {string}\n */\n eventService.EVENT = {\n /**\n * Loading Events\n *\n * Broadcast from AppConfig\n */\n LOADING_START: 'loadingStart',\n LOADING_STOP: 'loadingStop',\n\n /**\n * scroll to trans unit\n * data: {id: number, updateURL: boolean, focus: boolean}\n * id: (transunit id),\n * updateURL: (flag on whether to update url with trans unit id)\n * focus: flag on whether to have row in view and focused\n */\n SELECT_TRANS_UNIT: 'selectTransUnit',\n\n //data: {phrase: Phrase, sourceIndex:sourceIndex}\n COPY_FROM_SOURCE: 'copyFromSource',\n\n // data: { suggestion: Suggestion }\n COPY_FROM_SUGGESTION: 'copyFromSuggestion',\n\n /**\n * Emit this to trigger copying of the nth suggestion to the selected row.\n *\n * data: number (zero-based index of suggestion to copy)\n */\n COPY_FROM_SUGGESTION_N: 'copyFromSuggestionN',\n\n //data: {phrase: Phrase}\n UNDO_EDIT: 'undoEdit',\n\n //data: {phrase: Phrase}\n CANCEL_EDIT: 'cancelEdit',\n\n //data:phrase\n FOCUS_TRANSLATION: 'focusTranslation',\n\n /**\n * data: {\n * phrase: Phrase, status: StatusInfo, locale: string, docId: string\n * }\n * phrase:\n * status: Object. Request save state\n * locale: target locale\n * docId: docId\n */\n SAVE_TRANSLATION: 'saveTranslation',\n\n /**\n * Translation save in this editor is being sent to the server and\n * is waiting on a response.\n */\n SAVE_INITIATED: 'saveInitiated',\n\n /**\n * Translation save in this editor has been completed\n * (Server has responded with a success or error).\n */\n SAVE_COMPLETED: 'saveCompleted',\n\n /**\n * The text in the translation editor textbox has been edited and\n * not yet saved.\n */\n TRANSLATION_TEXT_MODIFIED: 'translationTextModified',\n\n /**\n * refresh ui statistic - changes in doc or locale\n *\n * data: {projectSlug: string, versionSlug: string,\n * docId: string, localeId: string}\n */\n REFRESH_STATISTIC: 'refreshStatistic',\n\n GOTO_PREV_PAGE: 'gotoPreviousPage',\n\n GOTO_NEXT_PAGE: 'gotoNextPage',\n\n GOTO_FIRST_PAGE: 'gotoFirstPage',\n\n GOTO_LAST_PAGE: 'gotoLastPage',\n\n /**\n * data: { currentId: number }\n */\n GOTO_NEXT_ROW: 'gotoNextRow',\n GOTO_PREVIOUS_ROW: 'gotoPreviousRow',\n GOTO_NEXT_UNTRANSLATED: 'gotoNextUntranslated',\n\n /**\n * Toggle save as options dropdown.\n * data: {id: number, open: boolean}\n */\n TOGGLE_SAVE_OPTIONS: 'openSaveOptions',\n\n\n /**\n * data: {filter: refer to editorCtrl.filter}\n */\n FILTER_TRANS_UNIT: 'filterTransUnit',\n\n /**\n * Reports the number of suggestions that are available for a phrase.\n *\n * data: { id: number, count: number }\n */\n PHRASE_SUGGESTION_COUNT: 'phraseSuggestionCount',\n\n /**\n * Fire to request suggestions from translation memory, etc.\n *\n * data: { phrase: Phrase }\n */\n REQUEST_PHRASE_SUGGESTIONS: 'requestPhraseSuggestions',\n\n /**\n * Fire for manual suggestions search using a single string.\n *\n * data: string\n */\n REQUEST_TEXT_SUGGESTIONS: 'requestTextSuggestions',\n\n /**\n * Fired every time search is toggled\n *\n * @type {Boolean}\n */\n SUGGESTIONS_SEARCH_TOGGLE: 'suggestionsSearchToggle',\n\n /**\n * Indicates a single user setting has changed.\n *\n * Event handlers should switch on the setting name to determine whether\n * it is a setting they are interested in.\n *\n * data: { setting: string, value: boolean|number|string }\n */\n USER_SETTING_CHANGED: 'userSettingChanged'\n };\n\n /**\n * Firing an event downwards of scope\n *\n * @param event - eventService.EVENT type\n * @param data - data for the event\n * @param scope - scope of event to to fire, $rootScope if empty\n */\n eventService.broadcastEvent = function(event, data, scope) {\n scope = scope || $rootScope;\n scope.$broadcast(event, data);\n };\n\n /**\n * Firing an event upwards of scope\n *\n * @param event - eventService.EVENT types\n * @param data - data for the event\n * @param scope - scope of event to to fire, $rootScope if empty\n */\n eventService.emitEvent = function(event, data, scope) {\n scope = scope || $rootScope;\n scope.$emit(event, data);\n };\n\n return eventService;\n }\n\n angular\n .module('app')\n .factory('EventService', EventService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name icon\n * @description declarative svg icons\n * @ngInject\n */\n function icon($sce) {\n return {\n restrict: 'E',\n required: ['name'],\n scope: {\n name: '@',\n title: '@',\n size: '@'\n },\n // templateUrl: 'components/icon/icon.html',\n link: function(scope, element) {\n var svg = '',\n titleHtml = '';\n\n element.addClass('Icon');\n\n if (scope.title) {\n titleHtml = '' + scope.title + '';\n }\n\n // Stupid hack to make svg work\n svg = '' +\n '' +\n '' +\n titleHtml +\n '';\n element.html($sce.trustAsHtml(svg));\n }\n };\n }\n\n angular\n .module('app')\n .directive('icon', icon);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle locales related information.\n *\n * LocaleService.js\n * @ngInject\n */\n function LocaleService(UrlService, StringUtil, FilterUtil, $resource, _) {\n\n var locales = [];\n\n /**\n * Get project-version supported locales\n * @param projectSlug\n * @param versionSlug\n * @returns {$promise|*}\n */\n function getSupportedLocales(projectSlug, versionSlug) {\n\n var Locales = $resource(UrlService.LOCALE_LIST_URL, {}, {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug,\n versionSlug: versionSlug\n },\n isArray: true\n }\n });\n\n return Locales.query().$promise;\n }\n\n //Returns all locales supported in Zanata instance\n function getAllLocales() {\n var Locales = $resource(UrlService.ALL_LOCALE_URL, {}, {\n query: {\n method: 'GET',\n isArray: true\n }\n });\n return Locales.query().$promise.then(function(results) {\n locales = FilterUtil.cleanResourceList(results);\n });\n }\n\n function getUILocaleList() {\n var list = $resource(UrlService.uiTranslationListURL, {}, {\n query: {\n method: 'GET'\n }\n });\n\n return list.query().$promise;\n }\n\n function getLocaleByLocaleId(locales, localeId) {\n if(locales) {\n return _.find(locales, function(locale) {\n return StringUtil.equals(locale.localeId, localeId, true);\n });\n }\n }\n\n function containsLocale (locales, localeId) {\n return _.any(locales, function(locale) {\n return StringUtil.equals(locale.localeId, localeId, true);\n });\n }\n\n function getName(localeId) {\n var locale = getLocaleByLocaleId(locales, localeId);\n if(locale) {\n return locale.name;\n }\n return localeId;\n }\n\n return {\n getSupportedLocales : getSupportedLocales,\n getUILocaleList : getUILocaleList,\n getLocaleByLocaleId : getLocaleByLocaleId,\n getAllLocales : getAllLocales,\n containsLocale : containsLocale,\n getName : getName,\n DEFAULT_LOCALE: {\n 'localeId' : 'en-US',\n 'name' : 'English'\n }\n };\n }\n\n angular\n .module('app')\n .factory('LocaleService', LocaleService);\n})();\n","(function() {\n\n 'use strict';\n\n /**\n * @name logoLoader\n *\n * @description\n * Logo that is activated on global loading state\n *\n * @ngInject\n */\n function logoLoader(EventService) {\n return {\n restrict: 'EA',\n scope: {\n loading: '=',\n inverted: '='\n },\n link: function(scope) {\n scope.classes = '';\n\n scope.$on(EventService.EVENT.LOADING_START, function() {\n scope.classes += ' is-loading';\n });\n\n scope.$on(EventService.EVENT.LOADING_STOP, function() {\n scope.classes = scope.classes.replace('is-loading', '');\n });\n\n scope.$watch('inverted', function(newInverted) {\n if (newInverted) {\n scope.classes += ' LogoLoader--inverted';\n } else {\n scope.classes = scope.classes.replace('LogoLoader--inverted', '');\n }\n });\n },\n templateUrl: 'components/logo-loader/logo-loader.html'\n };\n }\n\n angular\n .module('app')\n .directive('logoLoader', logoLoader);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * MessageHandler.js\n * @ngInject\n */\n function MessageHandler() {\n return {\n displayError: function(msg) {\n console.error(msg);\n },\n displayWarning: function(msg) {\n console.warn(msg);\n },\n displayInfo: function(msg) {\n console.info(msg);\n }\n };\n }\n\n angular\n .module('app')\n .factory('MessageHandler', MessageHandler);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle notification in editor\n *\n * NotificationService.js\n * @ngInject\n */\n function NotificationService() {\n\n }\n\n angular\n .module('app')\n .factory('NotificationService', NotificationService);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * PhraseCache.js\n * Stores textflow, states in local cache.\n * TODO: use angular-data for storage\n * @ngInject\n */\n function PhraseCache($q, $resource, FilterUtil, UrlService, DocumentService,\n _) {\n var phraseCache = this,\n states = {}, //ids and states of all tu in order\n transUnits = {};\n\n phraseCache.getStates =\n function (projectSlug, versionSlug, documentId, localeId) {\n var key = generateKey(projectSlug, versionSlug, documentId, localeId);\n if (_.has(states, key)) {\n return $q.when(states[key]);\n } else {\n var encodedDocId = DocumentService.encodeDocId(documentId);\n var methods = {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug,\n versionSlug: versionSlug,\n docId: encodedDocId,\n localeId: localeId\n },\n isArray: true\n }\n },\n States = $resource(UrlService.TRANSLATION_STATUS_URL, {}, methods);\n return States.query().$promise.then(function (state) {\n state = FilterUtil.cleanResourceList(state);\n states[key] = state;\n return states[key];\n });\n }\n };\n\n phraseCache.getTransUnits = function (ids, localeId) {\n var results = {},\n missingTUId = [],\n missingLocaleTUId = [];\n ids.forEach(function (id) {\n if (_.has(transUnits, id)) {\n if(transUnits[id][localeId]) {\n results[id] = transUnits[id];\n } else {\n missingLocaleTUId.push(id);\n }\n } else {\n missingTUId.push(id);\n }\n });\n if (_.isEmpty(missingTUId) && _.isEmpty(missingLocaleTUId)) {\n return $q.when(results);\n }\n else {\n var TextFlows, Translations;\n if(!_.isEmpty(missingTUId)) {\n TextFlows = $resource(UrlService.TEXT_FLOWS_URL, {}, {\n query: {\n method: 'GET',\n params: {\n localeId: localeId,\n ids: missingTUId.join(',')\n }\n }\n });\n }\n if(!_.isEmpty(missingLocaleTUId)) {\n Translations = $resource(UrlService.TRANSLATION_URL, {}, {\n query: {\n method: 'GET',\n params: {\n localeId: localeId,\n ids: missingLocaleTUId.join(',')\n }\n }\n });\n }\n\n //need to create chain of promises\n if(TextFlows && Translations) {\n return TextFlows.query().$promise.then(updateCacheWithNewTU).\n then(Translations.query().$promise.then(updateCacheWithExistingTU));\n } else if(TextFlows) {\n return TextFlows.query().$promise.then(updateCacheWithNewTU);\n } else if(Translations) {\n return Translations.query().$promise.then(updateCacheWithExistingTU);\n }\n }\n\n function updateCacheWithExistingTU(newTransUnits) {\n newTransUnits = FilterUtil.cleanResourceMap(newTransUnits);\n for (var key in newTransUnits) {\n //push to cache\n transUnits[key][localeId] = newTransUnits[key][localeId];\n results[key] = transUnits[key]; //merge with results\n }\n return results;\n }\n\n function updateCacheWithNewTU(newTransUnits) {\n newTransUnits = FilterUtil.cleanResourceMap(newTransUnits);\n for (var key in newTransUnits) {\n transUnits[key] = newTransUnits[key]; //push to cache\n results[key] = transUnits[key]; //merge with results\n }\n return results;\n }\n };\n\n /**\n * On translation updated from server\n * @param id\n * @param localeId\n * @param revision\n * @param state\n * @param content\n * @param contents\n */\n phraseCache.onTransUnitUpdated =\n function (context, id, localeId, revision, status, phrase) {\n\n var key = generateKey(context.projectSlug, context.versionSlug,\n context.docId, localeId);\n\n var stateEntry = _.find(states[key], function(stateEntry) {\n return stateEntry.id === id;\n });\n //Update states cache\n if(stateEntry) {\n stateEntry.state = status;\n }\n\n //Update transUnits cache\n var translation = transUnits[id][localeId];\n if (!translation) {\n translation = {};\n }\n translation.revision = parseInt(revision);\n translation.state = status;\n translation.contents = phrase.newTranslations.slice();\n };\n\n function generateKey(projectId, versionId, documentId, localeId) {\n return projectId + '-' + versionId + '-' +\n documentId + '-' + localeId;\n }\n\n return phraseCache;\n }\n\n angular\n .module('app')\n .factory('PhraseCache', PhraseCache);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * @typedef {Object} Phrase\n * @property {number} id text flow id\n * @property {string[]} sources source contents\n * @property {string[]} translations original translation\n * @property {string[]} newTranslations translations in the editor\n * @property {boolean} plural whether it's in plural form\n * @property {StatusInfo} status information about this phrase\n * @property {number} revision translation revision number\n * @property {number} wordCount source word count\n */\n /**\n * @name PhraseService\n * @description Provides a list of phrases for the current document(s)\n *\n * @ngInject\n */\n function PhraseService(FilterUtil, PhraseCache, TransStatusService, _,\n $stateParams) {\n var phraseService = {};\n\n phraseService.phrases = []; //current displayed phrases\n\n // FIXME use an object for all the ID arguments - in general we will only\n // need to modify such an object sporadically when switching document\n // or locale, and it is neater than passing them all\n // around separately.\n\n phraseService.getPhraseCount = function(context, filter) {\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, context.localeId).then(function(states) {\n var ids = getIds(states, filter.status);\n return ids.length;\n });\n };\n\n /**\n * Fetch each of the text flows appearing in the given states data.\n */\n phraseService.fetchAllPhrase = function (context, filter,\n offset, maxResult) {\n\n var localeId = context.localeId;\n\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, localeId).then(getTransUnits);\n\n function getTransUnits(states) {\n var ids = getIds(states, filter.status);\n if (!isNaN(offset)) {\n if(!isNaN(maxResult)) {\n ids = ids.slice(offset, offset + maxResult);\n } else {\n ids = ids.slice(offset);\n }\n }\n // Reading for chaining promises https://github.com/kriskowal/q\n // (particularly \"Sequences\").\n return PhraseCache.getTransUnits(ids, localeId).\n then(transformToPhrases).then(sortPhrases);\n }\n\n /**\n * Converts text flow data from the API into the form expected in the\n * editor.\n *\n * @returns {Phrase[]}\n */\n function transformToPhrases(transUnits) {\n return _.map(transUnits, function(transUnit, id) {\n var source = transUnit.source,\n trans = transUnit[localeId];\n return {\n id: parseInt(id),\n sources: source.plural ? source.contents : [source.content],\n // Original translation\n translations: extractTranslations(source, trans),\n // Translation from editor\n newTranslations: extractTranslations(source, trans),\n plural: source.plural,\n // Conform the status from the server, return an object\n status: trans ? TransStatusService.getStatusInfo(trans.state) :\n TransStatusService.getStatusInfo('untranslated'),\n revision: trans ? parseInt(trans.revision) : 0,\n wordCount: parseInt(source.wordCount)\n };\n });\n }\n\n function extractTranslations(source, trans) {\n if(source.plural) {\n return trans && trans.contents ? trans.contents.slice() : [];\n }\n return trans ? [trans.content] : [];\n }\n\n function sortPhrases(phrases) {\n return PhraseCache.getStates(context.projectSlug, context.versionSlug,\n context.docId, localeId).then(function(states) {\n phraseService.phrases = _.sortBy(phrases, function(phrase) {\n var index = _.findIndex(states, function(state) {\n return state.id === phrase.id;\n });\n return index >= 0 ? index : phrases.length;\n });\n return phraseService.phrases;\n });\n }\n };\n\n //update phrase,statuses and textFlows with given tu id\n phraseService.onTransUnitUpdated = function(context, id, localeId, revision,\n status, phrase) {\n\n PhraseCache.onTransUnitUpdated(context, id, localeId, revision, status,\n phrase);\n\n var cachedPhrase = findPhrase(id, phraseService.phrases);\n //update phrase if found\n if(cachedPhrase) {\n cachedPhrase.translations = phrase.newTranslations.slice();\n cachedPhrase.revision = revision;\n cachedPhrase.status = TransStatusService.getStatusInfo(status);\n }\n };\n\n //rollback content of phrase\n phraseService.onTransUnitUpdateFailed = function(id) {\n var phrase = findPhrase(id, phraseService.phrases);\n if(phrase) {\n phrase.newTranslations = phrase.translations.slice();\n }\n };\n\n // find next Id from phrases states\n phraseService.findNextId = function(currentId) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (states) {\n var currentIndex,\n nextIndex;\n currentIndex = _.findIndex(states, function (state) {\n return state.id === currentId;\n });\n nextIndex = currentIndex + 1 < states.length ?\n currentIndex + 1 : states.length - 1;\n return states[nextIndex].id;\n });\n };\n\n // find previous id from phrases states\n phraseService.findPreviousId = function(currentId) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (states) {\n var currentIndex,\n previousIndex;\n currentIndex = _.findIndex(states, function (state) {\n return state.id === currentId;\n });\n previousIndex = currentIndex - 1 >= 0 ? currentIndex - 1 : 0;\n return states[previousIndex].id;\n });\n };\n\n // find next phrase with requested status\n phraseService.findNextStatus = function(currentId, status) {\n return PhraseCache.getStates($stateParams.projectSlug,\n $stateParams.versionSlug, $stateParams.docId,\n $stateParams.localeId)\n .then(function (statusList) {\n var currentIndex,\n nextStatusInfo,\n requestStatus = TransStatusService.getStatusInfo(status);\n\n currentIndex = _.findIndex(statusList, function (state) {\n return state.id === currentId;\n });\n\n for (var i = currentIndex + 1; i < statusList.length; i++) {\n nextStatusInfo = TransStatusService.getStatusInfo(\n statusList[i].state);\n if (nextStatusInfo.ID === requestStatus.ID) {\n return statusList[i].id;\n }\n }\n return currentId;\n });\n };\n\n function findPhrase(id, phrases) {\n return _.find(phrases, function(phrase) {\n return phrase.id === id;\n });\n }\n\n function getIds(resources, states) {\n if(states) {\n resources = FilterUtil.filterResources(resources, ['status'], states);\n }\n return _.map(resources, function (item) {\n return item.id;\n });\n }\n\n // Does not appear to be used anywhere. Removing until phrase-caching code\n // is added.\n // phraseService.findById = function(phraseId) {\n // var deferred = $q.defer();\n // var phrase = phrases[phraseId];\n // deferred.resolve(phrase);\n // return deferred.promise;\n // };\n\n return phraseService;\n }\n\n angular\n .module('app')\n .factory('PhraseService', PhraseService);\n\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @name progressbar\n * @description progressbar container\n * @ngInject\n */\n function progressbar() {\n return {\n restrict: 'E',\n required: 'progressbarStatistic',\n scope: {\n statistic: '=progressbarStatistic',\n size: '@' //large, full, or empty\n },\n templateUrl: 'components/progressbar/progressbar.html',\n controller: function($scope) {\n /**\n * Need to set to true for complex object watch. Performance issue.\n * https://docs.angularjs.org/api/ng/type/$rootScope.Scope\n */\n $scope.$watch('statistic', function(statistic) {\n if (statistic) {\n $scope.style = getStyle(statistic);\n }\n }, true);\n }\n };\n }\n\n function getStyle(statistic) {\n var total = statistic.total,\n widthApproved = getWidthPercent(statistic.approved, total),\n widthTranslated = getWidthPercent(statistic.translated, total),\n marginLeftTranslated = widthApproved,\n widthNeedsWork = getWidthPercent(statistic.needswork, total),\n marginLeftNeedsWork = widthApproved + widthTranslated,\n widthUntranslated = getWidthPercent(statistic.untranslated, total),\n marginLeftUntranslated = widthApproved +\n widthTranslated + widthNeedsWork,\n style = {};\n\n style.approved = {\n 'width': widthApproved + '%',\n 'marginLeft': 0\n };\n style.translated = {\n 'width': widthTranslated + '%',\n 'marginLeft': marginLeftTranslated + '%'\n };\n style.needsWork = {\n 'width': widthNeedsWork + '%',\n 'marginLeft': marginLeftNeedsWork + '%'\n };\n style.untranslated = {\n 'width': widthUntranslated + '%',\n 'marginLeft': marginLeftUntranslated + '%'\n };\n return style;\n }\n\n function getWidthPercent(value, total) {\n var percent = 0;\n if (value) {\n percent = value / total * 100;\n }\n return percent;\n }\n\n angular\n .module('app')\n .directive('progressbar', progressbar);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Handle communication with server on Project related information.\n * ProjectService.js\n * @ngInject\n */\n\n function ProjectService(UrlService, $resource) {\n\n /**\n * Get project's information\n *\n * @param projectSlug\n * @returns {$promise|*|N.$promise}\n */\n function getProjectInfo(projectSlug) {\n var methods = {\n query: {\n method: 'GET',\n params: {\n projectSlug: projectSlug\n }\n }\n };\n\n var Locales = $resource(UrlService.PROJECT_URL, {}, methods);\n return Locales.query().$promise;\n }\n\n return {\n getProjectInfo: getProjectInfo\n };\n }\n angular\n .module('app')\n .factory('ProjectService', ProjectService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name display-character\n * @description display whitespace character with symbol(HTML),\n * *NOTE*, need to wrap around tag\n * @ngInject\n */\n function renderWhitespaceCharacters() {\n var WHITESPACES = {\n 'space' : {\n 'regex' : / /g,\n 'template' : ' '\n },\n 'newline' : {\n 'regex' : /\\n/g,\n 'template' : '\\n'\n },\n 'tab' : {\n 'regex' : /\\t/g,\n 'template' : '\\t'\n }\n };\n\n return {\n restrict: 'A',\n required: ['ngBind'],\n scope: {\n ngBind: '='\n },\n\n link: function compile(scope, element) {\n scope.$watch('ngBind', function (value) {\n value = replaceChar(value, WHITESPACES.space);\n value = replaceChar(value, WHITESPACES.newline);\n value = replaceChar(value, WHITESPACES.tab);\n element.html(value);\n });\n }\n };\n\n function replaceChar(value, whitespaceChar) {\n return value.replace(whitespaceChar.regex, whitespaceChar.template);\n }\n }\n\n angular\n .module('app')\n .directive('renderWhitespaceCharacters', renderWhitespaceCharacters);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Represents a draggable resizer.\n *\n * @param $window\n * @param $document\n * @param $timeout\n * @returns {Function}\n */\n function resizer(SettingsService, $window, $document, $timeout) {\n\n function link(scope, element, attrs) {\n\n /**\n * The height to use for the resizer when it is visible.\n *\n * @type {Number}\n */\n scope.height = parseInt(attrs.resizerHeight);\n\n /**\n * The current height of the resizer to display.\n *\n * @type {Number}\n */\n scope.actualHeight = scope.height;\n\n scope.position = normalisePercentage(SettingsService.get(\n SettingsService.SETTING.SUGGESTIONS_PANEL_HEIGHT), $window.innerHeight);\n scope.actualPosition = scope.position;\n\n scope.show =\n SettingsService.subscribe(SettingsService.SETTING.SHOW_SUGGESTIONS,\n function (show) {\n scope.show = show;\n setBottomPanelVisibility(show);\n });\n\n /**\n * Persist the current size as a setting.\n */\n function saveCurrentSize() {\n SettingsService.update(SettingsService.SETTING.SUGGESTIONS_PANEL_HEIGHT,\n scope.actualPosition);\n }\n\n function setBottomPanelVisibility(showing) {\n if (showing) {\n scope.actualPosition = scope.position;\n scope.actualHeight = scope.height;\n } else {\n // save resizer position so it can be restored\n // does not appear to set properly without an intermediate variable\n var currentPos = scope.actualPosition;\n scope.position = currentPos;\n scope.actualPosition = 0;\n scope.actualHeight = 0;\n }\n\n // Panel only renders properly if resizer is adjusted in a later frame\n setTimeout(adjustResizer);\n }\n\n setBottomPanelVisibility(scope.show);\n\n element.addClass('Resizer');\n\n // Initial Resize\n if (attrs.resizer === 'vertical') {\n element.addClass('Resizer--vertical');\n $timeout(function (){\n adjustVerticalPanel(scope.actualPosition);\n });\n }\n else {\n element.addClass('Resizer--horizontal');\n $timeout(function (){\n adjustHorizontalPanel(scope.actualPosition);\n });\n }\n\n element.on('mousedown', function(event) {\n event.preventDefault();\n $document.on('mousemove', mousemove);\n $document.on('mouseup', mouseup);\n });\n\n angular.element($window).bind('resize', function() {\n $timeout.cancel(scope.resizing);\n scope.resizing = $timeout(adjustResizer);\n });\n\n function mousemove(event) {\n if (attrs.resizer === 'vertical') {\n adjustVerticalPanel(event.pageX);\n } else {\n adjustHorizontalPanel($window.innerHeight - event.pageY);\n }\n }\n\n function adjustVerticalPanel(resizerPositionX) {\n var x = resizerPositionX,\n leftPanel = angular.element(document\n .querySelector(attrs.resizerLeft)),\n rightPanel = angular.element(document\n .querySelector(attrs.resizerRight)),\n maximumPanelSize =\n normalisePercentage(attrs.resizerMax, $window.innerHeight),\n minimumPanelSize = attrs.resizerMin ||\n parseInt(attrs.resizerWidth);\n\n scope.actualPosition = x;\n x = restrictMinOrMax(x, maximumPanelSize, minimumPanelSize);\n\n element.css({\n left: (x - (scope.actualHeight / 2)) + 'px'\n });\n\n leftPanel.css({\n width: x + 'px'\n });\n\n rightPanel.css({\n left: x + 'px'\n });\n }\n\n function adjustHorizontalPanel(resizerPositionY) {\n var y = resizerPositionY,\n topPanel = angular.element(document\n .querySelector(attrs.resizerTop)),\n bottomPanel = angular.element(document\n .querySelector(attrs.resizerBottom)),\n maximumPanelSize =\n normalisePercentage(attrs.resizerMax, $window.innerHeight),\n minimumPanelSize = attrs.resizerMin || scope.actualHeight;\n\n scope.actualPosition = y;\n y = restrictMinOrMax(y, maximumPanelSize, minimumPanelSize);\n\n element.css({\n bottom: (y - (scope.actualHeight / 2)) + 'px'\n });\n\n topPanel.css({\n bottom: y + 'px'\n });\n\n bottomPanel.css({\n height: y + 'px'\n });\n }\n\n function mouseup() {\n $document.unbind('mousemove', mousemove);\n $document.unbind('mouseup', mouseup);\n\n // Now that a new value has stopped rapidly changing, persist it.\n saveCurrentSize();\n }\n\n function adjustResizer() {\n if (attrs.resizer === 'vertical') {\n adjustVerticalPanel(scope.actualPosition);\n }\n else {\n adjustHorizontalPanel(scope.actualPosition);\n }\n }\n\n function restrictMinOrMax(currentSize, maxSize, minSize) {\n // Maximum\n if (maxSize && currentSize > maxSize) {\n return maxSize;\n }\n // Minimum\n else if (currentSize < minSize) {\n return minSize;\n }\n else {\n return currentSize;\n }\n }\n\n function normalisePercentage(fraction, whole) {\n if ((/[0-9]*\\.?[0-9]+%/).test(fraction)) {\n return Math.round(whole * (parseInt(fraction.replace('%','')) / 100));\n }\n else {\n return parseInt(fraction);\n }\n }\n\n }\n\n return {\n link: link\n };\n }\n\n angular\n .module('app')\n .directive('resizer', resizer);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name ScrollbarWidthCtrl\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n function ScrollbarWidthCtrl() {\n var scrollbarWidthCtrl = this;\n\n scrollbarWidthCtrl.init = function() {\n var container = scrollbarWidthCtrl.container[0],\n child = scrollbarWidthCtrl.child[0],\n scrollbarWidth = child.offsetWidth - container.offsetWidth;\n\n scrollbarWidthCtrl.width = scrollbarWidth / 2;\n };\n\n }\n\n angular\n .module('app')\n .controller('ScrollbarWidthCtrl', ScrollbarWidthCtrl);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name scrollbarWidth\n *\n * @description\n * Scrollbar width container\n * Needed for the controller to reference all properties\n */\n function scrollbarWidth() {\n return {\n restrict: 'A',\n controller: 'ScrollbarWidthCtrl as scrollbarWidthCtrl',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n scrollbarWidthCtrl.init(element);\n }\n };\n }\n\n /**\n * @name scrollbarWidthElement\n *\n * @description\n * The element to add the scrollbar width to\n */\n function scrollbarWidthElement() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n // Use the attribute to decide which property to set\n element.css(attrs.scrollbarWidthElement, scrollbarWidthCtrl.width);\n }\n };\n }\n\n /**\n * @name scrollbarWidthContainer\n *\n * @description\n * Get the scrollbar container width\n */\n function scrollbarWidthContainer() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.container = element;\n }\n };\n }\n\n /**\n * @name scrollbarWidthChild\n *\n * @description\n * Get the scrollbar child width\n */\n function scrollbarWidthChild() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.child = element;\n }\n };\n }\n\n angular\n .module('app')\n .directive('scrollbarWidth', scrollbarWidth)\n .directive('scrollbarWidthElement', scrollbarWidthElement)\n .directive('scrollbarWidthContainer', scrollbarWidthContainer)\n .directive('scrollbarWidthChild', scrollbarWidthChild);\n\n})();\n","(function() {\n 'use strict';\n\n\n /**\n * The name of a setting, used as a unique key for lookup and storage.\n * @typedef {string} SettingKey\n */\n\n /**\n * The value for a setting.\n *\n * @typedef {(string|number|boolean)} SettingValue\n */\n\n /**\n * Service for persisted user settings.\n *\n * @constructor\n */\n function SettingsService(EventService, $q, $rootScope, _) {\n var settingsService = this;\n\n /**\n * All valid settings keys.\n *\n * These enum constants should be used for all settings operations.\n *\n * @type {Object<*, SettingKey>}\n */\n settingsService.SETTING = {\n SUGGESTIONS_AUTOFILL_ON_ROW_SELECT: 'suggestionsAutofillOnRowSelect',\n SUGGESTIONS_SHOW_DIFFERENCE: 'suggestionsShowDifference',\n SHOW_SUGGESTIONS: 'showSuggestions',\n SUGGESTIONS_PANEL_HEIGHT: 'suggestionsPanelHeight'\n };\n\n var SETTING = settingsService.SETTING;\n\n /**\n * Settings enum, with default values that indicate the type\n * @enum {SettingValue}\n */\n var defaultSettings = {};\n defaultSettings[SETTING.SUGGESTIONS_AUTOFILL_ON_ROW_SELECT] = true;\n defaultSettings[SETTING.SUGGESTIONS_SHOW_DIFFERENCE] = false;\n defaultSettings[SETTING.SHOW_SUGGESTIONS] = true;\n defaultSettings[SETTING.SUGGESTIONS_PANEL_HEIGHT] = '30%';\n\n /**\n * Local settings cache.\n *\n * @type {Object}\n */\n var settings = _.clone(defaultSettings);\n\n\n /*\n\n TODO save settings to the server, prefer sending as a batch if possible\n (i.e. when updateAll is used, and future option to ensure only one save\n request at a time and use _.extend to combine all the queued settings\n while waiting).\n\n */\n\n /**\n * Update a single setting to have the given value.\n *\n * This will trigger a user setting update event.\n *\n * @param {SettingKey} setting the name of the setting to update\n * @param {SettingValue} value the new value for the setting\n */\n function update(setting, value) {\n validateSettingValue(value);\n var settingObj = {};\n settingObj[setting] = value;\n _.extend(settings, settingObj);\n\n EventService.emitEvent(EventService.EVENT.USER_SETTING_CHANGED, {\n setting: setting,\n value: value\n });\n }\n\n /**\n * Update multiple settings from a map of setting names and values.\n *\n * An event is triggered for each setting.\n *\n * @param {Object} settings\n */\n function updateAll(settings) {\n _.each(settings, function (value, key) {\n update(key, value);\n });\n }\n\n /**\n * Get the currently stored value for a setting.\n *\n * This should only be used to fetch the initial value or when a setting\n * is used once. To track changes to a setting, subscribe to the\n * USER_SETTING_CHANGED event and check the setting property of the event\n * payload.\n *\n * @param {SettingKey} setting name of the setting to look up\n */\n function get(setting) {\n if (_.has(settings, setting)) {\n return settings[setting];\n }\n // Incorrect key is a programmer error - default should be set for all\n // user settings that are used.\n console.error('Tried to look up setting with unrecognized key: %s',\n setting);\n }\n\n /**\n * Register an action to perform when a user setting value changes, and get\n * the current value.\n *\n * @param {SettingKey} setting the setting to get and subscribe to\n * @param {function} callback called with the new value\n * @return {SettingValue} the current value of the setting\n */\n function subscribe(setting, callback) {\n $rootScope.$on(EventService.EVENT.USER_SETTING_CHANGED,\n function (event, data) {\n if (data.setting === setting) {\n callback(data.value);\n }\n });\n return get(setting);\n }\n\n /**\n * Throw an error if the value is not the correct type for the setting.\n *\n * @param {SettingValue} value\n */\n function validateSettingValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'string':\n break;\n default:\n throw new Error('Invalid type for setting value: \"' + typeof value +\n '\".');\n }\n }\n\n\n\n return {\n SETTING: SETTING,\n update: update,\n updateAll: updateAll,\n get: get,\n subscribe: subscribe\n };\n }\n\n angular\n .module('app')\n .factory('SettingsService', SettingsService);\n})();\n","(function () {\n 'use strict';\n\n /**\n * SuggestionCtrl.js\n * @ngInject\n */\n function SuggestionCtrl(EventService, $rootScope, $scope, _, $timeout) {\n var suggestionCtrl = this;\n\n suggestionCtrl.copyButtonText = 'Copy Translation';\n\n $scope.searchTerm = (typeof $scope.search === 'string') ?\n [$scope.search] :\n $scope.search.sources;\n\n /**\n * Get a modifier for the row class that will determine display colours.\n *\n * Intended to be used to generate css class for the row:\n *\n * TransUnit--{{suggestionCtrl.rowDisplayType()}}\n *\n * @return {string} modifier to append to the TransUnit-- css class\n */\n\n suggestionCtrl.rowDisplayType = function () {\n /* @type {MatchDetail} */\n var topMatch = suggestionCtrl.topMatch();\n\n if (topMatch.type === 'IMPORTED_TM') {\n return 'secondary';\n }\n if (topMatch.type === 'LOCAL_PROJECT') {\n if (topMatch.contentState === 'Translated') {\n return 'success';\n }\n if (topMatch.contentState === 'Approved') {\n return 'highlight';\n }\n }\n console.error('Unable to generate row display type for top match');\n };\n\n /**\n *\n * @returns {string}\n */\n suggestionCtrl.percentDisplayType = function () {\n var type = suggestionCtrl.rowDisplayType();\n return type.charAt(0).toUpperCase() + type.substring(1);\n };\n\n /**\n * Return correct percentage to display.\n *\n * I am using this instead of Angular's number display because the number\n * display forces a particular number of decimal places rather than just\n * limiting to the specified number, and because we should never show 100%\n * unless it is exactly 100%.\n */\n suggestionCtrl.percent = function () {\n var percent = $scope.suggestion.similarityPercent;\n\n // Prevent very high percentages displaying as 100%\n if (percent > 99.99 && percent < 100) {\n return '99.99';\n }\n if (percent >= 99.90 && percent < 100) {\n return '99.9';\n }\n\n // Limit any inexact percentages to a single decimal place\n if (Math.round(percent) !== percent) {\n return percent.toFixed(1);\n }\n\n return percent;\n };\n\n /**\n * Return the details for the best match according to the following\n * criteria:\n *\n * - Content state and type: Approved > Translated > Imported\n * - Last modified: older modifications take higher priority.\n *\n * @return {MatchDetail} the best match\n */\n suggestionCtrl.topMatch = function () {\n return $scope.sortedDetails[0];\n };\n\n // TODO use sortByAll when lodash version is increased\n /**\n * Return a string that will naturally sort local project details before\n * imported TM details, approved state above translated state, and older\n * modification dates first, in that priority order.\n *\n * @param detail {MatchDetail} to generate a sorting string for\n * @returns {string}\n */\n function typeAndDateSort (detail) {\n\n if (detail.type === 'IMPORTED_TM') {\n return '3' + detail.lastChanged;\n }\n if (detail.type === 'LOCAL_PROJECT') {\n if (detail.contentState === 'Translated') {\n return '2' + detail.lastModifiedDate;\n }\n if (detail.contentState === 'Approved') {\n return '1' + detail.lastModifiedDate;\n }\n }\n // Unrecognized, sort last\n return '9';\n }\n\n /**\n * Request this suggestion to be copied to the selected translation field.\n *\n * Generates a COPY_FROM_SUGGESTION event.\n */\n suggestionCtrl.copySuggestion = function () {\n suggestionCtrl.copyButtonText = 'Copied';\n suggestionCtrl.copyButtonDisabled = true;\n $timeout(function() {\n suggestionCtrl.copyButtonDisabled = false;\n suggestionCtrl.copyButtonText = 'Copy Translation';\n }, 500);\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SUGGESTION,\n { suggestion: $scope.suggestion });\n };\n\n\n\n $rootScope.$on(EventService.EVENT.COPY_FROM_SUGGESTION_N,\n function (event, data) {\n if (data === $scope.index) {\n suggestionCtrl.copySuggestion();\n }\n });\n\n // TODO sort detail before it is sent here for display\n $scope.sortedDetails =\n _.sortBy($scope.suggestion.matchDetails, typeAndDateSort);\n\n\n // Will be undefined for imported matches\n $scope.translator = suggestionCtrl.topMatch().lastModifiedBy;\n\n\n return suggestionCtrl;\n }\n\n angular\n .module('app')\n .controller('SuggestionCtrl', SuggestionCtrl);\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @typedef {Object} ImportedMatchDetail\n * @param {string} type - 'IMPORTED_TM'\n * @param {number} transMemoryUnitId - numeric identifier for this translation\n * memory unit on the server\n * @param {string} transMemorySlug - identifier for the translation memory\n * that contains this translation unit\n * @param {string} transUnitId - optional identifier for this translation unit\n * @param {string} lastChanged - date that this text flow was last changed, in\n * ISO-8601 format\n */\n\n /**\n * @typedef {Object} LocalMatchDetail\n * @param {string} type - 'LOCAL_PROJECT'\n * @param {number} textFlowId - numeric identifier for this text flow on the\n * server\n * @param {string} contentState - 'Translated' or 'Approved'\n * @param {string} projectId - identifier for the project that this text flow\n * is in\n * @param {string} projectName - display name for the project that this text\n * flow is in\n * @param {string} version - identifier for the version that this text flow is\n * in\n * @param {string} documentPath - file path of the document that contains this\n * text flow.\n * @param {string} documentName - file name of the document that contains this\n * text flow, without the file path\n * @param {string} resId - natural id for this text flow within the document\n * @param {string} lastModifiedDate - date that this text flow was last\n * changed, in ISO-8601 format\n * @param {string} lastModifiedBy - username of the user who last modified\n * this text flow\n */\n\n /**\n * @typedef {(ImportedMatchDetail|LocalMatchDetail)} MatchDetail\n */\n\n /**\n * @typedef {Object} Suggestion\n * @param {number} relevanceScore - score from the search engine indicating\n * how close a match it considers this to the query.\n * It is sensible to compare scores within a query,\n * but not between queries.\n * @param {number} similarityPercent - proportion of the characters in\n * sourceContents that match the query\n * @param {Array} sourceContents - suggested source text that is\n * similar to the search\n * @param {Array} targetContents - translations of the suggested\n * source text\n * @param {Array} matchDetails - summary of all the sources with\n * the same source and target contents\n */\n\n /**\n * Provide suggestions based on given source text.\n *\n * SuggestionsService.js\n * @ngInject\n */\n function SuggestionsService(EditorService, EventService, UrlService,\n $resource) {\n\n /**\n * Get a list of suggestions for how to translate a piece of text.\n *\n * @param {string} searchText\n * @return {Promise>} suggestions for translating the\n * given text\n */\n function getSuggestionsForText(searchText) {\n return getSuggestionsForContents([searchText]);\n }\n\n /**\n * Get a list of suggestions for how to translate a phrase.\n *\n * @param {Phrase} phrase the source text to find suggestions for\n * @returns {Promise>} suggestions for translating the\n * given phrase\n */\n function getSuggestionsForPhrase(phrase) {\n return getSuggestionsForContents(phrase.sources)\n .then(function (suggestions) {\n EventService.emitEvent(EventService.EVENT.PHRASE_SUGGESTION_COUNT,\n { id: phrase.id, count: suggestions.length });\n return suggestions;\n });\n }\n\n /**\n * Get a list of suggestions for how to translate a list of strings.\n *\n * @param contents {Array} source strings to find matches for\n * @returns {Promise>}\n */\n function getSuggestionsForContents(contents) {\n var sourceLocale = EditorService.context.srcLocale.localeId;\n var transLocale = EditorService.context.localeId;\n\n var postQuery = {\n query: {\n method: 'POST',\n params: {\n from: sourceLocale,\n to: transLocale,\n searchType: 'FUZZY_PLURAL'\n },\n isArray: true\n }\n };\n\n var Suggestions = $resource(UrlService.SUGGESTIONS_URL, {}, postQuery);\n return Suggestions.query({}, contents).$promise;\n }\n\n return {\n getSuggestionsForPhrase: getSuggestionsForPhrase,\n getSuggestionsForText: getSuggestionsForText\n };\n }\n\n angular\n .module('app')\n .factory('SuggestionsService', SuggestionsService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name suggestion\n * @description suggestion container\n * @ngInject\n */\n function suggestion() {\n return {\n // Only use the template on elements with this name (not on things that\n // have an attribute or class called 'suggestion'.\n restrict: 'E',\n //required: ['suggestion'],\n\n // Specify an isolated scope for the suggestion component.\n scope: {\n // make variable 'suggestion' available in the template's scope, and\n // bind its value from the attribute with the same name.\n // (a different name for the attribute can be specified after the =\n suggestion: '=',\n index: '=',\n search: '=',\n diffEnabled: '='\n\n // If I put & instead of = in front of a name, it will run it in the\n // parent scope instead of this directive's isolated scope. Good for\n // callbacks.\n },\n controller: 'SuggestionCtrl as suggestionCtrl',\n templateUrl: 'components/suggestions/suggestion.html'\n };\n }\n\n angular\n .module('app')\n .directive('suggestion', suggestion);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name toggle-checkbox\n * @description Add an extra element to a checkbox to\n * so we can style it differently\n * @ngInject\n */\n function toggleCheckbox() {\n return {\n restrict: 'A',\n link: function(scope, element) {\n element.after('');\n }\n };\n }\n\n angular\n .module('app')\n .directive('toggleCheckbox', toggleCheckbox);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * @typedef {Object} StatusInfo\n * @property {string} ID lower case translation status (content state)\n * @property {string} NAME capitalized representation\n * @property {string} CSSCLASS css class to use for this status\n *\n */\n /**\n * TransStatusService.js\n *\n * @ngInject\n */\n function TransStatusService(_) {\n var transStatusService = this,\n STATUSES = {\n 'UNTRANSLATED': {\n 'ID': 'untranslated',\n 'NAME': 'Untranslated',\n 'CSSCLASS': 'neutral'\n },\n 'NEEDSWORK': {\n 'ID': 'needswork',\n 'NAME': 'Needs Work',\n 'CSSCLASS': 'unsure'\n },\n 'TRANSLATED' : {\n 'ID': 'translated',\n 'NAME': 'Translated',\n 'CSSCLASS': 'success'\n },\n 'APPROVED': {\n 'ID': 'approved',\n 'NAME': 'Approved',\n 'CSSCLASS': 'highlight'\n }\n };\n\n transStatusService.getAll = function() {\n return STATUSES;\n };\n\n transStatusService.getAllAsArray = function() {\n return _.values(STATUSES);\n };\n\n /**\n *\n * @param {string} statusKey string representation of the status.\n * @returns {StatusInfo}\n */\n transStatusService.getStatusInfo = function(statusKey) {\n return STATUSES[conformStatus(statusKey)];\n };\n\n transStatusService.getId = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].ID;\n };\n\n transStatusService.getServerId = function(statusId) {\n return serverStatusId(statusId);\n };\n\n transStatusService.getName = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].NAME;\n };\n\n transStatusService.getCSSClass = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].CSSCLASS;\n };\n\n /**\n * Conform it to uppercase for lookups and\n * temporary fix for server sending \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function conformStatus(statusKey) {\n statusKey = angular.uppercase(statusKey);\n if (!statusKey || statusKey === 'NEW') {\n statusKey = 'UNTRANSLATED';\n } else if (statusKey === 'NEEDREVIEW') {\n statusKey = 'NEEDSWORK';\n }\n return statusKey;\n }\n\n /**\n * Conform it to PascalCase for lookups and\n * temporary fix for server receiving \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function serverStatusId(statusId) {\n statusId = angular.lowercase(statusId);\n if (!statusId || statusId === 'untranslated') {\n return 'New';\n } else if (statusId === 'needswork') {\n return 'NeedReview';\n }\n return statusId.charAt(0).toUpperCase() + statusId.slice(1).toLowerCase();\n }\n\n return transStatusService;\n }\n\n angular\n .module('app')\n .factory('TransStatusService', TransStatusService);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitCtrl.js\n * @ngInject\n */\n function TransUnitCtrl($rootScope, $scope, $element, $stateParams, _,\n TransUnitService, EventService, LocaleService, focus,\n EditorShortcuts, PhraseUtil, SettingsService) {\n\n var transUnitCtrl = this;\n\n transUnitCtrl.selected = false;\n transUnitCtrl.focused = false;\n transUnitCtrl.focusedTranslationIndex = 0;\n\n transUnitCtrl.hasTranslationChanged =\n PhraseUtil.hasTranslationChanged;\n\n transUnitCtrl.focusTranslation = function() {\n if(transUnitCtrl.selected) {\n focus('phrase-' + $scope.phrase.id + '-' +\n transUnitCtrl.focusedTranslationIndex);\n }\n };\n\n // when user clicked on TU or using tab to nav\n transUnitCtrl.onTextAreaFocus = function(phrase, index) {\n transUnitCtrl.focused = true;\n if (!_.isUndefined(index)) {\n transUnitCtrl.focusedTranslationIndex = index;\n }\n if(!transUnitCtrl.selected) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': phrase.id,\n 'updateURL': true,\n 'focus': true\n }, $scope);\n }\n };\n\n transUnitCtrl.translationTextModified = function(phrase) {\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n };\n\n transUnitCtrl.getPhrase = function() {\n return $scope.phrase;\n };\n\n transUnitCtrl.init = function() {\n TransUnitService.addController($scope.phrase.id, transUnitCtrl);\n if($stateParams.id && parseInt($stateParams.id) === $scope.phrase.id) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $stateParams.id,\n 'updateURL': false,\n 'focus' : $stateParams.selected});\n }\n };\n\n transUnitCtrl.copySource = function($event, phrase, sourceIndex) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n {'phrase': phrase, 'sourceIndex': sourceIndex}, $scope);\n };\n\n transUnitCtrl.undoEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.cancelEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.saveAs = function($event, phrase, status) {\n EditorShortcuts.saveTranslationCallBack($event, phrase, status);\n };\n\n transUnitCtrl.getLocaleName = function(localeId) {\n return LocaleService.getName(localeId);\n };\n\n transUnitCtrl.toggleSaveAsOptions = function(open) {\n EventService.broadcastEvent( open ? 'openDropdown': 'closeDropdown',\n {}, $scope);\n if (open) {\n // focus on the first dropdown option\n focus($scope.phrase.id + '-saveAsOption-0');\n }\n };\n\n var SHOW_SUGGESTIONS = SettingsService.SETTING.SHOW_SUGGESTIONS;\n $scope.showSuggestions = SettingsService.subscribe(SHOW_SUGGESTIONS,\n function (show) {\n $scope.showSuggestions = show;\n });\n\n $rootScope.$on(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n function(event, data) {\n transUnitCtrl.suggestionsSearchIsActive = data;\n });\n\n transUnitCtrl.toggleSuggestionPanel = function () {\n if (transUnitCtrl.suggestionsSearchIsActive) {\n EventService.emitEvent(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n false);\n }\n else {\n SettingsService.update(SHOW_SUGGESTIONS, !$scope.showSuggestions);\n }\n };\n\n $scope.suggestionCount = 0;\n $rootScope.$on(EventService.EVENT.PHRASE_SUGGESTION_COUNT,\n function (event, data) {\n if (data.id === $scope.phrase.id) {\n $scope.suggestionCount = data.count;\n }\n });\n\n transUnitCtrl.cancelSaveAsMode = function() {\n EditorShortcuts.cancelSaveAsModeIfOn();\n };\n\n $scope.$on('$destroy', function () {\n $element.unbind('click', onTransUnitClick);\n $element.unbind('focus', onTransUnitClick);\n });\n\n transUnitCtrl.updateSaveButton = function (phrase) {\n transUnitCtrl.saveButtonStatus =\n PhraseUtil.getSaveButtonStatus($scope.phrase);\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n $scope.phrase);\n transUnitCtrl.saveButtonText = transUnitCtrl.saveButtonStatus.NAME;\n transUnitCtrl.saveButtonDisabled =\n !PhraseUtil.hasTranslationChanged(phrase);\n transUnitCtrl.loadingClass = '';\n transUnitCtrl.savingStatus = '';\n };\n\n transUnitCtrl.phraseSaving = function (data) {\n transUnitCtrl.loadingClass = 'is-loading';\n transUnitCtrl.saveButtonStatus =\n transUnitCtrl.savingStatus = data.status;\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n data.phrase);\n transUnitCtrl.saveButtonText = 'Saving…';\n transUnitCtrl.saveButtonDisabled = true;\n };\n\n transUnitCtrl.saveButtonOptionsAvailable = function() {\n return !_.isEmpty(transUnitCtrl.saveButtonOptions);\n };\n\n transUnitCtrl.selectTransUnit = function(phrase) {\n if (!transUnitCtrl.selected) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': phrase.id,\n 'updateURL': true,\n 'focus': true\n }, $scope);\n }\n };\n\n function onTransUnitClick() {\n if(!transUnitCtrl.selected) {\n $scope.$apply(function () {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $scope.phrase.id,\n 'updateURL': true,\n 'focus': true}, $scope);\n });\n }\n }\n\n return transUnitCtrl;\n }\n\n angular\n .module('app')\n .controller('TransUnitCtrl', TransUnitCtrl);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitService\n *\n * See PhraseService.transformToPhrases function for phrase definition.\n *\n * @ngInject\n */\n function TransUnitService(_, $location, $rootScope, $state, $stateParams,\n $filter, MessageHandler, EventService, TransStatusService, PRODUCTION,\n EditorShortcuts, PhraseUtil, $timeout) {\n var transUnitService = this,\n controllerList = {},\n selectedTUId;\n\n transUnitService.addController = function(id, controller) {\n controllerList[id] = controller;\n };\n\n transUnitService.getSaveButtonOptions = function(saveButtonStatus, phrase) {\n return filterSaveButtonOptions(saveButtonStatus, phrase);\n };\n\n $rootScope.$on(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n function(event, data) {\n var transUnitCtrl = controllerList[data.id];\n if (transUnitCtrl) {\n transUnitCtrl.toggleSaveAsOptions(data.open);\n }\n });\n\n /**\n * EventService.EVENT.SELECT_TRANS_UNIT listener\n * - Select and focus a trans-unit.\n * - Perform implicit save on previous selected TU if changed\n * - Update url with TU id without reload state\n */\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n var newTuController = controllerList[data.id],\n oldTUController = controllerList[selectedTUId],\n updateURL = data.updateURL;\n\n EventService.emitEvent(EventService.EVENT.REQUEST_PHRASE_SUGGESTIONS,\n {\n 'phrase' : newTuController.getPhrase()\n });\n\n if(newTuController) {\n EditorShortcuts.selectedTUCtrl = newTuController;\n\n if (selectedTUId && selectedTUId !== data.id) {\n setSelected(oldTUController, false);\n\n //perform implicit save if changed\n if(PhraseUtil.hasTranslationChanged(\n oldTUController.getPhrase())) {\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase' : oldTUController.getPhrase(),\n 'status' : TransStatusService.getStatusInfo('TRANSLATED'),\n 'locale' : $stateParams.localeId,\n 'docId' : $stateParams.docId\n });\n }\n }\n\n updateSaveButton(event, newTuController.getPhrase());\n selectedTUId = data.id;\n setSelected(newTuController, true);\n\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION, data);\n\n //Update url without reload state\n if(updateURL) {\n if($state.current.name !== 'editor.selectedContext.tu') {\n $state.go('editor.selectedContext.tu', {\n 'id': data.id,\n 'selected': data.focus.toString()\n });\n } else {\n $location.search('id', data.id);\n $location.search('selected', data.focus.toString());\n }\n }\n } else {\n MessageHandler.displayWarning('Trans-unit not found:' + data.id);\n }\n });\n\n /**\n * EventService.EVENT.COPY_FROM_SOURCE listener\n * Copy translation from source\n */\n $rootScope.$on(EventService.EVENT.COPY_FROM_SOURCE,\n function (event, data) {\n var sourceIndex = 0;\n if(data.phrase.plural) {\n //clicked copy source button\n sourceIndex = data.sourceIndex;\n if(_.isUndefined(sourceIndex)) {\n //copy source key shortcut, copy corresponding source to target\n var transUnitCtrl = controllerList[data.phrase.id];\n sourceIndex = transUnitCtrl.focusedTranslationIndex;\n if(data.phrase.sources.length <\n transUnitCtrl.focusedTranslationIndex + 1) {\n sourceIndex = data.phrase.sources.length - 1;\n }\n }\n }\n setTranslationText(data.phrase, data.phrase.sources[sourceIndex]);\n });\n\n $rootScope.$on(EventService.EVENT.COPY_FROM_SUGGESTION,\n function (event, data) {\n if (selectedTUId) {\n var transUnitCtrl = controllerList[selectedTUId];\n var phrase = transUnitCtrl.getPhrase();\n\n var suggestion = data.suggestion;\n var targets = suggestion.targetContents;\n\n var copyAsPlurals = phrase.plural && targets.length > 1;\n\n\n if (copyAsPlurals) {\n var pluralCount = phrase.translations.length;\n\n if (targets.length < pluralCount) {\n var lastSuggestion = _.last(targets);\n // pad suggestions with last suggestion, but only when there are\n // no translations entered for the extra plural forms.\n targets = _.assign(phrase.translations.slice(), targets,\n function (current, suggested) {\n if (suggested) return suggested;\n if (current) return current;\n return lastSuggestion;\n });\n }\n if (targets.length > pluralCount) {\n targets = _.first(targets, pluralCount);\n }\n\n setAllTranslations(phrase, targets);\n } else {\n setTranslationText(phrase, targets[0]);\n }\n }\n });\n\n /**\n * EventService.EVENT.UNDO_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.UNDO_EDIT,\n function (event, phrase) {\n if (PhraseUtil.hasTranslationChanged(phrase)) {\n setAllTranslations(phrase, phrase.translations);\n }\n });\n\n /**\n * EventService.EVENT.CANCEL_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function (event, phrase) {\n if(selectedTUId) {\n setSelected(controllerList[selectedTUId], false);\n selectedTUId = false;\n EditorShortcuts.selectedTUCtrl = null;\n }\n\n $location.search('selected', null);\n if(!phrase) {\n $location.search('id', null);\n }\n\n // EditorContentCtrl#changePage doesn't provide a phrase object\n if (phrase) {\n $timeout(function() {\n return $rootScope.$broadcast('blurOn', 'phrase-' + phrase.id);\n });\n }\n });\n\n /**\n * EventService.EVENT.TRANSLATION_TEXT_MODIFIED listener\n *\n */\n $rootScope.$on(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n updateSaveButton);\n\n /**\n * EventService.EVENT.FOCUS_TRANSLATION listener\n *\n */\n $rootScope.$on(EventService.EVENT.FOCUS_TRANSLATION,\n setFocus);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_INITIATED,\n phraseSaving);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_COMPLETED,\n updateSaveButton);\n\n function setTranslationText(phrase, newText) {\n var index = 0;\n if (phrase.plural) {\n var transUnitCtrl = controllerList[phrase.id];\n index = transUnitCtrl.focusedTranslationIndex;\n }\n phrase.newTranslations[index] = newText;\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n phrase);\n }\n\n function setAllTranslations(phrase, newTexts) {\n //need slice() for new instance of array\n phrase.newTranslations = newTexts.slice();\n\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n phrase);\n }\n\n function updateSaveButton(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.updateSaveButton(phrase);\n }\n\n function phraseSaving(event, data) {\n var transUnitCtrl = controllerList[data.phrase.id];\n transUnitCtrl.phraseSaving(data);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n data.phrase);\n }\n\n function setSelected(transUnitCtrl, isSelected) {\n //This check is to prevent selected event being triggered repeatedly.\n if(transUnitCtrl.selected !== isSelected) {\n transUnitCtrl.selected = isSelected || false;\n }\n }\n\n function setFocus(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.focusTranslation();\n }\n\n /**\n * Filters the dropdown options for saving a translation\n * Unless the translation is empty, remove untranslated as an option\n * Filter the current default save state out of the list and show remaining\n *\n * @param {Object} saveStatus The current default translation *save* status\n * @return {Array} Is used to construct the dropdown list\n */\n function filterSaveButtonOptions(saveStatus, phrase) {\n var filteredOptions = [];\n if (saveStatus.ID === 'untranslated') {\n return filteredOptions;\n }\n filteredOptions = $filter('filter')\n (TransStatusService.getAllAsArray(), {ID: '!untranslated'});\n\n if(phrase.plural) {\n if(PhraseUtil.hasNoTranslation(phrase)) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!needswork'});\n } else if(PhraseUtil.hasEmptyTranslation(phrase)) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!translated'});\n }\n }\n\n if (PRODUCTION) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!approved'});\n }\n\n return $filter('filter')(filteredOptions, {ID: '!'+saveStatus.ID});\n }\n\n return transUnitService;\n }\n\n angular\n .module('app')\n .factory('TransUnitService', TransUnitService);\n})();\n\n\n","(function() {\n 'use strict';\n\n /**\n * @name trans-unit\n * @description transUnit container\n * @ngInject\n */\n function transUnit() {\n return {\n restrict: 'E',\n required: ['phrase', 'editorContext'],\n scope: {\n phrase: '=',\n firstPhrase: '=',\n editorContext: '='\n },\n controller: 'TransUnitCtrl as transUnitCtrl',\n templateUrl: 'components/transUnit/trans-unit.html',\n link: function(scope, element, attr, TransUnitCtrl) {\n TransUnitCtrl.init();\n }\n };\n }\n\n angular\n .module('app')\n .directive('transUnit', transUnit);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name trans-unit\n * @description transUnit container\n * @ngInject\n */\n function transUnitFilter() {\n return {\n restrict: 'E',\n required: ['editor'],\n scope: {\n editor: '='\n },\n templateUrl: 'components/transUnitFilter/trans-unit-filter.html'\n };\n }\n\n angular\n .module('app')\n .directive('transUnitFilter', transUnitFilter);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * UserService.js\n *\n * @ngInject\n */\n function UserService($resource, UrlService) {\n\n function getUserInfo(username) {\n var UserInfo = $resource(UrlService.USER_INFO_URL, {}, {\n query: {\n method: 'GET',\n params: {\n username: username\n }\n }\n });\n return UserInfo.query().$promise;\n }\n\n function getMyInfo() {\n var MyInfo = $resource(UrlService.MY_INFO_URL, {}, {\n query: {\n method: 'GET'\n }\n });\n return MyInfo.query().$promise;\n }\n\n return {\n settings: {\n editor: {\n hideMainNav: false\n }\n },\n getUserInfo: getUserInfo,\n getMyInfo: getMyInfo\n };\n }\n angular\n .module('app')\n .factory('UserService', UserService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * FilterUtil.js\n *\n * @ngInject\n */\n function FilterUtil(StringUtil, _) {\n\n /**\n * Filter in resources on given fields with matched terms\n *\n * @param resources - list of resources\n * @param fields - list of fields to check\n * @param terms - list of term to check\n * @returns {*}\n */\n function filterResources(resources, fields, terms) {\n if(!resources || !fields || !terms) {\n return resources;\n }\n return _.filter(resources, function (resource) {\n return isInclude(resource, fields, terms);\n });\n }\n\n /**\n * Filter out properties starting with $ (added by promise)\n * @param resources\n */\n function cleanResourceMap(resources) {\n var filteredList = {};\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList[id] = (resources[id]);\n });\n return filteredList;\n }\n\n function cleanResourceList(resources) {\n var filteredList = [];\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList.push(resources[id]);\n });\n return filteredList;\n }\n\n\n function isInclude(resource, fields, terms) {\n if(!resource || !fields || !terms) {\n return false;\n }\n return _.any(fields, function(field) {\n return _.any(terms, function(term) {\n return StringUtil.equals(resource[field], term, true);\n });\n });\n }\n\n return {\n filterResources : filterResources,\n cleanResourceList:cleanResourceList,\n cleanResourceMap : cleanResourceMap\n };\n }\n angular\n .module('app')\n .factory('FilterUtil', FilterUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * PhraseUtil.js\n *\n * @ngInject\n */\n function PhraseUtil(TransStatusService, _) {\n\n function getSaveButtonStatus(phrase) {\n if (hasNoTranslation(phrase)) {\n return TransStatusService.getStatusInfo('untranslated');\n }\n else if (hasEmptyTranslation(phrase)) {\n return TransStatusService.getStatusInfo('needswork');\n }\n else if (hasTranslationChanged(phrase)) {\n return TransStatusService.getStatusInfo('translated');\n }\n else {\n return phrase.status;\n }\n }\n\n function hasTranslationChanged(phrase) {\n // on Firefox with input method turned on,\n // when hitting tab it seems to turn undefined value into ''\n var allSame = _.every(phrase.translations,\n function(translation, index) {\n return nullToEmpty(translation) ===\n nullToEmpty(phrase.newTranslations[index]);\n });\n return !allSame;\n }\n\n function hasNoTranslation(phrase) {\n return _.isEmpty(_.compact(phrase.newTranslations));\n }\n\n function hasEmptyTranslation(phrase) {\n return _.compact(phrase.newTranslations).length !==\n phrase.newTranslations.length;\n }\n\n function nullToEmpty(value) {\n return value || '';\n }\n\n return {\n getSaveButtonStatus : getSaveButtonStatus,\n hasTranslationChanged : hasTranslationChanged,\n hasNoTranslation : hasNoTranslation,\n hasEmptyTranslation : hasEmptyTranslation\n };\n }\n angular\n .module('app')\n .factory('PhraseUtil', PhraseUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility method for handling $resource.statistic\n *\n * StatisticUtil.js\n * @ngInject\n *\n */\n\n function StatisticUtil() {\n return {\n getWordStatistic: function(statistics) {\n return statistics[0].unit === 'WORD' ? statistics[0] : statistics[1];\n },\n getMsgStatistic: function(statistics) {\n return statistics[0].unit === 'MESSAGE' ? statistics[0] : statistics[1];\n }\n };\n }\n angular\n .module('app')\n .factory('StatisticUtil', StatisticUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * StringUtil\n *\n * @ngInject\n */\n\n function StringUtil() {\n function startsWith(str, prefix, ignoreCase) {\n if (ignoreCase && str && prefix) {\n str = str.toUpperCase();\n prefix = prefix.toUpperCase();\n }\n return str.lastIndexOf(prefix, 0) === 0;\n }\n\n function endsWith(str, suffix, ignoreCase) {\n if (ignoreCase && str && suffix) {\n str = str.toUpperCase();\n suffix = suffix.toUpperCase();\n }\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\n }\n\n function equals(from, to, ignoreCase) {\n if (ignoreCase && from && to) {\n from = from.toUpperCase();\n to = to.toUpperCase();\n }\n return from === to;\n }\n\n return {\n startsWith : startsWith,\n endsWith : endsWith,\n equals : equals\n };\n }\n angular\n .module('app')\n .factory('StringUtil', StringUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility to handles URL related request.\n *\n * UrlService.js\n * @ngInject\n */\n function UrlService($location, $http, $q, $stateParams, _) {\n //IE doesn't support location.origin\n if (!location.origin) {\n location.origin =\n window.location.protocol + '//' + window.location.hostname +\n (window.location.port ? (':' + window.location.port) : '');\n }\n\n var urlService = this,\n gravatarBaseUrl = 'http://www.gravatar.com/avatar',\n configFile = 'config.json',\n baseUrl = '',\n urls = {},\n uiTranslationsURL = location.origin + location.pathname +\n 'translations';\n\n urlService.serverContextPath = '';\n\n urlService.init = function () {\n if (baseUrl) {\n return $q.when(baseUrl);\n }\n else {\n /**\n * Temporary solution to handle dynamic context path deployed for\n * Zanata server in JBOSS (/ or /zanata).\n *\n * If config.baseUrl exist and not empty,\n * baseUrl = config.baseUrl\n *\n * ELSE\n * baseUrl = full.url - appPath onwards\n */\n return $http.get(configFile).then(function (response) {\n var config = response.data;\n if (config.baseUrl) {\n baseUrl = config.baseUrl;\n } else {\n var deployPath = config.appPath.replace(/^\\//g, ''),\n index = location.href.indexOf(deployPath);\n\n urlService.serverContextPath = location.origin + location.pathname;\n if(index >= 0) {\n urlService.serverContextPath = location.href.substring(0, index);\n }\n urlService.serverContextPath = urlService.serverContextPath.\n replace(/\\/?$/, '/');\n baseUrl = urlService.serverContextPath + 'rest';\n }\n\n /* jshint -W101 */\n // URLs over multiple lines are hard to read, allowing long lines here.\n // Warnings for jshint are turned off/on with -/+ before the warning code.\n // See: https://github.com/jshint/jshint/blob/2.1.4/src/shared/messages.js\n urls = _.mapValues({\n project: '/project/:projectSlug',\n docs: '/project/:projectSlug/version/:versionSlug/docs',\n locales: '/project/:projectSlug/version/:versionSlug/locales',\n status: '/project/:projectSlug/version/:versionSlug/doc/:docId/status/:localeId',\n textFlows: '/source+trans/:localeId',\n docStats: '/stats/project/:projectSlug/version/:versionSlug/doc/:docId/locale/:localeId',\n myInfo: '/user',\n userInfo: '/user/:username',\n translation: '/trans/:localeId',\n allLocales: '/locales',\n suggestions: '/suggestions'\n }, unary(restUrl));\n /* jshint +W101 */\n\n urlService.PROJECT_URL = urls.project;\n urlService.LOCALE_LIST_URL = urls.locales;\n urlService.DOCUMENT_LIST_URL = urls.docs;\n urlService.TRANSLATION_STATUS_URL = urls.status;\n urlService.TEXT_FLOWS_URL = urls.textFlows;\n urlService.DOC_STATISTIC_URL = urls.docStats;\n urlService.MY_INFO_URL = urls.myInfo;\n urlService.USER_INFO_URL = urls.userInfo;\n urlService.TRANSLATION_URL = urls.translation;\n urlService.ALL_LOCALE_URL = urls.allLocales;\n urlService.SUGGESTIONS_URL = urls.suggestions;\n\n urlService.PROJECT_PAGE = function(projectSlug, versionSlug) {\n return urlService.serverContextPath + 'iteration/view/' +\n projectSlug + '/' + versionSlug;\n };\n\n urlService.DASHBOARD_PAGE = urlService.serverContextPath +\n 'dashboard';\n });\n }\n };\n\n /**\n * Get the value of a query string parameter.\n */\n urlService.readValue = function (key) {\n return $location.search()[key];\n };\n\n urlService.gravatarUrl = function (gravatarHash, size) {\n return gravatarBaseUrl + '/' + gravatarHash +\n '?d=mm&r=g&s=' + size;\n };\n\n urlService.uiTranslationURL = function (locale) {\n return uiTranslationsURL + '/' + locale + '.json';\n };\n\n urlService.uiTranslationListURL = uiTranslationsURL + '/locales';\n\n return urlService;\n\n /**\n * Create a REST URL by appending all the given URL part arguments to the\n * base URL.\n *\n * No separators will be added or removed, so all parts should include\n * leading / and exclude trailing / to avoid problems.\n */\n function restUrl() {\n return baseUrl + Array.prototype.join.call(arguments, '');\n }\n\n /**\n * Decorate a function to ignore all but the first argument.\n */\n function unary(fun) {\n return function(arg) {\n return fun(arg);\n };\n }\n }\n\n angular\n .module('app')\n .factory('UrlService', UrlService);\n})();\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/zanata-war/src/main/webapp/app/maps/libs.js.map b/zanata-war/src/main/webapp/app/maps/libs.js.map index f4fba3f2a8..0f57a98ac3 100644 --- a/zanata-war/src/main/webapp/app/maps/libs.js.map +++ b/zanata-war/src/main/webapp/app/maps/libs.js.map @@ -1 +1 @@ -{"version":3,"sources":["angular/angular.js","angular-animate/angular-animate.js","angular-elastic/elastic.js","angular-resource/angular-resource.js","highlightjs/highlight.pack.js","modernizr/modernizr-custom.js","mousetrap/mousetrap.js","ng-focus-on/ng-focus-on.js","angular-gettext/dist/angular-gettext.js","angular-hotkeys/src/hotkeys.js","angular-ui-router/release/angular-ui-router.js","lodash/dist/lodash.compat.js","underscore.string/lib/underscore.string.js"],"names":[],"mappings":"AAAA;CACC;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;EACA;IACE;MACE;MACA;MACA;MACA;QACE;UACE;QACF;UACE;QACF;UACE;QACF;QACA;MACF;MACA;;IAEF;MACE;;MAEA;QACE;QACA;UACE;QACF;UACE;QACF;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;IACF;MACE;QACE;IACJ;IACA;EACF;AACF;;AAEA;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;EACE;EACA;MACI;MACA;AACN;AACA;EACE;EACA;MACI;MACA;AACN;;;AAGA;AACA;AACA;AACA;EACE;EACA;AACF;;;AAGA;IACI;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;AAEJ;CACC;CACA;CACA;AACD;AACA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;SACO;AACT;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;KACA;KACA;OACE;KACF;KACA;GACF;CACF;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;EACA;IACE;MACE;QACE;QACA;QACA;UACE;QACF;MACF;IACF;MACE;MACA;QACE;UACE;QACF;MACF;IACF;QACI;IACJ;MACE;QACE;UACE;QACF;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;MACE;MACA;QACE;QACA;MACF;IACF;EACF;;EAEA;EACA;AACF;;AAEA;EACE;AACF;;;AAGA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;KACF;GACF;CACF;AACD;AACA;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;KACF;GACF;CACF;AACD;AACA;;;AAGA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;AACJ;;AAEA;CACC;CACA;CACA;AACD;EACE;EACA;IACE;EACF;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;IACE;MACE;QACE;EACN;;EAEA;AACF;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;IACE;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;IACA;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;EACC;IACE;MACE;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;IACF;CACH;CACA;CACA;CACA;AACD;EACE;IACE;MACE;EACJ;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;MACF;QACE;QACA;MACF;QACE;QACA;MACF;IACF;EACF;IACE;MACE;;IAEF;IACA;;IAEA;MACE;MACA;;MAEA;MACA;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;QACA;MACF;IACF;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;MACA;QACE;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;MACA;IACF;;EAEF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;;IAEA;MACE;IACF;EACF;IACE;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;IACE;MACE;QACE;QACA;UACE;YACE;UACF;UACA;QACF;MACF;QACE;QACA;MACF;QACE;MACF;QACE;QACA;QACA;UACE;UACA;UACA;QACF;QACA;UACE;cACI;cACA;cACA;QACN;QACA;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;;EAEA;kBACgB;;EAEhB;IACE;MACE;MACA;MACA;IACF;MACE;IACF;EACF;;EAEA;AACF;;;;AAIA;EACE;AACF;;AAEA;EACE;AACF;;;AAGA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;EACA;IACE;MACE;UACI;YACE;YACA;QACJ;MACF;UACI;YACE;YACA;QACJ;EACN;IACE;IACA;EACF;AACF;;;AAGA;EACE;;EAEA;IACE;EACF;IACE;EACF;IACE;EACF;IACE;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;AACN;;;AAGA;CACC;CACA;AACD;EACE;EACA;IACE;IACA;IACA;EACF;EACA;EACA;EACA;EACA;IACE;QACI;UACE;UACA;EACR;IACE;EACF;;AAEF;;;AAGA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;AACD;EACE;EACA;IACE;MACE;MACA;MACA;QACE;QACA;UACE;QACF;UACE;QACF;UACE;QACF;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;QACE;mBACW;MACb;IACF;IACA;eACW;IACX;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;aACW;aACA;aACA;AACb;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;aACW;aACA;aACA;aACA;aACA;aACA;AACb;;AAEA;;AAEA;EACE;EACA;EACA;IACE;IACA;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;GACA;KACE;GACF;GACA;GACA;GACA;KACE;KACA;GACF;GACA;CACF;CACA;CACA;CACA;CACA;GACE;GACA;OACI;WACI;;WAEA;cACG;cACA;WACH;OACJ;;OAEA;WACI;WACA;;WAEA;cACG;cACA;WACH;OACJ;;OAEA;WACI;;WAEA;cACG;cACA;cACA;WACH;OACJ;GACJ;GACA;GACA;GACA;KACE;KACA;KACA;OACE;OACA;KACF;KACA;KACA;KACA;OACE;OACA;KACF;KACA;KACA;OACE;KACF;KACA;GACF;GACA;GACA;OACI;OACA;OACA;OACA;OACA;GACJ;GACA;OACI;OACA;OACA;GACJ;GACA;OACI;OACA;OACA;OACA;GACJ;GACA;CACF;CACA;AACD;EACE;MACI;MACA;;EAEJ;EACA;IACE;;IAEA;MACE;MACA;IACF;EACF;EACA;IACE;IACA;;IAEA;MACE;MACA;IACF;EACF;EACA;IACE;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;IACE;EACF;EACA;EACA;IACE;;IAEA;MACE;MACA;MACA;UACI;UACA;UACA;IACN;;IAEA;IACA;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;IACA;IACA;OACG;QACC;UACE;UACA;QACF;MACF;IACF;IACA;EACF;;EAEA;EACA;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;EACA;IACE;MACE;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;AACA;EACE;EACA;IACE;EACF;AACF;;AAEA;AACA;AACA;EACE;;EAEA;IACE;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;UACE;UACA;YACE;UACF;QACF;MACF;QACE;MACF;MACA;IACF;EACF;IACE;EACF;;EAEA;;EAEA;EACA;AACF;;AAEA;CACC;CACA;AACD;EACE;IACE;EACF;EACA;AACF;;AAEA;EACE;MACI;EACJ;;EAEA;MACI;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;MACE;IACF;EACF;EACA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;IACA;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;EACA;;EAEA;IACE;EACF;;EAEA;;EAEA;EACA;;EAEA;IACE;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;QACF;MACF;;MAEA;MACA;QACE;MACF;MACA;QACE;UACE;aACG;aACA;QACL;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;;QAEA;QACA;UACE;UACA;UACA;UACA;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;;UAGA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;UACE;UACA;YACE;YACA;UACF;QACF;MACF;IACF;EACF;;AAEF;;AAEA;EACE;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;AACF;;;AAGA;EACE;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;EACF;IACE;EACF;;EAEA;IACE;MACE;MACA;QACE;MACF;MACA;QACE;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;QACA;UACE;QACF;QACA;QACA;MACF;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;IACI;IACA;MACE;IACF;IACA;MACE;IACF;;AAEJ;CACC;CACA;AACD;EACE;EACA;AACF;;AAEA;;;AAGA;AACA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;MACE;IACF;IACA;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;EACE;;EAEA;EACA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;EACA;EACA;AACF;;AAEA;EACE;MACI;MACA;;EAEJ;IACE;IACA;EACF;IACE;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;IACF;;IAEA;;IAEA;IACA;EACF;;EAEA;EACA;EACA;EACA;IACE;EACF;;EAEA;AACF;;AAEA;EACE;EACA;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;AACF;;AAEA;AACA;EACE;IACE;EACF;;EAEA;;EAEA;IACE;IACA;EACF;EACA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;EACF;IACE;EACF;AACF;;AAEA;EACE;AACF;;AAEA;EACE;;EAEA;IACE;IACA;MACE;IACF;EACF;AACF;;AAEA;EACE;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;MACE;QACE;MACF;MACA;IACF;EACF;IACE;MACE;QACE;QACA;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;;EAEA;IACE;MACE;MACA;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;IACA;IACA;EACF;AACF;;;AAGA;EACE;MACI;;EAEJ;IACE;IACA;EACF;;EAEA;AACF;;;AAGA;EACE;;IAEE;IACA;IACA;IACA;IACA;;IAEA;MACE;IACF;MACE;QACE;MACF;QACE;UACE;UACA;QACF;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;MACI;AACN;;AAEA;EACE;IACE;MACE;UACI;UACA;UACA;MACJ;IACF;EACF;AACF;;AAEA;EACE;IACE;4BACwB;;IAExB;MACE;MACA;QACE;MACF;IACF;;IAEA;EACF;AACF;;;AAGA;EACE;;EAEA;;IAEE;IACA;MACE;IACF;MACE;;MAEA;MACA;QACE;UACE;YACE;UACF;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;EACA;IACE;EACF;EACA;;EAEA;IACE;MACE;IACF;;IAEA;IACA;IACA;IACA;EACF;AACF;;AAEA;EACE;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;EACE;IACE;;IAEA;MACE;MACA;MACA;IACF;;IAEA;IACA;MACE;IACF;MACE;MACA;MACA;MACA;MACA;MACA;IACF;EACF;EACA;IACE;IACA;IACA;EACF;;EAEA;MACI;EACJ;;EAEA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;EACE;AACF;AACA;AACA;EACE;AACF;AACA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;;EAEA;EACA;AACF;;AAEA;EACE;EACA;AACF;;AAEA;EACE;EACA;AACF;EACE;AACF;;AAEA;EACE;EACA;;EAEA;IACE;IACA;EACF;;EAEA;IACE;IACA;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;;EAEA;IACE;;IAEA;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;UACE;UACA;QACF;MACF;QACE;iBACS;eACF;eACA;MACT;IACF;MACE;IACF;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;EACF;;EAEA;IACE;MACE;QACE;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;IACA;EACF;;EAEA;AACF;EACE;GACC;GACA;EACD;IACE;IACA;;IAEA;IACA;IACA;IACA;QACI;MACF;;QAEE;QACA;UACE;YACE;YACA;UACF;YACE;cACE;YACF;UACF;QACF;QACA;QACA;MACF;QACE;QACA;QACA;QACA;QACA;QACA;UACE;UACA;QACF;QACA;MACF;IACF;MACE;MACA;QACE;MACF;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;MACE;IACF;;IAEA;IACA;;IAEA;;IAEA;MACE;MACA;QACE;;QAEA;UACE;QACF;;QAEA;UACE;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;EACE;;EAEA;IACE;;IAEA;IACA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;MACE;MACA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;;UAEA;YACE;YACA;YACA;YACA;cACE;YACF;UACF;;QAEF;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;EACF;;EAEA;;EAEA;IACE;;IAEA;IACA;IACA;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;QACE;MACF;QACE;MACF;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;IACJ;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;;IAEA;;IAEA;MACE;MACA;IACF;EACF;;EAEA;IACE;MACE;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;IACE;IACA;;IAEA;MACE;MACA;MACA;IACF;EACF;;EAEA;EACA;;EAEA;IACE;MACE;QACE;QACA;UACE;QACF;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;MACE;IACF;MACE;IACF;EACF;;EAEA;;EAEA;;IAEE;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;QACE;UACE;QACF;MACF;IACF;EACF;AACF;EACE;GACC;GACA;EACD;IACE;;IAEA;MACE;QACE;QACA;UACE;UACA;QACF;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;EACA;IACE;EACF;IACE;EACF;;EAEA;AACF;;AAEA;CACC;CACA;AACD;EACE;IACE;IACA;MACE;IACF;EACF;EACA;AACF;AACA;EACE;GACC;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;;AAED;AACA;AACA;AACA;AACA;;AAEA;EACE;EACA;EACA;MACI;EACJ;IACE;EACF;EACA;AACF;;AAEA;EACE;MACI;MACA;MACA;;EAEJ;IACE;MACE;MACA;QACE;UACE;YACE;UACF;UACA;YACE;QACJ;QACA;QACA;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;EACF;IACE;IACA;IACA;EACF;IACE;EACF;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;;AAKD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;wBACuB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;EACE;EACA;MACI;MACA;MACA;MACA;QACE;YACI;YACA;YACA;YACA;YACA;YACA;UACF;MACJ;MACA;UACI;YACE;UACF;MACJ;MACA;UACI;YACE;YACA;UACF;;;EAGR;;EAEA;;EAEA;EACA;EACA;;EAEA;IACE;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;IACF;IACA;MACE;IACF;IACA;EACF;;EAEA;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;IACA;EACF;;EAEA;IACE;QACI;;IAEJ;MACE;MACA;IACF;EACF;;EAEA;EACA;EACA;EACA;IACE;IACA;MACE;MACA;;MAEA;QACE;QACA;UACE;cACI;;UAEJ;QACF;MACF;;MAEA;QACE;UACE;UACA;UACA;UACA;QACF;YACI;QACJ;YACI;QACJ;UACE;QACF;MACF;QACE;UACE;QACF;QACA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;QACA;kBACU;MACZ;IACF;IACA;EACF;;EAEA;EACA;EACA;;EAEA;;IAEE;MACE;QACE;UACE;oBACU;QACZ;QACA;MACF;QACE;UACE;UACA;UACA;QACF;UACE;YACE;UACF;UACA;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;QACA;MACF;;MAEA;UACI;UACA;UACA;;MAEJ;QACE;QACA;UACE;kBACQ;QACV;QACA;UACE;UACA;UACA;QACF;MACF;MACA;QACE;MACF;;MAEA;MACA;MACA;IACF;;IAEA;MACE;UACI;;MAEJ;MACA;MACA;MACA;MACA;;MAEA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;aACE;eACE;eACA;eACA;;eAEA;eACA;aACF;WACF;KACN;KACA;OACE;SACE;SACA;OACF;;OAEA;SACE;SACA;OACF;KACF;GACF;CACF;AACD;;EAEE;;EAEA;IACE;EACF;;EAEA;IACE;;IAEA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;IACF;;IAEA;IACA;IACA;MACE;QACE;UACE;QACF;IACJ;;IAEA;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;EAGE;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;KACA;KACA;KACA;KACA;KACA;KACA;KACA;GACF;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;QACI;IACJ;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;EAEA;;IAEE;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;cACM;QACN;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;wBACgB;wBACA;QAChB;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;wBACgB;wBACA;QAChB;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;MACF;;MAEA;MACA;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;MACA;QACE;MACF;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;MACA;MACA;MACA;MACA;;EAEJ;;EAEA;EACA;;EAEA;EACA;EACA;;EAEA;GACC;GACA;GACA;EACD;IACE;MACE;IACF;MACE;MACA;QACE;UACE;YACE;UACF;YACE;UACF;QACF;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;;IAEA;MACE;IACF;MACE;IACF;EACF;;EAEA;EACA;EACA;EACA;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;EACF;;EAEA;EACA;EACA;;EAEA;MACI;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;;IAEA;IACA;MACE;MACA;MACA;QACE;QACA;UACE;UACA;UACA;QACF;MACF;QACE;QACA;UACE;QACF;UACE;QACF;MACF;MACA;IACF;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;MACI;;EAEJ;IACE;IACA;;IAEA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;;MAEA;IACF;;IAEA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;EACD;;EAEA;EACA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;MACE;QACE;gCACwB;MAC1B;QACE;UACE;gCACsB;;UAEtB;UACA;UACA;UACA;UACA;YACE;cACE;cACA;UACJ;QACF;MACF;IACF;MACE;QACE;QACA;QACA;;QAEA;UACE;UACA;UACA;YACE;YACA;YACA;YACA;YACA;cACE;YACF;UACF;QACF;MACF;MACA;IACF;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;MACA;IACF;IACA;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;IACF;IACA;EACF;;AAEF;;AAEA;EACE;MACI;QACE;MACF;AACN;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;SACA;;SAEA;SACA;WACE;WACA;WACA;SACF;;SAEA;SACA;WACE;WACA;WACA;SACF;OACF;KACF;KACA;OACE;SACE;WACE;WACA;WACA;aACE;eACE;aACF;aACA;WACF;SACF;KACJ;KACA;OACE;SACE;OACF;KACF;GACF;CACF;AACD;;EAEE;IACE;;IAEA;MACE;QACE;MACF;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;;MAEJ;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;UACF;;UAEA;UACA;UACA;;UAEA;YACE;UACF;;UAEA;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;;YAEA;UACF;;UAEA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;;YAEA;YACA;YACA;;YAEA;UACF;;UAEA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;UACE;YACE;UACF;YACE;UACF;;UAEA;UACA;UACA;UACA;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;UACE;UACA;QACF;MACF;IACF;;;EAGF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;MACE;MACA;QACE;MACF;MACA;IACF;;;EAGF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;MACE;IACF;;;IAGA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;IACC;MACE;QACE;QACA;QACA;UACE;UACA;YACE;cACE;iBACG;gBACD;cACF;cACA;gBACE;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;gBACA;cACF;YACF;UACF;QACF;MACF;MACA;QACE;QACA;MACF;IACF;IACA;MACE;MACA;MACA;IACF;GACD;GACA;KACE;OACE;OACA;OACA;OACA;OACA;OACA;OACA;KACF;GACF;CACF;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;AACA;EACE;MACI;MACA;MACA;MACA;;EAEJ;EACA;EACA;EACA;;EAEA;IACE;;IAEA;;IAEA;MACE;;MAEA;QACE;YACI;YACA;YACA;MACN;;MAEA;QACE;QACA;QACA;MACF;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;IACA;MACE;MACA;QACE;QACA;UACE;YACE;YACA;cACE;gBACE;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;gBACE;cACF;YACF;YACA;UACF;MACJ;MACA;IACF;MACE;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;YACU;YACA;IACR;aACS;;IAET;MACE;QACE;QACA;;QAEA;UACE;UACA;QACF;MACF;QACE;MACF;;MAEA;IACF;;IAEA;MACE;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;QACF;;QAEA;QACA;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;YACI;YACA;YACA;YACA;YACA;;QAEJ;UACE;UACA;QACF;UACE;UACA;QACF;;QAEA;;QAEA;QACA;UACE;QACF;UACE;UACA;YACE;UACF;QACF;;QAEA;;QAEA;QACA;YACI;UACF;QACF;;QAEA;UACE;YACE;UACF;YACE;UACF;QACF;;QAEA;QACA;QACA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;gBACS;OACT;OACA;OACA;MACD;QACE;YACI;YACA;;QAEJ;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;MACF;IACF;;;IAGA;MACE;QACE;MACF;QACE;QACA;MACF;IACF;;;IAGA;QACI;QACA;YACI;YACA;cACE;QACN;QACA;;IAEJ;MACE;;MAEA;QACE;MACF;QACE;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;;IAEA;wBACoB;MAClB;QACE;QACA;QACA;MACF;MACA;MACA;MACA;QACE;UACE;QACF;MACF;MACA;cACQ;2BACa;MACrB;MACA;MACA;MACA;MACA;QACE;QACA;UACE;QACF;QACA;UACE;YACE;UACF;QACF;QACA;QACA;QACA;;QAEA;QACA;QACA;UACE;UACA;;QAEF;UACE;YACE;UACF;QACF;;QAEA;;QAEA;QACA;QACA;MACF;IACF;;IAEA;MACE;MACA;MACA;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;4BACwB;MACtB;UACI;;MAEJ;QACE;;QAEA;QACA;wCACgC;;QAEhC;YACI;sCAC0B;YAC1B;;QAEJ;UACE;QACF;;QAEA;sBACc;sBACA;YACV;YACA;iBACK;kBACC;qBACG;;QAEb;UACE;UACA;UACA;QACF;;QAEA;QACA;MACF;;MAEA;MACA;;MAEA;QACE;QACA;;;QAGA;UACE;UACA;UACA;UACA;;UAEA;UACA;YACE;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;UACA;UACA;;UAEA;YACE;cACE;cACA;YACF;cACE;YACF;;YAEA;cACE;kBACI;kBACA;;YAEN;cACE;;YAEF;cACE;;YAEF;cACE;YACF;;YAEA;;UAEF;YACE;UACF;QACF;MACF;IACF;;IAEA;;MAEE;QACE;;QAEA;UACE;UACA;UACA;QACF;;QAEA;QACA;UACE;QACF;QACA;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;UACA;cACI;;UAEJ;UACA;mBACS;YACP;YACA;;YAEA;YACA;cACE;cACA;;cAEA;cACA;cACA;gBACE;cACF;;cAEA;cACA;gBACE;kBACE;kBACA;kBACA;gBACF;cACF;;cAEA;cACA;cACA;kBACI;kBACA;oBACE;kBACF;cACJ;cACA;cACA;4BACc;YAChB;UACF;;UAEA;UACA;UACA;YACE;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;UACA;QACF;UACE;UACA;QACF;UACE;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;UACF;YACE;YACA;YACA;UACF;UACA;MACJ;;MAEA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;UACE;YACE;sBACU;sBACA;UACZ;UACA;YACE;YACA;UACF;UACA;UACA;QACF;MACF;QACE;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;mCAC+B;mCACA;MAC7B;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;MACA;QACE;QACA;QACA;;QAEA;QACA;UACE;QACF;QACA;;QAEA;UACE;QACF;;QAEA;;UAEE;UACA;UACA;YACE;cACE;cACA;cACA;gCACkB;cAClB;YACF;cACE;cACA;cACA;gCACkB;YACpB;UACF;;UAEA;QACF;;QAEA;;QAEA;UACE;UACA;UACA;cACI;UACJ;QACF;;QAEA;UACE;;UAEA;UACA;UACA;UACA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;gBACI;8CAC8B;YAClC;YACA;;YAEA;wCAC4B;0CACE;0CACA;0CACA;0CACA;0CACA;0CACA;0CACA;0CACA;wCACF;UAC9B;YACE;YACA;YACA;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;cACI;cACA;;UAEJ;;UAEA;YACE;YACA;cACE;YACF;cACE;YACF;YACA;;YAEA;cACE;kBACI;kBACA;YACN;;YAEA;;YAEA;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;;YAEA;cACE;YACF;YACA;YACA;;YAEA;UACF;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;YACE;UACF;;UAEA;cACI;gBACE;gBACA;gBACA;gBACA;cACF;UACJ;QACF;UACE;YACE;YACA;cACE;YACF;cACE;YACF;UACF;YACE;UACF;QACF;;QAEA;UACE;UACA;QACF;;MAEF;;MAEA;MACA;MACA;MACA;MACA;;MAEA;;MAEA;MACA;;MAEA;;MAEA;QACE;UACE;UACA;UACA;UACA;YACE;UACF;UACA;QACF;QACA;UACE;UACA;UACA;UACA;YACE;UACF;UACA;QACF;MACF;;;MAGA;QACE;QACA;UACE;YACE;YACA;cACE;YACF;YACA;UACF;UACA;;UAEA;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;gBACI;gBACA;UACN;UACA;QACF;UACE;UACA;YACE;UACF;QACF;QACA;MACF;;;MAGA;QACE;YACI;;QAEJ;UACE;UACA;QACF;UACE;UACA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;UACE;UACA;UACA;UACA;YACE;cACE;cACA;cACA;cACA;YACF;;YAEA;YACA;cACE;YACF;;YAEA;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;cACE;YACF;;YAEA;UACF;QACF;;QAEA;UACE;;UAEA;cACI;UACJ;;UAEA;UACA;UACA;cACI;YACF;UACF;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;;cAEE;gBACE;kBACE;gBACF;gBACA;gBACA;kBACE;kBACA;kBACA;gBACF;gBACA;;cAEF;gBACE;kBACE;gBACF;gBACA;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;kBACE;kBACA;kBACA;sBACI;sBACA;gBACN;gBACA;gBACA;kBACE;oBACE;oBACA;sBACE;sBACA;oBACF;sBACE;sBACA;oBACF;kBACF;kBACA;gBACF;gBACA;gBACA;gBACA;gBACA;;cAEF;gBACE;gBACA;kBACE;gBACF;gBACA;YACJ;UACF;QACF;QACA;UACE;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;cACI;cACA;cACA;cACA;cACA;UACJ;QACF;;QAEA;QACA;QACA;QACA;QACA;UACE;QACF;QACA;;QAEA;QACA;UACE;UACA;cACI;cACA;cACA;cACA;cACA;UACJ;QACF;;QAEA;QACA;QACA;UACE;;UAEA;UACA;YACE;YACA;YACA;UACF;;UAEA;YACE;UACF;UACA;YACE;UACF;UACA;QACF;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;0BACsB;MACpB;MACA;MACA;QACE;YACI;UACF;YACE;YACA;iBACK;cACH;gBACE;cACF;cACA;cACA;YACF;UACF;QACF;MACF;MACA;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;UACF;UACA;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;UACE;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;QACE;UACE;UACA;QACF;UACE;UACA;UACA;UACA;UACA;QACF;UACE;UACA;QACF;MACF;IACF;;;IAGA;QACI;MACF;UACI;UACA;UACA;UACA;UACA;UACA;YACE;UACF;UACA;cACI;cACA;UACJ;;MAEJ;;MAEA;QACE;UACE;;UAEA;;UAEA;YACE;cACE;YACF;cACE;YACF;YACA;;YAEA;cACE;kBACI;kBACA;YACN;;YAEA;YACA;YACA;;YAEA;cACE;YACF;YACA;YACA;UACF;YACE;YACA;UACF;;UAEA;;UAEA;cACI;cACA;UACJ;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;cACE;;cAEA;kBACI;gBACF;gBACA;cACF;cACA;;cAEA;cACA;YACF;YACA;cACE;YACF;cACE;YACF;YACA;cACE;UACJ;UACA;QACF;;MAEF;QACE;QACA;UACE;UACA;UACA;UACA;QACF;UACE;YACE;UACF;UACA;QACF;MACF;IACF;;;IAGA;KACC;KACA;IACD;MACE;MACA;MACA;MACA;IACF;;;IAGA;MACE;QACE;YACI;MACN;IACF;;;IAGA;MACE;MACA;QACE;UACE;UACA;YACE;gBACI;;YAEJ;YACA;YACA;;YAEA;cACE;cACA;cACA;cACA;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;;;IAGA;MACE;MACA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;MACF;IACF;;;IAGA;MACE;QACE;MACF;MACA;MACA;MACA;UACI;UACA;4BACkB;QACpB;MACF;IACF;;;IAGA;MACE;;MAEA;MACA;;;MAGA;QACE;YACI;YACA;MACN;;MAEA;QACE;QACA;YACI;cACE;gBACE;;gBAEA;kBACE;sBACI;0BACI;gBACV;;gBAEA;gBACA;gBACA;oBACI;;gBAEJ;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;;gBAEA;gBACA;kBACE;oBACE;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;sBACE;oBACF;sBACE;oBACF;kBACF;cACJ;YACF;UACF;MACJ;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;YACE;YACA;qBACS;iBACJ;cACH;gBACE;cACF;gBACE;cACF;YACF;YACA;;YAEA;YACA;YACA;YACA;cACE;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;MACF;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;QACA;MACF;;MAEA;MACA;IACF;;;IAGA;MACE;IACF;;;IAGA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;AAID;CACC;CACA;;AAED;EACE;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;MACI;MACA;;EAEJ;EACA;IACE;IACA;MACE;IACF;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;;;EAGJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;EACF;;;EAGA;;IAEE;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACE;MACF;;MAEA;QACE;QACA;QACA;QACA;YACI;YACA;gBACI;;QAER;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;QACF;UACE;UACA;QACF;MACF;;MAEA;;MAEA;QACE;MACF;;MAEA;IACF;;IAEA;MACE;QACE;UACE;UACA;MACJ;;MAEA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;WACA;SACF;KACJ;GACF;CACF;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;EAEA;IACE;IACA;IACA;;IAEA;MACE;IACF;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;;IAEA;MACE;IACF;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;;EAEF;IACE;EACF;;EAEA;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;QACE;QACA;QACA;UACE;MACJ;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;IACA;EACF;;EAEA;EACA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;EACD;;EAEA;MACI;;IAEF;;IAEA;KACC;KACA;KACA;KACA;IACD;;IAEA;MACE;UACI;IACN;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;AACL;AACA;EACE;IACE;MACE;MACA;IACF;IACA;IACA;IACA;IACA;MACE;oBACc;MACd;IACF;IACA;MACE;QACE;MACF;IACF;IACA;EACF;AACF;AACA;EACE;IACE;MACE;QACE;QACA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;YACA;cACE;cACA;UACJ;QACF;;QAEA;UACE;UACA;QACF;MACF;AACN;AACA;EACE;AACF;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;IACA;IACA;EACF;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;EAEE;MACI;IACF;IACA;IACA;IACA;EACF;AACF;AACA;KACK;IACD;MACE;QACE;QACA;QACA;MACF;MACA;;MAEA;MACA;MACA;;MAEA;QACE;QACA;;QAEA;QACA;UACE;YACE;gBACI;YACJ;UACF;QACF;;QAEA;UACE;QACF;;QAEA;QACA;MACF;;MAEA;MACA;;MAEA;MACA;QACE;UACE;QACF;QACA;UACE;QACF;MACF;;MAEA;QACE;QACA;;QAEA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;;MAEA;;MAEA;QACE;QACA;UACE;QACF;QACA;UACE;UACA;MACJ;;MAEA;QACE;YACI;YACA;;QAEJ;;QAEA;QACA;QACA;UACE;;UAEA;YACE;cACE;YACF;UACF;;UAEA;QACF;;QAEA;QACA;QACA;;QAEA;UACE;;UAEA;YACE;cACE;cACA;gBACE;cACF;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;KAEA;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;;QAEI;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;IACL;;;IAGA;;;IAGA;MACE;QACE;UACE;YACE;YACA;UACF;QACF;MACF;IACF;;;IAGA;MACE;QACE;UACE;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;MACA;;;MAGA;UACI;QACF;cACM;cACA;MACR;;MAEA;QACE;QACA;UACE;YACE;YACA;YACA;UACF;YACE;YACA;cACE;YACF;cACE;YACF;UACF;QACF;UACE;UACA;QACF;MACF;;;MAGA;MACA;MACA;QACE;YACI;YACA;QACJ;UACE;QACF;;QAEA;YACI;MACN;;MAEA;;;MAGA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;UACE;YACE;UACF;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;UACE;UACA;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;MACF;;;MAGA;QACE;QACA;MACF;IACF;;;IAGA;MACE;MACA;MACA;QACE;QACA;;QAEA;UACE;YACE;cACE;YACF;cACE;YACF;UACF;UACA;qBACW;QACb;MACF;MACA;QACE;MACF;MACA;IACF;EACF;AACF;;AAEA;IACI;IACA;IACA;IACA;MACE;MACA;IACF;MACE;IACF;;IAEA;AACJ;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;EACE;;EAEA;EACA;IACE;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;MACF;;MAEA;UACI;QACF;QACA;MACF;IACF;;MAEE;;MAEA;MACA;QACE;YACI;QACJ;MACF;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;cACI;cACA;;UAEJ;YACE;;YAEA;YACA;YACA;UACF;;UAEA;UACA;UACA;YACE;UACF;;UAEA;cACI;cACA;cACA;cACA;QACN;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;QACF;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;UACF;QACF;MACF;;MAEA;IACF;;IAEA;MACE;IACF;MACE;IACF;;;IAGA;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;MACA;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;QACE;UACE;QACF;QACA;QACA;MACF;;MAEA;QACE;MACF;IACF;;IAEA;IACA;IACA;IACA;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;AACA;EACE;;EAEA;IACE;IACA;EACF;;;EAGA;MACI;EACJ;AACF;AACA;IACI;AACJ;AACA;AACA;EACE;IACE;EACF;AACF;AACA;CACC;AACD;EACE;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;;EAGA;IACE;QACI;QACA;QACA;;IAEJ;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;aACK;UACH;YACE;UACF;UACA;UACA;UACA;UACA;UACA;UACA;QACF;UACE;UACA;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;UACI;cACI;cACA;cACA;MACR;;MAEA;QACE;UACE;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;YACE;YACA;QACJ;;QAEA;UACE;YACE;UACF;UACA;YACE;cACE;YACF;YACA;cACE;cACA;YACF;YACA;cACE;YACF;UACF;;UAEA;QACF;;QAEA;YACI;YACA;YACA;;YAEA;cACE;gBACE;cACF;;cAEA;YACF;cACE;kBACI;cACJ;YACF;;UAEF;UACA;UACA;UACA;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;QACF;MACF;;MAEA;QACE;UACE;MACJ;;MAEA;QACE;UACE;QACF;UACE;YACE;UACF;QACF;MACF;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;EACF;AACF;;AAEA;EACE;OACK;IACH;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;;MAEA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;QACF;;QAEA;;MAEF;;MAEA;;MAEA;IACF;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;QACA;MACF;MACA;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;;MAEA;QACE;QACA;QACA;UACE;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;QACF;QACA;MACF;;MAEA;QACE;YACI;YACA;QACJ;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;IACF;EACF;AACF;;AAEA;IACI;AACJ;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;;EAEJ;IACE;EACF;;EAEA;AACF;;AAEA;EACE;;EAEA;EACA;EACA;AACF;;;AAGA;EACE;EACA;IACE;EACF;EACA;EACA;MACI;EACJ;EACA;;EAEA;EACA;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;;AAGA;EACE;EACA;AACF;;;AAGA;EACE;AACF;;AAEA;AACA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;;;EAGA;GACC;GACA;GACA;GACA;EACD;IACE;IACA;MACE;UACI;IACN;;IAEA;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;QACI;;IAEJ;IACA;EACF;;EAEA;IACE;MACE;MACA;MACA;MACA;IACF;IACA;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;IACF;MACE;IACF;MACE;IACF;IACA;MACE;IACF;IACA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;;EAGA;GACC;GACA;GACA;GACA;EACD;IACE;IACA;QACI;QACA;UACE;UACA;;IAEN;MACE;UACI;IACN;IACA;;IAEA;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;;MAEA;;MAEA;MACA;QACE;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;QACI;;IAEJ;IACA;EACF;;EAEA;IACE;MACE;MACA;IACF;IACA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;;EAEA;;EAEA;IACE;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;;IAEA;MACE;IACF;MACE;IACF;MACE;IACF;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;QACI;;IAEJ;IACA;IACA;EACF;;AAEF;;;AAGA;EACE;EACA;;EAEA;GACC;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;;IAEF;IACA;IACA;IACA;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;QACE;MACF;QACE;UACE;UACA;QACF;UACE;UACA;YACE;UACF;;UAEA;QACF;UACE;cACI;QACN;QACA;MACF;QACE;UACE;QACF;UACE;QACF;IACJ;;IAEA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;AACF;;AAEA;EACE;IACE;EACF;AACF;;;AAGA;EACE;IACE;MACE;;IAEF;IACA;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;QACE;QACA;MACF;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;UACI;UACA;MACJ;UACI;UACA;MACJ;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;MACI;IACF;QACI;QACA;QACA;QACA;;IAEJ;MACE;QACE;UACE;MACJ;MACA;MACA;IACF;MACE;MACA;IACF;IACA;IACA;;IAEA;;IAEA;MACE;MACA;;MAEA;;MAEA;;MAEA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;;MAEA;QACE;QACA;QACA;MACF;;MAEA;MACA;;MAEA;QACE;UACE;UACA;UACA;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;;IAGA;IACA;MACE;IACF;;IAEA;IACA;MACE;QACE;UACE;;UAEA;UACA;oCAC0B;YACxB;YACA;UACF;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;IACA;IACA;MACE;MACA;;MAEA;QACE;QACA;UACE;cACI;YACF;UACF;YACE;YACA;UACF;QACF;MACF;MACA;;MAEA;IACF;;IAEA;;IAEA;MACE;IACF;AACJ;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;WACA;SACF;KACJ;KACA;OACE;SACE;SACA;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;MACE;IACF;EACF;;EAEA;IACE;MACE;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;YACE;UACF;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;cACI;cACA;QACN;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;QACE;MACF;;MAEA;QACE;UACE;UACA;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;EACE;MACI;MACA;IACF;QACI;QACA;EACN;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;EACF;EACA;AACF;;AAEA;AACA;AACA;;AAEA;EACE;IACE;MACE;QACE;QACA;IACJ;MACE;QACE;QACA;IACJ;EACF;AACF;;AAEA;AACA;AACA;EACE;EACA;EACA;EACA;AACF;EACE;EACA;AACF;;AAEA;AACA;IACI;IACA;MACE;MACA;QACE;UACE;QACF;QACA;MACF;MACA;IACF;UACM;UACA;QACF;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;AACJ;AACA;AACA;;;AAGA;;;AAGA;CACC;CACA;AACD;EACE;AACF;;AAEA;EACE;;EAEA;IACE;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;QACE;MACF;QACE;UACE;UACA;QACF;QACA;MACF;QACE;MACF;QACE;QACA;QACA;QACA;QACA;QACA;UACE;UACA;QACF;UACE;UACA;QACF;UACE;YACE;YACA;YACA;UACF;UACA;QACF;UACE;QACF;MACF;IACF;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;YACQ;EACV;;EAEA;IACE;YACQ;YACA;EACV;;EAEA;IACE;EACF;;EAEA;IACE;IACA;YACQ;YACA;IACR;QACI;EACN;;EAEA;IACE;IACA;IACA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;YACI;YACA;UACF;QACF;YACI;YACA;UACF;QACF;UACE;QACF;MACF;MACA;IACF;IACA;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;;IAEA;;IAEA;MACE;MACA;QACE;QACA;MACF;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;MACA;QACE;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;UACA;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;QACE;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;MACE;MACA;MACA;QACE;UACE;UACA;YACE;UACF;UACA;QACF;UACE;UACA;QACF;QACA;MACF;QACE;MACF;QACE;QACA;UACE;UACA;UACA;UACA;UACA;QACF;QACA;MACF;QACE;MACF;MACA;IACF;IACA;EACF;AACF;;;AAGA;EACE;AACF;;AAEA;CACC;CACA;AACD;EACE;EACA;EACA;AACF;;AAEA;EACE;AACF;EACE;EACA;AACF;;AAEA;EACE;;EAEA;IACE;IACA;;IAEA;;IAEA;MACE;IACF;;IAEA;IACA;;IAEA;EACF;;EAEA;IACE;IACA;MACE;MACA;IACF;MACE;IACF;MACE;IACF;MACE;MACA;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;IACA;MACE;QACE;QACA;MACF;QACE;QACA;MACF;QACE;QACA;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;IACE;QACI;UACE;EACR;;EAEA;IACE;MACE;IACF;EACF;;EAEA;IACE;MACE;MACA;MACA;UACI;QACF;MACF;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;QACA;QACA;YACI;YACA;gBACI;gBACA;kBACE;gBACF;gBACA;cACF;MACR;IACF;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;;IAEA;MACE;MACA;MACA;QACE;MACF;IACF;;IAEA;;IAEA;MACE;MACA;QACE;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;MAEA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;IACA;IACA;MACE;QACE;YACI;MACN;MACA;MACA;QACE;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;MACE;MACA;QACE;;QAEA;UACE;QACF;UACE;QACF;;MAEF;QACE;MACF;IACF;;IAEA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;IACA;;IAEA;MACE;IACF;MACE;QACE;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;;IAEA;IACA;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;IACF;IACA;;IAEA;IACA;IACA;;IAEA;MACE;MACA;;MAEA;QACE;QACA;UACE;QACF;MACF;;MAEA;MACA;;MAEA;MACA;YACM;YACA;;MAEN;IACF;EACF;;EAEA;EACA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;QACA;QACA;MACF;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;MACA;IACF;MACE;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;QACA;QACA;QACA;QACA;QACA;MACF;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;MACA;IACF;MACE;MACA;MACA;IACF;EACF;AACF;;;AAGA;AACA;AACA;;AAEA;EACE;;EAEA;EACA;IACE;IACA;IACA;MACE;MACA;IACF;IACA;EACF;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;;IAEA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;EACF;AACF;;AAEA;EACE;;EAEA;;EAEA;MACI;;EAEJ;EACA;IACE;MACE;IACF;MACE;QACE;QACA;UACE;gCACsB;;UAEtB;UACA;QACF;QACA;MACF;IACF;EACF;IACE;IACA;MACE;MACA;cACQ;sBACQ;sBACA;sBACA;sBACA;IAClB;IACA;;IAEA;IACA;IACA;IACA;;IAEA;EACF;;EAEA;EACA;IACE;EACF;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;;;EAGA;IACE;;IAEA;MACE;;MAEA;QACE;UACE;QACF;QACA;QACA;QACA;MACF;;MAEA;IACF;;IAEA;MACE;;MAEA;QACE;UACE;;UAEA;;UAEA;YACE;cACE;cACA;YACF;;YAEA;YACA;YACA;;YAEA;cACE;YACF;cACE;cACA;cACA;cACA;gBACE;YACJ;cACE;YACF;;YAEA;UACF;UACA;;QAEF;UACE;;QAEF;UACE;MACJ;IACF;;IAEA;MACE;QACE;QACA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;MAEA;IACF;;IAEA;;MAEE;QACE;MACF;;MAEA;;QAEE;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;MACF;;MAEA;MACA;IACF;;IAEA;MACE;oBACc;;MAEd;;MAEA;QACE;QACA;QACA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;;MAEA;MACA;QACE;MACF;;MAEA;QACE;;QAEA;UACE;UACA;YACE;UACF;QACF;;QAEA;UACE;QACF;;QAEA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;QACA;UACE;YACE;cACE;YACF;UACF;QACF;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;QACA;UACE;YACE;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;UACI;QACF;MACF;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;IACE;MACE;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;IACE;IACA;MACE;QACE;QACA;QACA;MACF;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;IACE;EACF;;EAEA;IACE;MACE;;MAEA;MACA;MACA;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;EACA;IACE;MACE;IACF;EACF;;EAEA;IACE;;IAEA;IACA;IACA;IACA;MACE;MACA;MACA;QACE;UACE;QACF;UACE;QACF;UACE;QACF;MACF;QACE;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;IACE;MACE;MACA;QACE;UACE;UACA;UACA;MACJ;MACA;QACE;MACF;;IAEF;;IAEA;MACE;;MAEA;MACA;QACE;QACA;UACE;UACA;QACF;UACE;UACA;UACA;QACF;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;;MAEA;QACE;UACE;UACA;YACE;YACA;YACA;cACE;YACF;cACE;YACF;UACF;QACF;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;IACA;MACE;QACE;MACF;QACE;MACF;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;;EAGD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;QACI;QACA;;IAEJ;MACE;MACA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;IACE;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;EACF;;EAEA;EACA;EACA;EACA;;EAEA;AACF;;AAEA;EACE;IACE;gCAC4B;gCACA;;IAE5B;+BAC2B;+BACA;+BACA;;IAE3B;IACA;MACE;UACI;UACA;YACE;UACF;QACF;MACF;UACI;UACA;YACE;UACF;QACF;;IAEJ;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;MACI;;IAEF;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;SACI;SACA;;SAEA;SACA;SACA;;SAEA;SACA;SACA;KACJ;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;qBACe;qBACA;MACf;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;;KAEA;MACC;MACA;MACA;MACA;MACA;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;;IAEH;MACE;MACA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;UACE;UACA;UACA;YACE;cACE;kBACI;cACJ;cACA;cACA;cACA;YACF;YACA;UACF;UACA;QACF;QACA;QACA;QACA;QACA;UACE;UACA;QACF;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;WACA;;WAEA;WACA;aACE;WACF;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;;;WAIA;WACA;WACA;WACA;WACA;aACE;aACA;aACA;aACA;eACE;iBACE;iBACA;eACF;aACF;WACF;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;WACA;;OAEJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;QACF;QACA;YACI;YACA;cACE;cACA;cACA;cACA;cACA;YACF;;QAEJ;;QAEA;UACE;QACF;;QAEA;UACE;QACF;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;YACE;UACF;QACF;;QAEA;UACE;UACA;YACE;YACA;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;YACA;cACE;cACA;YACF;UACF;UACA;QACF;;QAEA;UACE;;UAEA;YACE;YACA;UACF;YACE;UACF;QACF;;QAEA;UACE;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;UACG;UACA;;UAEA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;OACH;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;UACF;YACE;cACE;cACA;cACA;cACA;YACF;;YAEA;;YAEA;cACE;cACA;cACA;YACF;YACA;YACA;cACE;cACA;;cAEA;cACA;gBACE;gBACA;cACF;YACF;UACF;YACE;cACE;cACA;cACA;cACA;YACF;YACA;YACA;YACA;cACE;gBACE;gBACA;gBACA;;gBAEA;kBACE;kBACA;oBACE;oBACA;kBACF;gBACF;kBACE;kBACA;kBACA;gBACF;cACF;YACF;YACA;cACE;cACA;cACA;gBACE;kBACE;kBACA;gBACF;cACF;YACF;UACF;UACA;QACF;;QAEA;UACE;YACE;YACA;UACF;YACE;UACF;;UAEA;UACA;YACE;cACE;cACA;YACF;cACE;cACA;gBACE;cACF;YACF;cACE;cACA;gBACE;kBACE;gBACF;cACF;YACF;UACF;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;;WAEA;WACA;aACE;WACF;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;OACJ;OACA;OACA;MACD;QACE;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;QAEJ;QACA;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;cACE;YACF;YACA;UACF;;UAEA;UACA;YACE;cACE;cACA;cACA;gBACE;kBACE;kBACA;kBACA;kBACA;oBACE;wBACI;4BACI;4BACA;+BACG;sBACT;sBACA;sBACA;sBACA;sBACA;wBACE;wBACA;wBACA;4BACI;4BACA;wBACJ;wBACA;sBACF;oBACF;sBACE;sBACA;sBACA;sBACA;oBACF;kBACF;gBACF;kBACE;gBACF;cACF;YACF;;YAEA;YACA;YACA;YACA;gBACI;cACF;gBACE;cACF;YACF;UACF;;UAEA;;UAEA;YACE;YACA;gBACI;gBACA;gBACA;UACN;;QAEF;;QAEA;;QAEA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;MAED;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;QACA;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;;;QAGA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;YACI;;QAEJ;QACA;QACA;;QAEA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;;WAEA;WACA;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;UACE;YACE;cACE;YACF;UACF;QACF;;QAEA;MACF;;MAEA;QACE;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;aACE;eACE;aACF;eACE;aACF;eACE;aACF;WACF;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;QACF;UACE;QACF;UACE;UACA;YACE;UACF;YACE;YACA;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;QACF;QACA;;QAEA;QACA;UACE;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;YACI;YACA;YACA;YACA;cACE;cACA;cACA;cACA;gBACE;cACF;cACA;YACF;YACA;YACA;;QAEJ;UACE;UACA;UACA;;YAEE;YACA;cACE;cACA;cACA;cACA;YACF;YACA;cACE;cACA;YACF;cACE;YACF;UACF;UACA;UACA;YACE;YACA;UACF;UACA;UACA;QACF;;QAEA;;QAEA;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;YACI;YACA;YACA;cACE;cACA;cACA;gBACE;cACF;cACA;YACF;;QAEJ;;QAEA;YACI;;QAEJ;QACA;UACE;UACA;UACA;YACE;YACA;cACE;cACA;cACA;cACA;YACF;;YAEA;cACE;YACF;cACE;YACF;UACF;;UAEA;UACA;UACA;UACA;UACA;cACI;YACF;cACE;YACF;UACF;QACF;;QAEA;QACA;MACF;IACF;;IAEA;;IAEA;;;IAGA;MACE;QACE;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;;IAGA;MACE;QACE;;QAEA;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;IACD;;IAEA;MACE;MACA;QACE;UACE;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;AACD;EACE;IACE;;EAEF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;MACA;MACA;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;EACF;AACF;;AAEA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;AACA;AACA;AACA;EACE;WACS;AACX;;;AAGA;EACE;IACE;EACF;IACE;IACA;IACA;IACA;IACA;MACE;UACI;IACN;IACA;kBACc;kBACA;IACd;EACF;IACE;IACA;IACA;IACA;EACF;IACE;QACI;EACN;AACF;;;AAGA;EACE;EACA;IACE;MACE;IACF;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;;EAEA;EACA;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;IACF;IACA;EACF;;EAEA;;IAEE;MACE;IACF;;IAEA;MACE;IACF;;;IAGA;MACE;QACE;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;QACE;QACA;UACE;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;QACI;;IAEJ;IACA;IACA;IACA;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;YACI;YACA;MACN;MACA;QACE;MACF;MACA;MACA;MACA;QACE;YACI;YACA;MACN;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;MACA;MACA;QACE;UACE;QACF;UACE;cACI;cACA;QACN;MACF;QACE;MACF;MACA;IACF;;IAEA;aACS;aACA;EACX;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;gBACc;IACZ;IACA;IACA;MACE;QACE;QACA;QACA;IACJ;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;IACA;;IAEA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;IACA;QACI;QACA;;IAEJ;MACE;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;QACI;UACE;QACF;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;MACE;QACE;UACE;UACA;UACA;QACF;MACF;;MAEA;QACE;MACF;;MAEA;MACA;;MAEA;QACE;QACA;MACF;IACF;;;IAGA;MACE;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;kBACY;kBACA;MACZ;QACE;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;MACF;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;MACA;;MAEA;QACE;UACE;UACA;YACE;UACF;;UAEA;UACA;UACA;QACF;;MAEF;QACE;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;;IAEA;EACF;AACF;;AAEA;EACE;OACK;;IAEH;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;UACE;YACE;cACE;cACA;gBACE;cACF;YACF;cACE;gBACE;cACF;YACF;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;QACA;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;EACF;AACF;;AAEA;EACE;OACK;IACH;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;QACF;UACE;UACA;QACF;QACA;UACE;QACF;;QAEA;MACF;;MAEA;MACA;;MAEA;IACF;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;EACF;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;IACA;IACA;EACF;;EAEA;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;UACQ;AACV;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;eACE;aACF;WACF;OACJ;OACA;SACE;SACA;OACF;KACF;KACA;MACC;OACC;OACA;OACA;MACD;KACD;GACF;CACF;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;QACC;QACA;OACD;KACF;;KAEA;MACC;MACA;QACE;QACA;MACF;KACD;GACF;EACD;AACF;AACA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;MACF;MACA;IACF;MACE;IACF;EACF;EACA;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;gCACyB;gCACA;gCACA;gCACA;gCACA;;OAEzB;OACA;SACE;SACA;WACE;WACA;SACF;OACF;OACA;OACA;OACA;OACA;OACA;OACA;SACE;SACA;WACE;WACA;SACF;OACF;KACF;KACA;OACE;SACE;WACE;aACE;WACF;SACF;OACF;;OAEA;SACE;SACA;SACA;SACA;;SAEA;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;OACF;OACA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;;IAEA;QACI;;IAEJ;MACE;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;QACE;UACE;YACE;cACE;kBACI;gBACF;cACF;YACF;YACA;UACF;UACA;UACA;QACF;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;QACE;QACA;QACA;UACE;QACF;UACE;YACE;cACE;YACF;cACE;gBACE;kBACE;gBACF;cACF;cACA;UACJ;UACA;QACF;UACE;YACE;cACE;YACF;UACF;UACA;QACF;UACE;MACJ;IACF;IACA;MACE;MACA;MACA;QACE;QACA;QACA;MACF;QACE;QACA;UACE;YACE;YACA;cACE;YACF;UACF;QACF;QACA;MACF;QACE;QACA;MACF;QACE;IACJ;IACA;IACA;MACE;MACA;QACE;MACF;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;SACA;OACF;KACF;KACA;OACE;SACE;SACA;OACF;OACA;SACE;WACE;WACA;WACA;SACF;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;AACA;EACE;EACA;IACE;;IAEA;IACA;QACI;QACA;YACI;EACV;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;OACF;KACF;KACA;OACE;SACE;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;SACA;MACH;KACD;GACF;CACF;;;AAGD;AACA;EACE;EACA;;IAEE;IACA;QACI;QACA;uBACe;EACrB;AACF;;AAEA;AACA;EACE;;EAEA;EACA;EACA;MACI;MACA;;EAEJ;EACA;IACE;IACA;MACE;MACA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;MACE;IACF;;IAEA;IACA;IACA;IACA;;IAEA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;QACI;QACA;;IAEJ;MACE;MACA;QACE;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;EACF;;IAEE;MACE;IACF;EACF;;EAEA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;IACE;IACA;EACF;EACA;EACA;EACA;IACE;EACF;AACF;;;AAGA;EACE;EACA;IACE;IACA;MACE;IACF;IACA;EACF;AACF;;AAEA;EACE;IACE;IACA;;IAEA;EACF;AACF;;AAEA;EACE;EACA;;EAEA;gBACc;;EAEd;AACF;;AAEA;IACI;IACA;IACA;IACA;IACA;AACJ;;AAEA;IACI;MACE;MACA;AACN;;AAEA;GACG;MACG;SACG;;MAEH;SACG;;MAEH;GACH;AACH;;AAEA;EACE;AACF;;AAEA;EACE;IACE;KACC;EACH;GACC;IACC;KACC;IACD;KACC;IACD;KACC;IACD;KACC;IACD;KACC;IACD;KACC;KACA;KACA;GACF;EACD;GACC;KACE;KACA;IACD;KACC;AACL;;AAEA;IACI;;AAEJ;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;WACI;OACJ;UACG;OACH;UACG;OACH;UACG;KACL;KACA;OACE;SACE;YACG;SACH;YACG;SACH;YACG;SACH;YACG;OACL;KACF;GACF;CACF;AACD;AACA;;;EAGE;qBACmB;EACnB;IACE;IACA;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;IACA;EACF;;;EAGA;IACE;QACI;QACA;;IAEJ;IACA;IACA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;QACE;QACA;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;IACF;IACA;MACE;MACA;iBACW;IACb;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;KACF;KACA;OACE;SACE;OACF;KACF;GACF;CACF;CACA;AACD;EACE;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;aACA;aACA;aACA;aACA;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;KACF;KACA;OACE;OACA;OACA;OACA;OACA;OACA;;OAEA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;;OAEA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;OAEA;SACE;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;AACH;AACA;EACE;IACE;IACA;;IAEA;MACE;IACF;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;IACF;;IAEA;MACE;;IAEF;IACA;MACE;IACF;MACE;;IAEF;MACE;MACA;IACF;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;iBACI;kBACC;kBACA;kBACA;kBACA;aACL;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;WACE;aACE;iBACI;aACJ;aACA;WACF;WACA;aACE;aACA;aACA;WACF;SACF;OACF;KACF;GACF;CACF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;UACE;YACE;cACE;YACF;YACA;UACF;UACA;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;UACA;YACE;YACA;YACA;YACA;YACA;UACF;UACA;YACE;UACF;UACA;QACF;IACJ;AACJ;CACC;AACD;AACA;EACE;IACE;IACA;IACA;IACA;MACE;MACA;QACE;UACE;UACA;QACF;QACA;QACA;UACE;UACA;YACE;UACF;QACF;MACF;MACA;QACE;MACF;IACF;IACA;IACA;IACA;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;IACA;MACE;UACI;UACA;IACN;IACA;MACE;MACA;MACA;QACE;UACE;UACA;QACF;QACA;WACG;WACA;QACH;QACA;QACA;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;;IAEE;;MAEE;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;MACA;MACA;IACF;;IAEA;MACE;QACE;QACA;mBACW;QACX;UACE;UACA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;;UAEA;;UAEA;UACA;;UAEA;YACE;cACE;YACF;UACF;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;;UAEA;;UAEA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;MACF;IACF;CACH;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;UACE;UACA;QACF;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;SACE;SACA;YACG;SACH;OACF;OACA;SACE;WACE;WACA;WACA;SACF;OACF;KACF;CACJ;CACA;CACA;CACA;CACA;;AAED;;;AAGA;AACA;EACE;EACA;;EAEA;EACA;IACE;MACE;MACA;MACA;QACE;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;IACE;MACE;MACA;QACE;QACA;QACA;UACE;UACA;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;EACA;IACE;MACE;MACA;QACE;YACI;;QAEJ;YACI;UACF;UACA;UACA;QACF;;QAEA;UACE;YACE;cACE;YACF;YACA;UACF;;UAEA;;UAEA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;AACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;AACA;;AAEA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;AACA;EACE;MACI;;EAEJ;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;;IAEA;MACE;IACF;EACF;;EAEA;EACA;IACE;;IAEA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;MACE;IACF;IACA;MACE;IACF;;IAEA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;MACA;QACE;MACF;MACA;MACA;QACE;MACF;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;CACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;SACE;WACE;aACE;WACF;OACJ;OACA;QACC;UACE;UACA;UACA;QACF;QACA;UACE;QACF;OACD;OACA;SACE;SACA;SACA;SACA;SACA;SACA;SACA;QACD;MACF;MACA;QACE;UACE;UACA;;UAEA;UACA;QACF;;QAEA;UACE;UACA;UACA;;UAEA;UACA;;UAEA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;AACD;EACE;IACE;MACE;MACA;MACA;MACA;QACE;UACE;YACE;cACE;cACA;cACA;cACA;cACA;cACA;cACA;gBACE;kBACE;kBACA;gBACF;;gBAEA;kBACE;kBACA;cACJ;;cAEA;;cAEA;cACA;cACA;gBACE;kBACE;gBACF;cACF;YACF;;YAEA;gBACI;;YAEJ;cACE;cACA;gBACE;gBACA;gBACA;gBACA;gBACA;cACF;YACF;YACA;cACE;gBACE;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;QACF;MACF;IACF;;IAEA;EACF;AACF;;AAEA;AACA;;AAEA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;aACF;SACJ;SACA;WACE;+BACoB;WACpB;aACE;WACF;aACE;;WAEF;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;;YAEA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;IAEE;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;OACE;UACG;YACE;cACE;YACF;OACL;OACA;UACG;UACA;cACI;UACJ;cACI;UACJ;cACI;WACH;WACA;WACA;WACA;WACA;OACJ;KACF;KACA;QACG;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;KACH;KACA;KACA;EACH;SACO;SACA;;GAEN;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;QACE;UACE;YACE;UACF;MACJ;MACA;QACE;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;MACF;IACF;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;IACA;EACF;MACI;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;MACC;QACE;UACE;QACF;KACH;KACA;QACG;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;KACH;GACF;GACA;MACG;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;GACH;GACA;GACA;EACD;MACI;KACD;;GAEF;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;UACE;QACF;MACF;MACA;QACE;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;MACF;IACF;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;MACC;QACE;UACE;QACF;KACH;KACA;OACE;OACA;UACG;OACH;UACG;OACH;UACG;OACH;OACA;OACA;OACA;OACA;KACF;GACF;GACA;MACG;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;GACH;GACA;GACA;EACD;KACG;KACA;;EAEH;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;SACA;WACE;0BACe;WACf;aACE;WACF;aACE;WACF;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;SACA;WACE;WACA;aACE;WACF;aACE;WACF;WACA;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;;YAEA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;WACE;aACE;aACA;eACE;aACF;eACE;aACF;aACA;aACA;aACA;aACA;aACA;WACF;SACF;QACD;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;iBACE;iBACA;eACF;aACF;SACJ;SACA;WACE;WACA;WACA;WACA;UACD;UACA;QACF;QACA;UACE;YACE;;YAEA;;YAEA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;aACF;SACJ;SACA;WACE;WACA;0BACe;WACf;WACA;UACD;QACF;QACA;UACE;YACE;YACA;;YAEA;YACA;;YAEA;YACA;;YAEA;YACA;UACF;QACF;MACF;GACH;EACD;;EAEA;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;MACA;QACE;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;IACE;EACF;AACF;;AAEA;EACE;EACA;AACF;;AAEA;EACE;EACA;EACA;;EAEA;EACA;EACA;EACA;IACE;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;EACF;;EAEA;IACE;IACA;QACI;;IAEJ;IACA;IACA;IACA;IACA;MACE;MACA;IACF;;IAEA;IACA;IACA;IACA;MACE;IACF;;IAEA;IACA;IACA;IACA;MACE;IACF;EACF;;EAEA;EACA;EACA;IACE;EACF;IACE;;IAEA;MACE;QACE;UACE;UACA;QACF;MACF;IACF;;IAEA;MACE;;MAEA;MACA;MACA;;MAEA;IACF;;IAEA;IACA;MACE;IACF;EACF;;EAEA;EACA;EACA;;EAEA;IACE;EACF;AACF;;AAEA;EACE;IACE;EACF;;EAEA;IACE;IACA;IACA;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;EACF;;EAEA;AACF;;AAEA;EACE;IACE;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;QACE;MACF;MACA;QACE;MACF;MACA;MACA;;MAEA;QACE;QACA;UACE;YACE;YACA;YACA;YACA;YACA;YACA;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;QACA;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;MACE;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;IACE;MACE;MACA;MACA;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;IACE;MACE;QACE;MACF;MACA;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;;EAEA;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;;EAEA;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;IACE;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;EACF;;EAEA;AACF;;AAEA;EACE;EACA;IACE;IACA;MACE;mCAC6B;IAC/B;IACA;EACF;EACA;AACF;;AAEA;EACE;EACA;;EAEA;IACE;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;EACA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;UACG;YACE;cACE;YACF;OACL;OACA;SACE;WACE;WACA;aACE;WACF;aACE;WACF;aACE;WACF;aACE;SACJ;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;OACF;MACD;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;MACF;IACF;CACH;AACD;IACI;EACF;IACE;IACA;IACA;MACE;QACE;4DACoD;MACtD;IACF;EACF;AACF;;AAEA;IACI;IACA;IACA;IACA;IACA;IACA;;AAEJ;CACC;CACA;CACA;CACA;CACA;CACA;OACM;OACA;OACA;OACA;OACA;OACA;;CAEN;CACA;OACM;OACA;CACN;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;QACA;MACF;;MAEA;QACE;MACF;;IAEF;IACA;MACE;QACE;UACE;YACE;YACA;YACA;cACE;;cAEA;cACA;gBACE;cACF;;cAEA;cACA;gBACE;cACF;cACA;;cAEA;cACA;gBACE;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;QACF;IACJ;IACA;MACE;OACC;YACK;YACA;YACA;QACJ;OACD;OACA;MACD;IACF;IACA;IACA;MACE;QACE;QACA;QACA;MACF;MACA;MACA;;MAEA;;MAEA;MACA;MACA;MACA;IACF;IACA;CACH;CACA;CACA;CACA;AACD;IACI;EACF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;EAGA;MACI;MACA;;EAEJ;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;QACI;;MAEF;IACF;MACE;IACF;EACF;;EAEA;IACE;;IAEA;MACE;UACI;IACN;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;MACI;;EAEJ;EACA;IACE;IACA;;EAEF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;;IAEA;IACA;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;YACE;UACF;UACA;YACE;UACF;UACA;QACF;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;QACE;QACA;UACE;YACE;QACJ;QACA;QACA;UACE;QACF;UACE;UACA;QACF;MACF;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;;QAEE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;;IAEA;IACA;IACA;IACA;MACE;IACF;IACA;;IAEA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;IACA;EACF;;EAEA;IACE;QACI;QACA;IACJ;MACE;MACA;QACE;QACA;MACF;IACF;IACA;MACE;MACA;IACF;IACA;IACA;IACA;MACE;MACA;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;QACA;MACF;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;EACF;;EAEA;IACE;QACI;QACA;;IAEJ;MACE;MACA;QACE;MACF;QACE;MACF;QACE;MACF;IACF;;IAEA;IACA;MACE;QACE;MACF;IACF;MACE;IACF;MACE;QACE;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;;IAEA;IACA;IACA;MACE;;MAEA;UACI;;MAEJ;MACA;QACE;MACF;MACA;QACE;QACA;;QAEA;MACF;IACF;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;QACC;UACE;YACE;UACF;OACH;OACA;SACE;WACE;WACA;WACA;SACF;SACA;WACE;WACA;SACF;OACF;OACA;OACA;OACA;SACE;OACF;KACF;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;SACE;WACE;WACA;kBACO;kBACA;SACT;SACA;OACF;KACF;KACA;OACE;SACE;WACE;WACA;aACE;eACE;iBACE;eACF;eACA;aACF;WACF;SACF;KACJ;CACJ;CACA;AACD;EACE;IACE;IACA;IACA;IACA;MACE;QACE;YACI;;QAEJ;;QAEA;QACA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;YACE;UACF;QACF;;QAEA;UACE;;UAEA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;IACE;MACE;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;MACA;;MAEA;QACE;MACF;;MAEA;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;UACE;QACF;;QAEA;UACE;YACE;YACA;QACJ;;QAEA;QACA;MACF;;MAEA;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;QACE;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;IACA;IACA;MACE;MACA;MACA;MACA;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;MACF;;MAEA;MACA;QACE;UACE;QACF;;QAEA;MACF;;MAEA;MACA;QACE;MACF;IACF;EACF;AACF;;;AAGA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;UACG;YACE;cACE;cACA;YACF;OACL;QACC;UACE;YACE;cACE;cACA;qBACO;qBACA;qBACA;qBACA;YACT;UACF;QACF;MACF;MACA;QACE;;QAEA;UACE;QACF;QACA;UACE;UACA;QACF;MACF;IACF;CACH;AACD;EACE;IACE;IACA;IACA;MACE;QACE;UACE;QACF;MACF;QACE;UACE;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;OACM;CACN;CACA;CACA;CACA;CACA;;EAEC;EACA;EACA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;iBACA;;UAEP;UACA;QACF;QACA;MACF;IACF;IACA;MACE;QACE;UACE;;UAEA;YACE;cACE;YACF;UACF;QACF;IACJ;IACA;MACE;MACA;MACA;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;EACA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;UACP;QACF;QACA;MACF;IACF;IACA;MACE;QACE;UACE;QACF;IACJ;EACF;;EAEA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;QACT;QACA;MACF;IACF;IACA;MACE;QACE;UACE;UACA;YACE;cACE;YACF;UACF;QACF;IACJ;EACF;CACD;AACD;EACE;IACE;IACA;MACE;MACA;MACA;MACA;QACE;QACA;QACA;UACE;UACA;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;MACI;MACA;MACA;MACA;MACA;MACA;;EAEJ;EACA;;EAEA;IACE;MACE;IACF;MACE;IACF;IACA;MACE;MACA;IACF;MACE;QACE;QACA;MACF;QACE;QACA;MACF;IACF;IACA;MACE;MACA;MACA;IACF;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;MACE;IACF;MACE;IACF;MACE;IACF;MACE;IACF;IACA;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;MACE;IACF;EACF;;EAEA;IACE;MACE;MACA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;OACF;KACF;KACA;OACE;SACE;;SAEA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;IACA;MACE;MACA;QACE;QACA;UACE;UACA;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;WACF;OACJ;OACA;QACC;QACA;QACA;OACD;KACF;KACA;OACE;SACE;SACA;SACA;;SAEA;;SAEA;SACA;SACA;SACA;;SAEA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;MACE;MACA;QACE;QACA;QACA;UACE;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;GAEE;KACE;OACE;QACC;OACD;KACF;;KAEA;OACE;SACE;WACE;cACG;cACA;SACL;KACJ;;KAEA;OACE;SACE;aACI;OACN;KACF;GACF;CACF;AACD;EACE;IACE;IACA;MACE;MACA;QACE;MACF;MACA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;IACE;MACE;MACA;QACE;;QAEA;;QAEA;UACE;QACF;;;QAGA;UACE;YACE;YACA;YACA;cACE;cACA;gBACE;gBACA;YACJ;UACF;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;UACA;YACE;cACE;cACA;gBACE;cACF;YACF;UACF;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;YACE;UACF;UACA;YACE;UACF;QACF;;QAEA;UACE;YACE;YACA;cACE;YACF;cACE;cACA;YACF;UACF;UACA;QACF;MACF;IACF;;IAEA;MACE;;MAEA;MACA;QACE;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;MACF;QACE;MACF;QACE;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;KACF;KACA;OACE;SACE;OACF;OACA;WACI;OACJ;OACA;WACI;OACJ;KACF;KACA;OACE;;OAEA;;SAEE;SACA;;SAEA;SACA;;SAEA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;;GAEA;;GAEA;;GAEA;KACE;MACC;MACA;MACA;MACA;KACD;KACA;OACE;SACE;SACA;OACF;;OAEA;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;;SAEF;;SAEA;WACE;;SAEF;;SAEA;WACE;OACJ;KACF;GACF;;;GAGA;GACA;GACA;GACA;GACA;GACA;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;UACE;WACC;aACE;WACF;UACD;QACF;KACH;KACA;OACE;SACE;OACF;OACA;SACE;OACF;KACF;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;UACE;WACC;aACE;WACF;UACD;QACF;KACH;KACA;OACE;SACE;OACF;OACA;SACE;OACF;KACF;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;QACA;KACH;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;CACA;AACD;EACE;IACE;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;AACD;EACE;IACE;IACA;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;KACA;KACA;KACA;KACA;GACF;CACF;;AAED;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;QACE;MACF;KACD;KACA;OACE;SACE;SACA;SACA;OACF;KACF;GACF;CACF;AACD;CACC;CACA;CACA;CACA;CACA;AACD;;AAEA;AACA;AACA;AACA;EACE;EACA;AACF;AACA;EACE;EACA;IACE;IACA;MACE;QACE;QACA;UACE;UACA;YACE;cACE;gBACE;cACF;cACA;gBACE;cACF;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;;OAEA;OACA;OACA;OACA;KACF;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;UACE;YACE;YACA;YACA;cACE;gBACE;gBACA;cACF;YACF;UACF;MACJ;MACA;QACE;QACA;QACA;QACA;MACF;KACD;KACA;OACE;SACE;SACA;SACA;SACA;OACF;OACA;SACE;SACA;SACA;SACA;QACD;KACH;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;MACA;QACE;MACF;IACF;IACA;MACE;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;QACE;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;IACA;IACA;IACA;IACA;QACI;QACA;;UAEE;YACE;cACE;gBACE;gBACA;gBACA;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;YACE;cACE;cACA;YACF;YACA;cACE;cACA;YACF;YACA;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;QACF;IACJ;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;KACC;OACE;QACC;OACD;OACA;OACA;OACA;SACE;OACF;KACF;IACD;IACA;MACE;QACE;UACE;YACE;cACE;UACJ;QACF;KACH;IACD;MACE;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;;MAEA;QACE;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;MACA;QACE;MACF;;MAEA;QACE;MACF;MACA;QACE;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;MACF;;MAEA;QACE;UACE;UACA;UACA;QACF;QACA;QACA;QACA;MACF;;MAEA;QACE;UACE;UACA;QACF;QACA;QACA;QACA;MACF;IACF;EACF;CACD;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;kBACkB;EAChB;IACE;IACA;IACA;IACA;IACA;IACA;MACE;UACI;UACA;;MAEJ;QACE;YACI;YACA;YACA;;QAEJ;UACE;YACE;YACA;UACF;UACA;YACE;YACA;UACF;UACA;YACE;cACE;YACF;YACA;YACA;UACF;QACF;;QAEA;UACE;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;YACA;YACA;cACE;cACA;cACA;;cAEA;cACA;cACA;cACA;cACA;cACA;cACA;gBACE;gBACA;cACF;;cAEA;cACA;;cAEA;cACA;YACF;cACE;gBACE;gBACA;cACF;YACF;YACA;UACF;YACE;YACA;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;EACE;IACE;MACE;MACA;MACA;MACA;QACE;UACE;UACA;UACA;UACA;UACA;cACI;YACF;UACF;UACA;QACF;;QAEA;QACA;MACF;IACF;EACF;;AAEF;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;GACF;KACE;OACE;SACE;OACF;GACJ;GACA;KACE;OACE;UACG;OACH;KACF;GACF;KACE;KACA;OACE;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;EACA;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;OACC;SACE;SACA;OACF;MACD;IACF;CACH;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;iBACgB;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;UACE;YACE;cACE;cACA;cACA;YACF;QACJ;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;wBACc;+BACO;+BACA;UACrB;;UAEA;UACA;UACA;wBACc;+BACO;+BACA;+BACA;+BACA;UACrB;QACF;MACF;MACA;QACE;UACE;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;QACF;QACA;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;CACH;AACD;EACE;EACA;IACE;IACA;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;UACE;YACE;QACJ;MACF;MACA;QACE;UACE;YACE;MACN;;MAEA;QACE;;QAEA;UACE;UACA;UACA;WACC;QACH;UACE;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;QACE;QACA;QACA;UACE;YACE;UACF;UACA;YACE;UACF;QACF;MACF;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;IACF;IACA;MACE;;MAEA;QACE;QACA;QACA;QACA;QACA;YACI;MACN;;OAEC;SACE;;SAEA;;SAEA;SACA;SACA;OACF;MACD;IACF;CACH;AACD;EACE;EACA;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;;EAGA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;;MAEA;;MAEA;QACE;YACI;MACN;;MAEA;MACA;MACA;MACA;;MAEA;;MAEA;QACE;YACI;MACN;MACA;MACA;;MAEA;UACI;QACF;UACE;MACJ;;MAEA;MACA;;MAEA;QACE;MACF;QACE;UACE;QACF;QACA;UACE;QACF;MACF;;MAEA;;QAEE;UACE;YACE;YACA;YACA;YACA;YACA;UACF;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;UACE;cACI;8CACgC;cAChC;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;;UAEJ;YACE;UACF;;UAEA;YACE;YACA;UACF;YACE;YACA;YACA;YACA;cACE;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;;UAEA;UACA;YACE;YACA;YACA;YACA;cACE;cACA;cACA;cACA;cACA;YACF;cACE;cACA;gBACE;cACF;cACA;kBACI;kBACA;YACN;cACE;cACA;cACA;YACF;UACF;;UAEA;UACA;YACE;YACA;YACA;YACA;cACE;cACA;cACA;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;YACE;YACA;YACA;;YAEA;cACE;cACA;;cAEA;;cAEA;cACA;gBACE;cACF;;cAEA;gBACE;gBACA;cACF;cACA;cACA;YACF;cACE;cACA;gBACE;gBACA;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;cACF;YACF;UACF;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;QACA;QACA;QACA;QACA;QACA;KACH;KACA;OACE;SACE;OACF;KACF;KACA;OACE;;OAEA;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;MACE;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;QACA;QACA;QACA;QACA;UACE;YACE;YACA;YACA;QACJ;MACF;IACF;IACA;MACE;QACE;UACE;UACA;QACF;IACJ;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;;MAEA;QACE;QACA;;QAEA;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;MACF;MACA;MACA;QACE;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;MACF;MACA;QACE;QACA;MACF;MACA;QACE;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;;IAEA;IACA;KACC;IACD;IACA;MACE;UACI;UACA;UACA;UACA;;MAEJ;UACI;MACJ;;MAEA;QACE;QACA;UACE;QACF;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;YACE;cACE;cACA;cACA;cACA;;cAEA;cACA;YACF;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;IACE;IACA;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;IACE;IACA;GACD;AACH;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;UACC;aACG;eACE;eACA;eACA;eACA;2BACY;2BACA;yBACF;aACZ;SACJ;SACA;WACE;WACA;SACF;OACF;OACA;SACE;SACA;SACA;OACF;KACF;KACA;QACG;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;KACH;GACF;CACF;CACA;AACD;EACE;EACA;IACE;MACE;OACC;OACA;OACA;OACA;IACH;;IAEA;MACE;MACA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;MACF;;MAEA;MACA;IACF;IACA;MACE;QACE;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;YACI;YACA;;QAEJ;MACF;IACF;EACF;AACF;;AAEA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;UACE;YACE;cACE;cACA;cACA;cACA;cACA;YACF;YACA;UACF;QACF;QACA;UACE;YACE;cACE;cACA;YACF;YACA;cACE;YACF;UACF;UACA;UACA;UACA;;UAEA;UACA;YACE;cACE;YACF;UACF;;UAEA;UACA;UACA;;;UAGA;UACA;UACA;UACA;eACK;UACL;QACF;MACF;MACA;SACG;WACE;WACA;WACA;WACA;WACA;WACA;WACA;SACF;MACH;IACF;CACH;;AAED;EACE;EACA;AACF;;AAEA;AACA;yBACyB;EACvB;MACI;AACN;;EAEE;IACE;IACA;IACA;MACE;UACI;UACA;UACA;UACA;;;MAGJ;;;MAGA;QACE;QACA;QACA;MACF;;;MAGA;QACE;QACA;;QAEA;UACE;UACA;QACF;QACA;QACA;QACA;QACA;UACE;QACF;MACF;;;MAGA;QACE;UACE;UACA;YACE;UACF;QACF;MACF;;;MAGA;QACE;QACA;QACA;QACA;QACA;MACF;;;MAGA;QACE;MACF;;MAEA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;MACA;QACE;UACE;UACA;QACF;MACF;;MAEA;;MAEA;MACA;QACE;UACE;QACF;MACF;;MAEA;MACA;MACA;;;MAGA;;;;MAIA;QACE;UACE;;UAEA;YACE;YACA;YACA;UACF;YACE;cACE;YACF;cACE;YACF;UACF;QACF;;QAEA;UACE;YACE;YACA;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;UACA;YACE;UACF;QACF;;QAEA;QACA;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;cACE;gBACE;cACF;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;;QAEA;UACE;YACE;YACA;YACA;YACA;QACJ;;QAEA;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;QAEJ;UACE;UACA;;UAEA;UACA;UACA;;UAEA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;YACE;gBACI;gBACA;gBACA;;YAEJ;cACE;cACA;mBACK;mBACA;gBACH;gBACA;;gBAEA;kBACE;oBACE;oBACA;oBACA;sBACE;wBACE;wBACA;sBACF;oBACF;sBACE;oBACF;oBACA;kBACF;gBACF;cACF;YACF;cACE;cACA;gBACE;cACF;gBACE;cACF;gBACE;kBACE;oBACE;oBACA;sBACE;sBACA;oBACF;kBACF;gBACF;kBACE;kBACA;kBACA;gBACF;cACF;YACF;YACA;YACA;UACF;QACF;;QAEA;;QAEA;QACA;UACE;cACI;UACJ;YACE;YACA;cACE;cACA;YACF;YACA;UACF;QACF;;QAEA;UACE;QACF;;;QAGA;UACE;UACA;YACE;YACA;cACE;cACA;cACA;gBACE;gBACA;cACF;YACF;cACE;YACF;UACF;UACA;QACF;;;QAGA;UACE;YACE;YACA;UACF;QACF;;;QAGA;UACE;;cAEI;UACJ;cACI;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;;;UAGJ;UACA;;YAEE;YACA;cACE;cACA;cACA;YACF;;YAEA;;YAEA;YACA;cACE;cACA;YACF;YACA;cACE;gBACE;cACF;YACF;cACE;gBACE;gBACA;gBACA;cACF;gBACE;cACF;cACA;YACF;YACA;;YAEA;YACA;YACA;cACE;cACA;cACA;cACA;YACF;UACF;UACA;YACE;cACE;cACA;YACF;cACE;cACA;YACF;UACF;;UAEA;UACA;eACK;eACA;YACH;YACA;;YAEA;YACA;;YAEA;cACE;cACA;gBACE;gBACA;cACF;cACA;cACA;cACA;YACF;cACE;cACA;;cAEA;cACA;gBACE;cACF;YACF;;YAEA;YACA;cACE;cACA;gBACE;gBACA;gBACA;kBACE;gBACF;gBACA;kBACE;gBACF;gBACA;gBACA;kBACE;kBACA;oBACE;oBACA;oBACA;oBACA;kBACF;gBACF;cACF;gBACE;;gBAEA;gBACA;kBACE;kBACA;gBACF;kBACE;kBACA;kBACA;kBACA;sBACI;sBACA;sBACA;sBACA;gBACN;;gBAEA;oBACI;oBACA;oBACA;oBACA;gBACJ;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;cACF;YACF;YACA;YACA;YACA;cACE;YACF;UACF;UACA;UACA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;QACE;QACA;UACE;QACF;MACF;;MAEA;QACE;YACI;YACA;cACE;;QAEN;UACE;UACA;UACA;QACF;UACE;QACF;;QAEA;UACE;YACE;YACA;cACE;YACF;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;AACF;;EAEE;IACE;IACA;IACA;EACF;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;EACF;;AAEF;;AAEA;AC5nwBA;CACC;CACA;CACA;CACA;AACD;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,YAAY,iBAAiB;IAC3B;IACA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;EACA,UAAU,eAAe;IACvB;IACA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;;IAEA;MACE;QACE;QACA;UACE;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA,oBAAoB,QAAQ;QACxB;CACP;;MAEK;;MAEA;MACA;MACA;MACA;MACA;QACE;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;MACF;;MAEA;MACA;MACA;cACQ;cACA;gBACE;cACF;;MAER;QACE;QACA;UACE;UACA;UACA;QACF;QACA;MACF;;MAEA;QACE;QACA;UACE;QACF;QACA;UACE;YACE;UACF;QACF;QACA;MACF;;MAEA;QACE;QACA;;QAEA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;UACF;QACF;;QAEA;QACA;UACE;YACE;UACF;QACF;;QAEA;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;YACA;cACE;YACF;UACF;YACE;YACA;cACE;YACF;UACF;QACF;;QAEA;MACF;;MAEA;QACE;UACE;cACI;cACA;;UAEJ;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;UACF;;UAEA;YACE;gBACI;YACJ;cACE;cACA;YACF;UACF;UACA;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;UACE;QACF;;QAEA;QACA;QACA;UACE;UACA;UACA;YACE;YACA;UACF;YACE;YACA;UACF;YACE;UACF;QACF;;QAEA;QACA;2BACmB;2BACA;;QAEnB;QACA;QACA;UACE;QACF;;QAEA;YACI;YACA;YACA;YACA;YACA;;QAEJ;QACA;UACE;UACA;YACE;YACA;UACF;QACF;;QAEA;UACE;UACA;UACA;YACE;cACE;cACA;cACA;YACF;YACA;cACE;YACF;YACA;cACE;YACF;YACA;UACF;QACF;;QAEA;UACE;UACA;YACE;UACF;;UAEA;UACA;YACE;cACE;cACA;cACA;YACF;YACA;UACF;;UAEA;UACA;UACA;UACA;YACE;cACE;YACF;YACA;cACE;gBACE;gBACA;cACF;gBACE;gBACA;cACF;gBACE;gBACA;cACF;gBACE;gBACA;YACJ;UACF;;UAEA;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;UACA;YACE;YACA;cACE;cACA;YACF;UACF;UACA;YACE;YACA;cACE;cACA;YACF;UACF;UACA;YACE;cACE;gBACE;cACF;cACA;YACF;YACA;cACE;gBACE;cACF;cACA;YACF;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;YACE;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;;UAEA;UACA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;UACA;YACE;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;;UAEA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;YACE;YACA;;YAEA;YACA;UACF;YACE;cACE;cACA;YACF;UACF;;UAEA;YACE;YACA;;YAEA;YACA;YACA;cACE;cACA;kBACI;gBACF;UACN;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;YACE;cACE;gBACE;cACF;gBACE;gBACA;gBACA;cACF;YACF;;YAEA;cACE;YACF;;YAEA;cACE;YACF;UACF;UACA;SACD;MACH;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;MACA;;QAEE;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;YACE;cACE;YACF;cACE;cACA;gBACE;cACF;cACA;cACA;YACF;UACF;YACE;YACA;UACF;UACA;YACE;YACA;cACE;YACF;cACE;cACA;YACF;UACF;;UAEA;YACE;cACE;YACF;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;YACE;YACA;YACA;cACE;cACA;gBACE;gBACA;cACF;YACF;UACF;QACF;;QAEA;QACA;QACA;;QAEA;QACA;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;UACE;UACA;wBACc;wBACA;;UAEd;UACA;YACE;UACF;YACE;YACA;UACF;QACF;;QAEA;;QAEA;UACE;UACA;YACE;cACE;gBACE;gBACA;cACF;YACF;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;QACF;;QAEA;QACA;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;YACA;cACE;iBACG;iBACA;iBACA;cACH;gBACE;cACF;gBACE;kBACE;kBACA;oBACE;kBACF;gBACF;gBACA;cACF;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;YACE;YACA;UACF;YACE;YACA;YACA;cACE;gBACE;cACF;YACF;UACF;QACF;MACF;;MAEA;QACE;UACE;YACE;YACA;UACF;QACF;UACE;;UAEA;UACA;YACE;YACA;UACF;;UAEA;YACE;YACA;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;;QAEA;UACE;QACF;;QAEA;QACA;UACE;UACA;UACA;UACA;;UAEA;UACA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;YACA;cACE;YACF;UACF;;UAEA;mCACyB;mCACA;QAC3B;QACA;;QAEA;MACF;IACF;;IAEA;2BACuB;MACrB;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;QACE;UACE;QACF;QACA;QACA;UACE;YACE;UACF;;UAEA;UACA;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;QACE;QACA;;QAEA;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;QACF;;QAEA;;QAEA;QACA;UACE;UACA;QACF;MACF;;MAEA;QACE;UACE;UACA;YACE;cACE;YACF;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;UACA;UACA;UACA;;UAEA;UACA;YACE;cACE;;cAEA;cACA;;cAEA;cACA;;cAEA;cACA;;cAEA;;cAEA;gBACE;cACF;cACA;YACF;UACF;UACA;YACE;YACA;YACA;YACA;YACA;UACF;UACA;YACE;UACF;QACF;QACA;MACF;;MAEA;QACE;QACA;UACE;UACA;QACF;UACE;QACF;QACA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;QACA;MACF;;MAEA;QACE;;QAEA;QACA;QACA;;QAEA;QACA;UACE;UACA;UACA;;UAEA;;UAEA;;UAEA;QACF;;QAEA;;QAEA;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;QACA;6BACqB;6BACA;;QAErB;QACA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;;QAEA;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;QACA;UACE;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;UACE;UACA;YACE;UACF;;UAEA;UACA;YACE;YACA;UACF;;UAEA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;YACE;UACF;UACA;QACF;;QAEA;QACA;QACA;QACA;;QAEA;QACA;UACE;UACA;YACE;YACA;YACA;YACA;cACE;YACF;UACF;QACF;;QAEA;QACA;UACE;UACA;QACF;;QAEA;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;YACE;UACF;UACA;UACA;UACA;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;WACC;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;UACD;YACE;UACF;QACF;MACF;;MAEA;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;YACE;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;UACE;UACA;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;UACE;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;QACF;MACF;;MAEA;QACE;QACA;QACA;UACE;YACE;UACF;UACA;YACE;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;0BACgB;UAChB;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;MACF;;MAEA;QACE;QACA;QACA;UACE;YACE;UACF;QACF;QACA;MACF;IACF;EACF;;;AAGF;;ACv1DA;CACC;CACA;CACA;CACA;;AAED;;EAEE;IACE;EACF;;EAEA,YAAY,UAAU;IACpB;IACA;MACE;;MAEA;QACE;QACA;QACA;;UAEE;UACA;cACI;;UAEJ;UACA;YACE;UACF;;UAEA;UACA;YACE;YACA;YACA;UACF;;UAEA;UACA;UACA;UACA;;UAEA;cACI;cACA;4BACc;4BACA;4BACA;4BACA;cACd;wCAC0B;cAC1B;cACA;cACA;cACA;0BACY;0BACA;cACZ;4BACc;oCACQ;oCACA;oCACA;4BACR;oCACQ;oCACA;oCACA;0BACV;cACZ;cACA;cACA;cACA;cACA;cACA;cACA;2BACa;2BACA;2BACA;2BACA;2BACA;2BACA;2BACA;2BACA;;UAEjB;UACA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;YACE;UACF;;UAEA;UACA;YACE;UACF;;UAEA;WACC;WACA;;UAED;YACE;YACA;YACA;YACA;cACE;YACF;YACA;UACF;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;cACE;YACF;;YAEA;YACA;cACE;;cAEA;cACA;;cAEA;;cAEA;;cAEA;cACA;gBACE;gBACA;gBACA;cACF;;cAEA;;cAEA;gBACE;gBACA;cACF;gBACE;cACF;cACA;;cAEA;;cAEA;gBACE;gBACA;cACF;;cAEA;cACA;gBACE;cACF;;YAEF;UACF;;UAEA;YACE;YACA;UACF;;UAEA;WACC;WACA;;UAED;UACA;YACE;YACA;UACF;YACE;UACF;;UAEA;;UAEA;YACE;UACF;YACE;UACF;;UAEA;YACE;UACF;;UAEA;;UAEA;WACC;WACA;;UAED;YACE;YACA;UACF;QACF;MACF;IACF;EACF;;ACpNF;CACC;CACA;CACA;CACA;AACD;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;EACE;MACI;AACN;;AAEA;EACE;IACE;EACF;EACA;EACA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;AACD;EACE;;EAEA;IACE;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;OACA;KACF;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;KACA;MACC;OACC;MACD;;KAED;KACA;OACE;OACA;;OAEA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;OAEA;OACA;OACA;KACF;;KAEA;KACA;KACA;KACA;KACA;KACA;KACA;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;GAEE;KACE;KACA;OACE;OACA;KACF;GACF;CACF;CACA;CACA;CACA;CACA;GACE;KACE;KACA;OACE;OACA;SACE;SACA;OACF;KACF;GACF;CACF;CACA;CACA;GACE;KACE;KACA;SACI;WACE;SACF;GACN;;CAEF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;sCACqC;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE,UAAU,SAAS;IACjB;;IAEA;MACE;MACA;;MAEA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;IACF;;IAEA;;MAEE;QACE;QACA;QACA;QACA;;MAEF;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;MACJ;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;UACA;UACA;MACJ;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;UACE;YACE;YACA;YACA;;UAEF;UACA;YACE;cACE;YACF;YACA;cACE;cACA;YACF;UACF;UACA;;UAEA;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;cACE;kBACI;gBACF;kBACE;gBACF;kBACE;gBACF;cACF;YACF;UACF;;UAEA;UACA;YACE;UACF;;UAEA;UACA;UACA;UACA;UACA;;;UAGA;UACA;YACE;cACE;cACA;YACF;UACF;QACF;MACF;;;MAGA;QACE;;QAEA;;QAEA;UACE;UACA;UACA;YACE;YACA;cACE;UACJ;UACA;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;;UAEA;YACE;;YAEA;YACA;cACE;gBACE;gBACA;cACF;cACA;cACA;gBACE;kBACE;oBACE;oBACA;oBACA;kBACF;;kBAEA;kBACA;kBACA;gBACF;kBACE;kBACA;kBACA;kBACA;gBACF;cACF;gBACE;gBACA;gBACA;gBACA;cACF;cACA;gBACE;kBACE;kBACA;YACN;YACA;;YAEA;YACA;YACA;YACA;cACE;YACF;cACE;;YAEF;cACE;gBACE;cACF;YACF;;YAEA;YACA;cACE;cACA;;YAEF;cACE;gBACE;;cAEF;gBACE;gBACA;gBACA;kBACE;sBACI;sBACA;oBACF;gBACJ;gBACA;gBACA;kBACE;kBACA;oBACE;sBACE;oBACF;sBACE;sBACA;sBACA;sBACA;oBACF;kBACF;gBACF;kBACE;kBACA;gBACF;cACF;;cAEA;;cAEA;;cAEA;YACF;cACE;;cAEA;;cAEA;YACF;;YAEA;cACE;gBACE;gBACA;gBACA;cACF;cACA;;YAEF;cACE;cACA;cACA;cACA;cACA;;cAEA;YACF;;YAEA;YACA;UACF;;;UAGA;YACE;cACE;YACF;YACA;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;MACF;;MAEA;IACF;EACF;;;AAGF;;AC1pBA;;;;;ACIA;;IAEI;;IAEA;;IAEA;;IAEA;;IAEA;IACA;IACA;;IAEA;;;IAGA;;IAEA;;;;IAIA;;IAEA;;IAEA;;IAEA;;IAEA;IACA;IACA;;IAEA;;IAEA;;IAEA;;;IAGA;;MAEE;UACI;gBACM;gBACA;;MAEV;sBACgB;cACR;cACA;cACA;UACJ;MACJ;;gBAEU;MACV;UACI;MACJ;MACA;gBACU;gBACA;UACN;UACA;UACA;MACJ;;MAEA;QACE;UACE;UACA;MACJ;UACI;MACJ;;MAEA;;IAEF;IACA;;IAEA;MACE;QACE;MACF;IACF;IACA;MACE;QACE;MACF;IACF;;;IAGA;MACE;;QAEE;;QAEA;YACI;QACJ;;QAEA;YACI;;YAEA;;cAEE;cACA;cACA;;cAEA;kBACI;kBACA;cACJ;cACA;kBACI;cACJ;cACA;;YAEF;;cAEE;kBACI;kBACA;cACJ;;YAEF;;QAEJ;;QAEA;MACF;IACF;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;YACI;YACA;gBACI;YACJ;QACJ;QACA;IACJ;;IAEA;QACI;YACI;YACA;;4BAEgB;;4BAEA;gCACI;gBAChB;;4BAEY;YAChB;QACJ;QACA;IACJ;;IAEA;;QAEI;YACI;;YAEA;UACF;;YAEE;UACF;UACA;QACF;IACJ;QACI;;QAEA;UACE;QACF;UACE;YACE;UACF;QACF;;QAEA;IACJ;;;;IAIA;QACI;IACJ;;;IAGA;;QAEI;;wBAEgB;;sBAEF;YACV;UACF;QACF;QACA;IACJ;IACA;QACI;IACJ;IACA;QACI;oCAC4B;YACxB;;YAEA;QACJ;IACJ;;;;KAIC;OACE;SACE;WACE;aACE;WACF;SACF;OACF;;SAEE;;SAEA;8CACqC;SACrC;;SAEA;;SAEA;WACE;SACF;SACA;;OAEF;;OAEA;KACF;;;IAGD;IACA;;;IAGA;;IAEA;IACA;IACA;;;;IAIA;QACI;IACJ;;IAEA;;;IAGA;;oDAEgD;;IAEhD;;AAEJ;;ACvSA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;IAEI;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;YACQ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;;IAEJ;KACC;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;YACI;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;YACJ;;YAEA;QACJ;;QAEA;QACA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;;QAEA;QACA;QACA;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;;QAEA;YACI;;QAEJ;YACI;gBACI;gBACA;YACJ;YACA;QACJ;;QAEA;YACI;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;;QAEJ;QACA;YACI;QACJ;;QAEA;QACA;YACI;QACJ;;QAEA;QACA;QACA;YACI;;YAEA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;gBAEI;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;oBACI;gBACJ;;gBAEA;YACJ;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;YACI;QACJ;;QAEA;YACI;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;YACA;;QAEJ;QACA;YACI;gBACI;YACJ;QACJ;;QAEA;QACA;;YAEI;YACA;YACA;YACA;YACA;YACA;;gBAEI;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;oBACI;gBACJ;;gBAEA;;gBAEA;gBACA;gBACA;gBACA;YACJ;;YAEA;YACA;YACA;gBACI;YACJ;QACJ;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;YACI;QACJ;;QAEA;;QAEA;QACA;YACI;QACJ;;QAEA;QACA;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;;gBAEI;gBACA;gBACA;oBACI;gBACJ;;gBAEA;oBACI;gBACJ;YACJ;QACJ;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;YACI;QACJ;;QAEA;QACA;QACA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;gBACI;gBACA;gBACA;YACJ;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;;YAEA;YACA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;QACJ;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;;QAEJ;QACA;QACA;;QAEA;YACI;;YAEA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;YACA;gBACI;gBACA;YACJ;;YAEA;YACA;gBACI;YACJ;QACJ;;QAEA;QACA;QACA;;QAEA;YACI;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;;QAEA;QACA;;QAEA;YACI;;QAEJ;QACA;QACA;YACI;YACA;QACJ;;QAEA;;QAEA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;YACA;YACA;YACA;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;QACJ;IACJ;;IAEA;IACA;IACA;IACA;;IAEA;;QAEI;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;gBACI;YACJ;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;QACJ;;OAED;QACC;QACA;QACA;QACA;QACA;QACA;QACA;;YAEI;YACA;gBACI;YACJ;;YAEA;YACA;QACJ;;QAEA;SACC;SACA;QACD;IACJ;;IAEA;IACA;;IAEA;IACA;QACI;IACJ;AACJ;;ACx7BA;AACA;AACA;;AAEA;;AAEA,eAAe,OAAO;EACpB;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA,aAAa,KAAK;EAChB;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;AC3BA;;AAEA;IACI;KACC;KACA;KACA;KACA;KACA;IACD;AACJ;;AAEA,mCAAmC,cAAc;IAC7C;;IAEA;QACI;YACI;QACJ;YACI;QACJ;IACJ;;IAEA;QACI;YACI;QACJ;YACI;QACJ;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;YACI;YACA;QACJ;;QAEA;YACI;gBACI;YACJ;;YAEA;gBACI;gBACA;oBACI;gBACJ;oBACI;gBACJ;YACJ;;YAEA;QACJ;;QAEA;YACI;YACA;YACA;QACJ;;QAEA;YACI;YACA;YACA;QACJ;;QAEA;YACI;YACA;YACA;YACA;QACJ;;QAEA;YACI;gBACI;gBACA;gBACA;YACJ;gBACI;oBACI;gBACJ;YACJ;QACJ;IACJ;;IAEA;AACJ;;AAEA,qCAAqC,SAAS;IAC1C;IACA;IACA;QACI;YACI;gBACI;YACJ;QACJ;QACA;YACI;QACJ;IACJ;;IAEA;QACI;YACI;QACJ;IACJ;;IAEA;QACI;QACA;QACA;YACI;YACA;YACA;;YAEA;YACA;;YAEA;gBACI;oBACI;oBACA;;oBAEA;wBACI;wBACA;wBACA;4BACI;4BACA;4BACA;wBACJ;4BACI;wBACJ;;wBAEA;wBACA;wBACA;wBACA;wBACA;wBACA;wBACA;oBACJ;;oBAEA;wBACI;oBACJ;;oBAEA;;oBAEA;gBACJ;YACJ;QACJ;IACJ;AACJ;;AAEA,kCAAkC,SAAS;IACvC;QACI;IACJ;IACA;IACA;AACJ;;AAEA;AACA,mCAAmC,cAAc;IAC7C;QACI;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;QACR;IACJ;AACJ;;ACrSA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;;EAEA,4CAA4C,OAAO;;IAEjD;KACC;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;;IAED;;IAEA;KACC;KACA;KACA;IACD;sBACkB;sBACA;wBACE;0BACE;4BACE;0BACF;0BACA;wBACF;sBACF;sBACA;oBACF;;IAEhB;KACC;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;IACD;;IAEA,YAAY,mEAAA;;MAEV;MACA;MACA;MACA;QACE;QACA;UACE;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;QACA;;QAEA;UACE;UACA;YACE;cACE;YACF;cACE;YACF;UACF;;UAEA;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;QACA;QACA;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;MACD;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;;MAGA;QACE;;QAEA;UACE;YACE;YACA;YACA;YACA;YACA;cACE;YACF;;YAEA;YACA;YACA;YACA;UACF;QACF;MACF;;;MAGA;MACA;QACE;QACA;QACA;QACA;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;UACA;YACE;UACF;QACF;MACF;;MAEA;OACC;OACA;MACD;;MAEA;QACE;;QAEA;QACA;QACA;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;UACE;;UAEA;UACA;YACE;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;UACE;UACA;UACA;QACF;UACE;QACF;;QAEA;QACA;QACA;QACA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;;UAEE;UACA;;UAEA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;;UAEA;UACA;YACE;YACA;YACA;;YAEA;YACA;cACE;YACF;cACE;cACA;gBACE;kBACE;kBACA;gBACF;cACF;YACF;;YAEA;cACE;YACF;UACF;QACF;;QAEA;UACE;QACF;UACE;QACF;;QAEA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;QACF;UACE;;UAEA;YACE;YACA;cACE;YACF;cACE;YACF;YACA;UACF;QACF;;QAEA;;MAEF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;QAEE;;QAEA;UACE;;UAEA;YACE;UACF;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;QACA;;UAEE;UACA;;UAEA;YACE;YACA;cACE;cACA;YACF;UACF;QACF;QACA;QACA;QACA;UACE;YACE;;YAEA;cACE;YACF;cACE;YACF;;YAEA;YACA;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;;UAEE;UACA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;;UAEA;UACA;UACA;YACE;YACA;UACF;QACF;MACF;;;MAGA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;;IAEF,CAAC,CAAA;EACH;;EAEA,YAAY,MAAM,GAAG,YAAA;IACnB;MACE;MACA;QACE;;QAEA;UACE;UACA;;UAEA;;UAEA;YACE;YACA;YACA;YACA;YACA;UACF;QACF;;QAEA;QACA;UACE;QACF;MACF;IACF;EACF,CAAC,CAAA;;EAED,KAAK,YAAA;IACH;IACA;EACF,CAAC,CAAA;;AAEH;;ACljBA;CACC;CACA;CACA;CACA;CACA;;AAED;AACA;EACE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;IACI;IACA;IACA;IACA;IACA;IACA;IACA;;AAEJ;EACE;AACF;;AAEA;EACE;IACE;MACE;QACE;MACF;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;;EAEA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;EACA;;EAEA;;EAEA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;IACA;;IAEA;MACE;MACA;MACA;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;EACF;;EAEA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;EACA;AACF;;AAEA;AACA;AACA;EACE;EACA;IACE;EACF;EACA;AACF;;AAEA;AACA;AACA;EACE;EACA;EACA;IACE;EACF;EACA;AACF;;AAEA;AACA;AACA;EACE;EACA;EACA;IACE;EACF;EACA;AACF;;AAEA;EACE;;EAEA;IACE;EACF;EACA;AACF;;AAEA;EACE;EACA;EACA;IACE;MACE;IACF;EACF;EACA;AACF;;AAEA;EACE;;EAEA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;MACI;MACA;MACA;MACA;MACA;;;EAGJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;;MAEA;QACE;MACF;QACE;QACA;UACE;QACF;QACA;MACF;;MAEA;MACA;IACF;IACA;IACA;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;UACI;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;UACA;UACA;UACA;QACF;MACF;;MAEA;QACE;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;MACF;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;UACE;QACF;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;QACA;QACA;QACA;UACE;YACE;YACA;cACE;cACA;YACF;UACF;QACF;QACA;QACA;UACE;UACA;YACE;YACA;cACE;cACA;YACF;UACF;YACE;UACF;QACF;QACA;QACA;MACF;;MAEA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;AACF;;AAEA,0CAA0C,QAAQ;;;AAGlD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;QACI;QACA;EACN;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;AACF;;AAEA,0CAA0C,gBAAgB;;AAE1D;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;MACI;MACA;MACA;MACA;MACA;MACA;;EAEJ;IACE;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;MACA;MACA;IACF;IACA;EACF;;EAEA;;EAEA;EACA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;MACE;IACF;EACF;;EAEA;EACA;IACE;IACA;;IAEA;IACA;IACA;IACA;EACF;EACA;;EAEA;EACA;;EAEA;IACE;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;QACA;QACA;MACF;IACF;EACF;IACE;IACA;EACF;;EAEA;EACA;;EAEA;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;IACE;IACA;IACA;EACF;EACA;AACF;;AAEA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;;EAEA;IACE;IACA;;EAEF;;EAEA;IACE;IACA;;IAEA;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;MACE;IACF;IACA;IACA;EACF;EACA;IACE;IACA;EACF;;EAEA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;;EAEA;;EAEA;IACE;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;UACE;YACE;UACF;YACE;UACF;QACF;QACA;MACF;QACE;QACA;MACF;QACE;MACF;IACF;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;EACE;EACA;AACF;;AAEA;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;;EAEA;IACE;MACE;QACE;MACF;IACF;;IAEA;IACA;IACA;IACA;MACE;QACE;QACA;QACA;MACF;IACF;IACA;;IAEA;IACA;MACE;QACE;QACA;QACA;UACE;QACF;MACF;IACF;;IAEA;IACA;MACE;QACE;QACA;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;EACF;AACF;;;;AAIA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;EAEA;EACA;AACF;AACA;EACE;;EAEA;IACE;MACE;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;IACF;IACA;MACE;QACE;UACE;QACF;UACE;UACA;QACF;MACF;MACA;QACE;QACA;QACA;MACF;MACA;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;MACE;MACA;IACF;EACF;;EAEA;IACE;EACF;;EAEA;GACC;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;QACE;MACF;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;EACA;IACE;MACE;MACA;MACA;IACF;EACF;;EAEA;EACA;EACA;;EAEA;EACA;IACE;IACA;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;MACE;IACF;IACA;IACA;;IAEA;MACE;MACA;wBACkB;MAClB;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;IACF;;IAEA;KACC;KACA;IACD;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;IACD;MACE;MACA;QACE;QACA;MACF;MACA;MACA;IACF;;IAEA;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;EACF;;EAEA;IACE;MACE;IACF;IACA;MACE;QACE;MACF;MACA;MACA;QACE;YACI;QACJ;MACF;MACA;IACF;IACA;MACE;MACA;QACE;MACF;MACA;IACF;IACA;MACE;MACA;QACE;QACA;MACF;MACA;IACF;IACA;MACE;;MAEA;QACE;QACA;QACA;QACA;MACF;MACA;IACF;IACA;EACF;;EAEA;AACF;;AAEA;AACA,2CAA2C,kBAAkB;AAC7D;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;;EAEA;EACA;IACE;IACA;EACF;;EAEA;EACA;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;IACA;IACA;EACF;;;EAGA;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;;IAEF;MACE;QACE;UACE;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;MACA;QACE;;QAEA;UACE;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;YACS;GACT;EACD;IACE;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;EACA;;IAEE;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;MACA;;MAEA;QACE;;QAEA;QACA;QACA;MACF;MACA;;MAEA;QACE;MACF;MACA;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;;IAEA;MACE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;UACA;QACF;QACA;;QAEA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;QACA;UACE;QACF;;QAEA;QACA;;QAEA;UACE;QACF;QACA;;QAEA;UACE;QACF;;QAEA;QACA;;QAEA;MACF;IACF;EACF;AACF;;AAEA,6CAA6C,UAAU;;AAEvD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;;EAEA;EACA;;IAEE;IACA;IACA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;;MAEA;QACE;QACA;MACF;;MAEA;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;MACE;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;MACA;MACA;IACF;;IAEA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;;IAEA;QACI;QACA;;IAEJ;MACE;MACA;;MAEA;;MAEA;QACE;UACE;UACA;QACF;QACA;UACE;UACA;UACA;QACF;QACA;MACF;MACA;MACA;IACF;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;EACF;;EAEA;IACE;IACA;MACE;MACA;MACA;IACF;;IAEA;IACA;IACA;;IAEA;IACA;QACI;QACA;QACA;;IAEJ;IACA;MACE;IACF;;IAEA;MACE;IACF;IACA;;IAEA;IACA;MACE;QACE;UACE;QACF;MACF;IACF;;IAEA;IACA;;IAEA;EACF;;EAEA;EACA;IACE;EACF;;EAEA;EACA;IACE;QACI;;IAEJ;IACA;OACG;OACA;IACH;IACA;IACA;OACG;OACA;IACH;;IAEA;MACE;IACF;;IAEA;IACA;MACE;QACE;MACF;IACF;;IAEA;EACF;;;EAGA;EACA;IACE;IACA;IACA;IACA;EACF;EACA;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;IACA;MACE;IACF;IACA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;EACA;;IAEE;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;QACE;QACA;MACF;;MAEA;QACE;MACF;;MAEA;MACA;QACE;QACA;MACF;MACA;;MAEA;QACE;QACA;QACA;MACF;QACE;MACF;MACA;;MAEA;IACF;;IAEA;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;;MAEA;MACA;;MAEA;QACE;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;MACF;MACA;MACA;MACA;;MAEA;MACA;;MAEA;;MAEA;MACA;;MAEA;QACE;UACE;UACA;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;QACE;QACA;QACA;MACF;;MAEA;MACA;;MAEA;MACA;QACE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;MACA;QACE;;QAEA;;QAEA;QACA;UACE;UACA;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;UACA;YACE;UACF;QACF;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;UACC;QACF;QACA;;QAEA;MACF;QACE;;QAEA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;;QAEA;YACI;QACJ;;QAEA;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;UACE;QACF;QACA;MACF;;MAEA;MACA;MACA;MACA;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;QACA;QACA;MACF;;MAEA;;MAEA;MACA;;MAEA;;MAEA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;QACE;MACF;MACA;;MAEA;MACA;QACE;QACA;UACE;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;YACE;UACF;UACA;UACA;UACA;UACA;QACF;MACF;;MAEA;MACA;QACE;MACF;IACF;;IAEA;EACF;;EAEA;IACE;MACE;IACF;EACF;AACF;;AAEA;EACE;EACA,WAAW,MAAM;;;AAGnB;AACA;;EAEE;EACA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;MACE;MACA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;QACA;;QAEA;UACE;QACF;QACA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;UACC;QACF;QACA;MACF;IACF;EACF;AACF;;AAEA,4CAA4C,KAAK;;AAEjD;CACC;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA,4CAA4C,aAAa;;AAEzD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;IACE;MACE;IACF;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;MACI;MACA;;EAEJ;EACA;EACA;IACE;MACE;QACE;QACA;MACF;IACF;;IAEA;MACE;QACE;UACE;UACA;QACF;QACA;UACE;UACA;QACF;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;MACF;IACF;;IAEA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;MACE;QACE;YACI;YACA;YACA;;QAEJ;UACE;QACF;QACA;UACE;QACF;;QAEA;;QAEA;UACE;YACE;YACA;UACF;;UAEA;YACE;YACA;UACF;;UAEA;YACE;cACE;YACF;;YAEA;YACA;UACF;QACF;;QAEA;UACE;cACI;cACA;;UAEJ;UACA;UACA;;UAEA;YACE;cACE;gBACE;cACF;;cAEA;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;UACA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;UACA;QACF;MACF;IACF;EACF;;EAEA;AACF;;AAEA;AACA;EACE;IACE;IACA;IACA;MACE;MACA;QACE;YACI;YACA;;QAEJ;UACE;QACF;;QAEA;QACA;;QAEA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;UACA;QACF;;QAEA;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;AACD;EACE;EACA;EACA;AACF;;AAEA,6CAA6C,MAAM;AACnD,6CAA6C,MAAM;;AAEnD;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;;EAEA;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;;EAEA;IACE;IACA;IACA;MACE;MACA;MACA;MACA;MACA;;MAEA;MACA;;MAEA;QACE;UACE;QACF;MACF;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;MACA;;MAEA;;MAEA;QACE;QACA;UACE;UACA;YACE;UACF;UACA;;UAEA;UACA;UACA;YACE;cACE;UACJ;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;IACA;MACE;;MAEA;MACA;MACA;MACA;;MAEA;MACA;QACE;QACA;QACA;MACF;;MAEA;;MAEA;MACA;QACE;UACE;QACF;UACE;QACF;MACF;;MAEA;QACE;UACE;QACF;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE,YAAY,MAAM;EAClB,YAAY,YAAY;EACxB,YAAY,cAAc;;AAE5B;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;EACF;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;EACF;EACA;EACA;AACF;;AAEA;EACE,SAAS,OAAO;EAChB,SAAS,eAAe;AAC1B;ACvoIA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;EACA;;EAEA;EACA;MACI;;EAEJ;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;;IAEA;IACA;;IAEA;IACA;EACF;;EAEA;EACA;MACI;MACA;;EAEJ;GACC;GACA;GACA;EACD;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;EACF;;EAEA;EACA;;EAEA;EACA;MACI;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;EAEJ;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;EACA;IACE;EACF;;EAEA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;;IAEJ;MACE;QACE;MACF;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;;IAEA;MACE;MACA;EACJ;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;QACI;;IAEJ;MACE;IACF;MACE;QACE;MACF;MACA;UACI;;MAEJ;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;QACA;QACA;;IAEJ;MACE;UACI;;MAEJ;QACE;UACE;QACF;QACA;UACE;QACF;MACF;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;QACA;QACA;QACA;;IAEJ;QACI;MACF;IACF;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;QACI;QACA;;IAEJ;MACE;IACF;IACA;EACF;;EAEA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;KACC;KACA;KACA;KACA;KACA;IACD;;IAEA;IACA;QACI;QACA;;IAEJ;IACA;;IAEA;IACA;;IAEA;IACA;MACE;QACE;QACA;IACJ;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;IACA;MACE;MACA;QACE;YACI;YACA;MACN;MACA;IACF;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;UACE;YACE;UACF;QACF;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;OACC;OACA;IACH;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;IACA;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;QAEE;SACC;SACA;SACA;SACA;SACA;QACD;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;MACA;MACA;MACA;MACA;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;MACA;MACA;OACC;MACD;MACA;MACA;OACC;;OAEA;MACD;OACC;;OAEA;MACD;OACC;;UAEG;;OAEH;MACD;UACI;MACJ;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;OACC;MACD;UACI;MACJ;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;OACC;MACD;OACC;MACD;MACA;MACA;cACQ;MACR;OACC;MACD;MACA;MACA;OACC;MACD;OACC;;OAEA;;OAEA;MACD;OACC;MACD;MACA;MACA;;MAEA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;QACA;QACA;QACA;UACE;UACA;cACI;UACJ;QACF;QACA;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;UACE;QACF;MACF;MACA;MACA;MACA;QACE;QACA;UACE;QACF;QACA;QACA;UACE;UACA;YACE;;UAEF;UACA;YACE;;UAEF;YACE;YACA;YACA;QACJ;MACF;QACE;MACF;MACA;MACA;QACE;QACA;QACA;QACA;;QAEA;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;QACE;MACF;MACA;MACA;QACE;UACE;QACF;QACA;UACE;QACF;MACF;MACA;MACA;QACE;MACF;MACA;MACA;MACA;MACA;;MAEA;MACA;QACE;MACF;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;MACE;QACE;QACA;UACE;YACE;YACA;YACA;UACF;UACA;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;QACE;UACE;QACF;QACA;QACA;UACE;UACA;YACE;UACF;UACA;YACE;YACA;YACA;UACF;QACF;MACF;MACA;MACA;QACE;MACF;MACA;QACE;UACE;QACF;QACA;UACE;QACF;QACA;UACE;QACF;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;QACF;QACA;UACE;UACA;YACE;UACF;UACA;YACE;YACA;UACF;QACF;QACA;QACA;UACE;QACF;QACA;UACE;UACA;UACA;QACF;QACA;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;QACF;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;;QAEA;YACI;UACF;UACA;YACE;UACF;UACA;cACI;cACA;;UAEJ;UACA;YACE;UACF;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;MACA;QACE;QACA;MACF;MACA;UACI;;MAEJ;MACA;UACI;UACA;QACF;MACF;MACA;MACA;MACA;QACE;MACF;MACA;MACA;UACI;;MAEJ;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;QACA;UACE;UACA;UACA;;QAEF;UACE;UACA;YACE;YACA;YACA;;QAEJ;QACA;UACE;UACA;UACA;MACJ;MACA;MACA;QACE;QACA;YACI;;QAEJ;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;YACI;;QAEJ;QACA;cACM;cACA;YACF;UACF;QACF;MACF;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;QACE;UACE;QACF;MACF;MACA;MACA;;MAEA;MACA;MACA;;MAEA;MACA;QACE;QACA;QACA;QACA;;QAEA;UACE;UACA;YACE;gBACI;;YAEJ;cACE;gBACE;kBACE;gBACF;cACF;YACF;cACE;YACF;UACF;QACF;MACF;MACA;QACE;QACA;QACA;UACE;YACE;YACA;YACA;YACA;UACF;QACF;;QAEA;UACE;UACA;YACE;cACE;cACA;YACF;UACF;QACF;MACF;MACA;MACA;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;YACA;YACA;;QAEJ;UACE;UACA;UACA;YACE;cACE;cACA;YACF;UACF;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;YACA;cACE;gBACE;gBACA;YACJ;YACA;YACA;YACA;;YAEA;YACA;cACE;YACF;UACF;QACF;QACA;UACE;YACE;YACA;cACE;YACF;UACF;UACA;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;UACI;;MAEJ;QACE;QACA;QACA;MACF;MACA;QACE;YACI;;QAEJ;cACM;cACA;YACF;UACF;YACE;UACF;UACA;QACF;MACF;MACA;QACE;QACA;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;;QAEA;UACE;cACI;;UAEJ;YACE;YACA;UACF;QACF;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;MACF;MACA;QACE;QACA;MACF;MACA;MACA;QACE;QACA;QACA;UACE;QACF;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;QACA;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;MACA;MACA;MACA;;MAEA;MACA;QACE;UACE;QACF;MACF;MACA;MACA;;MAEA;MACA;UACI;UACA;UACA;QACF;MACF;;MAEA;MACA;QACE;QACA;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;UACI;UACA;UACA;QACF;MACF;MACA;MACA;MACA;MACA;QACE;UACE;UACA;QACF;QACA;MACF;MACA;MACA;MACA;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;IACA;IACA;MACE;QACE;UACE;MACJ;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;UACI;QACF;MACF;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;MACF;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;;IAEA;IACA;QACI;;IAEJ;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;MAEA;QACE;MACF;;MAEA;MACA;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;UACI;;MAEJ;UACI;UACA;QACF;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;UACI;;MAEJ;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;MACA;MACA;QACE;MACF;MACA;QACE;MACF;QACE;MACF;MACA;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;UACE;QACF;QACA;;QAEA;YACI;;QAEJ;UACE;UACA;QACF;MACF;QACE;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;YACI;YACA;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;UACE;QACF;UACE;cACI;;UAEJ;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;MACA;QACE;MACF;QACE;MACF;QACE;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;MAEA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;QACA;UACE;YACE;YACA;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;UACE;YACE;UACF;QACF;MACF;QACE;UACE;UACA;QACF;UACE;QACF;QACA;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;UACE;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;UACA;;QAEF;UACE;UACA;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;UACA;;QAEF;UACE;UACA;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;QACF;QACA;UACE;QACF;MACF;QACE;UACE;YACE;YACA;QACJ;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;QACE;MACF;MACA;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;UACE;QACF;UACE;QACF;QACA;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;YACE;QACJ;MACF;MACA;UACI;UACA;UACA;;MAEJ;MACA;QACE;QACA;;QAEA;UACE;UACA;UACA;YACE;YACA;cACE;YACF;UACF;UACA;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;YACI;QACJ;UACE;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;QACA;MACF;MACA;MACA;MACA;UACI;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;QACA;UACE;UACA;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;YACA;;QAEJ;QACA;UACE;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;;MAEA;QACE;QACA;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;UACE;YACE;YACA;QACJ;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;UACE;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;QACE;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;QACF;MACF;MACA;QACE;YACI;;QAEJ;UACE;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;MACA;QACE;QACA;MACF;QACE;QACA;QACA;MACF;MACA;QACE;QACA;UACE;YACE;UACF;UACA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;QACF;UACE;QACF;MACF;;MAEA;QACE;UACE;QACF;QACA;QACA;UACE;UACA;UACA;YACE;UACF;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;;QAEA;UACE;QACF;UACE;YACE;UACF;UACA;cACI;;UAEJ;YACE;cACE;YACF;YACA;YACA;UACF;UACA;YACE;UACF;QACF;QACA;UACE;QACF;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;MACJ;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;QACE;UACE;QACF;QACA;QACA;;QAEA;QACA;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;QACE;MACF;QACE;QACA;MACF;MACA;MACA;MACA;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;MACA;QACE;MACF;MACA;UACI;UACA;;MAEJ;MACA;QACE;QACA;QACA;UACE;UACA;QACF;MACF;MACA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;QACF;QACA;QACA;QACA;QACA;MACF;MACA;QACE;MACF;QACE;MACF;MACA;UACI;;MAEJ;QACE;QACA;UACE;YACE;gBACI;gBACA;;YAEJ;YACA;YACA;cACE;gBACE;cACF;cACA;cACA;YACF;YACA;UACF;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;UACA;QACF;QACA;UACE;UACA;QACF;MACF;MACA;QACE;MACF;MACA;MACA;QACE;QACA;MACF;QACE;MACF;MACA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;;MAEA;UACI;UACA;;MAEJ;UACI;UACA;UACA;;MAEJ;MACA;QACE;QACA;QACA;QACA;MACF;;MAEA;QACE;;QAEA;QACA;;QAEA;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;UACE;QACF;QACA;;QAEA;QACA;QACA;MACF;;MAEA;;MAEA;MACA;MACA;UACI;;MAEJ;QACE;QACA;MACF;MACA;MACA;QACE;QACA;;MAEF;MACA;QACE;QACA;QACA;UACE;YACE;UACF;QACF;QACA;QACA;;MAEF;MACA;MACA;;MAEA;QACE;MACF;QACE;QACA;MACF;MACA;QACE;MACF;MACA;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;UACI;;MAEJ;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;;IAEA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;MACE;MACA;QACE;UACE;cACI;;UAEJ;YACE;YACA;QACJ;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;IACA;IACA;IACA;IACA;;IAEA;IACA;MACE;MACA;QACE;YACI;;QAEJ;UACE;UACA;MACJ;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;IACF;;IAEA;IACA;IACA;MACE;QACE;YACI;;QAEJ;UACE;cACI;cACA;;UAEJ;YACE;UACF;UACA;YACE;YACA;QACJ;MACF;IACF;;IAEA;EACF;;EAEA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;IACF;EACF;EACA;EACA;IACE;IACA;MACE;IACF;IACA;IACA;MACE;IACF;EACF;EACA;IACE;IACA;EACF;AACF;;ACp/NA;AACA;AACA;AACA;AACA;AACA;;AAEA;EACE;;EAEA;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;IACA;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;;EAEA;IACE;MACE;IACF;MACE;IACF;MACE;EACJ;;EAEA;EACA;IACE;IACA;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;IACE;MACE;IACF;;IAEA;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;QACA;UACE;QACF;QACA;UACE;UACA;YACE;YACA;cACE;gBACE;cACF;cACA;YACF;UACF;YACE;UACF;UACA;YACE;UACF;;UAEA;YACE;UACF;UACA;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;UACA;UACA;UACA;UACA;UACA;QACF;MACF;MACA;IACF;;IAEA;;IAEA;MACE;MACA;QACE;UACE;QACF;QACA;UACE;QACF;QACA;UACE;YACE;YACA;YACA;cACE;cACA;gBACE;kBACE;gBACF;gBACA;kBACE;gBACF;gBACA;kBACE;gBACF;cACF;YACF;YACA;cACE;YACF;YACA;UACF;UACA;YACE;UACF;UACA;YACE;UACF;UACA;QACF;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;EACF;;;;EAIA;;EAEA;;IAEE;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;QACE;QACA;;MAEF;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;QACE;;QAEA;UACE;QACF;UACE;QACF;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;QACE;;MAEF;;MAEA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;;MAEA;MACA;;MAEA;;MAEA;QACE;;MAEF;QACE;MACF;QACE;;MAEF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;;MAEA;;MAEA;QACE;MACF;QACE;;MAEF;QACE;UACE;UACA;QACF;UACE;UACA;kBACQ;QACV;UACE;UACA;QACF;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;QACE;;MAEF;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;;MAEA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;;MAEA;UACI;UACA;;MAEJ;QACE;QACA;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;MACF;;MAEA;IACF;;IAEA;MACE;;MAEA;;MAEA;MACA;;MAEA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;QACE;QACA;QACA;;MAEF;QACE;;QAEA;UACE;UACA;YACE;YACA;cACE;UACJ;UACA;QACF;MACF;;MAEA;QACE;;MAEF;IACF;;IAEA;MACE;MACA;MACA;;MAEA;;MAEA;;MAEA;QACE;UACE;YACE;cACE;YACF;cACE;UACJ;YACE;;UAEF;UACA;QACF;;MAEF;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EACA;IACE;MACE;;IAEF;EACF;;EAEA;EACA;IACE;;;EAGF;EACA;EACA;EACA;AACF","file":"libs.js","sourcesContent":["/**\n * @license AngularJS v1.3.0-rc.3\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, document, undefined) {'use strict';\n\n/**\n * @description\n *\n * This object provides a utility for producing rich Error messages within\n * Angular. It can be called as follows:\n *\n * var exampleMinErr = minErr('example');\n * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n *\n * The above creates an instance of minErr in the example namespace. The\n * resulting error will have a namespaced error code of example.one. The\n * resulting error will replace {0} with the value of foo, and {1} with the\n * value of bar. The object is not restricted in the number of arguments it can\n * take.\n *\n * If fewer arguments are specified than necessary for interpolation, the extra\n * interpolation markers will be preserved in the final string.\n *\n * Since data will be parsed statically during a build step, some restrictions\n * are applied with respect to how minErr instances are created and called.\n * Instances should have names of the form namespaceMinErr for a minErr created\n * using minErr('namespace') . Error codes, namespaces and template strings\n * should all be static strings, not variables or general expressions.\n *\n * @param {string} module The namespace to use for the new minErr instance.\n * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning\n * error from returned function, for cases when a particular type of error is useful.\n * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance\n */\n\nfunction minErr(module, ErrorConstructor) {\n ErrorConstructor = ErrorConstructor || Error;\n return function () {\n var code = arguments[0],\n prefix = '[' + (module ? module + ':' : '') + code + '] ',\n template = arguments[1],\n templateArgs = arguments,\n stringify = function (obj) {\n if (typeof obj === 'function') {\n return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n } else if (typeof obj === 'undefined') {\n return 'undefined';\n } else if (typeof obj !== 'string') {\n return JSON.stringify(obj);\n }\n return obj;\n },\n message, i;\n\n message = prefix + template.replace(/\\{\\d+\\}/g, function (match) {\n var index = +match.slice(1, -1), arg;\n\n if (index + 2 < templateArgs.length) {\n arg = templateArgs[index + 2];\n if (typeof arg === 'function') {\n return arg.toString().replace(/ ?\\{[\\s\\S]*$/, '');\n } else if (typeof arg === 'undefined') {\n return 'undefined';\n } else if (typeof arg !== 'string') {\n return toJson(arg);\n }\n return arg;\n }\n return match;\n });\n\n message = message + '\\nhttp://errors.angularjs.org/1.3.0-rc.3/' +\n (module ? module + '/' : '') + code;\n for (i = 2; i < arguments.length; i++) {\n message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +\n encodeURIComponent(stringify(arguments[i]));\n }\n return new ErrorConstructor(message);\n };\n}\n\n/* We need to tell jshint what variables are being exported */\n/* global angular: true,\n msie: true,\n jqLite: true,\n jQuery: true,\n slice: true,\n push: true,\n toString: true,\n ngMinErr: true,\n angularModule: true,\n uid: true,\n REGEX_STRING_REGEXP: true,\n VALIDITY_STATE_PROPERTY: true,\n\n lowercase: true,\n uppercase: true,\n manualLowercase: true,\n manualUppercase: true,\n nodeName_: true,\n isArrayLike: true,\n forEach: true,\n sortedKeys: true,\n forEachSorted: true,\n reverseParams: true,\n nextUid: true,\n setHashKey: true,\n extend: true,\n int: true,\n inherit: true,\n noop: true,\n identity: true,\n valueFn: true,\n isUndefined: true,\n isDefined: true,\n isObject: true,\n isString: true,\n isNumber: true,\n isDate: true,\n isArray: true,\n isFunction: true,\n isRegExp: true,\n isWindow: true,\n isScope: true,\n isFile: true,\n isBlob: true,\n isBoolean: true,\n isPromiseLike: true,\n trim: true,\n isElement: true,\n makeMap: true,\n size: true,\n includes: true,\n arrayRemove: true,\n isLeafNode: true,\n copy: true,\n shallowCopy: true,\n equals: true,\n csp: true,\n concat: true,\n sliceArgs: true,\n bind: true,\n toJsonReplacer: true,\n toJson: true,\n fromJson: true,\n startingTag: true,\n tryDecodeURIComponent: true,\n parseKeyValue: true,\n toKeyValue: true,\n encodeUriSegment: true,\n encodeUriQuery: true,\n angularInit: true,\n bootstrap: true,\n getTestability: true,\n snake_case: true,\n bindJQuery: true,\n assertArg: true,\n assertArgFn: true,\n assertNotHasOwnProperty: true,\n getter: true,\n getBlockNodes: true,\n hasOwnProperty: true,\n createMap: true,\n*/\n\n////////////////////////////////////\n\n/**\n * @ngdoc module\n * @name ng\n * @module ng\n * @description\n *\n * # ng (core module)\n * The ng module is loaded by default when an AngularJS application is started. The module itself\n * contains the essential components for an AngularJS application to function. The table below\n * lists a high level breakdown of each of the services/factories, filters, directives and testing\n * components available within this core module.\n *\n * \n */\n\nvar REGEX_STRING_REGEXP = /^\\/(.+)\\/([a-z]*)$/;\n\n// The name of a form control's ValidityState property.\n// This is used so that it's possible for internal tests to create mock ValidityStates.\nvar VALIDITY_STATE_PROPERTY = 'validity';\n\n/**\n * @ngdoc function\n * @name angular.lowercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to lowercase.\n * @param {string} string String to be converted to lowercase.\n * @returns {string} Lowercased string.\n */\nvar lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * @ngdoc function\n * @name angular.uppercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to uppercase.\n * @param {string} string String to be converted to uppercase.\n * @returns {string} Uppercased string.\n */\nvar uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};\n\n\nvar manualLowercase = function(s) {\n /* jshint bitwise: false */\n return isString(s)\n ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})\n : s;\n};\nvar manualUppercase = function(s) {\n /* jshint bitwise: false */\n return isString(s)\n ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})\n : s;\n};\n\n\n// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish\n// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods\n// with correct but slower alternatives.\nif ('i' !== 'I'.toLowerCase()) {\n lowercase = manualLowercase;\n uppercase = manualUppercase;\n}\n\n\nvar /** holds major version number for IE or NaN for real browsers */\n msie,\n jqLite, // delay binding since jQuery could be loaded after us.\n jQuery, // delay binding\n slice = [].slice,\n push = [].push,\n toString = Object.prototype.toString,\n ngMinErr = minErr('ng'),\n\n /** @name angular */\n angular = window.angular || (window.angular = {}),\n angularModule,\n uid = 0;\n\n/**\n * IE 11 changed the format of the UserAgent string.\n * See http://msdn.microsoft.com/en-us/library/ms537503.aspx\n */\nmsie = int((/msie (\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\nif (isNaN(msie)) {\n msie = int((/trident\\/.*; rv:(\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\n}\n\n\n/**\n * @private\n * @param {*} obj\n * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,\n * String ...)\n */\nfunction isArrayLike(obj) {\n if (obj == null || isWindow(obj)) {\n return false;\n }\n\n var length = obj.length;\n\n if (obj.nodeType === 1 && length) {\n return true;\n }\n\n return isString(obj) || isArray(obj) || length === 0 ||\n typeof length === 'number' && length > 0 && (length - 1) in obj;\n}\n\n/**\n * @ngdoc function\n * @name angular.forEach\n * @module ng\n * @kind function\n *\n * @description\n * Invokes the `iterator` function once for each item in `obj` collection, which can be either an\n * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`\n * is the value of an object property or an array element, `key` is the object property key or\n * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.\n *\n * It is worth noting that `.forEach` does not iterate over inherited properties because it filters\n * using the `hasOwnProperty` method.\n *\n ```js\n var values = {name: 'misko', gender: 'male'};\n var log = [];\n angular.forEach(values, function(value, key) {\n this.push(key + ': ' + value);\n }, log);\n expect(log).toEqual(['name: misko', 'gender: male']);\n ```\n *\n * @param {Object|Array} obj Object to iterate over.\n * @param {Function} iterator Iterator function.\n * @param {Object=} context Object to become context (`this`) for the iterator function.\n * @returns {Object|Array} Reference to `obj`.\n */\n\nfunction forEach(obj, iterator, context) {\n var key, length;\n if (obj) {\n if (isFunction(obj)) {\n for (key in obj) {\n // Need to check if hasOwnProperty exists,\n // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function\n if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (isArray(obj) || isArrayLike(obj)) {\n var isPrimitive = typeof obj !== 'object';\n for (key = 0, length = obj.length; key < length; key++) {\n if (isPrimitive || key in obj) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (obj.forEach && obj.forEach !== forEach) {\n obj.forEach(iterator, context, obj);\n } else {\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n }\n }\n return obj;\n}\n\nfunction sortedKeys(obj) {\n var keys = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n return keys.sort();\n}\n\nfunction forEachSorted(obj, iterator, context) {\n var keys = sortedKeys(obj);\n for ( var i = 0; i < keys.length; i++) {\n iterator.call(context, obj[keys[i]], keys[i]);\n }\n return keys;\n}\n\n\n/**\n * when using forEach the params are value, key, but it is often useful to have key, value.\n * @param {function(string, *)} iteratorFn\n * @returns {function(*, string)}\n */\nfunction reverseParams(iteratorFn) {\n return function(value, key) { iteratorFn(key, value); };\n}\n\n/**\n * A consistent way of creating unique IDs in angular.\n *\n * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before\n * we hit number precision issues in JavaScript.\n *\n * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M\n *\n * @returns {number} an unique alpha-numeric string\n */\nfunction nextUid() {\n return ++uid;\n}\n\n\n/**\n * Set or clear the hashkey for an object.\n * @param obj object\n * @param h the hashkey (!truthy to delete the hashkey)\n */\nfunction setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.extend\n * @module ng\n * @kind function\n *\n * @description\n * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n * to `dst`. You can specify multiple `src` objects.\n *\n * @param {Object} dst Destination object.\n * @param {...Object} src Source object(s).\n * @returns {Object} Reference to `dst`.\n */\nfunction extend(dst) {\n var h = dst.$$hashKey;\n\n for (var i = 1, ii = arguments.length; i < ii; i++) {\n var obj = arguments[i];\n if (obj) {\n var keys = Object.keys(obj);\n for (var j = 0, jj = keys.length; j < jj; j++) {\n var key = keys[j];\n dst[key] = obj[key];\n }\n }\n }\n\n setHashKey(dst, h);\n return dst;\n}\n\nfunction int(str) {\n return parseInt(str, 10);\n}\n\n\nfunction inherit(parent, extra) {\n return extend(new (extend(function() {}, {prototype:parent}))(), extra);\n}\n\n/**\n * @ngdoc function\n * @name angular.noop\n * @module ng\n * @kind function\n *\n * @description\n * A function that performs no operations. This function can be useful when writing code in the\n * functional style.\n ```js\n function foo(callback) {\n var result = calculateResult();\n (callback || angular.noop)(result);\n }\n ```\n */\nfunction noop() {}\nnoop.$inject = [];\n\n\n/**\n * @ngdoc function\n * @name angular.identity\n * @module ng\n * @kind function\n *\n * @description\n * A function that returns its first argument. This function is useful when writing code in the\n * functional style.\n *\n ```js\n function transformer(transformationFn, value) {\n return (transformationFn || angular.identity)(value);\n };\n ```\n */\nfunction identity($) {return $;}\nidentity.$inject = [];\n\n\nfunction valueFn(value) {return function() {return value;};}\n\n/**\n * @ngdoc function\n * @name angular.isUndefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is undefined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is undefined.\n */\nfunction isUndefined(value){return typeof value === 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is defined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is defined.\n */\nfunction isDefined(value){return typeof value !== 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isObject\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not\n * considered to be objects. Note that JavaScript arrays are objects.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Object` but not `null`.\n */\nfunction isObject(value){\n // http://jsperf.com/isobject4\n return value !== null && typeof value === 'object';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isString\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `String`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `String`.\n */\nfunction isString(value){return typeof value === 'string';}\n\n\n/**\n * @ngdoc function\n * @name angular.isNumber\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Number`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Number`.\n */\nfunction isNumber(value){return typeof value === 'number';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDate\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a value is a date.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Date`.\n */\nfunction isDate(value) {\n return toString.call(value) === '[object Date]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isArray\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Array`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Array`.\n */\nvar isArray = Array.isArray;\n\n/**\n * @ngdoc function\n * @name angular.isFunction\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Function`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Function`.\n */\nfunction isFunction(value){return typeof value === 'function';}\n\n\n/**\n * Determines if a value is a regular expression object.\n *\n * @private\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `RegExp`.\n */\nfunction isRegExp(value) {\n return toString.call(value) === '[object RegExp]';\n}\n\n\n/**\n * Checks if `obj` is a window object.\n *\n * @private\n * @param {*} obj Object to check\n * @returns {boolean} True if `obj` is a window obj.\n */\nfunction isWindow(obj) {\n return obj && obj.window === obj;\n}\n\n\nfunction isScope(obj) {\n return obj && obj.$evalAsync && obj.$watch;\n}\n\n\nfunction isFile(obj) {\n return toString.call(obj) === '[object File]';\n}\n\n\nfunction isBlob(obj) {\n return toString.call(obj) === '[object Blob]';\n}\n\n\nfunction isBoolean(value) {\n return typeof value === 'boolean';\n}\n\n\nfunction isPromiseLike(obj) {\n return obj && isFunction(obj.then);\n}\n\n\nvar trim = function(value) {\n return isString(value) ? value.trim() : value;\n};\n\n\n/**\n * @ngdoc function\n * @name angular.isElement\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a DOM element (or wrapped jQuery element).\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).\n */\nfunction isElement(node) {\n return !!(node &&\n (node.nodeName // we are a direct element\n || (node.prop && node.attr && node.find))); // we have an on and find method part of jQuery API\n}\n\n/**\n * @param str 'key1,key2,...'\n * @returns {object} in the form of {key1:true, key2:true, ...}\n */\nfunction makeMap(str) {\n var obj = {}, items = str.split(\",\"), i;\n for ( i = 0; i < items.length; i++ )\n obj[ items[i] ] = true;\n return obj;\n}\n\n\nfunction nodeName_(element) {\n return lowercase(element.nodeName || element[0].nodeName);\n}\n\n\n/**\n * @description\n * Determines the number of elements in an array, the number of properties an object has, or\n * the length of a string.\n *\n * Note: This function is used to augment the Object type in Angular expressions. See\n * {@link angular.Object} for more information about Angular arrays.\n *\n * @param {Object|Array|string} obj Object, array, or string to inspect.\n * @param {boolean} [ownPropsOnly=false] Count only \"own\" properties in an object\n * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.\n */\nfunction size(obj, ownPropsOnly) {\n var count = 0, key;\n\n if (isArray(obj) || isString(obj)) {\n return obj.length;\n } else if (isObject(obj)) {\n for (key in obj)\n if (!ownPropsOnly || obj.hasOwnProperty(key))\n count++;\n }\n\n return count;\n}\n\n\nfunction includes(array, obj) {\n return Array.prototype.indexOf.call(array, obj) != -1;\n}\n\nfunction arrayRemove(array, value) {\n var index = array.indexOf(value);\n if (index >=0)\n array.splice(index, 1);\n return value;\n}\n\nfunction isLeafNode (node) {\n if (node) {\n switch (nodeName_(node)) {\n case \"option\":\n case \"pre\":\n case \"title\":\n return true;\n }\n }\n return false;\n}\n\n/**\n * @ngdoc function\n * @name angular.copy\n * @module ng\n * @kind function\n *\n * @description\n * Creates a deep copy of `source`, which should be an object or an array.\n *\n * * If no destination is supplied, a copy of the object or array is created.\n * * If a destination is provided, all of its elements (for array) or properties (for objects)\n * are deleted and then all elements/properties from the source are copied to it.\n * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.\n * * If `source` is identical to 'destination' an exception will be thrown.\n *\n * @param {*} source The source that will be used to make a copy.\n * Can be any type, including primitives, `null`, and `undefined`.\n * @param {(Object|Array)=} destination Destination into which the source is copied. If\n * provided, must be of the same type as `source`.\n * @returns {*} The copy or updated `destination`, if `destination` was specified.\n *\n * @example\n \n \n \n \n Name: \n E-mail: \n Gender: male\n female\n RESET\n SAVE\n \n form = {{user | json}}\n master = {{master | json}}\n \n\n \n \n \n */\nfunction copy(source, destination, stackSource, stackDest) {\n if (isWindow(source) || isScope(source)) {\n throw ngMinErr('cpws',\n \"Can't copy! Making copies of Window or Scope instances is not supported.\");\n }\n\n if (!destination) {\n destination = source;\n if (source) {\n if (isArray(source)) {\n destination = copy(source, [], stackSource, stackDest);\n } else if (isDate(source)) {\n destination = new Date(source.getTime());\n } else if (isRegExp(source)) {\n destination = new RegExp(source.source, source.toString().match(/[^\\/]*$/)[0]);\n destination.lastIndex = source.lastIndex;\n } else if (isObject(source)) {\n var emptyObject = Object.create(Object.getPrototypeOf(source));\n destination = copy(source, emptyObject, stackSource, stackDest);\n }\n }\n } else {\n if (source === destination) throw ngMinErr('cpi',\n \"Can't copy! Source and destination are identical.\");\n\n stackSource = stackSource || [];\n stackDest = stackDest || [];\n\n if (isObject(source)) {\n var index = stackSource.indexOf(source);\n if (index !== -1) return stackDest[index];\n\n stackSource.push(source);\n stackDest.push(destination);\n }\n\n var result;\n if (isArray(source)) {\n destination.length = 0;\n for ( var i = 0; i < source.length; i++) {\n result = copy(source[i], null, stackSource, stackDest);\n if (isObject(source[i])) {\n stackSource.push(source[i]);\n stackDest.push(result);\n }\n destination.push(result);\n }\n } else {\n var h = destination.$$hashKey;\n if (isArray(destination)) {\n destination.length = 0;\n } else {\n forEach(destination, function(value, key) {\n delete destination[key];\n });\n }\n for ( var key in source) {\n if(source.hasOwnProperty(key)) {\n result = copy(source[key], null, stackSource, stackDest);\n if (isObject(source[key])) {\n stackSource.push(source[key]);\n stackDest.push(result);\n }\n destination[key] = result;\n }\n }\n setHashKey(destination,h);\n }\n\n }\n return destination;\n}\n\n/**\n * Creates a shallow copy of an object, an array or a primitive.\n *\n * Assumes that there are no proto properties for objects.\n */\nfunction shallowCopy(src, dst) {\n if (isArray(src)) {\n dst = dst || [];\n\n for (var i = 0, ii = src.length; i < ii; i++) {\n dst[i] = src[i];\n }\n } else if (isObject(src)) {\n dst = dst || {};\n\n for (var key in src) {\n if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst || src;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.equals\n * @module ng\n * @kind function\n *\n * @description\n * Determines if two objects or two values are equivalent. Supports value types, regular\n * expressions, arrays and objects.\n *\n * Two objects or values are considered equivalent if at least one of the following is true:\n *\n * * Both objects or values pass `===` comparison.\n * * Both objects or values are of the same type and all of their properties are equal by\n * comparing them with `angular.equals`.\n * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)\n * * Both values represent the same regular expression (In JavaScript,\n * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual\n * representation matches).\n *\n * During a property comparison, properties of `function` type and properties with names\n * that begin with `$` are ignored.\n *\n * Scope and DOMWindow objects are being compared only by identify (`===`).\n *\n * @param {*} o1 Object or value to compare.\n * @param {*} o2 Object or value to compare.\n * @returns {boolean} True if arguments are equal.\n */\nfunction equals(o1, o2) {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n if (t1 == t2) {\n if (t1 == 'object') {\n if (isArray(o1)) {\n if (!isArray(o2)) return false;\n if ((length = o1.length) == o2.length) {\n for(key=0; key 2 ? sliceArgs(arguments, 2) : [];\n if (isFunction(fn) && !(fn instanceof RegExp)) {\n return curryArgs.length\n ? function() {\n return arguments.length\n ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))\n : fn.apply(self, curryArgs);\n }\n : function() {\n return arguments.length\n ? fn.apply(self, arguments)\n : fn.call(self);\n };\n } else {\n // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)\n return fn;\n }\n}\n\n\nfunction toJsonReplacer(key, value) {\n var val = value;\n\n if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {\n val = undefined;\n } else if (isWindow(value)) {\n val = '$WINDOW';\n } else if (value && document === value) {\n val = '$DOCUMENT';\n } else if (isScope(value)) {\n val = '$SCOPE';\n }\n\n return val;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.toJson\n * @module ng\n * @kind function\n *\n * @description\n * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be\n * stripped since angular uses this notation internally.\n *\n * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.\n * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.\n * @returns {string|undefined} JSON-ified string representing `obj`.\n */\nfunction toJson(obj, pretty) {\n if (typeof obj === 'undefined') return undefined;\n return JSON.stringify(obj, toJsonReplacer, pretty ? ' ' : null);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.fromJson\n * @module ng\n * @kind function\n *\n * @description\n * Deserializes a JSON string.\n *\n * @param {string} json JSON string to deserialize.\n * @returns {Object|Array|string|number} Deserialized thingy.\n */\nfunction fromJson(json) {\n return isString(json)\n ? JSON.parse(json)\n : json;\n}\n\n\n/**\n * @returns {string} Returns the string representation of the element.\n */\nfunction startingTag(element) {\n element = jqLite(element).clone();\n try {\n // turns out IE does not let you set .html() on elements which\n // are not allowed to have children. So we just ignore it.\n element.empty();\n } catch(e) {}\n // As Per DOM Standards\n var TEXT_NODE = 3;\n var elemHtml = jqLite('').append(element).html();\n try {\n return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :\n elemHtml.\n match(/^(<[^>]+>)/)[1].\n replace(/^<([\\w\\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });\n } catch(e) {\n return lowercase(elemHtml);\n }\n\n}\n\n\n/////////////////////////////////////////////////\n\n/**\n * Tries to decode the URI component without throwing an exception.\n *\n * @private\n * @param str value potential URI component to check.\n * @returns {boolean} True if `value` can be decoded\n * with the decodeURIComponent function.\n */\nfunction tryDecodeURIComponent(value) {\n try {\n return decodeURIComponent(value);\n } catch(e) {\n // Ignore any invalid uri component\n }\n}\n\n\n/**\n * Parses an escaped url query string into key-value pairs.\n * @returns {Object.}\n */\nfunction parseKeyValue(/**string*/keyValue) {\n var obj = {}, key_value, key;\n forEach((keyValue || \"\").split('&'), function(keyValue) {\n if ( keyValue ) {\n key_value = keyValue.replace(/\\+/g,'%20').split('=');\n key = tryDecodeURIComponent(key_value[0]);\n if ( isDefined(key) ) {\n var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;\n if (!hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n } else if(isArray(obj[key])) {\n obj[key].push(val);\n } else {\n obj[key] = [obj[key],val];\n }\n }\n }\n });\n return obj;\n}\n\nfunction toKeyValue(obj) {\n var parts = [];\n forEach(obj, function(value, key) {\n if (isArray(value)) {\n forEach(value, function(arrayValue) {\n parts.push(encodeUriQuery(key, true) +\n (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));\n });\n } else {\n parts.push(encodeUriQuery(key, true) +\n (value === true ? '' : '=' + encodeUriQuery(value, true)));\n }\n });\n return parts.length ? parts.join('&') : '';\n}\n\n\n/**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n * segments:\n * segment = *pchar\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriSegment(val) {\n return encodeUriQuery(val, true).\n replace(/%26/gi, '&').\n replace(/%3D/gi, '=').\n replace(/%2B/gi, '+');\n}\n\n\n/**\n * This method is intended for encoding *key* or *value* parts of query component. We need a custom\n * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be\n * encoded per http://tools.ietf.org/html/rfc3986:\n * query = *( pchar / \"/\" / \"?\" )\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriQuery(val, pctEncodeSpaces) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%3B/gi, ';').\n replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n}\n\nvar ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];\n\nfunction getNgAttribute(element, ngAttr) {\n var attr, i, ii = ngAttrPrefixes.length;\n element = jqLite(element);\n for (i=0; i` or `` tags.\n *\n * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`\n * found in the document will be used to define the root element to auto-bootstrap as an\n * application. To run multiple applications in an HTML document you must manually bootstrap them using\n * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.\n *\n * You can specify an **AngularJS module** to be used as the root module for the application. This\n * module will be loaded into the {@link auto.$injector} when the application is bootstrapped and\n * should contain the application code needed or have dependencies on other modules that will\n * contain the code. See {@link angular.module} for more information.\n *\n * In the example below if the `ngApp` directive were not placed on the `html` element then the\n * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`\n * would not be resolved to `3`.\n *\n * `ngApp` is the easiest, and most common, way to bootstrap an application.\n *\n \n \n \n I can add: {{a}} + {{b}} = {{ a+b }}\n \n \n \n angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n });\n \n \n *\n * Using `ngStrictDi`, you would see something like this:\n *\n \n \n \n \n I can add: {{a}} + {{b}} = {{ a+b }}\n\n This renders because the controller does not fail to\n instantiate, by using explicit annotation style (see\n script.js for details)\n \n \n\n \n Name: \n Hello, {{name}}!\n\n This renders because the controller does not fail to\n instantiate, by using explicit annotation style\n (see script.js for details)\n \n \n\n \n I can add: {{a}} + {{b}} = {{ a+b }}\n\n The controller could not be instantiated, due to relying\n on automatic function annotations (which are disabled in\n strict mode). As such, the content of this section is not\n interpolated, and there should be an error in your web console.\n \n \n \n \n \n angular.module('ngAppStrictDemo', [])\n // BadController will fail to instantiate, due to relying on automatic function annotation,\n // rather than an explicit annotation\n .controller('BadController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n })\n // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,\n // due to using explicit annotations using the array style and $inject property, respectively.\n .controller('GoodController1', ['$scope', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n }])\n .controller('GoodController2', GoodController2);\n function GoodController2($scope) {\n $scope.name = \"World\";\n }\n GoodController2.$inject = ['$scope'];\n \n \n div[ng-controller] {\n margin-bottom: 1em;\n -webkit-border-radius: 4px;\n border-radius: 4px;\n border: 1px solid;\n padding: .5em;\n }\n div[ng-controller^=Good] {\n border-color: #d6e9c6;\n background-color: #dff0d8;\n color: #3c763d;\n }\n div[ng-controller^=Bad] {\n border-color: #ebccd1;\n background-color: #f2dede;\n color: #a94442;\n margin-bottom: 0;\n }\n \n \n */\nfunction angularInit(element, bootstrap) {\n var appElement,\n module,\n config = {};\n\n // The element `element` has priority over any other element\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n\n if (!appElement && element.hasAttribute && element.hasAttribute(name)) {\n appElement = element;\n module = element.getAttribute(name);\n }\n });\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n var candidate;\n\n if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\\\:') + ']'))) {\n appElement = candidate;\n module = candidate.getAttribute(name);\n }\n });\n if (appElement) {\n config.strictDi = getNgAttribute(appElement, \"strict-di\") !== null;\n bootstrap(appElement, module ? [module] : [], config);\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.bootstrap\n * @module ng\n * @description\n * Use this function to manually start up angular application.\n *\n * See: {@link guide/bootstrap Bootstrap}\n *\n * Note that Protractor based end-to-end tests cannot use this function to bootstrap manually.\n * They must use {@link ng.directive:ngApp ngApp}.\n *\n * Angular will detect if it has been loaded into the browser more than once and only allow the\n * first loaded script to be bootstrapped and will report a warning to the browser console for\n * each of the subsequent scripts. This prevents strange results in applications, where otherwise\n * multiple instances of Angular try to work on the DOM.\n *\n * ```html\n * \n * \n * \n * \n * {{greeting}}\n * \n *\n * \n * \n * \n * \n * ```\n *\n * @param {DOMElement} element DOM element which is the root of angular application.\n * @param {Array=} modules an array of modules to load into the application.\n * Each item in the array should be the name of a predefined module or a (DI annotated)\n * function that will be invoked by the injector as a run block.\n * See: {@link angular.module modules}\n * @param {Object=} config an object for defining configuration options for the application. The\n * following keys are supported:\n *\n * - `strictDi`: disable automatic function annotation for the application. This is meant to\n * assist in finding bugs which break minified code.\n *\n * @returns {auto.$injector} Returns the newly created injector for this app.\n */\nfunction bootstrap(element, modules, config) {\n if (!isObject(config)) config = {};\n var defaultConfig = {\n strictDi: false\n };\n config = extend(defaultConfig, config);\n var doBootstrap = function() {\n element = jqLite(element);\n\n if (element.injector()) {\n var tag = (element[0] === document) ? 'document' : startingTag(element);\n //Encode angle brackets to prevent input from being sanitized to empty string #8683\n throw ngMinErr(\n 'btstrpd',\n \"App Already Bootstrapped with this Element '{0}'\",\n tag.replace(/,'<').replace(/>/,'>'));\n }\n\n modules = modules || [];\n modules.unshift(['$provide', function($provide) {\n $provide.value('$rootElement', element);\n }]);\n\n if (config.debugInfoEnabled) {\n // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.\n modules.push(['$compileProvider', function($compileProvider) {\n $compileProvider.debugInfoEnabled(true);\n }]);\n }\n\n modules.unshift('ng');\n var injector = createInjector(modules, config.strictDi);\n injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',\n function bootstrapApply(scope, element, compile, injector) {\n scope.$apply(function() {\n element.data('$injector', injector);\n compile(element)(scope);\n });\n }]\n );\n return injector;\n };\n\n var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;\n var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\n if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {\n config.debugInfoEnabled = true;\n window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');\n }\n\n if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n return doBootstrap();\n }\n\n window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n angular.resumeBootstrap = function(extraModules) {\n forEach(extraModules, function(module) {\n modules.push(module);\n });\n doBootstrap();\n };\n}\n\n/**\n * @ngdoc function\n * @name angular.reloadWithDebugInfo\n * @module ng\n * @description\n * Use this function to reload the current application with debug information turned on.\n * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.\n *\n * See {@link ng.$compileProvider#debugInfoEnabled} for more.\n */\nfunction reloadWithDebugInfo() {\n window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;\n window.location.reload();\n}\n\n/**\n * @name angular.getTestability\n * @module ng\n * @description\n * Get the testability service for the instance of Angular on the given\n * element.\n * @param {DOMElement} element DOM element which is the root of angular application.\n */\nfunction getTestability(rootElement) {\n return angular.element(rootElement).injector().get('$$testability');\n}\n\nvar SNAKE_CASE_REGEXP = /[A-Z]/g;\nfunction snake_case(name, separator) {\n separator = separator || '_';\n return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n return (pos ? separator : '') + letter.toLowerCase();\n });\n}\n\nvar bindJQueryFired = false;\nvar skipDestroyOnNextJQueryCleanData;\nfunction bindJQuery() {\n var originalCleanData;\n\n if (bindJQueryFired) {\n return;\n }\n\n // bind to jQuery if present;\n jQuery = window.jQuery;\n // Use jQuery if it exists with proper functionality, otherwise default to us.\n // Angular 1.2+ requires jQuery 1.7+ for on()/off() support.\n // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older\n // versions. It will not work for sure with jQuery <1.7, though.\n if (jQuery && jQuery.fn.on) {\n jqLite = jQuery;\n extend(jQuery.fn, {\n scope: JQLitePrototype.scope,\n isolateScope: JQLitePrototype.isolateScope,\n controller: JQLitePrototype.controller,\n injector: JQLitePrototype.injector,\n inheritedData: JQLitePrototype.inheritedData\n });\n\n // All nodes removed from the DOM via various jQuery APIs like .remove()\n // are passed through jQuery.cleanData. Monkey-patch this method to fire\n // the $destroy event on all removed nodes.\n originalCleanData = jQuery.cleanData;\n jQuery.cleanData = function(elems) {\n var events;\n if (!skipDestroyOnNextJQueryCleanData) {\n for (var i = 0, elem; (elem = elems[i]) != null; i++) {\n events = jQuery._data(elem, \"events\");\n if (events && events.$destroy) {\n jQuery(elem).triggerHandler('$destroy');\n }\n }\n } else {\n skipDestroyOnNextJQueryCleanData = false;\n }\n originalCleanData(elems);\n };\n } else {\n jqLite = JQLite;\n }\n\n angular.element = jqLite;\n\n // Prevent double-proxying.\n bindJQueryFired = true;\n}\n\n/**\n * throw error if the argument is falsy.\n */\nfunction assertArg(arg, name, reason) {\n if (!arg) {\n throw ngMinErr('areq', \"Argument '{0}' is {1}\", (name || '?'), (reason || \"required\"));\n }\n return arg;\n}\n\nfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n if (acceptArrayAnnotation && isArray(arg)) {\n arg = arg[arg.length - 1];\n }\n\n assertArg(isFunction(arg), name, 'not a function, got ' +\n (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));\n return arg;\n}\n\n/**\n * throw error if the name given is hasOwnProperty\n * @param {String} name the name to test\n * @param {String} context the context in which the name is used, such as module or directive\n */\nfunction assertNotHasOwnProperty(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', \"hasOwnProperty is not a valid {0} name\", context);\n }\n}\n\n/**\n * Return the value accessible from the object by path. Any undefined traversals are ignored\n * @param {Object} obj starting object\n * @param {String} path path to traverse\n * @param {boolean} [bindFnToScope=true]\n * @returns {Object} value as accessible by path\n */\n//TODO(misko): this function needs to be removed\nfunction getter(obj, path, bindFnToScope) {\n if (!path) return obj;\n var keys = path.split('.');\n var key;\n var lastInstance = obj;\n var len = keys.length;\n\n for (var i = 0; i < len; i++) {\n key = keys[i];\n if (obj) {\n obj = (lastInstance = obj)[key];\n }\n }\n if (!bindFnToScope && isFunction(obj)) {\n return bind(lastInstance, obj);\n }\n return obj;\n}\n\n/**\n * Return the DOM siblings between the first and last node in the given array.\n * @param {Array} array like object\n * @returns {jqLite} jqLite collection containing the nodes\n */\nfunction getBlockNodes(nodes) {\n // TODO(perf): just check if all items in `nodes` are siblings and if they are return the original\n // collection, otherwise update the original collection.\n var node = nodes[0];\n var endNode = nodes[nodes.length - 1];\n var blockNodes = [node];\n\n do {\n node = node.nextSibling;\n if (!node) break;\n blockNodes.push(node);\n } while (node !== endNode);\n\n return jqLite(blockNodes);\n}\n\n\n/**\n * Creates a new object without a prototype. This object is useful for lookup without having to\n * guard against prototypically inherited properties via hasOwnProperty.\n *\n * Related micro-benchmarks:\n * - http://jsperf.com/object-create2\n * - http://jsperf.com/proto-map-lookup/2\n * - http://jsperf.com/for-in-vs-object-keys2\n *\n * @returns {Object}\n */\nfunction createMap() {\n return Object.create(null);\n}\n\n/**\n * @ngdoc type\n * @name angular.Module\n * @module ng\n * @description\n *\n * Interface for configuring angular {@link angular.module modules}.\n */\n\nfunction setupModuleLoader(window) {\n\n var $injectorMinErr = minErr('$injector');\n var ngMinErr = minErr('ng');\n\n function ensure(obj, name, factory) {\n return obj[name] || (obj[name] = factory());\n }\n\n var angular = ensure(window, 'angular', Object);\n\n // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n angular.$$minErr = angular.$$minErr || minErr;\n\n return ensure(angular, 'module', function() {\n /** @type {Object.} */\n var modules = {};\n\n /**\n * @ngdoc function\n * @name angular.module\n * @module ng\n * @description\n *\n * The `angular.module` is a global place for creating, registering and retrieving Angular\n * modules.\n * All modules (angular core or 3rd party) that should be available to an application must be\n * registered using this mechanism.\n *\n * When passed two or more arguments, a new module is created. If passed only one argument, an\n * existing module (the name passed as the first argument to `module`) is retrieved.\n *\n *\n * # Module\n *\n * A module is a collection of services, directives, controllers, filters, and configuration information.\n * `angular.module` is used to configure the {@link auto.$injector $injector}.\n *\n * ```js\n * // Create a new module\n * var myModule = angular.module('myModule', []);\n *\n * // register a new service\n * myModule.value('appName', 'MyCoolApp');\n *\n * // configure existing services inside initialization blocks.\n * myModule.config(['$locationProvider', function($locationProvider) {\n * // Configure existing providers\n * $locationProvider.hashPrefix('!');\n * }]);\n * ```\n *\n * Then you can create an injector and load your modules like this:\n *\n * ```js\n * var injector = angular.injector(['ng', 'myModule'])\n * ```\n *\n * However it's more likely that you'll just use\n * {@link ng.directive:ngApp ngApp} or\n * {@link angular.bootstrap} to simplify this process for you.\n *\n * @param {!string} name The name of the module to create or retrieve.\n * @param {!Array.=} requires If specified then new module is being created. If\n * unspecified then the module is being retrieved for further configuration.\n * @param {Function=} configFn Optional configuration function for the module. Same as\n * {@link angular.Module#config Module#config()}.\n * @returns {module} new module with the {@link angular.Module} api.\n */\n return function module(name, requires, configFn) {\n var assertNotHasOwnProperty = function(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n }\n };\n\n assertNotHasOwnProperty(name, 'module');\n if (requires && modules.hasOwnProperty(name)) {\n modules[name] = null;\n }\n return ensure(modules, name, function() {\n if (!requires) {\n throw $injectorMinErr('nomod', \"Module '{0}' is not available! You either misspelled \" +\n \"the module name or forgot to load it. If registering a module ensure that you \" +\n \"specify the dependencies as the second argument.\", name);\n }\n\n /** @type {!Array.>} */\n var invokeQueue = [];\n\n /** @type {!Array.} */\n var configBlocks = [];\n\n /** @type {!Array.} */\n var runBlocks = [];\n\n var config = invokeLater('$injector', 'invoke', 'push', configBlocks);\n\n /** @type {angular.Module} */\n var moduleInstance = {\n // Private state\n _invokeQueue: invokeQueue,\n _configBlocks: configBlocks,\n _runBlocks: runBlocks,\n\n /**\n * @ngdoc property\n * @name angular.Module#requires\n * @module ng\n *\n * @description\n * Holds the list of modules which the injector will load before the current module is\n * loaded.\n */\n requires: requires,\n\n /**\n * @ngdoc property\n * @name angular.Module#name\n * @module ng\n *\n * @description\n * Name of the module.\n */\n name: name,\n\n\n /**\n * @ngdoc method\n * @name angular.Module#provider\n * @module ng\n * @param {string} name service name\n * @param {Function} providerType Construction function for creating new instance of the\n * service.\n * @description\n * See {@link auto.$provide#provider $provide.provider()}.\n */\n provider: invokeLater('$provide', 'provider'),\n\n /**\n * @ngdoc method\n * @name angular.Module#factory\n * @module ng\n * @param {string} name service name\n * @param {Function} providerFunction Function for creating new instance of the service.\n * @description\n * See {@link auto.$provide#factory $provide.factory()}.\n */\n factory: invokeLater('$provide', 'factory'),\n\n /**\n * @ngdoc method\n * @name angular.Module#service\n * @module ng\n * @param {string} name service name\n * @param {Function} constructor A constructor function that will be instantiated.\n * @description\n * See {@link auto.$provide#service $provide.service()}.\n */\n service: invokeLater('$provide', 'service'),\n\n /**\n * @ngdoc method\n * @name angular.Module#value\n * @module ng\n * @param {string} name service name\n * @param {*} object Service instance object.\n * @description\n * See {@link auto.$provide#value $provide.value()}.\n */\n value: invokeLater('$provide', 'value'),\n\n /**\n * @ngdoc method\n * @name angular.Module#constant\n * @module ng\n * @param {string} name constant name\n * @param {*} object Constant value.\n * @description\n * Because the constant are fixed, they get applied before other provide methods.\n * See {@link auto.$provide#constant $provide.constant()}.\n */\n constant: invokeLater('$provide', 'constant', 'unshift'),\n\n /**\n * @ngdoc method\n * @name angular.Module#animation\n * @module ng\n * @param {string} name animation name\n * @param {Function} animationFactory Factory function for creating new instance of an\n * animation.\n * @description\n *\n * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n *\n *\n * Defines an animation hook that can be later used with\n * {@link ngAnimate.$animate $animate} service and directives that use this service.\n *\n * ```js\n * module.animation('.animation-name', function($inject1, $inject2) {\n * return {\n * eventName : function(element, done) {\n * //code to run the animation\n * //once complete, then run done()\n * return function cancellationFunction(element) {\n * //code to cancel the animation\n * }\n * }\n * }\n * })\n * ```\n *\n * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and\n * {@link ngAnimate ngAnimate module} for more information.\n */\n animation: invokeLater('$animateProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#filter\n * @module ng\n * @param {string} name Filter name.\n * @param {Function} filterFactory Factory function for creating new instance of filter.\n * @description\n * See {@link ng.$filterProvider#register $filterProvider.register()}.\n */\n filter: invokeLater('$filterProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#controller\n * @module ng\n * @param {string|Object} name Controller name, or an object map of controllers where the\n * keys are the names and the values are the constructors.\n * @param {Function} constructor Controller constructor function.\n * @description\n * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n */\n controller: invokeLater('$controllerProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#directive\n * @module ng\n * @param {string|Object} name Directive name, or an object map of directives where the\n * keys are the names and the values are the factories.\n * @param {Function} directiveFactory Factory function for creating new instance of\n * directives.\n * @description\n * See {@link ng.$compileProvider#directive $compileProvider.directive()}.\n */\n directive: invokeLater('$compileProvider', 'directive'),\n\n /**\n * @ngdoc method\n * @name angular.Module#config\n * @module ng\n * @param {Function} configFn Execute this function on module load. Useful for service\n * configuration.\n * @description\n * Use this method to register work which needs to be performed on module loading.\n * For more about how to configure services, see\n * {@link providers#providers_provider-recipe Provider Recipe}.\n */\n config: config,\n\n /**\n * @ngdoc method\n * @name angular.Module#run\n * @module ng\n * @param {Function} initializationFn Execute this function after injector creation.\n * Useful for application initialization.\n * @description\n * Use this method to register work which should be performed when the injector is done\n * loading all modules.\n */\n run: function(block) {\n runBlocks.push(block);\n return this;\n }\n };\n\n if (configFn) {\n config(configFn);\n }\n\n return moduleInstance;\n\n /**\n * @param {string} provider\n * @param {string} method\n * @param {String=} insertMethod\n * @returns {angular.Module}\n */\n function invokeLater(provider, method, insertMethod, queue) {\n if (!queue) queue = invokeQueue;\n return function() {\n queue[insertMethod || 'push']([provider, method, arguments]);\n return moduleInstance;\n };\n }\n });\n };\n });\n\n}\n\n/* global angularModule: true,\n version: true,\n\n $LocaleProvider,\n $CompileProvider,\n\n htmlAnchorDirective,\n inputDirective,\n inputDirective,\n formDirective,\n scriptDirective,\n selectDirective,\n styleDirective,\n optionDirective,\n ngBindDirective,\n ngBindHtmlDirective,\n ngBindTemplateDirective,\n ngClassDirective,\n ngClassEvenDirective,\n ngClassOddDirective,\n ngCspDirective,\n ngCloakDirective,\n ngControllerDirective,\n ngFormDirective,\n ngHideDirective,\n ngIfDirective,\n ngIncludeDirective,\n ngIncludeFillContentDirective,\n ngInitDirective,\n ngNonBindableDirective,\n ngPluralizeDirective,\n ngRepeatDirective,\n ngShowDirective,\n ngStyleDirective,\n ngSwitchDirective,\n ngSwitchWhenDirective,\n ngSwitchDefaultDirective,\n ngOptionsDirective,\n ngTranscludeDirective,\n ngModelDirective,\n ngListDirective,\n ngChangeDirective,\n patternDirective,\n patternDirective,\n requiredDirective,\n requiredDirective,\n minlengthDirective,\n minlengthDirective,\n maxlengthDirective,\n maxlengthDirective,\n ngValueDirective,\n ngModelOptionsDirective,\n ngAttributeAliasDirectives,\n ngEventDirectives,\n\n $AnchorScrollProvider,\n $AnimateProvider,\n $BrowserProvider,\n $CacheFactoryProvider,\n $ControllerProvider,\n $DocumentProvider,\n $ExceptionHandlerProvider,\n $FilterProvider,\n $InterpolateProvider,\n $IntervalProvider,\n $HttpProvider,\n $HttpBackendProvider,\n $LocationProvider,\n $LogProvider,\n $ParseProvider,\n $RootScopeProvider,\n $QProvider,\n $$QProvider,\n $$SanitizeUriProvider,\n $SceProvider,\n $SceDelegateProvider,\n $SnifferProvider,\n $TemplateCacheProvider,\n $TemplateRequestProvider,\n $$TestabilityProvider,\n $TimeoutProvider,\n $$RAFProvider,\n $$AsyncCallbackProvider,\n $WindowProvider\n*/\n\n\n/**\n * @ngdoc object\n * @name angular.version\n * @module ng\n * @description\n * An object that contains information about the current AngularJS version. This object has the\n * following properties:\n *\n * - `full` – `{string}` – Full version string, such as \"0.9.18\".\n * - `major` – `{number}` – Major version number, such as \"0\".\n * - `minor` – `{number}` – Minor version number, such as \"9\".\n * - `dot` – `{number}` – Dot version number, such as \"18\".\n * - `codeName` – `{string}` – Code name of the release, such as \"jiggling-armfat\".\n */\nvar version = {\n full: '1.3.0-rc.3', // all of these placeholder strings will be replaced by grunt's\n major: 1, // package task\n minor: 3,\n dot: 0,\n codeName: 'aggressive-pacifism'\n};\n\n\nfunction publishExternalAPI(angular){\n extend(angular, {\n 'bootstrap': bootstrap,\n 'copy': copy,\n 'extend': extend,\n 'equals': equals,\n 'element': jqLite,\n 'forEach': forEach,\n 'injector': createInjector,\n 'noop': noop,\n 'bind': bind,\n 'toJson': toJson,\n 'fromJson': fromJson,\n 'identity': identity,\n 'isUndefined': isUndefined,\n 'isDefined': isDefined,\n 'isString': isString,\n 'isFunction': isFunction,\n 'isObject': isObject,\n 'isNumber': isNumber,\n 'isElement': isElement,\n 'isArray': isArray,\n 'version': version,\n 'isDate': isDate,\n 'lowercase': lowercase,\n 'uppercase': uppercase,\n 'callbacks': {counter: 0},\n 'getTestability': getTestability,\n '$$minErr': minErr,\n '$$csp': csp,\n 'reloadWithDebugInfo': reloadWithDebugInfo,\n '$$hasClass': jqLiteHasClass\n });\n\n angularModule = setupModuleLoader(window);\n try {\n angularModule('ngLocale');\n } catch (e) {\n angularModule('ngLocale', []).provider('$locale', $LocaleProvider);\n }\n\n angularModule('ng', ['ngLocale'], ['$provide',\n function ngModule($provide) {\n // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n $provide.provider({\n $$sanitizeUri: $$SanitizeUriProvider\n });\n $provide.provider('$compile', $CompileProvider).\n directive({\n a: htmlAnchorDirective,\n input: inputDirective,\n textarea: inputDirective,\n form: formDirective,\n script: scriptDirective,\n select: selectDirective,\n style: styleDirective,\n option: optionDirective,\n ngBind: ngBindDirective,\n ngBindHtml: ngBindHtmlDirective,\n ngBindTemplate: ngBindTemplateDirective,\n ngClass: ngClassDirective,\n ngClassEven: ngClassEvenDirective,\n ngClassOdd: ngClassOddDirective,\n ngCloak: ngCloakDirective,\n ngController: ngControllerDirective,\n ngForm: ngFormDirective,\n ngHide: ngHideDirective,\n ngIf: ngIfDirective,\n ngInclude: ngIncludeDirective,\n ngInit: ngInitDirective,\n ngNonBindable: ngNonBindableDirective,\n ngPluralize: ngPluralizeDirective,\n ngRepeat: ngRepeatDirective,\n ngShow: ngShowDirective,\n ngStyle: ngStyleDirective,\n ngSwitch: ngSwitchDirective,\n ngSwitchWhen: ngSwitchWhenDirective,\n ngSwitchDefault: ngSwitchDefaultDirective,\n ngOptions: ngOptionsDirective,\n ngTransclude: ngTranscludeDirective,\n ngModel: ngModelDirective,\n ngList: ngListDirective,\n ngChange: ngChangeDirective,\n pattern: patternDirective,\n ngPattern: patternDirective,\n required: requiredDirective,\n ngRequired: requiredDirective,\n minlength: minlengthDirective,\n ngMinlength: minlengthDirective,\n maxlength: maxlengthDirective,\n ngMaxlength: maxlengthDirective,\n ngValue: ngValueDirective,\n ngModelOptions: ngModelOptionsDirective\n }).\n directive({\n ngInclude: ngIncludeFillContentDirective\n }).\n directive(ngAttributeAliasDirectives).\n directive(ngEventDirectives);\n $provide.provider({\n $anchorScroll: $AnchorScrollProvider,\n $animate: $AnimateProvider,\n $browser: $BrowserProvider,\n $cacheFactory: $CacheFactoryProvider,\n $controller: $ControllerProvider,\n $document: $DocumentProvider,\n $exceptionHandler: $ExceptionHandlerProvider,\n $filter: $FilterProvider,\n $interpolate: $InterpolateProvider,\n $interval: $IntervalProvider,\n $http: $HttpProvider,\n $httpBackend: $HttpBackendProvider,\n $location: $LocationProvider,\n $log: $LogProvider,\n $parse: $ParseProvider,\n $rootScope: $RootScopeProvider,\n $q: $QProvider,\n $$q: $$QProvider,\n $sce: $SceProvider,\n $sceDelegate: $SceDelegateProvider,\n $sniffer: $SnifferProvider,\n $templateCache: $TemplateCacheProvider,\n $templateRequest: $TemplateRequestProvider,\n $$testability: $$TestabilityProvider,\n $timeout: $TimeoutProvider,\n $window: $WindowProvider,\n $$rAF: $$RAFProvider,\n $$asyncCallback : $$AsyncCallbackProvider\n });\n }\n ]);\n}\n\n/* global JQLitePrototype: true,\n addEventListenerFn: true,\n removeEventListenerFn: true,\n BOOLEAN_ATTR: true,\n ALIASED_ATTR: true,\n*/\n\n//////////////////////////////////\n//JQLite\n//////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.element\n * @module ng\n * @kind function\n *\n * @description\n * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n *\n * If jQuery is available, `angular.element` is an alias for the\n * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n * delegates to Angular's built-in subset of jQuery, called \"jQuery lite\" or \"jqLite.\"\n *\n * jqLite is a tiny, API-compatible subset of jQuery that allows\n * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most\n * commonly needed functionality with the goal of having a very small footprint.\n *\n * To use jQuery, simply load it before `DOMContentLoaded` event fired.\n *\n * **Note:** all element references in Angular are always wrapped with jQuery or\n * jqLite; they are never raw DOM references.\n *\n * ## Angular's jqLite\n * jqLite provides only the following jQuery methods:\n *\n * - [`addClass()`](http://api.jquery.com/addClass/)\n * - [`after()`](http://api.jquery.com/after/)\n * - [`append()`](http://api.jquery.com/append/)\n * - [`attr()`](http://api.jquery.com/attr/)\n * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData\n * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n * - [`clone()`](http://api.jquery.com/clone/)\n * - [`contents()`](http://api.jquery.com/contents/)\n * - [`css()`](http://api.jquery.com/css/)\n * - [`data()`](http://api.jquery.com/data/)\n * - [`detach()`](http://api.jquery.com/detach/)\n * - [`empty()`](http://api.jquery.com/empty/)\n * - [`eq()`](http://api.jquery.com/eq/)\n * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n * - [`hasClass()`](http://api.jquery.com/hasClass/)\n * - [`html()`](http://api.jquery.com/html/)\n * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors\n * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n * - [`prepend()`](http://api.jquery.com/prepend/)\n * - [`prop()`](http://api.jquery.com/prop/)\n * - [`ready()`](http://api.jquery.com/ready/)\n * - [`remove()`](http://api.jquery.com/remove/)\n * - [`removeAttr()`](http://api.jquery.com/removeAttr/)\n * - [`removeClass()`](http://api.jquery.com/removeClass/)\n * - [`removeData()`](http://api.jquery.com/removeData/)\n * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n * - [`text()`](http://api.jquery.com/text/)\n * - [`toggleClass()`](http://api.jquery.com/toggleClass/)\n * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.\n * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces\n * - [`val()`](http://api.jquery.com/val/)\n * - [`wrap()`](http://api.jquery.com/wrap/)\n *\n * ## jQuery/jqLite Extras\n * Angular also provides the following additional methods and events to both jQuery and jqLite:\n *\n * ### Events\n * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM\n * element before it is removed.\n *\n * ### Methods\n * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n * retrieves controller associated with the `ngController` directive. If `name` is provided as\n * camelCase directive name, then the controller for this directive will be retrieved (e.g.\n * `'ngModel'`).\n * - `injector()` - retrieves the injector of the current element or its parent.\n * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current\n * element or its parent.\n * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the\n * current element. This getter should be used only on elements that contain a directive which starts a new isolate\n * scope. Calling `scope()` on this element always returns the original non-isolate scope.\n * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n * parent element is reached.\n *\n * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n * @returns {Object} jQuery object.\n */\n\nJQLite.expando = 'ng339';\n\nvar jqCache = JQLite.cache = {},\n jqId = 1,\n addEventListenerFn = function(element, type, fn) {\n element.addEventListener(type, fn, false);\n },\n removeEventListenerFn = function(element, type, fn) {\n element.removeEventListener(type, fn, false);\n };\n\n/*\n * !!! This is an undocumented \"private\" function !!!\n */\nJQLite._data = function(node) {\n //jQuery always returns an object on cache miss\n return this.cache[node[this.expando]] || {};\n};\n\nfunction jqNextId() { return ++jqId; }\n\n\nvar SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\nvar MOZ_HACK_REGEXP = /^moz([A-Z])/;\nvar MOUSE_EVENT_MAP= { mouseleave : \"mouseout\", mouseenter : \"mouseover\"};\nvar jqLiteMinErr = minErr('jqLite');\n\n/**\n * Converts snake_case to camelCase.\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction camelCase(name) {\n return name.\n replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n return offset ? letter.toUpperCase() : letter;\n }).\n replace(MOZ_HACK_REGEXP, 'Moz$1');\n}\n\nvar SINGLE_TAG_REGEXP = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/;\nvar HTML_REGEXP = /<|?\\w+;/;\nvar TAG_NAME_REGEXP = /<([\\w:]+)/;\nvar XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi;\n\nvar wrapMap = {\n 'option': [1, '', ''],\n\n 'thead': [1, '', ''],\n 'col': [2, '', ''],\n 'tr': [2, '', ''],\n 'td': [3, '', ''],\n '_default': [0, \"\", \"\"]\n};\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction jqLiteIsTextNode(html) {\n return !HTML_REGEXP.test(html);\n}\n\nfunction jqLiteAcceptsData(node) {\n // The window object can accept data but has no nodeType\n // Otherwise we are only interested in elements (1) and documents (9)\n var nodeType = node.nodeType;\n return nodeType === 1 || !nodeType || nodeType === 9;\n}\n\nfunction jqLiteBuildFragment(html, context) {\n var tmp, tag, wrap,\n fragment = context.createDocumentFragment(),\n nodes = [], i;\n\n if (jqLiteIsTextNode(html)) {\n // Convert non-html into a text node\n nodes.push(context.createTextNode(html));\n } else {\n // Convert html into DOM nodes\n tmp = tmp || fragment.appendChild(context.createElement(\"div\"));\n tag = (TAG_NAME_REGEXP.exec(html) || [\"\", \"\"])[1].toLowerCase();\n wrap = wrapMap[tag] || wrapMap._default;\n tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, \"<$1>$2>\") + wrap[2];\n\n // Descend through wrappers to the right content\n i = wrap[0];\n while (i--) {\n tmp = tmp.lastChild;\n }\n\n nodes = concat(nodes, tmp.childNodes);\n\n tmp = fragment.firstChild;\n tmp.textContent = \"\";\n }\n\n // Remove wrapper from fragment\n fragment.textContent = \"\";\n fragment.innerHTML = \"\"; // Clear inner HTML\n forEach(nodes, function(node) {\n fragment.appendChild(node);\n });\n\n return fragment;\n}\n\nfunction jqLiteParseHTML(html, context) {\n context = context || document;\n var parsed;\n\n if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {\n return [context.createElement(parsed[1])];\n }\n\n if ((parsed = jqLiteBuildFragment(html, context))) {\n return parsed.childNodes;\n }\n\n return [];\n}\n\n/////////////////////////////////////////////\nfunction JQLite(element) {\n if (element instanceof JQLite) {\n return element;\n }\n\n var argIsString;\n\n if (isString(element)) {\n element = trim(element);\n argIsString = true;\n }\n if (!(this instanceof JQLite)) {\n if (argIsString && element.charAt(0) != '<') {\n throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n }\n return new JQLite(element);\n }\n\n if (argIsString) {\n jqLiteAddNodes(this, jqLiteParseHTML(element));\n } else {\n jqLiteAddNodes(this, element);\n }\n}\n\nfunction jqLiteClone(element) {\n return element.cloneNode(true);\n}\n\nfunction jqLiteDealoc(element, onlyDescendants){\n if (!onlyDescendants) jqLiteRemoveData(element);\n\n if (element.querySelectorAll) {\n var descendants = element.querySelectorAll('*');\n for (var i = 0, l = descendants.length; i < l; i++) {\n jqLiteRemoveData(descendants[i]);\n }\n }\n}\n\nfunction jqLiteOff(element, type, fn, unsupported) {\n if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var handle = expandoStore && expandoStore.handle;\n\n if (!handle) return; //no listeners registered\n\n if (!type) {\n for (type in events) {\n if (type !== '$destroy') {\n removeEventListenerFn(element, type, events[type]);\n }\n delete events[type];\n }\n } else {\n forEach(type.split(' '), function(type) {\n if (isUndefined(fn)) {\n removeEventListenerFn(element, type, events[type]);\n delete events[type];\n } else {\n arrayRemove(events[type] || [], fn);\n }\n });\n }\n}\n\nfunction jqLiteRemoveData(element, name) {\n var expandoId = element.ng339;\n var expandoStore = expandoId && jqCache[expandoId];\n\n if (expandoStore) {\n if (name) {\n delete expandoStore.data[name];\n return;\n }\n\n if (expandoStore.handle) {\n if (expandoStore.events.$destroy) {\n expandoStore.handle({}, '$destroy');\n }\n jqLiteOff(element);\n }\n delete jqCache[expandoId];\n element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it\n }\n}\n\n\nfunction jqLiteExpandoStore(element, createIfNecessary) {\n var expandoId = element.ng339,\n expandoStore = expandoId && jqCache[expandoId];\n\n if (createIfNecessary && !expandoStore) {\n element.ng339 = expandoId = jqNextId();\n expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};\n }\n\n return expandoStore;\n}\n\n\nfunction jqLiteData(element, key, value) {\n if (jqLiteAcceptsData(element)) {\n\n var isSimpleSetter = isDefined(value);\n var isSimpleGetter = !isSimpleSetter && key && !isObject(key);\n var massGetter = !key;\n var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);\n var data = expandoStore && expandoStore.data;\n\n if (isSimpleSetter) { // data('key', value)\n data[key] = value;\n } else {\n if (massGetter) { // data()\n return data;\n } else {\n if (isSimpleGetter) { // data('key')\n // don't force creation of expandoStore if it doesn't exist yet\n return data && data[key];\n } else { // mass-setter: data({key1: val1, key2: val2})\n extend(data, key);\n }\n }\n }\n }\n}\n\nfunction jqLiteHasClass(element, selector) {\n if (!element.getAttribute) return false;\n return ((\" \" + (element.getAttribute('class') || '') + \" \").replace(/[\\n\\t]/g, \" \").\n indexOf( \" \" + selector + \" \" ) > -1);\n}\n\nfunction jqLiteRemoveClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n forEach(cssClasses.split(' '), function(cssClass) {\n element.setAttribute('class', trim(\n (\" \" + (element.getAttribute('class') || '') + \" \")\n .replace(/[\\n\\t]/g, \" \")\n .replace(\" \" + trim(cssClass) + \" \", \" \"))\n );\n });\n }\n}\n\nfunction jqLiteAddClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n .replace(/[\\n\\t]/g, \" \");\n\n forEach(cssClasses.split(' '), function(cssClass) {\n cssClass = trim(cssClass);\n if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n existingClasses += cssClass + ' ';\n }\n });\n\n element.setAttribute('class', trim(existingClasses));\n }\n}\n\n\nfunction jqLiteAddNodes(root, elements) {\n // THIS CODE IS VERY HOT. Don't make changes without benchmarking.\n\n if (elements) {\n\n // if a Node (the most common case)\n if (elements.nodeType) {\n root[root.length++] = elements;\n } else {\n var length = elements.length;\n\n // if an Array or NodeList and not a Window\n if (typeof length === 'number' && elements.window !== elements) {\n if (length) {\n for (var i = 0; i < length; i++) {\n root[root.length++] = elements[i];\n }\n }\n } else {\n root[root.length++] = elements;\n }\n }\n }\n}\n\n\nfunction jqLiteController(element, name) {\n return jqLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');\n}\n\nfunction jqLiteInheritedData(element, name, value) {\n // if element is the document object work with the html element instead\n // this makes $(document).scope() possible\n if(element.nodeType == 9) {\n element = element.documentElement;\n }\n var names = isArray(name) ? name : [name];\n\n while (element) {\n for (var i = 0, ii = names.length; i < ii; i++) {\n if ((value = jqLite.data(element, names[i])) !== undefined) return value;\n }\n\n // If dealing with a document fragment node with a host element, and no parent, use the host\n // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM\n // to lookup parent controllers.\n element = element.parentNode || (element.nodeType === 11 && element.host);\n }\n}\n\nfunction jqLiteEmpty(element) {\n jqLiteDealoc(element, true);\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n}\n\nfunction jqLiteRemove(element, keepData) {\n if (!keepData) jqLiteDealoc(element);\n var parent = element.parentNode;\n if (parent) parent.removeChild(element);\n}\n\n//////////////////////////////////////////\n// Functions which are declared directly.\n//////////////////////////////////////////\nvar JQLitePrototype = JQLite.prototype = {\n ready: function(fn) {\n var fired = false;\n\n function trigger() {\n if (fired) return;\n fired = true;\n fn();\n }\n\n // check if document is already loaded\n if (document.readyState === 'complete'){\n setTimeout(trigger);\n } else {\n this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9\n // we can not use jqLite since we are not done loading and jQuery could be loaded later.\n // jshint -W064\n JQLite(window).on('load', trigger); // fallback to window.onload for others\n // jshint +W064\n this.on('DOMContentLoaded', trigger);\n }\n },\n toString: function() {\n var value = [];\n forEach(this, function(e){ value.push('' + e);});\n return '[' + value.join(', ') + ']';\n },\n\n eq: function(index) {\n return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n },\n\n length: 0,\n push: push,\n sort: [].sort,\n splice: [].splice\n};\n\n//////////////////////////////////////////\n// Functions iterating getter/setters.\n// these functions return self on setter and\n// value on get.\n//////////////////////////////////////////\nvar BOOLEAN_ATTR = {};\nforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n BOOLEAN_ATTR[lowercase(value)] = value;\n});\nvar BOOLEAN_ELEMENTS = {};\nforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n BOOLEAN_ELEMENTS[value] = true;\n});\nvar ALIASED_ATTR = {\n 'ngMinlength' : 'minlength',\n 'ngMaxlength' : 'maxlength',\n 'ngMin' : 'min',\n 'ngMax' : 'max',\n 'ngPattern' : 'pattern'\n};\n\nfunction getBooleanAttrName(element, name) {\n // check dom last since we will most likely fail on name\n var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\n // booleanAttr is here twice to minimize DOM access\n return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;\n}\n\nfunction getAliasedAttrName(element, name) {\n var nodeName = element.nodeName;\n return (nodeName === 'INPUT' || nodeName === 'TEXTAREA') && ALIASED_ATTR[name];\n}\n\nforEach({\n data: jqLiteData,\n removeData: jqLiteRemoveData\n}, function(fn, name) {\n JQLite[name] = fn;\n});\n\nforEach({\n data: jqLiteData,\n inheritedData: jqLiteInheritedData,\n\n scope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n },\n\n isolateScope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');\n },\n\n controller: jqLiteController,\n\n injector: function(element) {\n return jqLiteInheritedData(element, '$injector');\n },\n\n removeAttr: function(element, name) {\n element.removeAttribute(name);\n },\n\n hasClass: jqLiteHasClass,\n\n css: function(element, name, value) {\n name = camelCase(name);\n\n if (isDefined(value)) {\n element.style[name] = value;\n } else {\n return element.style[name];\n }\n },\n\n attr: function(element, name, value){\n var lowercasedName = lowercase(name);\n if (BOOLEAN_ATTR[lowercasedName]) {\n if (isDefined(value)) {\n if (!!value) {\n element[name] = true;\n element.setAttribute(name, lowercasedName);\n } else {\n element[name] = false;\n element.removeAttribute(lowercasedName);\n }\n } else {\n return (element[name] ||\n (element.attributes.getNamedItem(name)|| noop).specified)\n ? lowercasedName\n : undefined;\n }\n } else if (isDefined(value)) {\n element.setAttribute(name, value);\n } else if (element.getAttribute) {\n // the extra argument \"2\" is to get the right thing for a.href in IE, see jQuery code\n // some elements (e.g. Document) don't have get attribute, so return undefined\n var ret = element.getAttribute(name, 2);\n // normalize non-existing attributes to undefined (as jQuery)\n return ret === null ? undefined : ret;\n }\n },\n\n prop: function(element, name, value) {\n if (isDefined(value)) {\n element[name] = value;\n } else {\n return element[name];\n }\n },\n\n text: (function() {\n getText.$dv = '';\n return getText;\n\n function getText(element, value) {\n if (isUndefined(value)) {\n var nodeType = element.nodeType;\n return (nodeType === 1 || nodeType === 3) ? element.textContent : '';\n }\n element.textContent = value;\n }\n })(),\n\n val: function(element, value) {\n if (isUndefined(value)) {\n if (element.multiple && nodeName_(element) === 'select') {\n var result = [];\n forEach(element.options, function (option) {\n if (option.selected) {\n result.push(option.value || option.text);\n }\n });\n return result.length === 0 ? null : result;\n }\n return element.value;\n }\n element.value = value;\n },\n\n html: function(element, value) {\n if (isUndefined(value)) {\n return element.innerHTML;\n }\n jqLiteDealoc(element, true);\n element.innerHTML = value;\n },\n\n empty: jqLiteEmpty\n}, function(fn, name){\n /**\n * Properties: writes return selection, reads return first value\n */\n JQLite.prototype[name] = function(arg1, arg2) {\n var i, key;\n var nodeCount = this.length;\n\n // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n // in a way that survives minification.\n // jqLiteEmpty takes no arguments but is a setter.\n if (fn !== jqLiteEmpty &&\n (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) {\n if (isObject(arg1)) {\n\n // we are a write, but the object properties are the key/values\n for (i = 0; i < nodeCount; i++) {\n if (fn === jqLiteData) {\n // data() takes the whole object in jQuery\n fn(this[i], arg1);\n } else {\n for (key in arg1) {\n fn(this[i], key, arg1[key]);\n }\n }\n }\n // return self for chaining\n return this;\n } else {\n // we are a read, so read the first child.\n // TODO: do we still need this?\n var value = fn.$dv;\n // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n var jj = (value === undefined) ? Math.min(nodeCount, 1) : nodeCount;\n for (var j = 0; j < jj; j++) {\n var nodeValue = fn(this[j], arg1, arg2);\n value = value ? value + nodeValue : nodeValue;\n }\n return value;\n }\n } else {\n // we are a write, so apply to all children\n for (i = 0; i < nodeCount; i++) {\n fn(this[i], arg1, arg2);\n }\n // return self for chaining\n return this;\n }\n };\n});\n\nfunction createEventHandler(element, events) {\n var eventHandler = function (event, type) {\n // jQuery specific api\n event.isDefaultPrevented = function() {\n return event.defaultPrevented;\n };\n\n var eventFns = events[type || event.type];\n var eventFnsLength = eventFns ? eventFns.length : 0;\n\n if (!eventFnsLength) return;\n\n if (isUndefined(event.immediatePropagationStopped)) {\n var originalStopImmediatePropagation = event.stopImmediatePropagation;\n event.stopImmediatePropagation = function() {\n event.immediatePropagationStopped = true;\n\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n\n if (originalStopImmediatePropagation) {\n originalStopImmediatePropagation.call(event);\n }\n };\n }\n\n event.isImmediatePropagationStopped = function() {\n return event.immediatePropagationStopped === true;\n };\n\n // Copy event handlers in case event handlers array is modified during execution.\n if ((eventFnsLength > 1)) {\n eventFns = shallowCopy(eventFns);\n }\n\n for (var i = 0; i < eventFnsLength; i++) {\n if (!event.isImmediatePropagationStopped()) {\n eventFns[i].call(element, event);\n }\n }\n };\n\n // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all\n // events on `element`\n eventHandler.elem = element;\n return eventHandler;\n}\n\n//////////////////////////////////////////\n// Functions iterating traversal.\n// These functions chain results into a single\n// selector.\n//////////////////////////////////////////\nforEach({\n removeData: jqLiteRemoveData,\n\n on: function jqLiteOn(element, type, fn, unsupported){\n if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\n // Do not add event handlers to non-elements because they will not be cleaned up.\n if (!jqLiteAcceptsData(element)) {\n return;\n }\n\n var expandoStore = jqLiteExpandoStore(element, true);\n var events = expandoStore.events;\n var handle = expandoStore.handle;\n\n if (!handle) {\n handle = expandoStore.handle = createEventHandler(element, events);\n }\n\n // http://jsperf.com/string-indexof-vs-split\n var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];\n var i = types.length;\n\n while (i--) {\n type = types[i];\n var eventFns = events[type];\n\n if (!eventFns) {\n events[type] = [];\n\n if (type === 'mouseenter' || type === 'mouseleave') {\n // Refer to jQuery's implementation of mouseenter & mouseleave\n // Read about mouseenter and mouseleave:\n // http://www.quirksmode.org/js/events_mouse.html#link8\n\n jqLiteOn(element, MOUSE_EVENT_MAP[type], function(event) {\n var target = this, related = event.relatedTarget;\n // For mousenter/leave call the handler if related is outside the target.\n // NB: No relatedTarget if the mouse left/entered the browser window\n if ( !related || (related !== target && !target.contains(related)) ){\n handle(event, type);\n }\n });\n\n } else {\n if (type !== '$destroy') {\n addEventListenerFn(element, type, handle);\n }\n }\n eventFns = events[type];\n }\n eventFns.push(fn);\n }\n },\n\n off: jqLiteOff,\n\n one: function(element, type, fn) {\n element = jqLite(element);\n\n //add the listener twice so that when it is called\n //you can remove the original function and still be\n //able to call element.off(ev, fn) normally\n element.on(type, function onFn() {\n element.off(type, fn);\n element.off(type, onFn);\n });\n element.on(type, fn);\n },\n\n replaceWith: function(element, replaceNode) {\n var index, parent = element.parentNode;\n jqLiteDealoc(element);\n forEach(new JQLite(replaceNode), function(node){\n if (index) {\n parent.insertBefore(node, index.nextSibling);\n } else {\n parent.replaceChild(node, element);\n }\n index = node;\n });\n },\n\n children: function(element) {\n var children = [];\n forEach(element.childNodes, function(element){\n if (element.nodeType === 1)\n children.push(element);\n });\n return children;\n },\n\n contents: function(element) {\n return element.contentDocument || element.childNodes || [];\n },\n\n append: function(element, node) {\n var nodeType = element.nodeType;\n if (nodeType !== 1 && nodeType !== 11) return;\n\n node = new JQLite(node);\n\n for (var i = 0, ii = node.length; i < ii; i++) {\n var child = node[i];\n element.appendChild(child);\n }\n },\n\n prepend: function(element, node) {\n if (element.nodeType === 1) {\n var index = element.firstChild;\n forEach(new JQLite(node), function(child){\n element.insertBefore(child, index);\n });\n }\n },\n\n wrap: function(element, wrapNode) {\n wrapNode = jqLite(wrapNode).eq(0).clone()[0];\n var parent = element.parentNode;\n if (parent) {\n parent.replaceChild(wrapNode, element);\n }\n wrapNode.appendChild(element);\n },\n\n remove: jqLiteRemove,\n\n detach: function(element) {\n jqLiteRemove(element, true);\n },\n\n after: function(element, newElement) {\n var index = element, parent = element.parentNode;\n newElement = new JQLite(newElement);\n\n for (var i = 0, ii = newElement.length; i < ii; i++) {\n var node = newElement[i];\n parent.insertBefore(node, index.nextSibling);\n index = node;\n }\n },\n\n addClass: jqLiteAddClass,\n removeClass: jqLiteRemoveClass,\n\n toggleClass: function(element, selector, condition) {\n if (selector) {\n forEach(selector.split(' '), function(className){\n var classCondition = condition;\n if (isUndefined(classCondition)) {\n classCondition = !jqLiteHasClass(element, className);\n }\n (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);\n });\n }\n },\n\n parent: function(element) {\n var parent = element.parentNode;\n return parent && parent.nodeType !== 11 ? parent : null;\n },\n\n next: function(element) {\n return element.nextElementSibling;\n },\n\n find: function(element, selector) {\n if (element.getElementsByTagName) {\n return element.getElementsByTagName(selector);\n } else {\n return [];\n }\n },\n\n clone: jqLiteClone,\n\n triggerHandler: function(element, event, extraParameters) {\n\n var dummyEvent, eventFnsCopy, handlerArgs;\n var eventName = event.type || event;\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var eventFns = events && events[eventName];\n\n if (eventFns) {\n // Create a dummy event to pass to the handlers\n dummyEvent = {\n preventDefault: function() { this.defaultPrevented = true; },\n isDefaultPrevented: function() { return this.defaultPrevented === true; },\n stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },\n isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },\n stopPropagation: noop,\n type: eventName,\n target: element\n };\n\n // If a custom event was provided then extend our dummy event with it\n if (event.type) {\n dummyEvent = extend(dummyEvent, event);\n }\n\n // Copy event handlers in case event handlers array is modified during execution.\n eventFnsCopy = shallowCopy(eventFns);\n handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];\n\n forEach(eventFnsCopy, function(fn) {\n if (!dummyEvent.isImmediatePropagationStopped()) {\n fn.apply(element, handlerArgs);\n }\n });\n }\n }\n}, function(fn, name){\n /**\n * chaining functions\n */\n JQLite.prototype[name] = function(arg1, arg2, arg3) {\n var value;\n\n for(var i = 0, ii = this.length; i < ii; i++) {\n if (isUndefined(value)) {\n value = fn(this[i], arg1, arg2, arg3);\n if (isDefined(value)) {\n // any function which returns a value needs to be wrapped\n value = jqLite(value);\n }\n } else {\n jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n }\n }\n return isDefined(value) ? value : this;\n };\n\n // bind legacy bind/unbind to on/off\n JQLite.prototype.bind = JQLite.prototype.on;\n JQLite.prototype.unbind = JQLite.prototype.off;\n});\n\n/**\n * Computes a hash of an 'obj'.\n * Hash of a:\n * string is string\n * number is number as string\n * object is either result of calling $$hashKey function on the object or uniquely generated id,\n * that is also assigned to the $$hashKey property of the object.\n *\n * @param obj\n * @returns {string} hash string such that the same input will have the same hash string.\n * The resulting string key is in 'type:hashKey' format.\n */\nfunction hashKey(obj, nextUidFn) {\n var key = obj && obj.$$hashKey;\n\n if (key) {\n if (typeof key === 'function') {\n key = obj.$$hashKey();\n }\n return key;\n }\n\n var objType = typeof obj;\n if (objType == 'function' || (objType == 'object' && obj !== null)) {\n key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();\n } else {\n key = objType + ':' + obj;\n }\n\n return key;\n}\n\n/**\n * HashMap which can use objects as keys\n */\nfunction HashMap(array, isolatedUid) {\n if (isolatedUid) {\n var uid = 0;\n this.nextUid = function() {\n return ++uid;\n };\n }\n forEach(array, this.put, this);\n}\nHashMap.prototype = {\n /**\n * Store key value pair\n * @param key key to store can be any type\n * @param value value to store can be any type\n */\n put: function(key, value) {\n this[hashKey(key, this.nextUid)] = value;\n },\n\n /**\n * @param key\n * @returns {Object} the value for the key\n */\n get: function(key) {\n return this[hashKey(key, this.nextUid)];\n },\n\n /**\n * Remove the key/value pair\n * @param key\n */\n remove: function(key) {\n var value = this[key = hashKey(key, this.nextUid)];\n delete this[key];\n return value;\n }\n};\n\n/**\n * @ngdoc function\n * @module ng\n * @name angular.injector\n * @kind function\n *\n * @description\n * Creates an injector function that can be used for retrieving services as well as for\n * dependency injection (see {@link guide/di dependency injection}).\n *\n\n * @param {Array.} modules A list of module functions or their aliases. See\n * {@link angular.module}. The `ng` module must be explicitly added.\n * @returns {function()} Injector function. See {@link auto.$injector $injector}.\n *\n * @example\n * Typical usage\n * ```js\n * // create an injector\n * var $injector = angular.injector(['ng']);\n *\n * // use the injector to kick off your application\n * // use the type inference to auto inject arguments, or use implicit injection\n * $injector.invoke(function($rootScope, $compile, $document) {\n * $compile($document)($rootScope);\n * $rootScope.$digest();\n * });\n * ```\n *\n * Sometimes you want to get access to the injector of a currently running Angular app\n * from outside Angular. Perhaps, you want to inject and compile some markup after the\n * application has been bootstrapped. You can do this using the extra `injector()` added\n * to JQuery/jqLite elements. See {@link angular.element}.\n *\n * *This is fairly rare but could be the case if a third party library is injecting the\n * markup.*\n *\n * In the following example a new block of HTML containing a `ng-controller`\n * directive is added to the end of the document body by JQuery. We then compile and link\n * it into the current AngularJS scope.\n *\n * ```js\n * var $div = $('{{content.label}}');\n * $(document.body).append($div);\n *\n * angular.element(document).injector().invoke(function($compile) {\n * var scope = angular.element($div).scope();\n * $compile($div)(scope);\n * });\n * ```\n */\n\n\n/**\n * @ngdoc module\n * @name auto\n * @description\n *\n * Implicit module which gets automatically added to each {@link auto.$injector $injector}.\n */\n\nvar FN_ARGS = /^function\\s*[^\\(]*\\(\\s*([^\\)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar $injectorMinErr = minErr('$injector');\n\nfunction anonFn(fn) {\n // For anonymous functions, showing at the very least the function signature can help in\n // debugging.\n var fnText = fn.toString().replace(STRIP_COMMENTS, ''),\n args = fnText.match(FN_ARGS);\n if (args) {\n return 'function(' + (args[1] || '').replace(/[\\s\\r\\n]+/, ' ') + ')';\n }\n return 'fn';\n}\n\nfunction annotate(fn, strictDi, name) {\n var $inject,\n fnText,\n argDecl,\n last;\n\n if (typeof fn === 'function') {\n if (!($inject = fn.$inject)) {\n $inject = [];\n if (fn.length) {\n if (strictDi) {\n if (!isString(name) || !name) {\n name = fn.name || anonFn(fn);\n }\n throw $injectorMinErr('strictdi',\n '{0} is not using explicit annotation and cannot be invoked in strict mode', name);\n }\n fnText = fn.toString().replace(STRIP_COMMENTS, '');\n argDecl = fnText.match(FN_ARGS);\n forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {\n arg.replace(FN_ARG, function(all, underscore, name) {\n $inject.push(name);\n });\n });\n }\n fn.$inject = $inject;\n }\n } else if (isArray(fn)) {\n last = fn.length - 1;\n assertArgFn(fn[last], 'fn');\n $inject = fn.slice(0, last);\n } else {\n assertArgFn(fn, 'fn', true);\n }\n return $inject;\n}\n\n///////////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $injector\n * @kind function\n *\n * @description\n *\n * `$injector` is used to retrieve object instances as defined by\n * {@link auto.$provide provider}, instantiate types, invoke methods,\n * and load modules.\n *\n * The following always holds true:\n *\n * ```js\n * var $injector = angular.injector();\n * expect($injector.get('$injector')).toBe($injector);\n * expect($injector.invoke(function($injector) {\n * return $injector;\n * }).toBe($injector);\n * ```\n *\n * # Injection Function Annotation\n *\n * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n * following are all valid ways of annotating function with injection arguments and are equivalent.\n *\n * ```js\n * // inferred (only works if code not minified/obfuscated)\n * $injector.invoke(function(serviceA){});\n *\n * // annotated\n * function explicit(serviceA) {};\n * explicit.$inject = ['serviceA'];\n * $injector.invoke(explicit);\n *\n * // inline\n * $injector.invoke(['serviceA', function(serviceA){}]);\n * ```\n *\n * ## Inference\n *\n * In JavaScript calling `toString()` on a function returns the function definition. The definition\n * can then be parsed and the function arguments can be extracted. *NOTE:* This does not work with\n * minification, and obfuscation tools since these tools change the argument names.\n *\n * ## `$inject` Annotation\n * By adding an `$inject` property onto a function the injection parameters can be specified.\n *\n * ## Inline\n * As an array of injection names, where the last item in the array is the function to call.\n */\n\n/**\n * @ngdoc method\n * @name $injector#get\n *\n * @description\n * Return an instance of the service.\n *\n * @param {string} name The name of the instance to retrieve.\n * @return {*} The instance.\n */\n\n/**\n * @ngdoc method\n * @name $injector#invoke\n *\n * @description\n * Invoke the method and supply the method arguments from the `$injector`.\n *\n * @param {!Function} fn The function to invoke. Function parameters are injected according to the\n * {@link guide/di $inject Annotation} rules.\n * @param {Object=} self The `this` for the invoked method.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {*} the value returned by the invoked `fn` function.\n */\n\n/**\n * @ngdoc method\n * @name $injector#has\n *\n * @description\n * Allows the user to query if the particular service exists.\n *\n * @param {string} Name of the service to query.\n * @returns {boolean} returns true if injector has given service.\n */\n\n/**\n * @ngdoc method\n * @name $injector#instantiate\n * @description\n * Create a new instance of JS type. The method takes a constructor function, invokes the new\n * operator, and supplies all of the arguments to the constructor function as specified by the\n * constructor annotation.\n *\n * @param {Function} Type Annotated constructor function.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {Object} new instance of `Type`.\n */\n\n/**\n * @ngdoc method\n * @name $injector#annotate\n *\n * @description\n * Returns an array of service names which the function is requesting for injection. This API is\n * used by the injector to determine which services need to be injected into the function when the\n * function is invoked. There are three ways in which the function can be annotated with the needed\n * dependencies.\n *\n * # Argument names\n *\n * The simplest form is to extract the dependencies from the arguments of the function. This is done\n * by converting the function into a string using `toString()` method and extracting the argument\n * names.\n * ```js\n * // Given\n * function MyController($scope, $route) {\n * // ...\n * }\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * This method does not work with code minification / obfuscation. For this reason the following\n * annotation strategies are supported.\n *\n * # The `$inject` property\n *\n * If a function has an `$inject` property and its value is an array of strings, then the strings\n * represent names of services to be injected into the function.\n * ```js\n * // Given\n * var MyController = function(obfuscatedScope, obfuscatedRoute) {\n * // ...\n * }\n * // Define function dependencies\n * MyController['$inject'] = ['$scope', '$route'];\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * # The array notation\n *\n * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n * is very inconvenient. In these situations using the array notation to specify the dependencies in\n * a way that survives minification is a better choice:\n *\n * ```js\n * // We wish to write this (not minification / obfuscation safe)\n * injector.invoke(function($compile, $rootScope) {\n * // ...\n * });\n *\n * // We are forced to write break inlining\n * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n * // ...\n * };\n * tmpFn.$inject = ['$compile', '$rootScope'];\n * injector.invoke(tmpFn);\n *\n * // To better support inline function the inline annotation is supported\n * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n * // ...\n * }]);\n *\n * // Therefore\n * expect(injector.annotate(\n * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n * ).toEqual(['$compile', '$rootScope']);\n * ```\n *\n * @param {Function|Array.} fn Function for which dependent service names need to\n * be retrieved as described above.\n *\n * @returns {Array.} The names of the services which the function requires.\n */\n\n\n\n\n/**\n * @ngdoc service\n * @name $provide\n *\n * @description\n *\n * The {@link auto.$provide $provide} service has a number of methods for registering components\n * with the {@link auto.$injector $injector}. Many of these functions are also exposed on\n * {@link angular.Module}.\n *\n * An Angular **service** is a singleton object created by a **service factory**. These **service\n * factories** are functions which, in turn, are created by a **service provider**.\n * The **service providers** are constructor functions. When instantiated they must contain a\n * property called `$get`, which holds the **service factory** function.\n *\n * When you request a service, the {@link auto.$injector $injector} is responsible for finding the\n * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n * function to get the instance of the **service**.\n *\n * Often services have no configuration options and there is no need to add methods to the service\n * provider. The provider will be no more than a constructor function with a `$get` property. For\n * these cases the {@link auto.$provide $provide} service has additional helper methods to register\n * services without specifying a provider.\n *\n * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the\n * {@link auto.$injector $injector}\n * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by\n * providers and services.\n * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by\n * services, not providers.\n * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,\n * that will be wrapped in a **service provider** object, whose `$get` property will contain the\n * given factory function.\n * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`\n * that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n * a new object using the given constructor function.\n *\n * See the individual methods for more information and examples.\n */\n\n/**\n * @ngdoc method\n * @name $provide#provider\n * @description\n *\n * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions\n * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n * service.\n *\n * Service provider names start with the name of the service they provide followed by `Provider`.\n * For example, the {@link ng.$log $log} service has a provider called\n * {@link ng.$logProvider $logProvider}.\n *\n * Service provider objects can have additional methods which allow configuration of the provider\n * and its service. Importantly, you can configure what kind of service is created by the `$get`\n * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n * method {@link ng.$logProvider#debugEnabled debugEnabled}\n * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n * console or not.\n *\n * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n 'Provider'` key.\n * @param {(Object|function())} provider If the provider is:\n *\n * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.\n * - `Constructor`: a new instance of the provider will be created using\n * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n *\n * @returns {Object} registered provider instance\n\n * @example\n *\n * The following example shows how to create a simple event tracking service and register it using\n * {@link auto.$provide#provider $provide.provider()}.\n *\n * ```js\n * // Define the eventTracker provider\n * function EventTrackerProvider() {\n * var trackingUrl = '/track';\n *\n * // A provider method for configuring where the tracked events should been saved\n * this.setTrackingUrl = function(url) {\n * trackingUrl = url;\n * };\n *\n * // The service factory function\n * this.$get = ['$http', function($http) {\n * var trackedEvents = {};\n * return {\n * // Call this to track an event\n * event: function(event) {\n * var count = trackedEvents[event] || 0;\n * count += 1;\n * trackedEvents[event] = count;\n * return count;\n * },\n * // Call this to save the tracked events to the trackingUrl\n * save: function() {\n * $http.post(trackingUrl, trackedEvents);\n * }\n * };\n * }];\n * }\n *\n * describe('eventTracker', function() {\n * var postSpy;\n *\n * beforeEach(module(function($provide) {\n * // Register the eventTracker provider\n * $provide.provider('eventTracker', EventTrackerProvider);\n * }));\n *\n * beforeEach(module(function(eventTrackerProvider) {\n * // Configure eventTracker provider\n * eventTrackerProvider.setTrackingUrl('/custom-track');\n * }));\n *\n * it('tracks events', inject(function(eventTracker) {\n * expect(eventTracker.event('login')).toEqual(1);\n * expect(eventTracker.event('login')).toEqual(2);\n * }));\n *\n * it('saves to the tracking url', inject(function(eventTracker, $http) {\n * postSpy = spyOn($http, 'post');\n * eventTracker.event('login');\n * eventTracker.save();\n * expect(postSpy).toHaveBeenCalled();\n * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n * }));\n * });\n * ```\n */\n\n/**\n * @ngdoc method\n * @name $provide#factory\n * @description\n *\n * Register a **service factory**, which will be called to return the service instance.\n * This is short for registering a service where its provider consists of only a `$get` property,\n * which is the given service factory function.\n * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to\n * configure your service in a provider.\n *\n * @param {string} name The name of the instance.\n * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand\n * for `$provide.provider(name, {$get: $getFn})`.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service\n * ```js\n * $provide.factory('ping', ['$http', function($http) {\n * return function ping() {\n * return $http.send('/ping');\n * };\n * }]);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#service\n * @description\n *\n * Register a **service constructor**, which will be invoked with `new` to create the service\n * instance.\n * This is short for registering a service where its provider's `$get` property is the service\n * constructor function that will be used to instantiate the service instance.\n *\n * You should use {@link auto.$provide#service $provide.service(class)} if you define your service\n * as a type/class.\n *\n * @param {string} name The name of the instance.\n * @param {Function} constructor A class (constructor function) that will be instantiated.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service using\n * {@link auto.$provide#service $provide.service(class)}.\n * ```js\n * var Ping = function($http) {\n * this.$http = $http;\n * };\n *\n * Ping.$inject = ['$http'];\n *\n * Ping.prototype.send = function() {\n * return this.$http.get('/ping');\n * };\n * $provide.service('ping', Ping);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping.send();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#value\n * @description\n *\n * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a\n * number, an array, an object or a function. This is short for registering a service where its\n * provider's `$get` property is a factory function that takes no arguments and returns the **value\n * service**.\n *\n * Value services are similar to constant services, except that they cannot be injected into a\n * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n * an Angular\n * {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the instance.\n * @param {*} value The value.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here are some examples of creating value services.\n * ```js\n * $provide.value('ADMIN_USER', 'admin');\n *\n * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n *\n * $provide.value('halfOf', function(value) {\n * return value / 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#constant\n * @description\n *\n * Register a **constant service**, such as a string, a number, an array, an object or a function,\n * with the {@link auto.$injector $injector}. Unlike {@link auto.$provide#value value} it can be\n * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n * be overridden by an Angular {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the constant.\n * @param {*} value The constant value.\n * @returns {Object} registered instance\n *\n * @example\n * Here a some examples of creating constants:\n * ```js\n * $provide.constant('SHARD_HEIGHT', 306);\n *\n * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n *\n * $provide.constant('double', function(value) {\n * return value * 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#decorator\n * @description\n *\n * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator\n * intercepts the creation of a service, allowing it to override or modify the behaviour of the\n * service. The object returned by the decorator may be the original service, or a new service\n * object which replaces or wraps and delegates to the original service.\n *\n * @param {string} name The name of the service to decorate.\n * @param {function()} decorator This function will be invoked when the service needs to be\n * instantiated and should return the decorated service instance. The function is called using\n * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.\n * Local injection arguments:\n *\n * * `$delegate` - The original service instance, which can be monkey patched, configured,\n * decorated or delegated to.\n *\n * @example\n * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n * calls to {@link ng.$log#error $log.warn()}.\n * ```js\n * $provide.decorator('$log', ['$delegate', function($delegate) {\n * $delegate.warn = $delegate.error;\n * return $delegate;\n * }]);\n * ```\n */\n\n\nfunction createInjector(modulesToLoad, strictDi) {\n strictDi = (strictDi === true);\n var INSTANTIATING = {},\n providerSuffix = 'Provider',\n path = [],\n loadedModules = new HashMap([], true),\n providerCache = {\n $provide: {\n provider: supportObject(provider),\n factory: supportObject(factory),\n service: supportObject(service),\n value: supportObject(value),\n constant: supportObject(constant),\n decorator: decorator\n }\n },\n providerInjector = (providerCache.$injector =\n createInternalInjector(providerCache, function() {\n throw $injectorMinErr('unpr', \"Unknown provider: {0}\", path.join(' <- '));\n })),\n instanceCache = {},\n instanceInjector = (instanceCache.$injector =\n createInternalInjector(instanceCache, function(servicename) {\n var provider = providerInjector.get(servicename + providerSuffix);\n return instanceInjector.invoke(provider.$get, provider, undefined, servicename);\n }));\n\n\n forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });\n\n return instanceInjector;\n\n ////////////////////////////////////\n // $provider\n ////////////////////////////////////\n\n function supportObject(delegate) {\n return function(key, value) {\n if (isObject(key)) {\n forEach(key, reverseParams(delegate));\n } else {\n return delegate(key, value);\n }\n };\n }\n\n function provider(name, provider_) {\n assertNotHasOwnProperty(name, 'service');\n if (isFunction(provider_) || isArray(provider_)) {\n provider_ = providerInjector.instantiate(provider_);\n }\n if (!provider_.$get) {\n throw $injectorMinErr('pget', \"Provider '{0}' must define $get factory method.\", name);\n }\n return providerCache[name + providerSuffix] = provider_;\n }\n\n function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }\n\n function service(name, constructor) {\n return factory(name, ['$injector', function($injector) {\n return $injector.instantiate(constructor);\n }]);\n }\n\n function value(name, val) { return factory(name, valueFn(val)); }\n\n function constant(name, value) {\n assertNotHasOwnProperty(name, 'constant');\n providerCache[name] = value;\n instanceCache[name] = value;\n }\n\n function decorator(serviceName, decorFn) {\n var origProvider = providerInjector.get(serviceName + providerSuffix),\n orig$get = origProvider.$get;\n\n origProvider.$get = function() {\n var origInstance = instanceInjector.invoke(orig$get, origProvider);\n return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n };\n }\n\n ////////////////////////////////////\n // Module Loading\n ////////////////////////////////////\n function loadModules(modulesToLoad){\n var runBlocks = [], moduleFn;\n forEach(modulesToLoad, function(module) {\n if (loadedModules.get(module)) return;\n loadedModules.put(module, true);\n\n function runInvokeQueue(queue) {\n var i, ii;\n for(i = 0, ii = queue.length; i < ii; i++) {\n var invokeArgs = queue[i],\n provider = providerInjector.get(invokeArgs[0]);\n\n provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n }\n }\n\n try {\n if (isString(module)) {\n moduleFn = angularModule(module);\n runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n runInvokeQueue(moduleFn._invokeQueue);\n runInvokeQueue(moduleFn._configBlocks);\n } else if (isFunction(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else if (isArray(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else {\n assertArgFn(module, 'module');\n }\n } catch (e) {\n if (isArray(module)) {\n module = module[module.length - 1];\n }\n if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {\n // Safari & FF's stack traces don't contain error.message content\n // unlike those of Chrome and IE\n // So if stack doesn't contain message, we create a new string that contains both.\n // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n /* jshint -W022 */\n e = e.message + '\\n' + e.stack;\n }\n throw $injectorMinErr('modulerr', \"Failed to instantiate module {0} due to:\\n{1}\",\n module, e.stack || e.message || e);\n }\n });\n return runBlocks;\n }\n\n ////////////////////////////////////\n // internal Injector\n ////////////////////////////////////\n\n function createInternalInjector(cache, factory) {\n\n function getService(serviceName) {\n if (cache.hasOwnProperty(serviceName)) {\n if (cache[serviceName] === INSTANTIATING) {\n throw $injectorMinErr('cdep', 'Circular dependency found: {0}',\n serviceName + ' <- ' + path.join(' <- '));\n }\n return cache[serviceName];\n } else {\n try {\n path.unshift(serviceName);\n cache[serviceName] = INSTANTIATING;\n return cache[serviceName] = factory(serviceName);\n } catch (err) {\n if (cache[serviceName] === INSTANTIATING) {\n delete cache[serviceName];\n }\n throw err;\n } finally {\n path.shift();\n }\n }\n }\n\n function invoke(fn, self, locals, serviceName) {\n if (typeof locals === 'string') {\n serviceName = locals;\n locals = null;\n }\n\n var args = [],\n $inject = annotate(fn, strictDi, serviceName),\n length, i,\n key;\n\n for(i = 0, length = $inject.length; i < length; i++) {\n key = $inject[i];\n if (typeof key !== 'string') {\n throw $injectorMinErr('itkn',\n 'Incorrect injection token! Expected service name as string, got {0}', key);\n }\n args.push(\n locals && locals.hasOwnProperty(key)\n ? locals[key]\n : getService(key)\n );\n }\n if (isArray(fn)) {\n fn = fn[length];\n }\n\n // http://jsperf.com/angularjs-invoke-apply-vs-switch\n // #5388\n return fn.apply(self, args);\n }\n\n function instantiate(Type, locals, serviceName) {\n var Constructor = function() {},\n instance, returnedValue;\n\n // Check if Type is annotated and use just the given function at n-1 as parameter\n // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;\n instance = new Constructor();\n returnedValue = invoke(Type, instance, locals, serviceName);\n\n return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;\n }\n\n return {\n invoke: invoke,\n instantiate: instantiate,\n get: getService,\n annotate: annotate,\n has: function(name) {\n return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n }\n };\n }\n}\n\ncreateInjector.$$annotate = annotate;\n\n/**\n * @ngdoc service\n * @name $anchorScroll\n * @kind function\n * @requires $window\n * @requires $location\n * @requires $rootScope\n *\n * @description\n * When called, it checks current value of `$location.hash()` and scrolls to the related element,\n * according to rules specified in\n * [Html5 spec](http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document).\n *\n * It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.\n * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.\n *\n * @example\n \n \n \n Go to bottom\n You're at the bottom!\n \n \n \n angular.module('anchorScrollExample', [])\n .controller('ScrollController', ['$scope', '$location', '$anchorScroll',\n function ($scope, $location, $anchorScroll) {\n $scope.gotoBottom = function() {\n // set the location.hash to the id of\n // the element you wish to scroll to.\n $location.hash('bottom');\n\n // call $anchorScroll()\n $anchorScroll();\n };\n }]);\n \n \n #scrollArea {\n height: 350px;\n overflow: auto;\n }\n\n #bottom {\n display: block;\n margin-top: 2000px;\n }\n \n \n */\nfunction $AnchorScrollProvider() {\n\n var autoScrollingEnabled = true;\n\n this.disableAutoScrolling = function() {\n autoScrollingEnabled = false;\n };\n\n this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n var document = $window.document;\n\n // helper function to get first anchor from a NodeList\n // can't use filter.filter, as it accepts only instances of Array\n // and IE can't convert NodeList to an array using [].slice\n // TODO(vojta): use filter if we change it to accept lists as well\n function getFirstAnchor(list) {\n var result = null;\n forEach(list, function(element) {\n if (!result && nodeName_(element) === 'a') result = element;\n });\n return result;\n }\n\n function scroll() {\n var hash = $location.hash(), elm;\n\n // empty hash, scroll to the top of the page\n if (!hash) $window.scrollTo(0, 0);\n\n // element with given id\n else if ((elm = document.getElementById(hash))) elm.scrollIntoView();\n\n // first anchor with given name :-D\n else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView();\n\n // no element and hash == 'top', scroll to the top of the page\n else if (hash === 'top') $window.scrollTo(0, 0);\n }\n\n // does not scroll when user clicks on anchor link that is currently on\n // (no url change, no $location.hash() change), browser native does scroll\n if (autoScrollingEnabled) {\n $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n function autoScrollWatchAction() {\n $rootScope.$evalAsync(scroll);\n });\n }\n\n return scroll;\n }];\n}\n\nvar $animateMinErr = minErr('$animate');\n\n/**\n * @ngdoc provider\n * @name $animateProvider\n *\n * @description\n * Default implementation of $animate that doesn't perform any animations, instead just\n * synchronously performs DOM\n * updates and calls done() callbacks.\n *\n * In order to enable animations the ngAnimate module has to be loaded.\n *\n * To see the functional implementation check out src/ngAnimate/animate.js\n */\nvar $AnimateProvider = ['$provide', function($provide) {\n\n\n this.$$selectors = {};\n\n\n /**\n * @ngdoc method\n * @name $animateProvider#register\n *\n * @description\n * Registers a new injectable animation factory function. The factory function produces the\n * animation object which contains callback functions for each event that is expected to be\n * animated.\n *\n * * `eventFn`: `function(Element, doneFunction)` The element to animate, the `doneFunction`\n * must be called once the element animation is complete. If a function is returned then the\n * animation service will use this function to cancel the animation whenever a cancel event is\n * triggered.\n *\n *\n * ```js\n * return {\n * eventFn : function(element, done) {\n * //code to run the animation\n * //once complete, then run done()\n * return function cancellationFunction() {\n * //code to cancel the animation\n * }\n * }\n * }\n * ```\n *\n * @param {string} name The name of the animation.\n * @param {Function} factory The factory function that will be executed to return the animation\n * object.\n */\n this.register = function(name, factory) {\n var key = name + '-animation';\n if (name && name.charAt(0) != '.') throw $animateMinErr('notcsel',\n \"Expecting class selector starting with '.' got '{0}'.\", name);\n this.$$selectors[name.substr(1)] = key;\n $provide.factory(key, factory);\n };\n\n /**\n * @ngdoc method\n * @name $animateProvider#classNameFilter\n *\n * @description\n * Sets and/or returns the CSS class regular expression that is checked when performing\n * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n * therefore enable $animate to attempt to perform an animation on any element.\n * When setting the classNameFilter value, animations will only be performed on elements\n * that successfully match the filter expression. This in turn can boost performance\n * for low-powered devices as well as applications containing a lot of structural operations.\n * @param {RegExp=} expression The className expression which will be checked against all animations\n * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n */\n this.classNameFilter = function(expression) {\n if(arguments.length === 1) {\n this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;\n }\n return this.$$classNameFilter;\n };\n\n this.$get = ['$$q', '$$asyncCallback', function($$q, $$asyncCallback) {\n\n var currentDefer;\n function asyncPromise() {\n // only serve one instance of a promise in order to save CPU cycles\n if (!currentDefer) {\n currentDefer = $$q.defer();\n $$asyncCallback(function() {\n currentDefer.resolve();\n currentDefer = null;\n });\n }\n return currentDefer.promise;\n }\n\n /**\n *\n * @ngdoc service\n * @name $animate\n * @description The $animate service provides rudimentary DOM manipulation functions to\n * insert, remove and move elements within the DOM, as well as adding and removing classes.\n * This service is the core service used by the ngAnimate $animator service which provides\n * high-level animation hooks for CSS and JavaScript.\n *\n * $animate is available in the AngularJS core, however, the ngAnimate module must be included\n * to enable full out animation support. Otherwise, $animate will only perform simple DOM\n * manipulation operations.\n *\n * To learn more about enabling animation support, click here to visit the {@link ngAnimate\n * ngAnimate module page} as well as the {@link ngAnimate.$animate ngAnimate $animate service\n * page}.\n */\n return {\n\n /**\n *\n * @ngdoc method\n * @name $animate#enter\n * @kind function\n * @description Inserts the element into the DOM either after the `after` element or\n * as the first child within the `parent` element. When the function is called a promise\n * is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will be inserted into the DOM\n * @param {DOMElement} parent the parent element which will append the element as\n * a child (if the after element is not present)\n * @param {DOMElement} after the sibling element which will append the element\n * after itself\n * @return {Promise} the animation callback promise\n */\n enter : function(element, parent, after) {\n after ? after.after(element)\n : parent.prepend(element);\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#leave\n * @kind function\n * @description Removes the element from the DOM. When the function is called a promise\n * is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will be removed from the DOM\n * @return {Promise} the animation callback promise\n */\n leave : function(element) {\n element.remove();\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#move\n * @kind function\n * @description Moves the position of the provided element within the DOM to be placed\n * either after the `after` element or inside of the `parent` element. When the function\n * is called a promise is returned that will be resolved at a later time.\n *\n * @param {DOMElement} element the element which will be moved around within the\n * DOM\n * @param {DOMElement} parent the parent element where the element will be\n * inserted into (if the after element is not present)\n * @param {DOMElement} after the sibling element where the element will be\n * positioned next to\n * @return {Promise} the animation callback promise\n */\n move : function(element, parent, after) {\n // Do not remove element before insert. Removing will cause data associated with the\n // element to be dropped. Insert will implicitly do the remove.\n return this.enter(element, parent, after);\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#addClass\n * @kind function\n * @description Adds the provided className CSS class value to the provided element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have the className value\n * added to it\n * @param {string} className the CSS class which will be added to the element\n * @return {Promise} the animation callback promise\n */\n addClass : function(element, className) {\n className = !isString(className)\n ? (isArray(className) ? className.join(' ') : '')\n : className;\n forEach(element, function (element) {\n jqLiteAddClass(element, className);\n });\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#removeClass\n * @kind function\n * @description Removes the provided className CSS class value from the provided element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have the className value\n * removed from it\n * @param {string} className the CSS class which will be removed from the element\n * @return {Promise} the animation callback promise\n */\n removeClass : function(element, className) {\n className = !isString(className)\n ? (isArray(className) ? className.join(' ') : '')\n : className;\n forEach(element, function (element) {\n jqLiteRemoveClass(element, className);\n });\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#setClass\n * @kind function\n * @description Adds and/or removes the given CSS classes to and from the element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have its CSS classes changed\n * removed from it\n * @param {string} add the CSS classes which will be added to the element\n * @param {string} remove the CSS class which will be removed from the element\n * @return {Promise} the animation callback promise\n */\n setClass : function(element, add, remove) {\n this.addClass(element, add);\n this.removeClass(element, remove);\n return asyncPromise();\n },\n\n enabled : noop,\n cancel : noop\n };\n }];\n}];\n\nfunction $$AsyncCallbackProvider(){\n this.$get = ['$$rAF', '$timeout', function($$rAF, $timeout) {\n return $$rAF.supported\n ? function(fn) { return $$rAF(fn); }\n : function(fn) {\n return $timeout(fn, 0, false);\n };\n }];\n}\n\n/**\n * ! This is a private undocumented service !\n *\n * @name $browser\n * @requires $log\n * @description\n * This object has two goals:\n *\n * - hide all the global state in the browser caused by the window object\n * - abstract away all the browser specific features and inconsistencies\n *\n * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n * service, which can be used for convenient testing of the application without the interaction with\n * the real browser apis.\n */\n/**\n * @param {object} window The global window object.\n * @param {object} document jQuery wrapped document.\n * @param {function()} XHR XMLHttpRequest constructor.\n * @param {object} $log console.log or an object with the same interface.\n * @param {object} $sniffer $sniffer service\n */\nfunction Browser(window, document, $log, $sniffer) {\n var self = this,\n rawDocument = document[0],\n location = window.location,\n history = window.history,\n setTimeout = window.setTimeout,\n clearTimeout = window.clearTimeout,\n pendingDeferIds = {};\n\n self.isMock = false;\n\n var outstandingRequestCount = 0;\n var outstandingRequestCallbacks = [];\n\n // TODO(vojta): remove this temporary api\n self.$$completeOutstandingRequest = completeOutstandingRequest;\n self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };\n\n /**\n * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`\n * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.\n */\n function completeOutstandingRequest(fn) {\n try {\n fn.apply(null, sliceArgs(arguments, 1));\n } finally {\n outstandingRequestCount--;\n if (outstandingRequestCount === 0) {\n while(outstandingRequestCallbacks.length) {\n try {\n outstandingRequestCallbacks.pop()();\n } catch (e) {\n $log.error(e);\n }\n }\n }\n }\n }\n\n /**\n * @private\n * Note: this method is used only by scenario runner\n * TODO(vojta): prefix this method with $$ ?\n * @param {function()} callback Function that will be called when no outstanding request\n */\n self.notifyWhenNoOutstandingRequests = function(callback) {\n // force browser to execute all pollFns - this is needed so that cookies and other pollers fire\n // at some deterministic time in respect to the test runner's actions. Leaving things up to the\n // regular poller would result in flaky tests.\n forEach(pollFns, function(pollFn){ pollFn(); });\n\n if (outstandingRequestCount === 0) {\n callback();\n } else {\n outstandingRequestCallbacks.push(callback);\n }\n };\n\n //////////////////////////////////////////////////////////////\n // Poll Watcher API\n //////////////////////////////////////////////////////////////\n var pollFns = [],\n pollTimeout;\n\n /**\n * @name $browser#addPollFn\n *\n * @param {function()} fn Poll function to add\n *\n * @description\n * Adds a function to the list of functions that poller periodically executes,\n * and starts polling if not started yet.\n *\n * @returns {function()} the added function\n */\n self.addPollFn = function(fn) {\n if (isUndefined(pollTimeout)) startPoller(100, setTimeout);\n pollFns.push(fn);\n return fn;\n };\n\n /**\n * @param {number} interval How often should browser call poll functions (ms)\n * @param {function()} setTimeout Reference to a real or fake `setTimeout` function.\n *\n * @description\n * Configures the poller to run in the specified intervals, using the specified\n * setTimeout fn and kicks it off.\n */\n function startPoller(interval, setTimeout) {\n (function check() {\n forEach(pollFns, function(pollFn){ pollFn(); });\n pollTimeout = setTimeout(check, interval);\n })();\n }\n\n //////////////////////////////////////////////////////////////\n // URL API\n //////////////////////////////////////////////////////////////\n\n var lastBrowserUrl = location.href,\n baseElement = document.find('base'),\n newLocation = null;\n\n /**\n * @name $browser#url\n *\n * @description\n * GETTER:\n * Without any argument, this method just returns current value of location.href.\n *\n * SETTER:\n * With at least one argument, this method sets url to new value.\n * If html5 history api supported, pushState/replaceState is used, otherwise\n * location.href/location.replace is used.\n * Returns its own instance to allow chaining\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to change url.\n *\n * @param {string} url New url (when used as setter)\n * @param {boolean=} replace Should new url replace current history record ?\n */\n self.url = function(url, replace) {\n // Android Browser BFCache causes location, history reference to become stale.\n if (location !== window.location) location = window.location;\n if (history !== window.history) history = window.history;\n\n // setter\n if (url) {\n if (lastBrowserUrl == url) return;\n lastBrowserUrl = url;\n if ($sniffer.history) {\n if (replace) history.replaceState(null, '', url);\n else {\n history.pushState(null, '', url);\n // Crazy Opera Bug: http://my.opera.com/community/forums/topic.dml?id=1185462\n baseElement.attr('href', baseElement.attr('href'));\n }\n } else {\n newLocation = url;\n if (replace) {\n location.replace(url);\n } else {\n location.href = url;\n }\n }\n return self;\n // getter\n } else {\n // - newLocation is a workaround for an IE7-9 issue with location.replace and location.href\n // methods not updating location.href synchronously.\n // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172\n return newLocation || location.href.replace(/%27/g,\"'\");\n }\n };\n\n var urlChangeListeners = [],\n urlChangeInit = false;\n\n function fireUrlChange() {\n newLocation = null;\n if (lastBrowserUrl == self.url()) return;\n\n lastBrowserUrl = self.url();\n forEach(urlChangeListeners, function(listener) {\n listener(self.url());\n });\n }\n\n /**\n * @name $browser#onUrlChange\n *\n * @description\n * Register callback function that will be called, when url changes.\n *\n * It's only called when the url is changed from outside of angular:\n * - user types different url into address bar\n * - user clicks on history (forward/back) button\n * - user clicks on a link\n *\n * It's not called when url is changed by $browser.url() method\n *\n * The listener gets called with new url as parameter.\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to monitor url changes in angular apps.\n *\n * @param {function(string)} listener Listener function to be called when url changes.\n * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n */\n self.onUrlChange = function(callback) {\n // TODO(vojta): refactor to use node's syntax for events\n if (!urlChangeInit) {\n // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)\n // don't fire popstate when user change the address bar and don't fire hashchange when url\n // changed by push/replaceState\n\n // html5 history api - popstate event\n if ($sniffer.history) jqLite(window).on('popstate', fireUrlChange);\n // hashchange event\n if ($sniffer.hashchange) jqLite(window).on('hashchange', fireUrlChange);\n // polling\n else self.addPollFn(fireUrlChange);\n\n urlChangeInit = true;\n }\n\n urlChangeListeners.push(callback);\n return callback;\n };\n\n /**\n * Checks whether the url has changed outside of Angular.\n * Needs to be exported to be able to check for changes that have been done in sync,\n * as hashchange/popstate events fire in async.\n */\n self.$$checkUrlChange = fireUrlChange;\n\n //////////////////////////////////////////////////////////////\n // Misc API\n //////////////////////////////////////////////////////////////\n\n /**\n * @name $browser#baseHref\n *\n * @description\n * Returns current \n * (always relative - without domain)\n *\n * @returns {string} The current base href\n */\n self.baseHref = function() {\n var href = baseElement.attr('href');\n return href ? href.replace(/^(https?\\:)?\\/\\/[^\\/]*/, '') : '';\n };\n\n //////////////////////////////////////////////////////////////\n // Cookies API\n //////////////////////////////////////////////////////////////\n var lastCookies = {};\n var lastCookieString = '';\n var cookiePath = self.baseHref();\n\n /**\n * @name $browser#cookies\n *\n * @param {string=} name Cookie name\n * @param {string=} value Cookie value\n *\n * @description\n * The cookies method provides a 'private' low level access to browser cookies.\n * It is not meant to be used directly, use the $cookie service instead.\n *\n * The return values vary depending on the arguments that the method was called with as follows:\n *\n * - cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify\n * it\n * - cookies(name, value) -> set name to value, if value is undefined delete the cookie\n * - cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that\n * way)\n *\n * @returns {Object} Hash of all cookies (if called without any parameter)\n */\n self.cookies = function(name, value) {\n var cookieLength, cookieArray, cookie, i, index;\n\n if (name) {\n if (value === undefined) {\n rawDocument.cookie = encodeURIComponent(name) + \"=;path=\" + cookiePath +\n \";expires=Thu, 01 Jan 1970 00:00:00 GMT\";\n } else {\n if (isString(value)) {\n cookieLength = (rawDocument.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value) +\n ';path=' + cookiePath).length + 1;\n\n // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:\n // - 300 cookies\n // - 20 cookies per unique domain\n // - 4096 bytes per cookie\n if (cookieLength > 4096) {\n $log.warn(\"Cookie '\"+ name +\n \"' possibly not set or overflowed because it was too large (\"+\n cookieLength + \" > 4096 bytes)!\");\n }\n }\n }\n } else {\n if (rawDocument.cookie !== lastCookieString) {\n lastCookieString = rawDocument.cookie;\n cookieArray = lastCookieString.split(\"; \");\n lastCookies = {};\n\n for (i = 0; i < cookieArray.length; i++) {\n cookie = cookieArray[i];\n index = cookie.indexOf('=');\n if (index > 0) { //ignore nameless cookies\n name = decodeURIComponent(cookie.substring(0, index));\n // the first value that is seen for a cookie is the most\n // specific one. values for the same cookie name that\n // follow are for less specific paths.\n if (lastCookies[name] === undefined) {\n lastCookies[name] = decodeURIComponent(cookie.substring(index + 1));\n }\n }\n }\n }\n return lastCookies;\n }\n };\n\n\n /**\n * @name $browser#defer\n * @param {function()} fn A function, who's execution should be deferred.\n * @param {number=} [delay=0] of milliseconds to defer the function execution.\n * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n *\n * @description\n * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n *\n * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n * via `$browser.defer.flush()`.\n *\n */\n self.defer = function(fn, delay) {\n var timeoutId;\n outstandingRequestCount++;\n timeoutId = setTimeout(function() {\n delete pendingDeferIds[timeoutId];\n completeOutstandingRequest(fn);\n }, delay || 0);\n pendingDeferIds[timeoutId] = true;\n return timeoutId;\n };\n\n\n /**\n * @name $browser#defer.cancel\n *\n * @description\n * Cancels a deferred task identified with `deferId`.\n *\n * @param {*} deferId Token returned by the `$browser.defer` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n self.defer.cancel = function(deferId) {\n if (pendingDeferIds[deferId]) {\n delete pendingDeferIds[deferId];\n clearTimeout(deferId);\n completeOutstandingRequest(noop);\n return true;\n }\n return false;\n };\n\n}\n\nfunction $BrowserProvider(){\n this.$get = ['$window', '$log', '$sniffer', '$document',\n function( $window, $log, $sniffer, $document){\n return new Browser($window, $document, $log, $sniffer);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $cacheFactory\n *\n * @description\n * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to\n * them.\n *\n * ```js\n *\n * var cache = $cacheFactory('cacheId');\n * expect($cacheFactory.get('cacheId')).toBe(cache);\n * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n *\n * cache.put(\"key\", \"value\");\n * cache.put(\"another key\", \"another value\");\n *\n * // We've specified no options on creation\n * expect(cache.info()).toEqual({id: 'cacheId', size: 2});\n *\n * ```\n *\n *\n * @param {string} cacheId Name or id of the newly created cache.\n * @param {object=} options Options object that specifies the cache behavior. Properties:\n *\n * - `{number=}` `capacity` — turns the cache into LRU cache.\n *\n * @returns {object} Newly created cache object with the following set of methods:\n *\n * - `{object}` `info()` — Returns id, size, and options of cache.\n * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n * it.\n * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n * - `{void}` `removeAll()` — Removes all cached values.\n * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n *\n * @example\n \n \n \n \n \n Cache\n\n Cached Values\n \n \n : \n \n \n\n Cache Info\n \n \n : \n \n \n \n \n \n angular.module('cacheExampleApp', []).\n controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {\n $scope.keys = [];\n $scope.cache = $cacheFactory('cacheId');\n $scope.put = function(key, value) {\n if ($scope.cache.get(key) === undefined) {\n $scope.keys.push(key);\n }\n $scope.cache.put(key, value === undefined ? null : value);\n };\n }]);\n \n \n p {\n margin: 10px 0 3px;\n }\n \n \n */\nfunction $CacheFactoryProvider() {\n\n this.$get = function() {\n var caches = {};\n\n function cacheFactory(cacheId, options) {\n if (cacheId in caches) {\n throw minErr('$cacheFactory')('iid', \"CacheId '{0}' is already taken!\", cacheId);\n }\n\n var size = 0,\n stats = extend({}, options, {id: cacheId}),\n data = {},\n capacity = (options && options.capacity) || Number.MAX_VALUE,\n lruHash = {},\n freshEnd = null,\n staleEnd = null;\n\n /**\n * @ngdoc type\n * @name $cacheFactory.Cache\n *\n * @description\n * A cache object used to store and retrieve data, primarily used by\n * {@link $http $http} and the {@link ng.directive:script script} directive to cache\n * templates and other data.\n *\n * ```js\n * angular.module('superCache')\n * .factory('superCache', ['$cacheFactory', function($cacheFactory) {\n * return $cacheFactory('super-cache');\n * }]);\n * ```\n *\n * Example test:\n *\n * ```js\n * it('should behave like a cache', inject(function(superCache) {\n * superCache.put('key', 'value');\n * superCache.put('another key', 'another value');\n *\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 2\n * });\n *\n * superCache.remove('another key');\n * expect(superCache.get('another key')).toBeUndefined();\n *\n * superCache.removeAll();\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 0\n * });\n * }));\n * ```\n */\n return caches[cacheId] = {\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#put\n * @kind function\n *\n * @description\n * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be\n * retrieved later, and incrementing the size of the cache if the key was not already\n * present in the cache. If behaving like an LRU cache, it will also remove stale\n * entries from the set.\n *\n * It will not insert undefined values into the cache.\n *\n * @param {string} key the key under which the cached data is stored.\n * @param {*} value the value to store alongside the key. If it is undefined, the key\n * will not be stored.\n * @returns {*} the value stored.\n */\n put: function(key, value) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\n refresh(lruEntry);\n }\n\n if (isUndefined(value)) return;\n if (!(key in data)) size++;\n data[key] = value;\n\n if (size > capacity) {\n this.remove(staleEnd.key);\n }\n\n return value;\n },\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#get\n * @kind function\n *\n * @description\n * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the data to be retrieved\n * @returns {*} the value stored.\n */\n get: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n refresh(lruEntry);\n }\n\n return data[key];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#remove\n * @kind function\n *\n * @description\n * Removes an entry from the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the entry to be removed\n */\n remove: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n if (lruEntry == freshEnd) freshEnd = lruEntry.p;\n if (lruEntry == staleEnd) staleEnd = lruEntry.n;\n link(lruEntry.n,lruEntry.p);\n\n delete lruHash[key];\n }\n\n delete data[key];\n size--;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#removeAll\n * @kind function\n *\n * @description\n * Clears the cache object of any entries.\n */\n removeAll: function() {\n data = {};\n size = 0;\n lruHash = {};\n freshEnd = staleEnd = null;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#destroy\n * @kind function\n *\n * @description\n * Destroys the {@link $cacheFactory.Cache Cache} object entirely,\n * removing it from the {@link $cacheFactory $cacheFactory} set.\n */\n destroy: function() {\n data = null;\n stats = null;\n lruHash = null;\n delete caches[cacheId];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#info\n * @kind function\n *\n * @description\n * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.\n *\n * @returns {object} an object with the following properties:\n * \n * **id**: the id of the cache instance\n * **size**: the number of entries kept in the cache instance\n * **...**: any additional properties from the options object when creating the\n * cache.\n * \n */\n info: function() {\n return extend({}, stats, {size: size});\n }\n };\n\n\n /**\n * makes the `entry` the freshEnd of the LRU linked list\n */\n function refresh(entry) {\n if (entry != freshEnd) {\n if (!staleEnd) {\n staleEnd = entry;\n } else if (staleEnd == entry) {\n staleEnd = entry.n;\n }\n\n link(entry.n, entry.p);\n link(entry, freshEnd);\n freshEnd = entry;\n freshEnd.n = null;\n }\n }\n\n\n /**\n * bidirectionally links two entries of the LRU linked list\n */\n function link(nextEntry, prevEntry) {\n if (nextEntry != prevEntry) {\n if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#info\n *\n * @description\n * Get information about all the caches that have been created\n *\n * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n */\n cacheFactory.info = function() {\n var info = {};\n forEach(caches, function(cache, cacheId) {\n info[cacheId] = cache.info();\n });\n return info;\n };\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#get\n *\n * @description\n * Get access to a cache object by the `cacheId` used when it was created.\n *\n * @param {string} cacheId Name or id of a cache to access.\n * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n */\n cacheFactory.get = function(cacheId) {\n return caches[cacheId];\n };\n\n\n return cacheFactory;\n };\n}\n\n/**\n * @ngdoc service\n * @name $templateCache\n *\n * @description\n * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n * can load templates directly into the cache in a `script` tag, or by consuming the\n * `$templateCache` service directly.\n *\n * Adding via the `script` tag:\n *\n * ```html\n * \n * ```\n *\n * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n * the document, but it must be below the `ng-app` definition.\n *\n * Adding via the $templateCache service:\n *\n * ```js\n * var myApp = angular.module('myApp', []);\n * myApp.run(function($templateCache) {\n * $templateCache.put('templateId.html', 'This is the content of the template');\n * });\n * ```\n *\n * To retrieve the template later, simply use it in your HTML:\n * ```html\n * \n * ```\n *\n * or get it via Javascript:\n * ```js\n * $templateCache.get('templateId.html')\n * ```\n *\n * See {@link ng.$cacheFactory $cacheFactory}.\n *\n */\nfunction $TemplateCacheProvider() {\n this.$get = ['$cacheFactory', function($cacheFactory) {\n return $cacheFactory('templates');\n }];\n}\n\n/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n *\n * DOM-related variables:\n *\n * - \"node\" - DOM Node\n * - \"element\" - DOM Element or Node\n * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n *\n *\n * Compiler related stuff:\n *\n * - \"linkFn\" - linking fn of a single directive\n * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n * - \"childLinkFn\" - function that aggregates all linking fns for child nodes of a particular node\n * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n */\n\n\n/**\n * @ngdoc service\n * @name $compile\n * @kind function\n *\n * @description\n * Compiles an HTML string or DOM into a template and produces a template function, which\n * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n *\n * The compilation is a process of walking the DOM tree and matching DOM elements to\n * {@link ng.$compileProvider#directive directives}.\n *\n * \n * **Note:** This document is an in-depth reference of all directive options.\n * For a gentle introduction to directives with examples of common use cases,\n * see the {@link guide/directive directive guide}.\n * \n *\n * ## Comprehensive Directive API\n *\n * There are many different options for a directive.\n *\n * The difference resides in the return value of the factory function.\n * You can either return a \"Directive Definition Object\" (see below) that defines the directive properties,\n * or just the `postLink` function (all other properties will have the default values).\n *\n * \n * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n * \n *\n * Here's an example directive declared with a Directive Definition Object:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * priority: 0,\n * template: '', // or // function(tElement, tAttrs) { ... },\n * // or\n * // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },\n * transclude: false,\n * restrict: 'A',\n * scope: false,\n * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n * controllerAs: 'stringAlias',\n * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n * compile: function compile(tElement, tAttrs, transclude) {\n * return {\n * pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n * post: function postLink(scope, iElement, iAttrs, controller) { ... }\n * }\n * // or\n * // return function postLink( ... ) { ... }\n * },\n * // or\n * // link: {\n * // pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n * // post: function postLink(scope, iElement, iAttrs, controller) { ... }\n * // }\n * // or\n * // link: function postLink( ... ) { ... }\n * };\n * return directiveDefinitionObject;\n * });\n * ```\n *\n * \n * **Note:** Any unspecified options will use the default value. You can see the default values below.\n * \n *\n * Therefore the above can be simplified as:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * link: function postLink(scope, iElement, iAttrs) { ... }\n * };\n * return directiveDefinitionObject;\n * // or\n * // return function postLink(scope, iElement, iAttrs) { ... }\n * });\n * ```\n *\n *\n *\n * ### Directive Definition Object\n *\n * The directive definition object provides instructions to the {@link ng.$compile\n * compiler}. The attributes are:\n *\n * #### `multiElement`\n * When this property is set to true, the HTML compiler will collect DOM nodes between\n * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them\n * together as the directive elements. It is recomended that this feature be used on directives\n * which are not strictly behavioural (such as {@link api/ng.directive:ngClick ngClick}), and which\n * do not manipulate or replace child nodes (such as {@link api/ng.directive:ngInclude ngInclude}).\n *\n * #### `priority`\n * When there are multiple directives defined on a single DOM element, sometimes it\n * is necessary to specify the order in which the directives are applied. The `priority` is used\n * to sort the directives before their `compile` functions get called. Priority is defined as a\n * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n * are also run in priority order, but post-link functions are run in reverse order. The order\n * of directives with the same priority is undefined. The default priority is `0`.\n *\n * #### `terminal`\n * If set to true then the current `priority` will be the last set of directives\n * which will execute (any directives at the current priority will still execute\n * as the order of execution on same `priority` is undefined).\n *\n * #### `scope`\n * **If set to `true`,** then a new scope will be created for this directive. If multiple directives on the\n * same element request a new scope, only one new scope is created. The new scope rule does not\n * apply for the root of the template since the root of the template always gets a new scope.\n *\n * **If set to `{}` (object hash),** then a new \"isolate\" scope is created. The 'isolate' scope differs from\n * normal scope in that it does not prototypically inherit from the parent scope. This is useful\n * when creating reusable components, which should not accidentally read or modify data in the\n * parent scope.\n *\n * The 'isolate' scope takes an object hash which defines a set of local scope properties\n * derived from the parent scope. These local properties are useful for aliasing values for\n * templates. Locals definition is a hash of local scope property to its source:\n *\n * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n * always a string since DOM attributes are strings. If no `attr` name is specified then the\n * attribute name is assumed to be the same as the local name.\n * Given `` and widget definition\n * of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect\n * the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the\n * `localName` property on the widget scope. The `name` is read from the parent scope (not\n * component scope).\n *\n * * `=` or `=attr` - set up bi-directional binding between a local scope property and the\n * parent scope property of name defined via the value of the `attr` attribute. If no `attr`\n * name is specified then the attribute name is assumed to be the same as the local name.\n * Given `` and widget definition of\n * `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the\n * value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected\n * in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent\n * scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You\n * can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional.\n *\n * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.\n * If no `attr` name is specified then the attribute name is assumed to be the same as the\n * local name. Given `` and widget definition of\n * `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to\n * a function wrapper for the `count = count + value` expression. Often it's desirable to\n * pass data from the isolated scope via an expression to the parent scope, this can be\n * done by passing a map of local variable names and values into the expression wrapper fn.\n * For example, if the expression is `increment(amount)` then we can specify the amount value\n * by calling the `localFn` as `localFn({amount: 22})`.\n *\n *\n * #### `bindToController`\n * When an isolate scope is used for a component (see above), and `controllerAs` is used, `bindToController` will\n * allow a component to have its properties bound to the controller, rather than to scope. When the controller\n * is instantiated, the initial values of the isolate scope bindings are already available.\n *\n * #### `controller`\n * Controller constructor function. The controller is instantiated before the\n * pre-linking phase and it is shared with other directives (see\n * `require` attribute). This allows the directives to communicate with each other and augment\n * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n *\n * * `$scope` - Current scope associated with the element\n * * `$element` - Current element\n * * `$attrs` - Current attributes object for the element\n * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n * * `scope`: optional argument to override the scope.\n * * `cloneLinkingFn`: optional argument to create clones of the original transcluded content.\n * * `futureParentElement`:\n * * defines the parent to which the `cloneLinkingFn` will add the cloned elements.\n * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.\n * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)\n * and when the `cloneLinkinFn` is passed,\n * as those elements need to created and cloned in a special way when they are defined outside their\n * usual containers (e.g. like ``).\n * * See also the `directive.templateNamespace` property.\n *\n *\n * #### `require`\n * Require another directive and inject its controller as the fourth argument to the linking function. The\n * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the\n * injected argument will be an array in corresponding order. If no such directive can be\n * found, or if the directive does not have a controller, then an error is raised. The name can be prefixed with:\n *\n * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.\n * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass\n * `null` to the `link` fn if not found.\n *\n *\n * #### `controllerAs`\n * Controller alias at the directive scope. An alias for the controller so it\n * can be referenced at the directive template. The directive needs to define a scope for this\n * configuration to be used. Useful in the case when directive is used as component.\n *\n *\n * #### `restrict`\n * String of subset of `EACM` which restricts the directive to a specific directive\n * declaration style. If omitted, the defaults (elements and attributes) are used.\n *\n * * `E` - Element name (default): ``\n * * `A` - Attribute (default): ``\n * * `C` - Class: ``\n * * `M` - Comment: ``\n *\n *\n * #### `templateNamespace`\n * String representing the document type used by the markup in the template.\n * AngularJS needs this information as those elements need to be created and cloned\n * in a special way when they are defined outside their usual containers like `` and ``.\n *\n * * `html` - All root nodes in the template are HTML. Root nodes may also be\n * top-level elements such as `` or ``.\n * * `svg` - The root nodes in the template are SVG elements (excluding ``).\n * * `math` - The root nodes in the template are MathML elements (excluding ``).\n *\n * If no `templateNamespace` is specified, then the namespace is considered to be `html`.\n *\n * #### `template`\n * HTML markup that may:\n * * Replace the contents of the directive's element (default).\n * * Replace the directive's element itself (if `replace` is true - DEPRECATED).\n * * Wrap the contents of the directive's element (if `transclude` is true).\n *\n * Value may be:\n *\n * * A string. For example `{{delete_str}}`.\n * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`\n * function api below) and returns a string value.\n *\n *\n * #### `templateUrl`\n * This is similar to `template` but the template is loaded from the specified URL, asynchronously.\n *\n * Because template loading is asynchronous the compiler will suspend compilation of directives on that element\n * for later when the template has been resolved. In the meantime it will continue to compile and link\n * sibling and parent elements as though this element had not contained any directives.\n *\n * The compiler does not suspend the entire compilation to wait for templates to be loaded because this\n * would result in the whole app \"stalling\" until all templates are loaded asynchronously - even in the\n * case when only one deeply nested directive has `templateUrl`.\n *\n * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}\n *\n * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n * a string value representing the url. In either case, the template URL is passed through {@link\n * api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n *\n *\n * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0)\n * specify what the template should replace. Defaults to `false`.\n *\n * * `true` - the template will replace the directive's element.\n * * `false` - the template will replace the contents of the directive's element.\n *\n * The replacement process migrates all of the attributes / classes from the old element to the new\n * one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive\n * Directives Guide} for an example.\n *\n * There are very few scenarios where element replacement is required for the application function,\n * the main one being reusable custom components that are used within SVG contexts\n * (because SVG doesn't work with custom elements in the DOM tree).\n *\n * #### `transclude`\n * compile the content of the element and make it available to the directive.\n * Typically used with {@link ng.directive:ngTransclude\n * ngTransclude}. The advantage of transclusion is that the linking function receives a\n * transclusion function which is pre-bound to the correct scope. In a typical setup the widget\n * creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`\n * scope. This makes it possible for the widget to have private state, and the transclusion to\n * be bound to the parent (pre-`isolate`) scope.\n *\n * * `true` - transclude the content of the directive.\n * * `'element'` - transclude the whole element including any directives defined at lower priority.\n *\n * \n * **Note:** When testing an element transclude directive you must not place the directive at the root of the\n * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives\n * Testing Transclusion Directives}.\n * \n *\n * #### `compile`\n *\n * ```js\n * function compile(tElement, tAttrs, transclude) { ... }\n * ```\n *\n * The compile function deals with transforming the template DOM. Since most directives do not do\n * template transformation, it is not used often. The compile function takes the following arguments:\n *\n * * `tElement` - template element - The element where the directive has been declared. It is\n * safe to do template transformation on the element and child elements only.\n *\n * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n * between all directive compile functions.\n *\n * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n *\n * \n * **Note:** The template instance and the link instance may be different objects if the template has\n * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n * should be done in a linking function rather than in a compile function.\n * \n\n * \n * **Note:** The compile function cannot handle directives that recursively use themselves in their\n * own templates or compile functions. Compiling these directives results in an infinite loop and a\n * stack overflow errors.\n *\n * This can be avoided by manually using $compile in the postLink function to imperatively compile\n * a directive's template instead of relying on automatic template compilation via `template` or\n * `templateUrl` declaration or manual compilation inside the compile function.\n * \n *\n * \n * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n * e.g. does not know about the right outer scope. Please use the transclude function that is passed\n * to the link function instead.\n * \n\n * A compile function can have a return value which can be either a function or an object.\n *\n * * returning a (post-link) function - is equivalent to registering the linking function via the\n * `link` property of the config object when the compile function is empty.\n *\n * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n * control when a linking function should be called during the linking phase. See info about\n * pre-linking and post-linking functions below.\n *\n *\n * #### `link`\n * This property is used only if the `compile` property is not defined.\n *\n * ```js\n * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n * ```\n *\n * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n * executed after the template has been cloned. This is where most of the directive logic will be\n * put.\n *\n * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the\n * directive for registering {@link ng.$rootScope.Scope#$watch watches}.\n *\n * * `iElement` - instance element - The element where the directive is to be used. It is safe to\n * manipulate the children of the element only in `postLink` function since the children have\n * already been linked.\n *\n * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n * between all directive linking functions.\n *\n * * `controller` - a controller instance - A controller instance if at least one directive on the\n * element defines a controller. The controller is shared among all the directives, which allows\n * the directives to use the controllers as a communication channel.\n *\n * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n * This is the same as the `$transclude`\n * parameter of directive controllers, see there for details.\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n *\n * #### Pre-linking function\n *\n * Executed before the child elements are linked. Not safe to do DOM transformation since the\n * compiler linking function will fail to locate the correct elements for linking.\n *\n * #### Post-linking function\n *\n * Executed after the child elements are linked.\n *\n * Note that child elements that contain `templateUrl` directives will not have been compiled\n * and linked since they are waiting for their template to load asynchronously and their own\n * compilation and linking has been suspended until that occurs.\n *\n * It is safe to do DOM transformation in the post-linking function on elements that are not waiting\n * for their async templates to be resolved.\n *\n * \n * ### Attributes\n *\n * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n * `link()` or `compile()` functions. It has a variety of uses.\n *\n * accessing *Normalized attribute names:*\n * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.\n * the attributes object allows for normalized access to\n * the attributes.\n *\n * * *Directive inter-communication:* All directives share the same instance of the attributes\n * object which allows the directives to use the attributes object as inter directive\n * communication.\n *\n * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n * allowing other directives to read the interpolated value.\n *\n * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n * that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n * the only way to easily get the actual value because during the linking phase the interpolation\n * hasn't been evaluated yet and so the value is at this time set to `undefined`.\n *\n * ```js\n * function linkingFn(scope, elm, attrs, ctrl) {\n * // get the attribute value\n * console.log(attrs.ngModel);\n *\n * // change the attribute\n * attrs.$set('ngModel', 'new value');\n *\n * // observe changes to interpolated attribute\n * attrs.$observe('ngModel', function(value) {\n * console.log('ngModel has changed value to ' + value);\n * });\n * }\n * ```\n *\n * Below is an example using `$compileProvider`.\n *\n * \n * **Note**: Typically directives are registered with `module.directive`. The example below is\n * to illustrate how `$compile` works.\n * \n *\n \n \n \n \n \n \n \n \n \n \n it('should auto compile', function() {\n var textarea = $('textarea');\n var output = $('div[compile]');\n // The initial state reads 'Hello Angular'.\n expect(output.getText()).toBe('Hello Angular');\n textarea.clear();\n textarea.sendKeys('{{name}}!');\n expect(output.getText()).toBe('Angular!');\n });\n \n \n\n *\n *\n * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives.\n * @param {number} maxPriority only apply directives lower than given priority (Only effects the\n * root element(s), not their children)\n * @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template\n * (a DOM element/tree) to a scope. Where:\n *\n * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n * `template` and call the `cloneAttachFn` function allowing the caller to attach the\n * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n * called as: `cloneAttachFn(clonedElement, scope)` where:\n *\n * * `clonedElement` - is a clone of the original `element` passed into the compiler.\n * * `scope` - is the current scope with which the linking function is working with.\n *\n * Calling the linking function returns the element of the template. It is either the original\n * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n *\n * After linking the view is not updated until after a call to $digest which typically is done by\n * Angular automatically.\n *\n * If you need access to the bound view, there are two ways to do it:\n *\n * - If you are not asking the linking function to clone the template, create the DOM element(s)\n * before you send them to the compiler and keep this reference around.\n * ```js\n * var element = $compile('{{total}}')(scope);\n * ```\n *\n * - if on the other hand, you need the element to be cloned, the view reference from the original\n * example would not point to the clone, but rather to the original template that was cloned. In\n * this case, you can access the clone via the cloneAttachFn:\n * ```js\n * var templateElement = angular.element('{{total}}'),\n * scope = ....;\n *\n * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n * //attach the clone to DOM document at the right place\n * });\n *\n * //now we have reference to the cloned DOM via `clonedElement`\n * ```\n *\n *\n * For information on how the compiler works, see the\n * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.\n */\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc provider\n * @name $compileProvider\n *\n * @description\n */\n$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\nfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n var hasDirectives = {},\n Suffix = 'Directive',\n COMMENT_DIRECTIVE_REGEXP = /^\\s*directive\\:\\s*([\\d\\w_\\-]+)\\s+(.*)$/,\n CLASS_DIRECTIVE_REGEXP = /(([\\d\\w_\\-]+)(?:\\:([^;]+))?;?)/,\n ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset');\n\n // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n // The assumption is that future DOM event attribute names will begin with\n // 'on' and be composed of only English letters.\n var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n\n function parseIsolateBindings(scope, directiveName) {\n var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n\n var bindings = {};\n\n forEach(scope, function(definition, scopeName) {\n var match = definition.match(LOCAL_REGEXP);\n\n if (!match) {\n throw $compileMinErr('iscp',\n \"Invalid isolate scope definition for directive '{0}'.\" +\n \" Definition: {... {1}: '{2}' ...}\",\n directiveName, scopeName, definition);\n }\n\n bindings[scopeName] = {\n attrName: match[3] || scopeName,\n mode: match[1],\n optional: match[2] === '?'\n };\n });\n\n return bindings;\n }\n\n /**\n * @ngdoc method\n * @name $compileProvider#directive\n * @kind function\n *\n * @description\n * Register a new directive with the compiler.\n *\n * @param {string|Object} name Name of the directive in camel-case (i.e. ngBind which\n * will match as ng-bind), or an object map of directives where the keys are the\n * names and the values are the factories.\n * @param {Function|Array} directiveFactory An injectable directive factory function. See\n * {@link guide/directive} for more info.\n * @returns {ng.$compileProvider} Self for chaining.\n */\n this.directive = function registerDirective(name, directiveFactory) {\n assertNotHasOwnProperty(name, 'directive');\n if (isString(name)) {\n assertArg(directiveFactory, 'directiveFactory');\n if (!hasDirectives.hasOwnProperty(name)) {\n hasDirectives[name] = [];\n $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n function($injector, $exceptionHandler) {\n var directives = [];\n forEach(hasDirectives[name], function(directiveFactory, index) {\n try {\n var directive = $injector.invoke(directiveFactory);\n if (isFunction(directive)) {\n directive = { compile: valueFn(directive) };\n } else if (!directive.compile && directive.link) {\n directive.compile = valueFn(directive.link);\n }\n directive.priority = directive.priority || 0;\n directive.index = index;\n directive.name = directive.name || name;\n directive.require = directive.require || (directive.controller && directive.name);\n directive.restrict = directive.restrict || 'EA';\n if (isObject(directive.scope)) {\n directive.$$isolateBindings = parseIsolateBindings(directive.scope, directive.name);\n }\n directives.push(directive);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n return directives;\n }]);\n }\n hasDirectives[name].push(directiveFactory);\n } else {\n forEach(name, reverseParams(registerDirective));\n }\n return this;\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#aHrefSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during a[href] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.aHrefSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.aHrefSanitizationWhitelist();\n }\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#imgSrcSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during img[src] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.imgSrcSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();\n }\n };\n\n /**\n * @ngdoc method\n * @name $compileProvider#debugInfoEnabled\n *\n * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the\n * current debugInfoEnabled state\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n *\n * @kind function\n *\n * @description\n * Call this method to enable/disable various debug runtime information in the compiler such as adding\n * binding information and a reference to the current scope on to DOM elements.\n * If enabled, the compiler will add the following to DOM elements that have been bound to the scope\n * * `ng-binding` CSS class\n * * `$binding` data property containing an array of the binding expressions\n *\n * You may want to use this in production for a significant performance boost. See\n * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.\n *\n * The default value is true.\n */\n var debugInfoEnabled = true;\n this.debugInfoEnabled = function(enabled) {\n if(isDefined(enabled)) {\n debugInfoEnabled = enabled;\n return this;\n }\n return debugInfoEnabled;\n };\n\n this.$get = [\n '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',\n '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri',\n function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse,\n $controller, $rootScope, $document, $sce, $animate, $$sanitizeUri) {\n\n var Attributes = function(element, attributesToCopy) {\n if (attributesToCopy) {\n var keys = Object.keys(attributesToCopy);\n var i, l, key;\n\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n this[key] = attributesToCopy[key];\n }\n } else {\n this.$attr = {};\n }\n\n this.$$element = element;\n };\n\n Attributes.prototype = {\n $normalize: directiveNormalize,\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$addClass\n * @kind function\n *\n * @description\n * Adds the CSS class value specified by the classVal parameter to the element. If animations\n * are enabled then an animation will be triggered for the class addition.\n *\n * @param {string} classVal The className value that will be added to the element\n */\n $addClass : function(classVal) {\n if(classVal && classVal.length > 0) {\n $animate.addClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$removeClass\n * @kind function\n *\n * @description\n * Removes the CSS class value specified by the classVal parameter from the element. If\n * animations are enabled then an animation will be triggered for the class removal.\n *\n * @param {string} classVal The className value that will be removed from the element\n */\n $removeClass : function(classVal) {\n if(classVal && classVal.length > 0) {\n $animate.removeClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$updateClass\n * @kind function\n *\n * @description\n * Adds and removes the appropriate CSS class values to the element based on the difference\n * between the new and old CSS class values (specified as newClasses and oldClasses).\n *\n * @param {string} newClasses The current CSS className value\n * @param {string} oldClasses The former CSS className value\n */\n $updateClass : function(newClasses, oldClasses) {\n var toAdd = tokenDifference(newClasses, oldClasses);\n if (toAdd && toAdd.length) {\n $animate.addClass(this.$$element, toAdd);\n }\n\n var toRemove = tokenDifference(oldClasses, newClasses);\n if (toRemove && toRemove.length) {\n $animate.removeClass(this.$$element, toRemove);\n }\n },\n\n /**\n * Set a normalized attribute on the element in a way such that all directives\n * can share the attribute. This function properly handles boolean attributes.\n * @param {string} key Normalized key. (ie ngAttribute)\n * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n * Defaults to true.\n * @param {string=} attrName Optional none normalized name. Defaults to key.\n */\n $set: function(key, value, writeAttr, attrName) {\n // TODO: decide whether or not to throw an error if \"class\"\n //is set through this function since it may cause $updateClass to\n //become unstable.\n\n var node = this.$$element[0],\n booleanKey = getBooleanAttrName(node, key),\n aliasedKey = getAliasedAttrName(node, key),\n observer = key,\n normalizedVal,\n nodeName;\n\n if (booleanKey) {\n this.$$element.prop(key, value);\n attrName = booleanKey;\n } else if(aliasedKey) {\n this[aliasedKey] = value;\n observer = aliasedKey;\n }\n\n this[key] = value;\n\n // translate normalized key to actual key\n if (attrName) {\n this.$attr[key] = attrName;\n } else {\n attrName = this.$attr[key];\n if (!attrName) {\n this.$attr[key] = attrName = snake_case(key, '-');\n }\n }\n\n nodeName = nodeName_(this.$$element);\n\n // sanitize a[href] and img[src] values\n if ((nodeName === 'a' && key === 'href') ||\n (nodeName === 'img' && key === 'src')) {\n this[key] = value = $$sanitizeUri(value, key === 'src');\n }\n\n if (writeAttr !== false) {\n if (value === null || value === undefined) {\n this.$$element.removeAttr(attrName);\n } else {\n this.$$element.attr(attrName, value);\n }\n }\n\n // fire observers\n var $$observers = this.$$observers;\n $$observers && forEach($$observers[observer], function(fn) {\n try {\n fn(value);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n },\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$observe\n * @kind function\n *\n * @description\n * Observes an interpolated attribute.\n *\n * The observer function will be invoked once during the next `$digest` following\n * compilation. The observer is then invoked whenever the interpolated value\n * changes.\n *\n * @param {string} key Normalized key. (ie ngAttribute) .\n * @param {function(interpolatedValue)} fn Function that will be called whenever\n the interpolated value of the attribute changes.\n * See the {@link guide/directive#Attributes Directives} guide for more info.\n * @returns {function()} Returns a deregistration function for this observer.\n */\n $observe: function(key, fn) {\n var attrs = this,\n $$observers = (attrs.$$observers || (attrs.$$observers = {})),\n listeners = ($$observers[key] || ($$observers[key] = []));\n\n listeners.push(fn);\n $rootScope.$evalAsync(function() {\n if (!listeners.$$inter) {\n // no one registered attribute interpolation function, so lets call it manually\n fn(attrs[key]);\n }\n });\n\n return function() {\n arrayRemove(listeners, fn);\n };\n }\n };\n\n\n function safeAddClass($element, className) {\n try {\n $element.addClass(className);\n } catch(e) {\n // ignore, since it means that we are trying to set class on\n // SVG element, where class name is read-only.\n }\n }\n\n\n var startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n denormalizeTemplate = (startSymbol == '{{' || endSymbol == '}}')\n ? identity\n : function denormalizeTemplate(template) {\n return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n },\n NG_ATTR_BINDING = /^ngAttr[A-Z]/;\n\n compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {\n var bindings = $element.data('$binding') || [];\n\n if (isArray(binding)) {\n bindings = bindings.concat(binding);\n } else {\n bindings.push(binding);\n }\n\n $element.data('$binding', bindings);\n } : noop;\n\n compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {\n safeAddClass($element, 'ng-binding');\n } : noop;\n\n compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {\n var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';\n $element.data(dataName, scope);\n } : noop;\n\n compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {\n safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');\n } : noop;\n\n return compile;\n\n //================================\n\n function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n previousCompileContext) {\n if (!($compileNodes instanceof jqLite)) {\n // jquery always rewraps, whereas we need to preserve the original selector so that we can\n // modify it.\n $compileNodes = jqLite($compileNodes);\n }\n // We can not compile top level text elements since text nodes can be merged and we will\n // not be able to attach scope data to them, so we will wrap them in \n forEach($compileNodes, function(node, index){\n if (node.nodeType == 3 /* text node */ && node.nodeValue.match(/\\S+/) /* non-empty */ ) {\n $compileNodes[index] = jqLite(node).wrap('').parent()[0];\n }\n });\n var compositeLinkFn =\n compileNodes($compileNodes, transcludeFn, $compileNodes,\n maxPriority, ignoreDirective, previousCompileContext);\n compile.$$addScopeClass($compileNodes);\n var namespace = null;\n var namespaceAdaptedCompileNodes = $compileNodes;\n var lastCompileNode;\n return function publicLinkFn(scope, cloneConnectFn, transcludeControllers, parentBoundTranscludeFn, futureParentElement){\n assertArg(scope, 'scope');\n if (!namespace) {\n namespace = detectNamespaceForChildElements(futureParentElement);\n }\n if (namespace !== 'html' && $compileNodes[0] !== lastCompileNode) {\n namespaceAdaptedCompileNodes = jqLite(\n wrapTemplate(namespace, jqLite('').append($compileNodes).html())\n );\n }\n // When using a directive with replace:true and templateUrl the $compileNodes\n // might change, so we need to recreate the namespace adapted compileNodes.\n lastCompileNode = $compileNodes[0];\n\n // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n // and sometimes changes the structure of the DOM.\n var $linkNode = cloneConnectFn\n ? JQLitePrototype.clone.call(namespaceAdaptedCompileNodes) // IMPORTANT!!!\n : namespaceAdaptedCompileNodes;\n\n if (transcludeControllers) {\n for (var controllerName in transcludeControllers) {\n $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);\n }\n }\n\n compile.$$addScopeInfo($linkNode, scope);\n\n if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);\n return $linkNode;\n };\n }\n\n function detectNamespaceForChildElements(parentElement) {\n // TODO: Make this detect MathML as well...\n var node = parentElement && parentElement[0];\n if (!node) {\n return 'html';\n } else {\n return nodeName_(node) !== 'foreignobject' && node.toString().match(/SVG/) ? 'svg': 'html';\n }\n }\n\n /**\n * Compile function matches each node in nodeList against the directives. Once all directives\n * for a particular node are collected their compile functions are executed. The compile\n * functions return values - the linking functions - are combined into a composite linking\n * function, which is the a linking function for the node.\n *\n * @param {NodeList} nodeList an array of nodes or NodeList to compile\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new child of the transcluded parent scope.\n * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n * the rootElement must be set the jqLite collection of the compile root. This is\n * needed so that the jqLite collection items can be replaced with widgets.\n * @param {number=} maxPriority Max directive priority.\n * @returns {Function} A composite linking function of all of the matched directives or null.\n */\n function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n previousCompileContext) {\n var linkFns = [],\n attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;\n\n for (var i = 0; i < nodeList.length; i++) {\n attrs = new Attributes();\n\n // we must always refer to nodeList[i] since the nodes can be replaced underneath us.\n directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n ignoreDirective);\n\n nodeLinkFn = (directives.length)\n ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n null, [], [], previousCompileContext)\n : null;\n\n if (nodeLinkFn && nodeLinkFn.scope) {\n compile.$$addScopeClass(attrs.$$element);\n }\n\n childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n !(childNodes = nodeList[i].childNodes) ||\n !childNodes.length)\n ? null\n : compileNodes(childNodes,\n nodeLinkFn ? (\n (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)\n && nodeLinkFn.transclude) : transcludeFn);\n\n if (nodeLinkFn || childLinkFn) {\n linkFns.push(i, nodeLinkFn, childLinkFn);\n linkFnFound = true;\n nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;\n }\n\n //use the previous context only for the first element in the virtual group\n previousCompileContext = null;\n }\n\n // return a linking function if we have found anything, null otherwise\n return linkFnFound ? compositeLinkFn : null;\n\n function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {\n var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;\n var stableNodeList;\n\n\n if (nodeLinkFnFound) {\n // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our\n // offsets don't get screwed up\n var nodeListLength = nodeList.length;\n stableNodeList = new Array(nodeListLength);\n\n // create a sparse array by only copying the elements which have a linkFn\n for (i = 0; i < linkFns.length; i+=3) {\n idx = linkFns[i];\n stableNodeList[idx] = nodeList[idx];\n }\n } else {\n stableNodeList = nodeList;\n }\n\n for(i = 0, ii = linkFns.length; i < ii;) {\n node = stableNodeList[linkFns[i++]];\n nodeLinkFn = linkFns[i++];\n childLinkFn = linkFns[i++];\n\n if (nodeLinkFn) {\n if (nodeLinkFn.scope) {\n childScope = scope.$new();\n compile.$$addScopeInfo(jqLite(node), childScope);\n } else {\n childScope = scope;\n }\n\n if ( nodeLinkFn.transcludeOnThisElement ) {\n childBoundTranscludeFn = createBoundTranscludeFn(\n scope, nodeLinkFn.transclude, parentBoundTranscludeFn,\n nodeLinkFn.elementTranscludeOnThisElement);\n\n } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {\n childBoundTranscludeFn = parentBoundTranscludeFn;\n\n } else if (!parentBoundTranscludeFn && transcludeFn) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);\n\n } else {\n childBoundTranscludeFn = null;\n }\n\n nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);\n\n } else if (childLinkFn) {\n childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);\n }\n }\n }\n }\n\n function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn, elementTransclusion) {\n\n var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement) {\n var scopeCreated = false;\n\n if (!transcludedScope) {\n transcludedScope = scope.$new();\n transcludedScope.$$transcluded = true;\n scopeCreated = true;\n }\n\n var clone = transcludeFn(transcludedScope, cloneFn, controllers, previousBoundTranscludeFn, futureParentElement);\n if (scopeCreated && !elementTransclusion) {\n clone.on('$destroy', function() { transcludedScope.$destroy(); });\n }\n return clone;\n };\n\n return boundTranscludeFn;\n }\n\n /**\n * Looks for directives on the given node and adds them to the directive collection which is\n * sorted.\n *\n * @param node Node to search.\n * @param directives An array to which the directives are added to. This array is sorted before\n * the function returns.\n * @param attrs The shared attrs object which is used to populate the normalized attributes.\n * @param {number=} maxPriority Max directive priority.\n */\n function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n var nodeType = node.nodeType,\n attrsMap = attrs.$attr,\n match,\n className;\n\n switch(nodeType) {\n case 1: /* Element */\n // use the node name: \n addDirective(directives,\n directiveNormalize(nodeName_(node)), 'E', maxPriority, ignoreDirective);\n\n // iterate over the attributes\n for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,\n j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n var attrStartName = false;\n var attrEndName = false;\n\n attr = nAttrs[j];\n if (!msie || msie >= 8 || attr.specified) {\n name = attr.name;\n value = trim(attr.value);\n\n // support ngAttr attribute binding\n ngAttrName = directiveNormalize(name);\n if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {\n name = snake_case(ngAttrName.substr(6), '-');\n }\n\n var directiveNName = ngAttrName.replace(/(Start|End)$/, '');\n if (directiveIsMultiElement(directiveNName)) {\n if (ngAttrName === directiveNName + 'Start') {\n attrStartName = name;\n attrEndName = name.substr(0, name.length - 5) + 'end';\n name = name.substr(0, name.length - 6);\n }\n }\n\n nName = directiveNormalize(name.toLowerCase());\n attrsMap[nName] = name;\n if (isNgAttr || !attrs.hasOwnProperty(nName)) {\n attrs[nName] = value;\n if (getBooleanAttrName(node, nName)) {\n attrs[nName] = true; // presence means true\n }\n }\n addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);\n addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n attrEndName);\n }\n }\n\n // use class as directive\n className = node.className;\n if (isString(className) && className !== '') {\n while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {\n nName = directiveNormalize(match[2]);\n if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[3]);\n }\n className = className.substr(match.index + match[0].length);\n }\n }\n break;\n case 3: /* Text Node */\n addTextInterpolateDirective(directives, node.nodeValue);\n break;\n case 8: /* Comment */\n try {\n match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n if (match) {\n nName = directiveNormalize(match[1]);\n if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[2]);\n }\n }\n } catch (e) {\n // turns out that under some circumstances IE9 throws errors when one attempts to read\n // comment's node value.\n // Just ignore it and continue. (Can't seem to reproduce in test case.)\n }\n break;\n }\n\n directives.sort(byPriority);\n return directives;\n }\n\n /**\n * Given a node with an directive-start it collects all of the siblings until it finds\n * directive-end.\n * @param node\n * @param attrStart\n * @param attrEnd\n * @returns {*}\n */\n function groupScan(node, attrStart, attrEnd) {\n var nodes = [];\n var depth = 0;\n if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n var startNode = node;\n do {\n if (!node) {\n throw $compileMinErr('uterdir',\n \"Unterminated attribute, found '{0}' but no matching '{1}' found.\",\n attrStart, attrEnd);\n }\n if (node.nodeType == 1 /** Element **/) {\n if (node.hasAttribute(attrStart)) depth++;\n if (node.hasAttribute(attrEnd)) depth--;\n }\n nodes.push(node);\n node = node.nextSibling;\n } while (depth > 0);\n } else {\n nodes.push(node);\n }\n\n return jqLite(nodes);\n }\n\n /**\n * Wrapper for linking function which converts normal linking function into a grouped\n * linking function.\n * @param linkFn\n * @param attrStart\n * @param attrEnd\n * @returns {Function}\n */\n function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n return function(scope, element, attrs, controllers, transcludeFn) {\n element = groupScan(element[0], attrStart, attrEnd);\n return linkFn(scope, element, attrs, controllers, transcludeFn);\n };\n }\n\n /**\n * Once the directives have been collected, their compile functions are executed. This method\n * is responsible for inlining directive templates as well as terminating the application\n * of the directives if the terminal directive has been reached.\n *\n * @param {Array} directives Array of collected directives to execute their compile function.\n * this needs to be pre-sorted by priority order.\n * @param {Node} compileNode The raw DOM node to apply the compile functions to\n * @param {Object} templateAttrs The shared attribute function\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new\n * child of the transcluded parent scope.\n * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n * argument has the root jqLite array so that we can replace nodes\n * on it.\n * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n * compiling the transclusion.\n * @param {Array.} preLinkFns\n * @param {Array.} postLinkFns\n * @param {Object} previousCompileContext Context used for previous compilation of the current\n * node\n * @returns {Function} linkFn\n */\n function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n previousCompileContext) {\n previousCompileContext = previousCompileContext || {};\n\n var terminalPriority = -Number.MAX_VALUE,\n newScopeDirective,\n controllerDirectives = previousCompileContext.controllerDirectives,\n controllers,\n newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n templateDirective = previousCompileContext.templateDirective,\n nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n hasTranscludeDirective = false,\n hasTemplate = false,\n hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,\n $compileNode = templateAttrs.$$element = jqLite(compileNode),\n directive,\n directiveName,\n $template,\n replaceDirective = originalReplaceDirective,\n childTranscludeFn = transcludeFn,\n linkFn,\n directiveValue;\n\n // executes all directives on the current element\n for(var i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n var attrStart = directive.$$start;\n var attrEnd = directive.$$end;\n\n // collect multiblock sections\n if (attrStart) {\n $compileNode = groupScan(compileNode, attrStart, attrEnd);\n }\n $template = undefined;\n\n if (terminalPriority > directive.priority) {\n break; // prevent further processing of directives\n }\n\n if (directiveValue = directive.scope) {\n\n // skip the check for directives with async templates, we'll check the derived sync\n // directive when the template arrives\n if (!directive.templateUrl) {\n if (isObject(directiveValue)) {\n // This directive is trying to add an isolated scope.\n // Check that there is no scope of any kind already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,\n directive, $compileNode);\n newIsolateScopeDirective = directive;\n } else {\n // This directive is trying to add a child scope.\n // Check that there is no isolated scope already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n $compileNode);\n }\n }\n\n newScopeDirective = newScopeDirective || directive;\n }\n\n directiveName = directive.name;\n\n if (!directive.templateUrl && directive.controller) {\n directiveValue = directive.controller;\n controllerDirectives = controllerDirectives || {};\n assertNoDuplicate(\"'\" + directiveName + \"' controller\",\n controllerDirectives[directiveName], directive, $compileNode);\n controllerDirectives[directiveName] = directive;\n }\n\n if (directiveValue = directive.transclude) {\n hasTranscludeDirective = true;\n\n // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n // This option should only be used by directives that know how to safely handle element transclusion,\n // where the transcluded nodes are added or replaced after linking.\n if (!directive.$$tlb) {\n assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n nonTlbTranscludeDirective = directive;\n }\n\n if (directiveValue == 'element') {\n hasElementTranscludeDirective = true;\n terminalPriority = directive.priority;\n $template = $compileNode;\n $compileNode = templateAttrs.$$element =\n jqLite(document.createComment(' ' + directiveName + ': ' +\n templateAttrs[directiveName] + ' '));\n compileNode = $compileNode[0];\n replaceWith(jqCollection, sliceArgs($template), compileNode);\n\n childTranscludeFn = compile($template, transcludeFn, terminalPriority,\n replaceDirective && replaceDirective.name, {\n // Don't pass in:\n // - controllerDirectives - otherwise we'll create duplicates controllers\n // - newIsolateScopeDirective or templateDirective - combining templates with\n // element transclusion doesn't make sense.\n //\n // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n // on the same element more than once.\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n } else {\n $template = jqLite(jqLiteClone(compileNode)).contents();\n $compileNode.empty(); // clear contents\n childTranscludeFn = compile($template, transcludeFn);\n }\n }\n\n if (directive.template) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n directiveValue = (isFunction(directive.template))\n ? directive.template($compileNode, templateAttrs)\n : directive.template;\n\n directiveValue = denormalizeTemplate(directiveValue);\n\n if (directive.replace) {\n replaceDirective = directive;\n if (jqLiteIsTextNode(directiveValue)) {\n $template = [];\n } else {\n $template = jqLite(wrapTemplate(directive.templateNamespace, trim(directiveValue)));\n }\n compileNode = $template[0];\n\n if ($template.length != 1 || compileNode.nodeType !== 1) {\n throw $compileMinErr('tplrt',\n \"Template for directive '{0}' must have exactly one root element. {1}\",\n directiveName, '');\n }\n\n replaceWith(jqCollection, $compileNode, compileNode);\n\n var newTemplateAttrs = {$attr: {}};\n\n // combine directives from the original node and from the template:\n // - take the array of directives for this element\n // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n // - collect directives from the template and sort them by priority\n // - combine directives as: processed + template + unprocessed\n var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\n if (newIsolateScopeDirective) {\n markDirectivesAsIsolate(templateDirectives);\n }\n directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\n ii = directives.length;\n } else {\n $compileNode.html(directiveValue);\n }\n }\n\n if (directive.templateUrl) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n if (directive.replace) {\n replaceDirective = directive;\n }\n\n nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {\n controllerDirectives: controllerDirectives,\n newIsolateScopeDirective: newIsolateScopeDirective,\n templateDirective: templateDirective,\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n ii = directives.length;\n } else if (directive.compile) {\n try {\n linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n if (isFunction(linkFn)) {\n addLinkFns(null, linkFn, attrStart, attrEnd);\n } else if (linkFn) {\n addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);\n }\n } catch (e) {\n $exceptionHandler(e, startingTag($compileNode));\n }\n }\n\n if (directive.terminal) {\n nodeLinkFn.terminal = true;\n terminalPriority = Math.max(terminalPriority, directive.priority);\n }\n\n }\n\n nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;\n nodeLinkFn.elementTranscludeOnThisElement = hasElementTranscludeDirective;\n nodeLinkFn.templateOnThisElement = hasTemplate;\n nodeLinkFn.transclude = childTranscludeFn;\n\n previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;\n\n // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n return nodeLinkFn;\n\n ////////////////////\n\n function addLinkFns(pre, post, attrStart, attrEnd) {\n if (pre) {\n if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n pre.require = directive.require;\n pre.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n }\n preLinkFns.push(pre);\n }\n if (post) {\n if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n post.require = directive.require;\n post.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n post = cloneAndAnnotateFn(post, {isolateScope: true});\n }\n postLinkFns.push(post);\n }\n }\n\n\n function getControllers(directiveName, require, $element, elementControllers) {\n var value, retrievalMethod = 'data', optional = false;\n if (isString(require)) {\n while((value = require.charAt(0)) == '^' || value == '?') {\n require = require.substr(1);\n if (value == '^') {\n retrievalMethod = 'inheritedData';\n }\n optional = optional || value == '?';\n }\n value = null;\n\n if (elementControllers && retrievalMethod === 'data') {\n if (value = elementControllers[require]) {\n value = value.instance;\n }\n }\n value = value || $element[retrievalMethod]('$' + require + 'Controller');\n\n if (!value && !optional) {\n throw $compileMinErr('ctreq',\n \"Controller '{0}', required by directive '{1}', can't be found!\",\n require, directiveName);\n }\n return value;\n } else if (isArray(require)) {\n value = [];\n forEach(require, function(require) {\n value.push(getControllers(directiveName, require, $element, elementControllers));\n });\n }\n return value;\n }\n\n\n function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n var i, ii, linkFn, controller, isolateScope, elementControllers, transcludeFn, $element,\n attrs;\n\n if (compileNode === linkNode) {\n attrs = templateAttrs;\n $element = templateAttrs.$$element;\n } else {\n $element = jqLite(linkNode);\n attrs = new Attributes($element, templateAttrs);\n }\n\n if (newIsolateScopeDirective) {\n isolateScope = scope.$new(true);\n }\n\n transcludeFn = boundTranscludeFn && controllersBoundTransclude;\n if (controllerDirectives) {\n // TODO: merge `controllers` and `elementControllers` into single object.\n controllers = {};\n elementControllers = {};\n forEach(controllerDirectives, function(directive) {\n var locals = {\n $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n $element: $element,\n $attrs: attrs,\n $transclude: transcludeFn\n }, controllerInstance;\n\n controller = directive.controller;\n if (controller == '@') {\n controller = attrs[directive.name];\n }\n\n controllerInstance = $controller(controller, locals, true, directive.controllerAs);\n\n // For directives with element transclusion the element is a comment,\n // but jQuery .data doesn't support attaching data to comment nodes as it's hard to\n // clean up (http://bugs.jquery.com/ticket/8335).\n // Instead, we save the controllers for the element in a local hash and attach to .data\n // later, once we have the actual element.\n elementControllers[directive.name] = controllerInstance;\n if (!hasElementTranscludeDirective) {\n $element.data('$' + directive.name + 'Controller', controllerInstance.instance);\n }\n\n controllers[directive.name] = controllerInstance;\n });\n }\n\n if (newIsolateScopeDirective) {\n var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n\n compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||\n templateDirective === newIsolateScopeDirective.$$originalDirective)));\n compile.$$addScopeClass($element, true);\n\n var isolateScopeController = controllers && controllers[newIsolateScopeDirective.name];\n var isolateBindingContext = isolateScope;\n if (isolateScopeController && isolateScopeController.identifier &&\n newIsolateScopeDirective.bindToController === true) {\n isolateBindingContext = isolateScopeController.instance;\n }\n\n forEach(isolateScope.$$isolateBindings = newIsolateScopeDirective.$$isolateBindings, function(definition, scopeName) {\n var attrName = definition.attrName,\n optional = definition.optional,\n mode = definition.mode, // @, =, or &\n lastValue,\n parentGet, parentSet, compare;\n\n switch (mode) {\n\n case '@':\n attrs.$observe(attrName, function(value) {\n isolateBindingContext[scopeName] = value;\n });\n attrs.$$observers[attrName].$$scope = scope;\n if( attrs[attrName] ) {\n // If the attribute has been provided then we trigger an interpolation to ensure\n // the value is there for use in the link fn\n isolateBindingContext[scopeName] = $interpolate(attrs[attrName])(scope);\n }\n break;\n\n case '=':\n if (optional && !attrs[attrName]) {\n return;\n }\n parentGet = $parse(attrs[attrName]);\n if (parentGet.literal) {\n compare = equals;\n } else {\n compare = function(a,b) { return a === b || (a !== a && b !== b); };\n }\n parentSet = parentGet.assign || function() {\n // reset the change, or we will throw this exception on every $digest\n lastValue = isolateBindingContext[scopeName] = parentGet(scope);\n throw $compileMinErr('nonassign',\n \"Expression '{0}' used with directive '{1}' is non-assignable!\",\n attrs[attrName], newIsolateScopeDirective.name);\n };\n lastValue = isolateBindingContext[scopeName] = parentGet(scope);\n var parentValueWatch = function parentValueWatch(parentValue) {\n if (!compare(parentValue, isolateBindingContext[scopeName])) {\n // we are out of sync and need to copy\n if (!compare(parentValue, lastValue)) {\n // parent changed and it has precedence\n isolateBindingContext[scopeName] = parentValue;\n } else {\n // if the parent can be assigned then do so\n parentSet(scope, parentValue = isolateBindingContext[scopeName]);\n }\n }\n return lastValue = parentValue;\n };\n parentValueWatch.$stateful = true;\n var unwatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);\n isolateScope.$on('$destroy', unwatch);\n break;\n\n case '&':\n parentGet = $parse(attrs[attrName]);\n isolateBindingContext[scopeName] = function(locals) {\n return parentGet(scope, locals);\n };\n break;\n }\n });\n }\n if (controllers) {\n forEach(controllers, function(controller) {\n controller();\n });\n controllers = null;\n }\n\n // PRELINKING\n for(i = 0, ii = preLinkFns.length; i < ii; i++) {\n linkFn = preLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // RECURSION\n // We only pass the isolate scope, if the isolate directive has a template,\n // otherwise the child elements do not belong to the isolate directive.\n var scopeToChild = scope;\n if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n scopeToChild = isolateScope;\n }\n childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n\n // POSTLINKING\n for(i = postLinkFns.length - 1; i >= 0; i--) {\n linkFn = postLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // This is the function that is injected as `$transclude`.\n // Note: all arguments are optional!\n function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement) {\n var transcludeControllers;\n\n // No scope passed in:\n if (!isScope(scope)) {\n futureParentElement = cloneAttachFn;\n cloneAttachFn = scope;\n scope = undefined;\n }\n\n if (hasElementTranscludeDirective) {\n transcludeControllers = elementControllers;\n }\n if (!futureParentElement) {\n futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;\n }\n return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement);\n }\n }\n }\n\n function markDirectivesAsIsolate(directives) {\n // mark all directives as needing isolate scope.\n for (var j = 0, jj = directives.length; j < jj; j++) {\n directives[j] = inherit(directives[j], {$$isolateScope: true});\n }\n }\n\n /**\n * looks up the directive and decorates it with exception handling and proper parameters. We\n * call this the boundDirective.\n *\n * @param {string} name name of the directive to look up.\n * @param {string} location The directive must be found in specific format.\n * String containing any of theses characters:\n *\n * * `E`: element name\n * * `A': attribute\n * * `C`: class\n * * `M`: comment\n * @returns {boolean} true if directive was added.\n */\n function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n endAttrName) {\n if (name === ignoreDirective) return null;\n var match = null;\n if (hasDirectives.hasOwnProperty(name)) {\n for(var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i directive.priority) &&\n directive.restrict.indexOf(location) != -1) {\n if (startAttrName) {\n directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n }\n tDirectives.push(directive);\n match = directive;\n }\n } catch(e) { $exceptionHandler(e); }\n }\n }\n return match;\n }\n\n\n /**\n * looks up the directive and returns true if it is a multi-element directive,\n * and therefore requires DOM nodes between -start and -end markers to be grouped\n * together.\n *\n * @param {string} name name of the directive to look up.\n * @returns true if directive was registered as multi-element.\n */\n function directiveIsMultiElement(name) {\n if (hasDirectives.hasOwnProperty(name)) {\n for(var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i'+template+''+type+'>';\n return wrapper.childNodes[0].childNodes;\n default:\n return template;\n }\n }\n\n\n function getTrustedContext(node, attrNormalizedName) {\n if (attrNormalizedName == \"srcdoc\") {\n return $sce.HTML;\n }\n var tag = nodeName_(node);\n // maction[xlink:href] can source SVG. It's not limited to .\n if (attrNormalizedName == \"xlinkHref\" ||\n (tag == \"form\" && attrNormalizedName == \"action\") ||\n (tag != \"img\" && (attrNormalizedName == \"src\" ||\n attrNormalizedName == \"ngSrc\"))) {\n return $sce.RESOURCE_URL;\n }\n }\n\n\n function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {\n var interpolateFn = $interpolate(value, true);\n\n // no interpolation found -> ignore\n if (!interpolateFn) return;\n\n\n if (name === \"multiple\" && nodeName_(node) === \"select\") {\n throw $compileMinErr(\"selmulti\",\n \"Binding to the 'multiple' attribute is not supported. Element: {0}\",\n startingTag(node));\n }\n\n directives.push({\n priority: 100,\n compile: function() {\n return {\n pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n var $$observers = (attr.$$observers || (attr.$$observers = {}));\n\n if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n throw $compileMinErr('nodomevents',\n \"Interpolations for HTML DOM event attributes are disallowed. Please use the \" +\n \"ng- versions (such as ng-click instead of onclick) instead.\");\n }\n\n // we need to interpolate again, in case the attribute value has been updated\n // (e.g. by another directive's compile function)\n interpolateFn = $interpolate(attr[name], true, getTrustedContext(node, name),\n ALL_OR_NOTHING_ATTRS[name] || allOrNothing);\n\n // if attribute was updated so that there is no interpolation going on we don't want to\n // register any observers\n if (!interpolateFn) return;\n\n // initialize attr object so that it's ready in case we need the value for isolate\n // scope initialization, otherwise the value would not be available from isolate\n // directive's linking fn during linking phase\n attr[name] = interpolateFn(scope);\n\n ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n (attr.$$observers && attr.$$observers[name].$$scope || scope).\n $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n //special case for class attribute addition + removal\n //so that class changes can tap into the animation\n //hooks provided by the $animate service. Be sure to\n //skip animations when the first digest occurs (when\n //both the new and the old values are the same) since\n //the CSS classes are the non-interpolated values\n if(name === 'class' && newValue != oldValue) {\n attr.$updateClass(newValue, oldValue);\n } else {\n attr.$set(name, newValue);\n }\n });\n }\n };\n }\n });\n }\n\n\n /**\n * This is a special jqLite.replaceWith, which can replace items which\n * have no parents, provided that the containing jqLite collection is provided.\n *\n * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n * in the root of the tree.\n * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n * the shell, but replace its DOM node reference.\n * @param {Node} newNode The new DOM node.\n */\n function replaceWith($rootElement, elementsToRemove, newNode) {\n var firstElementToRemove = elementsToRemove[0],\n removeCount = elementsToRemove.length,\n parent = firstElementToRemove.parentNode,\n i, ii;\n\n if ($rootElement) {\n for(i = 0, ii = $rootElement.length; i < ii; i++) {\n if ($rootElement[i] == firstElementToRemove) {\n $rootElement[i++] = newNode;\n for (var j = i, j2 = j + removeCount - 1,\n jj = $rootElement.length;\n j < jj; j++, j2++) {\n if (j2 < jj) {\n $rootElement[j] = $rootElement[j2];\n } else {\n delete $rootElement[j];\n }\n }\n $rootElement.length -= removeCount - 1;\n\n // If the replaced element is also the jQuery .context then replace it\n // .context is a deprecated jQuery api, so we should set it only when jQuery set it\n // http://api.jquery.com/context/\n if ($rootElement.context === firstElementToRemove) {\n $rootElement.context = newNode;\n }\n break;\n }\n }\n }\n\n if (parent) {\n parent.replaceChild(newNode, firstElementToRemove);\n }\n\n // TODO(perf): what's this document fragment for? is it needed? can we at least reuse it?\n var fragment = document.createDocumentFragment();\n fragment.appendChild(firstElementToRemove);\n\n // Copy over user data (that includes Angular's $scope etc.). Don't copy private\n // data here because there's no public interface in jQuery to do that and copying over\n // event listeners (which is the main use of private data) wouldn't work anyway.\n jqLite(newNode).data(jqLite(firstElementToRemove).data());\n\n // Remove data of the replaced element. We cannot just call .remove()\n // on the element it since that would deallocate scope that is needed\n // for the new node. Instead, remove the data \"manually\".\n if (!jQuery) {\n delete jqLite.cache[firstElementToRemove[jqLite.expando]];\n } else {\n // jQuery 2.x doesn't expose the data storage. Use jQuery.cleanData to clean up after\n // the replaced element. The cleanData version monkey-patched by Angular would cause\n // the scope to be trashed and we do need the very same scope to work with the new\n // element. However, we cannot just cache the non-patched version and use it here as\n // that would break if another library patches the method after Angular does (one\n // example is jQuery UI). Instead, set a flag indicating scope destroying should be\n // skipped this one time.\n skipDestroyOnNextJQueryCleanData = true;\n jQuery.cleanData([firstElementToRemove]);\n }\n\n for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {\n var element = elementsToRemove[k];\n jqLite(element).remove(); // must do this way to clean up expando\n fragment.appendChild(element);\n delete elementsToRemove[k];\n }\n\n elementsToRemove[0] = newNode;\n elementsToRemove.length = 1;\n }\n\n\n function cloneAndAnnotateFn(fn, annotation) {\n return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n }\n\n\n function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {\n try {\n linkFn(scope, $element, attrs, controllers, transcludeFn);\n } catch(e) {\n $exceptionHandler(e, startingTag($element));\n }\n }\n }];\n}\n\nvar PREFIX_REGEXP = /^(x[\\:\\-_]|data[\\:\\-_])/i;\n/**\n * Converts all accepted directives format into proper directive name.\n * All of these will become 'myDirective':\n * my:Directive\n * my-directive\n * x-my-directive\n * data-my:directive\n *\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction directiveNormalize(name) {\n return camelCase(name.replace(PREFIX_REGEXP, ''));\n}\n\n/**\n * @ngdoc type\n * @name $compile.directive.Attributes\n *\n * @description\n * A shared object between directive compile / linking functions which contains normalized DOM\n * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n * needed since all of these are treated as equivalent in Angular:\n *\n * ```\n * \n * ```\n */\n\n/**\n * @ngdoc property\n * @name $compile.directive.Attributes#$attr\n *\n * @description\n * A map of DOM element attribute names to the normalized name. This is\n * needed to do reverse lookup from normalized name back to actual name.\n */\n\n\n/**\n * @ngdoc method\n * @name $compile.directive.Attributes#$set\n * @kind function\n *\n * @description\n * Set DOM element attribute value.\n *\n *\n * @param {string} name Normalized element attribute name of the property to modify. The name is\n * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n * property to the original name.\n * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n */\n\n\n\n/**\n * Closure compiler type information\n */\n\nfunction nodesetLinkingFn(\n /* angular.Scope */ scope,\n /* NodeList */ nodeList,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n){}\n\nfunction directiveLinkingFn(\n /* nodesetLinkingFn */ nodesetLinkingFn,\n /* angular.Scope */ scope,\n /* Node */ node,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n){}\n\nfunction tokenDifference(str1, str2) {\n var values = '',\n tokens1 = str1.split(/\\s+/),\n tokens2 = str2.split(/\\s+/);\n\n outer:\n for(var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for(var j = 0; j < tokens2.length; j++) {\n if(token == tokens2[j]) continue outer;\n }\n values += (values.length > 0 ? ' ' : '') + token;\n }\n return values;\n}\n\n/**\n * @ngdoc provider\n * @name $controllerProvider\n * @description\n * The {@link ng.$controller $controller service} is used by Angular to create new\n * controllers.\n *\n * This provider allows controller registration via the\n * {@link ng.$controllerProvider#register register} method.\n */\nfunction $ControllerProvider() {\n var controllers = {},\n globals = false,\n CNTRL_REG = /^(\\S+)(\\s+as\\s+(\\w+))?$/;\n\n\n /**\n * @ngdoc method\n * @name $controllerProvider#register\n * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n * the names and the values are the constructors.\n * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n * annotations in the array notation).\n */\n this.register = function(name, constructor) {\n assertNotHasOwnProperty(name, 'controller');\n if (isObject(name)) {\n extend(controllers, name);\n } else {\n controllers[name] = constructor;\n }\n };\n\n /**\n * @ngdoc method\n * @name $controllerProvider#allowGlobals\n * @description If called, allows `$controller` to find controller constructors on `window`\n */\n this.allowGlobals = function() {\n globals = true;\n };\n\n\n this.$get = ['$injector', '$window', function($injector, $window) {\n\n /**\n * @ngdoc service\n * @name $controller\n * @requires $injector\n *\n * @param {Function|string} constructor If called with a function then it's considered to be the\n * controller constructor function. Otherwise it's considered to be a string which is used\n * to retrieve the controller constructor using the following steps:\n *\n * * check if a controller with given name is registered via `$controllerProvider`\n * * check if evaluating the string on the current scope returns a constructor\n * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global\n * `window` object (not recommended)\n *\n * @param {Object} locals Injection locals for Controller.\n * @return {Object} Instance of given controller.\n *\n * @description\n * `$controller` service is responsible for instantiating controllers.\n *\n * It's just a simple call to {@link auto.$injector $injector}, but extracted into\n * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).\n */\n return function(expression, locals, later, ident) {\n // PRIVATE API:\n // param `later` --- indicates that the controller's constructor is invoked at a later time.\n // If true, $controller will allocate the object with the correct\n // prototype chain, but will not invoke the controller until a returned\n // callback is invoked.\n // param `ident` --- An optional label which overrides the label parsed from the controller\n // expression, if any.\n var instance, match, constructor, identifier;\n later = later === true;\n if (ident && isString(ident)) {\n identifier = ident;\n }\n\n if(isString(expression)) {\n match = expression.match(CNTRL_REG),\n constructor = match[1],\n identifier = identifier || match[3];\n expression = controllers.hasOwnProperty(constructor)\n ? controllers[constructor]\n : getter(locals.$scope, constructor, true) ||\n (globals ? getter($window, constructor, true) : undefined);\n\n assertArgFn(expression, constructor, true);\n }\n\n if (later) {\n // Instantiate controller later:\n // This machinery is used to create an instance of the object before calling the\n // controller's constructor itself.\n //\n // This allows properties to be added to the controller before the constructor is\n // invoked. Primarily, this is used for isolate scope bindings in $compile.\n //\n // This feature is not intended for use by applications, and is thus not documented\n // publicly.\n var Constructor = function() {};\n Constructor.prototype = (isArray(expression) ?\n expression[expression.length - 1] : expression).prototype;\n instance = new Constructor();\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return extend(function() {\n $injector.invoke(expression, instance, locals, constructor);\n return instance;\n }, {\n instance: instance,\n identifier: identifier\n });\n }\n\n instance = $injector.instantiate(expression, locals, constructor);\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return instance;\n };\n\n function addIdentifier(locals, identifier, instance, name) {\n if (!(locals && isObject(locals.$scope))) {\n throw minErr('$controller')('noscp',\n \"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.\",\n name, identifier);\n }\n\n locals.$scope[identifier] = instance;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $document\n * @requires $window\n *\n * @description\n * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n *\n * @example\n \n \n \n $document title: \n window.document title: \n \n \n \n angular.module('documentExample', [])\n .controller('ExampleController', ['$scope', '$document', function($scope, $document) {\n $scope.title = $document[0].title;\n $scope.windowTitle = angular.element(window.document)[0].title;\n }]);\n \n \n */\nfunction $DocumentProvider(){\n this.$get = ['$window', function(window){\n return jqLite(window.document);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $exceptionHandler\n * @requires ng.$log\n *\n * @description\n * Any uncaught exception in angular expressions is delegated to this service.\n * The default implementation simply delegates to `$log.error` which logs it into\n * the browser console.\n *\n * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n *\n * ## Example:\n *\n * ```js\n * angular.module('exceptionOverride', []).factory('$exceptionHandler', function () {\n * return function (exception, cause) {\n * exception.message += ' (caused by \"' + cause + '\")';\n * throw exception;\n * };\n * });\n * ```\n *\n * This example will override the normal action of `$exceptionHandler`, to make angular\n * exceptions fail hard when they happen, instead of just logging to the console.\n *\n * @param {Error} exception Exception associated with the error.\n * @param {string=} cause optional information about the context in which\n * the error was thrown.\n *\n */\nfunction $ExceptionHandlerProvider() {\n this.$get = ['$log', function($log) {\n return function(exception, cause) {\n $log.error.apply($log, arguments);\n };\n }];\n}\n\n/**\n * Parse headers into key value object\n *\n * @param {string} headers Raw headers as a string\n * @returns {Object} Parsed headers as key value object\n */\nfunction parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = lowercase(trim(line.substr(0, i)));\n val = trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n}\n\n\n/**\n * Returns a function that provides access to parsed headers.\n *\n * Headers are lazy parsed when first requested.\n * @see parseHeaders\n *\n * @param {(string|Object)} headers Headers to provide access to.\n * @returns {function(string=)} Returns a getter function which if called with:\n *\n * - if called with single an argument returns a single header value or null\n * - if called with no arguments returns an object containing all headers.\n */\nfunction headersGetter(headers) {\n var headersObj = isObject(headers) ? headers : undefined;\n\n return function(name) {\n if (!headersObj) headersObj = parseHeaders(headers);\n\n if (name) {\n return headersObj[lowercase(name)] || null;\n }\n\n return headersObj;\n };\n}\n\n\n/**\n * Chain all given functions\n *\n * This function is used for both request and response transforming\n *\n * @param {*} data Data to transform.\n * @param {function(string=)} headers Http headers getter fn.\n * @param {(Function|Array.)} fns Function or an array of functions.\n * @returns {*} Transformed data.\n */\nfunction transformData(data, headers, fns) {\n if (isFunction(fns))\n return fns(data, headers);\n\n forEach(fns, function(fn) {\n data = fn(data, headers);\n });\n\n return data;\n}\n\n\nfunction isSuccess(status) {\n return 200 <= status && status < 300;\n}\n\n\n/**\n * @ngdoc provider\n * @name $httpProvider\n * @description\n * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.\n * */\nfunction $HttpProvider() {\n var JSON_START = /^\\s*(\\[|\\{[^\\{])/,\n JSON_END = /[\\}\\]]\\s*$/,\n PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/,\n CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': 'application/json;charset=utf-8'};\n\n /**\n * @ngdoc property\n * @name $httpProvider#defaults\n * @description\n *\n * Object containing default values for all {@link ng.$http $http} requests.\n *\n * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.\n * Defaults value is `'XSRF-TOKEN'`.\n *\n * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the\n * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.\n *\n * - **`defaults.headers`** - {Object} - Default headers for all $http requests.\n * Refer to {@link ng.$http#setting-http-headers $http} for documentation on\n * setting default headers.\n * - **`defaults.headers.common`**\n * - **`defaults.headers.post`**\n * - **`defaults.headers.put`**\n * - **`defaults.headers.patch`**\n **/\n var defaults = this.defaults = {\n // transform incoming response data\n transformResponse: [function(data) {\n if (isString(data)) {\n // strip json vulnerability protection prefix\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data))\n data = fromJson(data);\n }\n return data;\n }],\n\n // transform outgoing request data\n transformRequest: [function(d) {\n return isObject(d) && !isFile(d) && !isBlob(d) ? toJson(d) : d;\n }],\n\n // default headers\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n };\n\n var useApplyAsync = false;\n /**\n * @ngdoc method\n * @name $httpProvider#useApplyAsync\n * @description\n *\n * Configure $http service to combine processing of multiple http responses received at around\n * the same time via {@link ng.$rootScope#applyAsync $rootScope.$applyAsync}. This can result in\n * significant performance improvement for bigger applications that make many HTTP requests\n * concurrently (common during application bootstrap).\n *\n * Defaults to false. If no value is specifed, returns the current configured value.\n *\n * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred\n * \"apply\" on the next tick, giving time for subsequent requests in a roughly ~10ms window\n * to load and share the same digest cycle.\n *\n * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n * otherwise, returns the current configured value.\n **/\n this.useApplyAsync = function(value) {\n if (isDefined(value)) {\n useApplyAsync = !!value;\n return this;\n }\n return useApplyAsync;\n };\n\n /**\n * Are ordered by request, i.e. they are applied in the same order as the\n * array, on request, but reverse order, on response.\n */\n var interceptorFactories = this.interceptors = [];\n\n this.$get = ['$httpBackend', '$browser', '$cacheFactory', '$rootScope', '$q', '$injector',\n function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) {\n\n var defaultCache = $cacheFactory('$http');\n\n /**\n * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n * The reversal is needed so that we can build up the interception chain around the\n * server request.\n */\n var reversedInterceptors = [];\n\n forEach(interceptorFactories, function(interceptorFactory) {\n reversedInterceptors.unshift(isString(interceptorFactory)\n ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n });\n\n /**\n * @ngdoc service\n * @kind function\n * @name $http\n * @requires ng.$httpBackend\n * @requires $cacheFactory\n * @requires $rootScope\n * @requires $q\n * @requires $injector\n *\n * @description\n * The `$http` service is a core Angular service that facilitates communication with the remote\n * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)\n * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).\n *\n * For unit testing applications that use `$http` service, see\n * {@link ngMock.$httpBackend $httpBackend mock}.\n *\n * For a higher level of abstraction, please check out the {@link ngResource.$resource\n * $resource} service.\n *\n * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n * it is important to familiarize yourself with these APIs and the guarantees they provide.\n *\n *\n * ## General usage\n * The `$http` service is a function which takes a single argument — a configuration object —\n * that is used to generate an HTTP request and returns a {@link ng.$q promise}\n * with two $http specific methods: `success` and `error`.\n *\n * ```js\n * $http({method: 'GET', url: '/someUrl'}).\n * success(function(data, status, headers, config) {\n * // this callback will be called asynchronously\n * // when the response is available\n * }).\n * error(function(data, status, headers, config) {\n * // called asynchronously if an error occurs\n * // or server returns response with an error status.\n * });\n * ```\n *\n * Since the returned value of calling the $http function is a `promise`, you can also use\n * the `then` method to register callbacks, and these callbacks will receive a single argument –\n * an object representing the response. See the API signature and type info below for more\n * details.\n *\n * A response status code between 200 and 299 is considered a success status and\n * will result in the success callback being called. Note that if the response is a redirect,\n * XMLHttpRequest will transparently follow it, meaning that the error callback will not be\n * called for such responses.\n *\n * ## Writing Unit Tests that use $http\n * When unit testing (using {@link ngMock ngMock}), it is necessary to call\n * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending\n * request using trained responses.\n *\n * ```\n * $httpBackend.expectGET(...);\n * $http.get(...);\n * $httpBackend.flush();\n * ```\n *\n * ## Shortcut methods\n *\n * Shortcut methods are also available. All shortcut methods require passing in the URL, and\n * request data must be passed in for POST/PUT requests.\n *\n * ```js\n * $http.get('/someUrl').success(successCallback);\n * $http.post('/someUrl', data).success(successCallback);\n * ```\n *\n * Complete list of shortcut methods:\n *\n * - {@link ng.$http#get $http.get}\n * - {@link ng.$http#head $http.head}\n * - {@link ng.$http#post $http.post}\n * - {@link ng.$http#put $http.put}\n * - {@link ng.$http#delete $http.delete}\n * - {@link ng.$http#jsonp $http.jsonp}\n * - {@link ng.$http#patch $http.patch}\n *\n *\n * ## Setting HTTP Headers\n *\n * The $http service will automatically add certain HTTP headers to all requests. These defaults\n * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n * object, which currently contains this default configuration:\n *\n * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n * - `Accept: application/json, text/plain, * / *`\n * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n * - `Content-Type: application/json`\n * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n * - `Content-Type: application/json`\n *\n * To add or overwrite these defaults, simply add or remove a property from these configuration\n * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n * with the lowercased HTTP method name as the key, e.g.\n * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.\n *\n * The defaults can also be set at runtime via the `$http.defaults` object in the same\n * fashion. For example:\n *\n * ```\n * module.run(function($http) {\n * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'\n * });\n * ```\n *\n * In addition, you can supply a `headers` property in the config object passed when\n * calling `$http(config)`, which overrides the defaults without changing them globally.\n *\n *\n * ## Transforming Requests and Responses\n *\n * Both requests and responses can be transformed using transformation functions: `transformRequest`\n * and `transformResponse`. These properties can be a single function that returns\n * the transformed value (`{function(data, headersGetter)`) or an array of such transformation functions,\n * which allows you to `push` or `unshift` a new transformation function into the transformation chain.\n *\n * ### Default Transformations\n *\n * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and\n * `defaults.transformResponse` properties. If a request does not provide its own transformations\n * then these will be applied.\n *\n * You can augment or replace the default transformations by modifying these properties by adding to or\n * replacing the array.\n *\n * Angular provides the following default transformations:\n *\n * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`):\n *\n * - If the `data` property of the request configuration object contains an object, serialize it\n * into JSON format.\n *\n * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`):\n *\n * - If XSRF prefix is detected, strip it (see Security Considerations section below).\n * - If JSON response is detected, deserialize it using a JSON parser.\n *\n *\n * ### Overriding the Default Transformations Per Request\n *\n * If you wish override the request/response transformations only for a single request then provide\n * `transformRequest` and/or `transformResponse` properties on the configuration object passed\n * into `$http`.\n *\n * Note that if you provide these properties on the config object the default transformations will be\n * overwritten. If you wish to augment the default transformations then you must include them in your\n * local transformation array.\n *\n * The following code demonstrates adding a new response transformation to be run after the default response\n * transformations have been run.\n *\n * ```js\n * function appendTransform(defaults, transform) {\n *\n * // We can't guarantee that the default transformation is an array\n * defaults = angular.isArray(defaults) ? defaults : [defaults];\n *\n * // Append the new transformation to the defaults\n * return defaults.concat(transform);\n * }\n *\n * $http({\n * url: '...',\n * method: 'GET',\n * transformResponse: appendTransform($http.defaults.transformResponse, function(value) {\n * return doTransform(value);\n * })\n * });\n * ```\n *\n *\n * ## Caching\n *\n * To enable caching, set the request configuration `cache` property to `true` (to use default\n * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}).\n * When the cache is enabled, `$http` stores the response from the server in the specified\n * cache. The next time the same request is made, the response is served from the cache without\n * sending a request to the server.\n *\n * Note that even if the response is served from cache, delivery of the data is asynchronous in\n * the same way that real requests are.\n *\n * If there are multiple GET requests for the same URL that should be cached using the same\n * cache, but the cache is not populated yet, only one request to the server will be made and\n * the remaining requests will be fulfilled using the response from the first request.\n *\n * You can change the default cache to a new object (built with\n * {@link ng.$cacheFactory `$cacheFactory`}) by updating the\n * {@link ng.$http#properties_defaults `$http.defaults.cache`} property. All requests who set\n * their `cache` property to `true` will now use this cache object.\n *\n * If you set the default cache to `false` then only requests that specify their own custom\n * cache object will be cached.\n *\n * ## Interceptors\n *\n * Before you start creating interceptors, be sure to understand the\n * {@link ng.$q $q and deferred/promise APIs}.\n *\n * For purposes of global error handling, authentication, or any kind of synchronous or\n * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n * able to intercept requests before they are handed to the server and\n * responses before they are handed over to the application code that\n * initiated these requests. The interceptors leverage the {@link ng.$q\n * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n *\n * The interceptors are service factories that are registered with the `$httpProvider` by\n * adding them to the `$httpProvider.interceptors` array. The factory is called and\n * injected with dependencies (if specified) and returns the interceptor.\n *\n * There are two kinds of interceptors (and two kinds of rejection interceptors):\n *\n * * `request`: interceptors get called with a http `config` object. The function is free to\n * modify the `config` object or create a new one. The function needs to return the `config`\n * object directly, or a promise containing the `config` or a new `config` object.\n * * `requestError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n * * `response`: interceptors get called with http `response` object. The function is free to\n * modify the `response` object or create a new one. The function needs to return the `response`\n * object directly, or as a promise containing the `response` or a new `response` object.\n * * `responseError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n *\n *\n * ```js\n * // register the interceptor as a service\n * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n * return {\n * // optional method\n * 'request': function(config) {\n * // do something on success\n * return config;\n * },\n *\n * // optional method\n * 'requestError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * },\n *\n *\n *\n * // optional method\n * 'response': function(response) {\n * // do something on success\n * return response;\n * },\n *\n * // optional method\n * 'responseError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * }\n * };\n * });\n *\n * $httpProvider.interceptors.push('myHttpInterceptor');\n *\n *\n * // alternatively, register the interceptor via an anonymous factory\n * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n * return {\n * 'request': function(config) {\n * // same as above\n * },\n *\n * 'response': function(response) {\n * // same as above\n * }\n * };\n * });\n * ```\n *\n * ## Security Considerations\n *\n * When designing web applications, consider security threats from:\n *\n * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)\n *\n * Both server and the client must cooperate in order to eliminate these threats. Angular comes\n * pre-configured with strategies that address these issues, but for this to work backend server\n * cooperation is required.\n *\n * ### JSON Vulnerability Protection\n *\n * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * allows third party website to turn your JSON resource URL into\n * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To\n * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n * Angular will automatically strip the prefix before processing it as JSON.\n *\n * For example if your server needs to return:\n * ```js\n * ['one','two']\n * ```\n *\n * which is vulnerable to attack, your server can return:\n * ```js\n * )]}',\n * ['one','two']\n * ```\n *\n * Angular will strip the prefix, before processing the JSON.\n *\n *\n * ### Cross Site Request Forgery (XSRF) Protection\n *\n * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is a technique by which\n * an unauthorized site can gain your user's private data. Angular provides a mechanism\n * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie\n * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only\n * JavaScript that runs on your domain could read the cookie, your server can be assured that\n * the XHR came from JavaScript running on your domain. The header will not be set for\n * cross-domain requests.\n *\n * To take advantage of this, your server needs to set a token in a JavaScript readable session\n * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure\n * that only JavaScript running on your domain could have sent the request. The token must be\n * unique for each user and must be verifiable by the server (to prevent the JavaScript from\n * making up its own tokens). We recommend that the token is a digest of your site's\n * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography))\n * for added security.\n *\n * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName\n * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,\n * or the per-request config object.\n *\n *\n * @param {object} config Object describing the request to be made and how it should be\n * processed. The object has following properties:\n *\n * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)\n * - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.\n * - **params** – `{Object.}` – Map of strings or objects which will be turned\n * to `?key1=value1&key2=value2` after the url. If the value is not a string, it will be\n * JSONified.\n * - **data** – `{string|Object}` – Data to be sent as the request message data.\n * - **headers** – `{Object}` – Map of strings or functions which return strings representing\n * HTTP headers to send to the server. If the return value of a function is null, the\n * header will not be sent.\n * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.\n * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.\n * - **transformRequest** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * request body and headers and returns its transformed (typically serialized) version.\n * See {@link #overriding-the-default-transformations-per-request Overriding the Default Transformations}\n * - **transformResponse** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * response body and headers and returns its transformed (typically deserialized) version.\n * See {@link #overriding-the-default-transformations-per-request Overriding the Default Transformations}\n * - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the\n * GET request, otherwise if a cache instance built with\n * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for\n * caching.\n * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}\n * that should abort the request when resolved.\n * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the\n * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)\n * for more information.\n * - **responseType** - `{string}` - see\n * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).\n *\n * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the\n * standard `then` method and two http specific methods: `success` and `error`. The `then`\n * method takes two arguments a success and an error callback which will be called with a\n * response object. The `success` and `error` methods take a single argument - a function that\n * will be called when the request succeeds or fails respectively. The arguments passed into\n * these functions are destructured representation of the response object passed into the\n * `then` method. The response object has these properties:\n *\n * - **data** – `{string|Object}` – The response body transformed with the transform\n * functions.\n * - **status** – `{number}` – HTTP status code of the response.\n * - **headers** – `{function([headerName])}` – Header getter function.\n * - **config** – `{Object}` – The configuration object that was used to generate the request.\n * - **statusText** – `{string}` – HTTP status text of the response.\n *\n * @property {Array.} pendingRequests Array of config objects for currently pending\n * requests. This is primarily meant to be used for debugging purposes.\n *\n *\n * @example\n\n\n \n \n GET\n JSONP\n \n \n fetch\n Sample GET\n \n Sample JSONP\n \n \n Invalid JSONP\n \n http status code: {{status}}\n http response data: {{data}}\n \n\n\n angular.module('httpExample', [])\n .controller('FetchController', ['$scope', '$http', '$templateCache',\n function($scope, $http, $templateCache) {\n $scope.method = 'GET';\n $scope.url = 'http-hello.html';\n\n $scope.fetch = function() {\n $scope.code = null;\n $scope.response = null;\n\n $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n success(function(data, status) {\n $scope.status = status;\n $scope.data = data;\n }).\n error(function(data, status) {\n $scope.data = data || \"Request failed\";\n $scope.status = status;\n });\n };\n\n $scope.updateModel = function(method, url) {\n $scope.method = method;\n $scope.url = url;\n };\n }]);\n\n\n Hello, $http!\n\n\n var status = element(by.binding('status'));\n var data = element(by.binding('data'));\n var fetchBtn = element(by.id('fetchbtn'));\n var sampleGetBtn = element(by.id('samplegetbtn'));\n var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\n it('should make an xhr GET request', function() {\n sampleGetBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('200');\n expect(data.getText()).toMatch(/Hello, \\$http!/);\n });\n\n// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185\n// it('should make a JSONP request to angularjs.org', function() {\n// sampleJsonpBtn.click();\n// fetchBtn.click();\n// expect(status.getText()).toMatch('200');\n// expect(data.getText()).toMatch(/Super Hero!/);\n// });\n\n it('should make JSONP request to invalid URL and invoke the error handler',\n function() {\n invalidJsonpBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('0');\n expect(data.getText()).toMatch('Request failed');\n });\n\n\n */\n function $http(requestConfig) {\n var config = {\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n };\n var headers = mergeHeaders(requestConfig);\n\n extend(config, requestConfig);\n config.headers = headers;\n config.method = uppercase(config.method);\n\n var serverRequest = function(config) {\n headers = config.headers;\n var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);\n\n // strip content-type if data is undefined\n if (isUndefined(reqData)) {\n forEach(headers, function(value, header) {\n if (lowercase(header) === 'content-type') {\n delete headers[header];\n }\n });\n }\n\n if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n config.withCredentials = defaults.withCredentials;\n }\n\n // send request\n return sendReq(config, reqData, headers).then(transformResponse, transformResponse);\n };\n\n var chain = [serverRequest, undefined];\n var promise = $q.when(config);\n\n // apply interceptors\n forEach(reversedInterceptors, function(interceptor) {\n if (interceptor.request || interceptor.requestError) {\n chain.unshift(interceptor.request, interceptor.requestError);\n }\n if (interceptor.response || interceptor.responseError) {\n chain.push(interceptor.response, interceptor.responseError);\n }\n });\n\n while(chain.length) {\n var thenFn = chain.shift();\n var rejectFn = chain.shift();\n\n promise = promise.then(thenFn, rejectFn);\n }\n\n promise.success = function(fn) {\n promise.then(function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n promise.error = function(fn) {\n promise.then(null, function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n return promise;\n\n function transformResponse(response) {\n // make a copy since the response must be cacheable\n var resp = extend({}, response, {\n data: transformData(response.data, response.headers, config.transformResponse)\n });\n return (isSuccess(response.status))\n ? resp\n : $q.reject(resp);\n }\n\n function mergeHeaders(config) {\n var defHeaders = defaults.headers,\n reqHeaders = extend({}, config.headers),\n defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\n defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\n // using for-in instead of forEach to avoid unecessary iteration after header has been found\n defaultHeadersIteration:\n for (defHeaderName in defHeaders) {\n lowercaseDefHeaderName = lowercase(defHeaderName);\n\n for (reqHeaderName in reqHeaders) {\n if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n continue defaultHeadersIteration;\n }\n }\n\n reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n }\n\n // execute if header value is a function for merged headers\n execHeaders(reqHeaders);\n return reqHeaders;\n\n function execHeaders(headers) {\n var headerContent;\n\n forEach(headers, function(headerFn, header) {\n if (isFunction(headerFn)) {\n headerContent = headerFn();\n if (headerContent != null) {\n headers[header] = headerContent;\n } else {\n delete headers[header];\n }\n }\n });\n }\n }\n }\n\n $http.pendingRequests = [];\n\n /**\n * @ngdoc method\n * @name $http#get\n *\n * @description\n * Shortcut method to perform `GET` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#delete\n *\n * @description\n * Shortcut method to perform `DELETE` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#head\n *\n * @description\n * Shortcut method to perform `HEAD` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#jsonp\n *\n * @description\n * Shortcut method to perform `JSONP` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request.\n * The name of the callback should be the string `JSON_CALLBACK`.\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n createShortMethods('get', 'delete', 'head', 'jsonp');\n\n /**\n * @ngdoc method\n * @name $http#post\n *\n * @description\n * Shortcut method to perform `POST` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#put\n *\n * @description\n * Shortcut method to perform `PUT` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#patch\n *\n * @description\n * Shortcut method to perform `PATCH` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n createShortMethodsWithData('post', 'put', 'patch');\n\n /**\n * @ngdoc property\n * @name $http#defaults\n *\n * @description\n * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n * default headers, withCredentials as well as request and response transformations.\n *\n * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n */\n $http.defaults = defaults;\n\n\n return $http;\n\n\n function createShortMethods(names) {\n forEach(arguments, function(name) {\n $http[name] = function(url, config) {\n return $http(extend(config || {}, {\n method: name,\n url: url\n }));\n };\n });\n }\n\n\n function createShortMethodsWithData(name) {\n forEach(arguments, function(name) {\n $http[name] = function(url, data, config) {\n return $http(extend(config || {}, {\n method: name,\n url: url,\n data: data\n }));\n };\n });\n }\n\n\n /**\n * Makes the request.\n *\n * !!! ACCESSES CLOSURE VARS:\n * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n */\n function sendReq(config, reqData, reqHeaders) {\n var deferred = $q.defer(),\n promise = deferred.promise,\n cache,\n cachedResp,\n url = buildUrl(config.url, config.params);\n\n $http.pendingRequests.push(config);\n promise.then(removePendingReq, removePendingReq);\n\n\n if ((config.cache || defaults.cache) && config.cache !== false &&\n (config.method === 'GET' || config.method === 'JSONP')) {\n cache = isObject(config.cache) ? config.cache\n : isObject(defaults.cache) ? defaults.cache\n : defaultCache;\n }\n\n if (cache) {\n cachedResp = cache.get(url);\n if (isDefined(cachedResp)) {\n if (isPromiseLike(cachedResp)) {\n // cached request has already been sent, but there is no response yet\n cachedResp.then(removePendingReq, removePendingReq);\n return cachedResp;\n } else {\n // serving from cache\n if (isArray(cachedResp)) {\n resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);\n } else {\n resolvePromise(cachedResp, 200, {}, 'OK');\n }\n }\n } else {\n // put the promise for the non-transformed response into cache as a placeholder\n cache.put(url, promise);\n }\n }\n\n\n // if we won't have the response in cache, set the xsrf headers and\n // send the request to the backend\n if (isUndefined(cachedResp)) {\n var xsrfValue = urlIsSameOrigin(config.url)\n ? $browser.cookies()[config.xsrfCookieName || defaults.xsrfCookieName]\n : undefined;\n if (xsrfValue) {\n reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n }\n\n $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n config.withCredentials, config.responseType);\n }\n\n return promise;\n\n\n /**\n * Callback registered to $httpBackend():\n * - caches the response if desired\n * - resolves the raw $http promise\n * - calls $apply\n */\n function done(status, response, headersString, statusText) {\n if (cache) {\n if (isSuccess(status)) {\n cache.put(url, [status, response, parseHeaders(headersString), statusText]);\n } else {\n // remove promise from the cache\n cache.remove(url);\n }\n }\n\n function resolveHttpPromise() {\n resolvePromise(response, status, headersString, statusText);\n }\n\n if (useApplyAsync) {\n $rootScope.$applyAsync(resolveHttpPromise);\n } else {\n resolveHttpPromise();\n if (!$rootScope.$$phase) $rootScope.$apply();\n }\n }\n\n\n /**\n * Resolves the raw $http promise.\n */\n function resolvePromise(response, status, headers, statusText) {\n // normalize internal statuses to 0\n status = Math.max(status, 0);\n\n (isSuccess(status) ? deferred.resolve : deferred.reject)({\n data: response,\n status: status,\n headers: headersGetter(headers),\n config: config,\n statusText : statusText\n });\n }\n\n\n function removePendingReq() {\n var idx = $http.pendingRequests.indexOf(config);\n if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n }\n }\n\n\n function buildUrl(url, params) {\n if (!params) return url;\n var parts = [];\n forEachSorted(params, function(value, key) {\n if (value === null || isUndefined(value)) return;\n if (!isArray(value)) value = [value];\n\n forEach(value, function(v) {\n if (isObject(v)) {\n if (isDate(v)){\n v = v.toISOString();\n } else {\n v = toJson(v);\n }\n }\n parts.push(encodeUriQuery(key) + '=' +\n encodeUriQuery(v));\n });\n });\n if(parts.length > 0) {\n url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');\n }\n return url;\n }\n }];\n}\n\nfunction createXhr(method) {\n //if IE and the method is not RFC2616 compliant, or if XMLHttpRequest\n //is not available, try getting an ActiveXObject. Otherwise, use XMLHttpRequest\n //if it is available\n if (msie <= 8 && (!method.match(/^(get|post|head|put|delete|options)$/i) ||\n !window.XMLHttpRequest)) {\n return new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n } else if (window.XMLHttpRequest) {\n return new window.XMLHttpRequest();\n }\n\n throw minErr('$httpBackend')('noxhr', \"This browser does not support XMLHttpRequest.\");\n}\n\n/**\n * @ngdoc service\n * @name $httpBackend\n * @requires $window\n * @requires $document\n *\n * @description\n * HTTP backend used by the {@link ng.$http service} that delegates to\n * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n *\n * You should never need to use this service directly, instead use the higher-level abstractions:\n * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n *\n * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n * $httpBackend} which can be trained with responses.\n */\nfunction $HttpBackendProvider() {\n this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) {\n return createHttpBackend($browser, createXhr, $browser.defer, $window.angular.callbacks, $document[0]);\n }];\n}\n\nfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n var ABORTED = -1;\n\n // TODO(vojta): fix the signature\n return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {\n var status;\n $browser.$$incOutstandingRequestCount();\n url = url || $browser.url();\n\n if (lowercase(method) == 'jsonp') {\n var callbackId = '_' + (callbacks.counter++).toString(36);\n callbacks[callbackId] = function(data) {\n callbacks[callbackId].data = data;\n callbacks[callbackId].called = true;\n };\n\n var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),\n callbackId, function(status, text) {\n completeRequest(callback, status, callbacks[callbackId].data, \"\", text);\n callbacks[callbackId] = noop;\n });\n } else {\n\n var xhr = createXhr(method);\n\n xhr.open(method, url, true);\n forEach(headers, function(value, key) {\n if (isDefined(value)) {\n xhr.setRequestHeader(key, value);\n }\n });\n\n // In IE6 and 7, this might be called synchronously when xhr.send below is called and the\n // response is in the cache. the promise api will ensure that to the app code the api is\n // always async\n xhr.onreadystatechange = function() {\n // onreadystatechange might get called multiple times with readyState === 4 on mobile webkit caused by\n // xhrs that are resolved while the app is in the background (see #5426).\n // since calling completeRequest sets the `xhr` variable to null, we just check if it's not null before\n // continuing\n //\n // we can't set xhr.onreadystatechange to undefined or delete it because that breaks IE8 (method=PATCH) and\n // Safari respectively.\n if (xhr && xhr.readyState == 4) {\n var responseHeaders = null,\n response = null,\n statusText = '';\n\n if(status !== ABORTED) {\n responseHeaders = xhr.getAllResponseHeaders();\n\n // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n response = ('response' in xhr) ? xhr.response : xhr.responseText;\n }\n\n // Accessing statusText on an aborted xhr object will\n // throw an 'c00c023f error' in IE9 and lower, don't touch it.\n if (!(status === ABORTED && msie < 10)) {\n statusText = xhr.statusText;\n }\n\n completeRequest(callback,\n status || xhr.status,\n response,\n responseHeaders,\n statusText);\n }\n };\n\n if (withCredentials) {\n xhr.withCredentials = true;\n }\n\n if (responseType) {\n try {\n xhr.responseType = responseType;\n } catch (e) {\n // WebKit added support for the json responseType value on 09/03/2013\n // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n // known to throw when setting the value \"json\" as the response type. Other older\n // browsers implementing the responseType\n //\n // The json response type can be ignored if not supported, because JSON payloads are\n // parsed on the client-side regardless.\n if (responseType !== 'json') {\n throw e;\n }\n }\n }\n\n xhr.send(post || null);\n }\n\n if (timeout > 0) {\n var timeoutId = $browserDefer(timeoutRequest, timeout);\n } else if (isPromiseLike(timeout)) {\n timeout.then(timeoutRequest);\n }\n\n\n function timeoutRequest() {\n status = ABORTED;\n jsonpDone && jsonpDone();\n xhr && xhr.abort();\n }\n\n function completeRequest(callback, status, response, headersString, statusText) {\n // cancel timeout and subsequent timeout promise resolution\n timeoutId && $browserDefer.cancel(timeoutId);\n jsonpDone = xhr = null;\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;\n }\n\n // normalize IE bug (http://bugs.jquery.com/ticket/1450)\n status = status === 1223 ? 204 : status;\n statusText = statusText || '';\n\n callback(status, response, headersString, statusText);\n $browser.$$completeOutstandingRequest(noop);\n }\n };\n\n function jsonpReq(url, callbackId, done) {\n // we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:\n // - fetches local scripts via XHR and evals them\n // - adds and immediately removes script elements from the document\n var script = rawDocument.createElement('script'), callback = null;\n script.type = \"text/javascript\";\n script.src = url;\n script.async = true;\n\n callback = function(event) {\n removeEventListenerFn(script, \"load\", callback);\n removeEventListenerFn(script, \"error\", callback);\n rawDocument.body.removeChild(script);\n script = null;\n var status = -1;\n var text = \"unknown\";\n\n if (event) {\n if (event.type === \"load\" && !callbacks[callbackId].called) {\n event = { type: \"error\" };\n }\n text = event.type;\n status = event.type === \"error\" ? 404 : 200;\n }\n\n if (done) {\n done(status, text);\n }\n };\n\n addEventListenerFn(script, \"load\", callback);\n addEventListenerFn(script, \"error\", callback);\n rawDocument.body.appendChild(script);\n return callback;\n }\n}\n\nvar $interpolateMinErr = minErr('$interpolate');\n\n/**\n * @ngdoc provider\n * @name $interpolateProvider\n *\n * @description\n *\n * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n *\n * @example\n\n\n\n\n //demo.label//\n\n\n\n it('should interpolate binding with custom symbols', function() {\n expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n });\n\n\n */\nfunction $InterpolateProvider() {\n var startSymbol = '{{';\n var endSymbol = '}}';\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#startSymbol\n * @description\n * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n *\n * @param {string=} value new value to set the starting symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.startSymbol = function(value){\n if (value) {\n startSymbol = value;\n return this;\n } else {\n return startSymbol;\n }\n };\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * @param {string=} value new value to set the ending symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.endSymbol = function(value){\n if (value) {\n endSymbol = value;\n return this;\n } else {\n return endSymbol;\n }\n };\n\n\n this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n var startSymbolLength = startSymbol.length,\n endSymbolLength = endSymbol.length,\n escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),\n escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');\n\n function escape(ch) {\n return '\\\\\\\\\\\\' + ch;\n }\n\n /**\n * @ngdoc service\n * @name $interpolate\n * @kind function\n *\n * @requires $parse\n * @requires $sce\n *\n * @description\n *\n * Compiles a string with markup into an interpolation function. This service is used by the\n * HTML {@link ng.$compile $compile} service for data binding. See\n * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n * interpolation markup.\n *\n *\n * ```js\n * var $interpolate = ...; // injected\n * var exp = $interpolate('Hello {{name | uppercase}}!');\n * expect(exp({name:'Angular'}).toEqual('Hello ANGULAR!');\n * ```\n *\n * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is\n * `true`, the interpolation function will return `undefined` unless all embedded expressions\n * evaluate to a value other than `undefined`.\n *\n * ```js\n * var $interpolate = ...; // injected\n * var context = {greeting: 'Hello', name: undefined };\n *\n * // default \"forgiving\" mode\n * var exp = $interpolate('{{greeting}} {{name}}!');\n * expect(exp(context)).toEqual('Hello !');\n *\n * // \"allOrNothing\" mode\n * exp = $interpolate('{{greeting}} {{name}}!', false, null, true);\n * expect(exp(context)).toBeUndefined();\n * context.name = 'Angular';\n * expect(exp(context)).toEqual('Hello Angular!');\n * ```\n *\n * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.\n *\n * ####Escaped Interpolation\n * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers\n * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).\n * It will be rendered as a regular start/end marker, and will not be interpreted as an expression\n * or binding.\n *\n * This enables web-servers to prevent script injection attacks and defacing attacks, to some\n * degree, while also enabling code examples to work without relying on the\n * {@link ng.directive:ngNonBindable ngNonBindable} directive.\n *\n * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,\n * replacing angle brackets (<, >) with < and > respectively, and replacing all\n * interpolation start/end markers with their escaped counterparts.**\n *\n * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered\n * output when the $interpolate service processes the text. So, for HTML elements interpolated\n * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter\n * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,\n * this is typically useful only when user-data is used in rendering a template from the server, or\n * when otherwise untrusted data is used by a directive.\n *\n * \n * \n * \n * {{apptitle}}: \\{\\{ username = \"defaced value\"; \\}\\}\n * \n * {{username}} attempts to inject code which will deface the\n * application, but fails to accomplish their task, because the server has correctly\n * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)\n * characters.\n * Instead, the result of the attempted script injection is visible, and can be removed\n * from the database by an administrator.\n * \n * \n * \n *\n * @param {string} text The text with markup to interpolate.\n * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n * embedded expression in order to return an interpolation function. Strings with no\n * embedded expression will return null for the interpolation function.\n * @param {string=} trustedContext when provided, the returned function passes the interpolated\n * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,\n * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that\n * provides Strict Contextual Escaping for details.\n * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined\n * unless all embedded expressions evaluate to a value other than `undefined`.\n * @returns {function(context)} an interpolation function which is used to compute the\n * interpolated string. The function has these parameters:\n *\n * - `context`: evaluation context for all expressions embedded in the interpolated text\n */\n function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {\n allOrNothing = !!allOrNothing;\n var startIndex,\n endIndex,\n index = 0,\n expressions = [],\n parseFns = [],\n textLength = text.length,\n exp,\n concat = [],\n expressionPositions = [];\n\n while(index < textLength) {\n if ( ((startIndex = text.indexOf(startSymbol, index)) != -1) &&\n ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1) ) {\n if (index !== startIndex) {\n concat.push(unescapeText(text.substring(index, startIndex)));\n }\n exp = text.substring(startIndex + startSymbolLength, endIndex);\n expressions.push(exp);\n parseFns.push($parse(exp, parseStringifyInterceptor));\n index = endIndex + endSymbolLength;\n expressionPositions.push(concat.length);\n concat.push('');\n } else {\n // we did not find an interpolation, so we have to add the remainder to the separators array\n if (index !== textLength) {\n concat.push(unescapeText(text.substring(index)));\n }\n break;\n }\n }\n\n // Concatenating expressions makes it hard to reason about whether some combination of\n // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a\n // single expression be used for iframe[src], object[src], etc., we ensure that the value\n // that's used is assigned or constructed by some JS code somewhere that is more testable or\n // make it obvious that you bound the value to some user controlled value. This helps reduce\n // the load when auditing for XSS issues.\n if (trustedContext && concat.length > 1) {\n throw $interpolateMinErr('noconcat',\n \"Error while interpolating: {0}\\nStrict Contextual Escaping disallows \" +\n \"interpolations that concatenate multiple expressions when a trusted value is \" +\n \"required. See http://docs.angularjs.org/api/ng.$sce\", text);\n }\n\n if (!mustHaveExpression || expressions.length) {\n var compute = function(values) {\n for(var i = 0, ii = expressions.length; i < ii; i++) {\n if (allOrNothing && isUndefined(values[i])) return;\n concat[expressionPositions[i]] = values[i];\n }\n return concat.join('');\n };\n\n var getValue = function (value) {\n return trustedContext ?\n $sce.getTrusted(trustedContext, value) :\n $sce.valueOf(value);\n };\n\n var stringify = function (value) {\n if (value == null) { // null || undefined\n return '';\n }\n switch (typeof value) {\n case 'string': {\n break;\n }\n case 'number': {\n value = '' + value;\n break;\n }\n default: {\n value = toJson(value);\n }\n }\n\n return value;\n };\n\n return extend(function interpolationFn(context) {\n var i = 0;\n var ii = expressions.length;\n var values = new Array(ii);\n\n try {\n for (; i < ii; i++) {\n values[i] = parseFns[i](context);\n }\n\n return compute(values);\n } catch(err) {\n var newErr = $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text,\n err.toString());\n $exceptionHandler(newErr);\n }\n\n }, {\n // all of these properties are undocumented for now\n exp: text, //just for compatibility with regular watchers created via $watch\n expressions: expressions,\n $$watchDelegate: function (scope, listener, objectEquality) {\n var lastValue;\n return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) {\n var currValue = compute(values);\n if (isFunction(listener)) {\n listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);\n }\n lastValue = currValue;\n }, objectEquality);\n }\n });\n }\n\n function unescapeText(text) {\n return text.replace(escapedStartRegexp, startSymbol).\n replace(escapedEndRegexp, endSymbol);\n }\n\n function parseStringifyInterceptor(value) {\n try {\n return stringify(getValue(value));\n } catch(err) {\n var newErr = $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text,\n err.toString());\n $exceptionHandler(newErr);\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $interpolate#startSymbol\n * @description\n * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n *\n * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change\n * the symbol.\n *\n * @returns {string} start symbol.\n */\n $interpolate.startSymbol = function() {\n return startSymbol;\n };\n\n\n /**\n * @ngdoc method\n * @name $interpolate#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change\n * the symbol.\n *\n * @returns {string} end symbol.\n */\n $interpolate.endSymbol = function() {\n return endSymbol;\n };\n\n return $interpolate;\n }];\n}\n\nfunction $IntervalProvider() {\n this.$get = ['$rootScope', '$window', '$q', '$$q',\n function($rootScope, $window, $q, $$q) {\n var intervals = {};\n\n\n /**\n * @ngdoc service\n * @name $interval\n *\n * @description\n * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n * milliseconds.\n *\n * The return value of registering an interval function is a promise. This promise will be\n * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n * run indefinitely if `count` is not defined. The value of the notification will be the\n * number of iterations that have run.\n * To cancel an interval, call `$interval.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to\n * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n * time.\n *\n * \n * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n * with them. In particular they are not automatically destroyed when a controller's scope or a\n * directive's element are destroyed.\n * You should take this into consideration and make sure to always cancel the interval at the\n * appropriate moment. See the example below for more details on how and when to do this.\n * \n *\n * @param {function()} fn A function that should be called repeatedly.\n * @param {number} delay Number of milliseconds between each function call.\n * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n * indefinitely.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @returns {promise} A promise which will be notified on each iteration.\n *\n * @example\n * \n * \n * \n *\n * \n * \n * Date format: \n * Current time is: \n * \n * Blood 1 : {{blood_1}}\n * Blood 2 : {{blood_2}}\n * Fight\n * StopFight\n * resetFight\n * \n * \n *\n * \n * \n */\n function interval(fn, delay, count, invokeApply) {\n var setInterval = $window.setInterval,\n clearInterval = $window.clearInterval,\n iteration = 0,\n skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise;\n\n count = isDefined(count) ? count : 0;\n\n promise.then(null, null, fn);\n\n promise.$$intervalId = setInterval(function tick() {\n deferred.notify(iteration++);\n\n if (count > 0 && iteration >= count) {\n deferred.resolve(iteration);\n clearInterval(promise.$$intervalId);\n delete intervals[promise.$$intervalId];\n }\n\n if (!skipApply) $rootScope.$apply();\n\n }, delay);\n\n intervals[promise.$$intervalId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $interval#cancel\n *\n * @description\n * Cancels a task associated with the `promise`.\n *\n * @param {promise} promise returned by the `$interval` function.\n * @returns {boolean} Returns `true` if the task was successfully canceled.\n */\n interval.cancel = function(promise) {\n if (promise && promise.$$intervalId in intervals) {\n intervals[promise.$$intervalId].reject('canceled');\n $window.clearInterval(promise.$$intervalId);\n delete intervals[promise.$$intervalId];\n return true;\n }\n return false;\n };\n\n return interval;\n }];\n}\n\n/**\n * @ngdoc service\n * @name $locale\n *\n * @description\n * $locale service provides localization rules for various Angular components. As of right now the\n * only public api is:\n *\n * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)\n */\nfunction $LocaleProvider(){\n this.$get = function() {\n return {\n id: 'en-us',\n\n NUMBER_FORMATS: {\n DECIMAL_SEP: '.',\n GROUP_SEP: ',',\n PATTERNS: [\n { // Decimal Pattern\n minInt: 1,\n minFrac: 0,\n maxFrac: 3,\n posPre: '',\n posSuf: '',\n negPre: '-',\n negSuf: '',\n gSize: 3,\n lgSize: 3\n },{ //Currency Pattern\n minInt: 1,\n minFrac: 2,\n maxFrac: 2,\n posPre: '\\u00A4',\n posSuf: '',\n negPre: '(\\u00A4',\n negSuf: ')',\n gSize: 3,\n lgSize: 3\n }\n ],\n CURRENCY_SYM: '$'\n },\n\n DATETIME_FORMATS: {\n MONTH:\n 'January,February,March,April,May,June,July,August,September,October,November,December'\n .split(','),\n SHORTMONTH: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),\n DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),\n SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),\n AMPMS: ['AM','PM'],\n medium: 'MMM d, y h:mm:ss a',\n short: 'M/d/yy h:mm a',\n fullDate: 'EEEE, MMMM d, y',\n longDate: 'MMMM d, y',\n mediumDate: 'MMM d, y',\n shortDate: 'M/d/yy',\n mediumTime: 'h:mm:ss a',\n shortTime: 'h:mm a'\n },\n\n pluralCat: function(num) {\n if (num === 1) {\n return 'one';\n }\n return 'other';\n }\n };\n };\n}\n\nvar PATH_MATCH = /^([^\\?#]*)(\\?([^#]*))?(#(.*))?$/,\n DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\nvar $locationMinErr = minErr('$location');\n\n\n/**\n * Encode path using encodeUriSegment, ignoring forward slashes\n *\n * @param {string} path Path to encode\n * @returns {string}\n */\nfunction encodePath(path) {\n var segments = path.split('/'),\n i = segments.length;\n\n while (i--) {\n segments[i] = encodeUriSegment(segments[i]);\n }\n\n return segments.join('/');\n}\n\nfunction parseAbsoluteUrl(absoluteUrl, locationObj, appBase) {\n var parsedUrl = urlResolve(absoluteUrl, appBase);\n\n locationObj.$$protocol = parsedUrl.protocol;\n locationObj.$$host = parsedUrl.hostname;\n locationObj.$$port = int(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n}\n\n\nfunction parseAppUrl(relativeUrl, locationObj, appBase) {\n var prefixed = (relativeUrl.charAt(0) !== '/');\n if (prefixed) {\n relativeUrl = '/' + relativeUrl;\n }\n var match = urlResolve(relativeUrl, appBase);\n locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?\n match.pathname.substring(1) : match.pathname);\n locationObj.$$search = parseKeyValue(match.search);\n locationObj.$$hash = decodeURIComponent(match.hash);\n\n // make sure path starts with '/';\n if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {\n locationObj.$$path = '/' + locationObj.$$path;\n }\n}\n\n\n/**\n *\n * @param {string} begin\n * @param {string} whole\n * @returns {string} returns text from whole after begin or undefined if it does not begin with\n * expected string.\n */\nfunction beginsWith(begin, whole) {\n if (whole.indexOf(begin) === 0) {\n return whole.substr(begin.length);\n }\n}\n\n\nfunction stripHash(url) {\n var index = url.indexOf('#');\n return index == -1 ? url : url.substr(0, index);\n}\n\n\nfunction stripFile(url) {\n return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n}\n\n/* return the server only (scheme://host:port) */\nfunction serverBase(url) {\n return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n}\n\n\n/**\n * LocationHtml5Url represents an url\n * This object is exposed as $location service when HTML5 mode is enabled and supported\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} basePrefix url path prefix\n */\nfunction LocationHtml5Url(appBase, basePrefix) {\n this.$$html5 = true;\n basePrefix = basePrefix || '';\n var appBaseNoFile = stripFile(appBase);\n parseAbsoluteUrl(appBase, this, appBase);\n\n\n /**\n * Parse given html5 (regular) url string into properties\n * @param {string} newAbsoluteUrl HTML5 url\n * @private\n */\n this.$$parse = function(url) {\n var pathUrl = beginsWith(appBaseNoFile, url);\n if (!isString(pathUrl)) {\n throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n appBaseNoFile);\n }\n\n parseAppUrl(pathUrl, this, appBase);\n\n if (!this.$$path) {\n this.$$path = '/';\n }\n\n this.$$compose();\n };\n\n /**\n * Compose url and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n var appUrl, prevAppUrl;\n var rewrittenUrl;\n\n if ( (appUrl = beginsWith(appBase, url)) !== undefined ) {\n prevAppUrl = appUrl;\n if ( (appUrl = beginsWith(basePrefix, appUrl)) !== undefined ) {\n rewrittenUrl = appBaseNoFile + (beginsWith('/', appUrl) || appUrl);\n } else {\n rewrittenUrl = appBase + prevAppUrl;\n }\n } else if ( (appUrl = beginsWith(appBaseNoFile, url)) !== undefined ) {\n rewrittenUrl = appBaseNoFile + appUrl;\n } else if (appBaseNoFile == url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when developer doesn't opt into html5 mode.\n * It also serves as the base class for html5 mode fallback on legacy browsers.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangUrl(appBase, hashPrefix) {\n var appBaseNoFile = stripFile(appBase);\n\n parseAbsoluteUrl(appBase, this, appBase);\n\n\n /**\n * Parse given hashbang url into properties\n * @param {string} url Hashbang url\n * @private\n */\n this.$$parse = function(url) {\n var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);\n var withoutHashUrl = withoutBaseUrl.charAt(0) == '#'\n ? beginsWith(hashPrefix, withoutBaseUrl)\n : (this.$$html5)\n ? withoutBaseUrl\n : '';\n\n if (!isString(withoutHashUrl)) {\n throw $locationMinErr('ihshprfx', 'Invalid url \"{0}\", missing hash prefix \"{1}\".', url,\n hashPrefix);\n }\n parseAppUrl(withoutHashUrl, this, appBase);\n\n this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\n this.$$compose();\n\n /*\n * In Windows, on an anchor node on documents loaded from\n * the filesystem, the browser will return a pathname\n * prefixed with the drive name ('/C:/path') when a\n * pathname without a drive is set:\n * * a.setAttribute('href', '/foo')\n * * a.pathname === '/C:/foo' //true\n *\n * Inside of Angular, we're always using pathnames that\n * do not include drive names for routing.\n */\n function removeWindowsDriveName (path, url, base) {\n /*\n Matches paths for file protocol on windows,\n such as /C:/foo/bar, and captures only /foo/bar.\n */\n var windowsFilePathExp = /^\\/[A-Z]:(\\/.*)/;\n\n var firstPathSegmentMatch;\n\n //Get the relative path from the input URL.\n if (url.indexOf(base) === 0) {\n url = url.replace(base, '');\n }\n\n // The input URL intentionally contains a first path segment that ends with a colon.\n if (windowsFilePathExp.exec(url)) {\n return path;\n }\n\n firstPathSegmentMatch = windowsFilePathExp.exec(path);\n return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n }\n };\n\n /**\n * Compose hashbang url and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if(stripHash(appBase) == stripHash(url)) {\n this.$$parse(url);\n return true;\n }\n return false;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when html5 history api is enabled but the browser\n * does not support it.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangInHtml5Url(appBase, hashPrefix) {\n this.$$html5 = true;\n LocationHashbangUrl.apply(this, arguments);\n\n var appBaseNoFile = stripFile(appBase);\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n\n var rewrittenUrl;\n var appUrl;\n\n if ( appBase == stripHash(url) ) {\n rewrittenUrl = url;\n } else if ( (appUrl = beginsWith(appBaseNoFile, url)) ) {\n rewrittenUrl = appBase + hashPrefix + appUrl;\n } else if ( appBaseNoFile === url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n // include hashPrefix in $$absUrl when $$url is empty so IE8 & 9 do not reload page because of removal of '#'\n this.$$absUrl = appBase + hashPrefix + this.$$url;\n };\n\n}\n\n\nLocationHashbangInHtml5Url.prototype =\n LocationHashbangUrl.prototype =\n LocationHtml5Url.prototype = {\n\n /**\n * Are we in html5 mode?\n * @private\n */\n $$html5: false,\n\n /**\n * Has any change been replacing ?\n * @private\n */\n $$replace: false,\n\n /**\n * @ngdoc method\n * @name $location#absUrl\n *\n * @description\n * This method is getter only.\n *\n * Return full url representation with all segments encoded according to rules specified in\n * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).\n *\n * @return {string} full url\n */\n absUrl: locationGetter('$$absUrl'),\n\n /**\n * @ngdoc method\n * @name $location#url\n *\n * @description\n * This method is getter / setter.\n *\n * Return url (e.g. `/path?a=b#hash`) when called without any parameter.\n *\n * Change path, search and hash, when called with parameter and return `$location`.\n *\n * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)\n * @return {string} url\n */\n url: function(url) {\n if (isUndefined(url))\n return this.$$url;\n\n var match = PATH_MATCH.exec(url);\n if (match[1]) this.path(decodeURIComponent(match[1]));\n if (match[2] || match[1]) this.search(match[3] || '');\n this.hash(match[5] || '');\n\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#protocol\n *\n * @description\n * This method is getter only.\n *\n * Return protocol of current url.\n *\n * @return {string} protocol of current url\n */\n protocol: locationGetter('$$protocol'),\n\n /**\n * @ngdoc method\n * @name $location#host\n *\n * @description\n * This method is getter only.\n *\n * Return host of current url.\n *\n * @return {string} host of current url.\n */\n host: locationGetter('$$host'),\n\n /**\n * @ngdoc method\n * @name $location#port\n *\n * @description\n * This method is getter only.\n *\n * Return port of current url.\n *\n * @return {Number} port\n */\n port: locationGetter('$$port'),\n\n /**\n * @ngdoc method\n * @name $location#path\n *\n * @description\n * This method is getter / setter.\n *\n * Return path of current url when called without any parameter.\n *\n * Change path when called with parameter and return `$location`.\n *\n * Note: Path should always begin with forward slash (/), this method will add the forward slash\n * if it is missing.\n *\n * @param {(string|number)=} path New path\n * @return {string} path\n */\n path: locationGetterSetter('$$path', function(path) {\n path = path ? path.toString() : '';\n return path.charAt(0) == '/' ? path : '/' + path;\n }),\n\n /**\n * @ngdoc method\n * @name $location#search\n *\n * @description\n * This method is getter / setter.\n *\n * Return search part (as object) of current url when called without any parameter.\n *\n * Change search part when called with parameter and return `$location`.\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n * var searchObject = $location.search();\n * // => {foo: 'bar', baz: 'xoxo'}\n *\n *\n * // set foo to 'yipee'\n * $location.search('foo', 'yipee');\n * // => $location\n * ```\n *\n * @param {string|Object.|Object.>} search New search params - string or\n * hash object.\n *\n * When called with a single argument the method acts as a setter, setting the `search` component\n * of `$location` to the specified value.\n *\n * If the argument is a hash object containing an array of values, these values will be encoded\n * as duplicate search parameters in the url.\n *\n * @param {(string|Number|Array|boolean)=} paramValue If `search` is a string or number, then `paramValue`\n * will override only a single search property.\n *\n * If `paramValue` is an array, it will override the property of the `search` component of\n * `$location` specified via the first argument.\n *\n * If `paramValue` is `null`, the property specified via the first argument will be deleted.\n *\n * If `paramValue` is `true`, the property specified via the first argument will be added with no\n * value nor trailing equal sign.\n *\n * @return {Object} If called with no arguments returns the parsed `search` object. If called with\n * one or more arguments returns `$location` object itself.\n */\n search: function(search, paramValue) {\n switch (arguments.length) {\n case 0:\n return this.$$search;\n case 1:\n if (isString(search) || isNumber(search)) {\n search = search.toString();\n this.$$search = parseKeyValue(search);\n } else if (isObject(search)) {\n // remove object undefined or null properties\n forEach(search, function(value, key) {\n if (value == null) delete search[key];\n });\n\n this.$$search = search;\n } else {\n throw $locationMinErr('isrcharg',\n 'The first argument of the `$location#search()` call must be a string or an object.');\n }\n break;\n default:\n if (isUndefined(paramValue) || paramValue === null) {\n delete this.$$search[search];\n } else {\n this.$$search[search] = paramValue;\n }\n }\n\n this.$$compose();\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#hash\n *\n * @description\n * This method is getter / setter.\n *\n * Return hash fragment when called without any parameter.\n *\n * Change hash fragment when called with parameter and return `$location`.\n *\n * @param {(string|number)=} hash New hash fragment\n * @return {string} hash\n */\n hash: locationGetterSetter('$$hash', function(hash) {\n return hash ? hash.toString() : '';\n }),\n\n /**\n * @ngdoc method\n * @name $location#replace\n *\n * @description\n * If called, all changes to $location during current `$digest` will be replacing current history\n * record, instead of adding new one.\n */\n replace: function() {\n this.$$replace = true;\n return this;\n }\n};\n\nfunction locationGetter(property) {\n return function() {\n return this[property];\n };\n}\n\n\nfunction locationGetterSetter(property, preprocess) {\n return function(value) {\n if (isUndefined(value))\n return this[property];\n\n this[property] = preprocess(value);\n this.$$compose();\n\n return this;\n };\n}\n\n\n/**\n * @ngdoc service\n * @name $location\n *\n * @requires $rootElement\n *\n * @description\n * The $location service parses the URL in the browser address bar (based on the\n * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL\n * available to your application. Changes to the URL in the address bar are reflected into\n * $location service and changes to $location are reflected into the browser address bar.\n *\n * **The $location service:**\n *\n * - Exposes the current URL in the browser address bar, so you can\n * - Watch and observe the URL.\n * - Change the URL.\n * - Synchronizes the URL with the browser when the user\n * - Changes the address bar.\n * - Clicks the back or forward button (or clicks a History link).\n * - Clicks on a link.\n * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n *\n * For more information see {@link guide/$location Developer Guide: Using $location}\n */\n\n/**\n * @ngdoc provider\n * @name $locationProvider\n * @description\n * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n */\nfunction $LocationProvider(){\n var hashPrefix = '',\n html5Mode = {\n enabled: false,\n requireBase: true\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#hashPrefix\n * @description\n * @param {string=} prefix Prefix for hash part (containing path and search)\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.hashPrefix = function(prefix) {\n if (isDefined(prefix)) {\n hashPrefix = prefix;\n return this;\n } else {\n return hashPrefix;\n }\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#html5Mode\n * @description\n * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.\n * If object, sets `enabled` and `requireBase` to respective values.\n * - **enabled** – `{boolean}` – Sets `html5Mode.enabled`. If true, will rely on\n * `history.pushState` to change urls where supported. Will fall back to hash-prefixed paths\n * in browsers that do not support `pushState`.\n * - **requireBase** - `{boolean}` - Sets `html5Mode.requireBase` (default: `true`). When\n * html5Mode is enabled, specifies whether or not a tag is required to be present. If\n * `enabled` and `requireBase` are true, and a base tag is not present, an error will be\n * thrown when `$location` is injected. See the\n * {@link guide/$location $location guide for more information}\n *\n * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter\n */\n this.html5Mode = function(mode) {\n if (isBoolean(mode)) {\n html5Mode.enabled = mode;\n return this;\n } else if (isObject(mode)) {\n html5Mode.enabled = isBoolean(mode.enabled) ?\n mode.enabled :\n html5Mode.enabled;\n html5Mode.requireBase = isBoolean(mode.requireBase) ?\n mode.requireBase :\n html5Mode.requireBase;\n return this;\n } else {\n return html5Mode;\n }\n };\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeStart\n * @eventType broadcast on root scope\n * @description\n * Broadcasted before a URL will change. This change can be prevented by calling\n * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n * details about event object. Upon successful change\n * {@link ng.$location#events_$locationChangeSuccess $locationChangeSuccess} is fired.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n */\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeSuccess\n * @eventType broadcast on root scope\n * @description\n * Broadcasted after a URL was changed.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n */\n\n this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',\n function( $rootScope, $browser, $sniffer, $rootElement) {\n var $location,\n LocationMode,\n baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n initialUrl = $browser.url(),\n appBase;\n\n if (html5Mode.enabled) {\n if (!baseHref && html5Mode.requireBase) {\n throw $locationMinErr('nobase',\n \"$location in HTML5 mode requires a tag to be present!\");\n }\n appBase = serverBase(initialUrl) + (baseHref || '/');\n LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n } else {\n appBase = stripHash(initialUrl);\n LocationMode = LocationHashbangUrl;\n }\n $location = new LocationMode(appBase, '#' + hashPrefix);\n $location.$$parseLinkUrl(initialUrl, initialUrl);\n\n var IGNORE_URI_REGEXP = /^\\s*(javascript|mailto):/i;\n\n $rootElement.on('click', function(event) {\n // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n // currently we open nice url link and redirect then\n\n if (event.ctrlKey || event.metaKey || event.which == 2) return;\n\n var elm = jqLite(event.target);\n\n // traverse the DOM up to find first A tag\n while (nodeName_(elm[0]) !== 'a') {\n // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n }\n\n var absHref = elm.prop('href');\n // get the actual href attribute - see\n // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx\n var relHref = elm.attr('href') || elm.attr('xlink:href');\n\n if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n // an animation.\n absHref = urlResolve(absHref.animVal).href;\n }\n\n // Ignore when url is started with javascript: or mailto:\n if (IGNORE_URI_REGEXP.test(absHref)) return;\n\n if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {\n if ($location.$$parseLinkUrl(absHref, relHref)) {\n event.preventDefault();\n // update location manually\n if ($location.absUrl() != $browser.url()) {\n $rootScope.$apply();\n // hack to work around FF6 bug 684208 when scenario runner clicks on links\n window.angular['ff-684208-preventDefault'] = true;\n }\n }\n }\n });\n\n\n // rewrite hashbang url <> html5 url\n if ($location.absUrl() != initialUrl) {\n $browser.url($location.absUrl(), true);\n }\n\n // update $location when $browser url changes\n $browser.onUrlChange(function(newUrl) {\n if ($location.absUrl() != newUrl) {\n $rootScope.$evalAsync(function() {\n var oldUrl = $location.absUrl();\n\n $location.$$parse(newUrl);\n if ($rootScope.$broadcast('$locationChangeStart', newUrl,\n oldUrl).defaultPrevented) {\n $location.$$parse(oldUrl);\n $browser.url(oldUrl);\n } else {\n afterLocationChange(oldUrl);\n }\n });\n if (!$rootScope.$$phase) $rootScope.$digest();\n }\n });\n\n // update browser\n var changeCounter = 0;\n $rootScope.$watch(function $locationWatch() {\n var oldUrl = $browser.url();\n var currentReplace = $location.$$replace;\n\n if (!changeCounter || oldUrl != $location.absUrl()) {\n changeCounter++;\n $rootScope.$evalAsync(function() {\n if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n defaultPrevented) {\n $location.$$parse(oldUrl);\n } else {\n $browser.url($location.absUrl(), currentReplace);\n afterLocationChange(oldUrl);\n }\n });\n }\n $location.$$replace = false;\n\n return changeCounter;\n });\n\n return $location;\n\n function afterLocationChange(oldUrl) {\n $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl);\n }\n}];\n}\n\n/**\n * @ngdoc service\n * @name $log\n * @requires $window\n *\n * @description\n * Simple service for logging. Default implementation safely writes the message\n * into the browser's console (if present).\n *\n * The main purpose of this service is to simplify debugging and troubleshooting.\n *\n * The default is to log `debug` messages. You can use\n * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n *\n * @example\n \n \n angular.module('logExample', [])\n .controller('LogController', ['$scope', '$log', function($scope, $log) {\n $scope.$log = $log;\n $scope.message = 'Hello World!';\n }]);\n \n \n \n Reload this page with open console, enter text and hit the log button...\n Message:\n \n log\n warn\n info\n error\n \n \n \n */\n\n/**\n * @ngdoc provider\n * @name $logProvider\n * @description\n * Use the `$logProvider` to configure how the application logs messages\n */\nfunction $LogProvider(){\n var debug = true,\n self = this;\n\n /**\n * @ngdoc method\n * @name $logProvider#debugEnabled\n * @description\n * @param {boolean=} flag enable or disable debug level messages\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.debugEnabled = function(flag) {\n if (isDefined(flag)) {\n debug = flag;\n return this;\n } else {\n return debug;\n }\n };\n\n this.$get = ['$window', function($window){\n return {\n /**\n * @ngdoc method\n * @name $log#log\n *\n * @description\n * Write a log message\n */\n log: consoleLog('log'),\n\n /**\n * @ngdoc method\n * @name $log#info\n *\n * @description\n * Write an information message\n */\n info: consoleLog('info'),\n\n /**\n * @ngdoc method\n * @name $log#warn\n *\n * @description\n * Write a warning message\n */\n warn: consoleLog('warn'),\n\n /**\n * @ngdoc method\n * @name $log#error\n *\n * @description\n * Write an error message\n */\n error: consoleLog('error'),\n\n /**\n * @ngdoc method\n * @name $log#debug\n *\n * @description\n * Write a debug message\n */\n debug: (function () {\n var fn = consoleLog('debug');\n\n return function() {\n if (debug) {\n fn.apply(self, arguments);\n }\n };\n }())\n };\n\n function formatError(arg) {\n if (arg instanceof Error) {\n if (arg.stack) {\n arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n ? 'Error: ' + arg.message + '\\n' + arg.stack\n : arg.stack;\n } else if (arg.sourceURL) {\n arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n }\n }\n return arg;\n }\n\n function consoleLog(type) {\n var console = $window.console || {},\n logFn = console[type] || console.log || noop,\n hasApply = false;\n\n // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.\n // The reason behind this is that console.log has type \"object\" in IE8...\n try {\n hasApply = !!logFn.apply;\n } catch (e) {}\n\n if (hasApply) {\n return function() {\n var args = [];\n forEach(arguments, function(arg) {\n args.push(formatError(arg));\n });\n return logFn.apply(console, args);\n };\n }\n\n // we are IE which either doesn't have window.console => this is noop and we do nothing,\n // or we are IE where console.log doesn't have apply so we log at least first 2 args\n return function(arg1, arg2) {\n logFn(arg1, arg2 == null ? '' : arg2);\n };\n }\n }];\n}\n\nvar $parseMinErr = minErr('$parse');\n\n// Sandboxing Angular Expressions\n// ------------------------------\n// Angular expressions are generally considered safe because these expressions only have direct\n// access to $scope and locals. However, one can obtain the ability to execute arbitrary JS code by\n// obtaining a reference to native JS functions such as the Function constructor.\n//\n// As an example, consider the following Angular expression:\n//\n// {}.toString.constructor('alert(\"evil JS code\")')\n//\n// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits\n// against the expression language, but not to prevent exploits that were enabled by exposing\n// sensitive JavaScript or browser apis on Scope. Exposing such objects on a Scope is never a good\n// practice and therefore we are not even trying to protect against interaction with an object\n// explicitly exposed in this way.\n//\n// In general, it is not possible to access a Window object from an angular expression unless a\n// window or some DOM object that has a reference to window is published onto a Scope.\n// Similarly we prevent invocations of function known to be dangerous, as well as assignments to\n// native objects.\n\n\nfunction ensureSafeMemberName(name, fullExpression) {\n if (name === \"__defineGetter__\" || name === \"__defineSetter__\"\n || name === \"__lookupGetter__\" || name === \"__lookupSetter__\"\n || name === \"__proto__\") {\n throw $parseMinErr('isecfld',\n 'Attempting to access a disallowed field in Angular expressions! '\n +'Expression: {0}', fullExpression);\n }\n return name;\n}\n\nfunction ensureSafeObject(obj, fullExpression) {\n // nifty check if obj is Function that is fast and works across iframes and other contexts\n if (obj) {\n if (obj.constructor === obj) {\n throw $parseMinErr('isecfn',\n 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// isWindow(obj)\n obj.window === obj) {\n throw $parseMinErr('isecwindow',\n 'Referencing the Window in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// isElement(obj)\n obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {\n throw $parseMinErr('isecdom',\n 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// block Object so that we can't get hold of dangerous Object.* methods\n obj === Object) {\n throw $parseMinErr('isecobj',\n 'Referencing Object in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n }\n }\n return obj;\n}\n\nvar CALL = Function.prototype.call;\nvar APPLY = Function.prototype.apply;\nvar BIND = Function.prototype.bind;\n\nfunction ensureSafeFunction(obj, fullExpression) {\n if (obj) {\n if (obj.constructor === obj) {\n throw $parseMinErr('isecfn',\n 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (obj === CALL || obj === APPLY || obj === BIND) {\n throw $parseMinErr('isecff',\n 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n }\n }\n}\n\n//Keyword constants\nvar CONSTANTS = createMap();\nforEach({\n 'null': function() { return null; },\n 'true': function() { return true; },\n 'false': function() { return false; },\n 'undefined': function() {}\n}, function(constantGetter, name) {\n constantGetter.constant = constantGetter.literal = constantGetter.sharedGetter = true;\n CONSTANTS[name] = constantGetter;\n});\n\n//Operators - will be wrapped by binaryFn/unaryFn/assignment/filter\nvar OPERATORS = extend(createMap(), {\n /* jshint bitwise : false */\n '+':function(self, locals, a,b){\n a=a(self, locals); b=b(self, locals);\n if (isDefined(a)) {\n if (isDefined(b)) {\n return a + b;\n }\n return a;\n }\n return isDefined(b)?b:undefined;},\n '-':function(self, locals, a,b){\n a=a(self, locals); b=b(self, locals);\n return (isDefined(a)?a:0)-(isDefined(b)?b:0);\n },\n '*':function(self, locals, a,b){return a(self, locals)*b(self, locals);},\n '/':function(self, locals, a,b){return a(self, locals)/b(self, locals);},\n '%':function(self, locals, a,b){return a(self, locals)%b(self, locals);},\n '^':function(self, locals, a,b){return a(self, locals)^b(self, locals);},\n '===':function(self, locals, a, b){return a(self, locals)===b(self, locals);},\n '!==':function(self, locals, a, b){return a(self, locals)!==b(self, locals);},\n '==':function(self, locals, a,b){return a(self, locals)==b(self, locals);},\n '!=':function(self, locals, a,b){return a(self, locals)!=b(self, locals);},\n '<':function(self, locals, a,b){return a(self, locals)':function(self, locals, a,b){return a(self, locals)>b(self, locals);},\n '<=':function(self, locals, a,b){return a(self, locals)<=b(self, locals);},\n '>=':function(self, locals, a,b){return a(self, locals)>=b(self, locals);},\n '&&':function(self, locals, a,b){return a(self, locals)&&b(self, locals);},\n '||':function(self, locals, a,b){return a(self, locals)||b(self, locals);},\n '&':function(self, locals, a,b){return a(self, locals)&b(self, locals);},\n '!':function(self, locals, a){return !a(self, locals);},\n\n //Tokenized as operators but parsed as assignment/filters\n '=':true,\n '|':true\n});\n/* jshint bitwise: true */\nvar ESCAPE = {\"n\":\"\\n\", \"f\":\"\\f\", \"r\":\"\\r\", \"t\":\"\\t\", \"v\":\"\\v\", \"'\":\"'\", '\"':'\"'};\n\n\n/////////////////////////////////////////\n\n\n/**\n * @constructor\n */\nvar Lexer = function (options) {\n this.options = options;\n};\n\nLexer.prototype = {\n constructor: Lexer,\n\n lex: function (text) {\n this.text = text;\n this.index = 0;\n this.ch = undefined;\n this.tokens = [];\n\n while (this.index < this.text.length) {\n this.ch = this.text.charAt(this.index);\n if (this.is('\"\\'')) {\n this.readString(this.ch);\n } else if (this.isNumber(this.ch) || this.is('.') && this.isNumber(this.peek())) {\n this.readNumber();\n } else if (this.isIdent(this.ch)) {\n this.readIdent();\n } else if (this.is('(){}[].,;:?')) {\n this.tokens.push({\n index: this.index,\n text: this.ch\n });\n this.index++;\n } else if (this.isWhitespace(this.ch)) {\n this.index++;\n } else {\n var ch2 = this.ch + this.peek();\n var ch3 = ch2 + this.peek(2);\n var fn = OPERATORS[this.ch];\n var fn2 = OPERATORS[ch2];\n var fn3 = OPERATORS[ch3];\n if (fn3) {\n this.tokens.push({index: this.index, text: ch3, fn: fn3});\n this.index += 3;\n } else if (fn2) {\n this.tokens.push({index: this.index, text: ch2, fn: fn2});\n this.index += 2;\n } else if (fn) {\n this.tokens.push({\n index: this.index,\n text: this.ch,\n fn: fn\n });\n this.index += 1;\n } else {\n this.throwError('Unexpected next character ', this.index, this.index + 1);\n }\n }\n }\n return this.tokens;\n },\n\n is: function(chars) {\n return chars.indexOf(this.ch) !== -1;\n },\n\n peek: function(i) {\n var num = i || 1;\n return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n },\n\n isNumber: function(ch) {\n return ('0' <= ch && ch <= '9');\n },\n\n isWhitespace: function(ch) {\n // IE treats non-breaking space as \\u00A0\n return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n },\n\n isIdent: function(ch) {\n return ('a' <= ch && ch <= 'z' ||\n 'A' <= ch && ch <= 'Z' ||\n '_' === ch || ch === '$');\n },\n\n isExpOperator: function(ch) {\n return (ch === '-' || ch === '+' || this.isNumber(ch));\n },\n\n throwError: function(error, start, end) {\n end = end || this.index;\n var colStr = (isDefined(start)\n ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n : ' ' + end);\n throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n error, colStr, this.text);\n },\n\n readNumber: function() {\n var number = '';\n var start = this.index;\n while (this.index < this.text.length) {\n var ch = lowercase(this.text.charAt(this.index));\n if (ch == '.' || this.isNumber(ch)) {\n number += ch;\n } else {\n var peekCh = this.peek();\n if (ch == 'e' && this.isExpOperator(peekCh)) {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n peekCh && this.isNumber(peekCh) &&\n number.charAt(number.length - 1) == 'e') {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n (!peekCh || !this.isNumber(peekCh)) &&\n number.charAt(number.length - 1) == 'e') {\n this.throwError('Invalid exponent');\n } else {\n break;\n }\n }\n this.index++;\n }\n number = 1 * number;\n this.tokens.push({\n index: start,\n text: number,\n constant: true,\n fn: function() { return number; }\n });\n },\n\n readIdent: function() {\n var expression = this.text;\n\n var ident = '';\n var start = this.index;\n\n var lastDot, peekIndex, methodName, ch;\n\n while (this.index < this.text.length) {\n ch = this.text.charAt(this.index);\n if (ch === '.' || this.isIdent(ch) || this.isNumber(ch)) {\n if (ch === '.') lastDot = this.index;\n ident += ch;\n } else {\n break;\n }\n this.index++;\n }\n\n //check if the identifier ends with . and if so move back one char\n if (lastDot && ident[ident.length - 1] === '.') {\n this.index--;\n ident = ident.slice(0, -1);\n lastDot = ident.lastIndexOf('.');\n if (lastDot === -1) {\n lastDot = undefined;\n }\n }\n\n //check if this is not a method invocation and if it is back out to last dot\n if (lastDot) {\n peekIndex = this.index;\n while (peekIndex < this.text.length) {\n ch = this.text.charAt(peekIndex);\n if (ch === '(') {\n methodName = ident.substr(lastDot - start + 1);\n ident = ident.substr(0, lastDot - start);\n this.index = peekIndex;\n break;\n }\n if (this.isWhitespace(ch)) {\n peekIndex++;\n } else {\n break;\n }\n }\n }\n\n this.tokens.push({\n index: start,\n text: ident,\n fn: CONSTANTS[ident] || getterFn(ident, this.options, expression)\n });\n\n if (methodName) {\n this.tokens.push({\n index: lastDot,\n text: '.'\n });\n this.tokens.push({\n index: lastDot + 1,\n text: methodName\n });\n }\n },\n\n readString: function(quote) {\n var start = this.index;\n this.index++;\n var string = '';\n var rawString = quote;\n var escape = false;\n while (this.index < this.text.length) {\n var ch = this.text.charAt(this.index);\n rawString += ch;\n if (escape) {\n if (ch === 'u') {\n var hex = this.text.substring(this.index + 1, this.index + 5);\n if (!hex.match(/[\\da-f]{4}/i))\n this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n this.index += 4;\n string += String.fromCharCode(parseInt(hex, 16));\n } else {\n var rep = ESCAPE[ch];\n string = string + (rep || ch);\n }\n escape = false;\n } else if (ch === '\\\\') {\n escape = true;\n } else if (ch === quote) {\n this.index++;\n this.tokens.push({\n index: start,\n text: rawString,\n string: string,\n constant: true,\n fn: function() { return string; }\n });\n return;\n } else {\n string += ch;\n }\n this.index++;\n }\n this.throwError('Unterminated quote', start);\n }\n};\n\n\nfunction isConstant(exp) {\n return exp.constant;\n}\n\n/**\n * @constructor\n */\nvar Parser = function (lexer, $filter, options) {\n this.lexer = lexer;\n this.$filter = $filter;\n this.options = options;\n};\n\nParser.ZERO = extend(function () {\n return 0;\n}, {\n sharedGetter: true,\n constant: true\n});\n\nParser.prototype = {\n constructor: Parser,\n\n parse: function (text) {\n this.text = text;\n this.tokens = this.lexer.lex(text);\n\n var value = this.statements();\n\n if (this.tokens.length !== 0) {\n this.throwError('is an unexpected token', this.tokens[0]);\n }\n\n value.literal = !!value.literal;\n value.constant = !!value.constant;\n\n return value;\n },\n\n primary: function () {\n var primary;\n if (this.expect('(')) {\n primary = this.filterChain();\n this.consume(')');\n } else if (this.expect('[')) {\n primary = this.arrayDeclaration();\n } else if (this.expect('{')) {\n primary = this.object();\n } else {\n var token = this.expect();\n primary = token.fn;\n if (!primary) {\n this.throwError('not a primary expression', token);\n }\n if (token.constant) {\n primary.constant = true;\n primary.literal = true;\n }\n }\n\n var next, context;\n while ((next = this.expect('(', '[', '.'))) {\n if (next.text === '(') {\n primary = this.functionCall(primary, context);\n context = null;\n } else if (next.text === '[') {\n context = primary;\n primary = this.objectIndex(primary);\n } else if (next.text === '.') {\n context = primary;\n primary = this.fieldAccess(primary);\n } else {\n this.throwError('IMPOSSIBLE');\n }\n }\n return primary;\n },\n\n throwError: function(msg, token) {\n throw $parseMinErr('syntax',\n 'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n },\n\n peekToken: function() {\n if (this.tokens.length === 0)\n throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n return this.tokens[0];\n },\n\n peek: function(e1, e2, e3, e4) {\n if (this.tokens.length > 0) {\n var token = this.tokens[0];\n var t = token.text;\n if (t === e1 || t === e2 || t === e3 || t === e4 ||\n (!e1 && !e2 && !e3 && !e4)) {\n return token;\n }\n }\n return false;\n },\n\n expect: function(e1, e2, e3, e4){\n var token = this.peek(e1, e2, e3, e4);\n if (token) {\n this.tokens.shift();\n return token;\n }\n return false;\n },\n\n consume: function(e1){\n if (!this.expect(e1)) {\n this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n }\n },\n\n unaryFn: function(fn, right) {\n return extend(function $parseUnaryFn(self, locals) {\n return fn(self, locals, right);\n }, {\n constant:right.constant,\n inputs: [right]\n });\n },\n\n binaryFn: function(left, fn, right, isBranching) {\n return extend(function $parseBinaryFn(self, locals) {\n return fn(self, locals, left, right);\n }, {\n constant: left.constant && right.constant,\n inputs: !isBranching && [left, right]\n });\n },\n\n statements: function() {\n var statements = [];\n while (true) {\n if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n statements.push(this.filterChain());\n if (!this.expect(';')) {\n // optimize for the common case where there is only one statement.\n // TODO(size): maybe we should not support multiple statements?\n return (statements.length === 1)\n ? statements[0]\n : function $parseStatements(self, locals) {\n var value;\n for (var i = 0, ii = statements.length; i < ii; i++) {\n value = statements[i](self, locals);\n }\n return value;\n };\n }\n }\n },\n\n filterChain: function() {\n var left = this.expression();\n var token;\n while ((token = this.expect('|'))) {\n left = this.filter(left);\n }\n return left;\n },\n\n filter: function(inputFn) {\n var token = this.expect();\n var fn = this.$filter(token.text);\n var argsFn;\n var args;\n\n if (this.peek(':')) {\n argsFn = [];\n args = []; // we can safely reuse the array\n while (this.expect(':')) {\n argsFn.push(this.expression());\n }\n }\n\n var inputs = [inputFn].concat(argsFn || []);\n\n return extend(function $parseFilter(self, locals) {\n var input = inputFn(self, locals);\n if (args) {\n args[0] = input;\n\n var i = argsFn.length;\n while (i--) {\n args[i + 1] = argsFn[i](self, locals);\n }\n\n return fn.apply(undefined, args);\n }\n\n return fn(input);\n }, {\n constant: !fn.$stateful && inputs.every(isConstant),\n inputs: !fn.$stateful && inputs\n });\n },\n\n expression: function() {\n return this.assignment();\n },\n\n assignment: function() {\n var left = this.ternary();\n var right;\n var token;\n if ((token = this.expect('='))) {\n if (!left.assign) {\n this.throwError('implies assignment but [' +\n this.text.substring(0, token.index) + '] can not be assigned to', token);\n }\n right = this.ternary();\n return extend(function $parseAssignment(scope, locals) {\n return left.assign(scope, right(scope, locals), locals);\n }, {\n inputs: [left, right]\n });\n }\n return left;\n },\n\n ternary: function() {\n var left = this.logicalOR();\n var middle;\n var token;\n if ((token = this.expect('?'))) {\n middle = this.assignment();\n if ((token = this.expect(':'))) {\n var right = this.assignment();\n\n return extend(function $parseTernary(self, locals){\n return left(self, locals) ? middle(self, locals) : right(self, locals);\n }, {\n constant: left.constant && middle.constant && right.constant\n });\n\n } else {\n this.throwError('expected :', token);\n }\n }\n\n return left;\n },\n\n logicalOR: function() {\n var left = this.logicalAND();\n var token;\n while ((token = this.expect('||'))) {\n left = this.binaryFn(left, token.fn, this.logicalAND(), true);\n }\n return left;\n },\n\n logicalAND: function() {\n var left = this.equality();\n var token;\n if ((token = this.expect('&&'))) {\n left = this.binaryFn(left, token.fn, this.logicalAND(), true);\n }\n return left;\n },\n\n equality: function() {\n var left = this.relational();\n var token;\n if ((token = this.expect('==','!=','===','!=='))) {\n left = this.binaryFn(left, token.fn, this.equality());\n }\n return left;\n },\n\n relational: function() {\n var left = this.additive();\n var token;\n if ((token = this.expect('<', '>', '<=', '>='))) {\n left = this.binaryFn(left, token.fn, this.relational());\n }\n return left;\n },\n\n additive: function() {\n var left = this.multiplicative();\n var token;\n while ((token = this.expect('+','-'))) {\n left = this.binaryFn(left, token.fn, this.multiplicative());\n }\n return left;\n },\n\n multiplicative: function() {\n var left = this.unary();\n var token;\n while ((token = this.expect('*','/','%'))) {\n left = this.binaryFn(left, token.fn, this.unary());\n }\n return left;\n },\n\n unary: function() {\n var token;\n if (this.expect('+')) {\n return this.primary();\n } else if ((token = this.expect('-'))) {\n return this.binaryFn(Parser.ZERO, token.fn, this.unary());\n } else if ((token = this.expect('!'))) {\n return this.unaryFn(token.fn, this.unary());\n } else {\n return this.primary();\n }\n },\n\n fieldAccess: function(object) {\n var expression = this.text;\n var field = this.expect().text;\n var getter = getterFn(field, this.options, expression);\n\n return extend(function $parseFieldAccess(scope, locals, self) {\n return getter(self || object(scope, locals));\n }, {\n assign: function(scope, value, locals) {\n var o = object(scope, locals);\n if (!o) object.assign(scope, o = {});\n return setter(o, field, value, expression);\n }\n });\n },\n\n objectIndex: function(obj) {\n var expression = this.text;\n\n var indexFn = this.expression();\n this.consume(']');\n\n return extend(function $parseObjectIndex(self, locals) {\n var o = obj(self, locals),\n i = indexFn(self, locals),\n v;\n\n ensureSafeMemberName(i, expression);\n if (!o) return undefined;\n v = ensureSafeObject(o[i], expression);\n return v;\n }, {\n assign: function(self, value, locals) {\n var key = ensureSafeMemberName(indexFn(self, locals), expression);\n // prevent overwriting of Function.constructor which would break ensureSafeObject check\n var o = ensureSafeObject(obj(self, locals), expression);\n if (!o) obj.assign(self, o = {});\n return o[key] = value;\n }\n });\n },\n\n functionCall: function(fnGetter, contextGetter) {\n var argsFn = [];\n if (this.peekToken().text !== ')') {\n do {\n argsFn.push(this.expression());\n } while (this.expect(','));\n }\n this.consume(')');\n\n var expressionText = this.text;\n // we can safely reuse the array across invocations\n var args = argsFn.length ? [] : null;\n\n return function $parseFunctionCall(scope, locals) {\n var context = contextGetter ? contextGetter(scope, locals) : scope;\n var fn = fnGetter(scope, locals, context) || noop;\n\n if (args) {\n var i = argsFn.length;\n while (i--) {\n args[i] = ensureSafeObject(argsFn[i](scope, locals), expressionText);\n }\n }\n\n ensureSafeObject(context, expressionText);\n ensureSafeFunction(fn, expressionText);\n\n // IE stupidity! (IE doesn't have apply for some native functions)\n var v = fn.apply\n ? fn.apply(context, args)\n : fn(args[0], args[1], args[2], args[3], args[4]);\n\n return ensureSafeObject(v, expressionText);\n };\n },\n\n // This is used with json array declaration\n arrayDeclaration: function () {\n var elementFns = [];\n if (this.peekToken().text !== ']') {\n do {\n if (this.peek(']')) {\n // Support trailing commas per ES5.1.\n break;\n }\n var elementFn = this.expression();\n elementFns.push(elementFn);\n } while (this.expect(','));\n }\n this.consume(']');\n\n return extend(function $parseArrayLiteral(self, locals) {\n var array = [];\n for (var i = 0, ii = elementFns.length; i < ii; i++) {\n array.push(elementFns[i](self, locals));\n }\n return array;\n }, {\n literal: true,\n constant: elementFns.every(isConstant),\n inputs: elementFns\n });\n },\n\n object: function () {\n var keys = [], valueFns = [];\n if (this.peekToken().text !== '}') {\n do {\n if (this.peek('}')) {\n // Support trailing commas per ES5.1.\n break;\n }\n var token = this.expect();\n keys.push(token.string || token.text);\n this.consume(':');\n var value = this.expression();\n valueFns.push(value);\n } while (this.expect(','));\n }\n this.consume('}');\n\n return extend(function $parseObjectLiteral(self, locals) {\n var object = {};\n for (var i = 0, ii = valueFns.length; i < ii; i++) {\n object[keys[i]] = valueFns[i](self, locals);\n }\n return object;\n }, {\n literal: true,\n constant: valueFns.every(isConstant),\n inputs: valueFns\n });\n }\n};\n\n\n//////////////////////////////////////////////////\n// Parser helper functions\n//////////////////////////////////////////////////\n\nfunction setter(obj, path, setValue, fullExp) {\n ensureSafeObject(obj, fullExp);\n\n var element = path.split('.'), key;\n for (var i = 0; element.length > 1; i++) {\n key = ensureSafeMemberName(element.shift(), fullExp);\n var propertyObj = ensureSafeObject(obj[key], fullExp);\n if (!propertyObj) {\n propertyObj = {};\n obj[key] = propertyObj;\n }\n obj = propertyObj;\n }\n key = ensureSafeMemberName(element.shift(), fullExp);\n ensureSafeObject(obj[key], fullExp);\n obj[key] = setValue;\n return setValue;\n}\n\nvar getterFnCache = createMap();\n\n/**\n * Implementation of the \"Black Hole\" variant from:\n * - http://jsperf.com/angularjs-parse-getter/4\n * - http://jsperf.com/path-evaluation-simplified/7\n */\nfunction cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp) {\n ensureSafeMemberName(key0, fullExp);\n ensureSafeMemberName(key1, fullExp);\n ensureSafeMemberName(key2, fullExp);\n ensureSafeMemberName(key3, fullExp);\n ensureSafeMemberName(key4, fullExp);\n\n return function cspSafeGetter(scope, locals) {\n var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope;\n\n if (pathVal == null) return pathVal;\n pathVal = pathVal[key0];\n\n if (!key1) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key1];\n\n if (!key2) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key2];\n\n if (!key3) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key3];\n\n if (!key4) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key4];\n\n return pathVal;\n };\n}\n\nfunction getterFn(path, options, fullExp) {\n var fn = getterFnCache[path];\n\n if (fn) return fn;\n\n var pathKeys = path.split('.'),\n pathKeysLength = pathKeys.length;\n\n // http://jsperf.com/angularjs-parse-getter/6\n if (options.csp) {\n if (pathKeysLength < 6) {\n fn = cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4], fullExp);\n } else {\n fn = function cspSafeGetter(scope, locals) {\n var i = 0, val;\n do {\n val = cspSafeGetterFn(pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++],\n pathKeys[i++], fullExp)(scope, locals);\n\n locals = undefined; // clear after first iteration\n scope = val;\n } while (i < pathKeysLength);\n return val;\n };\n }\n } else {\n var code = '';\n forEach(pathKeys, function(key, index) {\n ensureSafeMemberName(key, fullExp);\n code += 'if(s == null) return undefined;\\n' +\n 's='+ (index\n // we simply dereference 's' on any .dot notation\n ? 's'\n // but if we are first then we check locals first, and if so read it first\n : '((l&&l.hasOwnProperty(\"' + key + '\"))?l:s)') + '.' + key + ';\\n';\n });\n code += 'return s;';\n\n /* jshint -W054 */\n var evaledFnGetter = new Function('s', 'l', code); // s=scope, l=locals\n /* jshint +W054 */\n evaledFnGetter.toString = valueFn(code);\n\n fn = evaledFnGetter;\n }\n\n fn.sharedGetter = true;\n fn.assign = function(self, value) {\n return setter(self, path, value, path);\n };\n getterFnCache[path] = fn;\n return fn;\n}\n\n///////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $parse\n * @kind function\n *\n * @description\n *\n * Converts Angular {@link guide/expression expression} into a function.\n *\n * ```js\n * var getter = $parse('user.name');\n * var setter = getter.assign;\n * var context = {user:{name:'angular'}};\n * var locals = {user:{name:'local'}};\n *\n * expect(getter(context)).toEqual('angular');\n * setter(context, 'newValue');\n * expect(context.user.name).toEqual('newValue');\n * expect(getter(context, locals)).toEqual('local');\n * ```\n *\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n *\n * The returned function also has the following properties:\n * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript\n * literal.\n * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript\n * constant literals.\n * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be\n * set to a function to change its value on the given context.\n *\n */\n\n\n/**\n * @ngdoc provider\n * @name $parseProvider\n *\n * @description\n * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n * service.\n */\nfunction $ParseProvider() {\n var cache = createMap();\n\n var $parseOptions = {\n csp: false\n };\n\n\n this.$get = ['$filter', '$sniffer', function($filter, $sniffer) {\n $parseOptions.csp = $sniffer.csp;\n\n function wrapSharedExpression(exp) {\n var wrapped = exp;\n\n if (exp.sharedGetter) {\n wrapped = function $parseWrapper(self, locals) {\n return exp(self, locals);\n };\n wrapped.literal = exp.literal;\n wrapped.constant = exp.constant;\n wrapped.assign = exp.assign;\n }\n\n return wrapped;\n }\n\n return function $parse(exp, interceptorFn) {\n var parsedExpression, oneTime, cacheKey;\n\n switch (typeof exp) {\n case 'string':\n cacheKey = exp = exp.trim();\n\n parsedExpression = cache[cacheKey];\n\n if (!parsedExpression) {\n if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {\n oneTime = true;\n exp = exp.substring(2);\n }\n\n var lexer = new Lexer($parseOptions);\n var parser = new Parser(lexer, $filter, $parseOptions);\n parsedExpression = parser.parse(exp);\n\n if (parsedExpression.constant) {\n parsedExpression.$$watchDelegate = constantWatchDelegate;\n } else if (oneTime) {\n //oneTime is not part of the exp passed to the Parser so we may have to\n //wrap the parsedExpression before adding a $$watchDelegate\n parsedExpression = wrapSharedExpression(parsedExpression);\n parsedExpression.$$watchDelegate = parsedExpression.literal ?\n oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;\n } else if (parsedExpression.inputs) {\n parsedExpression.$$watchDelegate = inputsWatchDelegate;\n }\n\n cache[cacheKey] = parsedExpression;\n }\n return addInterceptor(parsedExpression, interceptorFn);\n\n case 'function':\n return addInterceptor(exp, interceptorFn);\n\n default:\n return addInterceptor(noop, interceptorFn);\n }\n };\n\n function collectExpressionInputs(inputs, list) {\n for (var i = 0, ii = inputs.length; i < ii; i++) {\n var input = inputs[i];\n if (!input.constant) {\n if (input.inputs) {\n collectExpressionInputs(input.inputs, list);\n } else if (list.indexOf(input) === -1) { // TODO(perf) can we do better?\n list.push(input);\n }\n }\n }\n\n return list;\n }\n\n function expressionInputDirtyCheck(newValue, oldValueOfValue) {\n\n if (newValue == null || oldValueOfValue == null) { // null/undefined\n return newValue === oldValueOfValue;\n }\n\n if (typeof newValue === 'object') {\n\n // attempt to convert the value to a primitive type\n // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can\n // be cheaply dirty-checked\n newValue = newValue.valueOf();\n\n if (typeof newValue === 'object') {\n // objects/arrays are not supported - deep-watching them would be too expensive\n return false;\n }\n\n // fall-through to the primitive equality check\n }\n\n //Primitive or NaN\n return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);\n }\n\n function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var inputExpressions = parsedExpression.$$inputs ||\n (parsedExpression.$$inputs = collectExpressionInputs(parsedExpression.inputs, []));\n\n var lastResult;\n\n if (inputExpressions.length === 1) {\n var oldInputValue = expressionInputDirtyCheck; // init to something unique so that equals check fails\n inputExpressions = inputExpressions[0];\n return scope.$watch(function expressionInputWatch(scope) {\n var newInputValue = inputExpressions(scope);\n if (!expressionInputDirtyCheck(newInputValue, oldInputValue)) {\n lastResult = parsedExpression(scope);\n oldInputValue = newInputValue && newInputValue.valueOf();\n }\n return lastResult;\n }, listener, objectEquality);\n }\n\n var oldInputValueOfValues = [];\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails\n }\n\n return scope.$watch(function expressionInputsWatch(scope) {\n var changed = false;\n\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n var newInputValue = inputExpressions[i](scope);\n if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) {\n oldInputValueOfValues[i] = newInputValue && newInputValue.valueOf();\n }\n }\n\n if (changed) {\n lastResult = parsedExpression(scope);\n }\n\n return lastResult;\n }, listener, objectEquality);\n }\n\n function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch, lastValue;\n return unwatch = scope.$watch(function oneTimeWatch(scope) {\n return parsedExpression(scope);\n }, function oneTimeListener(value, old, scope) {\n lastValue = value;\n if (isFunction(listener)) {\n listener.apply(this, arguments);\n }\n if (isDefined(value)) {\n scope.$$postDigest(function () {\n if (isDefined(lastValue)) {\n unwatch();\n }\n });\n }\n }, objectEquality);\n }\n\n function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch;\n return unwatch = scope.$watch(function oneTimeWatch(scope) {\n return parsedExpression(scope);\n }, function oneTimeListener(value, old, scope) {\n if (isFunction(listener)) {\n listener.call(this, value, old, scope);\n }\n if (isAllDefined(value)) {\n scope.$$postDigest(function () {\n if(isAllDefined(value)) unwatch();\n });\n }\n }, objectEquality);\n\n function isAllDefined(value) {\n var allDefined = true;\n forEach(value, function (val) {\n if (!isDefined(val)) allDefined = false;\n });\n return allDefined;\n }\n }\n\n function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch;\n return unwatch = scope.$watch(function constantWatch(scope) {\n return parsedExpression(scope);\n }, function constantListener(value, old, scope) {\n if (isFunction(listener)) {\n listener.apply(this, arguments);\n }\n unwatch();\n }, objectEquality);\n }\n\n function addInterceptor(parsedExpression, interceptorFn) {\n if (!interceptorFn) return parsedExpression;\n\n var fn = function interceptedExpression(scope, locals) {\n var value = parsedExpression(scope, locals);\n var result = interceptorFn(value, scope, locals);\n // we only return the interceptor's result if the\n // initial value is defined (for bind-once)\n return isDefined(value) ? result : value;\n };\n\n // Propagate $$watchDelegates other then inputsWatchDelegate\n if (parsedExpression.$$watchDelegate &&\n parsedExpression.$$watchDelegate !== inputsWatchDelegate) {\n fn.$$watchDelegate = parsedExpression.$$watchDelegate;\n } else if (!interceptorFn.$stateful) {\n // If there is an interceptor, but no watchDelegate then treat the interceptor like\n // we treat filters - it is assumed to be a pure function unless flagged with $stateful\n fn.$$watchDelegate = inputsWatchDelegate;\n fn.inputs = [parsedExpression];\n }\n\n return fn;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $q\n * @requires $rootScope\n *\n * @description\n * A promise/deferred implementation inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).\n *\n * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred\n * implementations, and the other which resembles ES6 promises to some degree.\n *\n * # $q constructor\n *\n * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`\n * function as the first argument. This is similar to the native Promise implementation from ES6 Harmony,\n * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n *\n * While the constructor-style use is supported, not all of the supporting methods from ES6 Harmony promises are\n * available yet.\n *\n * It can be used like so:\n *\n * ```js\n * return $q(function(resolve, reject) {\n * // perform some asynchronous operation, resolve or reject the promise when appropriate.\n * setInterval(function() {\n * if (pollStatus > 0) {\n * resolve(polledValue);\n * } else if (pollStatus < 0) {\n * reject(polledValue);\n * } else {\n * pollStatus = pollAgain(function(value) {\n * polledValue = value;\n * });\n * }\n * }, 10000);\n * }).\n * then(function(value) {\n * // handle success\n * }, function(reason) {\n * // handle failure\n * });\n * ```\n *\n * Note: progress/notify callbacks are not currently supported via the ES6-style interface.\n *\n * However, the more traditional CommonJS-style usage is still available, and documented below.\n *\n * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n * interface for interacting with an object that represents the result of an action that is\n * performed asynchronously, and may or may not be finished at any given point in time.\n *\n * From the perspective of dealing with error handling, deferred and promise APIs are to\n * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n *\n * ```js\n * // for the purpose of this example let's assume that variables `$q`, `scope` and `okToGreet`\n * // are available in the current lexical scope (they could have been injected or passed in).\n *\n * function asyncGreet(name) {\n * var deferred = $q.defer();\n *\n * setTimeout(function() {\n * deferred.notify('About to greet ' + name + '.');\n *\n * if (okToGreet(name)) {\n * deferred.resolve('Hello, ' + name + '!');\n * } else {\n * deferred.reject('Greeting ' + name + ' is not allowed.');\n * }\n * }, 1000);\n *\n * return deferred.promise;\n * }\n *\n * var promise = asyncGreet('Robin Hood');\n * promise.then(function(greeting) {\n * alert('Success: ' + greeting);\n * }, function(reason) {\n * alert('Failed: ' + reason);\n * }, function(update) {\n * alert('Got notification: ' + update);\n * });\n * ```\n *\n * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n * comes in the way of guarantees that promise and deferred APIs make, see\n * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n *\n * Additionally the promise api allows for composition that is very hard to do with the\n * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n * section on serial or parallel joining of promises.\n *\n * # The Deferred API\n *\n * A new instance of deferred is constructed by calling `$q.defer()`.\n *\n * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n * that can be used for signaling the successful or unsuccessful completion, as well as the status\n * of the task.\n *\n * **Methods**\n *\n * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection\n * constructed via `$q.reject`, the promise will be rejected instead.\n * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to\n * resolving it with a rejection constructed via `$q.reject`.\n * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n * multiple times before the promise is either resolved or rejected.\n *\n * **Properties**\n *\n * - promise – `{Promise}` – promise object associated with this deferred.\n *\n *\n * # The Promise API\n *\n * A new promise instance is created when a deferred instance is created and can be retrieved by\n * calling `deferred.promise`.\n *\n * The purpose of the promise object is to allow for interested parties to get access to the result\n * of the deferred task when it completes.\n *\n * **Methods**\n *\n * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or\n * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n * as soon as the result is available. The callbacks are called with a single argument: the result\n * or rejection reason. Additionally, the notify callback may be called zero or more times to\n * provide a progress indication, before the promise is resolved or rejected.\n *\n * This method *returns a new promise* which is resolved or rejected via the return value of the\n * `successCallback`, `errorCallback`. It also notifies via the return value of the\n * `notifyCallback` method. The promise cannot be resolved or rejected from the notifyCallback\n * method.\n *\n * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`\n *\n * - `finally(callback)` – allows you to observe either the fulfillment or rejection of a promise,\n * but to do so without modifying the final value. This is useful to release resources or do some\n * clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n * more information.\n *\n * Because `finally` is a reserved word in JavaScript and reserved keywords are not supported as\n * property names by ES3, you'll need to invoke the method like `promise['finally'](callback)` to\n * make your code IE8 and Android 2.x compatible.\n *\n * # Chaining promises\n *\n * Because calling the `then` method of a promise returns a new derived promise, it is easily\n * possible to create a chain of promises:\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * return result + 1;\n * });\n *\n * // promiseB will be resolved immediately after promiseA is resolved and its value\n * // will be the result of promiseA incremented by 1\n * ```\n *\n * It is possible to create chains of any length and since a promise can be resolved with another\n * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n * $http's response interceptors.\n *\n *\n * # Differences between Kris Kowal's Q and $q\n *\n * There are two main differences:\n *\n * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n * mechanism in angular, which means faster propagation of resolution or rejection into your\n * models and avoiding unnecessary browser repaints, which would result in flickering UI.\n * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n * all the important functionality needed for common async tasks.\n *\n * # Testing\n *\n * ```js\n * it('should simulate promise', inject(function($q, $rootScope) {\n * var deferred = $q.defer();\n * var promise = deferred.promise;\n * var resolvedValue;\n *\n * promise.then(function(value) { resolvedValue = value; });\n * expect(resolvedValue).toBeUndefined();\n *\n * // Simulate resolving of promise\n * deferred.resolve(123);\n * // Note that the 'then' function does not get called synchronously.\n * // This is because we want the promise API to always be async, whether or not\n * // it got called synchronously or asynchronously.\n * expect(resolvedValue).toBeUndefined();\n *\n * // Propagate promise resolution to 'then' functions using $apply().\n * $rootScope.$apply();\n * expect(resolvedValue).toEqual(123);\n * }));\n * ```\n *\n * @param {function(function, function)} resolver Function which is responsible for resolving or\n * rejecting the newly created promise. The first parameter is a function which resolves the\n * promise, the second parameter is a function which rejects the promise.\n *\n * @returns {Promise} The newly created promise.\n */\nfunction $QProvider() {\n\n this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n return qFactory(function(callback) {\n $rootScope.$evalAsync(callback);\n }, $exceptionHandler);\n }];\n}\n\nfunction $$QProvider() {\n this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {\n return qFactory(function(callback) {\n $browser.defer(callback);\n }, $exceptionHandler);\n }];\n}\n\n/**\n * Constructs a promise manager.\n *\n * @param {function(function)} nextTick Function for executing functions in the next turn.\n * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n * debugging purposes.\n * @returns {object} Promise manager.\n */\nfunction qFactory(nextTick, exceptionHandler) {\n var $qMinErr = minErr('$q', TypeError);\n function callOnce(self, resolveFn, rejectFn) {\n var called = false;\n function wrap(fn) {\n return function(value) {\n if (called) return;\n called = true;\n fn.call(self, value);\n };\n }\n\n return [wrap(resolveFn), wrap(rejectFn)];\n }\n\n /**\n * @ngdoc method\n * @name ng.$q#defer\n * @kind function\n *\n * @description\n * Creates a `Deferred` object which represents a task which will finish in the future.\n *\n * @returns {Deferred} Returns a new instance of deferred.\n */\n var defer = function() {\n return new Deferred();\n };\n\n function Promise() {\n this.$$state = { status: 0 };\n }\n\n Promise.prototype = {\n then: function(onFulfilled, onRejected, progressBack) {\n var result = new Deferred();\n\n this.$$state.pending = this.$$state.pending || [];\n this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);\n if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);\n\n return result.promise;\n },\n\n \"catch\": function(callback) {\n return this.then(null, callback);\n },\n\n \"finally\": function(callback, progressBack) {\n return this.then(function(value) {\n return handleCallback(value, true, callback);\n }, function(error) {\n return handleCallback(error, false, callback);\n }, progressBack);\n }\n };\n\n //Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native\n function simpleBind(context, fn) {\n return function(value) {\n fn.call(context, value);\n };\n }\n\n function processQueue(state) {\n var fn, promise, pending;\n\n pending = state.pending;\n state.processScheduled = false;\n state.pending = undefined;\n for (var i = 0, ii = pending.length; i < ii; ++i) {\n promise = pending[i][0];\n fn = pending[i][state.status];\n try {\n if (isFunction(fn)) {\n promise.resolve(fn(state.value));\n } else if (state.status === 1) {\n promise.resolve(state.value);\n } else {\n promise.reject(state.value);\n }\n } catch(e) {\n promise.reject(e);\n exceptionHandler(e);\n }\n }\n }\n\n function scheduleProcessQueue(state) {\n if (state.processScheduled || !state.pending) return;\n state.processScheduled = true;\n nextTick(function() { processQueue(state); });\n }\n\n function Deferred() {\n this.promise = new Promise();\n //Necessary to support unbound execution :/\n this.resolve = simpleBind(this, this.resolve);\n this.reject = simpleBind(this, this.reject);\n this.notify = simpleBind(this, this.notify);\n }\n\n Deferred.prototype = {\n resolve: function(val) {\n if (this.promise.$$state.status) return;\n if (val === this.promise) {\n this.$$reject($qMinErr(\n 'qcycle',\n \"Expected promise to be resolved with value other than itself '{0}'\",\n val));\n }\n else {\n this.$$resolve(val);\n }\n\n },\n\n $$resolve: function(val) {\n var then, fns;\n\n fns = callOnce(this, this.$$resolve, this.$$reject);\n try {\n if ((isObject(val) || isFunction(val))) then = val && val.then;\n if (isFunction(then)) {\n this.promise.$$state.status = -1;\n then.call(val, fns[0], fns[1], this.notify);\n } else {\n this.promise.$$state.value = val;\n this.promise.$$state.status = 1;\n scheduleProcessQueue(this.promise.$$state);\n }\n } catch(e) {\n fns[1](e);\n exceptionHandler(e);\n }\n },\n\n reject: function(reason) {\n if (this.promise.$$state.status) return;\n this.$$reject(reason);\n },\n\n $$reject: function(reason) {\n this.promise.$$state.value = reason;\n this.promise.$$state.status = 2;\n scheduleProcessQueue(this.promise.$$state);\n },\n\n notify: function(progress) {\n var callbacks = this.promise.$$state.pending;\n\n if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) {\n nextTick(function() {\n var callback, result;\n for (var i = 0, ii = callbacks.length; i < ii; i++) {\n result = callbacks[i][0];\n callback = callbacks[i][3];\n try {\n result.notify(isFunction(callback) ? callback(progress) : progress);\n } catch(e) {\n exceptionHandler(e);\n }\n }\n });\n }\n }\n };\n\n /**\n * @ngdoc method\n * @name $q#reject\n * @kind function\n *\n * @description\n * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n * a promise chain, you don't need to worry about it.\n *\n * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n * a promise error callback and you want to forward the error to the promise derived from the\n * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n * `reject`.\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * // success: do something and resolve promiseB\n * // with the old or a new result\n * return result;\n * }, function(reason) {\n * // error: handle the error if possible and\n * // resolve promiseB with newPromiseOrValue,\n * // otherwise forward the rejection to promiseB\n * if (canHandle(reason)) {\n * // handle the error and recover\n * return newPromiseOrValue;\n * }\n * return $q.reject(reason);\n * });\n * ```\n *\n * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n */\n var reject = function(reason) {\n var result = new Deferred();\n result.reject(reason);\n return result.promise;\n };\n\n var makePromise = function makePromise(value, resolved) {\n var result = new Deferred();\n if (resolved) {\n result.resolve(value);\n } else {\n result.reject(value);\n }\n return result.promise;\n };\n\n var handleCallback = function handleCallback(value, isResolved, callback) {\n var callbackOutput = null;\n try {\n if (isFunction(callback)) callbackOutput = callback();\n } catch(e) {\n return makePromise(e, false);\n }\n if (isPromiseLike(callbackOutput)) {\n return callbackOutput.then(function() {\n return makePromise(value, isResolved);\n }, function(error) {\n return makePromise(error, false);\n });\n } else {\n return makePromise(value, isResolved);\n }\n };\n\n /**\n * @ngdoc method\n * @name $q#when\n * @kind function\n *\n * @description\n * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n * This is useful when you are dealing with an object that might or might not be a promise, or if\n * the promise comes from a source that can't be trusted.\n *\n * @param {*} value Value or a promise\n * @returns {Promise} Returns a promise of the passed value or promise\n */\n\n\n var when = function(value, callback, errback, progressBack) {\n var result = new Deferred();\n result.resolve(value);\n return result.promise.then(callback, errback, progressBack);\n };\n\n /**\n * @ngdoc method\n * @name $q#all\n * @kind function\n *\n * @description\n * Combines multiple promises into a single promise that is resolved when all of the input\n * promises are resolved.\n *\n * @param {Array.|Object.} promises An array or hash of promises.\n * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n * each value corresponding to the promise at the same index/key in the `promises` array/hash.\n * If any of the promises is resolved with a rejection, this resulting promise will be rejected\n * with the same rejection value.\n */\n\n function all(promises) {\n var deferred = new Deferred(),\n counter = 0,\n results = isArray(promises) ? [] : {};\n\n forEach(promises, function(promise, key) {\n counter++;\n when(promise).then(function(value) {\n if (results.hasOwnProperty(key)) return;\n results[key] = value;\n if (!(--counter)) deferred.resolve(results);\n }, function(reason) {\n if (results.hasOwnProperty(key)) return;\n deferred.reject(reason);\n });\n });\n\n if (counter === 0) {\n deferred.resolve(results);\n }\n\n return deferred.promise;\n }\n\n var $Q = function Q(resolver) {\n if (!isFunction(resolver)) {\n throw $qMinErr('norslvr', \"Expected resolverFn, got '{0}'\", resolver);\n }\n\n if (!(this instanceof Q)) {\n // More useful when $Q is the Promise itself.\n return new Q(resolver);\n }\n\n var deferred = new Deferred();\n\n function resolveFn(value) {\n deferred.resolve(value);\n }\n\n function rejectFn(reason) {\n deferred.reject(reason);\n }\n\n resolver(resolveFn, rejectFn);\n\n return deferred.promise;\n };\n\n $Q.defer = defer;\n $Q.reject = reject;\n $Q.when = when;\n $Q.all = all;\n\n return $Q;\n}\n\nfunction $$RAFProvider(){ //rAF\n this.$get = ['$window', '$timeout', function($window, $timeout) {\n var requestAnimationFrame = $window.requestAnimationFrame ||\n $window.webkitRequestAnimationFrame ||\n $window.mozRequestAnimationFrame;\n\n var cancelAnimationFrame = $window.cancelAnimationFrame ||\n $window.webkitCancelAnimationFrame ||\n $window.mozCancelAnimationFrame ||\n $window.webkitCancelRequestAnimationFrame;\n\n var rafSupported = !!requestAnimationFrame;\n var raf = rafSupported\n ? function(fn) {\n var id = requestAnimationFrame(fn);\n return function() {\n cancelAnimationFrame(id);\n };\n }\n : function(fn) {\n var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666\n return function() {\n $timeout.cancel(timer);\n };\n };\n\n raf.supported = rafSupported;\n\n return raf;\n }];\n}\n\n/**\n * DESIGN NOTES\n *\n * The design decisions behind the scope are heavily favored for speed and memory consumption.\n *\n * The typical use of scope is to watch the expressions, which most of the time return the same\n * value as last time so we optimize the operation.\n *\n * Closures construction is expensive in terms of speed as well as memory:\n * - No closures, instead use prototypical inheritance for API\n * - Internal state needs to be stored on scope directly, which means that private state is\n * exposed as $$____ properties\n *\n * Loop operations are optimized by using while(count--) { ... }\n * - this means that in order to keep the same order of execution as addition we have to add\n * items to the array at the beginning (unshift) instead of at the end (push)\n *\n * Child scopes are created and removed often\n * - Using an array would be slow since inserts in middle are expensive so we use linked list\n *\n * There are few watches then a lot of observers. This is why you don't want the observer to be\n * implemented in the same way as watch. Watch requires return of initialization function which\n * are expensive to construct.\n */\n\n\n/**\n * @ngdoc provider\n * @name $rootScopeProvider\n * @description\n *\n * Provider for the $rootScope service.\n */\n\n/**\n * @ngdoc method\n * @name $rootScopeProvider#digestTtl\n * @description\n *\n * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that the dependencies between `$watch`s will result in\n * several digest iterations. However if an application needs more than the default 10 digest\n * iterations for its model to stabilize then you should investigate what is causing the model to\n * continuously change during the digest.\n *\n * Increasing the TTL could have performance implications, so you should not change it without\n * proper justification.\n *\n * @param {number} limit The number of digest iterations.\n */\n\n\n/**\n * @ngdoc service\n * @name $rootScope\n * @description\n *\n * Every application has a single root {@link ng.$rootScope.Scope scope}.\n * All other scopes are descendant scopes of the root scope. Scopes provide separation\n * between the model and the view, via a mechanism for watching the model for changes.\n * They also provide an event emission/broadcast and subscription facility. See the\n * {@link guide/scope developer guide on scopes}.\n */\nfunction $RootScopeProvider(){\n var TTL = 10;\n var $rootScopeMinErr = minErr('$rootScope');\n var lastDirtyWatch = null;\n var applyAsyncId = null;\n\n this.digestTtl = function(value) {\n if (arguments.length) {\n TTL = value;\n }\n return TTL;\n };\n\n this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',\n function( $injector, $exceptionHandler, $parse, $browser) {\n\n /**\n * @ngdoc type\n * @name $rootScope.Scope\n *\n * @description\n * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n * {@link auto.$injector $injector}. Child scopes are created using the\n * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when\n * compiled HTML template is executed.)\n *\n * Here is a simple scope snippet to show how you can interact with the scope.\n * ```html\n * \n * ```\n *\n * # Inheritance\n * A scope can inherit from a parent scope, as in this example:\n * ```js\n var parent = $rootScope;\n var child = parent.$new();\n\n parent.salutation = \"Hello\";\n child.name = \"World\";\n expect(child.salutation).toEqual('Hello');\n\n child.salutation = \"Welcome\";\n expect(child.salutation).toEqual('Welcome');\n expect(parent.salutation).toEqual('Hello');\n * ```\n *\n *\n * @param {Object.=} providers Map of service factory which need to be\n * provided for the current scope. Defaults to {@link ng}.\n * @param {Object.=} instanceCache Provides pre-instantiated services which should\n * append/override services provided by `providers`. This is handy\n * when unit-testing and having the need to override a default\n * service.\n * @returns {Object} Newly created scope.\n *\n */\n function Scope() {\n this.$id = nextUid();\n this.$$phase = this.$parent = this.$$watchers =\n this.$$nextSibling = this.$$prevSibling =\n this.$$childHead = this.$$childTail = null;\n this['this'] = this.$root = this;\n this.$$destroyed = false;\n this.$$asyncQueue = [];\n this.$$postDigestQueue = [];\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$$isolateBindings = null;\n this.$$applyAsyncQueue = [];\n }\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$id\n *\n * @description\n * Unique scope ID (monotonically increasing) useful for debugging.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$parent\n *\n * @description\n * Reference to the parent scope.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$root\n *\n * @description\n * Reference to the root scope.\n */\n\n Scope.prototype = {\n constructor: Scope,\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$new\n * @kind function\n *\n * @description\n * Creates a new child {@link ng.$rootScope.Scope scope}.\n *\n * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.\n * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.\n *\n * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is\n * desired for the scope and its child scopes to be permanently detached from the parent and\n * thus stop participating in model change detection and listener notification by invoking.\n *\n * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n * parent scope. The scope is isolated, as it can not see parent scope properties.\n * When creating widgets, it is useful for the widget to not accidentally read parent\n * state.\n *\n * @returns {Object} The newly created child scope.\n *\n */\n $new: function(isolate) {\n var child;\n\n if (isolate) {\n child = new Scope();\n child.$root = this.$root;\n // ensure that there is just one async queue per $rootScope and its children\n child.$$asyncQueue = this.$$asyncQueue;\n child.$$postDigestQueue = this.$$postDigestQueue;\n } else {\n // Only create a child scope class if somebody asks for one,\n // but cache it to allow the VM to optimize lookups.\n if (!this.$$ChildScope) {\n this.$$ChildScope = function ChildScope() {\n this.$$watchers = this.$$nextSibling =\n this.$$childHead = this.$$childTail = null;\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$id = nextUid();\n this.$$ChildScope = null;\n };\n this.$$ChildScope.prototype = this;\n }\n child = new this.$$ChildScope();\n }\n child['this'] = child;\n child.$parent = this;\n child.$$prevSibling = this.$$childTail;\n if (this.$$childHead) {\n this.$$childTail.$$nextSibling = child;\n this.$$childTail = child;\n } else {\n this.$$childHead = this.$$childTail = child;\n }\n return child;\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watch\n * @kind function\n *\n * @description\n * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n *\n * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest\n * $digest()} and should return the value that will be watched. (Since\n * {@link ng.$rootScope.Scope#$digest $digest()} reruns when it detects changes the\n * `watchExpression` can execute multiple times per\n * {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)\n * - The `listener` is called only when the value from the current `watchExpression` and the\n * previous call to `watchExpression` are not equal (with the exception of the initial run,\n * see below). Inequality is determined according to reference inequality,\n * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)\n * via the `!==` Javascript operator, unless `objectEquality == true`\n * (see next point)\n * - When `objectEquality == true`, inequality of the `watchExpression` is determined\n * according to the {@link angular.equals} function. To save the value of the object for\n * later comparison, the {@link angular.copy} function is used. This therefore means that\n * watching complex objects will have adverse memory and performance implications.\n * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n * This is achieved by rerunning the watchers until no changes are detected. The rerun\n * iteration limit is 10 to prevent an infinite loop deadlock.\n *\n *\n * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,\n * you can register a `watchExpression` function with no `listener`. (Since `watchExpression`\n * can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a\n * change is detected, be prepared for multiple calls to your listener.)\n *\n * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the\n * watcher. In rare cases, this is undesirable because the listener is called when the result\n * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n * listener was called due to initialization.\n *\n *\n *\n * # Example\n * ```js\n // let's assume that scope was dependency injected as the $rootScope\n var scope = $rootScope;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n\n\n\n // Using a function as a watchExpression\n var food;\n scope.foodCounter = 0;\n expect(scope.foodCounter).toEqual(0);\n scope.$watch(\n // This function returns the value being watched. It is called for each turn of the $digest loop\n function() { return food; },\n // This is the change listener, called when the value returned from the above function changes\n function(newValue, oldValue) {\n if ( newValue !== oldValue ) {\n // Only increment the counter if the value changed\n scope.foodCounter = scope.foodCounter + 1;\n }\n }\n );\n // No digest has been run so the counter will be zero\n expect(scope.foodCounter).toEqual(0);\n\n // Run the digest but since food has not changed count will still be zero\n scope.$digest();\n expect(scope.foodCounter).toEqual(0);\n\n // Update food and run digest. Now the counter will increment\n food = 'cheeseburger';\n scope.$digest();\n expect(scope.foodCounter).toEqual(1);\n\n * ```\n *\n *\n *\n * @param {(function()|string)} watchExpression Expression that is evaluated on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers\n * a call to the `listener`.\n *\n * - `string`: Evaluated as {@link guide/expression expression}\n * - `function(scope)`: called with current `scope` as a parameter.\n * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value\n * of `watchExpression` changes.\n *\n * - `newVal` contains the current value of the `watchExpression`\n * - `oldVal` contains the previous value of the `watchExpression`\n * - `scope` refers to the current scope\n * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of\n * comparing for reference equality.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $watch: function(watchExp, listener, objectEquality) {\n var get = $parse(watchExp);\n\n if (get.$$watchDelegate) {\n return get.$$watchDelegate(this, listener, objectEquality, get);\n }\n var scope = this,\n array = scope.$$watchers,\n watcher = {\n fn: listener,\n last: initWatchVal,\n get: get,\n exp: watchExp,\n eq: !!objectEquality\n };\n\n lastDirtyWatch = null;\n\n if (!isFunction(listener)) {\n watcher.fn = noop;\n }\n\n if (!array) {\n array = scope.$$watchers = [];\n }\n // we use unshift since we use a while loop in $digest for speed.\n // the while loop reads in reverse order.\n array.unshift(watcher);\n\n return function deregisterWatch() {\n arrayRemove(array, watcher);\n lastDirtyWatch = null;\n };\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchGroup\n * @kind function\n *\n * @description\n * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.\n * If any one expression in the collection changes the `listener` is executed.\n *\n * - The items in the `watchExpressions` array are observed via standard $watch operation and are examined on every\n * call to $digest() to see if any items changes.\n * - The `listener` is called whenever any expression in the `watchExpressions` array changes.\n *\n * @param {Array.} watchExpressions Array of expressions that will be individually\n * watched using {@link ng.$rootScope.Scope#$watch $watch()}\n *\n * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any\n * expression in `watchExpressions` changes\n * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * The `scope` refers to the current scope.\n * @returns {function()} Returns a de-registration function for all listeners.\n */\n $watchGroup: function(watchExpressions, listener) {\n var oldValues = new Array(watchExpressions.length);\n var newValues = new Array(watchExpressions.length);\n var deregisterFns = [];\n var self = this;\n var changeReactionScheduled = false;\n var firstRun = true;\n\n if (!watchExpressions.length) {\n // No expressions means we call the listener ASAP\n var shouldCall = true;\n self.$evalAsync(function () {\n if (shouldCall) listener(newValues, newValues, self);\n });\n return function deregisterWatchGroup() {\n shouldCall = false;\n };\n }\n\n if (watchExpressions.length === 1) {\n // Special case size of one\n return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {\n newValues[0] = value;\n oldValues[0] = oldValue;\n listener(newValues, (value === oldValue) ? newValues : oldValues, scope);\n });\n }\n\n forEach(watchExpressions, function (expr, i) {\n var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) {\n newValues[i] = value;\n oldValues[i] = oldValue;\n if (!changeReactionScheduled) {\n changeReactionScheduled = true;\n self.$evalAsync(watchGroupAction);\n }\n });\n deregisterFns.push(unwatchFn);\n });\n\n function watchGroupAction() {\n changeReactionScheduled = false;\n\n if (firstRun) {\n firstRun = false;\n listener(newValues, newValues, self);\n } else {\n listener(newValues, oldValues, self);\n }\n }\n\n return function deregisterWatchGroup() {\n while (deregisterFns.length) {\n deregisterFns.shift()();\n }\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchCollection\n * @kind function\n *\n * @description\n * Shallow watches the properties of an object and fires whenever any of the properties change\n * (for arrays, this implies watching the array items; for object maps, this implies watching\n * the properties). If a change is detected, the `listener` callback is fired.\n *\n * - The `obj` collection is observed via standard $watch operation and is examined on every\n * call to $digest() to see if any items have been added, removed, or moved.\n * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n * adding, removing, and moving items belonging to an object or array.\n *\n *\n * # Example\n * ```js\n $scope.names = ['igor', 'matias', 'misko', 'james'];\n $scope.dataCount = 4;\n\n $scope.$watchCollection('names', function(newNames, oldNames) {\n $scope.dataCount = newNames.length;\n });\n\n expect($scope.dataCount).toEqual(4);\n $scope.$digest();\n\n //still at 4 ... no changes\n expect($scope.dataCount).toEqual(4);\n\n $scope.names.pop();\n $scope.$digest();\n\n //now there's been a change\n expect($scope.dataCount).toEqual(3);\n * ```\n *\n *\n * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The\n * expression value should evaluate to an object or an array which is observed on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the\n * collection will trigger a call to the `listener`.\n *\n * @param {function(newCollection, oldCollection, scope)} listener a callback function called\n * when a change is detected.\n * - The `newCollection` object is the newly modified data obtained from the `obj` expression\n * - The `oldCollection` object is a copy of the former collection data.\n * Due to performance considerations, the`oldCollection` value is computed only if the\n * `listener` function declares two or more arguments.\n * - The `scope` argument refers to the current scope.\n *\n * @returns {function()} Returns a de-registration function for this listener. When the\n * de-registration function is executed, the internal watch operation is terminated.\n */\n $watchCollection: function(obj, listener) {\n $watchCollectionInterceptor.$stateful = true;\n\n var self = this;\n // the current value, updated on each dirty-check run\n var newValue;\n // a shallow copy of the newValue from the last dirty-check run,\n // updated to match newValue during dirty-check run\n var oldValue;\n // a shallow copy of the newValue from when the last change happened\n var veryOldValue;\n // only track veryOldValue if the listener is asking for it\n var trackVeryOldValue = (listener.length > 1);\n var changeDetected = 0;\n var changeDetector = $parse(obj, $watchCollectionInterceptor);\n var internalArray = [];\n var internalObject = {};\n var initRun = true;\n var oldLength = 0;\n\n function $watchCollectionInterceptor(_value) {\n newValue = _value;\n var newLength, key, bothNaN, newItem, oldItem;\n\n if (!isObject(newValue)) { // if primitive\n if (oldValue !== newValue) {\n oldValue = newValue;\n changeDetected++;\n }\n } else if (isArrayLike(newValue)) {\n if (oldValue !== internalArray) {\n // we are transitioning from something which was not an array into array.\n oldValue = internalArray;\n oldLength = oldValue.length = 0;\n changeDetected++;\n }\n\n newLength = newValue.length;\n\n if (oldLength !== newLength) {\n // if lengths do not match we need to trigger change notification\n changeDetected++;\n oldValue.length = oldLength = newLength;\n }\n // copy the items to oldValue and look for changes.\n for (var i = 0; i < newLength; i++) {\n oldItem = oldValue[i];\n newItem = newValue[i];\n\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[i] = newItem;\n }\n }\n } else {\n if (oldValue !== internalObject) {\n // we are transitioning from something which was not an object into object.\n oldValue = internalObject = {};\n oldLength = 0;\n changeDetected++;\n }\n // copy the items to oldValue and look for changes.\n newLength = 0;\n for (key in newValue) {\n if (newValue.hasOwnProperty(key)) {\n newLength++;\n newItem = newValue[key];\n oldItem = oldValue[key];\n\n if (key in oldValue) {\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[key] = newItem;\n }\n } else {\n oldLength++;\n oldValue[key] = newItem;\n changeDetected++;\n }\n }\n }\n if (oldLength > newLength) {\n // we used to have more keys, need to find them and destroy them.\n changeDetected++;\n for(key in oldValue) {\n if (!newValue.hasOwnProperty(key)) {\n oldLength--;\n delete oldValue[key];\n }\n }\n }\n }\n return changeDetected;\n }\n\n function $watchCollectionAction() {\n if (initRun) {\n initRun = false;\n listener(newValue, newValue, self);\n } else {\n listener(newValue, veryOldValue, self);\n }\n\n // make a copy for the next time a collection is changed\n if (trackVeryOldValue) {\n if (!isObject(newValue)) {\n //primitive\n veryOldValue = newValue;\n } else if (isArrayLike(newValue)) {\n veryOldValue = new Array(newValue.length);\n for (var i = 0; i < newValue.length; i++) {\n veryOldValue[i] = newValue[i];\n }\n } else { // if object\n veryOldValue = {};\n for (var key in newValue) {\n if (hasOwnProperty.call(newValue, key)) {\n veryOldValue[key] = newValue[key];\n }\n }\n }\n }\n }\n\n return this.$watch(changeDetector, $watchCollectionAction);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$digest\n * @kind function\n *\n * @description\n * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and\n * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change\n * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}\n * until no more listeners are firing. This means that it is possible to get into an infinite\n * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n * iterations exceeds 10.\n *\n * Usually, you don't call `$digest()` directly in\n * {@link ng.directive:ngController controllers} or in\n * {@link ng.$compileProvider#directive directives}.\n * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within\n * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.\n *\n * If you want to be notified whenever `$digest()` is called,\n * you can register a `watchExpression` function with\n * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.\n *\n * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n *\n * # Example\n * ```js\n var scope = ...;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n * ```\n *\n */\n $digest: function() {\n var watch, value, last,\n watchers,\n asyncQueue = this.$$asyncQueue,\n postDigestQueue = this.$$postDigestQueue,\n length,\n dirty, ttl = TTL,\n next, current, target = this,\n watchLog = [],\n logIdx, logMsg, asyncTask;\n\n beginPhase('$digest');\n // Check for changes to browser url that happened in sync before the call to $digest\n $browser.$$checkUrlChange();\n\n if (this === $rootScope && applyAsyncId !== null) {\n // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then\n // cancel the scheduled $apply and flush the queue of expressions to be evaluated.\n $browser.defer.cancel(applyAsyncId);\n flushApplyAsync();\n }\n\n lastDirtyWatch = null;\n\n do { // \"while dirty\" loop\n dirty = false;\n current = target;\n\n while(asyncQueue.length) {\n try {\n asyncTask = asyncQueue.shift();\n asyncTask.scope.$eval(asyncTask.expression);\n } catch (e) {\n $exceptionHandler(e);\n }\n lastDirtyWatch = null;\n }\n\n traverseScopesLoop:\n do { // \"traverse the scopes\" loop\n if ((watchers = current.$$watchers)) {\n // process our watches\n length = watchers.length;\n while (length--) {\n try {\n watch = watchers[length];\n // Most common watches are on primitives, in which case we can short\n // circuit it with === operator, only when === fails do we use .equals\n if (watch) {\n if ((value = watch.get(current)) !== (last = watch.last) &&\n !(watch.eq\n ? equals(value, last)\n : (typeof value === 'number' && typeof last === 'number'\n && isNaN(value) && isNaN(last)))) {\n dirty = true;\n lastDirtyWatch = watch;\n watch.last = watch.eq ? copy(value, null) : value;\n watch.fn(value, ((last === initWatchVal) ? value : last), current);\n if (ttl < 5) {\n logIdx = 4 - ttl;\n if (!watchLog[logIdx]) watchLog[logIdx] = [];\n logMsg = (isFunction(watch.exp))\n ? 'fn: ' + (watch.exp.name || watch.exp.toString())\n : watch.exp;\n logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last);\n watchLog[logIdx].push(logMsg);\n }\n } else if (watch === lastDirtyWatch) {\n // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n // have already been tested.\n dirty = false;\n break traverseScopesLoop;\n }\n }\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n }\n\n // Insanity Warning: scope depth-first traversal\n // yes, this code is a bit crazy, but it works and we have tests to prove it!\n // this piece should be kept in sync with the traversal in $broadcast\n if (!(next = (current.$$childHead ||\n (current !== target && current.$$nextSibling)))) {\n while(current !== target && !(next = current.$$nextSibling)) {\n current = current.$parent;\n }\n }\n } while ((current = next));\n\n // `break traverseScopesLoop;` takes us to here\n\n if((dirty || asyncQueue.length) && !(ttl--)) {\n clearPhase();\n throw $rootScopeMinErr('infdig',\n '{0} $digest() iterations reached. Aborting!\\n' +\n 'Watchers fired in the last 5 iterations: {1}',\n TTL, toJson(watchLog));\n }\n\n } while (dirty || asyncQueue.length);\n\n clearPhase();\n\n while(postDigestQueue.length) {\n try {\n postDigestQueue.shift()();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n },\n\n\n /**\n * @ngdoc event\n * @name $rootScope.Scope#$destroy\n * @eventType broadcast on scope being destroyed\n *\n * @description\n * Broadcasted when a scope and its children are being destroyed.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$destroy\n * @kind function\n *\n * @description\n * Removes the current scope (and all of its children) from the parent scope. Removal implies\n * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer\n * propagate to the current scope and its children. Removal also implies that the current\n * scope is eligible for garbage collection.\n *\n * The `$destroy()` is usually used by directives such as\n * {@link ng.directive:ngRepeat ngRepeat} for managing the\n * unrolling of the loop.\n *\n * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n * Application code can register a `$destroy` event handler that will give it a chance to\n * perform any necessary cleanup.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n $destroy: function() {\n // we can't destroy the root scope or a scope that has been already destroyed\n if (this.$$destroyed) return;\n var parent = this.$parent;\n\n this.$broadcast('$destroy');\n this.$$destroyed = true;\n if (this === $rootScope) return;\n\n for (var eventName in this.$$listenerCount) {\n decrementListenerCount(this, this.$$listenerCount[eventName], eventName);\n }\n\n // sever all the references to parent scopes (after this cleanup, the current scope should\n // not be retained by any of our references and should be eligible for garbage collection)\n if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;\n if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;\n if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\n\n // All of the code below is bogus code that works around V8's memory leak via optimized code\n // and inline caches.\n //\n // see:\n // - https://code.google.com/p/v8/issues/detail?id=2073#c26\n // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909\n // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n\n this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =\n this.$$childTail = this.$root = null;\n\n // don't reset these to null in case some async task tries to register a listener/watch/task\n this.$$listeners = {};\n this.$$watchers = this.$$asyncQueue = this.$$postDigestQueue = [];\n\n // prevent NPEs since these methods have references to properties we nulled out\n this.$destroy = this.$digest = this.$apply = noop;\n this.$on = this.$watch = this.$watchGroup = function() { return noop; };\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$eval\n * @kind function\n *\n * @description\n * Executes the `expression` on the current scope and returns the result. Any exceptions in\n * the expression are propagated (uncaught). This is useful when evaluating Angular\n * expressions.\n *\n * # Example\n * ```js\n var scope = ng.$rootScope.Scope();\n scope.a = 1;\n scope.b = 2;\n\n expect(scope.$eval('a+b')).toEqual(3);\n expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n * ```\n *\n * @param {(string|function())=} expression An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n * @returns {*} The result of evaluating the expression.\n */\n $eval: function(expr, locals) {\n return $parse(expr)(this, locals);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$evalAsync\n * @kind function\n *\n * @description\n * Executes the expression on the current scope at a later point in time.\n *\n * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n * that:\n *\n * - it will execute after the function that scheduled the evaluation (preferably before DOM\n * rendering).\n * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after\n * `expression` execution.\n *\n * Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n * will be scheduled. However, it is encouraged to always call code that changes the model\n * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n *\n * @param {(string|function())=} expression An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n */\n $evalAsync: function(expr) {\n // if we are outside of an $digest loop and this is the first time we are scheduling async\n // task also schedule async auto-flush\n if (!$rootScope.$$phase && !$rootScope.$$asyncQueue.length) {\n $browser.defer(function() {\n if ($rootScope.$$asyncQueue.length) {\n $rootScope.$digest();\n }\n });\n }\n\n this.$$asyncQueue.push({scope: this, expression: expr});\n },\n\n $$postDigest : function(fn) {\n this.$$postDigestQueue.push(fn);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$apply\n * @kind function\n *\n * @description\n * `$apply()` is used to execute an expression in angular from outside of the angular\n * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n * Because we are calling into the angular framework we need to perform proper scope life\n * cycle of {@link ng.$exceptionHandler exception handling},\n * {@link ng.$rootScope.Scope#$digest executing watches}.\n *\n * ## Life cycle\n *\n * # Pseudo-Code of `$apply()`\n * ```js\n function $apply(expr) {\n try {\n return $eval(expr);\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n $root.$digest();\n }\n }\n * ```\n *\n *\n * Scope's `$apply()` method transitions through the following stages:\n *\n * 1. The {@link guide/expression expression} is executed using the\n * {@link ng.$rootScope.Scope#$eval $eval()} method.\n * 2. Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the\n * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.\n *\n *\n * @param {(string|function())=} exp An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n *\n * @returns {*} The result of evaluating the expression.\n */\n $apply: function(expr) {\n try {\n beginPhase('$apply');\n return this.$eval(expr);\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n clearPhase();\n try {\n $rootScope.$digest();\n } catch (e) {\n $exceptionHandler(e);\n throw e;\n }\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$applyAsync\n * @kind function\n *\n * @description\n * Schedule the invokation of $apply to occur at a later time. The actual time difference\n * varies across browsers, but is typically around ~10 milliseconds.\n *\n * This can be used to queue up multiple expressions which need to be evaluated in the same\n * digest.\n *\n * @param {(string|function())=} exp An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n */\n $applyAsync: function(expr) {\n var scope = this;\n expr && $rootScope.$$applyAsyncQueue.push($applyAsyncExpression);\n scheduleApplyAsync();\n\n function $applyAsyncExpression() {\n scope.$eval(expr);\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$on\n * @kind function\n *\n * @description\n * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for\n * discussion of event life cycle.\n *\n * The event listener function format is: `function(event, args...)`. The `event` object\n * passed into the listener has the following attributes:\n *\n * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n * `$broadcast`-ed.\n * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the\n * event propagates through the scope hierarchy, this property is set to null.\n * - `name` - `{string}`: name of the event.\n * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n * further event propagation (available only for events that were `$emit`-ed).\n * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n * to true.\n * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n *\n * @param {string} name Event name to listen on.\n * @param {function(event, ...args)} listener Function to call when the event is emitted.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $on: function(name, listener) {\n var namedListeners = this.$$listeners[name];\n if (!namedListeners) {\n this.$$listeners[name] = namedListeners = [];\n }\n namedListeners.push(listener);\n\n var current = this;\n do {\n if (!current.$$listenerCount[name]) {\n current.$$listenerCount[name] = 0;\n }\n current.$$listenerCount[name]++;\n } while ((current = current.$parent));\n\n var self = this;\n return function() {\n namedListeners[namedListeners.indexOf(listener)] = null;\n decrementListenerCount(self, 1, name);\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$emit\n * @kind function\n *\n * @description\n * Dispatches an event `name` upwards through the scope hierarchy notifying the\n * registered {@link ng.$rootScope.Scope#$on} listeners.\n *\n * The event life cycle starts at the scope on which `$emit` was called. All\n * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n * registered listeners along the way. The event will stop propagating if one of the listeners\n * cancels it.\n *\n * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * @param {string} name Event name to emit.\n * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).\n */\n $emit: function(name, args) {\n var empty = [],\n namedListeners,\n scope = this,\n stopPropagation = false,\n event = {\n name: name,\n targetScope: scope,\n stopPropagation: function() {stopPropagation = true;},\n preventDefault: function() {\n event.defaultPrevented = true;\n },\n defaultPrevented: false\n },\n listenerArgs = concat([event], arguments, 1),\n i, length;\n\n do {\n namedListeners = scope.$$listeners[name] || empty;\n event.currentScope = scope;\n for (i=0, length=namedListeners.length; i= 8 ) {\n normalizedVal = urlResolve(uri).href;\n if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n return 'unsafe:'+normalizedVal;\n }\n }\n return uri;\n };\n };\n}\n\nvar $sceMinErr = minErr('$sce');\n\nvar SCE_CONTEXTS = {\n HTML: 'html',\n CSS: 'css',\n URL: 'url',\n // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a\n // url. (e.g. ng-include, script src, templateUrl)\n RESOURCE_URL: 'resourceUrl',\n JS: 'js'\n};\n\n// Helper functions follow.\n\n// Copied from:\n// http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962\n// Prereq: s is a string.\nfunction escapeForRegexp(s) {\n return s.replace(/([-()\\[\\]{}+?*.$\\^|,:# -1) {\n throw $sceMinErr('iwcard',\n 'Illegal sequence *** in string matcher. String: {0}', matcher);\n }\n matcher = escapeForRegexp(matcher).\n replace('\\\\*\\\\*', '.*').\n replace('\\\\*', '[^:/.?&;]*');\n return new RegExp('^' + matcher + '$');\n } else if (isRegExp(matcher)) {\n // The only other type of matcher allowed is a Regexp.\n // Match entire URL / disallow partial matches.\n // Flags are reset (i.e. no global, ignoreCase or multiline)\n return new RegExp('^' + matcher.source + '$');\n } else {\n throw $sceMinErr('imatcher',\n 'Matchers may only be \"self\", string patterns or RegExp objects');\n }\n}\n\n\nfunction adjustMatchers(matchers) {\n var adjustedMatchers = [];\n if (isDefined(matchers)) {\n forEach(matchers, function(matcher) {\n adjustedMatchers.push(adjustMatcher(matcher));\n });\n }\n return adjustedMatchers;\n}\n\n\n/**\n * @ngdoc service\n * @name $sceDelegate\n * @kind function\n *\n * @description\n *\n * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n * Contextual Escaping (SCE)} services to AngularJS.\n *\n * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is\n * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n * work because `$sce` delegates to `$sceDelegate` for these operations.\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n *\n * The default instance of `$sceDelegate` should work out of the box with little pain. While you\n * can override it completely to change the behavior of `$sce`, the common case would\n * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as\n * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist\n * $sceDelegateProvider.resourceUrlWhitelist} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n */\n\n/**\n * @ngdoc provider\n * @name $sceDelegateProvider\n * @description\n *\n * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n * $sceDelegate} service. This allows one to get/set the whitelists and blacklists used to ensure\n * that the URLs used for sourcing Angular templates are safe. Refer {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and\n * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n *\n * For the general details about this service in Angular, read the main page for {@link ng.$sce\n * Strict Contextual Escaping (SCE)}.\n *\n * **Example**: Consider the following case. \n *\n * - your app is hosted at url `http://myapp.example.com/`\n * - but some of your templates are hosted on other domains you control such as\n * `http://srv01.assets.example.com/`, `http://srv02.assets.example.com/`, etc.\n * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n *\n * Here is what a secure configuration for this scenario might look like:\n *\n * ```\n * angular.module('myApp', []).config(function($sceDelegateProvider) {\n * $sceDelegateProvider.resourceUrlWhitelist([\n * // Allow same origin resource loads.\n * 'self',\n * // Allow loading from our assets domain. Notice the difference between * and **.\n * 'http://srv*.assets.example.com/**'\n * ]);\n *\n * // The blacklist overrides the whitelist so the open redirect here is blocked.\n * $sceDelegateProvider.resourceUrlBlacklist([\n * 'http://myapp.example.com/clickThru**'\n * ]);\n * });\n * ```\n */\n\nfunction $SceDelegateProvider() {\n this.SCE_CONTEXTS = SCE_CONTEXTS;\n\n // Resource URLs can also be trusted by policy.\n var resourceUrlWhitelist = ['self'],\n resourceUrlBlacklist = [];\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlWhitelist\n * @kind function\n *\n * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.\n *\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * Note: **an empty whitelist array will block all URLs**!\n *\n * @return {Array} the currently set whitelist array.\n *\n * The **default value** when no whitelist has been explicitly set is `['self']` allowing only\n * same origin resource requests.\n *\n * @description\n * Sets/Gets the whitelist of trusted resource URLs.\n */\n this.resourceUrlWhitelist = function (value) {\n if (arguments.length) {\n resourceUrlWhitelist = adjustMatchers(value);\n }\n return resourceUrlWhitelist;\n };\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlBlacklist\n * @kind function\n *\n * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.\n *\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * The typical usage for the blacklist is to **block\n * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n * these would otherwise be trusted but actually return content from the redirected domain.\n *\n * Finally, **the blacklist overrides the whitelist** and has the final say.\n *\n * @return {Array} the currently set blacklist array.\n *\n * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there\n * is no blacklist.)\n *\n * @description\n * Sets/Gets the blacklist of trusted resource URLs.\n */\n\n this.resourceUrlBlacklist = function (value) {\n if (arguments.length) {\n resourceUrlBlacklist = adjustMatchers(value);\n }\n return resourceUrlBlacklist;\n };\n\n this.$get = ['$injector', function($injector) {\n\n var htmlSanitizer = function htmlSanitizer(html) {\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n };\n\n if ($injector.has('$sanitize')) {\n htmlSanitizer = $injector.get('$sanitize');\n }\n\n\n function matchUrl(matcher, parsedUrl) {\n if (matcher === 'self') {\n return urlIsSameOrigin(parsedUrl);\n } else {\n // definitely a regex. See adjustMatchers()\n return !!matcher.exec(parsedUrl.href);\n }\n }\n\n function isResourceUrlAllowedByPolicy(url) {\n var parsedUrl = urlResolve(url.toString());\n var i, n, allowed = false;\n // Ensure that at least one item from the whitelist allows this url.\n for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {\n if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {\n allowed = true;\n break;\n }\n }\n if (allowed) {\n // Ensure that no item from the blacklist blocked this url.\n for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {\n if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {\n allowed = false;\n break;\n }\n }\n }\n return allowed;\n }\n\n function generateHolderType(Base) {\n var holderType = function TrustedValueHolderType(trustedValue) {\n this.$$unwrapTrustedValue = function() {\n return trustedValue;\n };\n };\n if (Base) {\n holderType.prototype = new Base();\n }\n holderType.prototype.valueOf = function sceValueOf() {\n return this.$$unwrapTrustedValue();\n };\n holderType.prototype.toString = function sceToString() {\n return this.$$unwrapTrustedValue().toString();\n };\n return holderType;\n }\n\n var trustedValueHolderBase = generateHolderType(),\n byType = {};\n\n byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\n /**\n * @ngdoc method\n * @name $sceDelegate#trustAs\n *\n * @description\n * Returns an object that is trusted by angular for use in specified strict\n * contextual escaping contexts (such as ng-bind-html, ng-include, any src\n * attribute interpolation, any dom event binding attribute interpolation\n * such as for onclick, etc.) that uses the provided value.\n * See {@link ng.$sce $sce} for enabling strict contextual escaping.\n *\n * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n * resourceUrl, html, js and css.\n * @param {*} value The value that that should be considered trusted/safe.\n * @returns {*} A value that can be used to stand in for the provided `value` in places\n * where Angular expects a $sce.trustAs() return value.\n */\n function trustAs(type, trustedValue) {\n var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (!Constructor) {\n throw $sceMinErr('icontext',\n 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n type, trustedValue);\n }\n if (trustedValue === null || trustedValue === undefined || trustedValue === '') {\n return trustedValue;\n }\n // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting\n // mutable objects, we ensure here that the value passed in is actually a string.\n if (typeof trustedValue !== 'string') {\n throw $sceMinErr('itype',\n 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n type);\n }\n return new Constructor(trustedValue);\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#valueOf\n *\n * @description\n * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.\n *\n * If the passed parameter is not a value that had been returned by {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.\n *\n * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}\n * call or anything else.\n * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns\n * `value` unchanged.\n */\n function valueOf(maybeTrusted) {\n if (maybeTrusted instanceof trustedValueHolderBase) {\n return maybeTrusted.$$unwrapTrustedValue();\n } else {\n return maybeTrusted;\n }\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#getTrusted\n *\n * @description\n * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and\n * returns the originally supplied value if the queried context type is a supertype of the\n * created type. If this condition isn't satisfied, throws an exception.\n *\n * @param {string} type The kind of context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} call.\n * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if valid in this context. Otherwise, throws an exception.\n */\n function getTrusted(type, maybeTrusted) {\n if (maybeTrusted === null || maybeTrusted === undefined || maybeTrusted === '') {\n return maybeTrusted;\n }\n var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (constructor && maybeTrusted instanceof constructor) {\n return maybeTrusted.$$unwrapTrustedValue();\n }\n // If we get here, then we may only take one of two actions.\n // 1. sanitize the value for the requested type, or\n // 2. throw an exception.\n if (type === SCE_CONTEXTS.RESOURCE_URL) {\n if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n return maybeTrusted;\n } else {\n throw $sceMinErr('insecurl',\n 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',\n maybeTrusted.toString());\n }\n } else if (type === SCE_CONTEXTS.HTML) {\n return htmlSanitizer(maybeTrusted);\n }\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n }\n\n return { trustAs: trustAs,\n getTrusted: getTrusted,\n valueOf: valueOf };\n }];\n}\n\n\n/**\n * @ngdoc provider\n * @name $sceProvider\n * @description\n *\n * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n * - enable/disable Strict Contextual Escaping (SCE) in a module\n * - override the default implementation with a custom delegate\n *\n * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n */\n\n/* jshint maxlen: false*/\n\n/**\n * @ngdoc service\n * @name $sce\n * @kind function\n *\n * @description\n *\n * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n *\n * # Strict Contextual Escaping\n *\n * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain\n * contexts to result in a value that is marked as safe to use for that context. One example of\n * such a context is binding arbitrary html controlled by the user via `ng-bind-html`. We refer\n * to these contexts as privileged or SCE contexts.\n *\n * As of version 1.2, Angular ships with SCE enabled by default.\n *\n * Note: When enabled (the default), IE8 in quirks mode is not supported. In this mode, IE8 allows\n * one to execute arbitrary javascript by the use of the expression() syntax. Refer\n * to learn more about them.\n * You can ensure your document is in standards mode and not quirks mode by adding ``\n * to the top of your HTML document.\n *\n * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for\n * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n *\n * Here's an example of a binding in a privileged context:\n *\n * ```\n * \n * \n * ```\n *\n * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE\n * disabled, this application allows the user to render arbitrary HTML into the DIV.\n * In a more realistic example, one may be rendering user comments, blog articles, etc. via\n * bindings. (HTML is just one example of a context where rendering user controlled input creates\n * security vulnerabilities.)\n *\n * For the case of HTML, you might use a library, either on the client side, or on the server side,\n * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n *\n * How would you ensure that every place that used these types of bindings was bound to a value that\n * was sanitized by your library (or returned as safe for rendering by your server?) How can you\n * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n * properties/fields and forgot to update the binding to the sanitized value?\n *\n * To be secure by default, you want to ensure that any such bindings are disallowed unless you can\n * determine that something explicitly says it's safe to use a value for binding in that\n * context. You can then audit your code (a simple grep would do) to ensure that this is only done\n * for those values that you can easily tell are safe - because they were received from your server,\n * sanitized by your library, etc. You can organize your codebase to help with this - perhaps\n * allowing only the files in a specific directory to do this. Ensuring that the internal API\n * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.\n *\n * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}\n * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to\n * obtain values that will be accepted by SCE / privileged contexts.\n *\n *\n * ## How does it work?\n *\n * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted\n * $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link\n * ng.$sce#parse $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the\n * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.\n *\n * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly\n * simplified):\n *\n * ```\n * var ngBindHtmlDirective = ['$sce', function($sce) {\n * return function(scope, element, attr) {\n * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n * element.html(value || '');\n * });\n * };\n * }];\n * ```\n *\n * ## Impact on loading templates\n *\n * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n * `templateUrl`'s specified by {@link guide/directive directives}.\n *\n * By default, Angular only loads templates from the same domain and protocol as the application\n * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or\n * protocols, you may either either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist\n * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.\n *\n * *Please note*:\n * The browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy apply in addition to this and may further restrict whether the template is successfully\n * loaded. This means that without the right CORS policy, loading templates from a different domain\n * won't work on all browsers. Also, loading templates from `file://` URL does not work on some\n * browsers.\n *\n * ## This feels like too much overhead\n *\n * It's important to remember that SCE only applies to interpolation expressions.\n *\n * If your expressions are constant literals, they're automatically trusted and you don't need to\n * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.\n * `implicitly trusted'\">`) just works.\n *\n * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them\n * through {@link ng.$sce#getTrusted $sce.getTrusted}. SCE doesn't play a role here.\n *\n * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n * templates in `ng-include` from your application's domain without having to even know about SCE.\n * It blocks loading templates from other domains or loading templates over http from an https\n * served document. You can change these by setting your own custom {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.\n *\n * This significantly reduces the overhead. It is far easier to pay the small overhead and have an\n * application that's secure and can be audited to verify that with much more ease than bolting\n * security onto an application later.\n *\n * \n * ## What trusted context types are supported?\n *\n * | Context | Notes |\n * |---------------------|----------------|\n * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |\n * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |\n * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |\n * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |\n *\n * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} \n *\n * Each element in these arrays must be one of the following:\n *\n * - **'self'**\n * - The special **string**, `'self'`, can be used to match against all URLs of the **same\n * domain** as the application document using the **same protocol**.\n * - **String** (except the special value `'self'`)\n * - The string is matched against the full *normalized / absolute URL* of the resource\n * being tested (substring matches are not good enough.)\n * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters\n * match themselves.\n * - `*`: matches zero or more occurrences of any character other than one of the following 6\n * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and ';'. It's a useful wildcard for use\n * in a whitelist.\n * - `**`: matches zero or more occurrences of *any* character. As such, it's not\n * not appropriate to use in for a scheme, domain, etc. as it would match too much. (e.g.\n * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n * not have been the intention.) Its usage at the very end of the path is ok. (e.g.\n * http://foo.example.com/templates/**).\n * - **RegExp** (*see caveat below*)\n * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax\n * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to\n * accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n * have good test coverage.). For instance, the use of `.` in the regex is correct only in a\n * small number of cases. A `.` character in the regex used when matching the scheme or a\n * subdomain could be matched against a `:` or literal `.` that was likely not intended. It\n * is highly recommended to use the string patterns and only fall back to regular expressions\n * if they as a last resort.\n * - The regular expression must be an instance of RegExp (i.e. not a string.) It is\n * matched against the **entire** *normalized / absolute URL* of the resource being tested\n * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags\n * present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n * - If you are generating your JavaScript from some other templating engine (not\n * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n * remember to escape your regular expression (and be aware that you might need more than\n * one level of escaping depending on your templating engine and the way you interpolated\n * the value.) Do make use of your platform's escaping mechanism as it might be good\n * enough before coding your own. e.g. Ruby has\n * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n * Javascript lacks a similar built in function for escaping. Take a look at Google\n * Closure library's [goog.string.regExpEscape(s)](\n * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n *\n * ## Show me an example using SCE.\n *\n * \n * \n * \n * \n * User comments\n * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n * $sanitize is available. If $sanitize isn't available, this results in an error instead of an\n * exploit.\n * \n * \n * {{userComment.name}}:\n * \n * \n * \n * \n * \n * \n *\n * \n * angular.module('mySceApp', ['ngSanitize'])\n * .controller('AppController', ['$http', '$templateCache', '$sce',\n * function($http, $templateCache, $sce) {\n * var self = this;\n * $http.get(\"test_data.json\", {cache: $templateCache}).success(function(userComments) {\n * self.userComments = userComments;\n * });\n * self.explicitlyTrustedHtml = $sce.trustAsHtml(\n * 'Hover over this text.');\n * }]);\n * \n *\n * \n * [\n * { \"name\": \"Alice\",\n * \"htmlComment\":\n * \"Is anyone reading this?\"\n * },\n * { \"name\": \"Bob\",\n * \"htmlComment\": \"Yes! Am I the only other one?\"\n * }\n * ]\n * \n *\n * \n * describe('SCE doc demo', function() {\n * it('should sanitize untrusted values', function() {\n * expect(element.all(by.css('.htmlComment')).first().getInnerHtml())\n * .toBe('Is anyone reading this?');\n * });\n *\n * it('should NOT sanitize explicitly trusted values', function() {\n * expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(\n * 'Hover over this text.');\n * });\n * });\n * \n * \n *\n *\n *\n * ## Can I disable SCE completely?\n *\n * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits\n * for little coding overhead. It will be much harder to take an SCE disabled application and\n * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE\n * for cases where you have a lot of existing code that was written before SCE was introduced and\n * you're migrating them a module at a time.\n *\n * That said, here's how you can completely disable SCE:\n *\n * ```\n * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n * // Completely disable SCE. For demonstration purposes only!\n * // Do not use in new projects.\n * $sceProvider.enabled(false);\n * });\n * ```\n *\n */\n/* jshint maxlen: 100 */\n\nfunction $SceProvider() {\n var enabled = true;\n\n /**\n * @ngdoc method\n * @name $sceProvider#enabled\n * @kind function\n *\n * @param {boolean=} value If provided, then enables/disables SCE.\n * @return {boolean} true if SCE is enabled, false otherwise.\n *\n * @description\n * Enables/disables SCE and returns the current value.\n */\n this.enabled = function (value) {\n if (arguments.length) {\n enabled = !!value;\n }\n return enabled;\n };\n\n\n /* Design notes on the default implementation for SCE.\n *\n * The API contract for the SCE delegate\n * -------------------------------------\n * The SCE delegate object must provide the following 3 methods:\n *\n * - trustAs(contextEnum, value)\n * This method is used to tell the SCE service that the provided value is OK to use in the\n * contexts specified by contextEnum. It must return an object that will be accepted by\n * getTrusted() for a compatible contextEnum and return this value.\n *\n * - valueOf(value)\n * For values that were not produced by trustAs(), return them as is. For values that were\n * produced by trustAs(), return the corresponding input value to trustAs. Basically, if\n * trustAs is wrapping the given values into some type, this operation unwraps it when given\n * such a value.\n *\n * - getTrusted(contextEnum, value)\n * This function should return the a value that is safe to use in the context specified by\n * contextEnum or throw and exception otherwise.\n *\n * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n * opaque or wrapped in some holder object. That happens to be an implementation detail. For\n * instance, an implementation could maintain a registry of all trusted objects by context. In\n * such a case, trustAs() would return the same object that was passed in. getTrusted() would\n * return the same object passed in if it was found in the registry under a compatible context or\n * throw an exception otherwise. An implementation might only wrap values some of the time based\n * on some criteria. getTrusted() might return a value and not throw an exception for special\n * constants or objects even if not wrapped. All such implementations fulfill this contract.\n *\n *\n * A note on the inheritance model for SCE contexts\n * ------------------------------------------------\n * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This\n * is purely an implementation details.\n *\n * The contract is simply this:\n *\n * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n * will also succeed.\n *\n * Inheritance happens to capture this in a natural way. In some future, we\n * may not use inheritance anymore. That is OK because no code outside of\n * sce.js and sceSpecs.js would need to be aware of this detail.\n */\n\n this.$get = ['$parse', '$sniffer', '$sceDelegate', function(\n $parse, $sniffer, $sceDelegate) {\n // Prereq: Ensure that we're not running in IE8 quirks mode. In that mode, IE allows\n // the \"expression(javascript expression)\" syntax which is insecure.\n if (enabled && $sniffer.msie && $sniffer.msieDocumentMode < 8) {\n throw $sceMinErr('iequirks',\n 'Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks ' +\n 'mode. You can fix this by adding the text to the top of your HTML ' +\n 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');\n }\n\n var sce = shallowCopy(SCE_CONTEXTS);\n\n /**\n * @ngdoc method\n * @name $sce#isEnabled\n * @kind function\n *\n * @return {Boolean} true if SCE is enabled, false otherwise. If you want to set the value, you\n * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n *\n * @description\n * Returns a boolean indicating if SCE is enabled.\n */\n sce.isEnabled = function () {\n return enabled;\n };\n sce.trustAs = $sceDelegate.trustAs;\n sce.getTrusted = $sceDelegate.getTrusted;\n sce.valueOf = $sceDelegate.valueOf;\n\n if (!enabled) {\n sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n sce.valueOf = identity;\n }\n\n /**\n * @ngdoc method\n * @name $sce#parseAs\n *\n * @description\n * Converts Angular {@link guide/expression expression} into a function. This is like {@link\n * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it\n * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,\n * *result*)}\n *\n * @param {string} type The kind of SCE context in which this result will be used.\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n sce.parseAs = function sceParseAs(type, expr) {\n var parsed = $parse(expr);\n if (parsed.literal && parsed.constant) {\n return parsed;\n } else {\n return $parse(expr, function (value) {\n return sce.getTrusted(type, value);\n });\n }\n };\n\n /**\n * @ngdoc method\n * @name $sce#trustAs\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such,\n * returns an object that is trusted by angular for use in specified strict contextual\n * escaping contexts (such as ng-bind-html, ng-include, any src attribute\n * interpolation, any dom event binding attribute interpolation such as for onclick, etc.)\n * that uses the provided value. See * {@link ng.$sce $sce} for enabling strict contextual\n * escaping.\n *\n * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n * resource_url, html, js and css.\n * @param {*} value The value that that should be considered trusted/safe.\n * @returns {*} A value that can be used to stand in for the provided `value` in places\n * where Angular expects a $sce.trustAs() return value.\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsHtml\n *\n * @description\n * Shorthand method. `$sce.trustAsHtml(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml\n * $sce.getTrustedHtml(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl\n * $sce.getTrustedUrl(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsResourceUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the return\n * value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsJs\n *\n * @description\n * Shorthand method. `$sce.trustAsJs(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs\n * $sce.getTrustedJs(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrusted\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,\n * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the\n * originally supplied value if the queried context type is a supertype of the created type.\n * If this condition isn't satisfied, throws an exception.\n *\n * @param {string} type The kind of context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}\n * call.\n * @returns {*} The value the was originally provided to\n * {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.\n * Otherwise, throws an exception.\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedHtml\n *\n * @description\n * Shorthand method. `$sce.getTrustedHtml(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedCss\n *\n * @description\n * Shorthand method. `$sce.getTrustedCss(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedResourceUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedResourceUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedJs\n *\n * @description\n * Shorthand method. `$sce.getTrustedJs(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsHtml\n *\n * @description\n * Shorthand method. `$sce.parseAsHtml(expression string)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.HTML, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsCss\n *\n * @description\n * Shorthand method. `$sce.parseAsCss(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.CSS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsUrl(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsResourceUrl(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.RESOURCE_URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsJs\n *\n * @description\n * Shorthand method. `$sce.parseAsJs(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.JS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n // Shorthand delegations.\n var parse = sce.parseAs,\n getTrusted = sce.getTrusted,\n trustAs = sce.trustAs;\n\n forEach(SCE_CONTEXTS, function (enumValue, name) {\n var lName = lowercase(name);\n sce[camelCase(\"parse_as_\" + lName)] = function (expr) {\n return parse(enumValue, expr);\n };\n sce[camelCase(\"get_trusted_\" + lName)] = function (value) {\n return getTrusted(enumValue, value);\n };\n sce[camelCase(\"trust_as_\" + lName)] = function (value) {\n return trustAs(enumValue, value);\n };\n });\n\n return sce;\n }];\n}\n\n/**\n * !!! This is an undocumented \"private\" service !!!\n *\n * @name $sniffer\n * @requires $window\n * @requires $document\n *\n * @property {boolean} history Does the browser support html5 history api ?\n * @property {boolean} hashchange Does the browser support hashchange event ?\n * @property {boolean} transitions Does the browser support CSS transition events ?\n * @property {boolean} animations Does the browser support CSS animation events ?\n *\n * @description\n * This is very simple implementation of testing browser's features.\n */\nfunction $SnifferProvider() {\n this.$get = ['$window', '$document', function($window, $document) {\n var eventSupport = {},\n android =\n int((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n document = $document[0] || {},\n documentMode = document.documentMode,\n vendorPrefix,\n vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/,\n bodyStyle = document.body && document.body.style,\n transitions = false,\n animations = false,\n match;\n\n if (bodyStyle) {\n for(var prop in bodyStyle) {\n if(match = vendorRegex.exec(prop)) {\n vendorPrefix = match[0];\n vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);\n break;\n }\n }\n\n if(!vendorPrefix) {\n vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';\n }\n\n transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));\n animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));\n\n if (android && (!transitions||!animations)) {\n transitions = isString(document.body.style.webkitTransition);\n animations = isString(document.body.style.webkitAnimation);\n }\n }\n\n\n return {\n // Android has history.pushState, but it does not update location correctly\n // so let's not use the history API at all.\n // http://code.google.com/p/android/issues/detail?id=17471\n // https://github.com/angular/angular.js/issues/904\n\n // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n // so let's not use the history API also\n // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n // jshint -W018\n history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),\n // jshint +W018\n hashchange: 'onhashchange' in $window &&\n // IE8 compatible mode lies\n (!documentMode || documentMode > 7),\n hasEvent: function(event) {\n // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n // it. In particular the event is not fired when backspace or delete key are pressed or\n // when cut operation is performed.\n if (event == 'input' && msie == 9) return false;\n\n if (isUndefined(eventSupport[event])) {\n var divElm = document.createElement('div');\n eventSupport[event] = 'on' + event in divElm;\n }\n\n return eventSupport[event];\n },\n csp: csp(),\n vendorPrefix: vendorPrefix,\n transitions : transitions,\n animations : animations,\n android: android,\n msie : msie,\n msieDocumentMode: documentMode\n };\n }];\n}\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc service\n * @name $templateRequest\n *\n * @description\n * The `$templateRequest` service downloads the provided template using `$http` and, upon success,\n * stores the contents inside of `$templateCache`. If the HTTP request fails or the response data\n * of the HTTP request is empty then a `$compile` error will be thrown (the exception can be thwarted\n * by setting the 2nd parameter of the function to true).\n *\n * @param {string} tpl The HTTP request template URL\n * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty\n *\n * @return {Promise} the HTTP Promise for the given.\n *\n * @property {number} totalPendingRequests total amount of pending template requests being downloaded.\n */\nfunction $TemplateRequestProvider() {\n this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) {\n function handleRequestFn(tpl, ignoreRequestError) {\n var self = handleRequestFn;\n self.totalPendingRequests++;\n\n return $http.get(tpl, { cache : $templateCache })\n .then(function(response) {\n var html = response.data;\n if(!html || html.length === 0) {\n return handleError();\n }\n\n self.totalPendingRequests--;\n $templateCache.put(tpl, html);\n return html;\n }, handleError);\n\n function handleError() {\n self.totalPendingRequests--;\n if (!ignoreRequestError) {\n throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl);\n }\n return $q.reject();\n }\n }\n\n handleRequestFn.totalPendingRequests = 0;\n\n return handleRequestFn;\n }];\n}\n\nfunction $$TestabilityProvider() {\n this.$get = ['$rootScope', '$browser', '$location',\n function($rootScope, $browser, $location) {\n\n /**\n * @name $testability\n *\n * @description\n * The private $$testability service provides a collection of methods for use when debugging\n * or by automated test and debugging tools.\n */\n var testability = {};\n\n /**\n * @name $$testability#findBindings\n *\n * @description\n * Returns an array of elements that are bound (via ng-bind or {{}})\n * to expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The binding expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression. Filters and whitespace are ignored.\n */\n testability.findBindings = function(element, expression, opt_exactMatch) {\n var bindings = element.getElementsByClassName('ng-binding');\n var matches = [];\n forEach(bindings, function(binding) {\n var dataBinding = angular.element(binding).data('$binding');\n if (dataBinding) {\n forEach(dataBinding, function(bindingName) {\n if (opt_exactMatch) {\n var matcher = new RegExp('(^|\\\\s)' + expression + '(\\\\s|\\\\||$)');\n if (matcher.test(bindingName)) {\n matches.push(binding);\n }\n } else {\n if (bindingName.indexOf(expression) != -1) {\n matches.push(binding);\n }\n }\n });\n }\n });\n return matches;\n };\n\n /**\n * @name $$testability#findModels\n *\n * @description\n * Returns an array of elements that are two-way found via ng-model to\n * expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The model expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression.\n */\n testability.findModels = function(element, expression, opt_exactMatch) {\n var prefixes = ['ng-', 'data-ng-', 'ng\\\\:'];\n for (var p = 0; p < prefixes.length; ++p) {\n var attributeEquals = opt_exactMatch ? '=' : '*=';\n var selector = '[' + prefixes[p] + 'model' + attributeEquals + '\"' + expression + '\"]';\n var elements = element.querySelectorAll(selector);\n if (elements.length) {\n return elements;\n }\n }\n };\n\n /**\n * @name $$testability#getLocation\n *\n * @description\n * Shortcut for getting the location in a browser agnostic way. Returns\n * the path, search, and hash. (e.g. /path?a=b#hash)\n */\n testability.getLocation = function() {\n return $location.url();\n };\n\n /**\n * @name $$testability#setLocation\n *\n * @description\n * Shortcut for navigating to a location without doing a full page reload.\n *\n * @param {string} url The location url (path, search and hash,\n * e.g. /path?a=b#hash) to go to.\n */\n testability.setLocation = function(url) {\n if (url !== $location.url()) {\n $location.url(url);\n $rootScope.$digest();\n }\n };\n\n /**\n * @name $$testability#whenStable\n *\n * @description\n * Calls the callback when $timeout and $http requests are completed.\n *\n * @param {function} callback\n */\n testability.whenStable = function(callback) {\n $browser.notifyWhenNoOutstandingRequests(callback);\n };\n\n return testability;\n }];\n}\n\nfunction $TimeoutProvider() {\n this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',\n function($rootScope, $browser, $q, $$q, $exceptionHandler) {\n var deferreds = {};\n\n\n /**\n * @ngdoc service\n * @name $timeout\n *\n * @description\n * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n * block and delegates any exceptions to\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * The return value of registering a timeout function is a promise, which will be resolved when\n * the timeout is reached and the timeout function is executed.\n *\n * To cancel a timeout request, call `$timeout.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n * synchronously flush the queue of deferred functions.\n *\n * @param {function()} fn A function, whose execution should be delayed.\n * @param {number=} [delay=0] Delay in milliseconds.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this\n * promise will be resolved with is the return value of the `fn` function.\n *\n */\n function timeout(fn, delay, invokeApply) {\n var skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise,\n timeoutId;\n\n timeoutId = $browser.defer(function() {\n try {\n deferred.resolve(fn());\n } catch(e) {\n deferred.reject(e);\n $exceptionHandler(e);\n }\n finally {\n delete deferreds[promise.$$timeoutId];\n }\n\n if (!skipApply) $rootScope.$apply();\n }, delay);\n\n promise.$$timeoutId = timeoutId;\n deferreds[timeoutId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $timeout#cancel\n *\n * @description\n * Cancels a task associated with the `promise`. As a result of this, the promise will be\n * resolved with a rejection.\n *\n * @param {Promise=} promise Promise returned by the `$timeout` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n timeout.cancel = function(promise) {\n if (promise && promise.$$timeoutId in deferreds) {\n deferreds[promise.$$timeoutId].reject('canceled');\n delete deferreds[promise.$$timeoutId];\n return $browser.defer.cancel(promise.$$timeoutId);\n }\n return false;\n };\n\n return timeout;\n }];\n}\n\n// NOTE: The usage of window and document instead of $window and $document here is\n// deliberate. This service depends on the specific behavior of anchor nodes created by the\n// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n// cause us to break tests. In addition, when the browser resolves a URL for XHR, it\n// doesn't know about mocked locations and resolves URLs to the real document - which is\n// exactly the behavior needed here. There is little value is mocking these out for this\n// service.\nvar urlParsingNode = document.createElement(\"a\");\nvar originUrl = urlResolve(window.location.href, true);\n\n\n/**\n *\n * Implementation Notes for non-IE browsers\n * ----------------------------------------\n * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n * results both in the normalizing and parsing of the URL. Normalizing means that a relative\n * URL will be resolved into an absolute URL in the context of the application document.\n * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n * properties are all populated to reflect the normalized URL. This approach has wide\n * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc. See\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *\n * Implementation Notes for IE\n * ---------------------------\n * IE >= 8 and <= 10 normalizes the URL when assigned to the anchor node similar to the other\n * browsers. However, the parsed components will not be set if the URL assigned did not specify\n * them. (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.) We\n * work around that by performing the parsing in a 2nd step by taking a previously normalized\n * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the\n * properties such as protocol, hostname, port, etc.\n *\n * IE7 does not normalize the URL when assigned to an anchor node. (Apparently, it does, if one\n * uses the inner HTML approach to assign the URL as part of an HTML snippet -\n * http://stackoverflow.com/a/472729) However, setting img[src] does normalize the URL.\n * Unfortunately, setting img[src] to something like \"javascript:foo\" on IE throws an exception.\n * Since the primary usage for normalizing URLs is to sanitize such URLs, we can't use that\n * method and IE < 8 is unsupported.\n *\n * References:\n * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n * http://url.spec.whatwg.org/#urlutils\n * https://github.com/angular/angular.js/pull/2902\n * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n *\n * @kind function\n * @param {string} url The URL to be parsed.\n * @description Normalizes and parses a URL.\n * @returns {object} Returns the normalized URL as a dictionary.\n *\n * | member name | Description |\n * |---------------|----------------|\n * | href | A normalized version of the provided URL if it was not an absolute URL |\n * | protocol | The protocol including the trailing colon |\n * | host | The host and port (if the port is non-default) of the normalizedUrl |\n * | search | The search params, minus the question mark |\n * | hash | The hash string, minus the hash symbol\n * | hostname | The hostname\n * | port | The port, without \":\"\n * | pathname | The pathname, beginning with \"/\"\n *\n */\nfunction urlResolve(url, base) {\n var href = url;\n\n if (msie) {\n // Normalize before parse. Refer Implementation Notes on why this is\n // done in two steps on IE.\n urlParsingNode.setAttribute(\"href\", href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/')\n ? urlParsingNode.pathname\n : '/' + urlParsingNode.pathname\n };\n}\n\n/**\n * Parse a request URL and determine whether this is a same-origin request as the application document.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the request is for the same origin as the application document.\n */\nfunction urlIsSameOrigin(requestUrl) {\n var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n return (parsed.protocol === originUrl.protocol &&\n parsed.host === originUrl.host);\n}\n\n/**\n * @ngdoc service\n * @name $window\n *\n * @description\n * A reference to the browser's `window` object. While `window`\n * is globally available in JavaScript, it causes testability problems, because\n * it is a global variable. In angular we always refer to it through the\n * `$window` service, so it may be overridden, removed or mocked for testing.\n *\n * Expressions, like the one defined for the `ngClick` directive in the example\n * below, are evaluated with respect to the current scope. Therefore, there is\n * no risk of inadvertently coding in a dependency on a global value in such an\n * expression.\n *\n * @example\n \n \n \n \n \n ALERT\n \n \n \n it('should display the greeting in the input box', function() {\n element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n // If we click the button it will block the test runner\n // element(':button').click();\n });\n \n \n */\nfunction $WindowProvider(){\n this.$get = valueFn(window);\n}\n\n/* global currencyFilter: true,\n dateFilter: true,\n filterFilter: true,\n jsonFilter: true,\n limitToFilter: true,\n lowercaseFilter: true,\n numberFilter: true,\n orderByFilter: true,\n uppercaseFilter: true,\n */\n\n/**\n * @ngdoc provider\n * @name $filterProvider\n * @description\n *\n * Filters are just functions which transform input to an output. However filters need to be\n * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n * annotated with dependencies and is responsible for creating a filter function.\n *\n * ```js\n * // Filter registration\n * function MyModule($provide, $filterProvider) {\n * // create a service to demonstrate injection (not always needed)\n * $provide.value('greet', function(name){\n * return 'Hello ' + name + '!';\n * });\n *\n * // register a filter factory which uses the\n * // greet service to demonstrate DI.\n * $filterProvider.register('greet', function(greet){\n * // return the filter function which uses the greet service\n * // to generate salutation\n * return function(text) {\n * // filters need to be forgiving so check input validity\n * return text && greet(text) || text;\n * };\n * });\n * }\n * ```\n *\n * The filter function is registered with the `$injector` under the filter name suffix with\n * `Filter`.\n *\n * ```js\n * it('should be the same instance', inject(\n * function($filterProvider) {\n * $filterProvider.register('reverse', function(){\n * return ...;\n * });\n * },\n * function($filter, reverseFilter) {\n * expect($filter('reverse')).toBe(reverseFilter);\n * });\n * ```\n *\n *\n * For more information about how angular filters work, and how to create your own filters, see\n * {@link guide/filter Filters} in the Angular Developer Guide.\n */\n\n/**\n * @ngdoc service\n * @name $filter\n * @kind function\n * @description\n * Filters are used for formatting data displayed to the user.\n *\n * The general syntax in templates is as follows:\n *\n * {{ expression [| filter_name[:parameter_value] ... ] }}\n *\n * @param {String} name Name of the filter function to retrieve\n * @return {Function} the filter function\n * @example\n \n \n \n {{ originalText }}\n {{ filteredText }}\n \n \n\n \n angular.module('filterExample', [])\n .controller('MainCtrl', function($scope, $filter) {\n $scope.originalText = 'hello';\n $scope.filteredText = $filter('uppercase')($scope.originalText);\n });\n \n \n */\n$FilterProvider.$inject = ['$provide'];\nfunction $FilterProvider($provide) {\n var suffix = 'Filter';\n\n /**\n * @ngdoc method\n * @name $filterProvider#register\n * @param {string|Object} name Name of the filter function, or an object map of filters where\n * the keys are the filter names and the values are the filter factories.\n * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n * of the registered filter instances.\n */\n function register(name, factory) {\n if(isObject(name)) {\n var filters = {};\n forEach(name, function(filter, key) {\n filters[key] = register(key, filter);\n });\n return filters;\n } else {\n return $provide.factory(name + suffix, factory);\n }\n }\n this.register = register;\n\n this.$get = ['$injector', function($injector) {\n return function(name) {\n return $injector.get(name + suffix);\n };\n }];\n\n ////////////////////////////////////////\n\n /* global\n currencyFilter: false,\n dateFilter: false,\n filterFilter: false,\n jsonFilter: false,\n limitToFilter: false,\n lowercaseFilter: false,\n numberFilter: false,\n orderByFilter: false,\n uppercaseFilter: false,\n */\n\n register('currency', currencyFilter);\n register('date', dateFilter);\n register('filter', filterFilter);\n register('json', jsonFilter);\n register('limitTo', limitToFilter);\n register('lowercase', lowercaseFilter);\n register('number', numberFilter);\n register('orderBy', orderByFilter);\n register('uppercase', uppercaseFilter);\n}\n\n/**\n * @ngdoc filter\n * @name filter\n * @kind function\n *\n * @description\n * Selects a subset of items from `array` and returns it as a new array.\n *\n * @param {Array} array The source array.\n * @param {string|Object|function()} expression The predicate to be used for selecting items from\n * `array`.\n *\n * Can be one of:\n *\n * - `string`: The string is evaluated as an expression and the resulting value is used for substring match against\n * the contents of the `array`. All strings or objects with string properties in `array` that contain this string\n * will be returned. The predicate can be negated by prefixing the string with `!`.\n *\n * - `Object`: A pattern object can be used to filter specific properties on objects contained\n * by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n * which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n * property name `$` can be used (as in `{$:\"text\"}`) to accept a match against any\n * property of the object. That's equivalent to the simple substring match with a `string`\n * as described above. The predicate can be negated by prefixing the string with `!`.\n * For Example `{name: \"!M\"}` predicate will return an array of items which have property `name`\n * not containing \"M\".\n *\n * - `function(value, index)`: A predicate function can be used to write arbitrary filters. The\n * function is called for each element of `array`. The final result is an array of those\n * elements that the predicate returned true for.\n *\n * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in\n * determining if the expected value (from the filter expression) and actual value (from\n * the object in the array) should be considered a match.\n *\n * Can be one of:\n *\n * - `function(actual, expected)`:\n * The function will be given the object value and the predicate value to compare and\n * should return true if the item should be included in filtered result.\n *\n * - `true`: A shorthand for `function(actual, expected) { return angular.equals(expected, actual)}`.\n * this is essentially strict comparison of expected and actual.\n *\n * - `false|undefined`: A short hand for a function which will look for a substring match in case\n * insensitive way.\n *\n * @example\n \n \n \n\n Search: \n \n NamePhone\n \n {{friend.name}}\n {{friend.phone}}\n \n \n \n Any: \n Name only \n Phone only \n Equality \n \n NamePhone\n \n {{friendObj.name}}\n {{friendObj.phone}}\n \n \n \n \n var expectFriendNames = function(expectedNames, key) {\n element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n arr.forEach(function(wd, i) {\n expect(wd.getText()).toMatch(expectedNames[i]);\n });\n });\n };\n\n it('should search across all fields when filtering with a string', function() {\n var searchText = element(by.model('searchText'));\n searchText.clear();\n searchText.sendKeys('m');\n expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\n searchText.clear();\n searchText.sendKeys('76');\n expectFriendNames(['John', 'Julie'], 'friend');\n });\n\n it('should search in specific fields when filtering with a predicate object', function() {\n var searchAny = element(by.model('search.$'));\n searchAny.clear();\n searchAny.sendKeys('i');\n expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n });\n it('should use a equal comparison when comparator is true', function() {\n var searchName = element(by.model('search.name'));\n var strict = element(by.model('strict'));\n searchName.clear();\n searchName.sendKeys('Julie');\n strict.click();\n expectFriendNames(['Julie'], 'friendObj');\n });\n \n \n */\nfunction filterFilter() {\n return function(array, expression, comparator) {\n if (!isArray(array)) return array;\n\n var comparatorType = typeof(comparator),\n predicates = [];\n\n predicates.check = function(value, index) {\n for (var j = 0; j < predicates.length; j++) {\n if(!predicates[j](value, index)) {\n return false;\n }\n }\n return true;\n };\n\n if (comparatorType !== 'function') {\n if (comparatorType === 'boolean' && comparator) {\n comparator = function(obj, text) {\n return angular.equals(obj, text);\n };\n } else {\n comparator = function(obj, text) {\n if (obj && text && typeof obj === 'object' && typeof text === 'object') {\n for (var objKey in obj) {\n if (objKey.charAt(0) !== '$' && hasOwnProperty.call(obj, objKey) &&\n comparator(obj[objKey], text[objKey])) {\n return true;\n }\n }\n return false;\n }\n text = (''+text).toLowerCase();\n return (''+obj).toLowerCase().indexOf(text) > -1;\n };\n }\n }\n\n var search = function(obj, text){\n if (typeof text == 'string' && text.charAt(0) === '!') {\n return !search(obj, text.substr(1));\n }\n switch (typeof obj) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n return comparator(obj, text);\n case \"object\":\n switch (typeof text) {\n case \"object\":\n return comparator(obj, text);\n default:\n for ( var objKey in obj) {\n if (objKey.charAt(0) !== '$' && search(obj[objKey], text)) {\n return true;\n }\n }\n break;\n }\n return false;\n case \"array\":\n for ( var i = 0; i < obj.length; i++) {\n if (search(obj[i], text)) {\n return true;\n }\n }\n return false;\n default:\n return false;\n }\n };\n switch (typeof expression) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n // Set up expression object and fall through\n expression = {$:expression};\n // jshint -W086\n case \"object\":\n // jshint +W086\n for (var key in expression) {\n (function(path) {\n if (typeof expression[path] === 'undefined') return;\n predicates.push(function(value) {\n return search(path == '$' ? value : (value && value[path]), expression[path]);\n });\n })(key);\n }\n break;\n case 'function':\n predicates.push(expression);\n break;\n default:\n return array;\n }\n var filtered = [];\n for ( var j = 0; j < array.length; j++) {\n var value = array[j];\n if (predicates.check(value, j)) {\n filtered.push(value);\n }\n }\n return filtered;\n };\n}\n\n/**\n * @ngdoc filter\n * @name currency\n * @kind function\n *\n * @description\n * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n * symbol for current locale is used.\n *\n * @param {number} amount Input to filter.\n * @param {string=} symbol Currency symbol or identifier to be displayed.\n * @returns {string} Formatted number.\n *\n *\n * @example\n \n \n \n \n \n default currency symbol ($): {{amount | currency}}\n custom currency identifier (USD$): {{amount | currency:\"USD$\"}}\n \n \n \n it('should init with 1234.56', function() {\n expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('USD$1,234.56');\n });\n it('should update', function() {\n if (browser.params.browser == 'safari') {\n // Safari does not understand the minus key. See\n // https://github.com/angular/protractor/issues/481\n return;\n }\n element(by.model('amount')).clear();\n element(by.model('amount')).sendKeys('-1234');\n expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)');\n expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('(USD$1,234.00)');\n });\n \n \n */\ncurrencyFilter.$inject = ['$locale'];\nfunction currencyFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(amount, currencySymbol){\n if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;\n\n // if null or undefined pass it through\n return (amount == null)\n ? amount\n : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2).\n replace(/\\u00A4/g, currencySymbol);\n };\n}\n\n/**\n * @ngdoc filter\n * @name number\n * @kind function\n *\n * @description\n * Formats a number as text.\n *\n * If the input is not a number an empty string is returned.\n *\n * @param {number|string} number Number to format.\n * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n * If this is not provided then the fraction size is computed from the current locale's number\n * formatting pattern. In the case of the default locale, it will be 3.\n * @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit.\n *\n * @example\n \n \n \n \n Enter number: \n Default formatting: {{val | number}}\n No fractions: {{val | number:0}}\n Negative number: {{-val | number:4}}\n \n \n \n it('should format numbers', function() {\n expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n });\n\n it('should update', function() {\n element(by.model('val')).clear();\n element(by.model('val')).sendKeys('3374.333');\n expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n });\n \n \n */\n\n\nnumberFilter.$inject = ['$locale'];\nfunction numberFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(number, fractionSize) {\n\n // if null or undefined pass it through\n return (number == null)\n ? number\n : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n fractionSize);\n };\n}\n\nvar DECIMAL_SEP = '.';\nfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n if (!isFinite(number) || isObject(number)) return '';\n\n var isNegative = number < 0;\n number = Math.abs(number);\n var numStr = number + '',\n formatedText = '',\n parts = [];\n\n var hasExponent = false;\n if (numStr.indexOf('e') !== -1) {\n var match = numStr.match(/([\\d\\.]+)e(-?)(\\d+)/);\n if (match && match[2] == '-' && match[3] > fractionSize + 1) {\n numStr = '0';\n number = 0;\n } else {\n formatedText = numStr;\n hasExponent = true;\n }\n }\n\n if (!hasExponent) {\n var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;\n\n // determine fractionSize if it is not specified\n if (isUndefined(fractionSize)) {\n fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);\n }\n\n // safely round numbers in JS without hitting imprecisions of floating-point arithmetics\n // inspired by:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\n number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize);\n\n if (number === 0) {\n isNegative = false;\n }\n\n var fraction = ('' + number).split(DECIMAL_SEP);\n var whole = fraction[0];\n fraction = fraction[1] || '';\n\n var i, pos = 0,\n lgroup = pattern.lgSize,\n group = pattern.gSize;\n\n if (whole.length >= (lgroup + group)) {\n pos = whole.length - lgroup;\n for (i = 0; i < pos; i++) {\n if ((pos - i)%group === 0 && i !== 0) {\n formatedText += groupSep;\n }\n formatedText += whole.charAt(i);\n }\n }\n\n for (i = pos; i < whole.length; i++) {\n if ((whole.length - i)%lgroup === 0 && i !== 0) {\n formatedText += groupSep;\n }\n formatedText += whole.charAt(i);\n }\n\n // format fraction part.\n while(fraction.length < fractionSize) {\n fraction += '0';\n }\n\n if (fractionSize && fractionSize !== \"0\") formatedText += decimalSep + fraction.substr(0, fractionSize);\n } else {\n\n if (fractionSize > 0 && number > -1 && number < 1) {\n formatedText = number.toFixed(fractionSize);\n }\n }\n\n parts.push(isNegative ? pattern.negPre : pattern.posPre);\n parts.push(formatedText);\n parts.push(isNegative ? pattern.negSuf : pattern.posSuf);\n return parts.join('');\n}\n\nfunction padNumber(num, digits, trim) {\n var neg = '';\n if (num < 0) {\n neg = '-';\n num = -num;\n }\n num = '' + num;\n while(num.length < digits) num = '0' + num;\n if (trim)\n num = num.substr(num.length - digits);\n return neg + num;\n}\n\n\nfunction dateGetter(name, size, offset, trim) {\n offset = offset || 0;\n return function(date) {\n var value = date['get' + name]();\n if (offset > 0 || value > -offset)\n value += offset;\n if (value === 0 && offset == -12 ) value = 12;\n return padNumber(value, size, trim);\n };\n}\n\nfunction dateStrGetter(name, shortForm) {\n return function(date, formats) {\n var value = date['get' + name]();\n var get = uppercase(shortForm ? ('SHORT' + name) : name);\n\n return formats[get][value];\n };\n}\n\nfunction timeZoneGetter(date) {\n var zone = -1 * date.getTimezoneOffset();\n var paddedZone = (zone >= 0) ? \"+\" : \"\";\n\n paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n padNumber(Math.abs(zone % 60), 2);\n\n return paddedZone;\n}\n\nfunction getFirstThursdayOfYear(year) {\n // 0 = index of January\n var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();\n // 4 = index of Thursday (+1 to account for 1st = 5)\n // 11 = index of *next* Thursday (+1 account for 1st = 12)\n return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);\n}\n\nfunction getThursdayThisWeek(datetime) {\n return new Date(datetime.getFullYear(), datetime.getMonth(),\n // 4 = index of Thursday\n datetime.getDate() + (4 - datetime.getDay()));\n}\n\nfunction weekGetter(size) {\n return function(date) {\n var firstThurs = getFirstThursdayOfYear(date.getFullYear()),\n thisThurs = getThursdayThisWeek(date);\n\n var diff = +thisThurs - +firstThurs,\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n\n return padNumber(result, size);\n };\n}\n\nfunction ampmGetter(date, formats) {\n return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n}\n\nvar DATE_FORMATS = {\n yyyy: dateGetter('FullYear', 4),\n yy: dateGetter('FullYear', 2, 0, true),\n y: dateGetter('FullYear', 1),\n MMMM: dateStrGetter('Month'),\n MMM: dateStrGetter('Month', true),\n MM: dateGetter('Month', 2, 1),\n M: dateGetter('Month', 1, 1),\n dd: dateGetter('Date', 2),\n d: dateGetter('Date', 1),\n HH: dateGetter('Hours', 2),\n H: dateGetter('Hours', 1),\n hh: dateGetter('Hours', 2, -12),\n h: dateGetter('Hours', 1, -12),\n mm: dateGetter('Minutes', 2),\n m: dateGetter('Minutes', 1),\n ss: dateGetter('Seconds', 2),\n s: dateGetter('Seconds', 1),\n // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n sss: dateGetter('Milliseconds', 3),\n EEEE: dateStrGetter('Day'),\n EEE: dateStrGetter('Day', true),\n a: ampmGetter,\n Z: timeZoneGetter,\n ww: weekGetter(2),\n w: weekGetter(1)\n};\n\nvar DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,\n NUMBER_STRING = /^\\-?\\d+$/;\n\n/**\n * @ngdoc filter\n * @name date\n * @kind function\n *\n * @description\n * Formats `date` to a string based on the requested `format`.\n *\n * `format` string can be composed of the following elements:\n *\n * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n * * `'MMMM'`: Month in year (January-December)\n * * `'MMM'`: Month in year (Jan-Dec)\n * * `'MM'`: Month in year, padded (01-12)\n * * `'M'`: Month in year (1-12)\n * * `'dd'`: Day in month, padded (01-31)\n * * `'d'`: Day in month (1-31)\n * * `'EEEE'`: Day in Week,(Sunday-Saturday)\n * * `'EEE'`: Day in Week, (Sun-Sat)\n * * `'HH'`: Hour in day, padded (00-23)\n * * `'H'`: Hour in day (0-23)\n * * `'hh'`: Hour in AM/PM, padded (01-12)\n * * `'h'`: Hour in AM/PM, (1-12)\n * * `'mm'`: Minute in hour, padded (00-59)\n * * `'m'`: Minute in hour (0-59)\n * * `'ss'`: Second in minute, padded (00-59)\n * * `'s'`: Second in minute (0-59)\n * * `'.sss' or ',sss'`: Millisecond in second, padded (000-999)\n * * `'a'`: AM/PM marker\n * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n * * `'ww'`: ISO-8601 week of year (00-53)\n * * `'w'`: ISO-8601 week of year (0-53)\n *\n * `format` string can also be one of the following predefined\n * {@link guide/i18n localizable formats}:\n *\n * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n * (e.g. Sep 3, 2010 12:05:08 PM)\n * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM)\n * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale\n * (e.g. Friday, September 3, 2010)\n * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)\n * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)\n * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)\n * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)\n *\n * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.\n * `\"h 'in the morning'\"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence\n * (e.g. `\"h 'o''clock'\"`).\n *\n * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its\n * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n * specified in the string input, the time is considered to be in the local timezone.\n * @param {string=} format Formatting rules (see Description). If not specified,\n * `mediumDate` is used.\n * @param {string=} timezone Timezone to be used for formatting. Right now, only `'UTC'` is supported.\n * If not specified, the timezone of the browser will be used.\n * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n *\n * @example\n \n \n {{1288323623006 | date:'medium'}}:\n {{1288323623006 | date:'medium'}}\n {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}:\n {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}\n {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}:\n {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}\n {{1288323623006 | date:\"MM/dd/yyyy 'at' h:mma\"}}:\n {{'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"}}\n \n \n it('should format date', function() {\n expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n toMatch(/2010\\-10\\-2\\d \\d{2}:\\d{2}:\\d{2} (\\-|\\+)?\\d{4}/);\n expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n expect(element(by.binding(\"'1288323623006' | date:\\\"MM/dd/yyyy 'at' h:mma\\\"\")).getText()).\n toMatch(/10\\/2\\d\\/2010 at \\d{1,2}:\\d{2}(AM|PM)/);\n });\n \n \n */\ndateFilter.$inject = ['$locale'];\nfunction dateFilter($locale) {\n\n\n var R_ISO8601_STR = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n // 1 2 3 4 5 6 7 8 9 10 11\n function jsonStringToDate(string) {\n var match;\n if (match = string.match(R_ISO8601_STR)) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = int(match[9] + match[10]);\n tzMin = int(match[9] + match[11]);\n }\n dateSetter.call(date, int(match[1]), int(match[2]) - 1, int(match[3]));\n var h = int(match[4]||0) - tzHour;\n var m = int(match[5]||0) - tzMin;\n var s = int(match[6]||0);\n var ms = Math.round(parseFloat('0.' + (match[7]||0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }\n\n\n return function(date, format, timezone) {\n var text = '',\n parts = [],\n fn, match;\n\n format = format || 'mediumDate';\n format = $locale.DATETIME_FORMATS[format] || format;\n if (isString(date)) {\n date = NUMBER_STRING.test(date) ? int(date) : jsonStringToDate(date);\n }\n\n if (isNumber(date)) {\n date = new Date(date);\n }\n\n if (!isDate(date)) {\n return date;\n }\n\n while(format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = concat(parts, match, 1);\n format = parts.pop();\n } else {\n parts.push(format);\n format = null;\n }\n }\n\n if (timezone && timezone === 'UTC') {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + date.getTimezoneOffset());\n }\n forEach(parts, function(value){\n fn = DATE_FORMATS[value];\n text += fn ? fn(date, $locale.DATETIME_FORMATS)\n : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n });\n\n return text;\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name json\n * @kind function\n *\n * @description\n * Allows you to convert a JavaScript object into JSON string.\n *\n * This filter is mostly useful for debugging. When using the double curly {{value}} notation\n * the binding is automatically converted to JSON.\n *\n * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n * @returns {string} JSON string.\n *\n *\n * @example\n \n \n {{ {'name':'value'} | json }}\n \n \n it('should jsonify filtered objects', function() {\n expect(element(by.binding(\"{'name':'value'}\")).getText()).toMatch(/\\{\\n \"name\": ?\"value\"\\n}/);\n });\n \n \n *\n */\nfunction jsonFilter() {\n return function(object) {\n return toJson(object, true);\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name lowercase\n * @kind function\n * @description\n * Converts string to lowercase.\n * @see angular.lowercase\n */\nvar lowercaseFilter = valueFn(lowercase);\n\n\n/**\n * @ngdoc filter\n * @name uppercase\n * @kind function\n * @description\n * Converts string to uppercase.\n * @see angular.uppercase\n */\nvar uppercaseFilter = valueFn(uppercase);\n\n/**\n * @ngdoc filter\n * @name limitTo\n * @kind function\n *\n * @description\n * Creates a new array or string containing only a specified number of elements. The elements\n * are taken from either the beginning or the end of the source array, string or number, as specified by\n * the value and sign (positive or negative) of `limit`. If a number is used as input, it is\n * converted to a string.\n *\n * @param {Array|string|number} input Source array, string or number to be limited.\n * @param {string|number} limit The length of the returned array or string. If the `limit` number\n * is positive, `limit` number of items from the beginning of the source array/string are copied.\n * If the number is negative, `limit` number of items from the end of the source array/string\n * are copied. The `limit` will be trimmed if it exceeds `array.length`\n * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array\n * had less than `limit` elements.\n *\n * @example\n \n \n \n \n Limit {{numbers}} to: \n Output numbers: {{ numbers | limitTo:numLimit }}\n Limit {{letters}} to: \n Output letters: {{ letters | limitTo:letterLimit }}\n Limit {{longNumber}} to: \n Output long number: {{ longNumber | limitTo:longNumberLimit }}\n \n \n \n var numLimitInput = element(by.model('numLimit'));\n var letterLimitInput = element(by.model('letterLimit'));\n var longNumberLimitInput = element(by.model('longNumberLimit'));\n var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));\n\n it('should limit the number array to first three items', function() {\n expect(numLimitInput.getAttribute('value')).toBe('3');\n expect(letterLimitInput.getAttribute('value')).toBe('3');\n expect(longNumberLimitInput.getAttribute('value')).toBe('3');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n expect(limitedLetters.getText()).toEqual('Output letters: abc');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 234');\n });\n\n // There is a bug in safari and protractor that doesn't like the minus key\n // it('should update the output when -3 is entered', function() {\n // numLimitInput.clear();\n // numLimitInput.sendKeys('-3');\n // letterLimitInput.clear();\n // letterLimitInput.sendKeys('-3');\n // longNumberLimitInput.clear();\n // longNumberLimitInput.sendKeys('-3');\n // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n // expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n // expect(limitedLongNumber.getText()).toEqual('Output long number: 342');\n // });\n\n it('should not exceed the maximum size of input array', function() {\n numLimitInput.clear();\n numLimitInput.sendKeys('100');\n letterLimitInput.clear();\n letterLimitInput.sendKeys('100');\n longNumberLimitInput.clear();\n longNumberLimitInput.sendKeys('100');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');\n });\n \n \n*/\nfunction limitToFilter(){\n return function(input, limit) {\n if (isNumber(input)) input = input.toString();\n if (!isArray(input) && !isString(input)) return input;\n\n if (Math.abs(Number(limit)) === Infinity) {\n limit = Number(limit);\n } else {\n limit = int(limit);\n }\n\n if (isString(input)) {\n //NaN check on limit\n if (limit) {\n return limit >= 0 ? input.slice(0, limit) : input.slice(limit, input.length);\n } else {\n return \"\";\n }\n }\n\n var out = [],\n i, n;\n\n // if abs(limit) exceeds maximum length, trim it\n if (limit > input.length)\n limit = input.length;\n else if (limit < -input.length)\n limit = -input.length;\n\n if (limit > 0) {\n i = 0;\n n = limit;\n } else {\n i = input.length + limit;\n n = input.length;\n }\n\n for (; i} expression A predicate to be\n * used by the comparator to determine the order of elements.\n *\n * Can be one of:\n *\n * - `function`: Getter function. The result of this function will be sorted using the\n * `<`, `=`, `>` operator.\n * - `string`: An Angular expression. The result of this expression is used to compare elements\n * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by\n * 3 first characters of a property called `name`). The result of a constant expression\n * is interpreted as a property name to be used in comparisons (for example `\"special name\"`\n * to sort object by the value of their `special name` property). An expression can be\n * optionally prefixed with `+` or `-` to control ascending or descending sort order\n * (for example, `+name` or `-name`).\n * - `Array`: An array of function or string predicates. The first predicate in the array\n * is used for sorting, but when two items are equivalent, the next predicate is used.\n *\n * @param {boolean=} reverse Reverse the order of the array.\n * @returns {Array} Sorted copy of the source array.\n *\n * @example\n \n \n \n \n Sorting predicate = {{predicate}}; reverse = {{reverse}}\n \n [ unsorted ]\n \n \n Name\n (^)\n Phone Number\n Age\n \n \n {{friend.name}}\n {{friend.phone}}\n {{friend.age}}\n \n \n \n \n \n *\n * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the\n * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the\n * desired parameters.\n *\n * Example:\n *\n * @example\n \n \n \n \n \n Name\n (^)\n Phone Number\n Age\n \n \n {{friend.name}}\n {{friend.phone}}\n {{friend.age}}\n \n \n \n \n\n \n angular.module('orderByExample', [])\n .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {\n var orderBy = $filter('orderBy');\n $scope.friends = [\n { name: 'John', phone: '555-1212', age: 10 },\n { name: 'Mary', phone: '555-9876', age: 19 },\n { name: 'Mike', phone: '555-4321', age: 21 },\n { name: 'Adam', phone: '555-5678', age: 35 },\n { name: 'Julie', phone: '555-8765', age: 29 }\n ];\n $scope.order = function(predicate, reverse) {\n $scope.friends = orderBy($scope.friends, predicate, reverse);\n };\n $scope.order('-age',false);\n }]);\n \n\n */\norderByFilter.$inject = ['$parse'];\nfunction orderByFilter($parse){\n return function(array, sortPredicate, reverseOrder) {\n if (!(isArrayLike(array))) return array;\n if (!sortPredicate) return array;\n sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];\n sortPredicate = sortPredicate.map(function(predicate){\n var descending = false, get = predicate || identity;\n if (isString(predicate)) {\n if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {\n descending = predicate.charAt(0) == '-';\n predicate = predicate.substring(1);\n }\n get = $parse(predicate);\n if (get.constant) {\n var key = get();\n return reverseComparator(function(a,b) {\n return compare(a[key], b[key]);\n }, descending);\n }\n }\n return reverseComparator(function(a,b){\n return compare(get(a),get(b));\n }, descending);\n });\n var arrayCopy = [];\n for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); }\n return arrayCopy.sort(reverseComparator(comparator, reverseOrder));\n\n function comparator(o1, o2){\n for ( var i = 0; i < sortPredicate.length; i++) {\n var comp = sortPredicate[i](o1, o2);\n if (comp !== 0) return comp;\n }\n return 0;\n }\n function reverseComparator(comp, descending) {\n return descending\n ? function(a,b){return comp(b,a);}\n : comp;\n }\n function compare(v1, v2){\n var t1 = typeof v1;\n var t2 = typeof v2;\n if (t1 == t2) {\n if (isDate(v1) && isDate(v2)) {\n v1 = v1.valueOf();\n v2 = v2.valueOf();\n }\n if (t1 == \"string\") {\n v1 = v1.toLowerCase();\n v2 = v2.toLowerCase();\n }\n if (v1 === v2) return 0;\n return v1 < v2 ? -1 : 1;\n } else {\n return t1 < t2 ? -1 : 1;\n }\n }\n };\n}\n\nfunction ngDirective(directive) {\n if (isFunction(directive)) {\n directive = {\n link: directive\n };\n }\n directive.restrict = directive.restrict || 'AC';\n return valueFn(directive);\n}\n\n/**\n * @ngdoc directive\n * @name a\n * @restrict E\n *\n * @description\n * Modifies the default behavior of the html A tag so that the default action is prevented when\n * the href attribute is empty.\n *\n * This change permits the easy creation of action links with the `ngClick` directive\n * without changing the location or causing page reloads, e.g.:\n * `Add Item`\n */\nvar htmlAnchorDirective = valueFn({\n restrict: 'E',\n compile: function(element, attr) {\n\n if (msie <= 8) {\n\n // turn link into a stylable link in IE\n // but only if it doesn't have name attribute, in which case it's an anchor\n if (!attr.href && !attr.name) {\n attr.$set('href', '');\n }\n\n // add a comment node to anchors to workaround IE bug that causes element content to be reset\n // to new attribute content if attribute is updated with value containing @ and element also\n // contains value with @\n // see issue #1949\n element.append(document.createComment('IE fix'));\n }\n\n if (!attr.href && !attr.xlinkHref && !attr.name) {\n return function(scope, element) {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n 'xlink:href' : 'href';\n element.on('click', function(event){\n // if we have no href url, then don't navigate anywhere.\n if (!element.attr(href)) {\n event.preventDefault();\n }\n });\n };\n }\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngHref\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in an href attribute will\n * make the link go to the wrong URL if the user clicks it before\n * Angular has a chance to replace the `{{hash}}` markup with its\n * value. Until Angular replaces the markup the link will be broken\n * and will most likely return a 404 error.\n *\n * The `ngHref` directive solves this problem.\n *\n * The wrong way to write it:\n * ```html\n * link1\n * ```\n *\n * The correct way to write it:\n * ```html\n * link1\n * ```\n *\n * @element A\n * @param {template} ngHref any string which can contain `{{}}` markup.\n *\n * @example\n * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n * in links and their different behaviors:\n \n \n \n link 1 (link, don't reload)\n link 2 (link, don't reload)\n link 3 (link, reload!)\n anchor (link, don't reload)\n anchor (no link)\n link (link, change location)\n \n \n it('should execute ng-click but not reload when href without value', function() {\n element(by.id('link-1')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when href empty string', function() {\n element(by.id('link-2')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click and change url when ng-href specified', function() {\n expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\n element(by.id('link-3')).click();\n\n // At this point, we navigate away from an Angular page, so we need\n // to use browser.driver to get the base webdriver.\n\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/123$/);\n });\n }, 5000, 'page should navigate to /123');\n });\n\n xit('should execute ng-click but not reload when href empty string and name specified', function() {\n element(by.id('link-4')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when no href but name specified', function() {\n element(by.id('link-5')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n });\n\n it('should only change url when only ng-href', function() {\n element(by.model('value')).clear();\n element(by.model('value')).sendKeys('6');\n expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\n element(by.id('link-6')).click();\n\n // At this point, we navigate away from an Angular page, so we need\n // to use browser.driver to get the base webdriver.\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/6$/);\n });\n }, 5000, 'page should navigate to /6');\n });\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngSrc\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `src` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrc` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * \n * ```\n *\n * The correct way to write it:\n * ```html\n * \n * ```\n *\n * @element IMG\n * @param {template} ngSrc any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngSrcset\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrcset` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * \n * ```\n *\n * The correct way to write it:\n * ```html\n * \n * ```\n *\n * @element IMG\n * @param {template} ngSrcset any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngDisabled\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * We shouldn't do this, because it will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:\n * ```html\n * \n * Disabled\n * \n * ```\n *\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as disabled. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngDisabled` directive solves this problem for the `disabled` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n \n \n Click me to toggle: \n Button\n \n \n it('should toggle button', function() {\n expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();\n });\n \n \n *\n * @element INPUT\n * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,\n * then special attribute \"disabled\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngChecked\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as checked. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngChecked` directive solves this problem for the `checked` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me to check both: \n \n \n \n it('should check both checkBoxes', function() {\n expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();\n element(by.model('master')).click();\n expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();\n });\n \n \n *\n * @element INPUT\n * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,\n * then special attribute \"checked\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngReadonly\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as readonly. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngReadonly` directive solves this problem for the `readonly` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me to make text readonly: \n \n \n \n it('should toggle readonly attr', function() {\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n });\n \n \n *\n * @element INPUT\n * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,\n * then special attribute \"readonly\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSelected\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as selected. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngSelected` directive solves this problem for the `selected` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n \n \n Check me to select: \n \n Hello!\n Greetings!\n \n \n \n it('should select Greetings!', function() {\n expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n element(by.model('selected')).click();\n expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n });\n \n \n *\n * @element OPTION\n * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,\n * then special attribute \"selected\" will be set on the element\n */\n\n/**\n * @ngdoc directive\n * @name ngOpen\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as open. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngOpen` directive solves this problem for the `open` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me check multiple: \n \n Show/Hide me\n \n \n \n it('should toggle open', function() {\n expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n element(by.model('open')).click();\n expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n });\n \n \n *\n * @element DETAILS\n * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,\n * then special attribute \"open\" will be set on the element\n */\n\nvar ngAttributeAliasDirectives = {};\n\n\n// boolean attrs are evaluated\nforEach(BOOLEAN_ATTR, function(propName, attrName) {\n // binding to multiple is not supported\n if (propName == \"multiple\") return;\n\n var normalized = directiveNormalize('ng-' + attrName);\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n restrict: 'A',\n priority: 100,\n link: function(scope, element, attr) {\n scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n attr.$set(attrName, !!value);\n });\n }\n };\n };\n});\n\n// aliased input attrs are evaluated\nforEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {\n ngAttributeAliasDirectives[ngAttr] = function() {\n return {\n priority: 100,\n link: function(scope, element, attr) {\n //special case ngPattern when a literal regular expression value\n //is used as the expression (this way we don't have to watch anything).\n if (ngAttr === \"ngPattern\" && attr.ngPattern.charAt(0) == \"/\") {\n var match = attr.ngPattern.match(REGEX_STRING_REGEXP);\n if (match) {\n attr.$set(\"ngPattern\", new RegExp(match[1], match[2]));\n return;\n }\n }\n\n scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {\n attr.$set(ngAttr, value);\n });\n }\n };\n };\n});\n\n// ng-src, ng-srcset, ng-href are interpolated\nforEach(['src', 'srcset', 'href'], function(attrName) {\n var normalized = directiveNormalize('ng-' + attrName);\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n priority: 99, // it needs to run after the attributes are interpolated\n link: function(scope, element, attr) {\n var propName = attrName,\n name = attrName;\n\n if (attrName === 'href' &&\n toString.call(element.prop('href')) === '[object SVGAnimatedString]') {\n name = 'xlinkHref';\n attr.$attr[name] = 'xlink:href';\n propName = null;\n }\n\n attr.$observe(normalized, function(value) {\n if (!value) {\n if (attrName === 'href') {\n attr.$set(name, null);\n }\n return;\n }\n\n attr.$set(name, value);\n\n // on IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n // to set the property as well to achieve the desired effect.\n // we use attr[attrName] value since $set can sanitize the url.\n if (msie && propName) element.prop(propName, attr[name]);\n });\n }\n };\n };\n});\n\n/* global -nullFormCtrl, -SUBMITTED_CLASS, addSetValidityMethod: true\n */\nvar nullFormCtrl = {\n $addControl: noop,\n $$renameControl: nullFormRenameControl,\n $removeControl: noop,\n $setValidity: noop,\n $$setPending: noop,\n $setDirty: noop,\n $setPristine: noop,\n $setSubmitted: noop,\n $$clearControlValidity: noop\n},\nSUBMITTED_CLASS = 'ng-submitted';\n\nfunction nullFormRenameControl(control, name) {\n control.$name = name;\n}\n\n/**\n * @ngdoc type\n * @name form.FormController\n *\n * @property {boolean} $pristine True if user has not interacted with the form yet.\n * @property {boolean} $dirty True if user has already interacted with the form.\n * @property {boolean} $valid True if all of the containing forms and controls are valid.\n * @property {boolean} $invalid True if at least one containing control or form is invalid.\n * @property {boolean} $submitted True if user has submitted the form even if its invalid.\n *\n * @property {Object} $error Is an object hash, containing references to controls or\n * forms with failing validators, where:\n *\n * - keys are validation tokens (error names),\n * - values are arrays of controls or forms that have a failing validator for given error name.\n *\n * Built-in validation tokens:\n *\n * - `email`\n * - `max`\n * - `maxlength`\n * - `min`\n * - `minlength`\n * - `number`\n * - `pattern`\n * - `required`\n * - `url`\n *\n * @description\n * `FormController` keeps track of all its controls and nested forms as well as the state of them,\n * such as being valid/invalid or dirty/pristine.\n *\n * Each {@link ng.directive:form form} directive creates an instance\n * of `FormController`.\n *\n */\n//asks for $scope to fool the BC controller module\nFormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];\nfunction FormController(element, attrs, $scope, $animate, $interpolate) {\n var form = this,\n controls = [];\n\n var parentForm = form.$$parentForm = element.parent().controller('form') || nullFormCtrl;\n\n // init state\n form.$error = {};\n form.$$success = {};\n form.$pending = undefined;\n form.$name = $interpolate(attrs.name || attrs.ngForm || '')($scope);\n form.$dirty = false;\n form.$pristine = true;\n form.$valid = true;\n form.$invalid = false;\n form.$submitted = false;\n\n parentForm.$addControl(form);\n\n // Setup initial state of the control\n element.addClass(PRISTINE_CLASS);\n\n /**\n * @ngdoc method\n * @name form.FormController#$rollbackViewValue\n *\n * @description\n * Rollback all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is typically needed by the reset button of\n * a form that uses `ng-model-options` to pend updates.\n */\n form.$rollbackViewValue = function() {\n forEach(controls, function(control) {\n control.$rollbackViewValue();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$commitViewValue\n *\n * @description\n * Commit all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n form.$commitViewValue = function() {\n forEach(controls, function(control) {\n control.$commitViewValue();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$addControl\n *\n * @description\n * Register a control with the form.\n *\n * Input elements using ngModelController do this automatically when they are linked.\n */\n form.$addControl = function(control) {\n // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n // and not added to the scope. Now we throw an error.\n assertNotHasOwnProperty(control.$name, 'input');\n controls.push(control);\n\n if (control.$name) {\n form[control.$name] = control;\n }\n };\n\n // Private API: rename a form control\n form.$$renameControl = function(control, newName) {\n var oldName = control.$name;\n\n if (form[oldName] === control) {\n delete form[oldName];\n }\n form[newName] = control;\n control.$name = newName;\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$removeControl\n *\n * @description\n * Deregister a control from the form.\n *\n * Input elements using ngModelController do this automatically when they are destroyed.\n */\n form.$removeControl = function(control) {\n if (control.$name && form[control.$name] === control) {\n delete form[control.$name];\n }\n forEach(form.$pending, function(value, name) {\n form.$setValidity(name, null, control);\n });\n forEach(form.$error, function(value, name) {\n form.$setValidity(name, null, control);\n });\n\n arrayRemove(controls, control);\n };\n\n\n /**\n * @ngdoc method\n * @name form.FormController#$setValidity\n *\n * @description\n * Sets the validity of a form control.\n *\n * This method will also propagate to parent forms.\n */\n addSetValidityMethod({\n ctrl: this,\n $element: element,\n set: function(object, property, control) {\n var list = object[property];\n if (!list) {\n object[property] = [control];\n } else {\n var index = list.indexOf(control);\n if (index === -1) {\n list.push(control);\n }\n }\n },\n unset: function(object, property, control) {\n var list = object[property];\n if (!list) {\n return;\n }\n arrayRemove(list, control);\n if (list.length === 0) {\n delete object[property];\n }\n },\n parentForm: parentForm,\n $animate: $animate\n });\n\n /**\n * @ngdoc method\n * @name form.FormController#$setDirty\n *\n * @description\n * Sets the form to a dirty state.\n *\n * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n * state (ng-dirty class). This method will also propagate to parent forms.\n */\n form.$setDirty = function() {\n $animate.removeClass(element, PRISTINE_CLASS);\n $animate.addClass(element, DIRTY_CLASS);\n form.$dirty = true;\n form.$pristine = false;\n parentForm.$setDirty();\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setPristine\n *\n * @description\n * Sets the form to its pristine state.\n *\n * This method can be called to remove the 'ng-dirty' class and set the form to its pristine\n * state (ng-pristine class). This method will also propagate to all the controls contained\n * in this form.\n *\n * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n * saving or resetting it.\n */\n form.$setPristine = function () {\n $animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);\n form.$dirty = false;\n form.$pristine = true;\n form.$submitted = false;\n forEach(controls, function(control) {\n control.$setPristine();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setUntouched\n *\n * @description\n * Sets the form to its untouched state.\n *\n * This method can be called to remove the 'ng-touched' class and set the form controls to their\n * untouched state (ng-untouched class).\n *\n * Setting a form controls back to their untouched state is often useful when setting the form\n * back to its pristine state.\n */\n form.$setUntouched = function () {\n forEach(controls, function(control) {\n control.$setUntouched();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setSubmitted\n *\n * @description\n * Sets the form to its submitted state.\n */\n form.$setSubmitted = function () {\n $animate.addClass(element, SUBMITTED_CLASS);\n form.$submitted = true;\n parentForm.$setSubmitted();\n };\n}\n\n/**\n * @ngdoc directive\n * @name ngForm\n * @restrict EAC\n *\n * @description\n * Nestable alias of {@link ng.directive:form `form`} directive. HTML\n * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a\n * sub-group of controls needs to be determined.\n *\n * Note: the purpose of `ngForm` is to group controls,\n * but not to be a replacement for the `` tag with all of its capabilities\n * (e.g. posting to the server, ...).\n *\n * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n *\n */\n\n /**\n * @ngdoc directive\n * @name form\n * @restrict E\n *\n * @description\n * Directive that instantiates\n * {@link form.FormController FormController}.\n *\n * If the `name` attribute is specified, the form controller is published onto the current scope under\n * this name.\n *\n * # Alias: {@link ng.directive:ngForm `ngForm`}\n *\n * In Angular forms can be nested. This means that the outer form is valid when all of the child\n * forms are valid as well. However, browsers do not allow nesting of `` elements, so\n * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to\n * `` but can be nested. This allows you to have nested forms, which is very useful when\n * using Angular validation directives in forms that are dynamically generated using the\n * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`\n * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an\n * `ngForm` directive and nest these in an outer `form` element.\n *\n *\n * # CSS classes\n * - `ng-valid` is set if the form is valid.\n * - `ng-invalid` is set if the form is invalid.\n * - `ng-pristine` is set if the form is pristine.\n * - `ng-dirty` is set if the form is dirty.\n * - `ng-submitted` is set if the form was submitted.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n *\n * # Submitting a form and preventing the default action\n *\n * Since the role of forms in client-side Angular applications is different than in classical\n * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n * page reload that sends the data to the server. Instead some javascript logic should be triggered\n * to handle the form submission in an application-specific way.\n *\n * For this reason, Angular prevents the default action (form submission to the server) unless the\n * `` element has an `action` attribute specified.\n *\n * You can use one of the following two ways to specify what javascript method should be called when\n * a form is submitted:\n *\n * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n * - {@link ng.directive:ngClick ngClick} directive on the first\n * button or input field of type submit (input[type=submit])\n *\n * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n * or {@link ng.directive:ngClick ngClick} directives.\n * This is because of the following form submission rules in the HTML specification:\n *\n * - If a form has only one input field then hitting enter in this field triggers form submit\n * (`ngSubmit`)\n * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n * doesn't trigger submit\n * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n *\n * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is\n * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * ## Animation Hooks\n *\n * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.\n * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any\n * other validations that are performed within the form. Animations in ngForm are similar to how\n * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well\n * as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style a form element\n * that has been rendered as invalid after it has been validated:\n *\n * \n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-form {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-form.ng-invalid {\n * background: red;\n * color:white;\n * }\n * \n *\n * @example\n \n \n \n \n \n userType: \n Required!\n userType = {{userType}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n it('should initialize to model', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n expect(userType.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n var userInput = element(by.model('userType'));\n\n userInput.clear();\n userInput.sendKeys('');\n\n expect(userType.getText()).toEqual('userType =');\n expect(valid.getText()).toContain('false');\n });\n \n \n *\n * @param {string=} name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n */\nvar formDirectiveFactory = function(isNgForm) {\n return ['$timeout', function($timeout) {\n var formDirective = {\n name: 'form',\n restrict: isNgForm ? 'EAC' : 'E',\n controller: FormController,\n compile: function() {\n return {\n pre: function(scope, formElement, attr, controller) {\n if (!attr.action) {\n // we can't use jq events because if a form is destroyed during submission the default\n // action is not prevented. see #1238\n //\n // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n // page reload if the form was destroyed by submission of the form via a click handler\n // on a button in the form. Looks like an IE9 specific bug.\n var handleFormSubmission = function(event) {\n scope.$apply(function() {\n controller.$commitViewValue();\n controller.$setSubmitted();\n });\n\n event.preventDefault\n ? event.preventDefault()\n : event.returnValue = false; // IE\n };\n\n addEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n\n // unregister the preventDefault listener so that we don't not leak memory but in a\n // way that will achieve the prevention of the default action.\n formElement.on('$destroy', function() {\n $timeout(function() {\n removeEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n }, 0, false);\n });\n }\n\n var parentFormCtrl = controller.$$parentForm,\n alias = controller.$name;\n\n if (alias) {\n setter(scope, alias, controller, alias);\n attr.$observe(attr.name ? 'name' : 'ngForm', function(newValue) {\n if (alias === newValue) return;\n setter(scope, alias, undefined, alias);\n alias = newValue;\n setter(scope, alias, controller, alias);\n parentFormCtrl.$$renameControl(controller, alias);\n });\n }\n if (parentFormCtrl !== nullFormCtrl) {\n formElement.on('$destroy', function() {\n parentFormCtrl.$removeControl(controller);\n if (alias) {\n setter(scope, alias, undefined, alias);\n }\n extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n });\n }\n }\n };\n }\n };\n\n return formDirective;\n }];\n};\n\nvar formDirective = formDirectiveFactory();\nvar ngFormDirective = formDirectiveFactory(true);\n\n/* global VALID_CLASS: true,\n INVALID_CLASS: true,\n PRISTINE_CLASS: true,\n DIRTY_CLASS: true,\n UNTOUCHED_CLASS: true,\n TOUCHED_CLASS: true,\n*/\n\n// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231\nvar ISO_DATE_REGEXP = /\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z)/;\nvar URL_REGEXP = /^(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$/;\nvar EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;\nvar NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))\\s*$/;\nvar DATE_REGEXP = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nvar DATETIMELOCAL_REGEXP = /^(\\d{4})-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar WEEK_REGEXP = /^(\\d{4})-W(\\d\\d)$/;\nvar MONTH_REGEXP = /^(\\d{4})-(\\d\\d)$/;\nvar TIME_REGEXP = /^(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar DEFAULT_REGEXP = /(\\s+|^)default(\\s+|$)/;\n\nvar $ngModelMinErr = new minErr('ngModel');\n\nvar inputType = {\n\n /**\n * @ngdoc input\n * @name input[text]\n *\n * @description\n * Standard HTML text input with angular data binding, inherited by most of the `input` elements.\n *\n * *NOTE* Not every feature offered is available for all input types.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Adds `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n \n \n \n \n Single word: \n \n Required!\n \n Single word only!\n\n text = {{text}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if multi word', function() {\n input.clear();\n input.sendKeys('hello world');\n\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'text': textInputType,\n\n /**\n * @ngdoc input\n * @name input[date]\n *\n * @description\n * Input with date validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601\n * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many\n * modern browsers do not yet support this input type, it is important to provide cues to users on the\n * expected input format via a placeholder or label. The model must always be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO date string (yyyy-MM-dd).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO date string (yyyy-MM-dd).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a date in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-MM-dd\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-MM-dd\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (see https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10-22');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'date': createDateInputType('date', DATE_REGEXP,\n createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),\n 'yyyy-MM-dd'),\n\n /**\n * @ngdoc input\n * @name input[dateTimeLocal]\n *\n * @description\n * Input with datetime validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`. The model must be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO datetime format (yyyy-MM-ddTHH:mm:ss).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a date between in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-MM-ddTHH:mm:ss\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-MM-ddTHH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2010-12-28T14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01T23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,\n createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),\n 'yyyy-MM-ddTHH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[time]\n *\n * @description\n * Input with time validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a\n * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO time format (HH:mm:ss).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be a\n * valid ISO time format (HH:mm:ss).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a between 8am and 5pm:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"HH:mm:ss\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"HH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'time': createDateInputType('time', TIME_REGEXP,\n createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),\n 'HH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[week]\n *\n * @description\n * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support\n * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * week format (yyyy-W##), for example: `2013-W02`. The model must always be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO week format (yyyy-W##).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO week format (yyyy-W##).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a date between in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-Www\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-Www\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-W01');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-W01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),\n\n /**\n * @ngdoc input\n * @name input[month]\n *\n * @description\n * Input with month validation and transformation. In browsers that do not yet support\n * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * month format (yyyy-MM), for example: `2009-01`. The model must always be a Date object. In the event the model is\n * not set to the first of the month, the first of that model's month is assumed.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be\n * a valid ISO month format (yyyy-MM).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must\n * be a valid ISO month format (yyyy-MM).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a month int 2013:\n \n \n Required!\n \n Not a valid month!\n value = {{value | date: \"yyyy-MM\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-MM\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'month': createDateInputType('month', MONTH_REGEXP,\n createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),\n 'yyyy-MM'),\n\n /**\n * @ngdoc input\n * @name input[number]\n *\n * @description\n * Text input with number validation and transformation. Sets the `number` validation\n * error if not a valid number.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Number: \n \n Required!\n \n Not valid number!\n value = {{value}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('12');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if over max', function() {\n input.clear();\n input.sendKeys('123');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'number': numberInputType,\n\n\n /**\n * @ngdoc input\n * @name input[url]\n *\n * @description\n * Text input with URL validation. Sets the `url` validation error key if the content is not a\n * valid URL.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n URL: \n \n Required!\n \n Not valid url!\n text = {{text}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n myForm.$error.url = {{!!myForm.$error.url}}\n \n \n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('http://google.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not url', function() {\n input.clear();\n input.sendKeys('box');\n\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'url': urlInputType,\n\n\n /**\n * @ngdoc input\n * @name input[email]\n *\n * @description\n * Text input with email validation. Sets the `email` validation error key if not a valid email\n * address.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Email: \n \n Required!\n \n Not valid email!\n text = {{text}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n myForm.$error.email = {{!!myForm.$error.email}}\n \n \n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('me@example.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not email', function() {\n input.clear();\n input.sendKeys('xxx');\n\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'email': emailInputType,\n\n\n /**\n * @ngdoc input\n * @name input[radio]\n *\n * @description\n * HTML radio button.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string} value The value to which the expression should be set when selected.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {string} ngValue Angular expression which sets the value to which the expression should\n * be set when selected.\n *\n * @example\n \n \n \n \n Red \n Green \n Blue \n color = {{color | json}}\n \n Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n \n \n it('should change state', function() {\n var color = element(by.binding('color'));\n\n expect(color.getText()).toContain('blue');\n\n element.all(by.model('color')).get(0).click();\n\n expect(color.getText()).toContain('red');\n });\n \n \n */\n 'radio': radioInputType,\n\n\n /**\n * @ngdoc input\n * @name input[checkbox]\n *\n * @description\n * HTML checkbox.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {expression=} ngTrueValue The value to which the expression should be set when selected.\n * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Value1: \n Value2: \n value1 = {{value1}}\n value2 = {{value2}}\n \n \n \n it('should change state', function() {\n var value1 = element(by.binding('value1'));\n var value2 = element(by.binding('value2'));\n\n expect(value1.getText()).toContain('true');\n expect(value2.getText()).toContain('YES');\n\n element(by.model('value1')).click();\n element(by.model('value2')).click();\n\n expect(value1.getText()).toContain('false');\n expect(value2.getText()).toContain('NO');\n });\n \n \n */\n 'checkbox': checkboxInputType,\n\n 'hidden': noop,\n 'button': noop,\n 'submit': noop,\n 'reset': noop,\n 'file': noop\n};\n\nfunction testFlags(validity, flags) {\n var i, flag;\n if (flags) {\n for (i=0; i= minVal;\n };\n attr.$observe('min', function(val) {\n minVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n if (isDefined(attr.max) || attr.ngMax) {\n var maxVal;\n ctrl.$validators.max = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(maxVal) || parseDate(value) <= maxVal;\n };\n attr.$observe('max', function(val) {\n maxVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n function parseObservedDateValue(val) {\n return isDefined(val) ? (isDate(val) ? val : parseDate(val)) : undefined;\n }\n };\n}\n\nfunction badInputChecker(scope, element, attr, ctrl) {\n var node = element[0];\n var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);\n if (nativeValidation) {\n ctrl.$parsers.push(function(value) {\n var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};\n // Detect bug in FF35 for input[email] (https://bugzilla.mozilla.org/show_bug.cgi?id=1064430):\n // - also sets validity.badInput (should only be validity.typeMismatch).\n // - see http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email)\n // - can ignore this case as we can still read out the erroneous email...\n return validity.badInput && !validity.typeMismatch ? undefined : value;\n });\n }\n}\n\nfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n badInputChecker(scope, element, attr, ctrl);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n ctrl.$$parserName = 'number';\n ctrl.$parsers.push(function(value) {\n if (ctrl.$isEmpty(value)) return null;\n if (NUMBER_REGEXP.test(value)) return parseFloat(value);\n return undefined;\n });\n\n ctrl.$formatters.push(function(value) {\n if (!ctrl.$isEmpty(value)) {\n if (!isNumber(value)) {\n throw $ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);\n }\n value = value.toString();\n }\n return value;\n });\n\n if (attr.min || attr.ngMin) {\n var minVal;\n ctrl.$validators.min = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;\n };\n\n attr.$observe('min', function(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val, 10);\n }\n minVal = isNumber(val) && !isNaN(val) ? val : undefined;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n\n if (attr.max || attr.ngMax) {\n var maxVal;\n ctrl.$validators.max = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;\n };\n\n attr.$observe('max', function(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val, 10);\n }\n maxVal = isNumber(val) && !isNaN(val) ? val : undefined;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n}\n\nfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$$parserName = 'url';\n ctrl.$validators.url = function(value) {\n return ctrl.$isEmpty(value) || URL_REGEXP.test(value);\n };\n}\n\nfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$$parserName = 'email';\n ctrl.$validators.email = function(value) {\n return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);\n };\n}\n\nfunction radioInputType(scope, element, attr, ctrl) {\n // make the name unique, if not defined\n if (isUndefined(attr.name)) {\n element.attr('name', nextUid());\n }\n\n var listener = function(ev) {\n if (element[0].checked) {\n ctrl.$setViewValue(attr.value, ev && ev.type);\n }\n };\n\n element.on('click', listener);\n\n ctrl.$render = function() {\n var value = attr.value;\n element[0].checked = (value == ctrl.$viewValue);\n };\n\n attr.$observe('value', ctrl.$render);\n}\n\nfunction parseConstantExpr($parse, context, name, expression, fallback) {\n var parseFn;\n if (isDefined(expression)) {\n parseFn = $parse(expression);\n if (!parseFn.constant) {\n throw minErr('ngModel')('constexpr', 'Expected constant expression for `{0}`, but saw ' +\n '`{1}`.', name, expression);\n }\n return parseFn(context);\n }\n return fallback;\n}\n\nfunction checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {\n var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);\n var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);\n\n var listener = function(ev) {\n ctrl.$setViewValue(element[0].checked, ev && ev.type);\n };\n\n element.on('click', listener);\n\n ctrl.$render = function() {\n element[0].checked = ctrl.$viewValue;\n };\n\n // Override the standard `$isEmpty` because an empty checkbox is never equal to the trueValue\n ctrl.$isEmpty = function(value) {\n return value !== trueValue;\n };\n\n ctrl.$formatters.push(function(value) {\n return equals(value, trueValue);\n });\n\n ctrl.$parsers.push(function(value) {\n return value ? trueValue : falseValue;\n });\n}\n\n\n/**\n * @ngdoc directive\n * @name textarea\n * @restrict E\n *\n * @description\n * HTML textarea element control with angular data-binding. The data-binding and validation\n * properties of this element are exactly the same as those of the\n * {@link ng.directive:input input element}.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n */\n\n\n/**\n * @ngdoc directive\n * @name input\n * @restrict E\n *\n * @description\n * HTML input element control with angular data-binding. Input control follows HTML5 input types\n * and polyfills the HTML5 validation behavior for older browsers.\n *\n * *NOTE* Not every feature offered is available for all input types.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {boolean=} ngRequired Sets `required` attribute if set to true\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n \n \n \n \n \n User name: \n \n Required!\n Last name: \n \n Too short!\n \n Too long!\n \n \n user = {{user}}\n myForm.userName.$valid = {{myForm.userName.$valid}}\n myForm.userName.$error = {{myForm.userName.$error}}\n myForm.lastName.$valid = {{myForm.lastName.$valid}}\n myForm.lastName.$error = {{myForm.lastName.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n myForm.$error.minlength = {{!!myForm.$error.minlength}}\n myForm.$error.maxlength = {{!!myForm.$error.maxlength}}\n \n \n \n var user = element(by.exactBinding('user'));\n var userNameValid = element(by.binding('myForm.userName.$valid'));\n var lastNameValid = element(by.binding('myForm.lastName.$valid'));\n var lastNameError = element(by.binding('myForm.lastName.$error'));\n var formValid = element(by.binding('myForm.$valid'));\n var userNameInput = element(by.model('user.name'));\n var userLastInput = element(by.model('user.last'));\n\n it('should initialize to model', function() {\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if empty when required', function() {\n userNameInput.clear();\n userNameInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('false');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be valid if empty when min length is set', function() {\n userLastInput.clear();\n userLastInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"\"}');\n expect(lastNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if less than required min length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('xx');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('minlength');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be invalid if longer than max length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('some ridiculously long name');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('maxlength');\n expect(formValid.getText()).toContain('false');\n });\n \n \n */\nvar inputDirective = ['$browser', '$sniffer', '$filter', '$parse',\n function($browser, $sniffer, $filter, $parse) {\n return {\n restrict: 'E',\n require: ['?ngModel'],\n link: function(scope, element, attr, ctrls) {\n if (ctrls[0]) {\n (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,\n $browser, $filter, $parse);\n }\n }\n };\n}];\n\nvar VALID_CLASS = 'ng-valid',\n INVALID_CLASS = 'ng-invalid',\n PRISTINE_CLASS = 'ng-pristine',\n DIRTY_CLASS = 'ng-dirty',\n UNTOUCHED_CLASS = 'ng-untouched',\n TOUCHED_CLASS = 'ng-touched',\n PENDING_CLASS = 'ng-pending';\n\n/**\n * @ngdoc type\n * @name ngModel.NgModelController\n *\n * @property {string} $viewValue Actual string value in the view.\n * @property {*} $modelValue The value in the model, that the control is bound to.\n * @property {Array.} $parsers Array of functions to execute, as a pipeline, whenever\n the control reads value from the DOM. Each function is called, in turn, passing the value\n through to the next. The last return value is used to populate the model.\n Used to sanitize / convert the value as well as validation. For validation,\n the parsers should update the validity state using\n {@link ngModel.NgModelController#$setValidity $setValidity()},\n and return `undefined` for invalid values.\n\n *\n * @property {Array.} $formatters Array of functions to execute, as a pipeline, whenever\n the model value changes. Each function is called, in turn, passing the value through to the\n next. Used to format / convert values for display in the control and validation.\n * ```js\n * function formatter(value) {\n * if (value) {\n * return value.toUpperCase();\n * }\n * }\n * ngModel.$formatters.push(formatter);\n * ```\n *\n * @property {Object.} $validators A collection of validators that are applied\n * whenever the model value changes. The key value within the object refers to the name of the\n * validator while the function refers to the validation operation. The validation operation is\n * provided with the model value as an argument and must return a true or false value depending\n * on the response of that validation.\n *\n * ```js\n * ngModel.$validators.validCharacters = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n * return /[0-9]+/.test(value) &&\n * /[a-z]+/.test(value) &&\n * /[A-Z]+/.test(value) &&\n * /\\W+/.test(value);\n * };\n * ```\n *\n * @property {Object.} $asyncValidators A collection of validations that are expected to\n * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided\n * is expected to return a promise when it is run during the model validation process. Once the promise\n * is delivered then the validation status will be set to true when fulfilled and false when rejected.\n * When the asynchronous validators are triggered, each of the validators will run in parallel and the model\n * value will only be updated once all validators have been fulfilled. Also, keep in mind that all\n * asynchronous validators will only run once all synchronous validators have passed.\n *\n * Please note that if $http is used then it is important that the server returns a success HTTP response code\n * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.\n *\n * ```js\n * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n *\n * // Lookup user by username\n * return $http.get('/api/users/' + value).\n * then(function resolved() {\n * //username exists, this means validation fails\n * return $q.reject('exists');\n * }, function rejected() {\n * //username does not exist, therefore this validation passes\n * return true;\n * });\n * };\n * ```\n *\n * @param {string} name The name of the validator.\n * @param {Function} validationFn The validation function that will be run.\n *\n * @property {Array.} $viewChangeListeners Array of functions to execute whenever the\n * view value has changed. It is called with no arguments, and its return value is ignored.\n * This can be used in place of additional $watches against the model value.\n *\n * @property {Object} $error An object hash with all failing validator ids as keys.\n * @property {Object} $pending An object hash with all pending validator ids as keys.\n *\n * @property {boolean} $untouched True if control has not lost focus yet.\n * @property {boolean} $touched True if control has lost focus.\n * @property {boolean} $pristine True if user has not interacted with the control yet.\n * @property {boolean} $dirty True if user has already interacted with the control.\n * @property {boolean} $valid True if there is no error.\n * @property {boolean} $invalid True if at least one error on the control.\n *\n * @description\n *\n * `NgModelController` provides API for the `ng-model` directive. The controller contains\n * services for data-binding, validation, CSS updates, and value formatting and parsing. It\n * purposefully does not contain any logic which deals with DOM rendering or listening to\n * DOM events. Such DOM related logic should be provided by other directives which make use of\n * `NgModelController` for data-binding.\n *\n * ## Custom Control Example\n * This example shows how to use `NgModelController` with a custom control to achieve\n * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n * collaborate together to achieve the desired result.\n *\n * Note that `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n * contents be edited in place by the user. This will not work on older browsers.\n *\n * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}\n * module to automatically remove \"bad\" content like inline event listener (e.g. ``).\n * However, as we are using `$sce` the model can still decide to to provide unsafe content if it marks\n * that content using the `$sce` service.\n *\n * \n \n [contenteditable] {\n border: 1px solid black;\n background-color: white;\n min-height: 20px;\n }\n\n .ng-invalid {\n border: 1px solid red;\n }\n\n \n \n angular.module('customControl', ['ngSanitize']).\n directive('contenteditable', ['$sce', function($sce) {\n return {\n restrict: 'A', // only activate on element attribute\n require: '?ngModel', // get a hold of NgModelController\n link: function(scope, element, attrs, ngModel) {\n if (!ngModel) return; // do nothing if no ng-model\n\n // Specify how UI should be updated\n ngModel.$render = function() {\n element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));\n };\n\n // Listen for change events to enable binding\n element.on('blur keyup change', function() {\n scope.$apply(read);\n });\n read(); // initialize\n\n // Write data to the model\n function read() {\n var html = element.html();\n // When we clear the content editable the browser leaves a behind\n // If strip-br attribute is provided then we strip this out\n if ( attrs.stripBr && html == '' ) {\n html = '';\n }\n ngModel.$setViewValue(html);\n }\n }\n };\n }]);\n \n \n \n Change me!\n Required!\n \n \n \n \n \n it('should data-bind and become invalid', function() {\n if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {\n // SafariDriver can't handle contenteditable\n // and Firefox driver can't clear contenteditables very well\n return;\n }\n var contentEditable = element(by.css('[contenteditable]'));\n var content = 'Change me!';\n\n expect(contentEditable.getText()).toEqual(content);\n\n contentEditable.clear();\n contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n expect(contentEditable.getText()).toEqual('');\n expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n });\n \n * \n *\n *\n */\nvar NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$rootScope', '$q', '$interpolate',\n function($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $rootScope, $q, $interpolate) {\n this.$viewValue = Number.NaN;\n this.$modelValue = Number.NaN;\n this.$validators = {};\n this.$asyncValidators = {};\n this.$parsers = [];\n this.$formatters = [];\n this.$viewChangeListeners = [];\n this.$untouched = true;\n this.$touched = false;\n this.$pristine = true;\n this.$dirty = false;\n this.$valid = true;\n this.$invalid = false;\n this.$error = {}; // keep invalid keys here\n this.$$success = {}; // keep valid keys here\n this.$pending = undefined; // keep pending keys here\n this.$name = $interpolate($attr.name || '', false)($scope);\n\n\n var parsedNgModel = $parse($attr.ngModel),\n pendingDebounce = null,\n ctrl = this;\n\n var ngModelGet = function ngModelGet() {\n var modelValue = parsedNgModel($scope);\n if (ctrl.$options && ctrl.$options.getterSetter && isFunction(modelValue)) {\n modelValue = modelValue();\n }\n return modelValue;\n };\n\n var ngModelSet = function ngModelSet(newValue) {\n var getterSetter;\n if (ctrl.$options && ctrl.$options.getterSetter &&\n isFunction(getterSetter = parsedNgModel($scope))) {\n\n getterSetter(ctrl.$modelValue);\n } else {\n parsedNgModel.assign($scope, ctrl.$modelValue);\n }\n };\n\n this.$$setOptions = function(options) {\n ctrl.$options = options;\n\n if (!parsedNgModel.assign && (!options || !options.getterSetter)) {\n throw $ngModelMinErr('nonassign', \"Expression '{0}' is non-assignable. Element: {1}\",\n $attr.ngModel, startingTag($element));\n }\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$render\n *\n * @description\n * Called when the view needs to be updated. It is expected that the user of the ng-model\n * directive will implement this method.\n *\n * The `$render()` method is invoked in the following situations:\n *\n * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last\n * committed value then `$render()` is called to update the input control.\n * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and\n * the `$viewValue` are different to last time.\n *\n * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of\n * `$modelValue` and `$viewValue` are actually different to their previous value. If `$modelValue`\n * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be\n * invoked if you only change a property on the objects.\n */\n this.$render = noop;\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$isEmpty\n *\n * @description\n * This is called when we need to determine if the value of the input is empty.\n *\n * For instance, the required directive does this to work out if the input has data or not.\n * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n *\n * You can override this for input directives whose concept of being empty is different to the\n * default. The `checkboxInputType` directive does this because in its case a value of `false`\n * implies empty.\n *\n * @param {*} value Model value to check.\n * @returns {boolean} True if `value` is empty.\n */\n this.$isEmpty = function(value) {\n return isUndefined(value) || value === '' || value === null || value !== value;\n };\n\n var parentForm = $element.inheritedData('$formController') || nullFormCtrl,\n currentValidationRunId = 0;\n\n // Setup initial state of the control\n $element\n .addClass(PRISTINE_CLASS)\n .addClass(UNTOUCHED_CLASS);\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setValidity\n *\n * @description\n * Change the validity state, and notifies the form.\n *\n * This method can be called within $parsers/$formatters. However, if possible, please use the\n * `ngModel.$validators` pipeline which is designed to call this method automatically.\n *\n * @param {string} validationErrorKey Name of the validator. the `validationErrorKey` will assign\n * to `$error[validationErrorKey]` and `$pending[validationErrorKey]`\n * so that it is available for data-binding.\n * The `validationErrorKey` should be in camelCase and will get converted into dash-case\n * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n * class and can be bound to as `{{someForm.someControl.$error.myError}}` .\n * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),\n * or skipped (null).\n */\n addSetValidityMethod({\n ctrl: this,\n $element: $element,\n set: function(object, property) {\n object[property] = true;\n },\n unset: function(object, property) {\n delete object[property];\n },\n parentForm: parentForm,\n $animate: $animate\n });\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setPristine\n *\n * @description\n * Sets the control to its pristine state.\n *\n * This method can be called to remove the 'ng-dirty' class and set the control to its pristine\n * state (ng-pristine class). A model is considered to be pristine when the model has not been changed\n * from when first compiled within then form.\n */\n this.$setPristine = function () {\n ctrl.$dirty = false;\n ctrl.$pristine = true;\n $animate.removeClass($element, DIRTY_CLASS);\n $animate.addClass($element, PRISTINE_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setUntouched\n *\n * @description\n * Sets the control to its untouched state.\n *\n * This method can be called to remove the 'ng-touched' class and set the control to its\n * untouched state (ng-untouched class). Upon compilation, a model is set as untouched\n * by default, however this function can be used to restore that state if the model has\n * already been touched by the user.\n */\n this.$setUntouched = function() {\n ctrl.$touched = false;\n ctrl.$untouched = true;\n $animate.setClass($element, UNTOUCHED_CLASS, TOUCHED_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setTouched\n *\n * @description\n * Sets the control to its touched state.\n *\n * This method can be called to remove the 'ng-untouched' class and set the control to its\n * touched state (ng-touched class). A model is considered to be touched when the user has\n * first interacted (focussed) on the model input element and then shifted focus away (blurred)\n * from the input element.\n */\n this.$setTouched = function() {\n ctrl.$touched = true;\n ctrl.$untouched = false;\n $animate.setClass($element, TOUCHED_CLASS, UNTOUCHED_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$rollbackViewValue\n *\n * @description\n * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,\n * which may be caused by a pending debounced event or because the input is waiting for a some\n * future event.\n *\n * If you have an input that uses `ng-model-options` to set up debounced events or events such\n * as blur you can have a situation where there is a period when the `$viewValue`\n * is out of synch with the ngModel's `$modelValue`.\n *\n * In this case, you can run into difficulties if you try to update the ngModel's `$modelValue`\n * programmatically before these debounced/future events have resolved/occurred, because Angular's\n * dirty checking mechanism is not able to tell whether the model has actually changed or not.\n *\n * The `$rollbackViewValue()` method should be called before programmatically changing the model of an\n * input which may have such events pending. This is important in order to make sure that the\n * input field will be updated with the new model value and any pending operations are cancelled.\n *\n * \n * \n * angular.module('cancel-update-example', [])\n *\n * .controller('CancelUpdateController', ['$scope', function($scope) {\n * $scope.resetWithCancel = function (e) {\n * if (e.keyCode == 27) {\n * $scope.myForm.myInput1.$rollbackViewValue();\n * $scope.myValue = '';\n * }\n * };\n * $scope.resetWithoutCancel = function (e) {\n * if (e.keyCode == 27) {\n * $scope.myValue = '';\n * }\n * };\n * }]);\n * \n * \n * \n * Try typing something in each input. See that the model only updates when you\n * blur off the input.\n * \n * Now see what happens if you start typing then press the Escape key\n *\n * \n * With $rollbackViewValue()\n * \n * myValue: \"{{ myValue }}\"\n *\n * Without $rollbackViewValue()\n * \n * myValue: \"{{ myValue }}\"\n * \n * \n * \n * \n */\n this.$rollbackViewValue = function() {\n $timeout.cancel(pendingDebounce);\n ctrl.$viewValue = ctrl.$$lastCommittedViewValue;\n ctrl.$render();\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$validate\n *\n * @description\n * Runs each of the registered validators (first synchronous validators and then asynchronous validators).\n */\n this.$validate = function() {\n // ignore $validate before model is initialized\n if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n return;\n }\n this.$$parseAndValidate();\n };\n\n this.$$runValidators = function(parseValid, modelValue, viewValue, doneCallback) {\n currentValidationRunId++;\n var localValidationRunId = currentValidationRunId;\n\n // check parser error\n if (!processParseErrors(parseValid)) {\n validationDone(false);\n return;\n }\n if (!processSyncValidators()) {\n validationDone(false);\n return;\n }\n processAsyncValidators();\n\n function processParseErrors(parseValid) {\n var errorKey = ctrl.$$parserName || 'parse';\n if (parseValid === undefined) {\n setValidity(errorKey, null);\n } else {\n setValidity(errorKey, parseValid);\n if (!parseValid) {\n forEach(ctrl.$validators, function(v, name) {\n setValidity(name, null);\n });\n forEach(ctrl.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n return false;\n }\n }\n return true;\n }\n\n function processSyncValidators() {\n var syncValidatorsValid = true;\n forEach(ctrl.$validators, function(validator, name) {\n var result = validator(modelValue, viewValue);\n syncValidatorsValid = syncValidatorsValid && result;\n setValidity(name, result);\n });\n if (!syncValidatorsValid) {\n forEach(ctrl.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n return false;\n }\n return true;\n }\n\n function processAsyncValidators() {\n var validatorPromises = [];\n var allValid = true;\n forEach(ctrl.$asyncValidators, function(validator, name) {\n var promise = validator(modelValue, viewValue);\n if (!isPromiseLike(promise)) {\n throw $ngModelMinErr(\"$asyncValidators\",\n \"Expected asynchronous validator to return a promise but got '{0}' instead.\", promise);\n }\n setValidity(name, undefined);\n validatorPromises.push(promise.then(function() {\n setValidity(name, true);\n }, function(error) {\n allValid = false;\n setValidity(name, false);\n }));\n });\n if (!validatorPromises.length) {\n validationDone(true);\n } else {\n $q.all(validatorPromises).then(function() {\n validationDone(allValid);\n }, noop);\n }\n }\n\n function setValidity(name, isValid) {\n if (localValidationRunId === currentValidationRunId) {\n ctrl.$setValidity(name, isValid);\n }\n }\n\n function validationDone(allValid) {\n if (localValidationRunId === currentValidationRunId) {\n\n doneCallback(allValid);\n }\n }\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$commitViewValue\n *\n * @description\n * Commit a pending update to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n this.$commitViewValue = function() {\n var viewValue = ctrl.$viewValue;\n\n $timeout.cancel(pendingDebounce);\n\n // If the view value has not changed then we should just exit, except in the case where there is\n // a native validator on the element. In this case the validation state may have changed even though\n // the viewValue has stayed empty.\n if (ctrl.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !ctrl.$$hasNativeValidators)) {\n return;\n }\n ctrl.$$lastCommittedViewValue = viewValue;\n\n // change to dirty\n if (ctrl.$pristine) {\n ctrl.$dirty = true;\n ctrl.$pristine = false;\n $animate.removeClass($element, PRISTINE_CLASS);\n $animate.addClass($element, DIRTY_CLASS);\n parentForm.$setDirty();\n }\n this.$$parseAndValidate();\n };\n\n this.$$parseAndValidate = function() {\n var parserValid = true,\n viewValue = ctrl.$$lastCommittedViewValue,\n modelValue = viewValue;\n for(var i = 0; i < ctrl.$parsers.length; i++) {\n modelValue = ctrl.$parsers[i](modelValue);\n if (isUndefined(modelValue)) {\n parserValid = false;\n break;\n }\n }\n if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n // ctrl.$modelValue has not been touched yet...\n ctrl.$modelValue = ngModelGet();\n }\n var prevModelValue = ctrl.$modelValue;\n var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;\n if (allowInvalid) {\n ctrl.$modelValue = modelValue;\n writeToModelIfNeeded();\n }\n ctrl.$$runValidators(parserValid, modelValue, viewValue, function(allValid) {\n if (!allowInvalid) {\n // Note: Don't check ctrl.$valid here, as we could have\n // external validators (e.g. calculated on the server),\n // that just call $setValidity and need the model value\n // to calculate their validity.\n ctrl.$modelValue = allValid ? modelValue : undefined;\n writeToModelIfNeeded();\n }\n });\n\n function writeToModelIfNeeded() {\n if (ctrl.$modelValue !== prevModelValue) {\n ctrl.$$writeModelToScope();\n }\n }\n };\n\n this.$$writeModelToScope = function() {\n ngModelSet(ctrl.$modelValue);\n forEach(ctrl.$viewChangeListeners, function(listener) {\n try {\n listener();\n } catch(e) {\n $exceptionHandler(e);\n }\n });\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setViewValue\n *\n * @description\n * Update the view value.\n *\n * This method should be called when an input directive want to change the view value; typically,\n * this is done from within a DOM event handler.\n *\n * For example {@link ng.directive:input input} calls it when the value of the input changes and\n * {@link ng.directive:select select} calls it when an option is selected.\n *\n * If the new `value` is an object (rather than a string or a number), we should make a copy of the\n * object before passing it to `$setViewValue`. This is because `ngModel` does not perform a deep\n * watch of objects, it only looks for a change of identity. If you only change the property of\n * the object then ngModel will not realise that the object has changed and will not invoke the\n * `$parsers` and `$validators` pipelines.\n *\n * For this reason, you should not change properties of the copy once it has been passed to\n * `$setViewValue`. Otherwise you may cause the model value on the scope to change incorrectly.\n *\n * When this method is called, the new `value` will be staged for committing through the `$parsers`\n * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged\n * value sent directly for processing, finally to be applied to `$modelValue` and then the\n * **expression** specified in the `ng-model` attribute.\n *\n * Lastly, all the registered change listeners, in the `$viewChangeListeners` list, are called.\n *\n * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`\n * and the `default` trigger is not listed, all those actions will remain pending until one of the\n * `updateOn` events is triggered on the DOM element.\n * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}\n * directive is used with a custom debounce for this particular event.\n *\n * Note that calling this function does not trigger a `$digest`.\n *\n * @param {string} value Value from the view.\n * @param {string} trigger Event that triggered the update.\n */\n this.$setViewValue = function(value, trigger) {\n ctrl.$viewValue = value;\n if (!ctrl.$options || ctrl.$options.updateOnDefault) {\n ctrl.$$debounceViewValueCommit(trigger);\n }\n };\n\n this.$$debounceViewValueCommit = function(trigger) {\n var debounceDelay = 0,\n options = ctrl.$options,\n debounce;\n\n if (options && isDefined(options.debounce)) {\n debounce = options.debounce;\n if (isNumber(debounce)) {\n debounceDelay = debounce;\n } else if (isNumber(debounce[trigger])) {\n debounceDelay = debounce[trigger];\n } else if (isNumber(debounce['default'])) {\n debounceDelay = debounce['default'];\n }\n }\n\n $timeout.cancel(pendingDebounce);\n if (debounceDelay) {\n pendingDebounce = $timeout(function() {\n ctrl.$commitViewValue();\n }, debounceDelay);\n } else if ($rootScope.$$phase) {\n ctrl.$commitViewValue();\n } else {\n $scope.$apply(function() {\n ctrl.$commitViewValue();\n });\n }\n };\n\n // model -> value\n // Note: we cannot use a normal scope.$watch as we want to detect the following:\n // 1. scope value is 'a'\n // 2. user enters 'b'\n // 3. ng-change kicks in and reverts scope value to 'a'\n // -> scope value did not change since the last digest as\n // ng-change executes in apply phase\n // 4. view should be changed back to 'a'\n $scope.$watch(function ngModelWatch() {\n var modelValue = ngModelGet();\n\n // if scope model value and ngModel value are out of sync\n // TODO(perf): why not move this to the action fn?\n if (modelValue !== ctrl.$modelValue) {\n ctrl.$modelValue = modelValue;\n\n var formatters = ctrl.$formatters,\n idx = formatters.length;\n\n var viewValue = modelValue;\n while(idx--) {\n viewValue = formatters[idx](viewValue);\n }\n if (ctrl.$viewValue !== viewValue) {\n ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;\n ctrl.$render();\n\n ctrl.$$runValidators(undefined, modelValue, viewValue, noop);\n }\n }\n\n return modelValue;\n });\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngModel\n *\n * @element input\n *\n * @description\n * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n * property on the scope using {@link ngModel.NgModelController NgModelController},\n * which is created and exposed by this directive.\n *\n * `ngModel` is responsible for:\n *\n * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n * require.\n * - Providing validation behavior (i.e. required, number, email, url).\n * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).\n * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`, `ng-untouched`) including animations.\n * - Registering the control with its parent {@link ng.directive:form form}.\n *\n * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n * current scope. If the property doesn't already exist on this scope, it will be created\n * implicitly and added to the scope.\n *\n * For best practices on using `ngModel`, see:\n *\n * - [https://github.com/angular/angular.js/wiki/Understanding-Scopes]\n *\n * For basic examples, how to use `ngModel`, see:\n *\n * - {@link ng.directive:input input}\n * - {@link input[text] text}\n * - {@link input[checkbox] checkbox}\n * - {@link input[radio] radio}\n * - {@link input[number] number}\n * - {@link input[email] email}\n * - {@link input[url] url}\n * - {@link input[date] date}\n * - {@link input[dateTimeLocal] dateTimeLocal}\n * - {@link input[time] time}\n * - {@link input[month] month}\n * - {@link input[week] week}\n * - {@link ng.directive:select select}\n * - {@link ng.directive:textarea textarea}\n *\n * # CSS classes\n * The following CSS classes are added and removed on the associated input/select/textarea element\n * depending on the validity of the model.\n *\n * - `ng-valid` is set if the model is valid.\n * - `ng-invalid` is set if the model is invalid.\n * - `ng-pristine` is set if the model is pristine.\n * - `ng-dirty` is set if the model is dirty.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n * ## Animation Hooks\n *\n * Animations within models are triggered when any of the associated CSS classes are added and removed\n * on the input element which is attached to the model. These classes are: `.ng-pristine`, `.ng-dirty`,\n * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.\n * The animations that are triggered within ngModel are similar to how they work in ngClass and\n * animations can be hooked into using CSS transitions, keyframes as well as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style an input element\n * that has been rendered as invalid after it has been validated:\n *\n * \n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-input {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-input.ng-invalid {\n * background: red;\n * color:white;\n * }\n * \n *\n * @example\n * \n \n \n \n Update input to see transitions when valid/invalid.\n Integer is a valid value.\n \n \n \n \n * \n *\n * ## Binding to a getter/setter\n *\n * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a\n * function that returns a representation of the model when called with zero arguments, and sets\n * the internal state of a model when called with an argument. It's sometimes useful to use this\n * for models that have an internal representation that's different than what the model exposes\n * to the view.\n *\n * \n * **Best Practice:** It's best to keep getters fast because Angular is likely to call them more\n * frequently than other parts of your code.\n * \n *\n * You use this behavior by adding `ng-model-options=\"{ getterSetter: true }\"` to an element that\n * has `ng-model` attached to it. You can also add `ng-model-options=\"{ getterSetter: true }\"` to\n * a ``, which will enable this behavior for all ``s within it. See\n * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.\n *\n * The following example shows how to use `ngModel` with a getter/setter:\n *\n * @example\n * \n \n \n \n Name:\n \n \n user.name = \n \n \n \n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function (newName) {\n if (angular.isDefined(newName)) {\n _name = newName;\n }\n return _name;\n }\n };\n }]);\n \n * \n */\nvar ngModelDirective = function() {\n return {\n restrict: 'A',\n require: ['ngModel', '^?form', '^?ngModelOptions'],\n controller: NgModelController,\n link: {\n pre: function(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0],\n formCtrl = ctrls[1] || nullFormCtrl;\n\n modelCtrl.$$setOptions(ctrls[2] && ctrls[2].$options);\n\n // notify others, especially parent forms\n formCtrl.$addControl(modelCtrl);\n\n attr.$observe('name', function(newValue) {\n if (modelCtrl.$name !== newValue) {\n formCtrl.$$renameControl(modelCtrl, newValue);\n }\n });\n\n scope.$on('$destroy', function() {\n formCtrl.$removeControl(modelCtrl);\n });\n },\n post: function(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0];\n if (modelCtrl.$options && modelCtrl.$options.updateOn) {\n element.on(modelCtrl.$options.updateOn, function(ev) {\n modelCtrl.$$debounceViewValueCommit(ev && ev.type);\n });\n }\n\n element.on('blur', function(ev) {\n if (modelCtrl.$touched) return;\n\n scope.$apply(function() {\n modelCtrl.$setTouched();\n });\n });\n }\n }\n };\n};\n\n\n/**\n * @ngdoc directive\n * @name ngChange\n *\n * @description\n * Evaluate the given expression when the user changes the input.\n * The expression is evaluated immediately, unlike the JavaScript onchange event\n * which only triggers at the end of a change (usually, when the user leaves the\n * form element or presses the return key).\n *\n * The `ngChange` expression is only evaluated when a change in the input value causes\n * a new value to be committed to the model.\n *\n * It will not be evaluated:\n * * if the value returned from the `$parsers` transformation pipeline has not changed\n * * if the input has continued to be invalid since the model will stay `null`\n * * if the model is changed programmatically and not by a change to the input value\n *\n *\n * Note, this directive requires `ngModel` to be present.\n *\n * @element input\n * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change\n * in input value.\n *\n * @example\n * \n * \n * \n * \n * \n * \n * Confirmed\n * debug = {{confirmed}}\n * counter = {{counter}}\n * \n * \n * \n * var counter = element(by.binding('counter'));\n * var debug = element(by.binding('confirmed'));\n *\n * it('should evaluate the expression if changing from view', function() {\n * expect(counter.getText()).toContain('0');\n *\n * element(by.id('ng-change-example1')).click();\n *\n * expect(counter.getText()).toContain('1');\n * expect(debug.getText()).toContain('true');\n * });\n *\n * it('should not evaluate the expression if changing from model', function() {\n * element(by.id('ng-change-example2')).click();\n\n * expect(counter.getText()).toContain('0');\n * expect(debug.getText()).toContain('true');\n * });\n * \n * \n */\nvar ngChangeDirective = valueFn({\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n ctrl.$viewChangeListeners.push(function() {\n scope.$eval(attr.ngChange);\n });\n }\n});\n\n\nvar requiredDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n attr.required = true; // force truthy in case we are on non input element\n\n ctrl.$validators.required = function(value) {\n return !attr.required || !ctrl.$isEmpty(value);\n };\n\n attr.$observe('required', function() {\n ctrl.$validate();\n });\n }\n };\n};\n\n\nvar patternDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var regexp, patternExp = attr.ngPattern || attr.pattern;\n attr.$observe('pattern', function(regex) {\n if (isString(regex) && regex.length > 0) {\n regex = new RegExp(regex);\n }\n\n if (regex && !regex.test) {\n throw minErr('ngPattern')('noregexp',\n 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,\n regex, startingTag(elm));\n }\n\n regexp = regex || undefined;\n ctrl.$validate();\n });\n\n ctrl.$validators.pattern = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(regexp) || regexp.test(value);\n };\n }\n };\n};\n\n\nvar maxlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var maxlength = 0;\n attr.$observe('maxlength', function(value) {\n maxlength = int(value) || 0;\n ctrl.$validate();\n });\n ctrl.$validators.maxlength = function(modelValue, viewValue) {\n return ctrl.$isEmpty(modelValue) || viewValue.length <= maxlength;\n };\n }\n };\n};\n\nvar minlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var minlength = 0;\n attr.$observe('minlength', function(value) {\n minlength = int(value) || 0;\n ctrl.$validate();\n });\n ctrl.$validators.minlength = function(modelValue, viewValue) {\n return ctrl.$isEmpty(modelValue) || viewValue.length >= minlength;\n };\n }\n };\n};\n\n\n/**\n * @ngdoc directive\n * @name ngList\n *\n * @description\n * Text input that converts between a delimited string and an array of strings. The default\n * delimiter is a comma followed by a space - equivalent to `ng-list=\", \"`. You can specify a custom\n * delimiter as the value of the `ngList` attribute - for example, `ng-list=\" | \"`.\n *\n * The behaviour of the directive is affected by the use of the `ngTrim` attribute.\n * * If `ngTrim` is set to `\"false\"` then whitespace around both the separator and each\n * list item is respected. This implies that the user of the directive is responsible for\n * dealing with whitespace but also allows you to use whitespace as a delimiter, such as a\n * tab or newline character.\n * * Otherwise whitespace around the delimiter is ignored when splitting (although it is respected\n * when joining the list items back together) and whitespace around each list item is stripped\n * before it is added to the model.\n *\n * ### Example with Validation\n *\n * \n * \n * angular.module('listExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.names = ['morpheus', 'neo', 'trinity'];\n * }]);\n * \n * \n * \n * List: \n * \n * Required!\n * \n * names = {{names}}\n * myForm.namesInput.$valid = {{myForm.namesInput.$valid}}\n * myForm.namesInput.$error = {{myForm.namesInput.$error}}\n * myForm.$valid = {{myForm.$valid}}\n * myForm.$error.required = {{!!myForm.$error.required}}\n * \n * \n * \n * var listInput = element(by.model('names'));\n * var names = element(by.exactBinding('names'));\n * var valid = element(by.binding('myForm.namesInput.$valid'));\n * var error = element(by.css('span.error'));\n *\n * it('should initialize to model', function() {\n * expect(names.getText()).toContain('[\"morpheus\",\"neo\",\"trinity\"]');\n * expect(valid.getText()).toContain('true');\n * expect(error.getCssValue('display')).toBe('none');\n * });\n *\n * it('should be invalid if empty', function() {\n * listInput.clear();\n * listInput.sendKeys('');\n *\n * expect(names.getText()).toContain('');\n * expect(valid.getText()).toContain('false');\n * expect(error.getCssValue('display')).not.toBe('none');\n * });\n * \n * \n *\n * ### Example - splitting on whitespace\n * \n * \n * \n * {{ list | json }}\n * \n * \n * it(\"should split the text by newlines\", function() {\n * var listInput = element(by.model('list'));\n * var output = element(by.binding('list | json'));\n * listInput.sendKeys('abc\\ndef\\nghi');\n * expect(output.getText()).toContain('[\\n \"abc\",\\n \"def\",\\n \"ghi\"\\n]');\n * });\n * \n * \n *\n * @element input\n * @param {string=} ngList optional delimiter that should be used to split the value.\n */\nvar ngListDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n // We want to control whitespace trimming so we use this convoluted approach\n // to access the ngList attribute, which doesn't pre-trim the attribute\n var ngList = element.attr(attr.$attr.ngList) || ', ';\n var trimValues = attr.ngTrim !== 'false';\n var separator = trimValues ? trim(ngList) : ngList;\n\n var parse = function(viewValue) {\n // If the viewValue is invalid (say required but empty) it will be `undefined`\n if (isUndefined(viewValue)) return;\n\n var list = [];\n\n if (viewValue) {\n forEach(viewValue.split(separator), function(value) {\n if (value) list.push(trimValues ? trim(value) : value);\n });\n }\n\n return list;\n };\n\n ctrl.$parsers.push(parse);\n ctrl.$formatters.push(function(value) {\n if (isArray(value)) {\n return value.join(ngList);\n }\n\n return undefined;\n });\n\n // Override the standard $isEmpty because an empty array means the input is empty.\n ctrl.$isEmpty = function(value) {\n return !value || !value.length;\n };\n }\n };\n};\n\n\nvar CONSTANT_VALUE_REGEXP = /^(true|false|\\d+)$/;\n/**\n * @ngdoc directive\n * @name ngValue\n *\n * @description\n * Binds the given expression to the value of `input[select]` or `input[radio]`, so\n * that when the element is selected, the `ngModel` of that element is set to the\n * bound value.\n *\n * `ngValue` is useful when dynamically generating lists of radio buttons using `ng-repeat`, as\n * shown below.\n *\n * @element input\n * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute\n * of the `input` element\n *\n * @example\n \n \n \n \n Which is your favorite?\n \n {{name}}\n \n \n You chose {{my.favorite}}\n \n \n \n var favorite = element(by.binding('my.favorite'));\n\n it('should initialize to model', function() {\n expect(favorite.getText()).toContain('unicorns');\n });\n it('should bind the values to the inputs', function() {\n element.all(by.model('my.favorite')).get(0).click();\n expect(favorite.getText()).toContain('pizza');\n });\n \n \n */\nvar ngValueDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n compile: function(tpl, tplAttr) {\n if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {\n return function ngValueConstantLink(scope, elm, attr) {\n attr.$set('value', scope.$eval(attr.ngValue));\n };\n } else {\n return function ngValueLink(scope, elm, attr) {\n scope.$watch(attr.ngValue, function valueWatchAction(value) {\n attr.$set('value', value);\n });\n };\n }\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngModelOptions\n *\n * @description\n * Allows tuning how model updates are done. Using `ngModelOptions` you can specify a custom list of\n * events that will trigger a model update and/or a debouncing delay so that the actual update only\n * takes place when a timer expires; this timer will be reset after another change takes place.\n *\n * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might\n * be different than the value in the actual model. This means that if you update the model you\n * should also invoke {@link ngModel.NgModelController `$rollbackViewValue`} on the relevant input field in\n * order to make sure it is synchronized with the model and that any debounced action is canceled.\n *\n * The easiest way to reference the control's {@link ngModel.NgModelController `$rollbackViewValue`}\n * method is by making sure the input is placed inside a form that has a `name` attribute. This is\n * important because `form` controllers are published to the related scope under the name in their\n * `name` attribute.\n *\n * Any pending changes will take place immediately when an enclosing form is submitted via the\n * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * `ngModelOptions` has an effect on the element it's declared on and its descendants.\n *\n * @param {Object} ngModelOptions options to apply to the current model. Valid keys are:\n * - `updateOn`: string specifying which event should be the input bound to. You can set several\n * events using an space delimited list. There is a special event called `default` that\n * matches the default events belonging of the control.\n * - `debounce`: integer value which contains the debounce model update value in milliseconds. A\n * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a\n * custom value for each event. For example:\n * `ng-model-options=\"{ updateOn: 'default blur', debounce: {'default': 500, 'blur': 0} }\"`\n * - `allowInvalid`: boolean value which indicates that the model can be set with values that did\n * not validate correctly instead of the default behavior of setting the model to undefined.\n * - `getterSetter`: boolean value which determines whether or not to treat functions bound to\n `ngModel` as getters/setters.\n * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for\n * ``, ``, ... . Right now, the only supported value is `'UTC'`,\n * otherwise the default timezone of the browser will be used.\n *\n * @example\n\n The following example shows how to override immediate updates. Changes on the inputs within the\n form will update the model only when the control loses focus (blur event). If `escape` key is\n pressed while the input field is focused, the value is reset to the value in the current model.\n\n \n \n \n \n Name:\n \n\n Other data:\n \n \n user.name = \n \n \n \n angular.module('optionsExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = { name: 'say', data: '' };\n\n $scope.cancel = function (e) {\n if (e.keyCode == 27) {\n $scope.userForm.userName.$rollbackViewValue();\n }\n };\n }]);\n \n \n var model = element(by.binding('user.name'));\n var input = element(by.model('user.name'));\n var other = element(by.model('user.data'));\n\n it('should allow custom events', function() {\n input.sendKeys(' hello');\n input.click();\n expect(model.getText()).toEqual('say');\n other.click();\n expect(model.getText()).toEqual('say hello');\n });\n\n it('should $rollbackViewValue when model changes', function() {\n input.sendKeys(' hello');\n expect(input.getAttribute('value')).toEqual('say hello');\n input.sendKeys(protractor.Key.ESCAPE);\n expect(input.getAttribute('value')).toEqual('say');\n other.click();\n expect(model.getText()).toEqual('say');\n });\n \n \n\n This one shows how to debounce model changes. Model will be updated only 1 sec after last change.\n If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.\n\n \n \n \n \n Name:\n \n Clear\n \n user.name = \n \n \n \n angular.module('optionsExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = { name: 'say' };\n }]);\n \n \n\n This one shows how to bind to getter/setters:\n\n \n \n \n \n Name:\n \n \n user.name = \n \n \n \n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function (newName) {\n return angular.isDefined(newName) ? (_name = newName) : _name;\n }\n };\n }]);\n \n \n */\nvar ngModelOptionsDirective = function() {\n return {\n restrict: 'A',\n controller: ['$scope', '$attrs', function($scope, $attrs) {\n var that = this;\n this.$options = $scope.$eval($attrs.ngModelOptions);\n // Allow adding/overriding bound events\n if (this.$options.updateOn !== undefined) {\n this.$options.updateOnDefault = false;\n // extract \"default\" pseudo-event from list of events that can trigger a model update\n this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {\n that.$options.updateOnDefault = true;\n return ' ';\n }));\n } else {\n this.$options.updateOnDefault = true;\n }\n }]\n };\n};\n\n// helper methods\nfunction addSetValidityMethod(context) {\n var ctrl = context.ctrl,\n $element = context.$element,\n classCache = {},\n set = context.set,\n unset = context.unset,\n parentForm = context.parentForm,\n $animate = context.$animate;\n\n ctrl.$setValidity = setValidity;\n toggleValidationCss('', true);\n\n function setValidity(validationErrorKey, state, options) {\n if (state === undefined) {\n createAndSet('$pending', validationErrorKey, options);\n } else {\n unsetAndCleanup('$pending', validationErrorKey, options);\n }\n if (!isBoolean(state)) {\n unset(ctrl.$error, validationErrorKey, options);\n unset(ctrl.$$success, validationErrorKey, options);\n } else {\n if (state) {\n unset(ctrl.$error, validationErrorKey, options);\n set(ctrl.$$success, validationErrorKey, options);\n } else {\n set(ctrl.$error, validationErrorKey, options);\n unset(ctrl.$$success, validationErrorKey, options);\n }\n }\n if (ctrl.$pending) {\n cachedToggleClass(PENDING_CLASS, true);\n ctrl.$valid = ctrl.$invalid = undefined;\n toggleValidationCss('', null);\n } else {\n cachedToggleClass(PENDING_CLASS, false);\n ctrl.$valid = isObjectEmpty(ctrl.$error);\n ctrl.$invalid = !ctrl.$valid;\n toggleValidationCss('', ctrl.$valid);\n }\n\n // re-read the state as the set/unset methods could have\n // combined state in ctrl.$error[validationError] (used for forms),\n // where setting/unsetting only increments/decrements the value,\n // and does not replace it.\n var combinedState;\n if (ctrl.$pending && ctrl.$pending[validationErrorKey]) {\n combinedState = undefined;\n } else if (ctrl.$error[validationErrorKey]) {\n combinedState = false;\n } else if (ctrl.$$success[validationErrorKey]) {\n combinedState = true;\n } else {\n combinedState = null;\n }\n toggleValidationCss(validationErrorKey, combinedState);\n parentForm.$setValidity(validationErrorKey, combinedState, ctrl);\n }\n\n function createAndSet(name, value, options) {\n if (!ctrl[name]) {\n ctrl[name] = {};\n }\n set(ctrl[name], value, options);\n }\n\n function unsetAndCleanup(name, value, options) {\n if (ctrl[name]) {\n unset(ctrl[name], value, options);\n }\n if (isObjectEmpty(ctrl[name])) {\n ctrl[name] = undefined;\n }\n }\n\n function cachedToggleClass(className, switchValue) {\n if (switchValue && !classCache[className]) {\n $animate.addClass($element, className);\n classCache[className] = true;\n } else if (!switchValue && classCache[className]) {\n $animate.removeClass($element, className);\n classCache[className] = false;\n }\n }\n\n function toggleValidationCss(validationErrorKey, isValid) {\n validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n\n cachedToggleClass(VALID_CLASS + validationErrorKey, isValid === true);\n cachedToggleClass(INVALID_CLASS + validationErrorKey, isValid === false);\n }\n}\n\nfunction isObjectEmpty(obj) {\n if (obj) {\n for (var prop in obj) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @ngdoc directive\n * @name ngBind\n * @restrict AC\n *\n * @description\n * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element\n * with the value of a given expression, and to update the text content when the value of that\n * expression changes.\n *\n * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like\n * `{{ expression }}` which is similar but less verbose.\n *\n * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily\n * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an\n * element attribute, it makes the bindings invisible to the user while the page is loading.\n *\n * An alternative solution to this problem would be using the\n * {@link ng.directive:ngCloak ngCloak} directive.\n *\n *\n * @element ANY\n * @param {expression} ngBind {@link guide/expression Expression} to evaluate.\n *\n * @example\n * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.\n \n \n \n \n Enter name: \n Hello !\n \n \n \n it('should check ng-bind', function() {\n var nameInput = element(by.model('name'));\n\n expect(element(by.binding('name')).getText()).toBe('Whirled');\n nameInput.clear();\n nameInput.sendKeys('world');\n expect(element(by.binding('name')).getText()).toBe('world');\n });\n \n \n */\nvar ngBindDirective = ['$compile', function($compile) {\n return {\n restrict: 'AC',\n compile: function ngBindCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBind);\n scope.$watch(attr.ngBind, function ngBindWatchAction(value) {\n // We are purposefully using == here rather than === because we want to\n // catch when value is \"null or undefined\"\n // jshint -W041\n element.text(value == undefined ? '' : value);\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindTemplate\n *\n * @description\n * The `ngBindTemplate` directive specifies that the element\n * text content should be replaced with the interpolation of the template\n * in the `ngBindTemplate` attribute.\n * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`\n * expressions. This directive is needed since some HTML elements\n * (such as TITLE and OPTION) cannot contain SPAN elements.\n *\n * @element ANY\n * @param {string} ngBindTemplate template of form\n * {{ expression }} to eval.\n *\n * @example\n * Try it here: enter text in text box and watch the greeting change.\n \n \n \n \n Salutation: \n Name: \n \n \n \n \n it('should check ng-bind', function() {\n var salutationElem = element(by.binding('salutation'));\n var salutationInput = element(by.model('salutation'));\n var nameInput = element(by.model('name'));\n\n expect(salutationElem.getText()).toBe('Hello World!');\n\n salutationInput.clear();\n salutationInput.sendKeys('Greetings');\n nameInput.clear();\n nameInput.sendKeys('user');\n\n expect(salutationElem.getText()).toBe('Greetings user!');\n });\n \n \n */\nvar ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {\n return {\n compile: function ngBindTemplateCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindTemplateLink(scope, element, attr) {\n var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));\n $compile.$$addBindingInfo(element, interpolateFn.expressions);\n attr.$observe('ngBindTemplate', function(value) {\n element.text(value);\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindHtml\n *\n * @description\n * Creates a binding that will innerHTML the result of evaluating the `expression` into the current\n * element in a secure way. By default, the innerHTML-ed content will be sanitized using the {@link\n * ngSanitize.$sanitize $sanitize} service. To utilize this functionality, ensure that `$sanitize`\n * is available, for example, by including {@link ngSanitize} in your module's dependencies (not in\n * core Angular.) You may also bypass sanitization for values you know are safe. To do so, bind to\n * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example\n * under {@link ng.$sce#Example Strict Contextual Escaping (SCE)}.\n *\n * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you\n * will have an exception (instead of an exploit.)\n *\n * @element ANY\n * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.\n *\n * @example\n\n \n \n \n \n \n \n\n \n angular.module('bindHtmlExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.myHTML =\n 'I am an HTMLstring with ' +\n 'links! and other stuff';\n }]);\n \n\n \n it('should check ng-bind-html', function() {\n expect(element(by.binding('myHTML')).getText()).toBe(\n 'I am an HTMLstring with links! and other stuff');\n });\n \n \n */\nvar ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {\n return {\n restrict: 'A',\n compile: function ngBindHtmlCompile(tElement, tAttrs) {\n var ngBindHtmlGetter = $parse(tAttrs.ngBindHtml);\n var ngBindHtmlWatch = $parse(tAttrs.ngBindHtml, function getStringValue(value) {\n return (value || '').toString();\n });\n $compile.$$addBindingClass(tElement);\n\n return function ngBindHtmlLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBindHtml);\n\n scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {\n // we re-evaluate the expr because we want a TrustedValueHolderType\n // for $sce, not a string\n element.html($sce.getTrustedHtml(ngBindHtmlGetter(scope)) || '');\n });\n };\n }\n };\n}];\n\nfunction classDirective(name, selector) {\n name = 'ngClass' + name;\n return ['$animate', function($animate) {\n return {\n restrict: 'AC',\n link: function(scope, element, attr) {\n var oldVal;\n\n scope.$watch(attr[name], ngClassWatchAction, true);\n\n attr.$observe('class', function(value) {\n ngClassWatchAction(scope.$eval(attr[name]));\n });\n\n\n if (name !== 'ngClass') {\n scope.$watch('$index', function($index, old$index) {\n // jshint bitwise: false\n var mod = $index & 1;\n if (mod !== (old$index & 1)) {\n var classes = arrayClasses(scope.$eval(attr[name]));\n mod === selector ?\n addClasses(classes) :\n removeClasses(classes);\n }\n });\n }\n\n function addClasses(classes) {\n var newClasses = digestClassCounts(classes, 1);\n attr.$addClass(newClasses);\n }\n\n function removeClasses(classes) {\n var newClasses = digestClassCounts(classes, -1);\n attr.$removeClass(newClasses);\n }\n\n function digestClassCounts (classes, count) {\n var classCounts = element.data('$classCounts') || {};\n var classesToUpdate = [];\n forEach(classes, function (className) {\n if (count > 0 || classCounts[className]) {\n classCounts[className] = (classCounts[className] || 0) + count;\n if (classCounts[className] === +(count > 0)) {\n classesToUpdate.push(className);\n }\n }\n });\n element.data('$classCounts', classCounts);\n return classesToUpdate.join(' ');\n }\n\n function updateClasses (oldClasses, newClasses) {\n var toAdd = arrayDifference(newClasses, oldClasses);\n var toRemove = arrayDifference(oldClasses, newClasses);\n toAdd = digestClassCounts(toAdd, 1);\n toRemove = digestClassCounts(toRemove, -1);\n if (toAdd && toAdd.length) {\n $animate.addClass(element, toAdd);\n }\n if (toRemove && toRemove.length) {\n $animate.removeClass(element, toRemove);\n }\n }\n\n function ngClassWatchAction(newVal) {\n if (selector === true || scope.$index % 2 === selector) {\n var newClasses = arrayClasses(newVal || []);\n if (!oldVal) {\n addClasses(newClasses);\n } else if (!equals(newVal,oldVal)) {\n var oldClasses = arrayClasses(oldVal);\n updateClasses(oldClasses, newClasses);\n }\n }\n oldVal = shallowCopy(newVal);\n }\n }\n };\n\n function arrayDifference(tokens1, tokens2) {\n var values = [];\n\n outer:\n for(var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for(var j = 0; j < tokens2.length; j++) {\n if(token == tokens2[j]) continue outer;\n }\n values.push(token);\n }\n return values;\n }\n\n function arrayClasses (classVal) {\n if (isArray(classVal)) {\n return classVal;\n } else if (isString(classVal)) {\n return classVal.split(' ');\n } else if (isObject(classVal)) {\n var classes = [], i = 0;\n forEach(classVal, function(v, k) {\n if (v) {\n classes = classes.concat(k.split(' '));\n }\n });\n return classes;\n }\n return classVal;\n }\n }];\n}\n\n/**\n * @ngdoc directive\n * @name ngClass\n * @restrict AC\n *\n * @description\n * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding\n * an expression that represents all classes to be added.\n *\n * The directive operates in three different ways, depending on which of three types the expression\n * evaluates to:\n *\n * 1. If the expression evaluates to a string, the string should be one or more space-delimited class\n * names.\n *\n * 2. If the expression evaluates to an array, each element of the array should be a string that is\n * one or more space-delimited class names.\n *\n * 3. If the expression evaluates to an object, then for each key-value pair of the\n * object with a truthy value the corresponding key is used as a class name.\n *\n * The directive won't add duplicate classes if a particular class was already set.\n *\n * When the expression changes, the previously added classes are removed and only then the\n * new classes are added.\n *\n * @animations\n * add - happens just before the class is applied to the element\n * remove - happens just before the class is removed from the element\n *\n * @element ANY\n * @param {expression} ngClass {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class\n * names, an array, or a map of class names to boolean values. In the case of a map, the\n * names of the properties whose values are truthy will be added as css classes to the\n * element.\n *\n * @example Example that demonstrates basic bindings via ngClass directive.\n \n \n Map Syntax Example\n deleted (apply \"strike\" class)\n important (apply \"bold\" class)\n error (apply \"red\" class)\n \n Using String Syntax\n \n \n Using Array Syntax\n \n \n \n \n \n .strike {\n text-decoration: line-through;\n }\n .bold {\n font-weight: bold;\n }\n .red {\n color: red;\n }\n \n \n var ps = element.all(by.css('p'));\n\n it('should let you toggle the class', function() {\n\n expect(ps.first().getAttribute('class')).not.toMatch(/bold/);\n expect(ps.first().getAttribute('class')).not.toMatch(/red/);\n\n element(by.model('important')).click();\n expect(ps.first().getAttribute('class')).toMatch(/bold/);\n\n element(by.model('error')).click();\n expect(ps.first().getAttribute('class')).toMatch(/red/);\n });\n\n it('should let you toggle string example', function() {\n expect(ps.get(1).getAttribute('class')).toBe('');\n element(by.model('style')).clear();\n element(by.model('style')).sendKeys('red');\n expect(ps.get(1).getAttribute('class')).toBe('red');\n });\n\n it('array example should have 3 classes', function() {\n expect(ps.last().getAttribute('class')).toBe('');\n element(by.model('style1')).sendKeys('bold');\n element(by.model('style2')).sendKeys('strike');\n element(by.model('style3')).sendKeys('red');\n expect(ps.last().getAttribute('class')).toBe('bold strike red');\n });\n \n \n\n ## Animations\n\n The example below demonstrates how to perform animations using ngClass.\n\n \n \n \n \n \n Sample Text\n \n \n .base-class {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .base-class.my-class {\n color: red;\n font-size:3em;\n }\n \n \n it('should check ng-class', function() {\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n\n element(by.id('setbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).\n toMatch(/my-class/);\n\n element(by.id('clearbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n });\n \n \n\n\n ## ngClass and pre-existing CSS3 Transitions/Animations\n The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.\n Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder\n any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure\n to view the step by step details of {@link ngAnimate.$animate#addclass $animate.addClass} and\n {@link ngAnimate.$animate#removeclass $animate.removeClass}.\n */\nvar ngClassDirective = classDirective('', true);\n\n/**\n * @ngdoc directive\n * @name ngClassOdd\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n \n \n \n \n \n {{name}}\n \n \n \n \n \n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n \n \n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n \n \n */\nvar ngClassOddDirective = classDirective('Odd', 0);\n\n/**\n * @ngdoc directive\n * @name ngClassEven\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The\n * result of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n \n \n \n \n \n {{name}} \n \n \n \n \n \n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n \n \n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n \n \n */\nvar ngClassEvenDirective = classDirective('Even', 1);\n\n/**\n * @ngdoc directive\n * @name ngCloak\n * @restrict AC\n *\n * @description\n * The `ngCloak` directive is used to prevent the Angular html template from being briefly\n * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this\n * directive to avoid the undesirable flicker effect caused by the html template display.\n *\n * The directive can be applied to the `` element, but the preferred usage is to apply\n * multiple `ngCloak` directives to small portions of the page to permit progressive rendering\n * of the browser view.\n *\n * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and\n * `angular.min.js`.\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```css\n * [ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {\n * display: none !important;\n * }\n * ```\n *\n * When this css rule is loaded by the browser, all html elements (including their children) that\n * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive\n * during the compilation of the template it deletes the `ngCloak` element attribute, making\n * the compiled element visible.\n *\n * For the best result, the `angular.js` script must be loaded in the head section of the html\n * document; alternatively, the css rule above must be included in the external stylesheet of the\n * application.\n *\n * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they\n * cannot match the `[ng\\:cloak]` selector. To work around this limitation, you must add the css\n * class `ng-cloak` in addition to the `ngCloak` directive as shown in the example below.\n *\n * @element ANY\n *\n * @example\n \n \n {{ 'hello' }}\n {{ 'hello IE7' }}\n \n \n it('should remove the template directive and css class', function() {\n expect($('#template1').getAttribute('ng-cloak')).\n toBeNull();\n expect($('#template2').getAttribute('ng-cloak')).\n toBeNull();\n });\n \n \n *\n */\nvar ngCloakDirective = ngDirective({\n compile: function(element, attr) {\n attr.$set('ngCloak', undefined);\n element.removeClass('ng-cloak');\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngController\n *\n * @description\n * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular\n * supports the principles behind the Model-View-Controller design pattern.\n *\n * MVC components in angular:\n *\n * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties\n * are accessed through bindings.\n * * View — The template (HTML with data bindings) that is rendered into the View.\n * * Controller — The `ngController` directive specifies a Controller class; the class contains business\n * logic behind the application to decorate the scope with functions and values\n *\n * Note that you can also attach controllers to the DOM by declaring it in a route definition\n * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller\n * again using `ng-controller` in the template itself. This will cause the controller to be attached\n * and executed twice.\n *\n * @element ANY\n * @scope\n * @priority 500\n * @param {expression} ngController Name of a constructor function registered with the current\n * {@link ng.$controllerProvider $controllerProvider} or an {@link guide/expression expression}\n * that on the current scope evaluates to a constructor function.\n *\n * The controller instance can be published into a scope property by specifying\n * `ng-controller=\"as propertyName\"`.\n *\n * If the current `$controllerProvider` is configured to use globals (via\n * {@link ng.$controllerProvider#allowGlobals `$controllerProvider.allowGlobals()` }), this may\n * also be the name of a globally accessible constructor function (not recommended).\n *\n * @example\n * Here is a simple form for editing user contact information. Adding, removing, clearing, and\n * greeting are methods declared on the controller (see source tab). These methods can\n * easily be called from the angular markup. Any changes to the data are automatically reflected\n * in the View without the need for a manual update.\n *\n * Two different declaration styles are included below:\n *\n * * one binds methods and properties directly onto the controller using `this`:\n * `ng-controller=\"SettingsController1 as settings\"`\n * * one injects `$scope` into the controller:\n * `ng-controller=\"SettingsController2\"`\n *\n * The second option is more common in the Angular community, and is generally used in boilerplates\n * and in this guide. However, there are advantages to binding properties directly to the controller\n * and avoiding scope.\n *\n * * Using `controller as` makes it obvious which controller you are accessing in the template when\n * multiple controllers apply to an element.\n * * If you are writing your controllers as classes you have easier access to the properties and\n * methods, which will appear on the scope, from inside the controller code.\n * * Since there is always a `.` in the bindings, you don't have to worry about prototypal\n * inheritance masking primitives.\n *\n * This example demonstrates the `controller as` syntax.\n *\n * \n * \n * \n * Name: \n * [ greet ]\n * Contact:\n * \n * \n * \n * phone\n * email\n * \n * \n * [ clear\n * | X ]\n * \n * [ add ]\n * \n * \n * \n * \n * angular.module('controllerAsExample', [])\n * .controller('SettingsController1', SettingsController1);\n *\n * function SettingsController1() {\n * this.name = \"John Smith\";\n * this.contacts = [\n * {type: 'phone', value: '408 555 1212'},\n * {type: 'email', value: 'john.smith@example.org'} ];\n * }\n *\n * SettingsController1.prototype.greet = function() {\n * alert(this.name);\n * };\n *\n * SettingsController1.prototype.addContact = function() {\n * this.contacts.push({type: 'email', value: 'yourname@example.org'});\n * };\n *\n * SettingsController1.prototype.removeContact = function(contactToRemove) {\n * var index = this.contacts.indexOf(contactToRemove);\n * this.contacts.splice(index, 1);\n * };\n *\n * SettingsController1.prototype.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * \n * \n * it('should check controller as', function() {\n * var container = element(by.id('ctrl-as-exmpl'));\n * expect(container.element(by.model('settings.name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n *\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.linkText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.linkText('add')).click();\n *\n * expect(container.element(by.repeater('contact in settings.contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * \n * \n *\n * This example demonstrates the \"attach to `$scope`\" style of controller.\n *\n * \n * \n * \n * Name: \n * [ greet ]\n * Contact:\n * \n * \n * \n * phone\n * email\n * \n * \n * [ clear\n * | X ]\n * \n * [ add ]\n * \n * \n * \n * \n * angular.module('controllerExample', [])\n * .controller('SettingsController2', ['$scope', SettingsController2]);\n *\n * function SettingsController2($scope) {\n * $scope.name = \"John Smith\";\n * $scope.contacts = [\n * {type:'phone', value:'408 555 1212'},\n * {type:'email', value:'john.smith@example.org'} ];\n *\n * $scope.greet = function() {\n * alert($scope.name);\n * };\n *\n * $scope.addContact = function() {\n * $scope.contacts.push({type:'email', value:'yourname@example.org'});\n * };\n *\n * $scope.removeContact = function(contactToRemove) {\n * var index = $scope.contacts.indexOf(contactToRemove);\n * $scope.contacts.splice(index, 1);\n * };\n *\n * $scope.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * }\n * \n * \n * it('should check controller', function() {\n * var container = element(by.id('ctrl-exmpl'));\n *\n * expect(container.element(by.model('name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.linkText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.linkText('add')).click();\n *\n * expect(container.element(by.repeater('contact in contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * \n *\n\n */\nvar ngControllerDirective = [function() {\n return {\n restrict: 'A',\n scope: true,\n controller: '@',\n priority: 500\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngCsp\n *\n * @element html\n * @description\n * Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support.\n *\n * This is necessary when developing things like Google Chrome Extensions.\n *\n * CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).\n * For Angular to be CSP compatible there are only two things that we need to do differently:\n *\n * - don't use `Function` constructor to generate optimized value getters\n * - don't inject custom stylesheet into the document\n *\n * AngularJS uses `Function(string)` generated functions as a speed optimization. Applying the `ngCsp`\n * directive will cause Angular to use CSP compatibility mode. When this mode is on AngularJS will\n * evaluate all expressions up to 30% slower than in non-CSP mode, but no security violations will\n * be raised.\n *\n * CSP forbids JavaScript to inline stylesheet rules. In non CSP mode Angular automatically\n * includes some CSS rules (e.g. {@link ng.directive:ngCloak ngCloak}).\n * To make those directives work in CSP mode, include the `angular-csp.css` manually.\n *\n * Angular tries to autodetect if CSP is active and automatically turn on the CSP-safe mode. This\n * autodetection however triggers a CSP error to be logged in the console:\n *\n * ```\n * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of\n * script in the following Content Security Policy directive: \"default-src 'self'\". Note that\n * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.\n * ```\n *\n * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`\n * directive on the root element of the application or on the `angular.js` script tag, whichever\n * appears first in the html document.\n *\n * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*\n *\n * @example\n * This example shows how to apply the `ngCsp` directive to the `html` tag.\n ```html\n \n \n ...\n ...\n \n ```\n */\n\n// ngCsp is not implemented as a proper directive any more, because we need it be processed while we\n// bootstrap the system (before $parse is instantiated), for this reason we just have\n// the csp.isActive() fn that looks for ng-csp attribute anywhere in the current doc\n\n/**\n * @ngdoc directive\n * @name ngClick\n *\n * @description\n * The ngClick directive allows you to specify custom behavior when\n * an element is clicked.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon\n * click. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment\n \n \n count: {{count}}\n \n \n \n it('should check ng-click', function() {\n expect(element(by.binding('count')).getText()).toMatch('0');\n element(by.css('button')).click();\n expect(element(by.binding('count')).getText()).toMatch('1');\n });\n \n \n */\n/*\n * A directive that allows creation of custom onclick handlers that are defined as angular\n * expressions and are compiled and executed within the current scope.\n *\n * Events that are handled via these handler are always configured not to propagate further.\n */\nvar ngEventDirectives = {};\n\n// For events that might fire synchronously during DOM manipulation\n// we need to execute their event handlers asynchronously using $evalAsync,\n// so that they are not executed in an inconsistent state.\nvar forceAsyncEvents = {\n 'blur': true,\n 'focus': true\n};\nforEach(\n 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),\n function(eventName) {\n var directiveName = directiveNormalize('ng-' + eventName);\n ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {\n return {\n restrict: 'A',\n compile: function($element, attr) {\n var fn = $parse(attr[directiveName]);\n return function ngEventHandler(scope, element) {\n element.on(eventName, function(event) {\n var callback = function() {\n fn(scope, {$event:event});\n };\n if (forceAsyncEvents[eventName] && $rootScope.$$phase) {\n scope.$evalAsync(callback);\n } else {\n scope.$apply(callback);\n }\n });\n };\n }\n };\n }];\n }\n);\n\n/**\n * @ngdoc directive\n * @name ngDblclick\n *\n * @description\n * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon\n * a dblclick. (The Event object is available as `$event`)\n *\n * @example\n \n \n \n Increment (on double click)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousedown\n *\n * @description\n * The ngMousedown directive allows you to specify custom behavior on mousedown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon\n * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (on mouse down)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseup\n *\n * @description\n * Specify custom behavior on mouseup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon\n * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (on mouse up)\n \n count: {{count}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngMouseover\n *\n * @description\n * Specify custom behavior on mouseover event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon\n * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse is over)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseenter\n *\n * @description\n * Specify custom behavior on mouseenter event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon\n * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse enters)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseleave\n *\n * @description\n * Specify custom behavior on mouseleave event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon\n * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse leaves)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousemove\n *\n * @description\n * Specify custom behavior on mousemove event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon\n * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse moves)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeydown\n *\n * @description\n * Specify custom behavior on keydown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon\n * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n \n key down count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeyup\n *\n * @description\n * Specify custom behavior on keyup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon\n * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n Typing in the input box below updates the key count\n key up count: {{count}}\n\n Typing in the input box below updates the keycode\n \n event keyCode: {{ event.keyCode }}\n event altKey: {{ event.altKey }}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeypress\n *\n * @description\n * Specify custom behavior on keypress event.\n *\n * @element ANY\n * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon\n * keypress. ({@link guide/expression#-event- Event object is available as `$event`}\n * and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n \n key press count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngSubmit\n *\n * @description\n * Enables binding angular expressions to onsubmit events.\n *\n * Additionally it prevents the default action (which for form means sending the request to the\n * server and reloading the current page), but only if the form does not contain `action`,\n * `data-action`, or `x-action` attributes.\n *\n * \n * **Warning:** Be careful not to cause \"double-submission\" by using both the `ngClick` and\n * `ngSubmit` handlers together. See the\n * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}\n * for a detailed discussion of when `ngSubmit` may be triggered.\n * \n *\n * @element form\n * @priority 0\n * @param {expression} ngSubmit {@link guide/expression Expression} to eval.\n * ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n \n Enter text and hit enter:\n \n \n list={{list}}\n \n \n \n it('should check ng-submit', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n expect(element(by.model('text')).getAttribute('value')).toBe('');\n });\n it('should ignore empty strings', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n });\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngFocus\n *\n * @description\n * Specify custom behavior on focus event.\n *\n * Note: As the `focus` event is executed synchronously when calling `input.focus()`\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon\n * focus. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngBlur\n *\n * @description\n * Specify custom behavior on blur event.\n *\n * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when\n * an element has lost focus.\n *\n * Note: As the `blur` event is executed synchronously also during DOM manipulations\n * (e.g. removing a focussed input),\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon\n * blur. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngCopy\n *\n * @description\n * Specify custom behavior on copy event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon\n * copy. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n copied: {{copied}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngCut\n *\n * @description\n * Specify custom behavior on cut event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon\n * cut. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n cut: {{cut}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngPaste\n *\n * @description\n * Specify custom behavior on paste event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon\n * paste. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n pasted: {{paste}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngIf\n * @restrict A\n *\n * @description\n * The `ngIf` directive removes or recreates a portion of the DOM tree based on an\n * {expression}. If the expression assigned to `ngIf` evaluates to a false\n * value then the element is removed from the DOM, otherwise a clone of the\n * element is reinserted into the DOM.\n *\n * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the\n * element in the DOM rather than changing its visibility via the `display` css property. A common\n * case when this difference is significant is when using css selectors that rely on an element's\n * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.\n *\n * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope\n * is created when the element is restored. The scope created within `ngIf` inherits from\n * its parent scope using\n * [prototypal inheritance](https://github.com/angular/angular.js/wiki/The-Nuances-of-Scope-Prototypal-Inheritance).\n * An important implication of this is if `ngModel` is used within `ngIf` to bind to\n * a javascript primitive defined in the parent scope. In this case any modifications made to the\n * variable within the child scope will override (hide) the value in the parent scope.\n *\n * Also, `ngIf` recreates elements using their compiled state. An example of this behavior\n * is if an element's class attribute is directly modified after it's compiled, using something like\n * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element\n * the added class will be lost because the original compiled state is used to regenerate the element.\n *\n * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`\n * and `leave` effects.\n *\n * @animations\n * enter - happens just after the ngIf contents change and a new DOM element is created and injected into the ngIf container\n * leave - happens just before the ngIf contents are removed from the DOM\n *\n * @element ANY\n * @scope\n * @priority 600\n * @param {expression} ngIf If the {@link guide/expression expression} is falsy then\n * the element is removed from the DOM tree. If it is truthy a copy of the compiled\n * element is added to the DOM tree.\n *\n * @example\n \n \n Click me: \n Show when checked:\n \n I'm removed when the checkbox is unchecked.\n \n \n \n .animate-if {\n background:white;\n border:1px solid black;\n padding:10px;\n }\n\n .animate-if.ng-enter, .animate-if.ng-leave {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .animate-if.ng-enter,\n .animate-if.ng-leave.ng-leave-active {\n opacity:0;\n }\n\n .animate-if.ng-leave,\n .animate-if.ng-enter.ng-enter-active {\n opacity:1;\n }\n \n \n */\nvar ngIfDirective = ['$animate', function($animate) {\n return {\n multiElement: true,\n transclude: 'element',\n priority: 600,\n terminal: true,\n restrict: 'A',\n $$tlb: true,\n link: function ($scope, $element, $attr, ctrl, $transclude) {\n var block, childScope, previousElements;\n $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {\n\n if (value) {\n if (!childScope) {\n $transclude(function (clone, newScope) {\n childScope = newScope;\n clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block = {\n clone: clone\n };\n $animate.enter(clone, $element.parent(), $element);\n });\n }\n } else {\n if(previousElements) {\n previousElements.remove();\n previousElements = null;\n }\n if(childScope) {\n childScope.$destroy();\n childScope = null;\n }\n if(block) {\n previousElements = getBlockNodes(block.clone);\n $animate.leave(previousElements).then(function() {\n previousElements = null;\n });\n block = null;\n }\n }\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngInclude\n * @restrict ECA\n *\n * @description\n * Fetches, compiles and includes an external HTML fragment.\n *\n * By default, the template URL is restricted to the same domain and protocol as the\n * application document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols\n * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or\n * [wrap them](ng.$sce#trustAsResourceUrl) as trusted values. Refer to Angular's {@link\n * ng.$sce Strict Contextual Escaping}.\n *\n * In addition, the browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy may further restrict whether the template is successfully loaded.\n * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`\n * access on some browsers.\n *\n * @animations\n * enter - animation is used to bring new content into the browser.\n * leave - animation is used to animate existing content away.\n *\n * The enter and leave animation occur concurrently.\n *\n * @scope\n * @priority 400\n *\n * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,\n * make sure you wrap it in **single** quotes, e.g. `src=\"'myPartialTemplate.html'\"`.\n * @param {string=} onload Expression to evaluate when a new partial is loaded.\n *\n * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll\n * $anchorScroll} to scroll the viewport after the content is loaded.\n *\n * - If the attribute is not set, disable scrolling.\n * - If the attribute is set without value, enable scrolling.\n * - Otherwise enable scrolling only if the expression evaluates to truthy value.\n *\n * @example\n \n \n \n \n (blank)\n \n url of the template: {{template.url}}\n \n \n \n \n \n \n \n angular.module('includeExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.templates =\n [ { name: 'template1.html', url: 'template1.html'},\n { name: 'template2.html', url: 'template2.html'} ];\n $scope.template = $scope.templates[0];\n }]);\n \n \n Content of template1.html\n \n \n Content of template2.html\n \n \n .slide-animate-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .slide-animate {\n padding:10px;\n }\n\n .slide-animate.ng-enter, .slide-animate.ng-leave {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n display:block;\n padding:10px;\n }\n\n .slide-animate.ng-enter {\n top:-50px;\n }\n .slide-animate.ng-enter.ng-enter-active {\n top:0;\n }\n\n .slide-animate.ng-leave {\n top:0;\n }\n .slide-animate.ng-leave.ng-leave-active {\n top:50px;\n }\n \n \n var templateSelect = element(by.model('template'));\n var includeElem = element(by.css('[ng-include]'));\n\n it('should load template1.html', function() {\n expect(includeElem.getText()).toMatch(/Content of template1.html/);\n });\n\n it('should load template2.html', function() {\n if (browser.params.browser == 'firefox') {\n // Firefox can't handle using selects\n // See https://github.com/angular/protractor/issues/480\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(2).click();\n expect(includeElem.getText()).toMatch(/Content of template2.html/);\n });\n\n it('should change to blank', function() {\n if (browser.params.browser == 'firefox') {\n // Firefox can't handle using selects\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(0).click();\n expect(includeElem.isPresent()).toBe(false);\n });\n \n \n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentRequested\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted every time the ngInclude content is requested.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentLoaded\n * @eventType emit on the current ngInclude scope\n * @description\n * Emitted every time the ngInclude content is reloaded.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentError\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted when a template HTTP request yields an erronous response (status < 200 || status > 299)\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\nvar ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', '$sce',\n function($templateRequest, $anchorScroll, $animate, $sce) {\n return {\n restrict: 'ECA',\n priority: 400,\n terminal: true,\n transclude: 'element',\n controller: angular.noop,\n compile: function(element, attr) {\n var srcExp = attr.ngInclude || attr.src,\n onloadExp = attr.onload || '',\n autoScrollExp = attr.autoscroll;\n\n return function(scope, $element, $attr, ctrl, $transclude) {\n var changeCounter = 0,\n currentScope,\n previousElement,\n currentElement;\n\n var cleanupLastIncludeContent = function() {\n if(previousElement) {\n previousElement.remove();\n previousElement = null;\n }\n if(currentScope) {\n currentScope.$destroy();\n currentScope = null;\n }\n if(currentElement) {\n $animate.leave(currentElement).then(function() {\n previousElement = null;\n });\n previousElement = currentElement;\n currentElement = null;\n }\n };\n\n scope.$watch($sce.parseAsResourceUrl(srcExp), function ngIncludeWatchAction(src) {\n var afterAnimation = function() {\n if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n $anchorScroll();\n }\n };\n var thisChangeId = ++changeCounter;\n\n if (src) {\n //set the 2nd param to true to ignore the template request error so that the inner\n //contents and scope can be cleaned up.\n $templateRequest(src, true).then(function(response) {\n if (thisChangeId !== changeCounter) return;\n var newScope = scope.$new();\n ctrl.template = response;\n\n // Note: This will also link all children of ng-include that were contained in the original\n // html. If that content contains controllers, ... they could pollute/change the scope.\n // However, using ng-include on an element with additional content does not make sense...\n // Note: We can't remove them in the cloneAttchFn of $transclude as that\n // function is called before linking the content, which would apply child\n // directives to non existing elements.\n var clone = $transclude(newScope, function(clone) {\n cleanupLastIncludeContent();\n $animate.enter(clone, null, $element).then(afterAnimation);\n });\n\n currentScope = newScope;\n currentElement = clone;\n\n currentScope.$emit('$includeContentLoaded', src);\n scope.$eval(onloadExp);\n }, function() {\n if (thisChangeId === changeCounter) {\n cleanupLastIncludeContent();\n scope.$emit('$includeContentError', src);\n }\n });\n scope.$emit('$includeContentRequested', src);\n } else {\n cleanupLastIncludeContent();\n ctrl.template = null;\n }\n });\n };\n }\n };\n}];\n\n// This directive is called during the $transclude call of the first `ngInclude` directive.\n// It will replace and compile the content of the element with the loaded template.\n// We need this directive so that the element content is already filled when\n// the link function of another directive on the same element as ngInclude\n// is called.\nvar ngIncludeFillContentDirective = ['$compile',\n function($compile) {\n return {\n restrict: 'ECA',\n priority: -400,\n require: 'ngInclude',\n link: function(scope, $element, $attr, ctrl) {\n if (/SVG/.test($element[0].toString())) {\n // WebKit: https://bugs.webkit.org/show_bug.cgi?id=135698 --- SVG elements do not\n // support innerHTML, so detect this here and try to generate the contents\n // specially.\n $element.empty();\n $compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,\n function namespaceAdaptedClone(clone) {\n $element.append(clone);\n }, undefined, undefined, $element);\n return;\n }\n\n $element.html(ctrl.template);\n $compile($element.contents())(scope);\n }\n };\n }];\n\n/**\n * @ngdoc directive\n * @name ngInit\n * @restrict AC\n *\n * @description\n * The `ngInit` directive allows you to evaluate an expression in the\n * current scope.\n *\n * \n * The only appropriate use of `ngInit` is for aliasing special properties of\n * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below. Besides this case, you\n * should use {@link guide/controller controllers} rather than `ngInit`\n * to initialize values on a scope.\n * \n * \n * **Note**: If you have assignment in `ngInit` along with {@link ng.$filter `$filter`}, make\n * sure you have parenthesis for correct precedence:\n * \n * \n * \n * \n *\n * @priority 450\n *\n * @element ANY\n * @param {expression} ngInit {@link guide/expression Expression} to eval.\n *\n * @example\n \n \n \n \n \n \n list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};\n \n \n \n \n \n it('should alias index positions', function() {\n var elements = element.all(by.css('.example-init'));\n expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');\n expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');\n expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');\n expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');\n });\n \n \n */\nvar ngInitDirective = ngDirective({\n priority: 450,\n compile: function() {\n return {\n pre: function(scope, element, attrs) {\n scope.$eval(attrs.ngInit);\n }\n };\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngNonBindable\n * @restrict AC\n * @priority 1000\n *\n * @description\n * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current\n * DOM element. This is useful if the element contains what appears to be Angular directives and\n * bindings but which should be ignored by Angular. This could be the case if you have a site that\n * displays snippets of code, for instance.\n *\n * @element ANY\n *\n * @example\n * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n * but the one wrapped in `ngNonBindable` is left alone.\n *\n * @example\n \n \n Normal: {{1 + 2}}\n Ignored: {{1 + 2}}\n \n \n it('should check ng-non-bindable', function() {\n expect(element(by.binding('1 + 2')).getText()).toContain('3');\n expect(element.all(by.css('div')).last().getText()).toMatch(/1 \\+ 2/);\n });\n \n \n */\nvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\n/**\n * @ngdoc directive\n * @name ngPluralize\n * @restrict EA\n *\n * @description\n * `ngPluralize` is a directive that displays messages according to en-US localization rules.\n * These rules are bundled with angular.js, but can be overridden\n * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive\n * by specifying the mappings between\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * and the strings to be displayed.\n *\n * # Plural categories and explicit number rules\n * There are two\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * in Angular's default en-US locale: \"one\" and \"other\".\n *\n * While a plural category may match many numbers (for example, in en-US locale, \"other\" can match\n * any number that is not 1), an explicit number rule can only match one number. For example, the\n * explicit number rule for \"3\" matches the number 3. There are examples of plural categories\n * and explicit number rules throughout the rest of this documentation.\n *\n * # Configuring ngPluralize\n * You configure ngPluralize by providing 2 attributes: `count` and `when`.\n * You can also provide an optional attribute, `offset`.\n *\n * The value of the `count` attribute can be either a string or an {@link guide/expression\n * Angular expression}; these are evaluated on the current scope for its bound value.\n *\n * The `when` attribute specifies the mappings between plural categories and the actual\n * string to be displayed. The value of the attribute should be a JSON object.\n *\n * The following example shows how to configure ngPluralize:\n *\n * ```html\n * \n * \n *```\n *\n * In the example, `\"0: Nobody is viewing.\"` is an explicit number rule. If you did not\n * specify this rule, 0 would be matched to the \"other\" category and \"0 people are viewing\"\n * would be shown instead of \"Nobody is viewing\". You can specify an explicit number rule for\n * other numbers, for example 12, so that instead of showing \"12 people are viewing\", you can\n * show \"a dozen people are viewing\".\n *\n * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted\n * into pluralized strings. In the previous example, Angular will replace `{}` with\n * `{{personCount}}`. The closed braces `{}` is a placeholder\n * for {{numberExpression}}.\n *\n * # Configuring ngPluralize with offset\n * The `offset` attribute allows further customization of pluralized text, which can result in\n * a better user experience. For example, instead of the message \"4 people are viewing this document\",\n * you might display \"John, Kate and 2 others are viewing this document\".\n * The offset attribute allows you to offset a number by any desired value.\n * Let's take a look at an example:\n *\n * ```html\n * \n * \n * ```\n *\n * Notice that we are still using two plural categories(one, other), but we added\n * three explicit number rules 0, 1 and 2.\n * When one person, perhaps John, views the document, \"John is viewing\" will be shown.\n * When three people view the document, no explicit number rule is found, so\n * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.\n * In this case, plural category 'one' is matched and \"John, Mary and one other person are viewing\"\n * is shown.\n *\n * Note that when you specify offsets, you must provide explicit number rules for\n * numbers from 0 up to and including the offset. If you use an offset of 3, for example,\n * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for\n * plural categories \"one\" and \"other\".\n *\n * @param {string|expression} count The variable to be bound to.\n * @param {string} when The mapping between plural category to its corresponding strings.\n * @param {number=} offset Offset to deduct from the total number.\n *\n * @example\n \n \n \n \n Person 1:\n Person 2:\n Number of People:\n\n \n Without Offset:\n \n \n\n \n With Offset(2):\n \n \n \n \n \n it('should show correct pluralized string', function() {\n var withoutOffset = element.all(by.css('ng-pluralize')).get(0);\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var countInput = element(by.model('personCount'));\n\n expect(withoutOffset.getText()).toEqual('1 person is viewing.');\n expect(withOffset.getText()).toEqual('Igor is viewing.');\n\n countInput.clear();\n countInput.sendKeys('0');\n\n expect(withoutOffset.getText()).toEqual('Nobody is viewing.');\n expect(withOffset.getText()).toEqual('Nobody is viewing.');\n\n countInput.clear();\n countInput.sendKeys('2');\n\n expect(withoutOffset.getText()).toEqual('2 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');\n\n countInput.clear();\n countInput.sendKeys('3');\n\n expect(withoutOffset.getText()).toEqual('3 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');\n\n countInput.clear();\n countInput.sendKeys('4');\n\n expect(withoutOffset.getText()).toEqual('4 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');\n });\n it('should show data-bound names', function() {\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var personCount = element(by.model('personCount'));\n var person1 = element(by.model('person1'));\n var person2 = element(by.model('person2'));\n personCount.clear();\n personCount.sendKeys('4');\n person1.clear();\n person1.sendKeys('Di');\n person2.clear();\n person2.sendKeys('Vojta');\n expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');\n });\n \n \n */\nvar ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interpolate) {\n var BRACE = /{}/g;\n return {\n restrict: 'EA',\n link: function(scope, element, attr) {\n var numberExp = attr.count,\n whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs\n offset = attr.offset || 0,\n whens = scope.$eval(whenExp) || {},\n whensExpFns = {},\n startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n isWhen = /^when(Minus)?(.+)$/;\n\n forEach(attr, function(expression, attributeName) {\n if (isWhen.test(attributeName)) {\n whens[lowercase(attributeName.replace('when', '').replace('Minus', '-'))] =\n element.attr(attr.$attr[attributeName]);\n }\n });\n forEach(whens, function(expression, key) {\n whensExpFns[key] =\n $interpolate(expression.replace(BRACE, startSymbol + numberExp + '-' +\n offset + endSymbol));\n });\n\n scope.$watch(function ngPluralizeWatch() {\n var value = parseFloat(scope.$eval(numberExp));\n\n if (!isNaN(value)) {\n //if explicit number rule such as 1, 2, 3... is defined, just use it. Otherwise,\n //check it against pluralization rules in $locale service\n if (!(value in whens)) value = $locale.pluralCat(value - offset);\n return whensExpFns[value](scope);\n } else {\n return '';\n }\n }, function ngPluralizeWatchAction(newVal) {\n element.text(newVal);\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngRepeat\n *\n * @description\n * The `ngRepeat` directive instantiates a template once per item from a collection. Each template\n * instance gets its own scope, where the given loop variable is set to the current collection item,\n * and `$index` is set to the item index or key.\n *\n * Special properties are exposed on the local scope of each template instance, including:\n *\n * | Variable | Type | Details |\n * |-----------|-----------------|-----------------------------------------------------------------------------|\n * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |\n * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |\n * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |\n * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |\n * | `$even` | {@type boolean} | true if the iterator position `$index` is even (otherwise false). |\n * | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |\n *\n * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.\n * This may be useful when, for instance, nesting ngRepeats.\n *\n * # Special repeat start and end points\n * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending\n * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.\n * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)\n * up to and including the ending HTML tag where **ng-repeat-end** is placed.\n *\n * The example below makes use of this feature:\n * ```html\n * \n * Header {{ item }}\n * \n * \n * Body {{ item }}\n * \n * \n * ```\n *\n * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:\n * ```html\n * \n * Header A\n * \n * \n * Body A\n * \n * \n * \n * Header B\n * \n * \n * Body B\n * \n * \n * ```\n *\n * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such\n * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).\n *\n * @animations\n * **.enter** - when a new item is added to the list or when an item is revealed after a filter\n *\n * **.leave** - when an item is removed from the list or when an item is filtered out\n *\n * **.move** - when an adjacent item is filtered out causing a reorder or when the item contents are reordered\n *\n * @element ANY\n * @scope\n * @priority 1000\n * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These\n * formats are currently supported:\n *\n * * `variable in expression` – where variable is the user defined loop variable and `expression`\n * is a scope expression giving the collection to enumerate.\n *\n * For example: `album in artist.albums`.\n *\n * * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,\n * and `expression` is the scope expression giving the collection to enumerate.\n *\n * For example: `(name, age) in {'adam':10, 'amalie':12}`.\n *\n * * `variable in expression track by tracking_expression` – You can also provide an optional tracking function\n * which can be used to associate the objects in the collection with the DOM elements. If no tracking function\n * is specified the ng-repeat associates elements by identity in the collection. It is an error to have\n * more than one tracking function to resolve to the same key. (This would mean that two distinct objects are\n * mapped to the same DOM element, which is not possible.) Filters should be applied to the expression,\n * before specifying a tracking expression.\n *\n * For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements\n * will be associated by item identity in the array.\n *\n * * `variable in expression as alias_expression` – You can also provide an optional alias expression which will then store the\n * intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message\n * when a filter is active on the repeater, but the filtered result set is empty.\n *\n * For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after\n * the items have been processed through the filter.\n *\n * For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique\n * `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements\n * with the corresponding item in the array by identity. Moving the same object in array would move the DOM\n * element in the same way in the DOM.\n *\n * For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this\n * case the object identity does not matter. Two objects are considered equivalent as long as their `id`\n * property is same.\n *\n * For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter\n * to items in conjunction with a tracking expression.\n *\n * @example\n * This example initializes the scope to a list of names and\n * then uses `ngRepeat` to display every person:\n \n \n \n I have {{friends.length}} friends. They are:\n \n \n \n [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.\n \n \n No results found...\n \n \n \n \n \n .example-animate-container {\n background:white;\n border:1px solid black;\n list-style:none;\n margin:0;\n padding:0 10px;\n }\n\n .animate-repeat {\n line-height:40px;\n list-style:none;\n box-sizing:border-box;\n }\n\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter,\n .animate-repeat.ng-leave {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n }\n\n .animate-repeat.ng-leave.ng-leave-active,\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter {\n opacity:0;\n max-height:0;\n }\n\n .animate-repeat.ng-leave,\n .animate-repeat.ng-move.ng-move-active,\n .animate-repeat.ng-enter.ng-enter-active {\n opacity:1;\n max-height:40px;\n }\n \n \n var friends = element.all(by.repeater('friend in friends'));\n\n it('should render initial data set', function() {\n expect(friends.count()).toBe(10);\n expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');\n expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');\n expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');\n expect(element(by.binding('friends.length')).getText())\n .toMatch(\"I have 10 friends. They are:\");\n });\n\n it('should update repeater when filter predicate changes', function() {\n expect(friends.count()).toBe(10);\n\n element(by.model('q')).sendKeys('ma');\n\n expect(friends.count()).toBe(2);\n expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');\n expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');\n });\n \n \n */\nvar ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {\n var NG_REMOVED = '$$NG_REMOVED';\n var ngRepeatMinErr = minErr('ngRepeat');\n\n var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {\n // TODO(perf): generate setters to shave off ~40ms or 1-1.5%\n scope[valueIdentifier] = value;\n if (keyIdentifier) scope[keyIdentifier] = key;\n scope.$index = index;\n scope.$first = (index === 0);\n scope.$last = (index === (arrayLength - 1));\n scope.$middle = !(scope.$first || scope.$last);\n // jshint bitwise: false\n scope.$odd = !(scope.$even = (index&1) === 0);\n // jshint bitwise: true\n };\n\n var getBlockStart = function(block) {\n return block.clone[0];\n };\n\n var getBlockEnd = function(block) {\n return block.clone[block.clone.length - 1];\n };\n\n\n return {\n restrict: 'A',\n multiElement: true,\n transclude: 'element',\n priority: 1000,\n terminal: true,\n $$tlb: true,\n compile: function ngRepeatCompile($element, $attr) {\n var expression = $attr.ngRepeat;\n var ngRepeatEndComment = document.createComment(' end ngRepeat: ' + expression + ' ');\n\n var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n\n if (!match) {\n throw ngRepeatMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n expression);\n }\n\n var lhs = match[1];\n var rhs = match[2];\n var aliasAs = match[3];\n var trackByExp = match[4];\n\n match = lhs.match(/^(?:([\\$\\w]+)|\\(([\\$\\w]+)\\s*,\\s*([\\$\\w]+)\\))$/);\n\n if (!match) {\n throw ngRepeatMinErr('iidexp', \"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.\",\n lhs);\n }\n var valueIdentifier = match[3] || match[1];\n var keyIdentifier = match[2];\n\n if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||\n /^(null|undefined|this|\\$index|\\$first|\\$middle|\\$last|\\$even|\\$odd|\\$parent)$/.test(aliasAs))) {\n throw ngRepeatMinErr('badident', \"alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.\",\n aliasAs);\n }\n\n var trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn;\n var hashFnLocals = {$id: hashKey};\n\n if (trackByExp) {\n trackByExpGetter = $parse(trackByExp);\n } else {\n trackByIdArrayFn = function (key, value) {\n return hashKey(value);\n };\n trackByIdObjFn = function (key) {\n return key;\n };\n }\n\n return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {\n\n if (trackByExpGetter) {\n trackByIdExpFn = function(key, value, index) {\n // assign key, value, and $index to the locals so that they can be used in hash functions\n if (keyIdentifier) hashFnLocals[keyIdentifier] = key;\n hashFnLocals[valueIdentifier] = value;\n hashFnLocals.$index = index;\n return trackByExpGetter($scope, hashFnLocals);\n };\n }\n\n // Store a list of elements from previous run. This is a hash where key is the item from the\n // iterator, and the value is objects with following properties.\n // - scope: bound scope\n // - element: previous element.\n // - index: position\n //\n // We are using no-proto object so that we don't need to guard against inherited props via\n // hasOwnProperty.\n var lastBlockMap = createMap();\n\n //watch props\n $scope.$watchCollection(rhs, function ngRepeatAction(collection) {\n var index, length,\n previousNode = $element[0], // node that cloned nodes should be inserted after\n // initialized to the comment node anchor\n nextNode,\n // Same as lastBlockMap but it has the current state. It will become the\n // lastBlockMap on the next iteration.\n nextBlockMap = createMap(),\n collectionLength,\n key, value, // key/value of iteration\n trackById,\n trackByIdFn,\n collectionKeys,\n block, // last object information {scope, element, id}\n nextBlockOrder,\n elementsToRemove;\n\n if (aliasAs) {\n $scope[aliasAs] = collection;\n }\n\n if (isArrayLike(collection)) {\n collectionKeys = collection;\n trackByIdFn = trackByIdExpFn || trackByIdArrayFn;\n } else {\n trackByIdFn = trackByIdExpFn || trackByIdObjFn;\n // if object, extract keys, sort them and use to determine order of iteration over obj props\n collectionKeys = [];\n for (var itemKey in collection) {\n if (collection.hasOwnProperty(itemKey) && itemKey.charAt(0) != '$') {\n collectionKeys.push(itemKey);\n }\n }\n collectionKeys.sort();\n }\n\n collectionLength = collectionKeys.length;\n nextBlockOrder = new Array(collectionLength);\n\n // locate existing items\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n trackById = trackByIdFn(key, value, index);\n if (lastBlockMap[trackById]) {\n // found previously seen block\n block = lastBlockMap[trackById];\n delete lastBlockMap[trackById];\n nextBlockMap[trackById] = block;\n nextBlockOrder[index] = block;\n } else if (nextBlockMap[trackById]) {\n // if collision detected. restore lastBlockMap and throw an error\n forEach(nextBlockOrder, function (block) {\n if (block && block.scope) lastBlockMap[block.id] = block;\n });\n throw ngRepeatMinErr('dupes',\n \"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}\",\n expression, trackById, toJson(value));\n } else {\n // new never before seen block\n nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};\n nextBlockMap[trackById] = true;\n }\n }\n\n // remove leftover items\n for (var blockKey in lastBlockMap) {\n block = lastBlockMap[blockKey];\n elementsToRemove = getBlockNodes(block.clone);\n $animate.leave(elementsToRemove);\n if (elementsToRemove[0].parentNode) {\n // if the element was not removed yet because of pending animation, mark it as deleted\n // so that we can ignore it later\n for (index = 0, length = elementsToRemove.length; index < length; index++) {\n elementsToRemove[index][NG_REMOVED] = true;\n }\n }\n block.scope.$destroy();\n }\n\n // we are not using forEach for perf reasons (trying to avoid #call)\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n block = nextBlockOrder[index];\n\n if (block.scope) {\n // if we have already seen this object, then we need to reuse the\n // associated scope/element\n\n nextNode = previousNode;\n\n // skip nodes that are already pending removal via leave animation\n do {\n nextNode = nextNode.nextSibling;\n } while (nextNode && nextNode[NG_REMOVED]);\n\n if (getBlockStart(block) != nextNode) {\n // existing item which got moved\n $animate.move(getBlockNodes(block.clone), null, jqLite(previousNode));\n }\n previousNode = getBlockEnd(block);\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n } else {\n // new item which we don't know about\n $transclude(function ngRepeatTransclude(clone, scope) {\n block.scope = scope;\n // http://jsperf.com/clone-vs-createcomment\n var endNode = ngRepeatEndComment.cloneNode(false);\n clone[clone.length++] = endNode;\n\n // TODO(perf): support naked previousNode in `enter` to avoid creation of jqLite wrapper?\n $animate.enter(clone, null, jqLite(previousNode));\n previousNode = endNode;\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block.clone = clone;\n nextBlockMap[block.id] = block;\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n });\n }\n }\n lastBlockMap = nextBlockMap;\n });\n };\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngShow\n *\n * @description\n * The `ngShow` directive shows or hides the given HTML element based on the expression\n * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding\n * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * \n * \n *\n * \n * \n * ```\n *\n * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When truthy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n * /* this is just another form of hiding an element */\n * display:block!important;\n * position:absolute;\n * top:-9999px;\n * left:-9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngShow`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass except that\n * you must also include the !important flag to override the display property\n * so that you can perform an animation when the element is hidden during the time of the animation.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * /* this is required as of 1.3x to properly\n * apply all styling in a show/hide animation */\n * transition:0s linear all;\n * }\n *\n * .my-element.ng-hide-add-active,\n * .my-element.ng-hide-remove-active {\n * /* the transition is defined in the active class */\n * transition:1s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * addClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a truthy value and the just before contents are set to visible\n * removeClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden\n *\n * @element ANY\n * @param {expression} ngShow If the {@link guide/expression expression} is truthy\n * then the element is shown or hidden respectively.\n *\n * @example\n \n \n Click me: \n \n Show:\n \n I show up when your checkbox is checked.\n \n \n \n Hide:\n \n I hide when your checkbox is checked.\n \n \n \n \n @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);\n \n \n .animate-show {\n line-height:20px;\n opacity:1;\n padding:10px;\n border:1px solid black;\n background:white;\n }\n\n .animate-show.ng-hide-add.ng-hide-add-active,\n .animate-show.ng-hide-remove.ng-hide-remove-active {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n }\n\n .animate-show.ng-hide {\n line-height:0;\n opacity:0;\n padding:0 10px;\n }\n\n .check-element {\n padding:10px;\n border:1px solid black;\n background:white;\n }\n \n \n var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n it('should check ng-show / ng-hide', function() {\n expect(thumbsUp.isDisplayed()).toBeFalsy();\n expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n element(by.model('checked')).click();\n\n expect(thumbsUp.isDisplayed()).toBeTruthy();\n expect(thumbsDown.isDisplayed()).toBeFalsy();\n });\n \n \n */\nvar ngShowDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngShow, function ngShowWatchAction(value){\n $animate[value ? 'removeClass' : 'addClass'](element, 'ng-hide');\n });\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngHide\n *\n * @description\n * The `ngHide` directive shows or hides the given HTML element based on the expression\n * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * \n * \n *\n * \n * \n * ```\n *\n * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When falsy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n * /* this is just another form of hiding an element */\n * display:block!important;\n * position:absolute;\n * top:-9999px;\n * left:-9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngHide`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`\n * CSS class is added and removed for you instead of your own CSS class.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * transition:0.5s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * removeClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden\n * addClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a non truthy value and just before the contents are set to visible\n *\n * @element ANY\n * @param {expression} ngHide If the {@link guide/expression expression} is truthy then\n * the element is shown or hidden respectively.\n *\n * @example\n \n \n Click me: \n \n Show:\n \n I show up when your checkbox is checked.\n \n \n \n Hide:\n \n I hide when your checkbox is checked.\n \n \n \n \n @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);\n \n \n .animate-hide {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n line-height:20px;\n opacity:1;\n padding:10px;\n border:1px solid black;\n background:white;\n }\n\n .animate-hide.ng-hide {\n line-height:0;\n opacity:0;\n padding:0 10px;\n }\n\n .check-element {\n padding:10px;\n border:1px solid black;\n background:white;\n }\n \n \n var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n it('should check ng-show / ng-hide', function() {\n expect(thumbsUp.isDisplayed()).toBeFalsy();\n expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n element(by.model('checked')).click();\n\n expect(thumbsUp.isDisplayed()).toBeTruthy();\n expect(thumbsDown.isDisplayed()).toBeFalsy();\n });\n \n \n */\nvar ngHideDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngHide, function ngHideWatchAction(value){\n $animate[value ? 'addClass' : 'removeClass'](element, 'ng-hide');\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngStyle\n * @restrict AC\n *\n * @description\n * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.\n *\n * @element ANY\n * @param {expression} ngStyle\n *\n * {@link guide/expression Expression} which evals to an\n * object whose keys are CSS style names and values are corresponding values for those CSS\n * keys.\n *\n * Since some CSS style names are not valid keys for an object, they must be quoted.\n * See the 'background-color' style in the example below.\n *\n * @example\n \n \n \n \n \n \n Sample Text\n myStyle={{myStyle}}\n \n \n span {\n color: black;\n }\n \n \n var colorSpan = element(by.css('span'));\n\n it('should check ng-style', function() {\n expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n element(by.css('input[value=\\'set color\\']')).click();\n expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');\n element(by.css('input[value=clear]')).click();\n expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n });\n \n \n */\nvar ngStyleDirective = ngDirective(function(scope, element, attr) {\n scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {\n if (oldStyles && (newStyles !== oldStyles)) {\n forEach(oldStyles, function(val, style) { element.css(style, '');});\n }\n if (newStyles) element.css(newStyles);\n }, true);\n});\n\n/**\n * @ngdoc directive\n * @name ngSwitch\n * @restrict EA\n *\n * @description\n * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.\n * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location\n * as specified in the template.\n *\n * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it\n * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element\n * matches the value obtained from the evaluated expression. In other words, you define a container element\n * (where you place the directive), place an expression on the **`on=\"...\"` attribute**\n * (or the **`ng-switch=\"...\"` attribute**), define any inner elements inside of the directive and place\n * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on\n * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default\n * attribute is displayed.\n *\n * \n * Be aware that the attribute values to match against cannot be expressions. They are interpreted\n * as literal string values to match against.\n * For example, **`ng-switch-when=\"someVal\"`** will match against the string `\"someVal\"` not against the\n * value of the expression `$scope.someVal`.\n * \n\n * @animations\n * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container\n * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM\n *\n * @usage\n *\n * ```\n * \n * ...\n * ...\n * ...\n * \n * ```\n *\n *\n * @scope\n * @priority 1200\n * @param {*} ngSwitch|on expression to match against ng-switch-when.\n * On child elements add:\n *\n * * `ngSwitchWhen`: the case statement to match against. If match then this\n * case will be displayed. If the same match appears multiple times, all the\n * elements will be displayed.\n * * `ngSwitchDefault`: the default case when no other case match. If there\n * are multiple default cases, all of them will be displayed when no other\n * case match.\n *\n *\n * @example\n \n \n \n \n \n selection={{selection}}\n \n \n Settings Div\n Home Span\n default\n \n \n \n \n angular.module('switchExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.items = ['settings', 'home', 'other'];\n $scope.selection = $scope.items[0];\n }]);\n \n \n .animate-switch-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .animate-switch {\n padding:10px;\n }\n\n .animate-switch.ng-animate {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n }\n\n .animate-switch.ng-leave.ng-leave-active,\n .animate-switch.ng-enter {\n top:-50px;\n }\n .animate-switch.ng-leave,\n .animate-switch.ng-enter.ng-enter-active {\n top:0;\n }\n \n \n var switchElem = element(by.css('[ng-switch]'));\n var select = element(by.model('selection'));\n\n it('should start in settings', function() {\n expect(switchElem.getText()).toMatch(/Settings Div/);\n });\n it('should change to home', function() {\n select.all(by.css('option')).get(1).click();\n expect(switchElem.getText()).toMatch(/Home Span/);\n });\n it('should select default', function() {\n select.all(by.css('option')).get(2).click();\n expect(switchElem.getText()).toMatch(/default/);\n });\n \n \n */\nvar ngSwitchDirective = ['$animate', function($animate) {\n return {\n restrict: 'EA',\n require: 'ngSwitch',\n\n // asks for $scope to fool the BC controller module\n controller: ['$scope', function ngSwitchController() {\n this.cases = {};\n }],\n link: function(scope, element, attr, ngSwitchController) {\n var watchExpr = attr.ngSwitch || attr.on,\n selectedTranscludes = [],\n selectedElements = [],\n previousLeaveAnimations = [],\n selectedScopes = [];\n\n var spliceFactory = function(array, index) {\n return function() { array.splice(index, 1); };\n };\n\n scope.$watch(watchExpr, function ngSwitchWatchAction(value) {\n var i, ii;\n for (i = 0, ii = previousLeaveAnimations.length; i < ii; ++i) {\n $animate.cancel(previousLeaveAnimations[i]);\n }\n previousLeaveAnimations.length = 0;\n\n for (i = 0, ii = selectedScopes.length; i < ii; ++i) {\n var selected = getBlockNodes(selectedElements[i].clone);\n selectedScopes[i].$destroy();\n var promise = previousLeaveAnimations[i] = $animate.leave(selected);\n promise.then(spliceFactory(previousLeaveAnimations, i));\n }\n\n selectedElements.length = 0;\n selectedScopes.length = 0;\n\n if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {\n forEach(selectedTranscludes, function(selectedTransclude) {\n selectedTransclude.transclude(function(caseElement, selectedScope) {\n selectedScopes.push(selectedScope);\n var anchor = selectedTransclude.element;\n caseElement[caseElement.length++] = document.createComment(' end ngSwitchWhen: ');\n var block = { clone: caseElement };\n\n selectedElements.push(block);\n $animate.enter(caseElement, anchor.parent(), anchor);\n });\n });\n }\n });\n }\n };\n}];\n\nvar ngSwitchWhenDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attrs, ctrl, $transclude) {\n ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);\n ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });\n }\n});\n\nvar ngSwitchDefaultDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attr, ctrl, $transclude) {\n ctrl.cases['?'] = (ctrl.cases['?'] || []);\n ctrl.cases['?'].push({ transclude: $transclude, element: element });\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngTransclude\n * @restrict EAC\n *\n * @description\n * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n *\n * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.\n *\n * @element ANY\n *\n * @example\n \n \n \n \n \n \n {{text}}\n \n \n \n it('should have transcluded', function() {\n var titleElement = element(by.model('title'));\n titleElement.clear();\n titleElement.sendKeys('TITLE');\n var textElement = element(by.model('text'));\n textElement.clear();\n textElement.sendKeys('TEXT');\n expect(element(by.binding('title')).getText()).toEqual('TITLE');\n expect(element(by.binding('text')).getText()).toEqual('TEXT');\n });\n \n \n *\n */\nvar ngTranscludeDirective = ngDirective({\n restrict: 'EAC',\n link: function($scope, $element, $attrs, controller, $transclude) {\n if (!$transclude) {\n throw minErr('ngTransclude')('orphan',\n 'Illegal use of ngTransclude directive in the template! ' +\n 'No parent directive that requires a transclusion found. ' +\n 'Element: {0}',\n startingTag($element));\n }\n\n $transclude(function(clone) {\n $element.empty();\n $element.append(clone);\n });\n }\n});\n\n/**\n * @ngdoc directive\n * @name script\n * @restrict E\n *\n * @description\n * Load the content of a `\n\n Load inlined template\n \n \n \n it('should load template defined inside script tag', function() {\n element(by.css('#tpl-link')).click();\n expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);\n });\n \n \n */\nvar scriptDirective = ['$templateCache', function($templateCache) {\n return {\n restrict: 'E',\n terminal: true,\n compile: function(element, attr) {\n if (attr.type == 'text/ng-template') {\n var templateUrl = attr.id,\n // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent\n text = element[0].text;\n\n $templateCache.put(templateUrl, text);\n }\n }\n };\n}];\n\nvar ngOptionsMinErr = minErr('ngOptions');\n/**\n * @ngdoc directive\n * @name select\n * @restrict E\n *\n * @description\n * HTML `SELECT` element with angular data-binding.\n *\n * # `ngOptions`\n *\n * The `ngOptions` attribute can be used to dynamically generate a list of ``\n * elements for the `` element using the array or object obtained by evaluating the\n * `ngOptions` comprehension_expression.\n *\n * When an item in the `` menu is selected, the array element or object property\n * represented by the selected option will be bound to the model identified by the `ngModel`\n * directive.\n *\n * \n * **Note:** `ngModel` compares by reference, not value. This is important when binding to an\n * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/).\n * \n *\n * Optionally, a single hard-coded `` element, with the value set to an empty string, can\n * be nested into the `` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * \n * **Note:** `ngOptions` provides an iterator facility for the `` element which should be used instead\n * of {@link ng.directive:ngRepeat ngRepeat} when you want the\n * `select` model to be bound to a non-string value. This is because an option element can only\n * be bound to string values at present.\n * \n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required The control is considered valid only if value is entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {comprehension_expression=} ngOptions in one of the following forms:\n *\n * * for array data sources:\n * * `label` **`for`** `value` **`in`** `array`\n * * `select` **`as`** `label` **`for`** `value` **`in`** `array`\n * * `label` **`group by`** `group` **`for`** `value` **`in`** `array`\n * * `select` **`as`** `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n * * for object data sources:\n * * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n * * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`group by`** `group`\n * **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n *\n * Where:\n *\n * * `array` / `object`: an expression which evaluates to an array / object to iterate over.\n * * `value`: local variable which will refer to each item in the `array` or each property value\n * of `object` during iteration.\n * * `key`: local variable which will refer to a property name in `object` during iteration.\n * * `label`: The result of this expression will be the label for `` element. The\n * `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).\n * * `select`: The result of this expression will be bound to the model of the parent ``\n * element. If not specified, `select` expression will default to `value`.\n * * `group`: The result of this expression will be used to group options using the ``\n * DOM element.\n * * `trackexpr`: Used when working with an array of objects. The result of this expression will be\n * used to identify the objects in the array. The `trackexpr` will most likely refer to the\n * `value` variable (e.g. `value.propertyName`).\n *\n * @example\n \n \n \n \n \n \n Name: \n [X]\n \n \n [add]\n \n \n \n Color (null not allowed):\n \n\n Color (null allowed):\n \n \n -- choose color --\n \n \n\n Color grouped by shade:\n \n \n\n\n Select bogus.\n \n Currently selected: {{ {selected_color:myColor} }}\n \n \n \n \n \n it('should check ng-options', function() {\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');\n element.all(by.model('myColor')).first().click();\n element.all(by.css('select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');\n element(by.css('.nullable select[ng-model=\"myColor\"]')).click();\n element.all(by.css('.nullable select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');\n });\n \n \n */\n\nvar ngOptionsDirective = valueFn({\n restrict: 'A',\n terminal: true\n});\n\n// jshint maxlen: false\nvar selectDirective = ['$compile', '$parse', function($compile, $parse) {\n //000011111111110000000000022222222220000000000000000000003333333333000000000000004444444444444440000000005555555555555550000000666666666666666000000000000000777777777700000000000000000008888888888\n var NG_OPTIONS_REGEXP = /^\\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]+?))?$/,\n nullModelCtrl = {$setViewValue: noop};\n// jshint maxlen: 100\n\n return {\n restrict: 'E',\n require: ['select', '?ngModel'],\n controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {\n var self = this,\n optionsMap = {},\n ngModelCtrl = nullModelCtrl,\n nullOption,\n unknownOption;\n\n\n self.databound = $attrs.ngModel;\n\n\n self.init = function(ngModelCtrl_, nullOption_, unknownOption_) {\n ngModelCtrl = ngModelCtrl_;\n nullOption = nullOption_;\n unknownOption = unknownOption_;\n };\n\n\n self.addOption = function(value, element) {\n assertNotHasOwnProperty(value, '\"option value\"');\n optionsMap[value] = true;\n\n if (ngModelCtrl.$viewValue == value) {\n $element.val(value);\n if (unknownOption.parent()) unknownOption.remove();\n }\n // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459\n // Adding an element to a should\n // automatically select the new element\n if (element[0].hasAttribute('selected')) {\n element[0].selected = true;\n }\n };\n\n\n self.removeOption = function(value) {\n if (this.hasOption(value)) {\n delete optionsMap[value];\n if (ngModelCtrl.$viewValue == value) {\n this.renderUnknownOption(value);\n }\n }\n };\n\n\n self.renderUnknownOption = function(val) {\n var unknownVal = '? ' + hashKey(val) + ' ?';\n unknownOption.val(unknownVal);\n $element.prepend(unknownOption);\n $element.val(unknownVal);\n unknownOption.prop('selected', true); // needed for IE\n };\n\n\n self.hasOption = function(value) {\n return optionsMap.hasOwnProperty(value);\n };\n\n $scope.$on('$destroy', function() {\n // disable unknown option so that we don't do work when the whole select is being destroyed\n self.renderUnknownOption = noop;\n });\n }],\n\n link: function(scope, element, attr, ctrls) {\n // if ngModel is not defined, we don't need to do anything\n if (!ctrls[1]) return;\n\n var selectCtrl = ctrls[0],\n ngModelCtrl = ctrls[1],\n multiple = attr.multiple,\n optionsExp = attr.ngOptions,\n nullOption = false, // if false, user will not be able to select it (used by ngOptions)\n emptyOption,\n renderScheduled = false,\n // we can't just jqLite('') since jqLite is not smart enough\n // to create it in and IE barfs otherwise.\n optionTemplate = jqLite(document.createElement('option')),\n optGroupTemplate =jqLite(document.createElement('optgroup')),\n unknownOption = optionTemplate.clone();\n\n // find \"null\" option\n for(var i = 0, children = element.children(), ii = children.length; i < ii; i++) {\n if (children[i].value === '') {\n emptyOption = nullOption = children.eq(i);\n break;\n }\n }\n\n selectCtrl.init(ngModelCtrl, nullOption, unknownOption);\n\n // required validator\n if (multiple) {\n ngModelCtrl.$isEmpty = function(value) {\n return !value || value.length === 0;\n };\n }\n\n if (optionsExp) setupAsOptions(scope, element, ngModelCtrl);\n else if (multiple) setupAsMultiple(scope, element, ngModelCtrl);\n else setupAsSingle(scope, element, ngModelCtrl, selectCtrl);\n\n\n ////////////////////////////\n\n\n\n function setupAsSingle(scope, selectElement, ngModelCtrl, selectCtrl) {\n ngModelCtrl.$render = function() {\n var viewValue = ngModelCtrl.$viewValue;\n\n if (selectCtrl.hasOption(viewValue)) {\n if (unknownOption.parent()) unknownOption.remove();\n selectElement.val(viewValue);\n if (viewValue === '') emptyOption.prop('selected', true); // to make IE9 happy\n } else {\n if (isUndefined(viewValue) && emptyOption) {\n selectElement.val('');\n } else {\n selectCtrl.renderUnknownOption(viewValue);\n }\n }\n };\n\n selectElement.on('change', function() {\n scope.$apply(function() {\n if (unknownOption.parent()) unknownOption.remove();\n ngModelCtrl.$setViewValue(selectElement.val());\n });\n });\n }\n\n function setupAsMultiple(scope, selectElement, ctrl) {\n var lastView;\n ctrl.$render = function() {\n var items = new HashMap(ctrl.$viewValue);\n forEach(selectElement.find('option'), function(option) {\n option.selected = isDefined(items.get(option.value));\n });\n };\n\n // we have to do it on each watch since ngModel watches reference, but\n // we need to work of an array, so we need to see if anything was inserted/removed\n scope.$watch(function selectMultipleWatch() {\n if (!equals(lastView, ctrl.$viewValue)) {\n lastView = shallowCopy(ctrl.$viewValue);\n ctrl.$render();\n }\n });\n\n selectElement.on('change', function() {\n scope.$apply(function() {\n var array = [];\n forEach(selectElement.find('option'), function(option) {\n if (option.selected) {\n array.push(option.value);\n }\n });\n ctrl.$setViewValue(array);\n });\n });\n }\n\n function setupAsOptions(scope, selectElement, ctrl) {\n var match;\n\n if (!(match = optionsExp.match(NG_OPTIONS_REGEXP))) {\n throw ngOptionsMinErr('iexp',\n \"Expected expression in form of \" +\n \"'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'\" +\n \" but got '{0}'. Element: {1}\",\n optionsExp, startingTag(selectElement));\n }\n\n var displayFn = $parse(match[2] || match[1]),\n valueName = match[4] || match[6],\n keyName = match[5],\n groupByFn = $parse(match[3] || ''),\n valueFn = $parse(match[2] ? match[1] : valueName),\n valuesFn = $parse(match[7]),\n track = match[8],\n trackFn = track ? $parse(match[8]) : null,\n // This is an array of array of existing option groups in DOM.\n // We try to reuse these if possible\n // - optionGroupsCache[0] is the options with no option group\n // - optionGroupsCache[?][0] is the parent: either the SELECT or OPTGROUP element\n optionGroupsCache = [[{element: selectElement, label:''}]];\n\n if (nullOption) {\n // compile the element since there might be bindings in it\n $compile(nullOption)(scope);\n\n // remove the class, which is added automatically because we recompile the element and it\n // becomes the compilation root\n nullOption.removeClass('ng-scope');\n\n // we need to remove it before calling selectElement.empty() because otherwise IE will\n // remove the label from the element. wtf?\n nullOption.remove();\n }\n\n // clear contents, we'll add what's needed based on the model\n selectElement.empty();\n\n selectElement.on('change', function() {\n scope.$apply(function() {\n var optionGroup,\n collection = valuesFn(scope) || [],\n locals = {},\n key, value, optionElement, index, groupIndex, length, groupLength, trackIndex;\n\n if (multiple) {\n value = [];\n for (groupIndex = 0, groupLength = optionGroupsCache.length;\n groupIndex < groupLength;\n groupIndex++) {\n // list of options for that group. (first item has the parent)\n optionGroup = optionGroupsCache[groupIndex];\n\n for(index = 1, length = optionGroup.length; index < length; index++) {\n if ((optionElement = optionGroup[index].element)[0].selected) {\n key = optionElement.val();\n if (keyName) locals[keyName] = key;\n if (trackFn) {\n for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n locals[valueName] = collection[trackIndex];\n if (trackFn(scope, locals) == key) break;\n }\n } else {\n locals[valueName] = collection[key];\n }\n value.push(valueFn(scope, locals));\n }\n }\n }\n } else {\n key = selectElement.val();\n if (key == '?') {\n value = undefined;\n } else if (key === ''){\n value = null;\n } else {\n if (trackFn) {\n for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n locals[valueName] = collection[trackIndex];\n if (trackFn(scope, locals) == key) {\n value = valueFn(scope, locals);\n break;\n }\n }\n } else {\n locals[valueName] = collection[key];\n if (keyName) locals[keyName] = key;\n value = valueFn(scope, locals);\n }\n }\n }\n ctrl.$setViewValue(value);\n render();\n });\n });\n\n ctrl.$render = render;\n\n scope.$watchCollection(valuesFn, scheduleRendering);\n scope.$watchCollection(function () {\n var locals = {},\n values = valuesFn(scope);\n if (values) {\n var toDisplay = new Array(values.length);\n for (var i = 0, ii = values.length; i < ii; i++) {\n locals[valueName] = values[i];\n toDisplay[i] = displayFn(scope, locals);\n }\n return toDisplay;\n }\n }, scheduleRendering);\n\n if (multiple) {\n scope.$watchCollection(function() { return ctrl.$modelValue; }, scheduleRendering);\n }\n\n\n function getSelectedSet() {\n var selectedSet = false;\n if (multiple) {\n var modelValue = ctrl.$modelValue;\n if (trackFn && isArray(modelValue)) {\n selectedSet = new HashMap([]);\n var locals = {};\n for (var trackIndex = 0; trackIndex < modelValue.length; trackIndex++) {\n locals[valueName] = modelValue[trackIndex];\n selectedSet.put(trackFn(scope, locals), modelValue[trackIndex]);\n }\n } else {\n selectedSet = new HashMap(modelValue);\n }\n }\n return selectedSet;\n }\n\n\n function scheduleRendering() {\n if (!renderScheduled) {\n scope.$$postDigest(render);\n renderScheduled = true;\n }\n }\n\n\n function render() {\n renderScheduled = false;\n\n // Temporary location for the option groups before we render them\n var optionGroups = {'':[]},\n optionGroupNames = [''],\n optionGroupName,\n optionGroup,\n option,\n existingParent, existingOptions, existingOption,\n modelValue = ctrl.$modelValue,\n values = valuesFn(scope) || [],\n keys = keyName ? sortedKeys(values) : values,\n key,\n groupLength, length,\n groupIndex, index,\n locals = {},\n selected,\n selectedSet = getSelectedSet(),\n lastElement,\n element,\n label;\n\n\n // We now build up the list of options we need (we merge later)\n for (index = 0; length = keys.length, index < length; index++) {\n\n key = index;\n if (keyName) {\n key = keys[index];\n if ( key.charAt(0) === '$' ) continue;\n locals[keyName] = key;\n }\n\n locals[valueName] = values[key];\n\n optionGroupName = groupByFn(scope, locals) || '';\n if (!(optionGroup = optionGroups[optionGroupName])) {\n optionGroup = optionGroups[optionGroupName] = [];\n optionGroupNames.push(optionGroupName);\n }\n if (multiple) {\n selected = isDefined(\n selectedSet.remove(trackFn ? trackFn(scope, locals) : valueFn(scope, locals))\n );\n } else {\n if (trackFn) {\n var modelCast = {};\n modelCast[valueName] = modelValue;\n selected = trackFn(scope, modelCast) === trackFn(scope, locals);\n } else {\n selected = modelValue === valueFn(scope, locals);\n }\n selectedSet = selectedSet || selected; // see if at least one item is selected\n }\n label = displayFn(scope, locals); // what will be seen by the user\n\n // doing displayFn(scope, locals) || '' overwrites zero values\n label = isDefined(label) ? label : '';\n optionGroup.push({\n // either the index into array or key from object\n id: trackFn ? trackFn(scope, locals) : (keyName ? keys[index] : index),\n label: label,\n selected: selected // determine if we should be selected\n });\n }\n if (!multiple) {\n if (nullOption || modelValue === null) {\n // insert null option if we have a placeholder, or the model is null\n optionGroups[''].unshift({id:'', label:'', selected:!selectedSet});\n } else if (!selectedSet) {\n // option could not be found, we have to insert the undefined item\n optionGroups[''].unshift({id:'?', label:'', selected:true});\n }\n }\n\n // Now we need to update the list of DOM nodes to match the optionGroups we computed above\n for (groupIndex = 0, groupLength = optionGroupNames.length;\n groupIndex < groupLength;\n groupIndex++) {\n // current option group name or '' if no group\n optionGroupName = optionGroupNames[groupIndex];\n\n // list of options for that group. (first item has the parent)\n optionGroup = optionGroups[optionGroupName];\n\n if (optionGroupsCache.length <= groupIndex) {\n // we need to grow the optionGroups\n existingParent = {\n element: optGroupTemplate.clone().attr('label', optionGroupName),\n label: optionGroup.label\n };\n existingOptions = [existingParent];\n optionGroupsCache.push(existingOptions);\n selectElement.append(existingParent.element);\n } else {\n existingOptions = optionGroupsCache[groupIndex];\n existingParent = existingOptions[0]; // either SELECT (no group) or OPTGROUP element\n\n // update the OPTGROUP label if not the same.\n if (existingParent.label != optionGroupName) {\n existingParent.element.attr('label', existingParent.label = optionGroupName);\n }\n }\n\n lastElement = null; // start at the beginning\n for(index = 0, length = optionGroup.length; index < length; index++) {\n option = optionGroup[index];\n if ((existingOption = existingOptions[index+1])) {\n // reuse elements\n lastElement = existingOption.element;\n if (existingOption.label !== option.label) {\n lastElement.text(existingOption.label = option.label);\n }\n if (existingOption.id !== option.id) {\n lastElement.val(existingOption.id = option.id);\n }\n // lastElement.prop('selected') provided by jQuery has side-effects\n if (lastElement[0].selected !== option.selected) {\n lastElement.prop('selected', (existingOption.selected = option.selected));\n if (msie) {\n // See #7692\n // The selected item wouldn't visually update on IE without this.\n // Tested on Win7: IE9, IE10 and IE11. Future IEs should be tested as well\n lastElement.prop('selected', existingOption.selected);\n }\n }\n } else {\n // grow elements\n\n // if it's a null option\n if (option.id === '' && nullOption) {\n // put back the pre-compiled element\n element = nullOption;\n } else {\n // jQuery(v1.4.2) Bug: We should be able to chain the method calls, but\n // in this version of jQuery on some browser the .text() returns a string\n // rather then the element.\n (element = optionTemplate.clone())\n .val(option.id)\n .prop('selected', option.selected)\n .attr('selected', option.selected)\n .text(option.label);\n }\n\n existingOptions.push(existingOption = {\n element: element,\n label: option.label,\n id: option.id,\n selected: option.selected\n });\n if (lastElement) {\n lastElement.after(element);\n } else {\n existingParent.element.append(element);\n }\n lastElement = element;\n }\n }\n // remove any excessive OPTIONs in a group\n index++; // increment since the existingOptions[0] is parent element not OPTION\n while(existingOptions.length > index) {\n existingOptions.pop().element.remove();\n }\n }\n // remove any excessive OPTGROUPs from select\n while(optionGroupsCache.length > groupIndex) {\n optionGroupsCache.pop()[0].element.remove();\n }\n }\n }\n }\n };\n}];\n\nvar optionDirective = ['$interpolate', function($interpolate) {\n var nullSelectCtrl = {\n addOption: noop,\n removeOption: noop\n };\n\n return {\n restrict: 'E',\n priority: 100,\n compile: function(element, attr) {\n if (isUndefined(attr.value)) {\n var interpolateFn = $interpolate(element.text(), true);\n if (!interpolateFn) {\n attr.$set('value', element.text());\n }\n }\n\n return function (scope, element, attr) {\n var selectCtrlName = '$selectController',\n parent = element.parent(),\n selectCtrl = parent.data(selectCtrlName) ||\n parent.parent().data(selectCtrlName); // in case we are in optgroup\n\n if (selectCtrl && selectCtrl.databound) {\n // For some reason Opera defaults to true and if not overridden this messes up the repeater.\n // We don't want the view to drive the initialization of the model anyway.\n element.prop('selected', false);\n } else {\n selectCtrl = nullSelectCtrl;\n }\n\n if (interpolateFn) {\n scope.$watch(interpolateFn, function interpolateWatchAction(newVal, oldVal) {\n attr.$set('value', newVal);\n if (oldVal !== newVal) {\n selectCtrl.removeOption(oldVal);\n }\n selectCtrl.addOption(newVal, element);\n });\n } else {\n selectCtrl.addOption(attr.value, element);\n }\n\n element.on('$destroy', function() {\n selectCtrl.removeOption(attr.value);\n });\n };\n }\n };\n}];\n\nvar styleDirective = valueFn({\n restrict: 'E',\n terminal: false\n});\n\n if (window.angular.bootstrap) {\n //AngularJS is already loaded, so we can return here...\n console.log('WARNING: Tried to load angular more than once.');\n return;\n }\n\n //try to bind to jquery now so that one can write jqLite(document).ready()\n //but we will rebind on bootstrap again.\n bindJQuery();\n\n publishExternalAPI(angular);\n\n jqLite(document).ready(function() {\n angularInit(document, bootstrap);\n });\n\n})(window, document);\n\n!window.angular.$$csp() && window.angular.element(document).find('head').prepend('');","/**\n * @license AngularJS v1.3.0-rc.3\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/* jshint maxlen: false */\n\n/**\n * @ngdoc module\n * @name ngAnimate\n * @description\n *\n * The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives.\n *\n * \n *\n * # Usage\n *\n * To see animations in action, all that is required is to define the appropriate CSS classes\n * or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are:\n * `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation\n * by using the `$animate` service.\n *\n * Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives:\n *\n * | Directive | Supported Animations |\n * |-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|\n * | {@link ng.directive:ngRepeat#usage_animations ngRepeat} | enter, leave and move |\n * | {@link ngRoute.directive:ngView#usage_animations ngView} | enter and leave |\n * | {@link ng.directive:ngInclude#usage_animations ngInclude} | enter and leave |\n * | {@link ng.directive:ngSwitch#usage_animations ngSwitch} | enter and leave |\n * | {@link ng.directive:ngIf#usage_animations ngIf} | enter and leave |\n * | {@link ng.directive:ngClass#usage_animations ngClass} | add and remove (the CSS class(es) present) |\n * | {@link ng.directive:ngShow#usage_animations ngShow} & {@link ng.directive:ngHide#usage_animations ngHide} | add and remove (the ng-hide class value) |\n * | {@link ng.directive:form#usage_animations form} & {@link ng.directive:ngModel#usage_animations ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) |\n * | {@link ngMessages.directive:ngMessage#usage_animations ngMessages} | add and remove (ng-active & ng-inactive) |\n * | {@link ngMessages.directive:ngMessage#usage_animations ngMessage} | enter and leave |\n *\n * You can find out more information about animations upon visiting each directive page.\n *\n * Below is an example of how to apply animations to a directive that supports animation hooks:\n *\n * ```html\n * \n *\n * \n * \n * ```\n *\n * Keep in mind that, by default, if an animation is running, any child elements cannot be animated\n * until the parent element's animation has completed. This blocking feature can be overridden by\n * placing the `ng-animate-children` attribute on a parent container tag.\n *\n * ```html\n * \n * \n * \n * ...\n * \n * \n * \n * ```\n *\n * When the `on` expression value changes and an animation is triggered then each of the elements within\n * will all animate without the block being applied to child elements.\n *\n * ## Are animations run when the application starts?\n * No they are not. When an application is bootstrapped Angular will disable animations from running to avoid\n * a frenzy of animations from being triggered as soon as the browser has rendered the screen. For this to work,\n * Angular will wait for two digest cycles until enabling animations. From there on, any animation-triggering\n * layout changes in the application will trigger animations as normal.\n *\n * In addition, upon bootstrap, if the routing system or any directives or load remote data (via $http) then Angular\n * will automatically extend the wait time to enable animations once **all** of the outbound HTTP requests\n * are complete.\n *\n * CSS-defined Animations\n * The animate service will automatically apply two CSS classes to the animated element and these two CSS classes\n * are designed to contain the start and end CSS styling. Both CSS transitions and keyframe animations are supported\n * and can be used to play along with this naming structure.\n *\n * The following code below demonstrates how to perform animations using **CSS transitions** with Angular:\n *\n * ```html\n * \n *\n * \n * \n * \n * ```\n *\n * The following code below demonstrates how to perform animations using **CSS animations** with Angular:\n *\n * ```html\n * \n *\n * \n * \n * \n * ```\n *\n * Both CSS3 animations and transitions can be used together and the animate service will figure out the correct duration and delay timing.\n *\n * Upon DOM mutation, the event class is added first (something like `ng-enter`), then the browser prepares itself to add\n * the active class (in this case `ng-enter-active`) which then triggers the animation. The animation module will automatically\n * detect the CSS code to determine when the animation ends. Once the animation is over then both CSS classes will be\n * removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end\n * immediately resulting in a DOM element that is at its final state. This final state is when the DOM element\n * has no CSS transition/animation classes applied to it.\n *\n * ### Structural transition animations\n *\n * Structural transitions (such as enter, leave and move) will always apply a `0s none` transition\n * value to force the browser into rendering the styles defined in the setup (.ng-enter, .ng-leave\n * or .ng-move) class. This means that any active transition animations operating on the element\n * will be cut off to make way for the enter, leave or move animation.\n *\n * ### Class-based transition animations\n *\n * Class-based transitions refer to transition animations that are triggered when a CSS class is\n * added to or removed from the element (via `$animate.addClass`, `$animate.removeClass`,\n * `$animate.setClass`, or by directives such as `ngClass`, `ngModel` and `form`).\n * They are different when compared to structural animations since they **do not cancel existing\n * animations** nor do they **block successive transitions** from rendering on the same element.\n * This distinction allows for **multiple class-based transitions** to be performed on the same element.\n *\n * In addition to ngAnimate supporting the default (natural) functionality of class-based transition\n * animations, ngAnimate also decorates the element with starting and ending CSS classes to aid the\n * developer in further styling the element throughout the transition animation. Earlier versions\n * of ngAnimate may have caused natural CSS transitions to break and not render properly due to\n * $animate temporarily blocking transitions using `0s none` in order to allow the setup CSS class\n * (the `-add` or `-remove` class) to be applied without triggering an animation. However, as of\n * **version 1.3**, this workaround has been removed with ngAnimate and all non-ngAnimate CSS\n * class transitions are compatible with ngAnimate.\n *\n * There is, however, one special case when dealing with class-based transitions in ngAnimate.\n * When rendering class-based transitions that make use of the setup and active CSS classes\n * (e.g. `.fade-add` and `.fade-add-active` for when `.fade` is added) be sure to define\n * the transition value **on the active CSS class** and not the setup class.\n *\n * ```css\n * .fade-add {\n * /* remember to place a 0s transition here\n * to ensure that the styles are applied instantly\n * even if the element already has a transition style */\n * transition:0s linear all;\n *\n * /* starting CSS styles */\n * opacity:1;\n * }\n * .fade-add.fade-add-active {\n * /* this will be the length of the animation */\n * transition:1s linear all;\n * opacity:0;\n * }\n * ```\n *\n * The setup CSS class (in this case `.fade-add`) also has a transition style property, however, it\n * has a duration of zero. This may not be required, however, incase the browser is unable to render\n * the styling present in this CSS class instantly then it could be that the browser is attempting\n * to perform an unnecessary transition.\n *\n * This workaround, however, does not apply to standard class-based transitions that are rendered\n * when a CSS class containing a transition is applied to an element:\n *\n * ```css\n * .fade {\n * /* this works as expected */\n * transition:1s linear all;\n * opacity:0;\n * }\n * ```\n *\n * Please keep this in mind when coding the CSS markup that will be used within class-based transitions.\n * Also, try not to mix the two class-based animation flavors together since the CSS code may become\n * overly complex.\n *\n * ### CSS Staggering Animations\n * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a\n * curtain-like effect. The ngAnimate module, as of 1.2.0, supports staggering animations and the stagger effect can be\n * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for\n * the animation. The style property expected within the stagger class can either be a **transition-delay** or an\n * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).\n *\n * ```css\n * .my-animation.ng-enter {\n * /* standard transition code */\n * -webkit-transition: 1s linear all;\n * transition: 1s linear all;\n * opacity:0;\n * }\n * .my-animation.ng-enter-stagger {\n * /* this will have a 100ms delay between each successive leave animation */\n * -webkit-transition-delay: 0.1s;\n * transition-delay: 0.1s;\n *\n * /* in case the stagger doesn't work then these two values\n * must be set to 0 to avoid an accidental CSS inheritance */\n * -webkit-transition-duration: 0s;\n * transition-duration: 0s;\n * }\n * .my-animation.ng-enter.ng-enter-active {\n * /* standard transition styles */\n * opacity:1;\n * }\n * ```\n *\n * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations\n * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this\n * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation\n * will also be reset if more than 10ms has passed after the last animation has been fired.\n *\n * The following code will issue the **ng-leave-stagger** event on the element provided:\n *\n * ```js\n * var kids = parent.children();\n *\n * $animate.leave(kids[0]); //stagger index=0\n * $animate.leave(kids[1]); //stagger index=1\n * $animate.leave(kids[2]); //stagger index=2\n * $animate.leave(kids[3]); //stagger index=3\n * $animate.leave(kids[4]); //stagger index=4\n *\n * $timeout(function() {\n * //stagger has reset itself\n * $animate.leave(kids[5]); //stagger index=0\n * $animate.leave(kids[6]); //stagger index=1\n * }, 100, false);\n * ```\n *\n * Stagger animations are currently only supported within CSS-defined animations.\n *\n * ## JavaScript-defined Animations\n * In the event that you do not want to use CSS3 transitions or CSS3 animations or if you wish to offer animations on browsers that do not\n * yet support CSS transitions/animations, then you can make use of JavaScript animations defined inside of your AngularJS module.\n *\n * ```js\n * //!annotate=\"YourApp\" Your AngularJS Module|Replace this or ngModule with the module that you used to define your application.\n * var ngModule = angular.module('YourApp', ['ngAnimate']);\n * ngModule.animation('.my-crazy-animation', function() {\n * return {\n * enter: function(element, done) {\n * //run the animation here and call done when the animation is complete\n * return function(cancelled) {\n * //this (optional) function will be called when the animation\n * //completes or when the animation is cancelled (the cancelled\n * //flag will be set to true if cancelled).\n * };\n * },\n * leave: function(element, done) { },\n * move: function(element, done) { },\n *\n * //animation that can be triggered before the class is added\n * beforeAddClass: function(element, className, done) { },\n *\n * //animation that can be triggered after the class is added\n * addClass: function(element, className, done) { },\n *\n * //animation that can be triggered before the class is removed\n * beforeRemoveClass: function(element, className, done) { },\n *\n * //animation that can be triggered after the class is removed\n * removeClass: function(element, className, done) { }\n * };\n * });\n * ```\n *\n * JavaScript-defined animations are created with a CSS-like class selector and a collection of events which are set to run\n * a javascript callback function. When an animation is triggered, $animate will look for a matching animation which fits\n * the element's CSS class attribute value and then run the matching animation event function (if found).\n * In other words, if the CSS classes present on the animated element match any of the JavaScript animations then the callback function will\n * be executed. It should be also noted that only simple, single class selectors are allowed (compound class selectors are not supported).\n *\n * Within a JavaScript animation, an object containing various event callback animation functions is expected to be returned.\n * As explained above, these callbacks are triggered based on the animation event. Therefore if an enter animation is run,\n * and the JavaScript animation is found, then the enter callback will handle that animation (in addition to the CSS keyframe animation\n * or transition code that is defined via a stylesheet).\n *\n */\n\nangular.module('ngAnimate', ['ng'])\n\n /**\n * @ngdoc provider\n * @name $animateProvider\n * @description\n *\n * The `$animateProvider` allows developers to register JavaScript animation event handlers directly inside of a module.\n * When an animation is triggered, the $animate service will query the $animate service to find any animations that match\n * the provided name value.\n *\n * Requires the {@link ngAnimate `ngAnimate`} module to be installed.\n *\n * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.\n *\n */\n .directive('ngAnimateChildren', function() {\n var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren';\n return function(scope, element, attrs) {\n var val = attrs.ngAnimateChildren;\n if (angular.isString(val) && val.length === 0) { //empty attribute\n element.data(NG_ANIMATE_CHILDREN, true);\n } else {\n scope.$watch(val, function(value) {\n element.data(NG_ANIMATE_CHILDREN, !!value);\n });\n }\n };\n })\n\n //this private service is only used within CSS-enabled animations\n //IE8 + IE9 do not support rAF natively, but that is fine since they\n //also don't support transitions and keyframes which means that the code\n //below will never be used by the two browsers.\n .factory('$$animateReflow', ['$$rAF', '$document', function($$rAF, $document) {\n var bod = $document[0].body;\n return function(fn) {\n //the returned function acts as the cancellation function\n return $$rAF(function() {\n //the line below will force the browser to perform a repaint\n //so that all the animated elements within the animation frame\n //will be properly updated and drawn on screen. This is\n //required to perform multi-class CSS based animations with\n //Firefox. DO NOT REMOVE THIS LINE.\n var a = bod.offsetWidth + 1;\n fn();\n });\n };\n }])\n\n .config(['$provide', '$animateProvider', function($provide, $animateProvider) {\n var noop = angular.noop;\n var forEach = angular.forEach;\n var selectors = $animateProvider.$$selectors;\n var isArray = angular.isArray;\n\n var ELEMENT_NODE = 1;\n var NG_ANIMATE_STATE = '$$ngAnimateState';\n var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren';\n var NG_ANIMATE_CLASS_NAME = 'ng-animate';\n var rootAnimateState = {running: true};\n\n function extractElementNode(element) {\n for(var i = 0; i < element.length; i++) {\n var elm = element[i];\n if (elm.nodeType == ELEMENT_NODE) {\n return elm;\n }\n }\n }\n\n function prepareElement(element) {\n return element && angular.element(element);\n }\n\n function stripCommentsFromElement(element) {\n return angular.element(extractElementNode(element));\n }\n\n function isMatchingElement(elm1, elm2) {\n return extractElementNode(elm1) == extractElementNode(elm2);\n }\n\n $provide.decorator('$animate',\n ['$delegate', '$$q', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', '$templateRequest',\n function($delegate, $$q, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document, $templateRequest) {\n\n $rootElement.data(NG_ANIMATE_STATE, rootAnimateState);\n\n // Wait until all directive and route-related templates are downloaded and\n // compiled. The $templateRequest.totalPendingRequests variable keeps track of\n // all of the remote templates being currently downloaded. If there are no\n // templates currently downloading then the watcher will still fire anyway.\n var deregisterWatch = $rootScope.$watch(\n function() { return $templateRequest.totalPendingRequests; },\n function(val, oldVal) {\n if (val !== 0) return;\n deregisterWatch();\n\n // Now that all templates have been downloaded, $animate will wait until\n // the post digest queue is empty before enabling animations. By having two\n // calls to $postDigest calls we can ensure that the flag is enabled at the\n // very end of the post digest queue. Since all of the animations in $animate\n // use $postDigest, it's important that the code below executes at the end.\n // This basically means that the page is fully downloaded and compiled before\n // any animations are triggered.\n $rootScope.$$postDigest(function() {\n $rootScope.$$postDigest(function() {\n rootAnimateState.running = false;\n });\n });\n }\n );\n\n var globalAnimationCounter = 0;\n var classNameFilter = $animateProvider.classNameFilter();\n var isAnimatableClassName = !classNameFilter\n ? function() { return true; }\n : function(className) {\n return classNameFilter.test(className);\n };\n\n function classBasedAnimationsBlocked(element, setter) {\n var data = element.data(NG_ANIMATE_STATE) || {};\n if (setter) {\n data.running = true;\n data.structural = true;\n element.data(NG_ANIMATE_STATE, data);\n }\n return data.disabled || (data.running && data.structural);\n }\n\n function runAnimationPostDigest(fn) {\n var cancelFn, defer = $$q.defer();\n defer.promise.$$cancelFn = function() {\n cancelFn && cancelFn();\n };\n $rootScope.$$postDigest(function() {\n cancelFn = fn(function() {\n defer.resolve();\n });\n });\n return defer.promise;\n }\n\n function resolveElementClasses(element, cache, runningAnimations) {\n runningAnimations = runningAnimations || {};\n var map = {};\n\n forEach(cache.add, function(className) {\n if (className && className.length) {\n map[className] = map[className] || 0;\n map[className]++;\n }\n });\n\n forEach(cache.remove, function(className) {\n if (className && className.length) {\n map[className] = map[className] || 0;\n map[className]--;\n }\n });\n\n var lookup = [];\n forEach(runningAnimations, function(data, selector) {\n forEach(selector.split(' '), function(s) {\n lookup[s]=data;\n });\n });\n\n var toAdd = [], toRemove = [];\n forEach(map, function(status, className) {\n var hasClass = angular.$$hasClass(element[0], className);\n var matchingAnimation = lookup[className] || {};\n\n // When addClass and removeClass is called then $animate will check to\n // see if addClass and removeClass cancel each other out. When there are\n // more calls to removeClass than addClass then the count falls below 0\n // and then the removeClass animation will be allowed. Otherwise if the\n // count is above 0 then that means an addClass animation will commence.\n // Once an animation is allowed then the code will also check to see if\n // there exists any on-going animation that is already adding or remvoing\n // the matching CSS class.\n if (status < 0) {\n //does it have the class or will it have the class\n if (hasClass || matchingAnimation.event == 'addClass') {\n toRemove.push(className);\n }\n } else if (status > 0) {\n //is the class missing or will it be removed?\n if (!hasClass || matchingAnimation.event == 'removeClass') {\n toAdd.push(className);\n }\n }\n });\n\n return (toAdd.length + toRemove.length) > 0 && [toAdd.join(' '), toRemove.join(' ')];\n }\n\n function lookup(name) {\n if (name) {\n var matches = [],\n flagMap = {},\n classes = name.substr(1).split('.');\n\n //the empty string value is the default animation\n //operation which performs CSS transition and keyframe\n //animations sniffing. This is always included for each\n //element animation procedure if the browser supports\n //transitions and/or keyframe animations. The default\n //animation is added to the top of the list to prevent\n //any previous animations from affecting the element styling\n //prior to the element being animated.\n if ($sniffer.transitions || $sniffer.animations) {\n matches.push($injector.get(selectors['']));\n }\n\n for(var i=0; i < classes.length; i++) {\n var klass = classes[i],\n selectorFactoryName = selectors[klass];\n if (selectorFactoryName && !flagMap[klass]) {\n matches.push($injector.get(selectorFactoryName));\n flagMap[klass] = true;\n }\n }\n return matches;\n }\n }\n\n function animationRunner(element, animationEvent, className) {\n //transcluded directives may sometimes fire an animation using only comment nodes\n //best to catch this early on to prevent any animation operations from occurring\n var node = element[0];\n if (!node) {\n return;\n }\n\n var classNameAdd;\n var classNameRemove;\n if (isArray(className)) {\n classNameAdd = className[0];\n classNameRemove = className[1];\n if (!classNameAdd) {\n className = classNameRemove;\n animationEvent = 'removeClass';\n } else if (!classNameRemove) {\n className = classNameAdd;\n animationEvent = 'addClass';\n } else {\n className = classNameAdd + ' ' + classNameRemove;\n }\n }\n\n var isSetClassOperation = animationEvent == 'setClass';\n var isClassBased = isSetClassOperation ||\n animationEvent == 'addClass' ||\n animationEvent == 'removeClass';\n\n var currentClassName = element.attr('class');\n var classes = currentClassName + ' ' + className;\n if (!isAnimatableClassName(classes)) {\n return;\n }\n\n var beforeComplete = noop,\n beforeCancel = [],\n before = [],\n afterComplete = noop,\n afterCancel = [],\n after = [];\n\n var animationLookup = (' ' + classes).replace(/\\s+/g,'.');\n forEach(lookup(animationLookup), function(animationFactory) {\n var created = registerAnimation(animationFactory, animationEvent);\n if (!created && isSetClassOperation) {\n registerAnimation(animationFactory, 'addClass');\n registerAnimation(animationFactory, 'removeClass');\n }\n });\n\n function registerAnimation(animationFactory, event) {\n var afterFn = animationFactory[event];\n var beforeFn = animationFactory['before' + event.charAt(0).toUpperCase() + event.substr(1)];\n if (afterFn || beforeFn) {\n if (event == 'leave') {\n beforeFn = afterFn;\n //when set as null then animation knows to skip this phase\n afterFn = null;\n }\n after.push({\n event : event, fn : afterFn\n });\n before.push({\n event : event, fn : beforeFn\n });\n return true;\n }\n }\n\n function run(fns, cancellations, allCompleteFn) {\n var animations = [];\n forEach(fns, function(animation) {\n animation.fn && animations.push(animation);\n });\n\n var count = 0;\n function afterAnimationComplete(index) {\n if (cancellations) {\n (cancellations[index] || noop)();\n if (++count < animations.length) return;\n cancellations = null;\n }\n allCompleteFn();\n }\n\n //The code below adds directly to the array in order to work with\n //both sync and async animations. Sync animations are when the done()\n //operation is called right away. DO NOT REFACTOR!\n forEach(animations, function(animation, index) {\n var progress = function() {\n afterAnimationComplete(index);\n };\n switch(animation.event) {\n case 'setClass':\n cancellations.push(animation.fn(element, classNameAdd, classNameRemove, progress));\n break;\n case 'addClass':\n cancellations.push(animation.fn(element, classNameAdd || className, progress));\n break;\n case 'removeClass':\n cancellations.push(animation.fn(element, classNameRemove || className, progress));\n break;\n default:\n cancellations.push(animation.fn(element, progress));\n break;\n }\n });\n\n if (cancellations && cancellations.length === 0) {\n allCompleteFn();\n }\n }\n\n return {\n node : node,\n event : animationEvent,\n className : className,\n isClassBased : isClassBased,\n isSetClassOperation : isSetClassOperation,\n before : function(allCompleteFn) {\n beforeComplete = allCompleteFn;\n run(before, beforeCancel, function() {\n beforeComplete = noop;\n allCompleteFn();\n });\n },\n after : function(allCompleteFn) {\n afterComplete = allCompleteFn;\n run(after, afterCancel, function() {\n afterComplete = noop;\n allCompleteFn();\n });\n },\n cancel : function() {\n if (beforeCancel) {\n forEach(beforeCancel, function(cancelFn) {\n (cancelFn || noop)(true);\n });\n beforeComplete(true);\n }\n if (afterCancel) {\n forEach(afterCancel, function(cancelFn) {\n (cancelFn || noop)(true);\n });\n afterComplete(true);\n }\n }\n };\n }\n\n /**\n * @ngdoc service\n * @name $animate\n * @kind object\n *\n * @description\n * The `$animate` service provides animation detection support while performing DOM operations (enter, leave and move) as well as during addClass and removeClass operations.\n * When any of these operations are run, the $animate service\n * will examine any JavaScript-defined animations (which are defined by using the $animateProvider provider object)\n * as well as any CSS-defined animations against the CSS classes present on the element once the DOM operation is run.\n *\n * The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives\n * will work out of the box without any extra configuration.\n *\n * Requires the {@link ngAnimate `ngAnimate`} module to be installed.\n *\n * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.\n * ## Callback Promises\n * With AngularJS 1.3, each of the animation methods, on the `$animate` service, return a promise when called. The\n * promise itself is then resolved once the animation has completed itself, has been cancelled or has been\n * skipped due to animations being disabled. (Note that even if the animation is cancelled it will still\n * call the resolve function of the animation.)\n *\n * ```js\n * $animate.enter(element, container).then(function() {\n * //...this is called once the animation is complete...\n * });\n * ```\n *\n * Also note that, due to the nature of the callback promise, if any Angular-specific code (like changing the scope,\n * location of the page, etc...) is executed within the callback promise then be sure to wrap the code using\n * `$scope.$apply(...)`;\n *\n * ```js\n * $animate.leave(element).then(function() {\n * $scope.$apply(function() {\n * $location.path('/new-page');\n * });\n * });\n * ```\n *\n * An animation can also be cancelled by calling the `$animate.cancel(promise)` method with the provided\n * promise that was returned when the animation was started.\n *\n * ```js\n * var promise = $animate.addClass(element, 'super-long-animation').then(function() {\n * //this will still be called even if cancelled\n * });\n *\n * element.on('click', function() {\n * //tooo lazy to wait for the animation to end\n * $animate.cancel(promise);\n * });\n * ```\n *\n * (Keep in mind that the promise cancellation is unique to `$animate` since promises in\n * general cannot be cancelled.)\n *\n */\n return {\n /**\n * @ngdoc method\n * @name $animate#enter\n * @kind function\n *\n * @description\n * Appends the element to the parentElement element that resides in the document and then runs the enter animation. Once\n * the animation is started, the following CSS classes will be present on the element for the duration of the animation:\n *\n * Below is a breakdown of each step that occurs during enter animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|\n * | 1. $animate.enter(...) is called | class=\"my-animation\" |\n * | 2. element is inserted into the parentElement element or beside the afterElement element | class=\"my-animation\" |\n * | 3. $animate waits for the next digest to start the animation | class=\"my-animation ng-animate\" |\n * | 4. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 5. the .ng-enter class is added to the element | class=\"my-animation ng-animate ng-enter\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate ng-enter\" |\n * | 7. $animate blocks all CSS transitions on the element to ensure the .ng-enter class styling is applied right away | class=\"my-animation ng-animate ng-enter\" |\n * | 8. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate ng-enter\" |\n * | 9. $animate removes the CSS transition block placed on the element | class=\"my-animation ng-animate ng-enter\" |\n * | 10. the .ng-enter-active class is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-enter ng-enter-active\" |\n * | 11. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate ng-enter ng-enter-active\" |\n * | 12. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 13. The returned promise is resolved. | class=\"my-animation\" |\n *\n * @param {DOMElement} element the element that will be the focus of the enter animation\n * @param {DOMElement} parentElement the parent element of the element that will be the focus of the enter animation\n * @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation\n * @return {Promise} the animation callback promise\n */\n enter : function(element, parentElement, afterElement) {\n element = angular.element(element);\n parentElement = prepareElement(parentElement);\n afterElement = prepareElement(afterElement);\n\n classBasedAnimationsBlocked(element, true);\n $delegate.enter(element, parentElement, afterElement);\n return runAnimationPostDigest(function(done) {\n return performAnimation('enter', 'ng-enter', stripCommentsFromElement(element), parentElement, afterElement, noop, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#leave\n * @kind function\n *\n * @description\n * Runs the leave animation operation and, upon completion, removes the element from the DOM. Once\n * the animation is started, the following CSS classes will be added for the duration of the animation:\n *\n * Below is a breakdown of each step that occurs during leave animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|\n * | 1. $animate.leave(...) is called | class=\"my-animation\" |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 3. $animate waits for the next digest to start the animation | class=\"my-animation ng-animate\" |\n * | 4. the .ng-leave class is added to the element | class=\"my-animation ng-animate ng-leave\" |\n * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate ng-leave\" |\n * | 6. $animate blocks all CSS transitions on the element to ensure the .ng-leave class styling is applied right away | class=\"my-animation ng-animate ng-leave” |\n * | 7. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate ng-leave\" |\n * | 8. $animate removes the CSS transition block placed on the element | class=\"my-animation ng-animate ng-leave” |\n * | 9. the .ng-leave-active class is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-leave ng-leave-active\" |\n * | 10. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate ng-leave ng-leave-active\" |\n * | 11. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 12. The element is removed from the DOM | ... |\n * | 13. The returned promise is resolved. | ... |\n *\n * @param {DOMElement} element the element that will be the focus of the leave animation\n * @return {Promise} the animation callback promise\n */\n leave : function(element) {\n element = angular.element(element);\n\n cancelChildAnimations(element);\n classBasedAnimationsBlocked(element, true);\n this.enabled(false, element);\n return runAnimationPostDigest(function(done) {\n return performAnimation('leave', 'ng-leave', stripCommentsFromElement(element), null, null, function() {\n $delegate.leave(element);\n }, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#move\n * @kind function\n *\n * @description\n * Fires the move DOM operation. Just before the animation starts, the animate service will either append it into the parentElement container or\n * add the element directly after the afterElement element if present. Then the move animation will be run. Once\n * the animation is started, the following CSS classes will be added for the duration of the animation:\n *\n * Below is a breakdown of each step that occurs during move animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|\n * | 1. $animate.move(...) is called | class=\"my-animation\" |\n * | 2. element is moved into the parentElement element or beside the afterElement element | class=\"my-animation\" |\n * | 3. $animate waits for the next digest to start the animation | class=\"my-animation ng-animate\" |\n * | 4. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 5. the .ng-move class is added to the element | class=\"my-animation ng-animate ng-move\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate ng-move\" |\n * | 7. $animate blocks all CSS transitions on the element to ensure the .ng-move class styling is applied right away | class=\"my-animation ng-animate ng-move” |\n * | 8. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate ng-move\" |\n * | 9. $animate removes the CSS transition block placed on the element | class=\"my-animation ng-animate ng-move” |\n * | 10. the .ng-move-active class is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-move ng-move-active\" |\n * | 11. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate ng-move ng-move-active\" |\n * | 12. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 13. The returned promise is resolved. | class=\"my-animation\" |\n *\n * @param {DOMElement} element the element that will be the focus of the move animation\n * @param {DOMElement} parentElement the parentElement element of the element that will be the focus of the move animation\n * @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation\n * @return {Promise} the animation callback promise\n */\n move : function(element, parentElement, afterElement) {\n element = angular.element(element);\n parentElement = prepareElement(parentElement);\n afterElement = prepareElement(afterElement);\n\n cancelChildAnimations(element);\n classBasedAnimationsBlocked(element, true);\n $delegate.move(element, parentElement, afterElement);\n return runAnimationPostDigest(function(done) {\n return performAnimation('move', 'ng-move', stripCommentsFromElement(element), parentElement, afterElement, noop, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#addClass\n *\n * @description\n * Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class.\n * Unlike the other animation methods, the animate service will suffix the className value with {@type -add} in order to provide\n * the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions\n * or keyframes are defined on the -add-active or base CSS class).\n *\n * Below is a breakdown of each step that occurs during addClass animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |----------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n * | 1. $animate.addClass(element, 'super') is called | class=\"my-animation\" |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 3. the .super-add class is added to the element | class=\"my-animation ng-animate super-add\" |\n * | 4. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate super-add\" |\n * | 5. the .super and .super-add-active classes are added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate super super-add super-add-active\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate super-add\" |\n * | 7. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation super super-add super-add-active\" |\n * | 8. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation super\" |\n * | 9. The super class is kept on the element | class=\"my-animation super\" |\n * | 10. The returned promise is resolved. | class=\"my-animation super\" |\n *\n * @param {DOMElement} element the element that will be animated\n * @param {string} className the CSS class that will be added to the element and then animated\n * @return {Promise} the animation callback promise\n */\n addClass : function(element, className) {\n return this.setClass(element, className, []);\n },\n\n /**\n * @ngdoc method\n * @name $animate#removeClass\n *\n * @description\n * Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value\n * from the element. Unlike the other animation methods, the animate service will suffix the className value with {@type -remove} in\n * order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if\n * no CSS transitions or keyframes are defined on the -remove or base CSS classes).\n *\n * Below is a breakdown of each step that occurs during removeClass animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n * | 1. $animate.removeClass(element, 'super') is called | class=\"my-animation super\" |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation super ng-animate\" |\n * | 3. the .super-remove class is added to the element | class=\"my-animation super ng-animate super-remove\" |\n * | 4. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation super ng-animate super-remove\" |\n * | 5. the .super-remove-active classes are added and .super is removed (this triggers the CSS transition/animation) | class=\"my-animation ng-animate super-remove super-remove-active\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation super ng-animate super-remove\" |\n * | 7. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate super-remove super-remove-active\" |\n * | 8. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 9. The returned promise is resolved. | class=\"my-animation\" |\n *\n *\n * @param {DOMElement} element the element that will be animated\n * @param {string} className the CSS class that will be animated and then removed from the element\n * @return {Promise} the animation callback promise\n */\n removeClass : function(element, className) {\n return this.setClass(element, [], className);\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#setClass\n *\n * @description Adds and/or removes the given CSS classes to and from the element.\n * Once complete, the done() callback will be fired (if provided).\n *\n * | Animation Step | What the element class attribute looks like |\n * |--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n * | 1. $animate.removeClass(element, ‘on’, ‘off’) is called | class=\"my-animation super off” |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation super ng-animate off” |\n * | 3. the .on-add and .off-remove classes are added to the element | class=\"my-animation ng-animate on-add off-remove off” |\n * | 4. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate on-add off-remove off” |\n * | 5. the .on, .on-add-active and .off-remove-active classes are added and .off is removed (this triggers the CSS transition/animation) | class=\"my-animation ng-animate on on-add on-add-active off-remove off-remove-active” |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate on on-add on-add-active off-remove off-remove-active\" |\n * | 7. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate on on-add on-add-active off-remove off-remove-active\" |\n * | 8. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation on\" |\n * | 9. The returned promise is resolved. | class=\"my-animation on\" |\n *\n * @param {DOMElement} element the element which will have its CSS classes changed\n * removed from it\n * @param {string} add the CSS classes which will be added to the element\n * @param {string} remove the CSS class which will be removed from the element\n * CSS classes have been set on the element\n * @return {Promise} the animation callback promise\n */\n setClass : function(element, add, remove) {\n var STORAGE_KEY = '$$animateClasses';\n element = angular.element(element);\n element = stripCommentsFromElement(element);\n\n if (classBasedAnimationsBlocked(element)) {\n return $delegate.setClass(element, add, remove);\n }\n\n add = isArray(add) ? add : add.split(' ');\n remove = isArray(remove) ? remove : remove.split(' ');\n\n var cache = element.data(STORAGE_KEY);\n if (cache) {\n cache.add = cache.add.concat(add);\n cache.remove = cache.remove.concat(remove);\n\n //the digest cycle will combine all the animations into one function\n return cache.promise;\n } else {\n element.data(STORAGE_KEY, cache = {\n add : add,\n remove : remove\n });\n }\n\n return cache.promise = runAnimationPostDigest(function(done) {\n var cache = element.data(STORAGE_KEY);\n element.removeData(STORAGE_KEY);\n\n var state = element.data(NG_ANIMATE_STATE) || {};\n var classes = resolveElementClasses(element, cache, state.active);\n return !classes\n ? done()\n : performAnimation('setClass', classes, element, null, null, function() {\n $delegate.setClass(element, classes[0], classes[1]);\n }, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#cancel\n * @kind function\n *\n * @param {Promise} animationPromise The animation promise that is returned when an animation is started.\n *\n * @description\n * Cancels the provided animation.\n */\n cancel : function(promise) {\n promise.$$cancelFn();\n },\n\n /**\n * @ngdoc method\n * @name $animate#enabled\n * @kind function\n *\n * @param {boolean=} value If provided then set the animation on or off.\n * @param {DOMElement=} element If provided then the element will be used to represent the enable/disable operation\n * @return {boolean} Current animation state.\n *\n * @description\n * Globally enables/disables animations.\n *\n */\n enabled : function(value, element) {\n switch(arguments.length) {\n case 2:\n if (value) {\n cleanup(element);\n } else {\n var data = element.data(NG_ANIMATE_STATE) || {};\n data.disabled = true;\n element.data(NG_ANIMATE_STATE, data);\n }\n break;\n\n case 1:\n rootAnimateState.disabled = !value;\n break;\n\n default:\n value = !rootAnimateState.disabled;\n break;\n }\n return !!value;\n }\n };\n\n /*\n all animations call this shared animation triggering function internally.\n The animationEvent variable refers to the JavaScript animation event that will be triggered\n and the className value is the name of the animation that will be applied within the\n CSS code. Element, parentElement and afterElement are provided DOM elements for the animation\n and the onComplete callback will be fired once the animation is fully complete.\n */\n function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {\n\n var noopCancel = noop;\n var runner = animationRunner(element, animationEvent, className);\n if (!runner) {\n fireDOMOperation();\n fireBeforeCallbackAsync();\n fireAfterCallbackAsync();\n closeAnimation();\n return noopCancel;\n }\n\n animationEvent = runner.event;\n className = runner.className;\n var elementEvents = angular.element._data(runner.node);\n elementEvents = elementEvents && elementEvents.events;\n\n if (!parentElement) {\n parentElement = afterElement ? afterElement.parent() : element.parent();\n }\n\n //skip the animation if animations are disabled, a parent is already being animated,\n //the element is not currently attached to the document body or then completely close\n //the animation if any matching animations are not found at all.\n //NOTE: IE8 + IE9 should close properly (run closeAnimation()) in case an animation was found.\n if (animationsDisabled(element, parentElement)) {\n fireDOMOperation();\n fireBeforeCallbackAsync();\n fireAfterCallbackAsync();\n closeAnimation();\n return noopCancel;\n }\n\n var ngAnimateState = element.data(NG_ANIMATE_STATE) || {};\n var runningAnimations = ngAnimateState.active || {};\n var totalActiveAnimations = ngAnimateState.totalActive || 0;\n var lastAnimation = ngAnimateState.last;\n var skipAnimation = false;\n\n if (totalActiveAnimations > 0) {\n var animationsToCancel = [];\n if (!runner.isClassBased) {\n if (animationEvent == 'leave' && runningAnimations['ng-leave']) {\n skipAnimation = true;\n } else {\n //cancel all animations when a structural animation takes place\n for(var klass in runningAnimations) {\n animationsToCancel.push(runningAnimations[klass]);\n }\n ngAnimateState = {};\n cleanup(element, true);\n }\n } else if (lastAnimation.event == 'setClass') {\n animationsToCancel.push(lastAnimation);\n cleanup(element, className);\n }\n else if (runningAnimations[className]) {\n var current = runningAnimations[className];\n if (current.event == animationEvent) {\n skipAnimation = true;\n } else {\n animationsToCancel.push(current);\n cleanup(element, className);\n }\n }\n\n if (animationsToCancel.length > 0) {\n forEach(animationsToCancel, function(operation) {\n operation.cancel();\n });\n }\n }\n\n if (runner.isClassBased && !runner.isSetClassOperation && !skipAnimation) {\n skipAnimation = (animationEvent == 'addClass') == element.hasClass(className); //opposite of XOR\n }\n\n if (skipAnimation) {\n fireDOMOperation();\n fireBeforeCallbackAsync();\n fireAfterCallbackAsync();\n fireDoneCallbackAsync();\n return noopCancel;\n }\n\n runningAnimations = ngAnimateState.active || {};\n totalActiveAnimations = ngAnimateState.totalActive || 0;\n\n if (animationEvent == 'leave') {\n //there's no need to ever remove the listener since the element\n //will be removed (destroyed) after the leave animation ends or\n //is cancelled midway\n element.one('$destroy', function(e) {\n var element = angular.element(this);\n var state = element.data(NG_ANIMATE_STATE);\n if (state) {\n var activeLeaveAnimation = state.active['ng-leave'];\n if (activeLeaveAnimation) {\n activeLeaveAnimation.cancel();\n cleanup(element, 'ng-leave');\n }\n }\n });\n }\n\n //the ng-animate class does nothing, but it's here to allow for\n //parent animations to find and cancel child animations when needed\n element.addClass(NG_ANIMATE_CLASS_NAME);\n\n var localAnimationCount = globalAnimationCounter++;\n totalActiveAnimations++;\n runningAnimations[className] = runner;\n\n element.data(NG_ANIMATE_STATE, {\n last : runner,\n active : runningAnimations,\n index : localAnimationCount,\n totalActive : totalActiveAnimations\n });\n\n //first we run the before animations and when all of those are complete\n //then we perform the DOM operation and run the next set of animations\n fireBeforeCallbackAsync();\n runner.before(function(cancelled) {\n var data = element.data(NG_ANIMATE_STATE);\n cancelled = cancelled ||\n !data || !data.active[className] ||\n (runner.isClassBased && data.active[className].event != animationEvent);\n\n fireDOMOperation();\n if (cancelled === true) {\n closeAnimation();\n } else {\n fireAfterCallbackAsync();\n runner.after(closeAnimation);\n }\n });\n\n return runner.cancel;\n\n function fireDOMCallback(animationPhase) {\n var eventName = '$animate:' + animationPhase;\n if (elementEvents && elementEvents[eventName] && elementEvents[eventName].length > 0) {\n $$asyncCallback(function() {\n element.triggerHandler(eventName, {\n event : animationEvent,\n className : className\n });\n });\n }\n }\n\n function fireBeforeCallbackAsync() {\n fireDOMCallback('before');\n }\n\n function fireAfterCallbackAsync() {\n fireDOMCallback('after');\n }\n\n function fireDoneCallbackAsync() {\n fireDOMCallback('close');\n doneCallback();\n }\n\n //it is less complicated to use a flag than managing and canceling\n //timeouts containing multiple callbacks.\n function fireDOMOperation() {\n if (!fireDOMOperation.hasBeenRun) {\n fireDOMOperation.hasBeenRun = true;\n domOperation();\n }\n }\n\n function closeAnimation() {\n if (!closeAnimation.hasBeenRun) {\n closeAnimation.hasBeenRun = true;\n var data = element.data(NG_ANIMATE_STATE);\n if (data) {\n /* only structural animations wait for reflow before removing an\n animation, but class-based animations don't. An example of this\n failing would be when a parent HTML tag has a ng-class attribute\n causing ALL directives below to skip animations during the digest */\n if (runner && runner.isClassBased) {\n cleanup(element, className);\n } else {\n $$asyncCallback(function() {\n var data = element.data(NG_ANIMATE_STATE) || {};\n if (localAnimationCount == data.index) {\n cleanup(element, className, animationEvent);\n }\n });\n element.data(NG_ANIMATE_STATE, data);\n }\n }\n fireDoneCallbackAsync();\n }\n }\n }\n\n function cancelChildAnimations(element) {\n var node = extractElementNode(element);\n if (node) {\n var nodes = angular.isFunction(node.getElementsByClassName) ?\n node.getElementsByClassName(NG_ANIMATE_CLASS_NAME) :\n node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME);\n forEach(nodes, function(element) {\n element = angular.element(element);\n var data = element.data(NG_ANIMATE_STATE);\n if (data && data.active) {\n forEach(data.active, function(runner) {\n runner.cancel();\n });\n }\n });\n }\n }\n\n function cleanup(element, className) {\n if (isMatchingElement(element, $rootElement)) {\n if (!rootAnimateState.disabled) {\n rootAnimateState.running = false;\n rootAnimateState.structural = false;\n }\n } else if (className) {\n var data = element.data(NG_ANIMATE_STATE) || {};\n\n var removeAnimations = className === true;\n if (!removeAnimations && data.active && data.active[className]) {\n data.totalActive--;\n delete data.active[className];\n }\n\n if (removeAnimations || !data.totalActive) {\n element.removeClass(NG_ANIMATE_CLASS_NAME);\n element.removeData(NG_ANIMATE_STATE);\n }\n }\n }\n\n function animationsDisabled(element, parentElement) {\n if (rootAnimateState.disabled) {\n return true;\n }\n\n if (isMatchingElement(element, $rootElement)) {\n return rootAnimateState.running;\n }\n\n var allowChildAnimations, parentRunningAnimation, hasParent;\n do {\n //the element did not reach the root element which means that it\n //is not apart of the DOM. Therefore there is no reason to do\n //any animations on it\n if (parentElement.length === 0) break;\n\n var isRoot = isMatchingElement(parentElement, $rootElement);\n var state = isRoot ? rootAnimateState : (parentElement.data(NG_ANIMATE_STATE) || {});\n if (state.disabled) {\n return true;\n }\n\n //no matter what, for an animation to work it must reach the root element\n //this implies that the element is attached to the DOM when the animation is run\n if (isRoot) {\n hasParent = true;\n }\n\n //once a flag is found that is strictly false then everything before\n //it will be discarded and all child animations will be restricted\n if (allowChildAnimations !== false) {\n var animateChildrenFlag = parentElement.data(NG_ANIMATE_CHILDREN);\n if (angular.isDefined(animateChildrenFlag)) {\n allowChildAnimations = animateChildrenFlag;\n }\n }\n\n parentRunningAnimation = parentRunningAnimation ||\n state.running ||\n (state.last && !state.last.isClassBased);\n }\n while(parentElement = parentElement.parent());\n\n return !hasParent || (!allowChildAnimations && parentRunningAnimation);\n }\n }]);\n\n $animateProvider.register('', ['$window', '$sniffer', '$timeout', '$$animateReflow',\n function($window, $sniffer, $timeout, $$animateReflow) {\n // Detect proper transitionend/animationend event names.\n var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;\n\n // If unprefixed events are not supported but webkit-prefixed are, use the latter.\n // Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.\n // Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`\n // but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.\n // Register both events in case `window.onanimationend` is not supported because of that,\n // do the same for `transitionend` as Safari is likely to exhibit similar behavior.\n // Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit\n // therefore there is no reason to test anymore for other vendor prefixes: http://caniuse.com/#search=transition\n if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {\n CSS_PREFIX = '-webkit-';\n TRANSITION_PROP = 'WebkitTransition';\n TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';\n } else {\n TRANSITION_PROP = 'transition';\n TRANSITIONEND_EVENT = 'transitionend';\n }\n\n if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {\n CSS_PREFIX = '-webkit-';\n ANIMATION_PROP = 'WebkitAnimation';\n ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';\n } else {\n ANIMATION_PROP = 'animation';\n ANIMATIONEND_EVENT = 'animationend';\n }\n\n var DURATION_KEY = 'Duration';\n var PROPERTY_KEY = 'Property';\n var DELAY_KEY = 'Delay';\n var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';\n var ANIMATION_PLAYSTATE_KEY = 'PlayState';\n var NG_ANIMATE_PARENT_KEY = '$$ngAnimateKey';\n var NG_ANIMATE_CSS_DATA_KEY = '$$ngAnimateCSS3Data';\n var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\n var CLOSING_TIME_BUFFER = 1.5;\n var ONE_SECOND = 1000;\n\n var lookupCache = {};\n var parentCounter = 0;\n var animationReflowQueue = [];\n var cancelAnimationReflow;\n function afterReflow(element, callback) {\n if (cancelAnimationReflow) {\n cancelAnimationReflow();\n }\n animationReflowQueue.push(callback);\n cancelAnimationReflow = $$animateReflow(function() {\n forEach(animationReflowQueue, function(fn) {\n fn();\n });\n\n animationReflowQueue = [];\n cancelAnimationReflow = null;\n lookupCache = {};\n });\n }\n\n var closingTimer = null;\n var closingTimestamp = 0;\n var animationElementQueue = [];\n function animationCloseHandler(element, totalTime) {\n var node = extractElementNode(element);\n element = angular.element(node);\n\n //this item will be garbage collected by the closing\n //animation timeout\n animationElementQueue.push(element);\n\n //but it may not need to cancel out the existing timeout\n //if the timestamp is less than the previous one\n var futureTimestamp = Date.now() + totalTime;\n if (futureTimestamp <= closingTimestamp) {\n return;\n }\n\n $timeout.cancel(closingTimer);\n\n closingTimestamp = futureTimestamp;\n closingTimer = $timeout(function() {\n closeAllAnimations(animationElementQueue);\n animationElementQueue = [];\n }, totalTime, false);\n }\n\n function closeAllAnimations(elements) {\n forEach(elements, function(element) {\n var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n if (elementData) {\n forEach(elementData.closeAnimationFns, function(fn) {\n fn();\n });\n }\n });\n }\n\n function getElementAnimationDetails(element, cacheKey) {\n var data = cacheKey ? lookupCache[cacheKey] : null;\n if (!data) {\n var transitionDuration = 0;\n var transitionDelay = 0;\n var animationDuration = 0;\n var animationDelay = 0;\n\n //we want all the styles defined before and after\n forEach(element, function(element) {\n if (element.nodeType == ELEMENT_NODE) {\n var elementStyles = $window.getComputedStyle(element) || {};\n\n var transitionDurationStyle = elementStyles[TRANSITION_PROP + DURATION_KEY];\n transitionDuration = Math.max(parseMaxTime(transitionDurationStyle), transitionDuration);\n\n var transitionDelayStyle = elementStyles[TRANSITION_PROP + DELAY_KEY];\n transitionDelay = Math.max(parseMaxTime(transitionDelayStyle), transitionDelay);\n\n var animationDelayStyle = elementStyles[ANIMATION_PROP + DELAY_KEY];\n animationDelay = Math.max(parseMaxTime(elementStyles[ANIMATION_PROP + DELAY_KEY]), animationDelay);\n\n var aDuration = parseMaxTime(elementStyles[ANIMATION_PROP + DURATION_KEY]);\n\n if (aDuration > 0) {\n aDuration *= parseInt(elementStyles[ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY], 10) || 1;\n }\n animationDuration = Math.max(aDuration, animationDuration);\n }\n });\n data = {\n total : 0,\n transitionDelay: transitionDelay,\n transitionDuration: transitionDuration,\n animationDelay: animationDelay,\n animationDuration: animationDuration\n };\n if (cacheKey) {\n lookupCache[cacheKey] = data;\n }\n }\n return data;\n }\n\n function parseMaxTime(str) {\n var maxValue = 0;\n var values = angular.isString(str) ?\n str.split(/\\s*,\\s*/) :\n [];\n forEach(values, function(value) {\n maxValue = Math.max(parseFloat(value) || 0, maxValue);\n });\n return maxValue;\n }\n\n function getCacheKey(element) {\n var parentElement = element.parent();\n var parentID = parentElement.data(NG_ANIMATE_PARENT_KEY);\n if (!parentID) {\n parentElement.data(NG_ANIMATE_PARENT_KEY, ++parentCounter);\n parentID = parentCounter;\n }\n return parentID + '-' + extractElementNode(element).getAttribute('class');\n }\n\n function animateSetup(animationEvent, element, className) {\n var structural = ['ng-enter','ng-leave','ng-move'].indexOf(className) >= 0;\n\n var cacheKey = getCacheKey(element);\n var eventCacheKey = cacheKey + ' ' + className;\n var itemIndex = lookupCache[eventCacheKey] ? ++lookupCache[eventCacheKey].total : 0;\n\n var stagger = {};\n if (itemIndex > 0) {\n var staggerClassName = className + '-stagger';\n var staggerCacheKey = cacheKey + ' ' + staggerClassName;\n var applyClasses = !lookupCache[staggerCacheKey];\n\n applyClasses && element.addClass(staggerClassName);\n\n stagger = getElementAnimationDetails(element, staggerCacheKey);\n\n applyClasses && element.removeClass(staggerClassName);\n }\n\n element.addClass(className);\n\n var formerData = element.data(NG_ANIMATE_CSS_DATA_KEY) || {};\n var timings = getElementAnimationDetails(element, eventCacheKey);\n var transitionDuration = timings.transitionDuration;\n var animationDuration = timings.animationDuration;\n\n if (structural && transitionDuration === 0 && animationDuration === 0) {\n element.removeClass(className);\n return false;\n }\n\n var blockTransition = structural && transitionDuration > 0;\n var blockAnimation = animationDuration > 0 &&\n stagger.animationDelay > 0 &&\n stagger.animationDuration === 0;\n\n var closeAnimationFns = formerData.closeAnimationFns || [];\n element.data(NG_ANIMATE_CSS_DATA_KEY, {\n stagger : stagger,\n cacheKey : eventCacheKey,\n running : formerData.running || 0,\n itemIndex : itemIndex,\n blockTransition : blockTransition,\n closeAnimationFns : closeAnimationFns\n });\n\n var node = extractElementNode(element);\n\n if (blockTransition) {\n blockTransitions(node, true);\n }\n\n if (blockAnimation) {\n blockAnimations(node, true);\n }\n\n return true;\n }\n\n function animateRun(animationEvent, element, className, activeAnimationComplete) {\n var node = extractElementNode(element);\n var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n if (node.getAttribute('class').indexOf(className) == -1 || !elementData) {\n activeAnimationComplete();\n return;\n }\n\n if (elementData.blockTransition) {\n blockTransitions(node, false);\n }\n\n var activeClassName = '';\n var pendingClassName = '';\n forEach(className.split(' '), function(klass, i) {\n var prefix = (i > 0 ? ' ' : '') + klass;\n activeClassName += prefix + '-active';\n pendingClassName += prefix + '-pending';\n });\n\n var style = '';\n var appliedStyles = [];\n var itemIndex = elementData.itemIndex;\n var stagger = elementData.stagger;\n var staggerTime = 0;\n if (itemIndex > 0) {\n var transitionStaggerDelay = 0;\n if (stagger.transitionDelay > 0 && stagger.transitionDuration === 0) {\n transitionStaggerDelay = stagger.transitionDelay * itemIndex;\n }\n\n var animationStaggerDelay = 0;\n if (stagger.animationDelay > 0 && stagger.animationDuration === 0) {\n animationStaggerDelay = stagger.animationDelay * itemIndex;\n appliedStyles.push(CSS_PREFIX + 'animation-play-state');\n }\n\n staggerTime = Math.round(Math.max(transitionStaggerDelay, animationStaggerDelay) * 100) / 100;\n }\n\n if (!staggerTime) {\n element.addClass(activeClassName);\n }\n\n var eventCacheKey = elementData.cacheKey + ' ' + activeClassName;\n var timings = getElementAnimationDetails(element, eventCacheKey);\n var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration);\n if (maxDuration === 0) {\n element.removeClass(activeClassName);\n animateClose(element, className);\n activeAnimationComplete();\n return;\n }\n\n var maxDelay = Math.max(timings.transitionDelay, timings.animationDelay);\n var maxDelayTime = maxDelay * ONE_SECOND;\n\n if (appliedStyles.length > 0) {\n //the element being animated may sometimes contain comment nodes in\n //the jqLite object, so we're safe to use a single variable to house\n //the styles since there is always only one element being animated\n var oldStyle = node.getAttribute('style') || '';\n if (oldStyle.charAt(oldStyle.length-1) !== ';') {\n oldStyle += ';';\n }\n node.setAttribute('style', oldStyle + ' ' + style);\n }\n\n var startTime = Date.now();\n var css3AnimationEvents = ANIMATIONEND_EVENT + ' ' + TRANSITIONEND_EVENT;\n var animationTime = (maxDelay + maxDuration) * CLOSING_TIME_BUFFER;\n var totalTime = (staggerTime + animationTime) * ONE_SECOND;\n\n var staggerTimeout;\n if (staggerTime > 0) {\n element.addClass(pendingClassName);\n staggerTimeout = $timeout(function() {\n staggerTimeout = null;\n element.addClass(activeClassName);\n element.removeClass(pendingClassName);\n if (timings.animationDuration > 0) {\n blockAnimations(node, false);\n }\n }, staggerTime * ONE_SECOND, false);\n }\n\n element.on(css3AnimationEvents, onAnimationProgress);\n elementData.closeAnimationFns.push(function() {\n onEnd();\n activeAnimationComplete();\n });\n\n elementData.running++;\n animationCloseHandler(element, totalTime);\n return onEnd;\n\n // This will automatically be called by $animate so\n // there is no need to attach this internally to the\n // timeout done method.\n function onEnd(cancelled) {\n element.off(css3AnimationEvents, onAnimationProgress);\n element.removeClass(activeClassName);\n element.removeClass(pendingClassName);\n if (staggerTimeout) {\n $timeout.cancel(staggerTimeout);\n }\n animateClose(element, className);\n var node = extractElementNode(element);\n for (var i in appliedStyles) {\n node.style.removeProperty(appliedStyles[i]);\n }\n }\n\n function onAnimationProgress(event) {\n event.stopPropagation();\n var ev = event.originalEvent || event;\n var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now();\n\n /* Firefox (or possibly just Gecko) likes to not round values up\n * when a ms measurement is used for the animation */\n var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));\n\n /* $manualTimeStamp is a mocked timeStamp value which is set\n * within browserTrigger(). This is only here so that tests can\n * mock animations properly. Real events fallback to event.timeStamp,\n * or, if they don't, then a timeStamp is automatically created for them.\n * We're checking to see if the timeStamp surpasses the expected delay,\n * but we're using elapsedTime instead of the timeStamp on the 2nd\n * pre-condition since animations sometimes close off early */\n if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {\n activeAnimationComplete();\n }\n }\n }\n\n function blockTransitions(node, bool) {\n node.style[TRANSITION_PROP + PROPERTY_KEY] = bool ? 'none' : '';\n }\n\n function blockAnimations(node, bool) {\n node.style[ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY] = bool ? 'paused' : '';\n }\n\n function animateBefore(animationEvent, element, className, calculationDecorator) {\n if (animateSetup(animationEvent, element, className, calculationDecorator)) {\n return function(cancelled) {\n cancelled && animateClose(element, className);\n };\n }\n }\n\n function animateAfter(animationEvent, element, className, afterAnimationComplete) {\n if (element.data(NG_ANIMATE_CSS_DATA_KEY)) {\n return animateRun(animationEvent, element, className, afterAnimationComplete);\n } else {\n animateClose(element, className);\n afterAnimationComplete();\n }\n }\n\n function animate(animationEvent, element, className, animationComplete) {\n //If the animateSetup function doesn't bother returning a\n //cancellation function then it means that there is no animation\n //to perform at all\n var preReflowCancellation = animateBefore(animationEvent, element, className);\n if (!preReflowCancellation) {\n animationComplete();\n return;\n }\n\n //There are two cancellation functions: one is before the first\n //reflow animation and the second is during the active state\n //animation. The first function will take care of removing the\n //data from the element which will not make the 2nd animation\n //happen in the first place\n var cancel = preReflowCancellation;\n afterReflow(element, function() {\n //once the reflow is complete then we point cancel to\n //the new cancellation function which will remove all of the\n //animation properties from the active animation\n cancel = animateAfter(animationEvent, element, className, animationComplete);\n });\n\n return function(cancelled) {\n (cancel || noop)(cancelled);\n };\n }\n\n function animateClose(element, className) {\n element.removeClass(className);\n var data = element.data(NG_ANIMATE_CSS_DATA_KEY);\n if (data) {\n if (data.running) {\n data.running--;\n }\n if (!data.running || data.running === 0) {\n element.removeData(NG_ANIMATE_CSS_DATA_KEY);\n }\n }\n }\n\n return {\n enter : function(element, animationCompleted) {\n return animate('enter', element, 'ng-enter', animationCompleted);\n },\n\n leave : function(element, animationCompleted) {\n return animate('leave', element, 'ng-leave', animationCompleted);\n },\n\n move : function(element, animationCompleted) {\n return animate('move', element, 'ng-move', animationCompleted);\n },\n\n beforeSetClass : function(element, add, remove, animationCompleted) {\n var className = suffixClasses(remove, '-remove') + ' ' +\n suffixClasses(add, '-add');\n var cancellationMethod = animateBefore('setClass', element, className);\n if (cancellationMethod) {\n afterReflow(element, animationCompleted);\n return cancellationMethod;\n }\n animationCompleted();\n },\n\n beforeAddClass : function(element, className, animationCompleted) {\n var cancellationMethod = animateBefore('addClass', element, suffixClasses(className, '-add'));\n if (cancellationMethod) {\n afterReflow(element, animationCompleted);\n return cancellationMethod;\n }\n animationCompleted();\n },\n\n beforeRemoveClass : function(element, className, animationCompleted) {\n var cancellationMethod = animateBefore('removeClass', element, suffixClasses(className, '-remove'));\n if (cancellationMethod) {\n afterReflow(element, animationCompleted);\n return cancellationMethod;\n }\n animationCompleted();\n },\n\n setClass : function(element, add, remove, animationCompleted) {\n remove = suffixClasses(remove, '-remove');\n add = suffixClasses(add, '-add');\n var className = remove + ' ' + add;\n return animateAfter('setClass', element, className, animationCompleted);\n },\n\n addClass : function(element, className, animationCompleted) {\n return animateAfter('addClass', element, suffixClasses(className, '-add'), animationCompleted);\n },\n\n removeClass : function(element, className, animationCompleted) {\n return animateAfter('removeClass', element, suffixClasses(className, '-remove'), animationCompleted);\n }\n };\n\n function suffixClasses(classes, suffix) {\n var className = '';\n classes = isArray(classes) ? classes : classes.split(/\\s+/);\n forEach(classes, function(klass, i) {\n if (klass && klass.length > 0) {\n className += (i > 0 ? ' ' : '') + klass + suffix;\n }\n });\n return className;\n }\n }]);\n }]);\n\n\n})(window, window.angular);\n","/*\n * angular-elastic v2.3.6\n * (c) 2014 Monospaced http://monospaced.com\n * License: MIT\n */\n\nangular.module('monospaced.elastic', [])\n\n .constant('msdElasticConfig', {\n append: ''\n })\n\n .directive('msdElastic', [\n '$timeout', '$window', 'msdElasticConfig',\n function($timeout, $window, config) {\n 'use strict';\n\n return {\n require: 'ngModel',\n restrict: 'A, C',\n link: function(scope, element, attrs, ngModel) {\n\n // cache a reference to the DOM element\n var ta = element[0],\n $ta = element;\n\n // ensure the element is a textarea, and browser is capable\n if (ta.nodeName !== 'TEXTAREA' || !$window.getComputedStyle) {\n return;\n }\n\n // set these properties before measuring dimensions\n $ta.css({\n 'overflow': 'hidden',\n 'overflow-y': 'hidden',\n 'word-wrap': 'break-word'\n });\n\n // force text reflow\n var text = ta.value;\n ta.value = '';\n ta.value = text;\n\n var append = attrs.msdElastic ? attrs.msdElastic.replace(/\\\\n/g, '\\n') : config.append,\n $win = angular.element($window),\n mirrorStyle = 'position: absolute; top: -999px; right: auto; bottom: auto;' +\n 'left: 0; overflow: hidden; -webkit-box-sizing: content-box;' +\n '-moz-box-sizing: content-box; box-sizing: content-box;' +\n 'min-height: 0 !important; height: 0 !important; padding: 0;' +\n 'word-wrap: break-word; border: 0;',\n $mirror = angular.element('').data('elastic', true),\n mirror = $mirror[0],\n taStyle = getComputedStyle(ta),\n resize = taStyle.getPropertyValue('resize'),\n borderBox = taStyle.getPropertyValue('box-sizing') === 'border-box' ||\n taStyle.getPropertyValue('-moz-box-sizing') === 'border-box' ||\n taStyle.getPropertyValue('-webkit-box-sizing') === 'border-box',\n boxOuter = !borderBox ? {width: 0, height: 0} : {\n width: parseInt(taStyle.getPropertyValue('border-right-width'), 10) +\n parseInt(taStyle.getPropertyValue('padding-right'), 10) +\n parseInt(taStyle.getPropertyValue('padding-left'), 10) +\n parseInt(taStyle.getPropertyValue('border-left-width'), 10),\n height: parseInt(taStyle.getPropertyValue('border-top-width'), 10) +\n parseInt(taStyle.getPropertyValue('padding-top'), 10) +\n parseInt(taStyle.getPropertyValue('padding-bottom'), 10) +\n parseInt(taStyle.getPropertyValue('border-bottom-width'), 10)\n },\n minHeightValue = parseInt(taStyle.getPropertyValue('min-height'), 10),\n heightValue = parseInt(taStyle.getPropertyValue('height'), 10),\n minHeight = Math.max(minHeightValue, heightValue) - boxOuter.height,\n maxHeight = parseInt(taStyle.getPropertyValue('max-height'), 10),\n mirrored,\n active,\n copyStyle = ['font-family',\n 'font-size',\n 'font-weight',\n 'font-style',\n 'letter-spacing',\n 'line-height',\n 'text-transform',\n 'word-spacing',\n 'text-indent'];\n\n // exit if elastic already applied (or is the mirror element)\n if ($ta.data('elastic')) {\n return;\n }\n\n // Opera returns max-height of -1 if not set\n maxHeight = maxHeight && maxHeight > 0 ? maxHeight : 9e4;\n\n // append mirror to the DOM\n if (mirror.parentNode !== document.body) {\n angular.element(document.body).append(mirror);\n }\n\n // set resize and apply elastic\n $ta.css({\n 'resize': (resize === 'none' || resize === 'vertical') ? 'none' : 'horizontal'\n }).data('elastic', true);\n\n /*\n * methods\n */\n\n function initMirror() {\n mirrored = ta;\n // copy the essential styles from the textarea to the mirror\n taStyle = getComputedStyle(ta);\n angular.forEach(copyStyle, function(val) {\n mirrorStyle += val + ':' + taStyle.getPropertyValue(val) + ';';\n });\n mirror.setAttribute('style', mirrorStyle);\n }\n\n function adjust() {\n var taHeight,\n taComputedStyleWidth,\n mirrorHeight,\n width,\n overflow;\n\n if (mirrored !== ta) {\n initMirror();\n }\n\n // active flag prevents actions in function from calling adjust again\n if (!active) {\n active = true;\n\n mirror.value = ta.value + append; // optional whitespace to improve animation\n mirror.style.overflowY = ta.style.overflowY;\n\n taHeight = ta.style.height === '' ? 'auto' : parseInt(ta.style.height, 10);\n\n taComputedStyleWidth = getComputedStyle(ta).getPropertyValue('width');\n\n // ensure getComputedStyle has returned a readable 'used value' pixel width\n if (taComputedStyleWidth.substr(taComputedStyleWidth.length - 2, 2) === 'px') {\n // update mirror width in case the textarea width has changed\n width = parseInt(taComputedStyleWidth, 10) - boxOuter.width;\n mirror.style.width = width + 'px';\n }\n\n mirrorHeight = mirror.scrollHeight;\n\n if (mirrorHeight > maxHeight) {\n mirrorHeight = maxHeight;\n overflow = 'scroll';\n } else if (mirrorHeight < minHeight) {\n mirrorHeight = minHeight;\n }\n mirrorHeight += boxOuter.height;\n\n ta.style.overflowY = overflow || 'hidden';\n\n if (taHeight !== mirrorHeight) {\n ta.style.height = mirrorHeight + 'px';\n scope.$emit('elastic:resize', $ta);\n }\n\n // small delay to prevent an infinite loop\n $timeout(function() {\n active = false;\n }, 1);\n\n }\n }\n\n function forceAdjust() {\n active = false;\n adjust();\n }\n\n /*\n * initialise\n */\n\n // listen\n if ('onpropertychange' in ta && 'oninput' in ta) {\n // IE9\n ta['oninput'] = ta.onkeyup = adjust;\n } else {\n ta['oninput'] = adjust;\n }\n\n $win.bind('resize', forceAdjust);\n\n scope.$watch(function() {\n return ngModel.$modelValue;\n }, function(newValue) {\n forceAdjust();\n });\n\n scope.$on('elastic:adjust', function() {\n forceAdjust();\n });\n\n $timeout(adjust);\n\n /*\n * destroy\n */\n\n scope.$on('$destroy', function() {\n $mirror.remove();\n $win.unbind('resize', forceAdjust);\n });\n }\n };\n }\n ]);\n","/**\n * @license AngularJS v1.3.0-rc.3\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\nvar $resourceMinErr = angular.$$minErr('$resource');\n\n// Helper functions and regex to lookup a dotted path on an object\n// stopping at undefined/null. The path must be composed of ASCII\n// identifiers (just like $parse)\nvar MEMBER_NAME_REGEX = /^(\\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;\n\nfunction isValidDottedPath(path) {\n return (path != null && path !== '' && path !== 'hasOwnProperty' &&\n MEMBER_NAME_REGEX.test('.' + path));\n}\n\nfunction lookupDottedPath(obj, path) {\n if (!isValidDottedPath(path)) {\n throw $resourceMinErr('badmember', 'Dotted member path \"@{0}\" is invalid.', path);\n }\n var keys = path.split('.');\n for (var i = 0, ii = keys.length; i < ii && obj !== undefined; i++) {\n var key = keys[i];\n obj = (obj !== null) ? obj[key] : undefined;\n }\n return obj;\n}\n\n/**\n * Create a shallow copy of an object and clear other fields from the destination\n */\nfunction shallowClearAndCopy(src, dst) {\n dst = dst || {};\n\n angular.forEach(dst, function(value, key){\n delete dst[key];\n });\n\n for (var key in src) {\n if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n dst[key] = src[key];\n }\n }\n\n return dst;\n}\n\n/**\n * @ngdoc module\n * @name ngResource\n * @description\n *\n * # ngResource\n *\n * The `ngResource` module provides interaction support with RESTful services\n * via the $resource service.\n *\n *\n * \n *\n * See {@link ngResource.$resource `$resource`} for usage.\n */\n\n/**\n * @ngdoc service\n * @name $resource\n * @requires $http\n *\n * @description\n * A factory which creates a resource object that lets you interact with\n * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.\n *\n * The returned resource object has action methods which provide high-level behaviors without\n * the need to interact with the low level {@link ng.$http $http} service.\n *\n * Requires the {@link ngResource `ngResource`} module to be installed.\n *\n * By default, trailing slashes will be stripped from the calculated URLs,\n * which can pose problems with server backends that do not expect that\n * behavior. This can be disabled by configuring the `$resourceProvider` like\n * this:\n *\n * ```js\n app.config(['$resourceProvider', function ($resourceProvider) {\n // Don't strip trailing slashes from calculated URLs\n $resourceProvider.defaults.stripTrailingSlashes = false;\n }]);\n * ```\n *\n * @param {string} url A parametrized URL template with parameters prefixed by `:` as in\n * `/user/:username`. If you are using a URL with a port number (e.g.\n * `http://example.com:8080/api`), it will be respected.\n *\n * If you are using a url with a suffix, just add the suffix, like this:\n * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')`\n * or even `$resource('http://example.com/resource/:resource_id.:format')`\n * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be\n * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you\n * can escape it with `/\\.`.\n *\n * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in\n * `actions` methods. If any of the parameter value is a function, it will be executed every time\n * when a param value needs to be obtained for a request (unless the param was overridden).\n *\n * Each key value in the parameter object is first bound to url template if present and then any\n * excess keys are appended to the url search query after the `?`.\n *\n * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in\n * URL `/path/greet?salutation=Hello`.\n *\n * If the parameter value is prefixed with `@` then the value for that parameter will be extracted\n * from the corresponding property on the `data` object (provided when calling an action method). For\n * example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam`\n * will be `data.someProp`.\n *\n * @param {Object.=} actions Hash with declaration of custom action that should extend\n * the default set of resource actions. The declaration should be created in the format of {@link\n * ng.$http#usage_parameters $http.config}:\n *\n * {action1: {method:?, params:?, isArray:?, headers:?, ...},\n * action2: {method:?, params:?, isArray:?, headers:?, ...},\n * ...}\n *\n * Where:\n *\n * - **`action`** – {string} – The name of action. This name becomes the name of the method on\n * your resource object.\n * - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`,\n * `DELETE`, `JSONP`, etc).\n * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of\n * the parameter value is a function, it will be executed every time when a param value needs to\n * be obtained for a request (unless the param was overridden).\n * - **`url`** – {string} – action specific `url` override. The url templating is supported just\n * like for the resource-level urls.\n * - **`isArray`** – {boolean=} – If true then the returned object for this action is an array,\n * see `returns` section.\n * - **`transformRequest`** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * request body and headers and returns its transformed (typically serialized) version.\n * By default, transformRequest will contain one function that checks if the request data is\n * an object and serializes to using `angular.toJson`. To prevent this behavior, set\n * `transformRequest` to an empty array: `transformRequest: []`\n * - **`transformResponse`** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * response body and headers and returns its transformed (typically deserialized) version.\n * By default, transformResponse will contain one function that checks if the response looks like\n * a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior, set\n * `transformResponse` to an empty array: `transformResponse: []`\n * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the\n * GET request, otherwise if a cache instance built with\n * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for\n * caching.\n * - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that\n * should abort the request when resolved.\n * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the\n * XHR object. See\n * [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)\n * for more information.\n * - **`responseType`** - `{string}` - see\n * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).\n * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -\n * `response` and `responseError`. Both `response` and `responseError` interceptors get called\n * with `http response` object. See {@link ng.$http $http interceptors}.\n *\n * @param {Object} options Hash with custom settings that should extend the\n * default `$resourceProvider` behavior. The only supported option is\n *\n * Where:\n *\n * - **`stripTrailingSlashes`** – {boolean} – If true then the trailing\n * slashes from any calculated URL will be stripped. (Defaults to true.)\n *\n * @returns {Object} A resource \"class\" object with methods for the default set of resource actions\n * optionally extended with custom `actions`. The default set contains these actions:\n * ```js\n * { 'get': {method:'GET'},\n * 'save': {method:'POST'},\n * 'query': {method:'GET', isArray:true},\n * 'remove': {method:'DELETE'},\n * 'delete': {method:'DELETE'} };\n * ```\n *\n * Calling these methods invoke an {@link ng.$http} with the specified http method,\n * destination and parameters. When the data is returned from the server then the object is an\n * instance of the resource class. The actions `save`, `remove` and `delete` are available on it\n * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create,\n * read, update, delete) on server-side data like this:\n * ```js\n * var User = $resource('/user/:userId', {userId:'@id'});\n * var user = User.get({userId:123}, function() {\n * user.abc = true;\n * user.$save();\n * });\n * ```\n *\n * It is important to realize that invoking a $resource object method immediately returns an\n * empty reference (object or array depending on `isArray`). Once the data is returned from the\n * server the existing reference is populated with the actual data. This is a useful trick since\n * usually the resource is assigned to a model which is then rendered by the view. Having an empty\n * object results in no rendering, once the data arrives from the server then the object is\n * populated with the data and the view automatically re-renders itself showing the new data. This\n * means that in most cases one never has to write a callback function for the action methods.\n *\n * The action methods on the class object or instance object can be invoked with the following\n * parameters:\n *\n * - HTTP GET \"class\" actions: `Resource.action([parameters], [success], [error])`\n * - non-GET \"class\" actions: `Resource.action([parameters], postData, [success], [error])`\n * - non-GET instance actions: `instance.$action([parameters], [success], [error])`\n *\n * Success callback is called with (value, responseHeaders) arguments. Error callback is called\n * with (httpResponse) argument.\n *\n * Class actions return empty instance (with additional properties below).\n * Instance actions return promise of the action.\n *\n * The Resource instances and collection have these additional properties:\n *\n * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this\n * instance or collection.\n *\n * On success, the promise is resolved with the same resource instance or collection object,\n * updated with data from server. This makes it easy to use in\n * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view\n * rendering until the resource(s) are loaded.\n *\n * On failure, the promise is resolved with the {@link ng.$http http response} object, without\n * the `resource` property.\n *\n * If an interceptor object was provided, the promise will instead be resolved with the value\n * returned by the interceptor.\n *\n * - `$resolved`: `true` after first server interaction is completed (either with success or\n * rejection), `false` before that. Knowing if the Resource has been resolved is useful in\n * data-binding.\n *\n * @example\n *\n * # Credit card resource\n *\n * ```js\n // Define CreditCard class\n var CreditCard = $resource('/user/:userId/card/:cardId',\n {userId:123, cardId:'@id'}, {\n charge: {method:'POST', params:{charge:true}}\n });\n\n // We can retrieve a collection from the server\n var cards = CreditCard.query(function() {\n // GET: /user/123/card\n // server returns: [ {id:456, number:'1234', name:'Smith'} ];\n\n var card = cards[0];\n // each item is an instance of CreditCard\n expect(card instanceof CreditCard).toEqual(true);\n card.name = \"J. Smith\";\n // non GET methods are mapped onto the instances\n card.$save();\n // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}\n // server returns: {id:456, number:'1234', name: 'J. Smith'};\n\n // our custom method is mapped as well.\n card.$charge({amount:9.99});\n // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}\n });\n\n // we can create an instance as well\n var newCard = new CreditCard({number:'0123'});\n newCard.name = \"Mike Smith\";\n newCard.$save();\n // POST: /user/123/card {number:'0123', name:'Mike Smith'}\n // server returns: {id:789, number:'0123', name: 'Mike Smith'};\n expect(newCard.id).toEqual(789);\n * ```\n *\n * The object returned from this function execution is a resource \"class\" which has \"static\" method\n * for each action in the definition.\n *\n * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and\n * `headers`.\n * When the data is returned from the server then the object is an instance of the resource type and\n * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD\n * operations (create, read, update, delete) on server-side data.\n\n ```js\n var User = $resource('/user/:userId', {userId:'@id'});\n User.get({userId:123}, function(user) {\n user.abc = true;\n user.$save();\n });\n ```\n *\n * It's worth noting that the success callback for `get`, `query` and other methods gets passed\n * in the response that came from the server as well as $http header getter function, so one\n * could rewrite the above example and get access to http headers as:\n *\n ```js\n var User = $resource('/user/:userId', {userId:'@id'});\n User.get({userId:123}, function(u, getResponseHeaders){\n u.abc = true;\n u.$save(function(u, putResponseHeaders) {\n //u => saved user object\n //putResponseHeaders => $http header getter\n });\n });\n ```\n *\n * You can also access the raw `$http` promise via the `$promise` property on the object returned\n *\n ```\n var User = $resource('/user/:userId', {userId:'@id'});\n User.get({userId:123})\n .$promise.then(function(user) {\n $scope.user = user;\n });\n ```\n\n * # Creating a custom 'PUT' request\n * In this example we create a custom method on our resource to make a PUT request\n * ```js\n * var app = angular.module('app', ['ngResource', 'ngRoute']);\n *\n * // Some APIs expect a PUT request in the format URL/object/ID\n * // Here we are creating an 'update' method\n * app.factory('Notes', ['$resource', function($resource) {\n * return $resource('/notes/:id', null,\n * {\n * 'update': { method:'PUT' }\n * });\n * }]);\n *\n * // In our controller we get the ID from the URL using ngRoute and $routeParams\n * // We pass in $routeParams and our Notes factory along with $scope\n * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',\n function($scope, $routeParams, Notes) {\n * // First get a note object from the factory\n * var note = Notes.get({ id:$routeParams.id });\n * $id = note.id;\n *\n * // Now call update passing in the ID first then the object you are updating\n * Notes.update({ id:$id }, note);\n *\n * // This will PUT /notes/ID with the note object in the request payload\n * }]);\n * ```\n */\nangular.module('ngResource', ['ng']).\n provider('$resource', function () {\n var provider = this;\n\n this.defaults = {\n // Strip slashes by default\n stripTrailingSlashes: true,\n\n // Default actions configuration\n actions: {\n 'get': {method: 'GET'},\n 'save': {method: 'POST'},\n 'query': {method: 'GET', isArray: true},\n 'remove': {method: 'DELETE'},\n 'delete': {method: 'DELETE'}\n }\n };\n\n this.$get = ['$http', '$q', function ($http, $q) {\n\n var noop = angular.noop,\n forEach = angular.forEach,\n extend = angular.extend,\n copy = angular.copy,\n isFunction = angular.isFunction;\n\n /**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set\n * (pchar) allowed in path segments:\n * segment = *pchar\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\n function encodeUriSegment(val) {\n return encodeUriQuery(val, true).\n replace(/%26/gi, '&').\n replace(/%3D/gi, '=').\n replace(/%2B/gi, '+');\n }\n\n\n /**\n * This method is intended for encoding *key* or *value* parts of query component. We need a\n * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per http://tools.ietf.org/html/rfc3986:\n * query = *( pchar / \"/\" / \"?\" )\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\n function encodeUriQuery(val, pctEncodeSpaces) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n }\n\n function Route(template, defaults) {\n this.template = template;\n this.defaults = extend({}, provider.defaults, defaults);\n this.urlParams = {};\n }\n\n Route.prototype = {\n setUrlParams: function (config, params, actionUrl) {\n var self = this,\n url = actionUrl || self.template,\n val,\n encodedVal;\n\n var urlParams = self.urlParams = {};\n forEach(url.split(/\\W/), function (param) {\n if (param === 'hasOwnProperty') {\n throw $resourceMinErr('badname', \"hasOwnProperty is not a valid parameter name.\");\n }\n if (!(new RegExp(\"^\\\\d+$\").test(param)) && param &&\n (new RegExp(\"(^|[^\\\\\\\\]):\" + param + \"(\\\\W|$)\").test(url))) {\n urlParams[param] = true;\n }\n });\n url = url.replace(/\\\\:/g, ':');\n\n params = params || {};\n forEach(self.urlParams, function (_, urlParam) {\n val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];\n if (angular.isDefined(val) && val !== null) {\n encodedVal = encodeUriSegment(val);\n url = url.replace(new RegExp(\":\" + urlParam + \"(\\\\W|$)\", \"g\"), function (match, p1) {\n return encodedVal + p1;\n });\n } else {\n url = url.replace(new RegExp(\"(\\/?):\" + urlParam + \"(\\\\W|$)\", \"g\"), function (match,\n leadingSlashes, tail) {\n if (tail.charAt(0) == '/') {\n return tail;\n } else {\n return leadingSlashes + tail;\n }\n });\n }\n });\n\n // strip trailing slashes and set the url (unless this behavior is specifically disabled)\n if (self.defaults.stripTrailingSlashes) {\n url = url.replace(/\\/+$/, '') || '/';\n }\n\n // then replace collapse `/.` if found in the last URL path segment before the query\n // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`\n url = url.replace(/\\/\\.(?=\\w+($|\\?))/, '.');\n // replace escaped `/\\.` with `/.`\n config.url = url.replace(/\\/\\\\\\./, '/.');\n\n\n // set params - delegate param encoding to $http\n forEach(params, function (value, key) {\n if (!self.urlParams[key]) {\n config.params = config.params || {};\n config.params[key] = value;\n }\n });\n }\n };\n\n\n function resourceFactory(url, paramDefaults, actions, options) {\n var route = new Route(url, options);\n\n actions = extend({}, provider.defaults.actions, actions);\n\n function extractParams(data, actionParams) {\n var ids = {};\n actionParams = extend({}, paramDefaults, actionParams);\n forEach(actionParams, function (value, key) {\n if (isFunction(value)) { value = value(); }\n ids[key] = value && value.charAt && value.charAt(0) == '@' ?\n lookupDottedPath(data, value.substr(1)) : value;\n });\n return ids;\n }\n\n function defaultResponseInterceptor(response) {\n return response.resource;\n }\n\n function Resource(value) {\n shallowClearAndCopy(value || {}, this);\n }\n\n Resource.prototype.toJSON = function () {\n var data = extend({}, this);\n delete data.$promise;\n delete data.$resolved;\n return data;\n };\n\n forEach(actions, function (action, name) {\n var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);\n\n Resource[name] = function (a1, a2, a3, a4) {\n var params = {}, data, success, error;\n\n /* jshint -W086 */ /* (purposefully fall through case statements) */\n switch (arguments.length) {\n case 4:\n error = a4;\n success = a3;\n //fallthrough\n case 3:\n case 2:\n if (isFunction(a2)) {\n if (isFunction(a1)) {\n success = a1;\n error = a2;\n break;\n }\n\n success = a2;\n error = a3;\n //fallthrough\n } else {\n params = a1;\n data = a2;\n success = a3;\n break;\n }\n case 1:\n if (isFunction(a1)) success = a1;\n else if (hasBody) data = a1;\n else params = a1;\n break;\n case 0: break;\n default:\n throw $resourceMinErr('badargs',\n \"Expected up to 4 arguments [params, data, success, error], got {0} arguments\",\n arguments.length);\n }\n /* jshint +W086 */ /* (purposefully fall through case statements) */\n\n var isInstanceCall = this instanceof Resource;\n var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));\n var httpConfig = {};\n var responseInterceptor = action.interceptor && action.interceptor.response ||\n defaultResponseInterceptor;\n var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||\n undefined;\n\n forEach(action, function (value, key) {\n if (key != 'params' && key != 'isArray' && key != 'interceptor') {\n httpConfig[key] = copy(value);\n }\n });\n\n if (hasBody) httpConfig.data = data;\n route.setUrlParams(httpConfig,\n extend({}, extractParams(data, action.params || {}), params),\n action.url);\n\n var promise = $http(httpConfig).then(function (response) {\n var data = response.data,\n promise = value.$promise;\n\n if (data) {\n // Need to convert action.isArray to boolean in case it is undefined\n // jshint -W018\n if (angular.isArray(data) !== (!!action.isArray)) {\n throw $resourceMinErr('badcfg',\n 'Error in resource configuration for action `{0}`. Expected response to ' +\n 'contain an {1} but got an {2}', name, action.isArray ? 'array' : 'object',\n angular.isArray(data) ? 'array' : 'object');\n }\n // jshint +W018\n if (action.isArray) {\n value.length = 0;\n forEach(data, function (item) {\n if (typeof item === \"object\") {\n value.push(new Resource(item));\n } else {\n // Valid JSON values may be string literals, and these should not be converted\n // into objects. These items will not have access to the Resource prototype\n // methods, but unfortunately there\n value.push(item);\n }\n });\n } else {\n shallowClearAndCopy(data, value);\n value.$promise = promise;\n }\n }\n\n value.$resolved = true;\n\n response.resource = value;\n\n return response;\n }, function (response) {\n value.$resolved = true;\n\n (error || noop)(response);\n\n return $q.reject(response);\n });\n\n promise = promise.then(\n function (response) {\n var value = responseInterceptor(response);\n (success || noop)(value, response.headers);\n return value;\n },\n responseErrorInterceptor);\n\n if (!isInstanceCall) {\n // we are creating instance / collection\n // - set the initial promise\n // - return the instance / collection\n value.$promise = promise;\n value.$resolved = false;\n\n return value;\n }\n\n // instance call\n return promise;\n };\n\n\n Resource.prototype['$' + name] = function (params, success, error) {\n if (isFunction(params)) {\n error = success; success = params; params = {};\n }\n var result = Resource[name].call(this, params, this, success, error);\n return result.$promise || result;\n };\n });\n\n Resource.bind = function (additionalParamDefaults) {\n return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);\n };\n\n return Resource;\n }\n\n return resourceFactory;\n }];\n });\n\n\n})(window, window.angular);\n","var hljs=new function(){function k(v){return v.replace(/&/gm,\"&\").replace(//gm,\">\")}function t(v){return v.nodeName.toLowerCase()}function i(w,x){var v=w&&w.exec(x);return v&&v.index==0}function d(v){return Array.prototype.map.call(v.childNodes,function(w){if(w.nodeType==3){return b.useBR?w.nodeValue.replace(/\\n/g,\"\"):w.nodeValue}if(t(w)==\"br\"){return\"\\n\"}return d(w)}).join(\"\")}function r(w){var v=(w.className+\" \"+(w.parentNode?w.parentNode.className:\"\")).split(/\\s+/);v=v.map(function(x){return x.replace(/^language-/,\"\")});return v.filter(function(x){return j(x)||x==\"no-highlight\"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)==\"br\"){z+=1}else{if(A.nodeType==1){v.push({event:\"start\",offset:z,node:A});z=w(A,z);v.push({event:\"stop\",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F=\"\";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset
tag\n * @ngInject\n */\n function renderWhitespaceCharacters() {\n var WHITESPACES = {\n 'space' : {\n 'regex' : / /g,\n 'template' : ' '\n },\n 'newline' : {\n 'regex' : /\\n/g,\n 'template' : '\\n'\n },\n 'tab' : {\n 'regex' : /\\t/g,\n 'template' : '\\t'\n }\n };\n\n return {\n restrict: 'A',\n required: ['ngBind'],\n scope: {\n ngBind: '='\n },\n\n link: function compile(scope, element) {\n scope.$watch('ngBind', function (value) {\n value = replaceChar(value, WHITESPACES.space);\n value = replaceChar(value, WHITESPACES.newline);\n value = replaceChar(value, WHITESPACES.tab);\n element.html(value);\n });\n }\n };\n\n function replaceChar(value, whitespaceChar) {\n return value.replace(whitespaceChar.regex, whitespaceChar.template);\n }\n }\n\n angular\n .module('app')\n .directive('renderWhitespaceCharacters', renderWhitespaceCharacters);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * Represents a draggable resizer.\n *\n * @param $window\n * @param $document\n * @param $timeout\n * @returns {Function}\n */\n function resizer(SettingsService, $window, $document, $timeout) {\n\n function link(scope, element, attrs) {\n\n /**\n * The height to use for the resizer when it is visible.\n *\n * @type {Number}\n */\n scope.height = parseInt(attrs.resizerHeight);\n\n /**\n * The current height of the resizer to display.\n *\n * @type {Number}\n */\n scope.actualHeight = scope.height;\n\n scope.position = normalisePercentage(SettingsService.get(\n SettingsService.SETTING.SUGGESTIONS_PANEL_HEIGHT), $window.innerHeight);\n scope.actualPosition = scope.position;\n\n scope.show =\n SettingsService.subscribe(SettingsService.SETTING.SHOW_SUGGESTIONS,\n function (show) {\n scope.show = show;\n setBottomPanelVisibility(show);\n });\n\n /**\n * Persist the current size as a setting.\n */\n function saveCurrentSize() {\n SettingsService.update(SettingsService.SETTING.SUGGESTIONS_PANEL_HEIGHT,\n scope.actualPosition);\n }\n\n function setBottomPanelVisibility(showing) {\n if (showing) {\n scope.actualPosition = scope.position;\n scope.actualHeight = scope.height;\n } else {\n // save resizer position so it can be restored\n // does not appear to set properly without an intermediate variable\n var currentPos = scope.actualPosition;\n scope.position = currentPos;\n scope.actualPosition = 0;\n scope.actualHeight = 0;\n }\n\n // Panel only renders properly if resizer is adjusted in a later frame\n setTimeout(adjustResizer);\n }\n\n setBottomPanelVisibility(scope.show);\n\n element.addClass('Resizer');\n\n // Initial Resize\n if (attrs.resizer === 'vertical') {\n element.addClass('Resizer--vertical');\n $timeout(function (){\n adjustVerticalPanel(scope.actualPosition);\n });\n }\n else {\n element.addClass('Resizer--horizontal');\n $timeout(function (){\n adjustHorizontalPanel(scope.actualPosition);\n });\n }\n\n element.on('mousedown', function(event) {\n event.preventDefault();\n $document.on('mousemove', mousemove);\n $document.on('mouseup', mouseup);\n });\n\n angular.element($window).bind('resize', function() {\n $timeout.cancel(scope.resizing);\n scope.resizing = $timeout(adjustResizer);\n });\n\n function mousemove(event) {\n if (attrs.resizer === 'vertical') {\n adjustVerticalPanel(event.pageX);\n } else {\n adjustHorizontalPanel($window.innerHeight - event.pageY);\n }\n }\n\n function adjustVerticalPanel(resizerPositionX) {\n var x = resizerPositionX,\n leftPanel = angular.element(document\n .querySelector(attrs.resizerLeft)),\n rightPanel = angular.element(document\n .querySelector(attrs.resizerRight)),\n maximumPanelSize =\n normalisePercentage(attrs.resizerMax, $window.innerHeight),\n minimumPanelSize = attrs.resizerMin ||\n parseInt(attrs.resizerWidth);\n\n scope.actualPosition = x;\n x = restrictMinOrMax(x, maximumPanelSize, minimumPanelSize);\n\n element.css({\n left: (x - (scope.actualHeight / 2)) + 'px'\n });\n\n leftPanel.css({\n width: x + 'px'\n });\n\n rightPanel.css({\n left: x + 'px'\n });\n }\n\n function adjustHorizontalPanel(resizerPositionY) {\n var y = resizerPositionY,\n topPanel = angular.element(document\n .querySelector(attrs.resizerTop)),\n bottomPanel = angular.element(document\n .querySelector(attrs.resizerBottom)),\n maximumPanelSize =\n normalisePercentage(attrs.resizerMax, $window.innerHeight),\n minimumPanelSize = attrs.resizerMin || scope.actualHeight;\n\n scope.actualPosition = y;\n y = restrictMinOrMax(y, maximumPanelSize, minimumPanelSize);\n\n element.css({\n bottom: (y - (scope.actualHeight / 2)) + 'px'\n });\n\n topPanel.css({\n bottom: y + 'px'\n });\n\n bottomPanel.css({\n height: y + 'px'\n });\n }\n\n function mouseup() {\n $document.unbind('mousemove', mousemove);\n $document.unbind('mouseup', mouseup);\n\n // Now that a new value has stopped rapidly changing, persist it.\n saveCurrentSize();\n }\n\n function adjustResizer() {\n if (attrs.resizer === 'vertical') {\n adjustVerticalPanel(scope.actualPosition);\n }\n else {\n adjustHorizontalPanel(scope.actualPosition);\n }\n }\n\n function restrictMinOrMax(currentSize, maxSize, minSize) {\n // Maximum\n if (maxSize && currentSize > maxSize) {\n return maxSize;\n }\n // Minimum\n else if (currentSize < minSize) {\n return minSize;\n }\n else {\n return currentSize;\n }\n }\n\n function normalisePercentage(fraction, whole) {\n if ((/[0-9]*\\.?[0-9]+%/).test(fraction)) {\n return Math.round(whole * (parseInt(fraction.replace('%','')) / 100));\n }\n else {\n return parseInt(fraction);\n }\n }\n\n }\n\n return {\n link: link\n };\n }\n\n angular\n .module('app')\n .directive('resizer', resizer);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name ScrollbarWidthCtrl\n *\n * @description\n * Handle dropdown events between directives\n *\n * @ngInject\n */\n function ScrollbarWidthCtrl() {\n var scrollbarWidthCtrl = this;\n\n scrollbarWidthCtrl.init = function() {\n var container = scrollbarWidthCtrl.container[0],\n child = scrollbarWidthCtrl.child[0],\n scrollbarWidth = child.offsetWidth - container.offsetWidth;\n\n scrollbarWidthCtrl.width = scrollbarWidth / 2;\n };\n\n }\n\n angular\n .module('app')\n .controller('ScrollbarWidthCtrl', ScrollbarWidthCtrl);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name scrollbarWidth\n *\n * @description\n * Scrollbar width container\n * Needed for the controller to reference all properties\n */\n function scrollbarWidth() {\n return {\n restrict: 'A',\n controller: 'ScrollbarWidthCtrl as scrollbarWidthCtrl',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n scrollbarWidthCtrl.init(element);\n }\n };\n }\n\n /**\n * @name scrollbarWidthElement\n *\n * @description\n * The element to add the scrollbar width to\n */\n function scrollbarWidthElement() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n // Use the attribute to decide which property to set\n element.css(attrs.scrollbarWidthElement, scrollbarWidthCtrl.width);\n }\n };\n }\n\n /**\n * @name scrollbarWidthContainer\n *\n * @description\n * Get the scrollbar container width\n */\n function scrollbarWidthContainer() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.container = element;\n }\n };\n }\n\n /**\n * @name scrollbarWidthChild\n *\n * @description\n * Get the scrollbar child width\n */\n function scrollbarWidthChild() {\n return {\n restrict: 'A',\n require: '?^scrollbarWidth',\n link: function(scope, element, attrs, scrollbarWidthCtrl) {\n if (!scrollbarWidthCtrl) {\n return;\n }\n scrollbarWidthCtrl.child = element;\n }\n };\n }\n\n angular\n .module('app')\n .directive('scrollbarWidth', scrollbarWidth)\n .directive('scrollbarWidthElement', scrollbarWidthElement)\n .directive('scrollbarWidthContainer', scrollbarWidthContainer)\n .directive('scrollbarWidthChild', scrollbarWidthChild);\n\n})();\n","(function() {\n 'use strict';\n\n\n /**\n * The name of a setting, used as a unique key for lookup and storage.\n * @typedef {string} SettingKey\n */\n\n /**\n * The value for a setting.\n *\n * @typedef {(string|number|boolean)} SettingValue\n */\n\n /**\n * Service for persisted user settings.\n *\n * @constructor\n */\n function SettingsService(EventService, $q, $rootScope, _) {\n var settingsService = this;\n\n /**\n * All valid settings keys.\n *\n * These enum constants should be used for all settings operations.\n *\n * @type {Object<*, SettingKey>}\n */\n settingsService.SETTING = {\n SUGGESTIONS_AUTOFILL_ON_ROW_SELECT: 'suggestionsAutofillOnRowSelect',\n SUGGESTIONS_SHOW_DIFFERENCE: 'suggestionsShowDifference',\n SHOW_SUGGESTIONS: 'showSuggestions',\n SUGGESTIONS_PANEL_HEIGHT: 'suggestionsPanelHeight'\n };\n\n var SETTING = settingsService.SETTING;\n\n /**\n * Settings enum, with default values that indicate the type\n * @enum {SettingValue}\n */\n var defaultSettings = {};\n defaultSettings[SETTING.SUGGESTIONS_AUTOFILL_ON_ROW_SELECT] = true;\n defaultSettings[SETTING.SUGGESTIONS_SHOW_DIFFERENCE] = false;\n defaultSettings[SETTING.SHOW_SUGGESTIONS] = true;\n defaultSettings[SETTING.SUGGESTIONS_PANEL_HEIGHT] = '30%';\n\n /**\n * Local settings cache.\n *\n * @type {Object}\n */\n var settings = _.clone(defaultSettings);\n\n\n /*\n\n TODO save settings to the server, prefer sending as a batch if possible\n (i.e. when updateAll is used, and future option to ensure only one save\n request at a time and use _.extend to combine all the queued settings\n while waiting).\n\n */\n\n /**\n * Update a single setting to have the given value.\n *\n * This will trigger a user setting update event.\n *\n * @param {SettingKey} setting the name of the setting to update\n * @param {SettingValue} value the new value for the setting\n */\n function update(setting, value) {\n validateSettingValue(value);\n var settingObj = {};\n settingObj[setting] = value;\n _.extend(settings, settingObj);\n\n EventService.emitEvent(EventService.EVENT.USER_SETTING_CHANGED, {\n setting: setting,\n value: value\n });\n }\n\n /**\n * Update multiple settings from a map of setting names and values.\n *\n * An event is triggered for each setting.\n *\n * @param {Object} settings\n */\n function updateAll(settings) {\n _.each(settings, function (value, key) {\n update(key, value);\n });\n }\n\n /**\n * Get the currently stored value for a setting.\n *\n * This should only be used to fetch the initial value or when a setting\n * is used once. To track changes to a setting, subscribe to the\n * USER_SETTING_CHANGED event and check the setting property of the event\n * payload.\n *\n * @param {SettingKey} setting name of the setting to look up\n */\n function get(setting) {\n if (_.has(settings, setting)) {\n return settings[setting];\n }\n // Incorrect key is a programmer error - default should be set for all\n // user settings that are used.\n console.error('Tried to look up setting with unrecognized key: %s',\n setting);\n }\n\n /**\n * Register an action to perform when a user setting value changes, and get\n * the current value.\n *\n * @param {SettingKey} setting the setting to get and subscribe to\n * @param {function} callback called with the new value\n * @return {SettingValue} the current value of the setting\n */\n function subscribe(setting, callback) {\n $rootScope.$on(EventService.EVENT.USER_SETTING_CHANGED,\n function (event, data) {\n if (data.setting === setting) {\n callback(data.value);\n }\n });\n return get(setting);\n }\n\n /**\n * Throw an error if the value is not the correct type for the setting.\n *\n * @param {SettingValue} value\n */\n function validateSettingValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'string':\n break;\n default:\n throw new Error('Invalid type for setting value: \"' + typeof value +\n '\".');\n }\n }\n\n\n\n return {\n SETTING: SETTING,\n update: update,\n updateAll: updateAll,\n get: get,\n subscribe: subscribe\n };\n }\n\n angular\n .module('app')\n .factory('SettingsService', SettingsService);\n})();\n","(function () {\n 'use strict';\n\n /**\n * SuggestionCtrl.js\n * @ngInject\n */\n function SuggestionCtrl(EventService, $rootScope, $scope, _, $timeout) {\n var suggestionCtrl = this;\n\n suggestionCtrl.copyButtonText = 'Copy Translation';\n\n $scope.searchTerm = (typeof $scope.search === 'string') ?\n [$scope.search] :\n $scope.search.sources;\n\n /**\n * Get a modifier for the row class that will determine display colours.\n *\n * Intended to be used to generate css class for the row:\n *\n * TransUnit--{{suggestionCtrl.rowDisplayType()}}\n *\n * @return {string} modifier to append to the TransUnit-- css class\n */\n\n suggestionCtrl.rowDisplayType = function () {\n /* @type {MatchDetail} */\n var topMatch = suggestionCtrl.topMatch();\n\n if (topMatch.type === 'IMPORTED_TM') {\n return 'secondary';\n }\n if (topMatch.type === 'LOCAL_PROJECT') {\n if (topMatch.contentState === 'Translated') {\n return 'success';\n }\n if (topMatch.contentState === 'Approved') {\n return 'highlight';\n }\n }\n console.error('Unable to generate row display type for top match');\n };\n\n /**\n *\n * @returns {string}\n */\n suggestionCtrl.percentDisplayType = function () {\n var type = suggestionCtrl.rowDisplayType();\n return type.charAt(0).toUpperCase() + type.substring(1);\n };\n\n /**\n * Return correct percentage to display.\n *\n * I am using this instead of Angular's number display because the number\n * display forces a particular number of decimal places rather than just\n * limiting to the specified number, and because we should never show 100%\n * unless it is exactly 100%.\n */\n suggestionCtrl.percent = function () {\n var percent = $scope.suggestion.similarityPercent;\n\n // Prevent very high percentages displaying as 100%\n if (percent > 99.99 && percent < 100) {\n return '99.99';\n }\n if (percent >= 99.90 && percent < 100) {\n return '99.9';\n }\n\n // Limit any inexact percentages to a single decimal place\n if (Math.round(percent) !== percent) {\n return percent.toFixed(1);\n }\n\n return percent;\n };\n\n /**\n * Return the details for the best match according to the following\n * criteria:\n *\n * - Content state and type: Approved > Translated > Imported\n * - Last modified: older modifications take higher priority.\n *\n * @return {MatchDetail} the best match\n */\n suggestionCtrl.topMatch = function () {\n return $scope.sortedDetails[0];\n };\n\n // TODO use sortByAll when lodash version is increased\n /**\n * Return a string that will naturally sort local project details before\n * imported TM details, approved state above translated state, and older\n * modification dates first, in that priority order.\n *\n * @param detail {MatchDetail} to generate a sorting string for\n * @returns {string}\n */\n function typeAndDateSort (detail) {\n\n if (detail.type === 'IMPORTED_TM') {\n return '3' + detail.lastChanged;\n }\n if (detail.type === 'LOCAL_PROJECT') {\n if (detail.contentState === 'Translated') {\n return '2' + detail.lastModifiedDate;\n }\n if (detail.contentState === 'Approved') {\n return '1' + detail.lastModifiedDate;\n }\n }\n // Unrecognized, sort last\n return '9';\n }\n\n /**\n * Request this suggestion to be copied to the selected translation field.\n *\n * Generates a COPY_FROM_SUGGESTION event.\n */\n suggestionCtrl.copySuggestion = function () {\n suggestionCtrl.copyButtonText = 'Copied';\n suggestionCtrl.copyButtonDisabled = true;\n $timeout(function() {\n suggestionCtrl.copyButtonDisabled = false;\n suggestionCtrl.copyButtonText = 'Copy Translation';\n }, 500);\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SUGGESTION,\n { suggestion: $scope.suggestion });\n };\n\n\n\n $rootScope.$on(EventService.EVENT.COPY_FROM_SUGGESTION_N,\n function (event, data) {\n if (data === $scope.index) {\n suggestionCtrl.copySuggestion();\n }\n });\n\n // TODO sort detail before it is sent here for display\n $scope.sortedDetails =\n _.sortBy($scope.suggestion.matchDetails, typeAndDateSort);\n\n\n // Will be undefined for imported matches\n $scope.translator = suggestionCtrl.topMatch().lastModifiedBy;\n\n\n return suggestionCtrl;\n }\n\n angular\n .module('app')\n .controller('SuggestionCtrl', SuggestionCtrl);\n})();\n\n","(function() {\n 'use strict';\n\n /**\n * @typedef {Object} ImportedMatchDetail\n * @param {string} type - 'IMPORTED_TM'\n * @param {number} transMemoryUnitId - numeric identifier for this translation\n * memory unit on the server\n * @param {string} transMemorySlug - identifier for the translation memory\n * that contains this translation unit\n * @param {string} transUnitId - optional identifier for this translation unit\n * @param {string} lastChanged - date that this text flow was last changed, in\n * ISO-8601 format\n */\n\n /**\n * @typedef {Object} LocalMatchDetail\n * @param {string} type - 'LOCAL_PROJECT'\n * @param {number} textFlowId - numeric identifier for this text flow on the\n * server\n * @param {string} contentState - 'Translated' or 'Approved'\n * @param {string} projectId - identifier for the project that this text flow\n * is in\n * @param {string} projectName - display name for the project that this text\n * flow is in\n * @param {string} version - identifier for the version that this text flow is\n * in\n * @param {string} documentPath - file path of the document that contains this\n * text flow.\n * @param {string} documentName - file name of the document that contains this\n * text flow, without the file path\n * @param {string} resId - natural id for this text flow within the document\n * @param {string} lastModifiedDate - date that this text flow was last\n * changed, in ISO-8601 format\n * @param {string} lastModifiedBy - username of the user who last modified\n * this text flow\n */\n\n /**\n * @typedef {(ImportedMatchDetail|LocalMatchDetail)} MatchDetail\n */\n\n /**\n * @typedef {Object} Suggestion\n * @param {number} relevanceScore - score from the search engine indicating\n * how close a match it considers this to the query.\n * It is sensible to compare scores within a query,\n * but not between queries.\n * @param {number} similarityPercent - proportion of the characters in\n * sourceContents that match the query\n * @param {Array} sourceContents - suggested source text that is\n * similar to the search\n * @param {Array} targetContents - translations of the suggested\n * source text\n * @param {Array} matchDetails - summary of all the sources with\n * the same source and target contents\n */\n\n /**\n * Provide suggestions based on given source text.\n *\n * SuggestionsService.js\n * @ngInject\n */\n function SuggestionsService(EditorService, EventService, UrlService,\n $resource) {\n\n /**\n * Get a list of suggestions for how to translate a piece of text.\n *\n * @param {string} searchText\n * @return {Promise>} suggestions for translating the\n * given text\n */\n function getSuggestionsForText(searchText) {\n return getSuggestionsForContents([searchText]);\n }\n\n /**\n * Get a list of suggestions for how to translate a phrase.\n *\n * @param {Phrase} phrase the source text to find suggestions for\n * @returns {Promise>} suggestions for translating the\n * given phrase\n */\n function getSuggestionsForPhrase(phrase) {\n return getSuggestionsForContents(phrase.sources)\n .then(function (suggestions) {\n EventService.emitEvent(EventService.EVENT.PHRASE_SUGGESTION_COUNT,\n { id: phrase.id, count: suggestions.length });\n return suggestions;\n });\n }\n\n /**\n * Get a list of suggestions for how to translate a list of strings.\n *\n * @param contents {Array} source strings to find matches for\n * @returns {Promise>}\n */\n function getSuggestionsForContents(contents) {\n var sourceLocale = EditorService.context.srcLocale.localeId;\n var transLocale = EditorService.context.localeId;\n\n var postQuery = {\n query: {\n method: 'POST',\n params: {\n from: sourceLocale,\n to: transLocale,\n searchType: 'FUZZY_PLURAL'\n },\n isArray: true\n }\n };\n\n var Suggestions = $resource(UrlService.SUGGESTIONS_URL, {}, postQuery);\n return Suggestions.query({}, contents).$promise;\n }\n\n return {\n getSuggestionsForPhrase: getSuggestionsForPhrase,\n getSuggestionsForText: getSuggestionsForText\n };\n }\n\n angular\n .module('app')\n .factory('SuggestionsService', SuggestionsService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name suggestion\n * @description suggestion container\n * @ngInject\n */\n function suggestion() {\n return {\n // Only use the template on elements with this name (not on things that\n // have an attribute or class called 'suggestion'.\n restrict: 'E',\n //required: ['suggestion'],\n\n // Specify an isolated scope for the suggestion component.\n scope: {\n // make variable 'suggestion' available in the template's scope, and\n // bind its value from the attribute with the same name.\n // (a different name for the attribute can be specified after the =\n suggestion: '=',\n index: '=',\n search: '=',\n diffEnabled: '='\n\n // If I put & instead of = in front of a name, it will run it in the\n // parent scope instead of this directive's isolated scope. Good for\n // callbacks.\n },\n controller: 'SuggestionCtrl as suggestionCtrl',\n templateUrl: 'components/suggestions/suggestion.html'\n };\n }\n\n angular\n .module('app')\n .directive('suggestion', suggestion);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name toggle-checkbox\n * @description Add an extra element to a checkbox to\n * so we can style it differently\n * @ngInject\n */\n function toggleCheckbox() {\n return {\n restrict: 'A',\n link: function(scope, element) {\n element.after('');\n }\n };\n }\n\n angular\n .module('app')\n .directive('toggleCheckbox', toggleCheckbox);\n\n})();\n","(function () {\n 'use strict';\n\n /**\n * @typedef {Object} StatusInfo\n * @property {string} ID lower case translation status (content state)\n * @property {string} NAME capitalized representation\n * @property {string} CSSCLASS css class to use for this status\n *\n */\n /**\n * TransStatusService.js\n *\n * @ngInject\n */\n function TransStatusService(_) {\n var transStatusService = this,\n STATUSES = {\n 'UNTRANSLATED': {\n 'ID': 'untranslated',\n 'NAME': 'Untranslated',\n 'CSSCLASS': 'neutral'\n },\n 'NEEDSWORK': {\n 'ID': 'needswork',\n 'NAME': 'Needs Work',\n 'CSSCLASS': 'unsure'\n },\n 'TRANSLATED' : {\n 'ID': 'translated',\n 'NAME': 'Translated',\n 'CSSCLASS': 'success'\n },\n 'APPROVED': {\n 'ID': 'approved',\n 'NAME': 'Approved',\n 'CSSCLASS': 'highlight'\n }\n };\n\n transStatusService.getAll = function() {\n return STATUSES;\n };\n\n transStatusService.getAllAsArray = function() {\n return _.values(STATUSES);\n };\n\n /**\n *\n * @param {string} statusKey string representation of the status.\n * @returns {StatusInfo}\n */\n transStatusService.getStatusInfo = function(statusKey) {\n return STATUSES[conformStatus(statusKey)];\n };\n\n transStatusService.getId = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].ID;\n };\n\n transStatusService.getServerId = function(statusId) {\n return serverStatusId(statusId);\n };\n\n transStatusService.getName = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].NAME;\n };\n\n transStatusService.getCSSClass = function(statusKey) {\n return STATUSES[conformStatus(statusKey)].CSSCLASS;\n };\n\n /**\n * Conform it to uppercase for lookups and\n * temporary fix for server sending \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function conformStatus(statusKey) {\n statusKey = angular.uppercase(statusKey);\n if (!statusKey || statusKey === 'NEW') {\n statusKey = 'UNTRANSLATED';\n } else if (statusKey === 'NEEDREVIEW') {\n statusKey = 'NEEDSWORK';\n }\n return statusKey;\n }\n\n /**\n * Conform it to PascalCase for lookups and\n * temporary fix for server receiving \"needReview\"\n * instead of needswork status\n * @param {string} status\n * @return {string} new value to use\n */\n function serverStatusId(statusId) {\n statusId = angular.lowercase(statusId);\n if (!statusId || statusId === 'untranslated') {\n return 'New';\n } else if (statusId === 'needswork') {\n return 'NeedReview';\n }\n return statusId.charAt(0).toUpperCase() + statusId.slice(1).toLowerCase();\n }\n\n return transStatusService;\n }\n\n angular\n .module('app')\n .factory('TransStatusService', TransStatusService);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitCtrl.js\n * @ngInject\n */\n function TransUnitCtrl($rootScope, $scope, $element, $stateParams, _,\n TransUnitService, EventService, LocaleService, focus,\n EditorShortcuts, PhraseUtil, SettingsService) {\n\n var transUnitCtrl = this;\n\n transUnitCtrl.selected = false;\n transUnitCtrl.focused = false;\n transUnitCtrl.focusedTranslationIndex = 0;\n\n transUnitCtrl.hasTranslationChanged =\n PhraseUtil.hasTranslationChanged;\n\n transUnitCtrl.focusTranslation = function() {\n if(transUnitCtrl.selected) {\n focus('phrase-' + $scope.phrase.id + '-' +\n transUnitCtrl.focusedTranslationIndex);\n }\n };\n\n // when user clicked on TU or using tab to nav\n transUnitCtrl.onTextAreaFocus = function(phrase, index) {\n transUnitCtrl.focused = true;\n if (!_.isUndefined(index)) {\n transUnitCtrl.focusedTranslationIndex = index;\n }\n if(!transUnitCtrl.selected) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': phrase.id,\n 'updateURL': true,\n 'focus': true\n }, $scope);\n }\n };\n\n transUnitCtrl.translationTextModified = function(phrase) {\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n };\n\n transUnitCtrl.getPhrase = function() {\n return $scope.phrase;\n };\n\n transUnitCtrl.init = function() {\n TransUnitService.addController($scope.phrase.id, transUnitCtrl);\n if($stateParams.id && parseInt($stateParams.id) === $scope.phrase.id) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $stateParams.id,\n 'updateURL': false,\n 'focus' : $stateParams.selected});\n }\n };\n\n transUnitCtrl.copySource = function($event, phrase, sourceIndex) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.COPY_FROM_SOURCE,\n {'phrase': phrase, 'sourceIndex': sourceIndex}, $scope);\n };\n\n transUnitCtrl.undoEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.UNDO_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.cancelEdit = function($event, phrase) {\n $event.stopPropagation(); //prevent click event of TU\n EventService.emitEvent(EventService.EVENT.CANCEL_EDIT,\n phrase, $scope);\n };\n\n transUnitCtrl.saveAs = function($event, phrase, status) {\n EditorShortcuts.saveTranslationCallBack($event, phrase, status);\n };\n\n transUnitCtrl.getLocaleName = function(localeId) {\n return LocaleService.getName(localeId);\n };\n\n transUnitCtrl.toggleSaveAsOptions = function(open) {\n EventService.broadcastEvent( open ? 'openDropdown': 'closeDropdown',\n {}, $scope);\n if (open) {\n // focus on the first dropdown option\n focus($scope.phrase.id + '-saveAsOption-0');\n }\n };\n\n var SHOW_SUGGESTIONS = SettingsService.SETTING.SHOW_SUGGESTIONS;\n $scope.showSuggestions = SettingsService.subscribe(SHOW_SUGGESTIONS,\n function (show) {\n $scope.showSuggestions = show;\n });\n\n $rootScope.$on(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n function(event, data) {\n transUnitCtrl.suggestionsSearchIsActive = data;\n });\n\n transUnitCtrl.toggleSuggestionPanel = function () {\n if (transUnitCtrl.suggestionsSearchIsActive) {\n EventService.emitEvent(EventService.EVENT.SUGGESTIONS_SEARCH_TOGGLE,\n false);\n }\n else {\n SettingsService.update(SHOW_SUGGESTIONS, !$scope.showSuggestions);\n }\n };\n\n $scope.suggestionCount = 0;\n $rootScope.$on(EventService.EVENT.PHRASE_SUGGESTION_COUNT,\n function (event, data) {\n if (data.id === $scope.phrase.id) {\n $scope.suggestionCount = data.count;\n }\n });\n\n transUnitCtrl.cancelSaveAsMode = function() {\n EditorShortcuts.cancelSaveAsModeIfOn();\n };\n\n $scope.$on('$destroy', function () {\n $element.unbind('click', onTransUnitClick);\n $element.unbind('focus', onTransUnitClick);\n });\n\n transUnitCtrl.updateSaveButton = function (phrase) {\n transUnitCtrl.saveButtonStatus =\n PhraseUtil.getSaveButtonStatus($scope.phrase);\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n $scope.phrase);\n transUnitCtrl.saveButtonText = transUnitCtrl.saveButtonStatus.NAME;\n transUnitCtrl.saveButtonDisabled =\n !PhraseUtil.hasTranslationChanged(phrase);\n transUnitCtrl.loadingClass = '';\n transUnitCtrl.savingStatus = '';\n };\n\n transUnitCtrl.phraseSaving = function (data) {\n transUnitCtrl.loadingClass = 'is-loading';\n transUnitCtrl.saveButtonStatus =\n transUnitCtrl.savingStatus = data.status;\n transUnitCtrl.saveButtonOptions =\n TransUnitService.getSaveButtonOptions(transUnitCtrl.saveButtonStatus,\n data.phrase);\n transUnitCtrl.saveButtonText = 'Saving…';\n transUnitCtrl.saveButtonDisabled = true;\n };\n\n transUnitCtrl.saveButtonOptionsAvailable = function() {\n return !_.isEmpty(transUnitCtrl.saveButtonOptions);\n };\n\n transUnitCtrl.selectTransUnit = function(phrase) {\n if (!transUnitCtrl.selected) {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': phrase.id,\n 'updateURL': true,\n 'focus': true\n }, $scope);\n }\n };\n\n function onTransUnitClick() {\n if(!transUnitCtrl.selected) {\n $scope.$apply(function () {\n EventService.emitEvent(EventService.EVENT.SELECT_TRANS_UNIT,\n {'id': $scope.phrase.id,\n 'updateURL': true,\n 'focus': true}, $scope);\n });\n }\n }\n\n return transUnitCtrl;\n }\n\n angular\n .module('app')\n .controller('TransUnitCtrl', TransUnitCtrl);\n})();\n\n","(function () {\n 'use strict';\n\n /**\n * TransUnitService\n *\n * See PhraseService.transformToPhrases function for phrase definition.\n *\n * @ngInject\n */\n function TransUnitService(_, $location, $rootScope, $state, $stateParams,\n $filter, MessageHandler, EventService, TransStatusService, PRODUCTION,\n EditorShortcuts, PhraseUtil, $timeout) {\n var transUnitService = this,\n controllerList = {},\n selectedTUId;\n\n transUnitService.addController = function(id, controller) {\n controllerList[id] = controller;\n };\n\n transUnitService.getSaveButtonOptions = function(saveButtonStatus, phrase) {\n return filterSaveButtonOptions(saveButtonStatus, phrase);\n };\n\n $rootScope.$on(EventService.EVENT.TOGGLE_SAVE_OPTIONS,\n function(event, data) {\n var transUnitCtrl = controllerList[data.id];\n if (transUnitCtrl) {\n transUnitCtrl.toggleSaveAsOptions(data.open);\n }\n });\n\n /**\n * EventService.EVENT.SELECT_TRANS_UNIT listener\n * - Select and focus a trans-unit.\n * - Perform implicit save on previous selected TU if changed\n * - Update url with TU id without reload state\n */\n $rootScope.$on(EventService.EVENT.SELECT_TRANS_UNIT,\n function (event, data) {\n var newTuController = controllerList[data.id],\n oldTUController = controllerList[selectedTUId],\n updateURL = data.updateURL;\n\n EventService.emitEvent(EventService.EVENT.REQUEST_PHRASE_SUGGESTIONS,\n {\n 'phrase' : newTuController.getPhrase()\n });\n\n if(newTuController) {\n EditorShortcuts.selectedTUCtrl = newTuController;\n\n if (selectedTUId && selectedTUId !== data.id) {\n setSelected(oldTUController, false);\n\n //perform implicit save if changed\n if(PhraseUtil.hasTranslationChanged(\n oldTUController.getPhrase())) {\n EventService.emitEvent(EventService.EVENT.SAVE_TRANSLATION,\n {\n 'phrase' : oldTUController.getPhrase(),\n 'status' : TransStatusService.getStatusInfo('TRANSLATED'),\n 'locale' : $stateParams.localeId,\n 'docId' : $stateParams.docId\n });\n }\n }\n\n updateSaveButton(event, newTuController.getPhrase());\n selectedTUId = data.id;\n setSelected(newTuController, true);\n\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION, data);\n\n //Update url without reload state\n if(updateURL) {\n if($state.current.name !== 'editor.selectedContext.tu') {\n $state.go('editor.selectedContext.tu', {\n 'id': data.id,\n 'selected': data.focus.toString()\n });\n } else {\n $location.search('id', data.id);\n $location.search('selected', data.focus.toString());\n }\n }\n } else {\n MessageHandler.displayWarning('Trans-unit not found:' + data.id);\n }\n });\n\n /**\n * EventService.EVENT.COPY_FROM_SOURCE listener\n * Copy translation from source\n */\n $rootScope.$on(EventService.EVENT.COPY_FROM_SOURCE,\n function (event, data) {\n var sourceIndex = 0;\n if(data.phrase.plural) {\n //clicked copy source button\n sourceIndex = data.sourceIndex;\n if(_.isUndefined(sourceIndex)) {\n //copy source key shortcut, copy corresponding source to target\n var transUnitCtrl = controllerList[data.phrase.id];\n sourceIndex = transUnitCtrl.focusedTranslationIndex;\n if(data.phrase.sources.length <\n transUnitCtrl.focusedTranslationIndex + 1) {\n sourceIndex = data.phrase.sources.length - 1;\n }\n }\n }\n setTranslationText(data.phrase, data.phrase.sources[sourceIndex]);\n });\n\n $rootScope.$on(EventService.EVENT.COPY_FROM_SUGGESTION,\n function (event, data) {\n if (selectedTUId) {\n var transUnitCtrl = controllerList[selectedTUId];\n var phrase = transUnitCtrl.getPhrase();\n\n var suggestion = data.suggestion;\n var targets = suggestion.targetContents;\n\n var copyAsPlurals = phrase.plural && targets.length > 1;\n\n\n if (copyAsPlurals) {\n var pluralCount = phrase.translations.length;\n\n if (targets.length < pluralCount) {\n var lastSuggestion = _.last(targets);\n // pad suggestions with last suggestion, but only when there are\n // no translations entered for the extra plural forms.\n targets = _.assign(phrase.translations.slice(), targets,\n function (current, suggested) {\n if (suggested) return suggested;\n if (current) return current;\n return lastSuggestion;\n });\n }\n if (targets.length > pluralCount) {\n targets = _.first(targets, pluralCount);\n }\n\n setAllTranslations(phrase, targets);\n } else {\n setTranslationText(phrase, targets[0]);\n }\n }\n });\n\n /**\n * EventService.EVENT.UNDO_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.UNDO_EDIT,\n function (event, phrase) {\n if (PhraseUtil.hasTranslationChanged(phrase)) {\n setAllTranslations(phrase, phrase.translations);\n }\n });\n\n /**\n * EventService.EVENT.CANCEL_EDIT listener\n * Cancel edit and restore translation\n */\n $rootScope.$on(EventService.EVENT.CANCEL_EDIT,\n function (event, phrase) {\n if(selectedTUId) {\n setSelected(controllerList[selectedTUId], false);\n selectedTUId = false;\n EditorShortcuts.selectedTUCtrl = null;\n }\n\n $location.search('selected', null);\n if(!phrase) {\n $location.search('id', null);\n }\n\n // EditorContentCtrl#changePage doesn't provide a phrase object\n if (phrase) {\n $timeout(function() {\n return $rootScope.$broadcast('blurOn', 'phrase-' + phrase.id);\n });\n }\n });\n\n /**\n * EventService.EVENT.TRANSLATION_TEXT_MODIFIED listener\n *\n */\n $rootScope.$on(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n updateSaveButton);\n\n /**\n * EventService.EVENT.FOCUS_TRANSLATION listener\n *\n */\n $rootScope.$on(EventService.EVENT.FOCUS_TRANSLATION,\n setFocus);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_INITIATED,\n phraseSaving);\n\n /**\n * EventService.EVENT.SAVE_COMPLETED listener\n *\n */\n $rootScope.$on(EventService.EVENT.SAVE_COMPLETED,\n updateSaveButton);\n\n function setTranslationText(phrase, newText) {\n var index = 0;\n if (phrase.plural) {\n var transUnitCtrl = controllerList[phrase.id];\n index = transUnitCtrl.focusedTranslationIndex;\n }\n phrase.newTranslations[index] = newText;\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n phrase);\n }\n\n function setAllTranslations(phrase, newTexts) {\n //need slice() for new instance of array\n phrase.newTranslations = newTexts.slice();\n\n EventService.emitEvent(EventService.EVENT.TRANSLATION_TEXT_MODIFIED,\n phrase);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n phrase);\n }\n\n function updateSaveButton(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.updateSaveButton(phrase);\n }\n\n function phraseSaving(event, data) {\n var transUnitCtrl = controllerList[data.phrase.id];\n transUnitCtrl.phraseSaving(data);\n EventService.emitEvent(EventService.EVENT.FOCUS_TRANSLATION,\n data.phrase);\n }\n\n function setSelected(transUnitCtrl, isSelected) {\n //This check is to prevent selected event being triggered repeatedly.\n if(transUnitCtrl.selected !== isSelected) {\n transUnitCtrl.selected = isSelected || false;\n }\n }\n\n function setFocus(event, phrase) {\n var transUnitCtrl = controllerList[phrase.id];\n transUnitCtrl.focusTranslation();\n }\n\n /**\n * Filters the dropdown options for saving a translation\n * Unless the translation is empty, remove untranslated as an option\n * Filter the current default save state out of the list and show remaining\n *\n * @param {Object} saveStatus The current default translation *save* status\n * @return {Array} Is used to construct the dropdown list\n */\n function filterSaveButtonOptions(saveStatus, phrase) {\n var filteredOptions = [];\n if (saveStatus.ID === 'untranslated') {\n return filteredOptions;\n }\n filteredOptions = $filter('filter')\n (TransStatusService.getAllAsArray(), {ID: '!untranslated'});\n\n if(phrase.plural) {\n if(PhraseUtil.hasNoTranslation(phrase)) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!needswork'});\n } else if(PhraseUtil.hasEmptyTranslation(phrase)) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!translated'});\n }\n }\n\n if (PRODUCTION) {\n filteredOptions = $filter('filter')\n (filteredOptions, {ID: '!approved'});\n }\n\n return $filter('filter')(filteredOptions, {ID: '!'+saveStatus.ID});\n }\n\n return transUnitService;\n }\n\n angular\n .module('app')\n .factory('TransUnitService', TransUnitService);\n})();\n\n\n","(function() {\n 'use strict';\n\n /**\n * @name trans-unit\n * @description transUnit container\n * @ngInject\n */\n function transUnit() {\n return {\n restrict: 'E',\n required: ['phrase', 'editorContext'],\n scope: {\n phrase: '=',\n firstPhrase: '=',\n editorContext: '='\n },\n controller: 'TransUnitCtrl as transUnitCtrl',\n templateUrl: 'components/transUnit/trans-unit.html',\n link: function(scope, element, attr, TransUnitCtrl) {\n TransUnitCtrl.init();\n }\n };\n }\n\n angular\n .module('app')\n .directive('transUnit', transUnit);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * @name trans-unit\n * @description transUnit container\n * @ngInject\n */\n function transUnitFilter() {\n return {\n restrict: 'E',\n required: ['editor'],\n scope: {\n editor: '='\n },\n templateUrl: 'components/transUnitFilter/trans-unit-filter.html'\n };\n }\n\n angular\n .module('app')\n .directive('transUnitFilter', transUnitFilter);\n\n})();\n","(function() {\n 'use strict';\n\n /**\n * UserService.js\n *\n * @ngInject\n */\n function UserService($resource, UrlService) {\n\n function getUserInfo(username) {\n var UserInfo = $resource(UrlService.USER_INFO_URL, {}, {\n query: {\n method: 'GET',\n params: {\n username: username\n }\n }\n });\n return UserInfo.query().$promise;\n }\n\n function getMyInfo() {\n var MyInfo = $resource(UrlService.MY_INFO_URL, {}, {\n query: {\n method: 'GET'\n }\n });\n return MyInfo.query().$promise;\n }\n\n return {\n settings: {\n editor: {\n hideMainNav: false\n }\n },\n getUserInfo: getUserInfo,\n getMyInfo: getMyInfo\n };\n }\n angular\n .module('app')\n .factory('UserService', UserService);\n})();\n","(function() {\n 'use strict';\n\n /**\n * FilterUtil.js\n *\n * @ngInject\n */\n function FilterUtil(StringUtil, _) {\n\n /**\n * Filter in resources on given fields with matched terms\n *\n * @param resources - list of resources\n * @param fields - list of fields to check\n * @param terms - list of term to check\n * @returns {*}\n */\n function filterResources(resources, fields, terms) {\n if(!resources || !fields || !terms) {\n return resources;\n }\n return _.filter(resources, function (resource) {\n return isInclude(resource, fields, terms);\n });\n }\n\n /**\n * Filter out properties starting with $ (added by promise)\n * @param resources\n */\n function cleanResourceMap(resources) {\n var filteredList = {};\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList[id] = (resources[id]);\n });\n return filteredList;\n }\n\n function cleanResourceList(resources) {\n var filteredList = [];\n var ids = Object.keys(resources).filter(function (id) {\n return id.indexOf('$') === -1;\n });\n ids.forEach(function(id) {\n filteredList.push(resources[id]);\n });\n return filteredList;\n }\n\n\n function isInclude(resource, fields, terms) {\n if(!resource || !fields || !terms) {\n return false;\n }\n return _.any(fields, function(field) {\n return _.any(terms, function(term) {\n return StringUtil.equals(resource[field], term, true);\n });\n });\n }\n\n return {\n filterResources : filterResources,\n cleanResourceList:cleanResourceList,\n cleanResourceMap : cleanResourceMap\n };\n }\n angular\n .module('app')\n .factory('FilterUtil', FilterUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * PhraseUtil.js\n *\n * @ngInject\n */\n function PhraseUtil(TransStatusService, _) {\n\n function getSaveButtonStatus(phrase) {\n if (hasNoTranslation(phrase)) {\n return TransStatusService.getStatusInfo('untranslated');\n }\n else if (hasEmptyTranslation(phrase)) {\n return TransStatusService.getStatusInfo('needswork');\n }\n else if (hasTranslationChanged(phrase)) {\n return TransStatusService.getStatusInfo('translated');\n }\n else {\n return phrase.status;\n }\n }\n\n function hasTranslationChanged(phrase) {\n // on Firefox with input method turned on,\n // when hitting tab it seems to turn undefined value into ''\n var allSame = _.every(phrase.translations,\n function(translation, index) {\n return nullToEmpty(translation) ===\n nullToEmpty(phrase.newTranslations[index]);\n });\n return !allSame;\n }\n\n function hasNoTranslation(phrase) {\n return _.isEmpty(_.compact(phrase.newTranslations));\n }\n\n function hasEmptyTranslation(phrase) {\n return _.compact(phrase.newTranslations).length !==\n phrase.newTranslations.length;\n }\n\n function nullToEmpty(value) {\n return value || '';\n }\n\n return {\n getSaveButtonStatus : getSaveButtonStatus,\n hasTranslationChanged : hasTranslationChanged,\n hasNoTranslation : hasNoTranslation,\n hasEmptyTranslation : hasEmptyTranslation\n };\n }\n angular\n .module('app')\n .factory('PhraseUtil', PhraseUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility method for handling $resource.statistic\n *\n * StatisticUtil.js\n * @ngInject\n *\n */\n\n function StatisticUtil() {\n return {\n getWordStatistic: function(statistics) {\n return statistics[0].unit === 'WORD' ? statistics[0] : statistics[1];\n },\n getMsgStatistic: function(statistics) {\n return statistics[0].unit === 'MESSAGE' ? statistics[0] : statistics[1];\n }\n };\n }\n angular\n .module('app')\n .factory('StatisticUtil', StatisticUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * StringUtil\n *\n * @ngInject\n */\n\n function StringUtil() {\n function startsWith(str, prefix, ignoreCase) {\n if (ignoreCase && str && prefix) {\n str = str.toUpperCase();\n prefix = prefix.toUpperCase();\n }\n return str.lastIndexOf(prefix, 0) === 0;\n }\n\n function endsWith(str, suffix, ignoreCase) {\n if (ignoreCase && str && suffix) {\n str = str.toUpperCase();\n suffix = suffix.toUpperCase();\n }\n return str.indexOf(suffix, str.length - suffix.length) !== -1;\n }\n\n function equals(from, to, ignoreCase) {\n if (ignoreCase && from && to) {\n from = from.toUpperCase();\n to = to.toUpperCase();\n }\n return from === to;\n }\n\n return {\n startsWith : startsWith,\n endsWith : endsWith,\n equals : equals\n };\n }\n angular\n .module('app')\n .factory('StringUtil', StringUtil);\n})();\n","(function() {\n 'use strict';\n\n /**\n * Utility to handles URL related request.\n *\n * UrlService.js\n * @ngInject\n */\n function UrlService($location, $http, $q, $stateParams, _) {\n //IE doesn't support location.origin\n if (!location.origin) {\n location.origin =\n window.location.protocol + '//' + window.location.hostname +\n (window.location.port ? (':' + window.location.port) : '');\n }\n\n var urlService = this,\n gravatarBaseUrl = 'http://www.gravatar.com/avatar',\n configFile = 'config.json',\n baseUrl = '',\n urls = {},\n uiTranslationsURL = location.origin + location.pathname +\n 'translations';\n\n urlService.serverContextPath = '';\n\n urlService.init = function () {\n if (baseUrl) {\n return $q.when(baseUrl);\n }\n else {\n /**\n * Temporary solution to handle dynamic context path deployed for\n * Zanata server in JBOSS (/ or /zanata).\n *\n * If config.baseUrl exist and not empty,\n * baseUrl = config.baseUrl\n *\n * ELSE\n * baseUrl = full.url - appPath onwards\n */\n return $http.get(configFile).then(function (response) {\n var config = response.data;\n if (config.baseUrl) {\n baseUrl = config.baseUrl;\n } else {\n var deployPath = config.appPath.replace(/^\\//g, ''),\n index = location.href.indexOf(deployPath);\n\n urlService.serverContextPath = location.origin + location.pathname;\n if(index >= 0) {\n urlService.serverContextPath = location.href.substring(0, index);\n }\n urlService.serverContextPath = urlService.serverContextPath.\n replace(/\\/?$/, '/');\n baseUrl = urlService.serverContextPath + 'rest';\n }\n\n /* jshint -W101 */\n // URLs over multiple lines are hard to read, allowing long lines here.\n // Warnings for jshint are turned off/on with -/+ before the warning code.\n // See: https://github.com/jshint/jshint/blob/2.1.4/src/shared/messages.js\n urls = _.mapValues({\n project: '/project/:projectSlug',\n docs: '/project/:projectSlug/version/:versionSlug/docs',\n locales: '/project/:projectSlug/version/:versionSlug/locales',\n status: '/project/:projectSlug/version/:versionSlug/doc/:docId/status/:localeId',\n textFlows: '/source+trans/:localeId',\n docStats: '/stats/project/:projectSlug/version/:versionSlug/doc/:docId/locale/:localeId',\n myInfo: '/user',\n userInfo: '/user/:username',\n translation: '/trans/:localeId',\n allLocales: '/locales',\n suggestions: '/suggestions'\n }, unary(restUrl));\n /* jshint +W101 */\n\n urlService.PROJECT_URL = urls.project;\n urlService.LOCALE_LIST_URL = urls.locales;\n urlService.DOCUMENT_LIST_URL = urls.docs;\n urlService.TRANSLATION_STATUS_URL = urls.status;\n urlService.TEXT_FLOWS_URL = urls.textFlows;\n urlService.DOC_STATISTIC_URL = urls.docStats;\n urlService.MY_INFO_URL = urls.myInfo;\n urlService.USER_INFO_URL = urls.userInfo;\n urlService.TRANSLATION_URL = urls.translation;\n urlService.ALL_LOCALE_URL = urls.allLocales;\n urlService.SUGGESTIONS_URL = urls.suggestions;\n\n urlService.PROJECT_PAGE = function(projectSlug, versionSlug) {\n return urlService.serverContextPath + 'iteration/view/' +\n projectSlug + '/' + versionSlug;\n };\n\n urlService.DASHBOARD_PAGE = urlService.serverContextPath +\n 'dashboard';\n });\n }\n };\n\n /**\n * Get the value of a query string parameter.\n */\n urlService.readValue = function (key) {\n return $location.search()[key];\n };\n\n urlService.gravatarUrl = function (gravatarHash, size) {\n return gravatarBaseUrl + '/' + gravatarHash +\n '?d=mm&r=g&s=' + size;\n };\n\n urlService.uiTranslationURL = function (locale) {\n return uiTranslationsURL + '/' + locale + '.json';\n };\n\n urlService.uiTranslationListURL = uiTranslationsURL + '/locales';\n\n return urlService;\n\n /**\n * Create a REST URL by appending all the given URL part arguments to the\n * base URL.\n *\n * No separators will be added or removed, so all parts should include\n * leading / and exclude trailing / to avoid problems.\n */\n function restUrl() {\n return baseUrl + Array.prototype.join.call(arguments, '');\n }\n\n /**\n * Decorate a function to ignore all but the first argument.\n */\n function unary(fun) {\n return function(arg) {\n return fun(arg);\n };\n }\n }\n\n angular\n .module('app')\n .factory('UrlService', UrlService);\n})();\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/zanata-war/src/main/webapp/app/maps/libs.js.map b/zanata-war/src/main/webapp/app/maps/libs.js.map index f4fba3f2a8..0f57a98ac3 100644 --- a/zanata-war/src/main/webapp/app/maps/libs.js.map +++ b/zanata-war/src/main/webapp/app/maps/libs.js.map @@ -1 +1 @@ -{"version":3,"sources":["angular/angular.js","angular-animate/angular-animate.js","angular-elastic/elastic.js","angular-resource/angular-resource.js","highlightjs/highlight.pack.js","modernizr/modernizr-custom.js","mousetrap/mousetrap.js","ng-focus-on/ng-focus-on.js","angular-gettext/dist/angular-gettext.js","angular-hotkeys/src/hotkeys.js","angular-ui-router/release/angular-ui-router.js","lodash/dist/lodash.compat.js","underscore.string/lib/underscore.string.js"],"names":[],"mappings":"AAAA;CACC;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;EACA;IACE;MACE;MACA;MACA;MACA;QACE;UACE;QACF;UACE;QACF;UACE;QACF;QACA;MACF;MACA;;IAEF;MACE;;MAEA;QACE;QACA;UACE;QACF;UACE;QACF;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;IACF;MACE;QACE;IACJ;IACA;EACF;AACF;;AAEA;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;EACE;EACA;MACI;MACA;AACN;AACA;EACE;EACA;MACI;MACA;AACN;;;AAGA;AACA;AACA;AACA;EACE;EACA;AACF;;;AAGA;IACI;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;AAEJ;CACC;CACA;CACA;AACD;AACA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;SACO;AACT;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;KACA;KACA;OACE;KACF;KACA;GACF;CACF;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;EACA;IACE;MACE;QACE;QACA;QACA;UACE;QACF;MACF;IACF;MACE;MACA;QACE;UACE;QACF;MACF;IACF;QACI;IACJ;MACE;QACE;UACE;QACF;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;MACE;MACA;QACE;QACA;MACF;IACF;EACF;;EAEA;EACA;AACF;;AAEA;EACE;AACF;;;AAGA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;KACF;GACF;CACF;AACD;AACA;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;KACF;GACF;CACF;AACD;AACA;;;AAGA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;AACJ;;AAEA;CACC;CACA;CACA;AACD;EACE;EACA;IACE;EACF;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;IACE;MACE;QACE;EACN;;EAEA;AACF;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;IACE;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;IACA;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;EACC;IACE;MACE;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;IACF;CACH;CACA;CACA;CACA;AACD;EACE;IACE;MACE;EACJ;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;MACF;QACE;QACA;MACF;QACE;QACA;MACF;IACF;EACF;IACE;MACE;;IAEF;IACA;;IAEA;MACE;MACA;;MAEA;MACA;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;QACA;MACF;IACF;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;MACA;QACE;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;MACA;IACF;;EAEF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;;IAEA;MACE;IACF;EACF;IACE;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;IACE;MACE;QACE;QACA;UACE;YACE;UACF;UACA;QACF;MACF;QACE;QACA;MACF;QACE;MACF;QACE;QACA;QACA;UACE;UACA;UACA;QACF;QACA;UACE;cACI;cACA;cACA;QACN;QACA;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;;EAEA;kBACgB;;EAEhB;IACE;MACE;MACA;MACA;IACF;MACE;IACF;EACF;;EAEA;AACF;;;;AAIA;EACE;AACF;;AAEA;EACE;AACF;;;AAGA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;EACA;IACE;MACE;UACI;YACE;YACA;QACJ;MACF;UACI;YACE;YACA;QACJ;EACN;IACE;IACA;EACF;AACF;;;AAGA;EACE;;EAEA;IACE;EACF;IACE;EACF;IACE;EACF;IACE;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;AACN;;;AAGA;CACC;CACA;AACD;EACE;EACA;IACE;IACA;IACA;EACF;EACA;EACA;EACA;EACA;IACE;QACI;UACE;UACA;EACR;IACE;EACF;;AAEF;;;AAGA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;AACD;EACE;EACA;IACE;MACE;MACA;MACA;QACE;QACA;UACE;QACF;UACE;QACF;UACE;QACF;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;QACE;mBACW;MACb;IACF;IACA;eACW;IACX;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;aACW;aACA;aACA;AACb;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;aACW;aACA;aACA;aACA;aACA;aACA;AACb;;AAEA;;AAEA;EACE;EACA;EACA;IACE;IACA;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;GACA;KACE;GACF;GACA;GACA;GACA;KACE;KACA;GACF;GACA;CACF;CACA;CACA;CACA;CACA;GACE;GACA;OACI;WACI;;WAEA;cACG;cACA;WACH;OACJ;;OAEA;WACI;WACA;;WAEA;cACG;cACA;WACH;OACJ;;OAEA;WACI;;WAEA;cACG;cACA;cACA;WACH;OACJ;GACJ;GACA;GACA;GACA;KACE;KACA;KACA;OACE;OACA;KACF;KACA;KACA;KACA;OACE;OACA;KACF;KACA;KACA;OACE;KACF;KACA;GACF;GACA;GACA;OACI;OACA;OACA;OACA;OACA;GACJ;GACA;OACI;OACA;OACA;GACJ;GACA;OACI;OACA;OACA;OACA;GACJ;GACA;CACF;CACA;AACD;EACE;MACI;MACA;;EAEJ;EACA;IACE;;IAEA;MACE;MACA;IACF;EACF;EACA;IACE;IACA;;IAEA;MACE;MACA;IACF;EACF;EACA;IACE;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;IACE;EACF;EACA;EACA;IACE;;IAEA;MACE;MACA;MACA;UACI;UACA;UACA;IACN;;IAEA;IACA;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;IACA;IACA;OACG;QACC;UACE;UACA;QACF;MACF;IACF;IACA;EACF;;EAEA;EACA;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;EACA;IACE;MACE;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;AACA;EACE;EACA;IACE;EACF;AACF;;AAEA;AACA;AACA;EACE;;EAEA;IACE;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;UACE;UACA;YACE;UACF;QACF;MACF;QACE;MACF;MACA;IACF;EACF;IACE;EACF;;EAEA;;EAEA;EACA;AACF;;AAEA;CACC;CACA;AACD;EACE;IACE;EACF;EACA;AACF;;AAEA;EACE;MACI;EACJ;;EAEA;MACI;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;MACE;IACF;EACF;EACA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;IACA;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;EACA;;EAEA;IACE;EACF;;EAEA;;EAEA;EACA;;EAEA;IACE;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;QACF;MACF;;MAEA;MACA;QACE;MACF;MACA;QACE;UACE;aACG;aACA;QACL;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;;QAEA;QACA;UACE;UACA;UACA;UACA;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;;UAGA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;UACE;UACA;YACE;YACA;UACF;QACF;MACF;IACF;EACF;;AAEF;;AAEA;EACE;;EAEA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;AACF;;;AAGA;EACE;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;EACF;IACE;EACF;;EAEA;IACE;MACE;MACA;QACE;MACF;MACA;QACE;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;QACA;UACE;QACF;QACA;QACA;MACF;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;IACI;IACA;MACE;IACF;IACA;MACE;IACF;;AAEJ;CACC;CACA;AACD;EACE;EACA;AACF;;AAEA;;;AAGA;AACA;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;IACE;MACE;IACF;IACA;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;EACE;;EAEA;EACA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;EACA;EACA;AACF;;AAEA;EACE;MACI;MACA;;EAEJ;IACE;IACA;EACF;IACE;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;IACF;;IAEA;;IAEA;IACA;EACF;;EAEA;EACA;EACA;EACA;IACE;EACF;;EAEA;AACF;;AAEA;EACE;EACA;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;AACF;;AAEA;AACA;EACE;IACE;EACF;;EAEA;;EAEA;IACE;IACA;EACF;EACA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;EACF;IACE;EACF;AACF;;AAEA;EACE;AACF;;AAEA;EACE;;EAEA;IACE;IACA;MACE;IACF;EACF;AACF;;AAEA;EACE;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;MACE;QACE;MACF;MACA;IACF;EACF;IACE;MACE;QACE;QACA;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;;EAEA;IACE;MACE;MACA;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;IACA;IACA;EACF;AACF;;;AAGA;EACE;MACI;;EAEJ;IACE;IACA;EACF;;EAEA;AACF;;;AAGA;EACE;;IAEE;IACA;IACA;IACA;IACA;;IAEA;MACE;IACF;MACE;QACE;MACF;QACE;UACE;UACA;QACF;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;MACI;AACN;;AAEA;EACE;IACE;MACE;UACI;UACA;UACA;MACJ;IACF;EACF;AACF;;AAEA;EACE;IACE;4BACwB;;IAExB;MACE;MACA;QACE;MACF;IACF;;IAEA;EACF;AACF;;;AAGA;EACE;;EAEA;;IAEE;IACA;MACE;IACF;MACE;;MAEA;MACA;QACE;UACE;YACE;UACF;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;AACF;;AAEA;EACE;EACA;EACA;IACE;EACF;EACA;;EAEA;IACE;MACE;IACF;;IAEA;IACA;IACA;IACA;EACF;AACF;;AAEA;EACE;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;EACE;IACE;;IAEA;MACE;MACA;MACA;IACF;;IAEA;IACA;MACE;IACF;MACE;MACA;MACA;MACA;MACA;MACA;IACF;EACF;EACA;IACE;IACA;IACA;EACF;;EAEA;MACI;EACJ;;EAEA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;EACE;AACF;AACA;AACA;EACE;AACF;AACA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;;EAEA;EACA;AACF;;AAEA;EACE;EACA;AACF;;AAEA;EACE;EACA;AACF;EACE;AACF;;AAEA;EACE;EACA;;EAEA;IACE;IACA;EACF;;EAEA;IACE;IACA;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;;EAEA;IACE;;IAEA;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;UACE;UACA;QACF;MACF;QACE;iBACS;eACF;eACA;MACT;IACF;MACE;IACF;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;EACF;;EAEA;IACE;MACE;QACE;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;IACA;EACF;;EAEA;AACF;EACE;GACC;GACA;EACD;IACE;IACA;;IAEA;IACA;IACA;IACA;QACI;MACF;;QAEE;QACA;UACE;YACE;YACA;UACF;YACE;cACE;YACF;UACF;QACF;QACA;QACA;MACF;QACE;QACA;QACA;QACA;QACA;QACA;UACE;UACA;QACF;QACA;MACF;IACF;MACE;MACA;QACE;MACF;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;MACE;IACF;;IAEA;IACA;;IAEA;;IAEA;MACE;MACA;QACE;;QAEA;UACE;QACF;;QAEA;UACE;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;EACE;;EAEA;IACE;;IAEA;IACA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;MACE;MACA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;;UAEA;YACE;YACA;YACA;YACA;cACE;YACF;UACF;;QAEF;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;EACF;;EAEA;;EAEA;IACE;;IAEA;IACA;IACA;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;QACE;MACF;QACE;MACF;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;IACJ;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;;IAEA;;IAEA;MACE;MACA;IACF;EACF;;EAEA;IACE;MACE;MACA;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;IACE;IACA;;IAEA;MACE;MACA;MACA;IACF;EACF;;EAEA;EACA;;EAEA;IACE;MACE;QACE;QACA;UACE;QACF;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;MACE;IACF;MACE;IACF;EACF;;EAEA;;EAEA;;IAEE;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;QACE;UACE;QACF;MACF;IACF;EACF;AACF;EACE;GACC;GACA;EACD;IACE;;IAEA;MACE;QACE;QACA;UACE;UACA;QACF;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;EACA;IACE;EACF;IACE;EACF;;EAEA;AACF;;AAEA;CACC;CACA;AACD;EACE;IACE;IACA;MACE;IACF;EACF;EACA;AACF;AACA;EACE;GACC;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;;AAED;AACA;AACA;AACA;AACA;;AAEA;EACE;EACA;EACA;MACI;EACJ;IACE;EACF;EACA;AACF;;AAEA;EACE;MACI;MACA;MACA;;EAEJ;IACE;MACE;MACA;QACE;UACE;YACE;UACF;UACA;YACE;QACJ;QACA;QACA;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;EACF;IACE;IACA;IACA;EACF;IACE;EACF;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;;AAKD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;wBACuB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;EACE;EACA;MACI;MACA;MACA;MACA;QACE;YACI;YACA;YACA;YACA;YACA;YACA;UACF;MACJ;MACA;UACI;YACE;UACF;MACJ;MACA;UACI;YACE;YACA;UACF;;;EAGR;;EAEA;;EAEA;EACA;EACA;;EAEA;IACE;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;IACF;IACA;MACE;IACF;IACA;EACF;;EAEA;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;IACA;EACF;;EAEA;IACE;QACI;;IAEJ;MACE;MACA;IACF;EACF;;EAEA;EACA;EACA;EACA;IACE;IACA;MACE;MACA;;MAEA;QACE;QACA;UACE;cACI;;UAEJ;QACF;MACF;;MAEA;QACE;UACE;UACA;UACA;UACA;QACF;YACI;QACJ;YACI;QACJ;UACE;QACF;MACF;QACE;UACE;QACF;QACA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;QACA;kBACU;MACZ;IACF;IACA;EACF;;EAEA;EACA;EACA;;EAEA;;IAEE;MACE;QACE;UACE;oBACU;QACZ;QACA;MACF;QACE;UACE;UACA;UACA;QACF;UACE;YACE;UACF;UACA;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;QACA;MACF;;MAEA;UACI;UACA;UACA;;MAEJ;QACE;QACA;UACE;kBACQ;QACV;QACA;UACE;UACA;UACA;QACF;MACF;MACA;QACE;MACF;;MAEA;MACA;MACA;IACF;;IAEA;MACE;UACI;;MAEJ;MACA;MACA;MACA;MACA;;MAEA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;aACE;eACE;eACA;eACA;;eAEA;eACA;aACF;WACF;KACN;KACA;OACE;SACE;SACA;OACF;;OAEA;SACE;SACA;OACF;KACF;GACF;CACF;AACD;;EAEE;;EAEA;IACE;EACF;;EAEA;IACE;;IAEA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;MACF;MACA;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;;MAEA;MACA;IACF;;IAEA;IACA;IACA;MACE;QACE;UACE;QACF;IACJ;;IAEA;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;EAGE;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;KACA;KACA;KACA;KACA;KACA;KACA;KACA;GACF;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;QACI;IACJ;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;EAEA;;IAEE;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;cACM;QACN;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;wBACgB;wBACA;QAChB;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;wBACgB;wBACA;QAChB;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;MACF;;MAEA;MACA;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;MACA;QACE;MACF;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;MACA;MACA;MACA;MACA;;EAEJ;;EAEA;EACA;;EAEA;EACA;EACA;;EAEA;GACC;GACA;GACA;EACD;IACE;MACE;IACF;MACE;MACA;QACE;UACE;YACE;UACF;YACE;UACF;QACF;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;;IAEA;MACE;IACF;MACE;IACF;EACF;;EAEA;EACA;EACA;EACA;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;EACF;;EAEA;EACA;EACA;;EAEA;MACI;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;;IAEA;IACA;MACE;MACA;MACA;QACE;QACA;UACE;UACA;UACA;QACF;MACF;QACE;QACA;UACE;QACF;UACE;QACF;MACF;MACA;IACF;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;MACI;;EAEJ;IACE;IACA;;IAEA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;;MAEA;IACF;;IAEA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;EACD;;EAEA;EACA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;MACE;QACE;gCACwB;MAC1B;QACE;UACE;gCACsB;;UAEtB;UACA;UACA;UACA;UACA;YACE;cACE;cACA;UACJ;QACF;MACF;IACF;MACE;QACE;QACA;QACA;;QAEA;UACE;UACA;UACA;YACE;YACA;YACA;YACA;YACA;cACE;YACF;UACF;QACF;MACF;MACA;IACF;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;MACA;IACF;IACA;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;IACF;IACA;EACF;;AAEF;;AAEA;EACE;MACI;QACE;MACF;AACN;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;SACA;;SAEA;SACA;WACE;WACA;WACA;SACF;;SAEA;SACA;WACE;WACA;WACA;SACF;OACF;KACF;KACA;OACE;SACE;WACE;WACA;WACA;aACE;eACE;aACF;aACA;WACF;SACF;KACJ;KACA;OACE;SACE;OACF;KACF;GACF;CACF;AACD;;EAEE;IACE;;IAEA;MACE;QACE;MACF;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;;MAEJ;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;UACF;;UAEA;UACA;UACA;;UAEA;YACE;UACF;;UAEA;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;;YAEA;UACF;;UAEA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;YACE;;YAEA;;YAEA;YACA;YACA;;YAEA;UACF;;UAEA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;UACA;QACF;;;QAGA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;UACE;YACE;UACF;YACE;UACF;;UAEA;UACA;UACA;UACA;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;UACE;UACA;QACF;MACF;IACF;;;EAGF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;MACE;MACA;QACE;MACF;MACA;IACF;;;EAGF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;MACE;IACF;;;IAGA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;IACC;MACE;QACE;QACA;QACA;UACE;UACA;YACE;cACE;iBACG;gBACD;cACF;cACA;gBACE;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;gBACA;cACF;YACF;UACF;QACF;MACF;MACA;QACE;QACA;MACF;IACF;IACA;MACE;MACA;MACA;IACF;GACD;GACA;KACE;OACE;OACA;OACA;OACA;OACA;OACA;OACA;KACF;GACF;CACF;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;AACA;EACE;MACI;MACA;MACA;MACA;;EAEJ;EACA;EACA;EACA;;EAEA;IACE;;IAEA;;IAEA;MACE;;MAEA;QACE;YACI;YACA;YACA;MACN;;MAEA;QACE;QACA;QACA;MACF;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;IACC;IACA;MACE;MACA;QACE;QACA;UACE;YACE;YACA;cACE;gBACE;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;gBACE;cACF;YACF;YACA;UACF;MACJ;MACA;IACF;MACE;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;YACU;YACA;IACR;aACS;;IAET;MACE;QACE;QACA;;QAEA;UACE;UACA;QACF;MACF;QACE;MACF;;MAEA;IACF;;IAEA;MACE;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;QACF;;QAEA;QACA;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;YACI;YACA;YACA;YACA;YACA;;QAEJ;UACE;UACA;QACF;UACE;UACA;QACF;;QAEA;;QAEA;QACA;UACE;QACF;UACE;UACA;YACE;UACF;QACF;;QAEA;;QAEA;QACA;YACI;UACF;QACF;;QAEA;UACE;YACE;UACF;YACE;UACF;QACF;;QAEA;QACA;QACA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;gBACS;OACT;OACA;OACA;MACD;QACE;YACI;YACA;;QAEJ;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;MACF;IACF;;;IAGA;MACE;QACE;MACF;QACE;QACA;MACF;IACF;;;IAGA;QACI;QACA;YACI;YACA;cACE;QACN;QACA;;IAEJ;MACE;;MAEA;QACE;MACF;QACE;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;;IAEA;wBACoB;MAClB;QACE;QACA;QACA;MACF;MACA;MACA;MACA;QACE;UACE;QACF;MACF;MACA;cACQ;2BACa;MACrB;MACA;MACA;MACA;MACA;QACE;QACA;UACE;QACF;QACA;UACE;YACE;UACF;QACF;QACA;QACA;QACA;;QAEA;QACA;QACA;UACE;UACA;;QAEF;UACE;YACE;UACF;QACF;;QAEA;;QAEA;QACA;QACA;MACF;IACF;;IAEA;MACE;MACA;MACA;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;4BACwB;MACtB;UACI;;MAEJ;QACE;;QAEA;QACA;wCACgC;;QAEhC;YACI;sCAC0B;YAC1B;;QAEJ;UACE;QACF;;QAEA;sBACc;sBACA;YACV;YACA;iBACK;kBACC;qBACG;;QAEb;UACE;UACA;UACA;QACF;;QAEA;QACA;MACF;;MAEA;MACA;;MAEA;QACE;QACA;;;QAGA;UACE;UACA;UACA;UACA;;UAEA;UACA;YACE;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;UACA;UACA;;UAEA;YACE;cACE;cACA;YACF;cACE;YACF;;YAEA;cACE;kBACI;kBACA;;YAEN;cACE;;YAEF;cACE;;YAEF;cACE;YACF;;YAEA;;UAEF;YACE;UACF;QACF;MACF;IACF;;IAEA;;MAEE;QACE;;QAEA;UACE;UACA;UACA;QACF;;QAEA;QACA;UACE;QACF;QACA;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;UACA;cACI;;UAEJ;UACA;mBACS;YACP;YACA;;YAEA;YACA;cACE;cACA;;cAEA;cACA;cACA;gBACE;cACF;;cAEA;cACA;gBACE;kBACE;kBACA;kBACA;gBACF;cACF;;cAEA;cACA;cACA;kBACI;kBACA;oBACE;kBACF;cACJ;cACA;cACA;4BACc;YAChB;UACF;;UAEA;UACA;UACA;YACE;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;UACA;QACF;UACE;UACA;QACF;UACE;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;UACF;YACE;YACA;YACA;UACF;UACA;MACJ;;MAEA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;UACE;YACE;sBACU;sBACA;UACZ;UACA;YACE;YACA;UACF;UACA;UACA;QACF;MACF;QACE;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;mCAC+B;mCACA;MAC7B;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;MACA;QACE;QACA;QACA;;QAEA;QACA;UACE;QACF;QACA;;QAEA;UACE;QACF;;QAEA;;UAEE;UACA;UACA;YACE;cACE;cACA;cACA;gCACkB;cAClB;YACF;cACE;cACA;cACA;gCACkB;YACpB;UACF;;UAEA;QACF;;QAEA;;QAEA;UACE;UACA;UACA;cACI;UACJ;QACF;;QAEA;UACE;;UAEA;UACA;UACA;UACA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;gBACI;8CAC8B;YAClC;YACA;;YAEA;wCAC4B;0CACE;0CACA;0CACA;0CACA;0CACA;0CACA;0CACA;0CACA;wCACF;UAC9B;YACE;YACA;YACA;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;cACI;cACA;;UAEJ;;UAEA;YACE;YACA;cACE;YACF;cACE;YACF;YACA;;YAEA;cACE;kBACI;kBACA;YACN;;YAEA;;YAEA;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;;YAEA;cACE;YACF;YACA;YACA;;YAEA;UACF;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;YACE;UACF;;UAEA;cACI;gBACE;gBACA;gBACA;gBACA;cACF;UACJ;QACF;UACE;YACE;YACA;cACE;YACF;cACE;YACF;UACF;YACE;UACF;QACF;;QAEA;UACE;UACA;QACF;;MAEF;;MAEA;MACA;MACA;MACA;MACA;;MAEA;;MAEA;MACA;;MAEA;;MAEA;QACE;UACE;UACA;UACA;UACA;YACE;UACF;UACA;QACF;QACA;UACE;UACA;UACA;UACA;YACE;UACF;UACA;QACF;MACF;;;MAGA;QACE;QACA;UACE;YACE;YACA;cACE;YACF;YACA;UACF;UACA;;UAEA;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;gBACI;gBACA;UACN;UACA;QACF;UACE;UACA;YACE;UACF;QACF;QACA;MACF;;;MAGA;QACE;YACI;;QAEJ;UACE;UACA;QACF;UACE;UACA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;UACE;UACA;UACA;UACA;YACE;cACE;cACA;cACA;cACA;YACF;;YAEA;YACA;cACE;YACF;;YAEA;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;cACE;YACF;;YAEA;UACF;QACF;;QAEA;UACE;;UAEA;cACI;UACJ;;UAEA;UACA;UACA;cACI;YACF;UACF;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;;cAEE;gBACE;kBACE;gBACF;gBACA;gBACA;kBACE;kBACA;kBACA;gBACF;gBACA;;cAEF;gBACE;kBACE;gBACF;gBACA;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;kBACE;kBACA;kBACA;sBACI;sBACA;gBACN;gBACA;gBACA;kBACE;oBACE;oBACA;sBACE;sBACA;oBACF;sBACE;sBACA;oBACF;kBACF;kBACA;gBACF;gBACA;gBACA;gBACA;gBACA;;cAEF;gBACE;gBACA;kBACE;gBACF;gBACA;YACJ;UACF;QACF;QACA;UACE;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;cACI;cACA;cACA;cACA;cACA;UACJ;QACF;;QAEA;QACA;QACA;QACA;QACA;UACE;QACF;QACA;;QAEA;QACA;UACE;UACA;cACI;cACA;cACA;cACA;cACA;UACJ;QACF;;QAEA;QACA;QACA;UACE;;UAEA;UACA;YACE;YACA;YACA;UACF;;UAEA;YACE;UACF;UACA;YACE;UACF;UACA;QACF;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;0BACsB;MACpB;MACA;MACA;QACE;YACI;UACF;YACE;YACA;iBACK;cACH;gBACE;cACF;cACA;cACA;YACF;UACF;QACF;MACF;MACA;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;UACF;UACA;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;UACE;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;QACE;UACE;UACA;QACF;UACE;UACA;UACA;UACA;UACA;QACF;UACE;UACA;QACF;MACF;IACF;;;IAGA;QACI;MACF;UACI;UACA;UACA;UACA;UACA;UACA;YACE;UACF;UACA;cACI;cACA;UACJ;;MAEJ;;MAEA;QACE;UACE;;UAEA;;UAEA;YACE;cACE;YACF;cACE;YACF;YACA;;YAEA;cACE;kBACI;kBACA;YACN;;YAEA;YACA;YACA;;YAEA;cACE;YACF;YACA;YACA;UACF;YACE;YACA;UACF;;UAEA;;UAEA;cACI;cACA;UACJ;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;cACE;;cAEA;kBACI;gBACF;gBACA;cACF;cACA;;cAEA;cACA;YACF;YACA;cACE;YACF;cACE;YACF;YACA;cACE;UACJ;UACA;QACF;;MAEF;QACE;QACA;UACE;UACA;UACA;UACA;QACF;UACE;YACE;UACF;UACA;QACF;MACF;IACF;;;IAGA;KACC;KACA;IACD;MACE;MACA;MACA;MACA;IACF;;;IAGA;MACE;QACE;YACI;MACN;IACF;;;IAGA;MACE;MACA;QACE;UACE;UACA;YACE;gBACI;;YAEJ;YACA;YACA;;YAEA;cACE;cACA;cACA;cACA;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;;;IAGA;MACE;MACA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;MACF;IACF;;;IAGA;MACE;QACE;MACF;MACA;MACA;MACA;UACI;UACA;4BACkB;QACpB;MACF;IACF;;;IAGA;MACE;;MAEA;MACA;;;MAGA;QACE;YACI;YACA;MACN;;MAEA;QACE;QACA;YACI;cACE;gBACE;;gBAEA;kBACE;sBACI;0BACI;gBACV;;gBAEA;gBACA;gBACA;oBACI;;gBAEJ;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;;gBAEA;gBACA;kBACE;oBACE;oBACA;oBACA;oBACA;oBACA;oBACA;oBACA;sBACE;oBACF;sBACE;oBACF;kBACF;cACJ;YACF;UACF;MACJ;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;YACE;YACA;qBACS;iBACJ;cACH;gBACE;cACF;gBACE;cACF;YACF;YACA;;YAEA;YACA;YACA;YACA;cACE;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;MACF;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;QACA;MACF;;MAEA;MACA;IACF;;;IAGA;MACE;IACF;;;IAGA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;;AAID;CACC;CACA;;AAED;EACE;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;MACI;MACA;;EAEJ;EACA;IACE;IACA;MACE;IACF;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;;;EAGJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;EACD;IACE;EACF;;;EAGA;;IAEE;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACE;MACF;;MAEA;QACE;QACA;QACA;QACA;YACI;YACA;gBACI;;QAER;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;QACF;UACE;UACA;QACF;MACF;;MAEA;;MAEA;QACE;MACF;;MAEA;IACF;;IAEA;MACE;QACE;UACE;UACA;MACJ;;MAEA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;WACA;SACF;KACJ;GACF;CACF;AACD;EACE;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;EAEA;IACE;IACA;IACA;;IAEA;MACE;IACF;EACF;;EAEA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;;IAEA;MACE;IACF;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;;EAEF;IACE;EACF;;EAEA;AACF;;;AAGA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;MACA;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;QACE;QACA;QACA;UACE;MACJ;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;IACA;EACF;;EAEA;EACA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;EACD;;EAEA;MACI;;IAEF;;IAEA;KACC;KACA;KACA;KACA;IACD;;IAEA;MACE;UACI;IACN;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;AACL;AACA;EACE;IACE;MACE;MACA;IACF;IACA;IACA;IACA;IACA;MACE;oBACc;MACd;IACF;IACA;MACE;QACE;MACF;IACF;IACA;EACF;AACF;AACA;EACE;IACE;MACE;QACE;QACA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;YACA;cACE;cACA;UACJ;QACF;;QAEA;UACE;UACA;QACF;MACF;AACN;AACA;EACE;AACF;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;EAEA;IACE;IACA;IACA;IACA;EACF;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;EAEE;MACI;IACF;IACA;IACA;IACA;EACF;AACF;AACA;KACK;IACD;MACE;QACE;QACA;QACA;MACF;MACA;;MAEA;MACA;MACA;;MAEA;QACE;QACA;;QAEA;QACA;UACE;YACE;gBACI;YACJ;UACF;QACF;;QAEA;UACE;QACF;;QAEA;QACA;MACF;;MAEA;MACA;;MAEA;MACA;QACE;UACE;QACF;QACA;UACE;QACF;MACF;;MAEA;QACE;QACA;;QAEA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;;MAEA;;MAEA;QACE;QACA;UACE;QACF;QACA;UACE;UACA;MACJ;;MAEA;QACE;YACI;YACA;;QAEJ;;QAEA;QACA;QACA;UACE;;UAEA;YACE;cACE;YACF;UACF;;UAEA;QACF;;QAEA;QACA;QACA;;QAEA;UACE;;UAEA;YACE;cACE;cACA;gBACE;cACF;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;KAEA;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;;QAEI;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;IACL;;;IAGA;;;IAGA;MACE;QACE;UACE;YACE;YACA;UACF;QACF;MACF;IACF;;;IAGA;MACE;QACE;UACE;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;MACA;;;MAGA;UACI;QACF;cACM;cACA;MACR;;MAEA;QACE;QACA;UACE;YACE;YACA;YACA;UACF;YACE;YACA;cACE;YACF;cACE;YACF;UACF;QACF;UACE;UACA;QACF;MACF;;;MAGA;MACA;MACA;QACE;YACI;YACA;QACJ;UACE;QACF;;QAEA;YACI;MACN;;MAEA;;;MAGA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;UACE;YACE;UACF;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;UACE;UACA;QACF;MACF;;;MAGA;OACC;OACA;MACD;QACE;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;MACF;;;MAGA;QACE;QACA;MACF;IACF;;;IAGA;MACE;MACA;MACA;QACE;QACA;;QAEA;UACE;YACE;cACE;YACF;cACE;YACF;UACF;UACA;qBACW;QACb;MACF;MACA;QACE;MACF;MACA;IACF;EACF;AACF;;AAEA;IACI;IACA;IACA;IACA;MACE;MACA;IACF;MACE;IACF;;IAEA;AACJ;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;AAEA;EACE;;EAEA;EACA;IACE;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;MACF;;MAEA;UACI;QACF;QACA;MACF;IACF;;MAEE;;MAEA;MACA;QACE;YACI;QACJ;MACF;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;cACI;cACA;;UAEJ;YACE;;YAEA;YACA;YACA;UACF;;UAEA;UACA;UACA;YACE;UACF;;UAEA;cACI;cACA;cACA;cACA;QACN;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;QACF;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;UACF;QACF;MACF;;MAEA;IACF;;IAEA;MACE;IACF;MACE;IACF;;;IAGA;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;;MAEA;MACA;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;QACE;UACE;QACF;QACA;QACA;MACF;;MAEA;QACE;MACF;IACF;;IAEA;IACA;IACA;IACA;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;AACA;EACE;;EAEA;IACE;IACA;EACF;;;EAGA;MACI;EACJ;AACF;AACA;IACI;AACJ;AACA;AACA;EACE;IACE;EACF;AACF;AACA;CACC;AACD;EACE;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;;EAGA;IACE;QACI;QACA;QACA;;IAEJ;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;aACK;UACH;YACE;UACF;UACA;UACA;UACA;UACA;UACA;UACA;QACF;UACE;UACA;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;UACI;cACI;cACA;cACA;MACR;;MAEA;QACE;UACE;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;YACE;YACA;QACJ;;QAEA;UACE;YACE;UACF;UACA;YACE;cACE;YACF;YACA;cACE;cACA;YACF;YACA;cACE;YACF;UACF;;UAEA;QACF;;QAEA;YACI;YACA;YACA;;YAEA;cACE;gBACE;cACF;;cAEA;YACF;cACE;kBACI;cACJ;YACF;;UAEF;UACA;UACA;UACA;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;QACF;MACF;;MAEA;QACE;UACE;MACJ;;MAEA;QACE;UACE;QACF;UACE;YACE;UACF;QACF;MACF;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;EACF;AACF;;AAEA;EACE;OACK;IACH;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;;MAEA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;QACF;;QAEA;;MAEF;;MAEA;;MAEA;IACF;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;QACA;MACF;MACA;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;;MAEA;QACE;QACA;QACA;UACE;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;QACF;QACA;MACF;;MAEA;QACE;YACI;YACA;QACJ;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;IACF;EACF;AACF;;AAEA;IACI;AACJ;;;AAGA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;;EAEJ;IACE;EACF;;EAEA;AACF;;AAEA;EACE;;EAEA;EACA;EACA;AACF;;;AAGA;EACE;EACA;IACE;EACF;EACA;EACA;MACI;EACJ;EACA;;EAEA;EACA;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;AACF;;;AAGA;EACE;EACA;AACF;;;AAGA;EACE;AACF;;AAEA;AACA;EACE;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;;;EAGA;GACC;GACA;GACA;GACA;EACD;IACE;IACA;MACE;UACI;IACN;;IAEA;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;QACI;;IAEJ;IACA;EACF;;EAEA;IACE;MACE;MACA;MACA;MACA;IACF;IACA;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;IACF;MACE;IACF;MACE;IACF;IACA;MACE;IACF;IACA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;;EAGA;GACC;GACA;GACA;GACA;EACD;IACE;IACA;QACI;QACA;UACE;UACA;;IAEN;MACE;UACI;IACN;IACA;;IAEA;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;;MAEA;;MAEA;MACA;QACE;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;EACD;IACE;QACI;;IAEJ;IACA;EACF;;EAEA;IACE;MACE;MACA;IACF;IACA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;;EAEA;;EAEA;IACE;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;;IAEA;MACE;IACF;MACE;IACF;MACE;IACF;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;QACI;;IAEJ;IACA;IACA;EACF;;AAEF;;;AAGA;EACE;EACA;;EAEA;GACC;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;;IAEF;IACA;IACA;IACA;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;QACE;MACF;QACE;UACE;UACA;QACF;UACE;UACA;YACE;UACF;;UAEA;QACF;UACE;cACI;QACN;QACA;MACF;QACE;UACE;QACF;UACE;QACF;IACJ;;IAEA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;EACF;AACF;;AAEA;EACE;IACE;EACF;AACF;;;AAGA;EACE;IACE;MACE;;IAEF;IACA;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;QACE;QACA;MACF;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;MACE;UACI;UACA;MACJ;UACI;UACA;MACJ;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;MACI;IACF;QACI;QACA;QACA;QACA;;IAEJ;MACE;QACE;UACE;MACJ;MACA;MACA;IACF;MACE;MACA;IACF;IACA;IACA;;IAEA;;IAEA;MACE;MACA;;MAEA;;MAEA;;MAEA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;;MAEA;QACE;QACA;QACA;MACF;;MAEA;MACA;;MAEA;QACE;UACE;UACA;UACA;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;;IAGA;IACA;MACE;IACF;;IAEA;IACA;MACE;QACE;UACE;;UAEA;UACA;oCAC0B;YACxB;YACA;UACF;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;IACA;IACA;MACE;MACA;;MAEA;QACE;QACA;UACE;cACI;YACF;UACF;YACE;YACA;UACF;QACF;MACF;MACA;;MAEA;IACF;;IAEA;;IAEA;MACE;IACF;AACJ;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;WACA;SACF;KACJ;KACA;OACE;SACE;SACA;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;AACD;EACE;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;MACE;IACF;EACF;;EAEA;IACE;MACE;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;YACE;UACF;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;cACI;cACA;QACN;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;QACE;MACF;;MAEA;QACE;UACE;UACA;YACE;UACF;UACA;QACF;MACF;;MAEA;MACA;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;EACE;MACI;MACA;IACF;QACI;QACA;EACN;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;QACI;MACF;UACI;UACA;IACN;EACF;EACA;AACF;;AAEA;AACA;AACA;;AAEA;EACE;IACE;MACE;QACE;QACA;IACJ;MACE;QACE;QACA;IACJ;EACF;AACF;;AAEA;AACA;AACA;EACE;EACA;EACA;EACA;AACF;EACE;EACA;AACF;;AAEA;AACA;IACI;IACA;MACE;MACA;QACE;UACE;QACF;QACA;MACF;MACA;IACF;UACM;UACA;QACF;IACJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;AACJ;AACA;AACA;;;AAGA;;;AAGA;CACC;CACA;AACD;EACE;AACF;;AAEA;EACE;;EAEA;IACE;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;QACE;MACF;QACE;UACE;UACA;QACF;QACA;MACF;QACE;MACF;QACE;QACA;QACA;QACA;QACA;QACA;UACE;UACA;QACF;UACE;UACA;QACF;UACE;YACE;YACA;YACA;UACF;UACA;QACF;UACE;QACF;MACF;IACF;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;YACQ;EACV;;EAEA;IACE;YACQ;YACA;EACV;;EAEA;IACE;EACF;;EAEA;IACE;IACA;YACQ;YACA;IACR;QACI;EACN;;EAEA;IACE;IACA;IACA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;YACI;YACA;UACF;QACF;YACI;YACA;UACF;QACF;UACE;QACF;MACF;MACA;IACF;IACA;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;;IAEA;;IAEA;MACE;MACA;QACE;QACA;MACF;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;MACA;QACE;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;UACA;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;QACE;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;MACE;MACA;MACA;QACE;UACE;UACA;YACE;UACF;UACA;QACF;UACE;UACA;QACF;QACA;MACF;QACE;MACF;QACE;QACA;UACE;UACA;UACA;UACA;UACA;QACF;QACA;MACF;QACE;MACF;MACA;IACF;IACA;EACF;AACF;;;AAGA;EACE;AACF;;AAEA;CACC;CACA;AACD;EACE;EACA;EACA;AACF;;AAEA;EACE;AACF;EACE;EACA;AACF;;AAEA;EACE;;EAEA;IACE;IACA;;IAEA;;IAEA;MACE;IACF;;IAEA;IACA;;IAEA;EACF;;EAEA;IACE;IACA;MACE;MACA;IACF;MACE;IACF;MACE;IACF;MACE;MACA;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;IACA;MACE;QACE;QACA;MACF;QACE;QACA;MACF;QACE;QACA;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;IACE;QACI;UACE;EACR;;EAEA;IACE;MACE;IACF;EACF;;EAEA;IACE;MACE;MACA;MACA;UACI;QACF;MACF;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;MACE;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;QACA;QACA;YACI;YACA;gBACI;gBACA;kBACE;gBACF;gBACA;cACF;MACR;IACF;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;;IAEA;MACE;MACA;MACA;QACE;MACF;IACF;;IAEA;;IAEA;MACE;MACA;QACE;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;MAEA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;EACF;;EAEA;IACE;IACA;IACA;IACA;MACE;QACE;YACI;MACN;MACA;MACA;QACE;MACF;QACE;MACF;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;MACE;MACA;QACE;;QAEA;UACE;QACF;UACE;QACF;;MAEF;QACE;MACF;IACF;;IAEA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;MACE;IACF;MACE;IACF;EACF;;EAEA;IACE;IACA;IACA;;IAEA;MACE;IACF;MACE;QACE;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;;IAEA;IACA;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;IACF;IACA;;IAEA;IACA;IACA;;IAEA;MACE;MACA;;MAEA;QACE;QACA;UACE;QACF;MACF;;MAEA;MACA;;MAEA;MACA;YACM;YACA;;MAEN;IACF;EACF;;EAEA;EACA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;QACA;QACA;MACF;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;MACA;IACF;MACE;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;UACE;UACA;QACF;QACA;QACA;QACA;QACA;QACA;MACF;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;MACA;IACF;MACE;MACA;MACA;IACF;EACF;AACF;;;AAGA;AACA;AACA;;AAEA;EACE;;EAEA;EACA;IACE;IACA;IACA;MACE;MACA;IACF;IACA;EACF;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;EACA;;EAEA;IACE;;IAEA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;EACF;AACF;;AAEA;EACE;;EAEA;;EAEA;MACI;;EAEJ;EACA;IACE;MACE;IACF;MACE;QACE;QACA;UACE;gCACsB;;UAEtB;UACA;QACF;QACA;MACF;IACF;EACF;IACE;IACA;MACE;MACA;cACQ;sBACQ;sBACA;sBACA;sBACA;IAClB;IACA;;IAEA;IACA;IACA;IACA;;IAEA;EACF;;EAEA;EACA;IACE;EACF;EACA;EACA;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;;;EAGA;IACE;;IAEA;MACE;;MAEA;QACE;UACE;QACF;QACA;QACA;QACA;MACF;;MAEA;IACF;;IAEA;MACE;;MAEA;QACE;UACE;;UAEA;;UAEA;YACE;cACE;cACA;YACF;;YAEA;YACA;YACA;;YAEA;cACE;YACF;cACE;cACA;cACA;cACA;gBACE;YACJ;cACE;YACF;;YAEA;UACF;UACA;;QAEF;UACE;;QAEF;UACE;MACJ;IACF;;IAEA;MACE;QACE;QACA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;MAEA;IACF;;IAEA;;MAEE;QACE;MACF;;MAEA;;QAEE;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;MACF;;MAEA;MACA;IACF;;IAEA;MACE;oBACc;;MAEd;;MAEA;QACE;QACA;QACA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;MACF;;MAEA;MACA;QACE;MACF;;MAEA;QACE;;QAEA;UACE;UACA;YACE;UACF;QACF;;QAEA;UACE;QACF;;QAEA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;QACA;UACE;YACE;cACE;YACF;UACF;QACF;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;QACA;UACE;YACE;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;UACI;QACF;MACF;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;IACE;MACE;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;IACE;IACA;MACE;QACE;QACA;QACA;MACF;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;IACE;EACF;;EAEA;IACE;MACE;;MAEA;MACA;MACA;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;EACA;IACE;MACE;IACF;EACF;;EAEA;IACE;;IAEA;IACA;IACA;IACA;MACE;MACA;MACA;QACE;UACE;QACF;UACE;QACF;UACE;QACF;MACF;QACE;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;IACE;MACE;MACA;QACE;UACE;UACA;UACA;MACJ;MACA;QACE;MACF;;IAEF;;IAEA;MACE;;MAEA;MACA;QACE;QACA;UACE;UACA;QACF;UACE;UACA;UACA;QACF;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;;MAEA;QACE;UACE;UACA;YACE;YACA;YACA;cACE;YACF;cACE;YACF;UACF;QACF;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;MACE;IACF;IACA;MACE;QACE;MACF;QACE;MACF;IACF;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;;EAGD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;QACI;QACA;;IAEJ;MACE;MACA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;IACE;MACE;IACF;;IAEA;MACE;MACA;IACF;;IAEA;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;EACF;;EAEA;EACA;EACA;EACA;;EAEA;AACF;;AAEA;EACE;IACE;gCAC4B;gCACA;;IAE5B;+BAC2B;+BACA;+BACA;;IAE3B;IACA;MACE;UACI;UACA;YACE;UACF;QACF;MACF;UACI;UACA;YACE;UACF;QACF;;IAEJ;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;MACI;;IAEF;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;SACI;SACA;;SAEA;SACA;SACA;;SAEA;SACA;SACA;KACJ;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;qBACe;qBACA;MACf;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;;KAEA;MACC;MACA;MACA;MACA;MACA;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;;IAEH;MACE;MACA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;UACE;UACA;UACA;YACE;cACE;kBACI;cACJ;cACA;cACA;cACA;YACF;YACA;UACF;UACA;QACF;QACA;QACA;QACA;QACA;UACE;UACA;QACF;UACE;QACF;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;WACA;;WAEA;WACA;aACE;WACF;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;;;WAIA;WACA;WACA;WACA;WACA;aACE;aACA;aACA;aACA;eACE;iBACE;iBACA;eACF;aACF;WACF;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;WACA;;OAEJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;UACE;QACF;QACA;YACI;YACA;cACE;cACA;cACA;cACA;cACA;YACF;;QAEJ;;QAEA;UACE;QACF;;QAEA;UACE;QACF;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;YACE;UACF;QACF;;QAEA;UACE;UACA;YACE;YACA;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;YACA;cACE;cACA;YACF;UACF;UACA;QACF;;QAEA;UACE;;UAEA;YACE;YACA;UACF;YACE;UACF;QACF;;QAEA;UACE;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;UACG;UACA;;UAEA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;OACH;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;UACF;YACE;cACE;cACA;cACA;cACA;YACF;;YAEA;;YAEA;cACE;cACA;cACA;YACF;YACA;YACA;cACE;cACA;;cAEA;cACA;gBACE;gBACA;cACF;YACF;UACF;YACE;cACE;cACA;cACA;cACA;YACF;YACA;YACA;YACA;cACE;gBACE;gBACA;gBACA;;gBAEA;kBACE;kBACA;oBACE;oBACA;kBACF;gBACF;kBACE;kBACA;kBACA;gBACF;cACF;YACF;YACA;cACE;cACA;cACA;gBACE;kBACE;kBACA;gBACF;cACF;YACF;UACF;UACA;QACF;;QAEA;UACE;YACE;YACA;UACF;YACE;UACF;;UAEA;UACA;YACE;cACE;cACA;YACF;cACE;cACA;gBACE;cACF;YACF;cACE;cACA;gBACE;kBACE;gBACF;cACF;YACF;UACF;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;;WAEA;WACA;aACE;WACF;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;;WAEA;WACA;WACA;OACJ;OACA;OACA;MACD;QACE;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;QAEJ;QACA;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;;QAEA;UACE;UACA;;UAEA;YACE;cACE;cACA;YACF;cACE;YACF;YACA;UACF;;UAEA;UACA;YACE;cACE;cACA;cACA;gBACE;kBACE;kBACA;kBACA;kBACA;oBACE;wBACI;4BACI;4BACA;+BACG;sBACT;sBACA;sBACA;sBACA;sBACA;wBACE;wBACA;wBACA;4BACI;4BACA;wBACJ;wBACA;sBACF;oBACF;sBACE;sBACA;sBACA;sBACA;oBACF;kBACF;gBACF;kBACE;gBACF;cACF;YACF;;YAEA;YACA;YACA;YACA;gBACI;cACF;gBACE;cACF;YACF;UACF;;UAEA;;UAEA;YACE;YACA;gBACI;gBACA;gBACA;UACN;;QAEF;;QAEA;;QAEA;UACE;YACE;UACF;YACE;UACF;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;MAED;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;QACA;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;;;QAGA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;YACI;;QAEJ;QACA;QACA;;QAEA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;WACA;WACA;;WAEA;WACA;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;UACE;YACE;cACE;YACF;UACF;QACF;;QAEA;MACF;;MAEA;QACE;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;WACI;aACE;eACE;aACF;eACE;aACF;eACE;aACF;WACF;OACJ;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;QACF;UACE;QACF;UACE;UACA;YACE;UACF;YACE;YACA;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;UACE;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;QACF;QACA;;QAEA;QACA;UACE;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;QACF;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;YACI;YACA;YACA;YACA;cACE;cACA;cACA;cACA;gBACE;cACF;cACA;YACF;YACA;YACA;;QAEJ;UACE;UACA;UACA;;YAEE;YACA;cACE;cACA;cACA;cACA;YACF;YACA;cACE;cACA;YACF;cACE;YACF;UACF;UACA;UACA;YACE;YACA;UACF;UACA;UACA;QACF;;QAEA;;QAEA;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;YACI;YACA;YACA;cACE;cACA;cACA;gBACE;cACF;cACA;YACF;;QAEJ;;QAEA;YACI;;QAEJ;QACA;UACE;UACA;UACA;YACE;YACA;cACE;cACA;cACA;cACA;YACF;;YAEA;cACE;YACF;cACE;YACF;UACF;;UAEA;UACA;UACA;UACA;UACA;cACI;YACF;cACE;YACF;UACF;QACF;;QAEA;QACA;MACF;IACF;;IAEA;;IAEA;;;IAGA;MACE;QACE;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;;IAGA;MACE;QACE;;QAEA;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;IACD;;IAEA;MACE;MACA;QACE;UACE;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;AACD;EACE;IACE;;EAEF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;EACF;;EAEA;IACE;MACE;MACA;MACA;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;EACF;AACF;;AAEA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;;AAEA;AACA;AACA;AACA;EACE;WACS;AACX;;;AAGA;EACE;IACE;EACF;IACE;IACA;IACA;IACA;IACA;MACE;UACI;IACN;IACA;kBACc;kBACA;IACd;EACF;IACE;IACA;IACA;IACA;EACF;IACE;QACI;EACN;AACF;;;AAGA;EACE;EACA;IACE;MACE;IACF;EACF;EACA;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;EACE;;EAEA;EACA;MACI;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;IACE;MACE;IACF;IACA;EACF;;EAEA;;IAEE;MACE;IACF;;IAEA;MACE;IACF;;;IAGA;MACE;QACE;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;QACE;QACA;UACE;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;QACI;;IAEJ;IACA;IACA;IACA;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;YACI;YACA;MACN;MACA;QACE;MACF;MACA;MACA;MACA;QACE;YACI;YACA;MACN;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;MACA;MACA;QACE;UACE;QACF;UACE;cACI;cACA;QACN;MACF;QACE;MACF;MACA;IACF;;IAEA;aACS;aACA;EACX;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;;EAED;gBACc;IACZ;IACA;IACA;MACE;QACE;QACA;QACA;IACJ;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;IACA;;IAEA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;;IAED;IACA;QACI;QACA;;IAEJ;MACE;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;QACI;UACE;QACF;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;MACE;QACE;UACE;UACA;UACA;QACF;MACF;;MAEA;QACE;MACF;;MAEA;MACA;;MAEA;QACE;QACA;MACF;IACF;;;IAGA;MACE;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;kBACY;kBACA;MACZ;QACE;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;MACF;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;MACE;MACA;;MAEA;QACE;UACE;UACA;YACE;UACF;;UAEA;UACA;UACA;QACF;;MAEF;QACE;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;;IAEA;EACF;AACF;;AAEA;EACE;OACK;;IAEH;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;UACE;YACE;cACE;cACA;gBACE;cACF;YACF;cACE;gBACE;cACF;YACF;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;QACA;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;EACF;AACF;;AAEA;EACE;OACK;IACH;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;UACI;UACA;UACA;;MAEJ;QACE;UACE;QACF;UACE;UACA;QACF;QACA;UACE;QACF;;QAEA;MACF;;MAEA;MACA;;MAEA;IACF;;;KAGC;MACC;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;MACE;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;EACF;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;IACA;IACA;EACF;;EAEA;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;EACJ;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;UACQ;AACV;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;eACE;aACF;WACF;OACJ;OACA;SACE;SACA;OACF;KACF;KACA;MACC;OACC;OACA;OACA;MACD;KACD;GACF;CACF;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;QACC;QACA;OACD;KACF;;KAEA;MACC;MACA;QACE;QACA;MACF;KACD;GACF;EACD;AACF;AACA;EACE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;QACE;MACF;MACA;IACF;MACE;IACF;EACF;EACA;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;gCACyB;gCACA;gCACA;gCACA;gCACA;;OAEzB;OACA;SACE;SACA;WACE;WACA;SACF;OACF;OACA;OACA;OACA;OACA;OACA;OACA;SACE;SACA;WACE;WACA;SACF;OACF;KACF;KACA;OACE;SACE;WACE;aACE;WACF;SACF;OACF;;OAEA;SACE;SACA;SACA;SACA;;SAEA;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;OACF;OACA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;;IAEA;QACI;;IAEJ;MACE;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;MACE;QACE;UACE;QACF;MACF;QACE;UACE;YACE;cACE;kBACI;gBACF;cACF;YACF;YACA;UACF;UACA;UACA;QACF;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;QACE;QACA;QACA;UACE;QACF;UACE;YACE;cACE;YACF;cACE;gBACE;kBACE;gBACF;cACF;cACA;UACJ;UACA;QACF;UACE;YACE;cACE;YACF;UACF;UACA;QACF;UACE;MACJ;IACF;IACA;MACE;MACA;MACA;QACE;QACA;QACA;MACF;QACE;QACA;UACE;YACE;YACA;cACE;YACF;UACF;QACF;QACA;MACF;QACE;QACA;MACF;QACE;IACJ;IACA;IACA;MACE;MACA;QACE;MACF;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;SACA;OACF;KACF;KACA;OACE;SACE;SACA;OACF;OACA;SACE;WACE;WACA;WACA;SACF;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;AACA;EACE;EACA;IACE;;IAEA;IACA;QACI;QACA;YACI;EACV;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;OACF;KACF;KACA;OACE;SACE;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;SACA;MACH;KACD;GACF;CACF;;;AAGD;AACA;EACE;EACA;;IAEE;IACA;QACI;QACA;uBACe;EACrB;AACF;;AAEA;AACA;EACE;;EAEA;EACA;EACA;MACI;MACA;;EAEJ;EACA;IACE;IACA;MACE;MACA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;MACE;IACF;;IAEA;IACA;IACA;IACA;;IAEA;MACE;IACF;;IAEA;IACA;IACA;;IAEA;QACI;QACA;;IAEJ;MACE;MACA;QACE;UACE;QACF;QACA;MACF;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;EACF;;IAEE;MACE;IACF;EACF;;EAEA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;IACE;IACA;EACF;EACA;EACA;EACA;IACE;EACF;AACF;;;AAGA;EACE;EACA;IACE;IACA;MACE;IACF;IACA;EACF;AACF;;AAEA;EACE;IACE;IACA;;IAEA;EACF;AACF;;AAEA;EACE;EACA;;EAEA;gBACc;;EAEd;AACF;;AAEA;IACI;IACA;IACA;IACA;IACA;AACJ;;AAEA;IACI;MACE;MACA;AACN;;AAEA;GACG;MACG;SACG;;MAEH;SACG;;MAEH;GACH;AACH;;AAEA;EACE;AACF;;AAEA;EACE;IACE;KACC;EACH;GACC;IACC;KACC;IACD;KACC;IACD;KACC;IACD;KACC;IACD;KACC;IACD;KACC;KACA;KACA;GACF;EACD;GACC;KACE;KACA;IACD;KACC;AACL;;AAEA;IACI;;AAEJ;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;WACI;OACJ;UACG;OACH;UACG;OACH;UACG;KACL;KACA;OACE;SACE;YACG;SACH;YACG;SACH;YACG;SACH;YACG;OACL;KACF;GACF;CACF;AACD;AACA;;;EAGE;qBACmB;EACnB;IACE;IACA;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;IACA;EACF;;;EAGA;IACE;QACI;QACA;;IAEJ;IACA;IACA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;QACE;QACA;MACF;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;IACF;IACA;MACE;MACA;iBACW;IACb;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;KACF;KACA;OACE;SACE;OACF;KACF;GACF;CACF;CACA;AACD;EACE;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;aACA;aACA;aACA;aACA;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;KACF;KACA;OACE;OACA;OACA;OACA;OACA;OACA;;OAEA;SACE;SACA;SACA;SACA;SACA;SACA;OACF;;OAEA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;OAEA;SACE;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;OACF;KACF;GACF;AACH;AACA;EACE;IACE;IACA;;IAEA;MACE;IACF;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;QACE;MACF;IACF;;IAEA;MACE;;IAEF;IACA;MACE;IACF;MACE;;IAEF;MACE;MACA;IACF;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;iBACI;kBACC;kBACA;kBACA;kBACA;aACL;WACF;OACJ;OACA;SACE;SACA;SACA;SACA;WACE;aACE;iBACI;aACJ;aACA;WACF;WACA;aACE;aACA;aACA;WACF;SACF;OACF;KACF;GACF;CACF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;UACE;YACE;cACE;YACF;YACA;UACF;UACA;YACE;YACA;YACA;UACF;QACF;MACF;IACF;;IAEA;MACE;QACE;UACE;UACA;YACE;YACA;YACA;YACA;YACA;UACF;UACA;YACE;UACF;UACA;QACF;IACJ;AACJ;CACC;AACD;AACA;EACE;IACE;IACA;IACA;IACA;MACE;MACA;QACE;UACE;UACA;QACF;QACA;QACA;UACE;UACA;YACE;UACF;QACF;MACF;MACA;QACE;MACF;IACF;IACA;IACA;IACA;;IAEA;MACE;QACE;QACA;MACF;MACA;IACF;IACA;MACE;UACI;UACA;IACN;IACA;MACE;MACA;MACA;QACE;UACE;UACA;QACF;QACA;WACG;WACA;QACH;QACA;QACA;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;;IAEE;;MAEE;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;MACA;MACA;IACF;;IAEA;MACE;QACE;QACA;mBACW;QACX;UACE;UACA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;;UAEA;;UAEA;UACA;;UAEA;YACE;cACE;YACF;UACF;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;;UAEA;;UAEA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;MACF;IACF;CACH;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;UACE;UACA;QACF;MACF;MACA;QACE;UACE;UACA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;SACE;SACA;YACG;SACH;OACF;OACA;SACE;WACE;WACA;WACA;SACF;OACF;KACF;CACJ;CACA;CACA;CACA;CACA;;AAED;;;AAGA;AACA;EACE;EACA;;EAEA;EACA;IACE;MACE;MACA;MACA;QACE;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;IACE;MACE;MACA;QACE;QACA;QACA;UACE;UACA;YACE;YACA;UACF;QACF;;QAEA;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;EACA;IACE;MACE;MACA;QACE;YACI;;QAEJ;YACI;UACF;UACA;UACA;QACF;;QAEA;UACE;YACE;cACE;YACF;YACA;UACF;;UAEA;;UAEA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;AACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF;AACA;;AAEA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;AACA;EACE;MACI;;EAEJ;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EACA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;;IAEA;MACE;IACF;EACF;;EAEA;EACA;IACE;;IAEA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;IACA;MACE;IACF;IACA;MACE;IACF;;IAEA;EACF;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;MACA;QACE;MACF;MACA;MACA;QACE;MACF;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;CACD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;SACE;WACE;aACE;WACF;OACJ;OACA;QACC;UACE;UACA;UACA;QACF;QACA;UACE;QACF;OACD;OACA;SACE;SACA;SACA;SACA;SACA;SACA;SACA;QACD;MACF;MACA;QACE;UACE;UACA;;UAEA;UACA;QACF;;QAEA;UACE;UACA;UACA;;UAEA;UACA;;UAEA;UACA;QACF;MACF;IACF;CACH;CACA;CACA;CACA;AACD;EACE;IACE;MACE;MACA;MACA;MACA;QACE;UACE;YACE;cACE;cACA;cACA;cACA;cACA;cACA;cACA;gBACE;kBACE;kBACA;gBACF;;gBAEA;kBACE;kBACA;cACJ;;cAEA;;cAEA;cACA;cACA;gBACE;kBACE;gBACF;cACF;YACF;;YAEA;gBACI;;YAEJ;cACE;cACA;gBACE;gBACA;gBACA;gBACA;gBACA;cACF;YACF;YACA;cACE;gBACE;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;QACF;MACF;IACF;;IAEA;EACF;AACF;;AAEA;AACA;;AAEA;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;aACF;SACJ;SACA;WACE;+BACoB;WACpB;aACE;WACF;aACE;;WAEF;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;;YAEA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;IAEE;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;OACE;UACG;YACE;cACE;YACF;OACL;OACA;UACG;UACA;cACI;UACJ;cACI;UACJ;cACI;WACH;WACA;WACA;WACA;WACA;OACJ;KACF;KACA;QACG;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;QACF;KACH;KACA;KACA;EACH;SACO;SACA;;GAEN;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;QACE;UACE;YACE;UACF;MACJ;MACA;QACE;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;MACF;IACF;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;IACA;EACF;MACI;MACA;;EAEJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;MACC;QACE;UACE;QACF;KACH;KACA;QACG;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;KACH;GACF;GACA;MACG;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;GACH;GACA;GACA;EACD;MACI;KACD;;GAEF;IACC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;QACE;UACE;QACF;MACF;MACA;QACE;QACA;YACI;QACJ;YACI;QACJ;YACI;QACJ;QACA;QACA;QACA;QACA;MACF;IACF;IACA;MACE;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;KACE;MACC;QACE;UACE;QACF;KACH;KACA;OACE;OACA;UACG;OACH;UACG;OACH;UACG;OACH;OACA;OACA;OACA;OACA;KACF;GACF;GACA;MACG;MACA;MACA;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;GACH;GACA;GACA;EACD;KACG;KACA;;EAEH;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;SACA;WACE;0BACe;WACf;aACE;WACF;aACE;WACF;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;SACA;WACE;WACA;aACE;WACF;aACE;WACF;WACA;WACA;WACA;WACA;WACA;UACD;QACF;QACA;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;;YAEA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;aACF;SACJ;WACE;aACE;aACA;eACE;aACF;eACE;aACF;aACA;aACA;aACA;aACA;aACA;WACF;SACF;QACD;UACE;UACA;UACA;;UAEA;YACE;YACA;UACF;;UAEA;YACE;YACA;YACA;YACA;UACF;;UAEA;YACE;YACA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;iBACE;iBACA;eACF;aACF;SACJ;SACA;WACE;WACA;WACA;WACA;UACD;UACA;QACF;QACA;UACE;YACE;;YAEA;;YAEA;;YAEA;UACF;QACF;MACF;GACH;EACD;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;MACG;QACE;SACC;WACE;aACE;eACE;eACA;aACF;SACJ;SACA;WACE;WACA;0BACe;WACf;WACA;UACD;QACF;QACA;UACE;YACE;YACA;;YAEA;YACA;;YAEA;YACA;;YAEA;YACA;UACF;QACF;MACF;GACH;EACD;;EAEA;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;EACA;IACE;MACE;MACA;QACE;MACF;IACF;EACF;EACA;AACF;;AAEA;EACE;IACE;EACF;AACF;;AAEA;EACE;EACA;AACF;;AAEA;EACE;EACA;EACA;;EAEA;EACA;EACA;EACA;IACE;;IAEA;MACE;IACF;;IAEA;MACE;MACA;IACF;EACF;;EAEA;IACE;IACA;QACI;;IAEJ;IACA;IACA;IACA;IACA;MACE;MACA;IACF;;IAEA;IACA;IACA;IACA;MACE;IACF;;IAEA;IACA;IACA;IACA;MACE;IACF;EACF;;EAEA;EACA;EACA;IACE;EACF;IACE;;IAEA;MACE;QACE;UACE;UACA;QACF;MACF;IACF;;IAEA;MACE;;MAEA;MACA;MACA;;MAEA;IACF;;IAEA;IACA;MACE;IACF;EACF;;EAEA;EACA;EACA;;EAEA;IACE;EACF;AACF;;AAEA;EACE;IACE;EACF;;EAEA;IACE;IACA;IACA;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;EACF;;EAEA;AACF;;AAEA;EACE;IACE;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;QACE;MACF;MACA;QACE;MACF;MACA;MACA;;MAEA;QACE;QACA;UACE;YACE;YACA;YACA;YACA;YACA;YACA;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;;IAEA;IACA;MACE;MACA;QACE;QACA;UACE;UACA;QACF;QACA;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;QACE;MACF;MACA;QACE;QACA;MACF;IACF;;IAEA;MACE;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;IACE;MACE;MACA;MACA;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;IACE;MACE;QACE;MACF;MACA;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;MACA;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;;EAEA;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;;EAEA;EACA;IACE;EACF;AACF;;AAEA;EACE;EACA;IACE;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;;EAEA;IACE;IACA;EACF;;EAEA;AACF;;AAEA;EACE;EACA;IACE;IACA;MACE;mCAC6B;IAC/B;IACA;EACF;EACA;AACF;;AAEA;EACE;EACA;;EAEA;IACE;EACF;;EAEA;;EAEA;IACE;EACF;;EAEA;EACA;IACE;EACF;;EAEA;IACE;EACF;;EAEA;IACE;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;UACG;YACE;cACE;YACF;OACL;OACA;SACE;WACE;WACA;aACE;WACF;aACE;WACF;aACE;WACF;aACE;SACJ;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;OACF;MACD;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;;QAEA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;MACF;IACF;CACH;AACD;IACI;EACF;IACE;IACA;IACA;MACE;QACE;4DACoD;MACtD;IACF;EACF;AACF;;AAEA;IACI;IACA;IACA;IACA;IACA;IACA;;AAEJ;CACC;CACA;CACA;CACA;CACA;CACA;OACM;OACA;OACA;OACA;OACA;OACA;;CAEN;CACA;OACM;OACA;CACN;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;QACA;MACF;;MAEA;QACE;MACF;;IAEF;IACA;MACE;QACE;UACE;YACE;YACA;YACA;cACE;;cAEA;cACA;gBACE;cACF;;cAEA;cACA;gBACE;cACF;cACA;;cAEA;cACA;gBACE;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;QACF;IACJ;IACA;MACE;OACC;YACK;YACA;YACA;QACJ;OACD;OACA;MACD;IACF;IACA;IACA;MACE;QACE;QACA;QACA;MACF;MACA;MACA;;MAEA;;MAEA;MACA;MACA;MACA;IACF;IACA;CACH;CACA;CACA;CACA;AACD;IACI;EACF;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;EAGA;MACI;MACA;;EAEJ;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;QACI;;MAEF;IACF;MACE;IACF;EACF;;EAEA;IACE;;IAEA;MACE;UACI;IACN;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;MACI;;EAEJ;EACA;IACE;IACA;;EAEF;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;;IAEA;IACA;MACE;MACA;IACF;IACA;MACE;MACA;IACF;IACA;;IAEA;MACE;MACA;QACE;MACF;QACE;QACA;UACE;YACE;UACF;UACA;YACE;UACF;UACA;QACF;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;MACA;MACA;QACE;QACA;UACE;YACE;QACJ;QACA;QACA;UACE;QACF;UACE;UACA;QACF;MACF;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;;IAEA;MACE;QACE;MACF;IACF;;IAEA;MACE;;QAEE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;;IAEA;;IAEA;IACA;IACA;IACA;MACE;IACF;IACA;;IAEA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;IACA;EACF;;EAEA;IACE;QACI;QACA;IACJ;MACE;MACA;QACE;QACA;MACF;IACF;IACA;MACE;MACA;IACF;IACA;IACA;IACA;MACE;MACA;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;QACA;MACF;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;;EAEA;IACE;IACA;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;EACF;;EAEA;IACE;QACI;QACA;;IAEJ;MACE;MACA;QACE;MACF;QACE;MACF;QACE;MACF;IACF;;IAEA;IACA;MACE;QACE;MACF;IACF;MACE;IACF;MACE;QACE;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;IACE;;IAEA;IACA;IACA;MACE;;MAEA;UACI;;MAEJ;MACA;QACE;MACF;MACA;QACE;QACA;;QAEA;MACF;IACF;;IAEA;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;QACC;UACE;YACE;UACF;OACH;OACA;SACE;WACE;WACA;WACA;SACF;SACA;WACE;WACA;SACF;OACF;OACA;OACA;OACA;SACE;OACF;KACF;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;SACE;WACE;WACA;kBACO;kBACA;SACT;SACA;OACF;KACF;KACA;OACE;SACE;WACE;WACA;aACE;eACE;iBACE;eACF;eACA;aACF;WACF;SACF;KACJ;CACJ;CACA;AACD;EACE;IACE;IACA;IACA;IACA;MACE;QACE;YACI;;QAEJ;;QAEA;QACA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;YACE;UACF;QACF;;QAEA;UACE;;UAEA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;IACE;MACE;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;MACA;;MAEA;QACE;MACF;;MAEA;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;UACE;QACF;;QAEA;UACE;YACE;YACA;QACJ;;QAEA;QACA;MACF;;MAEA;QACE;MACF;IACF;EACF;AACF;;;AAGA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;QACE;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;QACE;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;IACA;IACA;MACE;MACA;MACA;MACA;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;MACF;;MAEA;MACA;QACE;UACE;QACF;;QAEA;MACF;;MAEA;MACA;QACE;MACF;IACF;EACF;AACF;;;AAGA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;OACC;UACG;YACE;cACE;cACA;YACF;OACL;QACC;UACE;YACE;cACE;cACA;qBACO;qBACA;qBACA;qBACA;YACT;UACF;QACF;MACF;MACA;QACE;;QAEA;UACE;QACF;QACA;UACE;UACA;QACF;MACF;IACF;CACH;AACD;EACE;IACE;IACA;IACA;MACE;QACE;UACE;QACF;MACF;QACE;UACE;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;OACM;CACN;CACA;CACA;CACA;CACA;;EAEC;EACA;EACA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;iBACA;;UAEP;UACA;QACF;QACA;MACF;IACF;IACA;MACE;QACE;UACE;;UAEA;YACE;cACE;YACF;UACF;QACF;IACJ;IACA;MACE;MACA;MACA;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;EACA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;UACP;QACF;QACA;MACF;IACF;IACA;MACE;QACE;UACE;QACF;IACJ;EACF;;EAEA;;EAEA;IACE;MACE;QACE;UACE;UACA;iBACO;iBACA;QACT;QACA;MACF;IACF;IACA;MACE;QACE;UACE;UACA;YACE;cACE;YACF;UACF;QACF;IACJ;EACF;CACD;AACD;EACE;IACE;IACA;MACE;MACA;MACA;MACA;QACE;QACA;QACA;UACE;UACA;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;EACE;MACI;MACA;MACA;MACA;MACA;MACA;;EAEJ;EACA;;EAEA;IACE;MACE;IACF;MACE;IACF;IACA;MACE;MACA;IACF;MACE;QACE;QACA;MACF;QACE;QACA;MACF;IACF;IACA;MACE;MACA;MACA;IACF;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;MACE;IACF;MACE;IACF;MACE;IACF;MACE;IACF;IACA;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;MACE;IACF;EACF;;EAEA;IACE;MACE;MACA;IACF;MACE;MACA;IACF;EACF;;EAEA;IACE;;IAEA;IACA;EACF;AACF;;AAEA;EACE;IACE;MACE;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;WACF;OACJ;OACA;SACE;SACA;OACF;KACF;KACA;OACE;SACE;;SAEA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;IACA;MACE;MACA;QACE;QACA;UACE;UACA;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;WACE;aACE;aACA;WACF;OACJ;OACA;QACC;QACA;QACA;OACD;KACF;KACA;OACE;SACE;SACA;SACA;;SAEA;;SAEA;SACA;SACA;SACA;;SAEA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;MACE;MACA;QACE;QACA;QACA;UACE;QACF;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;GAEE;KACE;OACE;QACC;OACD;KACF;;KAEA;OACE;SACE;WACE;cACG;cACA;SACL;KACJ;;KAEA;OACE;SACE;aACI;OACN;KACF;GACF;CACF;AACD;EACE;IACE;IACA;MACE;MACA;QACE;MACF;MACA;;MAEA;QACE;;QAEA;UACE;UACA;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;IACE;MACE;MACA;QACE;;QAEA;;QAEA;UACE;QACF;;;QAGA;UACE;YACE;YACA;YACA;cACE;cACA;gBACE;gBACA;YACJ;UACF;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;QACF;;QAEA;UACE;UACA;UACA;YACE;cACE;cACA;gBACE;cACF;YACF;UACF;UACA;UACA;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;YACE;UACF;UACA;YACE;UACF;QACF;;QAEA;UACE;YACE;YACA;cACE;YACF;cACE;cACA;YACF;UACF;UACA;QACF;MACF;IACF;;IAEA;MACE;;MAEA;MACA;QACE;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;MACE;QACE;MACF;QACE;MACF;QACE;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;KACF;KACA;OACE;SACE;OACF;OACA;WACI;OACJ;OACA;WACI;OACJ;KACF;KACA;OACE;;OAEA;;SAEE;SACA;;SAEA;SACA;;SAEA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;OACF;;OAEA;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;;GAEA;;GAEA;;GAEA;KACE;MACC;MACA;MACA;MACA;KACD;KACA;OACE;SACE;SACA;OACF;;OAEA;SACE;SACA;OACF;KACF;KACA;OACE;SACE;WACE;;SAEF;;SAEA;WACE;;SAEF;;SAEA;WACE;OACJ;KACF;GACF;;;GAGA;GACA;GACA;GACA;GACA;GACA;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;UACE;WACC;aACE;WACF;UACD;QACF;KACH;KACA;OACE;SACE;OACF;OACA;SACE;OACF;KACF;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;UACE;WACC;aACE;WACF;UACD;QACF;KACH;KACA;OACE;SACE;OACF;OACA;SACE;OACF;KACF;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;QACA;KACH;KACA;OACE;SACE;WACE;SACF;WACE;OACJ;KACF;GACF;CACF;CACA;AACD;EACE;IACE;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;AACD;EACE;IACE;IACA;IACA;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;KACA;KACA;KACA;KACA;GACF;CACF;;AAED;AACA;AACA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;QACE;MACF;KACD;KACA;OACE;SACE;SACA;SACA;OACF;KACF;GACF;CACF;AACD;CACC;CACA;CACA;CACA;CACA;AACD;;AAEA;AACA;AACA;AACA;EACE;EACA;AACF;AACA;EACE;EACA;IACE;IACA;MACE;QACE;QACA;UACE;UACA;YACE;cACE;gBACE;cACF;cACA;gBACE;cACF;gBACE;cACF;YACF;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;MACF;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;OACA;;OAEA;OACA;OACA;OACA;KACF;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;QACE;UACE;YACE;YACA;YACA;cACE;gBACE;gBACA;cACF;YACF;UACF;MACJ;MACA;QACE;QACA;QACA;QACA;MACF;KACD;KACA;OACE;SACE;SACA;SACA;SACA;OACF;OACA;SACE;SACA;SACA;SACA;QACD;KACH;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;MACC;MACA;KACD;GACF;CACF;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;MACA;QACE;MACF;IACF;IACA;MACE;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;MACF;;MAEA;MACA;QACE;MACF;;MAEA;MACA;QACE;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;IACA;IACA;IACA;IACA;QACI;QACA;;UAEE;YACE;cACE;gBACE;gBACA;gBACA;gBACA;gBACA;gBACA;kBACE;gBACF;gBACA;cACF;YACF;UACF;YACE;cACE;cACA;YACF;YACA;cACE;cACA;YACF;YACA;cACE;cACA;gBACE;cACF;cACA;YACF;UACF;QACF;IACJ;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;KACC;OACE;QACC;OACD;OACA;OACA;OACA;SACE;OACF;KACF;IACD;IACA;MACE;QACE;UACE;YACE;cACE;UACJ;QACF;KACH;IACD;MACE;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;;MAEA;QACE;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;MACA;QACE;MACF;;MAEA;QACE;MACF;MACA;QACE;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;MACF;;MAEA;QACE;UACE;UACA;UACA;QACF;QACA;QACA;QACA;MACF;;MAEA;QACE;UACE;UACA;QACF;QACA;QACA;QACA;MACF;IACF;EACF;CACD;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;;AAGD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;kBACkB;EAChB;IACE;IACA;IACA;IACA;IACA;IACA;MACE;UACI;UACA;;MAEJ;QACE;YACI;YACA;YACA;;QAEJ;UACE;YACE;YACA;UACF;UACA;YACE;YACA;UACF;UACA;YACE;cACE;YACF;YACA;YACA;UACF;QACF;;QAEA;UACE;YACE;cACE;YACF;UACF;UACA;;UAEA;YACE;YACA;YACA;cACE;cACA;cACA;;cAEA;cACA;cACA;cACA;cACA;cACA;cACA;gBACE;gBACA;cACF;;cAEA;cACA;;cAEA;cACA;YACF;cACE;gBACE;gBACA;cACF;YACF;YACA;UACF;YACE;YACA;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;EACE;IACE;MACE;MACA;MACA;MACA;QACE;UACE;UACA;UACA;UACA;UACA;cACI;YACF;UACF;UACA;QACF;;QAEA;QACA;MACF;IACF;EACF;;AAEF;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;GACF;KACE;OACE;SACE;OACF;GACJ;GACA;KACE;OACE;UACG;OACH;KACF;GACF;KACE;KACA;OACE;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;EACA;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;MACF;MACA;OACC;SACE;SACA;OACF;MACD;IACF;CACH;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;iBACgB;CAChB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;UACE;YACE;cACE;cACA;cACA;YACF;QACJ;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;wBACc;+BACO;+BACA;UACrB;;UAEA;UACA;UACA;wBACc;+BACO;+BACA;+BACA;+BACA;UACrB;QACF;MACF;MACA;QACE;UACE;UACA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;;UAEA;UACA;QACF;QACA;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;CACH;AACD;EACE;EACA;IACE;IACA;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;UACE;YACE;QACJ;MACF;MACA;QACE;UACE;YACE;MACN;;MAEA;QACE;;QAEA;UACE;UACA;UACA;WACC;QACH;UACE;QACF;MACF;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;QACE;QACA;QACA;UACE;YACE;UACF;UACA;YACE;UACF;QACF;MACF;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;MACF;IACF;IACA;MACE;;MAEA;QACE;QACA;QACA;QACA;QACA;YACI;MACN;;OAEC;SACE;;SAEA;;SAEA;SACA;SACA;OACF;MACD;IACF;CACH;AACD;EACE;EACA;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;EACF;;;EAGA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;MACE;MACA;;MAEA;;MAEA;QACE;YACI;MACN;;MAEA;MACA;MACA;MACA;;MAEA;;MAEA;QACE;YACI;MACN;MACA;MACA;;MAEA;UACI;QACF;UACE;MACJ;;MAEA;MACA;;MAEA;QACE;MACF;QACE;UACE;QACF;QACA;UACE;QACF;MACF;;MAEA;;QAEE;UACE;YACE;YACA;YACA;YACA;YACA;UACF;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;UACE;cACI;8CACgC;cAChC;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;;UAEJ;YACE;UACF;;UAEA;YACE;YACA;UACF;YACE;YACA;YACA;YACA;cACE;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;;UAEA;UACA;YACE;YACA;YACA;YACA;cACE;cACA;cACA;cACA;cACA;YACF;cACE;cACA;gBACE;cACF;cACA;kBACI;kBACA;YACN;cACE;cACA;cACA;YACF;UACF;;UAEA;UACA;YACE;YACA;YACA;YACA;cACE;cACA;cACA;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;YACE;YACA;YACA;;YAEA;cACE;cACA;;cAEA;;cAEA;cACA;gBACE;cACF;;cAEA;gBACE;gBACA;cACF;cACA;cACA;YACF;cACE;cACA;gBACE;gBACA;gBACA;gBACA;;gBAEA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;cACF;YACF;UACF;UACA;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;MACF;IACF;EACF;AACF;;;AAGA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;IACF;IACA;MACE;IACF;IACA;MACE;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;QACG;QACA;QACA;QACA;QACA;QACA;KACH;KACA;OACE;SACE;OACF;KACF;KACA;OACE;;OAEA;SACE;SACA;SACA;SACA;SACA;OACF;KACF;GACF;CACF;AACD;EACE;IACE;MACE;IACF;IACA;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;QACA;QACA;QACA;QACA;UACE;YACE;YACA;YACA;QACJ;MACF;IACF;IACA;MACE;QACE;UACE;UACA;QACF;IACJ;IACA;MACE;QACE;QACA;QACA;QACA;QACA;MACF;;MAEA;QACE;MACF;;MAEA;QACE;QACA;;QAEA;QACA;QACA;QACA;QACA;MACF;;MAEA;MACA;QACE;MACF;MACA;MACA;QACE;MACF;IACF;IACA;MACE;MACA;;MAEA;QACE;MACF;MACA;QACE;QACA;MACF;MACA;QACE;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;;IAEA;IACA;KACC;IACD;IACA;MACE;UACI;UACA;UACA;UACA;;MAEJ;UACI;MACJ;;MAEA;QACE;QACA;UACE;QACF;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;YACE;cACE;cACA;cACA;cACA;;cAEA;cACA;YACF;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;IACE;IACA;EACF;AACF;;AAEA;EACE;EACA;EACA;EACA;EACA;IACE;IACA;GACD;AACH;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;GACE;KACE;OACE;SACE;UACC;aACG;eACE;eACA;eACA;eACA;2BACY;2BACA;yBACF;aACZ;SACJ;SACA;WACE;WACA;SACF;OACF;OACA;SACE;SACA;SACA;OACF;KACF;KACA;QACG;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;KACH;GACF;CACF;CACA;AACD;EACE;EACA;IACE;MACE;OACC;OACA;OACA;OACA;IACH;;IAEA;MACE;MACA;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;EACC;IACE;MACE;QACE;MACF;;MAEA;MACA;IACF;IACA;MACE;QACE;QACA;MACF;IACF;EACF;CACD;AACD;EACE;IACE;IACA;IACA;MACE;QACE;YACI;YACA;;QAEJ;MACF;IACF;EACF;AACF;;AAEA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;IACG;MACE;QACE;QACA;UACE;YACE;cACE;cACA;cACA;cACA;cACA;YACF;YACA;UACF;QACF;QACA;UACE;YACE;cACE;cACA;YACF;YACA;cACE;YACF;UACF;UACA;UACA;UACA;;UAEA;UACA;YACE;cACE;YACF;UACF;;UAEA;UACA;UACA;;;UAGA;UACA;UACA;UACA;eACK;UACL;QACF;MACF;MACA;SACG;WACE;WACA;WACA;WACA;WACA;WACA;WACA;SACF;MACH;IACF;CACH;;AAED;EACE;EACA;AACF;;AAEA;AACA;yBACyB;EACvB;MACI;AACN;;EAEE;IACE;IACA;IACA;MACE;UACI;UACA;UACA;UACA;;;MAGJ;;;MAGA;QACE;QACA;QACA;MACF;;;MAGA;QACE;QACA;;QAEA;UACE;UACA;QACF;QACA;QACA;QACA;QACA;UACE;QACF;MACF;;;MAGA;QACE;UACE;UACA;YACE;UACF;QACF;MACF;;;MAGA;QACE;QACA;QACA;QACA;QACA;MACF;;;MAGA;QACE;MACF;;MAEA;QACE;QACA;MACF;IACF;;IAEA;MACE;MACA;;MAEA;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;MACA;QACE;UACE;UACA;QACF;MACF;;MAEA;;MAEA;MACA;QACE;UACE;QACF;MACF;;MAEA;MACA;MACA;;;MAGA;;;;MAIA;QACE;UACE;;UAEA;YACE;YACA;YACA;UACF;YACE;cACE;YACF;cACE;YACF;UACF;QACF;;QAEA;UACE;YACE;YACA;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;UACA;YACE;UACF;QACF;;QAEA;QACA;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;cACE;gBACE;cACF;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;;QAEA;UACE;YACE;YACA;YACA;YACA;QACJ;;QAEA;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;QAEJ;UACE;UACA;;UAEA;UACA;UACA;;UAEA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;YACE;gBACI;gBACA;gBACA;;YAEJ;cACE;cACA;mBACK;mBACA;gBACH;gBACA;;gBAEA;kBACE;oBACE;oBACA;oBACA;sBACE;wBACE;wBACA;sBACF;oBACF;sBACE;oBACF;oBACA;kBACF;gBACF;cACF;YACF;cACE;cACA;gBACE;cACF;gBACE;cACF;gBACE;kBACE;oBACE;oBACA;sBACE;sBACA;oBACF;kBACF;gBACF;kBACE;kBACA;kBACA;gBACF;cACF;YACF;YACA;YACA;UACF;QACF;;QAEA;;QAEA;QACA;UACE;cACI;UACJ;YACE;YACA;cACE;cACA;YACF;YACA;UACF;QACF;;QAEA;UACE;QACF;;;QAGA;UACE;UACA;YACE;YACA;cACE;cACA;cACA;gBACE;gBACA;cACF;YACF;cACE;YACF;UACF;UACA;QACF;;;QAGA;UACE;YACE;YACA;UACF;QACF;;;QAGA;UACE;;cAEI;UACJ;cACI;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;cACA;;;UAGJ;UACA;;YAEE;YACA;cACE;cACA;cACA;YACF;;YAEA;;YAEA;YACA;cACE;cACA;YACF;YACA;cACE;gBACE;cACF;YACF;cACE;gBACE;gBACA;gBACA;cACF;gBACE;cACF;cACA;YACF;YACA;;YAEA;YACA;YACA;cACE;cACA;cACA;cACA;YACF;UACF;UACA;YACE;cACE;cACA;YACF;cACE;cACA;YACF;UACF;;UAEA;UACA;eACK;eACA;YACH;YACA;;YAEA;YACA;;YAEA;cACE;cACA;gBACE;gBACA;cACF;cACA;cACA;cACA;YACF;cACE;cACA;;cAEA;cACA;gBACE;cACF;YACF;;YAEA;YACA;cACE;cACA;gBACE;gBACA;gBACA;kBACE;gBACF;gBACA;kBACE;gBACF;gBACA;gBACA;kBACE;kBACA;oBACE;oBACA;oBACA;oBACA;kBACF;gBACF;cACF;gBACE;;gBAEA;gBACA;kBACE;kBACA;gBACF;kBACE;kBACA;kBACA;kBACA;sBACI;sBACA;sBACA;sBACA;gBACN;;gBAEA;oBACI;oBACA;oBACA;oBACA;gBACJ;gBACA;kBACE;gBACF;kBACE;gBACF;gBACA;cACF;YACF;YACA;YACA;YACA;cACE;YACF;UACF;UACA;UACA;YACE;UACF;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;IACE;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;QACE;QACA;UACE;QACF;MACF;;MAEA;QACE;YACI;YACA;cACE;;QAEN;UACE;UACA;UACA;QACF;UACE;QACF;;QAEA;UACE;YACE;YACA;cACE;YACF;YACA;UACF;QACF;UACE;QACF;;QAEA;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE;EACA;AACF;;EAEE;IACE;IACA;IACA;EACF;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;EACF;;AAEF;;AAEA;AC5nwBA;CACC;CACA;CACA;CACA;AACD;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD,YAAY,iBAAiB;IAC3B;IACA;MACE;MACA;QACE;MACF;QACE;UACE;QACF;MACF;IACF;EACF;;EAEA;EACA;EACA;EACA;EACA,UAAU,eAAe;IACvB;IACA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;MACF;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;;IAEA;MACE;QACE;QACA;UACE;QACF;MACF;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA,oBAAoB,QAAQ;QACxB;CACP;;MAEK;;MAEA;MACA;MACA;MACA;MACA;QACE;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;MACF;;MAEA;MACA;MACA;cACQ;cACA;gBACE;cACF;;MAER;QACE;QACA;UACE;UACA;UACA;QACF;QACA;MACF;;MAEA;QACE;QACA;UACE;QACF;QACA;UACE;YACE;UACF;QACF;QACA;MACF;;MAEA;QACE;QACA;;QAEA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;UACF;QACF;;QAEA;QACA;UACE;YACE;UACF;QACF;;QAEA;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;YACA;cACE;YACF;UACF;YACE;YACA;cACE;YACF;UACF;QACF;;QAEA;MACF;;MAEA;QACE;UACE;cACI;cACA;;UAEJ;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;YACE;UACF;;UAEA;YACE;gBACI;YACJ;cACE;cACA;YACF;UACF;UACA;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;UACE;QACF;;QAEA;QACA;QACA;UACE;UACA;UACA;YACE;YACA;UACF;YACE;YACA;UACF;YACE;UACF;QACF;;QAEA;QACA;2BACmB;2BACA;;QAEnB;QACA;QACA;UACE;QACF;;QAEA;YACI;YACA;YACA;YACA;YACA;;QAEJ;QACA;UACE;UACA;YACE;YACA;UACF;QACF;;QAEA;UACE;UACA;UACA;YACE;cACE;cACA;cACA;YACF;YACA;cACE;YACF;YACA;cACE;YACF;YACA;UACF;QACF;;QAEA;UACE;UACA;YACE;UACF;;UAEA;UACA;YACE;cACE;cACA;cACA;YACF;YACA;UACF;;UAEA;UACA;UACA;UACA;YACE;cACE;YACF;YACA;cACE;gBACE;gBACA;cACF;gBACE;gBACA;cACF;gBACE;gBACA;cACF;gBACE;gBACA;YACJ;UACF;;UAEA;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;UACA;YACE;YACA;cACE;cACA;YACF;UACF;UACA;YACE;YACA;cACE;cACA;YACF;UACF;UACA;YACE;cACE;gBACE;cACF;cACA;YACF;YACA;cACE;gBACE;cACF;cACA;YACF;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;YACE;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;;UAEA;UACA;UACA;UACA;YACE;cACE;YACF;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;UACA;UACA;;UAEA;UACA;UACA;UACA;YACE;UACF;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;UACA;;UAEA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;YACE;YACA;;YAEA;YACA;UACF;YACE;cACE;cACA;YACF;UACF;;UAEA;YACE;YACA;;YAEA;YACA;YACA;cACE;cACA;kBACI;gBACF;UACN;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;QACF;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACA;UACE;YACE;cACE;gBACE;cACF;gBACE;gBACA;gBACA;cACF;YACF;;YAEA;cACE;YACF;;YAEA;cACE;YACF;UACF;UACA;SACD;MACH;;MAEA;QACE;QACA;QACA;QACA;QACA;MACF;MACA;;QAEE;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;YACE;cACE;YACF;cACE;cACA;gBACE;cACF;cACA;cACA;YACF;UACF;YACE;YACA;UACF;UACA;YACE;YACA;cACE;YACF;cACE;cACA;YACF;UACF;;UAEA;YACE;cACE;YACF;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;YACE;YACA;YACA;cACE;cACA;gBACE;gBACA;cACF;YACF;UACF;QACF;;QAEA;QACA;QACA;;QAEA;QACA;QACA;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;UACE;UACA;wBACc;wBACA;;UAEd;UACA;YACE;UACF;YACE;YACA;UACF;QACF;;QAEA;;QAEA;UACE;UACA;YACE;cACE;gBACE;gBACA;cACF;YACF;UACF;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;QACF;;QAEA;QACA;QACA;UACE;YACE;YACA;UACF;QACF;;QAEA;UACE;YACE;YACA;YACA;cACE;iBACG;iBACA;iBACA;cACH;gBACE;cACF;gBACE;kBACE;kBACA;oBACE;kBACF;gBACF;gBACA;cACF;YACF;YACA;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;YACE;YACA;UACF;YACE;YACA;YACA;cACE;gBACE;cACF;YACF;UACF;QACF;MACF;;MAEA;QACE;UACE;YACE;YACA;UACF;QACF;UACE;;UAEA;UACA;YACE;YACA;UACF;;UAEA;YACE;YACA;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;;QAEA;UACE;QACF;;QAEA;QACA;UACE;UACA;UACA;UACA;;UAEA;UACA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;YACA;cACE;YACF;UACF;;UAEA;mCACyB;mCACA;QAC3B;QACA;;QAEA;MACF;IACF;;IAEA;2BACuB;MACrB;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;QACE;UACE;QACF;QACA;QACA;UACE;YACE;UACF;;UAEA;UACA;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;QACE;QACA;;QAEA;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;QACF;;QAEA;;QAEA;QACA;UACE;UACA;QACF;MACF;;MAEA;QACE;UACE;UACA;YACE;cACE;YACF;UACF;QACF;MACF;;MAEA;QACE;QACA;UACE;UACA;UACA;UACA;;UAEA;UACA;YACE;cACE;;cAEA;cACA;;cAEA;cACA;;cAEA;cACA;;cAEA;;cAEA;gBACE;cACF;cACA;YACF;UACF;UACA;YACE;YACA;YACA;YACA;YACA;UACF;UACA;YACE;UACF;QACF;QACA;MACF;;MAEA;QACE;QACA;UACE;UACA;QACF;UACE;QACF;QACA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;QACA;MACF;;MAEA;QACE;;QAEA;QACA;QACA;;QAEA;QACA;UACE;UACA;UACA;;UAEA;;UAEA;;UAEA;QACF;;QAEA;;QAEA;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;;QAEA;QACA;6BACqB;6BACA;;QAErB;QACA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;;QAEA;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;QACA;UACE;UACA;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;UACE;UACA;YACE;UACF;;UAEA;UACA;YACE;YACA;UACF;;UAEA;QACF;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;QACF;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;YACE;UACF;UACA;QACF;;QAEA;QACA;QACA;QACA;;QAEA;QACA;UACE;UACA;YACE;YACA;YACA;YACA;cACE;YACF;UACF;QACF;;QAEA;QACA;UACE;UACA;QACF;;QAEA;QACA;QACA;;QAEA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;YACE;UACF;UACA;UACA;UACA;YACE;UACF;QACF;;QAEA;UACE;UACA;UACA;;UAEA;WACC;UACD;;UAEA;WACC;WACA;WACA;WACA;WACA;WACA;UACD;YACE;UACF;QACF;MACF;;MAEA;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;YACE;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;UACE;UACA;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;QACA;UACE;UACA;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;QACF;MACF;;MAEA;QACE;QACA;QACA;UACE;YACE;UACF;UACA;YACE;UACF;QACF;MACF;;MAEA;QACE;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;0BACgB;UAChB;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;UACA;QACF;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;MACF;;MAEA;QACE;QACA;QACA;UACE;YACE;UACF;QACF;QACA;MACF;IACF;EACF;;;AAGF;;ACv1DA;CACC;CACA;CACA;CACA;;AAED;;EAEE;IACE;EACF;;EAEA,YAAY,UAAU;IACpB;IACA;MACE;;MAEA;QACE;QACA;QACA;;UAEE;UACA;cACI;;UAEJ;UACA;YACE;UACF;;UAEA;UACA;YACE;YACA;YACA;UACF;;UAEA;UACA;UACA;UACA;;UAEA;cACI;cACA;4BACc;4BACA;4BACA;4BACA;cACd;wCAC0B;cAC1B;cACA;cACA;cACA;0BACY;0BACA;cACZ;4BACc;oCACQ;oCACA;oCACA;4BACR;oCACQ;oCACA;oCACA;0BACV;cACZ;cACA;cACA;cACA;cACA;cACA;cACA;2BACa;2BACA;2BACA;2BACA;2BACA;2BACA;2BACA;2BACA;;UAEjB;UACA;YACE;UACF;;UAEA;UACA;;UAEA;UACA;YACE;UACF;;UAEA;UACA;YACE;UACF;;UAEA;WACC;WACA;;UAED;YACE;YACA;YACA;YACA;cACE;YACF;YACA;UACF;;UAEA;YACE;gBACI;gBACA;gBACA;gBACA;;YAEJ;cACE;YACF;;YAEA;YACA;cACE;;cAEA;cACA;;cAEA;;cAEA;;cAEA;cACA;gBACE;gBACA;gBACA;cACF;;cAEA;;cAEA;gBACE;gBACA;cACF;gBACE;cACF;cACA;;cAEA;;cAEA;gBACE;gBACA;cACF;;cAEA;cACA;gBACE;cACF;;YAEF;UACF;;UAEA;YACE;YACA;UACF;;UAEA;WACC;WACA;;UAED;UACA;YACE;YACA;UACF;YACE;UACF;;UAEA;;UAEA;YACE;UACF;YACE;UACF;;UAEA;YACE;UACF;;UAEA;;UAEA;WACC;WACA;;UAED;YACE;YACA;UACF;QACF;MACF;IACF;EACF;;ACpNF;CACC;CACA;CACA;CACA;AACD;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;EACE;MACI;AACN;;AAEA;EACE;IACE;EACF;EACA;EACA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;AACD;EACE;;EAEA;IACE;EACF;;EAEA;IACE;MACE;IACF;EACF;;EAEA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;OACE;OACA;KACF;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;KACI;KACA;MACC;OACC;MACD;;KAED;KACA;OACE;OACA;;OAEA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;;OAEA;OACA;OACA;KACF;;KAEA;KACA;KACA;KACA;KACA;KACA;KACA;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;GAEE;KACE;KACA;OACE;OACA;KACF;GACF;CACF;CACA;CACA;CACA;CACA;GACE;KACE;KACA;OACE;OACA;SACE;SACA;OACF;KACF;GACF;CACF;CACA;CACA;GACE;KACE;KACA;SACI;WACE;SACF;GACN;;CAEF;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;sCACqC;CACrC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE,UAAU,SAAS;IACjB;;IAEA;MACE;MACA;;MAEA;MACA;QACE;QACA;QACA;QACA;QACA;MACF;IACF;;IAEA;;MAEE;QACE;QACA;QACA;QACA;;MAEF;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;MACJ;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;UACA;UACA;MACJ;;MAEA;QACE;QACA;QACA;MACF;;MAEA;QACE;UACE;YACE;YACA;YACA;;UAEF;UACA;YACE;cACE;YACF;YACA;cACE;cACA;YACF;UACF;UACA;;UAEA;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;cACE;kBACI;gBACF;kBACE;gBACF;kBACE;gBACF;cACF;YACF;UACF;;UAEA;UACA;YACE;UACF;;UAEA;UACA;UACA;UACA;UACA;;;UAGA;UACA;YACE;cACE;cACA;YACF;UACF;QACF;MACF;;;MAGA;QACE;;QAEA;;QAEA;UACE;UACA;UACA;YACE;YACA;cACE;UACJ;UACA;QACF;;QAEA;UACE;QACF;;QAEA;UACE;QACF;;QAEA;UACE;UACA;UACA;UACA;QACF;;QAEA;UACE;;UAEA;YACE;;YAEA;YACA;cACE;gBACE;gBACA;cACF;cACA;cACA;gBACE;kBACE;oBACE;oBACA;oBACA;kBACF;;kBAEA;kBACA;kBACA;gBACF;kBACE;kBACA;kBACA;kBACA;gBACF;cACF;gBACE;gBACA;gBACA;gBACA;cACF;cACA;gBACE;kBACE;kBACA;YACN;YACA;;YAEA;YACA;YACA;YACA;cACE;YACF;cACE;;YAEF;cACE;gBACE;cACF;YACF;;YAEA;YACA;cACE;cACA;;YAEF;cACE;gBACE;;cAEF;gBACE;gBACA;gBACA;kBACE;sBACI;sBACA;oBACF;gBACJ;gBACA;gBACA;kBACE;kBACA;oBACE;sBACE;oBACF;sBACE;sBACA;sBACA;sBACA;oBACF;kBACF;gBACF;kBACE;kBACA;gBACF;cACF;;cAEA;;cAEA;;cAEA;YACF;cACE;;cAEA;;cAEA;YACF;;YAEA;cACE;gBACE;gBACA;gBACA;cACF;cACA;;YAEF;cACE;cACA;cACA;cACA;cACA;;cAEA;YACF;;YAEA;YACA;UACF;;;UAGA;YACE;cACE;YACF;YACA;YACA;UACF;QACF;;QAEA;UACE;QACF;;QAEA;MACF;;MAEA;IACF;EACF;;;AAGF;;AC1pBA;;;;;ACIA;;IAEI;;IAEA;;IAEA;;IAEA;;IAEA;IACA;IACA;;IAEA;;;IAGA;;IAEA;;;;IAIA;;IAEA;;IAEA;;IAEA;;IAEA;IACA;IACA;;IAEA;;IAEA;;IAEA;;;IAGA;;MAEE;UACI;gBACM;gBACA;;MAEV;sBACgB;cACR;cACA;cACA;UACJ;MACJ;;gBAEU;MACV;UACI;MACJ;MACA;gBACU;gBACA;UACN;UACA;UACA;MACJ;;MAEA;QACE;UACE;UACA;MACJ;UACI;MACJ;;MAEA;;IAEF;IACA;;IAEA;MACE;QACE;MACF;IACF;IACA;MACE;QACE;MACF;IACF;;;IAGA;MACE;;QAEE;;QAEA;YACI;QACJ;;QAEA;YACI;;YAEA;;cAEE;cACA;cACA;;cAEA;kBACI;kBACA;cACJ;cACA;kBACI;cACJ;cACA;;YAEF;;cAEE;kBACI;kBACA;cACJ;;YAEF;;QAEJ;;QAEA;MACF;IACF;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;YACI;YACA;gBACI;YACJ;QACJ;QACA;IACJ;;IAEA;QACI;YACI;YACA;;4BAEgB;;4BAEA;gCACI;gBAChB;;4BAEY;YAChB;QACJ;QACA;IACJ;;IAEA;;QAEI;YACI;;YAEA;UACF;;YAEE;UACF;UACA;QACF;IACJ;QACI;;QAEA;UACE;QACF;UACE;YACE;UACF;QACF;;QAEA;IACJ;;;;IAIA;QACI;IACJ;;;IAGA;;QAEI;;wBAEgB;;sBAEF;YACV;UACF;QACF;QACA;IACJ;IACA;QACI;IACJ;IACA;QACI;oCAC4B;YACxB;;YAEA;QACJ;IACJ;;;;KAIC;OACE;SACE;WACE;aACE;WACF;SACF;OACF;;SAEE;;SAEA;8CACqC;SACrC;;SAEA;;SAEA;WACE;SACF;SACA;;OAEF;;OAEA;KACF;;;IAGD;IACA;;;IAGA;;IAEA;IACA;IACA;;;;IAIA;QACI;IACJ;;IAEA;;;IAGA;;oDAEgD;;IAEhD;;AAEJ;;ACvSA;AACA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;IAEI;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;YACQ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;QACD;;QAEA;SACC;SACA;SACA;SACA;SACA;QACD;;IAEJ;KACC;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;YACI;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;YACJ;;YAEA;QACJ;;QAEA;QACA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;;QAEA;QACA;QACA;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;;QAEA;YACI;;QAEJ;YACI;gBACI;gBACA;YACJ;YACA;QACJ;;QAEA;YACI;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;;QAEJ;QACA;YACI;QACJ;;QAEA;QACA;YACI;QACJ;;QAEA;QACA;QACA;YACI;;YAEA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;;gBAEI;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;oBACI;gBACJ;;gBAEA;YACJ;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;YACI;QACJ;;QAEA;YACI;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;YACA;;QAEJ;QACA;YACI;gBACI;YACJ;QACJ;;QAEA;QACA;;YAEI;YACA;YACA;YACA;YACA;YACA;;gBAEI;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;gBACA;oBACI;gBACJ;;gBAEA;;gBAEA;gBACA;gBACA;gBACA;YACJ;;YAEA;YACA;YACA;gBACI;YACJ;QACJ;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;YACI;QACJ;;QAEA;;QAEA;QACA;YACI;QACJ;;QAEA;QACA;YACI;YACA;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;;gBAEI;gBACA;gBACA;oBACI;gBACJ;;gBAEA;oBACI;gBACJ;YACJ;QACJ;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;YACI;QACJ;;QAEA;QACA;QACA;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;QACA;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;gBACI;gBACA;gBACA;YACJ;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;;YAEA;YACA;YACA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;QACJ;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;IACD;QACI;YACI;QACJ;;QAEA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;YACA;YACA;;QAEJ;QACA;QACA;;QAEA;YACI;;YAEA;YACA;gBACI;YACJ;;YAEA;YACA;YACA;YACA;gBACI;gBACA;YACJ;;YAEA;YACA;gBACI;YACJ;QACJ;;QAEA;QACA;QACA;;QAEA;YACI;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;QAEI;QACA;;QAEA;QACA;;QAEA;YACI;;QAEJ;QACA;QACA;YACI;YACA;QACJ;;QAEA;;QAEA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;YACI;YACA;YACA;YACA;YACA;YACA;QACJ;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;QACI;YACI;QACJ;IACJ;;IAEA;IACA;IACA;IACA;;IAEA;;QAEI;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;YACI;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;gBACI;YACJ;YACA;QACJ;;QAEA;SACC;SACA;SACA;SACA;SACA;SACA;QACD;YACI;YACA;YACA;QACJ;;OAED;QACC;QACA;QACA;QACA;QACA;QACA;QACA;;YAEI;YACA;gBACI;YACJ;;YAEA;YACA;QACJ;;QAEA;SACC;SACA;QACD;IACJ;;IAEA;IACA;;IAEA;IACA;QACI;IACJ;AACJ;;ACx7BA;AACA;AACA;;AAEA;;AAEA,eAAe,OAAO;EACpB;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA,aAAa,KAAK;EAChB;IACE;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA;AACA;AC3BA;;AAEA;IACI;KACC;KACA;KACA;KACA;KACA;IACD;AACJ;;AAEA,mCAAmC,cAAc;IAC7C;;IAEA;QACI;YACI;QACJ;YACI;QACJ;IACJ;;IAEA;QACI;YACI;QACJ;YACI;QACJ;IACJ;;IAEA;QACI;IACJ;;IAEA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;YACI;YACA;QACJ;;QAEA;YACI;gBACI;YACJ;;YAEA;gBACI;gBACA;oBACI;gBACJ;oBACI;gBACJ;YACJ;;YAEA;QACJ;;QAEA;YACI;YACA;YACA;QACJ;;QAEA;YACI;YACA;YACA;QACJ;;QAEA;YACI;YACA;YACA;YACA;QACJ;;QAEA;YACI;gBACI;gBACA;gBACA;YACJ;gBACI;oBACI;gBACJ;YACJ;QACJ;IACJ;;IAEA;AACJ;;AAEA,qCAAqC,SAAS;IAC1C;IACA;IACA;QACI;YACI;gBACI;YACJ;QACJ;QACA;YACI;QACJ;IACJ;;IAEA;QACI;YACI;QACJ;IACJ;;IAEA;QACI;QACA;QACA;YACI;YACA;YACA;;YAEA;YACA;;YAEA;gBACI;oBACI;oBACA;;oBAEA;wBACI;wBACA;wBACA;4BACI;4BACA;4BACA;wBACJ;4BACI;wBACJ;;wBAEA;wBACA;wBACA;wBACA;wBACA;wBACA;wBACA;oBACJ;;oBAEA;wBACI;oBACJ;;oBAEA;;oBAEA;gBACJ;YACJ;QACJ;IACJ;AACJ;;AAEA,kCAAkC,SAAS;IACvC;QACI;IACJ;IACA;IACA;AACJ;;AAEA;AACA,mCAAmC,cAAc;IAC7C;QACI;YACI;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;YACA;YACA;YACA;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;YACA;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;gBACA;YACJ;gBACI;QACR;IACJ;AACJ;;ACrSA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;;EAEE;;EAEA,4CAA4C,OAAO;;IAEjD;KACC;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;;IAED;;IAEA;KACC;KACA;KACA;IACD;sBACkB;sBACA;wBACE;0BACE;4BACE;0BACF;0BACA;wBACF;sBACF;sBACA;oBACF;;IAEhB;KACC;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;IACD;;IAEA,YAAY,mEAAA;;MAEV;MACA;MACA;MACA;QACE;QACA;UACE;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;MACD;QACE;UACE;UACA;UACA;UACA;UACA;UACA;UACA;UACA;QACF;QACA;;QAEA;UACE;UACA;YACE;cACE;YACF;cACE;YACF;UACF;;UAEA;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;QACA;QACA;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;MACD;;;MAGA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;;MAGA;QACE;;QAEA;UACE;YACE;YACA;YACA;YACA;YACA;cACE;YACF;;YAEA;YACA;YACA;YACA;UACF;QACF;MACF;;;MAGA;MACA;QACE;QACA;QACA;QACA;;QAEA;QACA;UACE;QACF;;QAEA;MACF;;;MAGA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;QACA;UACE;UACA;YACE;UACF;QACF;MACF;;MAEA;OACC;OACA;MACD;;MAEA;QACE;;QAEA;QACA;QACA;QACA;UACE;UACA;;UAEA;UACA;UACA;UACA;QACF;UACE;;UAEA;UACA;YACE;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;QAEE;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;UACE;UACA;UACA;UACA;UACA;UACA;QACF;;QAEA;QACA;UACE;UACA;UACA;QACF;UACE;QACF;;QAEA;QACA;QACA;QACA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;;UAEE;UACA;;UAEA;UACA;YACE;UACF;;UAEA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;;UAEA;UACA;YACE;YACA;YACA;;YAEA;YACA;cACE;YACF;cACE;cACA;gBACE;kBACE;kBACA;gBACF;cACF;YACF;;YAEA;cACE;YACF;UACF;QACF;;QAEA;UACE;QACF;UACE;QACF;;QAEA;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;QACF;UACE;;UAEA;YACE;YACA;cACE;YACF;cACE;YACF;YACA;UACF;QACF;;QAEA;;MAEF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;QAEE;;QAEA;UACE;;UAEA;YACE;UACF;QACF;;QAEA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;QACE;QACA;;UAEE;UACA;;UAEA;YACE;YACA;cACE;cACA;YACF;UACF;QACF;QACA;QACA;QACA;UACE;YACE;;YAEA;cACE;YACF;cACE;YACF;;YAEA;YACA;UACF;QACF;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;QACE;QACA;;UAEE;UACA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;;UAEA;UACA;UACA;YACE;YACA;UACF;QACF;MACF;;;MAGA;QACE;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;MACF;;MAEA;;IAEF,CAAC,CAAA;EACH;;EAEA,YAAY,MAAM,GAAG,YAAA;IACnB;MACE;MACA;QACE;;QAEA;UACE;UACA;;UAEA;;UAEA;YACE;YACA;YACA;YACA;YACA;UACF;QACF;;QAEA;QACA;UACE;QACF;MACF;IACF;EACF,CAAC,CAAA;;EAED,KAAK,YAAA;IACH;IACA;EACF,CAAC,CAAA;;AAEH;;ACljBA;CACC;CACA;CACA;CACA;CACA;;AAED;AACA;EACE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;IACI;IACA;IACA;IACA;IACA;IACA;IACA;;AAEJ;EACE;AACF;;AAEA;EACE;IACE;MACE;QACE;MACF;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;;EAEA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;EACF;EACA;EACA;;EAEA;;EAEA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;IACA;IACA;;IAEA;MACE;MACA;MACA;IACF;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;IACE;IACA;EACF;;EAEA;IACE;IACA;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;IACE;EACF;EACA;AACF;;AAEA;AACA;AACA;EACE;EACA;IACE;EACF;EACA;AACF;;AAEA;AACA;AACA;EACE;EACA;EACA;IACE;EACF;EACA;AACF;;AAEA;AACA;AACA;EACE;EACA;EACA;IACE;EACF;EACA;AACF;;AAEA;EACE;;EAEA;IACE;EACF;EACA;AACF;;AAEA;EACE;EACA;EACA;IACE;MACE;IACF;EACF;EACA;AACF;;AAEA;EACE;;EAEA;IACE;EACF;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;MACI;MACA;MACA;MACA;MACA;;;EAGJ;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;IACA;IACA;MACE;;MAEA;MACA;QACE;QACA;MACF;MACA;;MAEA;QACE;MACF;QACE;QACA;UACE;QACF;QACA;MACF;;MAEA;MACA;IACF;IACA;IACA;;IAEA;MACE;IACF;;IAEA;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;QACE;MACF;;MAEA;MACA;MACA;UACI;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;UACA;UACA;UACA;QACF;MACF;;MAEA;QACE;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;MACF;;MAEA;MACA;MACA;MACA;QACE;QACA;QACA;MACF;QACE;UACE;QACF;QACA;MACF;;MAEA;MACA;QACE;QACA;MACF;;MAEA;QACE;QACA;QACA;UACE;UACA;QACF;QACA;QACA;QACA;UACE;YACE;YACA;cACE;cACA;YACF;UACF;QACF;QACA;QACA;UACE;UACA;YACE;YACA;cACE;cACA;YACF;UACF;YACE;UACF;QACF;QACA;QACA;MACF;;MAEA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;AACF;;AAEA,0CAA0C,QAAQ;;;AAGlD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;QACI;QACA;EACN;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;AACF;;AAEA,0CAA0C,gBAAgB;;AAE1D;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;MACI;MACA;MACA;MACA;MACA;MACA;;EAEJ;IACE;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;MACE;MACA;MACA;IACF;IACA;EACF;;EAEA;;EAEA;EACA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;MACE;IACF;EACF;;EAEA;EACA;IACE;IACA;;IAEA;IACA;IACA;IACA;EACF;EACA;;EAEA;EACA;;EAEA;IACE;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;QACA;QACA;MACF;IACF;EACF;IACE;IACA;EACF;;EAEA;EACA;;EAEA;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;EACA;IACE;IACA;IACA;EACF;EACA;AACF;;AAEA;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;;EAEA;IACE;IACA;;EAEF;;EAEA;IACE;IACA;;IAEA;IACA;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;MACE;IACF;IACA;IACA;EACF;EACA;IACE;IACA;EACF;;EAEA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;;EAEA;;EAEA;IACE;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;UACE;YACE;UACF;YACE;UACF;QACF;QACA;MACF;QACE;QACA;MACF;QACE;MACF;IACF;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;AACF;;AAEA;EACE;EACA;AACF;;AAEA;;AAEA;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;EACA;EACA;;EAEA;IACE;MACE;QACE;MACF;IACF;;IAEA;IACA;IACA;IACA;MACE;QACE;QACA;QACA;MACF;IACF;IACA;;IAEA;IACA;MACE;QACE;QACA;QACA;UACE;QACF;MACF;IACF;;IAEA;IACA;MACE;QACE;QACA;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;EACF;AACF;;;;AAIA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;AACD;EACE;;EAEA;;EAEA;EACA;AACF;AACA;EACE;;EAEA;IACE;MACE;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;IACF;IACA;MACE;QACE;UACE;QACF;UACE;UACA;QACF;MACF;MACA;QACE;QACA;QACA;MACF;MACA;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;MACA;IACF;IACA;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;MACE;MACA;IACF;EACF;;EAEA;IACE;EACF;;EAEA;GACC;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;QACE;MACF;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;EACA;IACE;MACE;MACA;MACA;IACF;EACF;;EAEA;EACA;EACA;;EAEA;EACA;IACE;IACA;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;MACE;IACF;IACA;IACA;;IAEA;MACE;MACA;wBACkB;MAClB;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;IACF;;IAEA;KACC;KACA;IACD;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;MACE;QACE;QACA;MACF;MACA;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;IACD;MACE;MACA;QACE;QACA;MACF;MACA;MACA;IACF;;IAEA;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;EACF;;EAEA;IACE;MACE;IACF;IACA;MACE;QACE;MACF;MACA;MACA;QACE;YACI;QACJ;MACF;MACA;IACF;IACA;MACE;MACA;QACE;MACF;MACA;IACF;IACA;MACE;MACA;QACE;QACA;MACF;MACA;IACF;IACA;MACE;;MAEA;QACE;QACA;QACA;QACA;MACF;MACA;IACF;IACA;EACF;;EAEA;AACF;;AAEA;AACA,2CAA2C,kBAAkB;AAC7D;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;;EAEA;EACA;IACE;IACA;EACF;;EAEA;EACA;IACE;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;IACF;IACA;IACA;IACA;EACF;;;EAGA;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;;IAEF;MACE;QACE;UACE;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;MACA;QACE;;QAEA;UACE;UACA;QACF;QACA;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;;IAEA;MACE;IACF;;IAEA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;YACS;GACT;EACD;IACE;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;EACA;;IAEE;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;MACA;;MAEA;QACE;;QAEA;QACA;QACA;MACF;MACA;;MAEA;QACE;MACF;MACA;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;;IAEA;MACE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;;MAEA;QACE;MACF;;MAEA;QACE;UACE;UACA;QACF;QACA;;QAEA;QACA;MACF;;MAEA;QACE;QACA;QACA;MACF;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;;QAEA;QACA;UACE;QACF;;QAEA;QACA;;QAEA;UACE;QACF;QACA;;QAEA;UACE;QACF;;QAEA;QACA;;QAEA;MACF;IACF;EACF;AACF;;AAEA,6CAA6C,UAAU;;AAEvD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;;EAEA;EACA;;IAEE;IACA;IACA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;;MAEA;QACE;QACA;MACF;;MAEA;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA;MACE;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;IACA;MACE;IACF;;IAEA;IACA;MACE;MACA;MACA;IACF;;IAEA;EACF;;EAEA;IACE;EACF;;EAEA;IACE;;IAEA;QACI;QACA;;IAEJ;MACE;MACA;;MAEA;;MAEA;QACE;UACE;UACA;QACF;QACA;UACE;UACA;UACA;QACF;QACA;MACF;MACA;MACA;IACF;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;IACE;MACE;IACF;IACA;EACF;;EAEA;IACE;IACA;MACE;IACF;EACF;;EAEA;IACE;IACA;MACE;MACA;MACA;IACF;;IAEA;IACA;IACA;;IAEA;IACA;QACI;QACA;QACA;;IAEJ;IACA;MACE;IACF;;IAEA;MACE;IACF;IACA;;IAEA;IACA;MACE;QACE;UACE;QACF;MACF;IACF;;IAEA;IACA;;IAEA;EACF;;EAEA;EACA;IACE;EACF;;EAEA;EACA;IACE;QACI;;IAEJ;IACA;OACG;OACA;IACH;IACA;IACA;OACG;OACA;IACH;;IAEA;MACE;IACF;;IAEA;IACA;MACE;QACE;MACF;IACF;;IAEA;EACF;;;EAGA;EACA;IACE;IACA;IACA;IACA;EACF;EACA;;;EAGA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;IACA;MACE;IACF;IACA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;EACA;;IAEE;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;QACE;QACA;MACF;;MAEA;QACE;MACF;;MAEA;MACA;QACE;QACA;MACF;MACA;;MAEA;QACE;QACA;QACA;MACF;QACE;MACF;MACA;;MAEA;IACF;;IAEA;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;;MAEA;MACA;;MAEA;QACE;QACA;;QAEA;UACE;QACF;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;UACA;QACF;MACF;MACA;MACA;MACA;;MAEA;MACA;;MAEA;;MAEA;MACA;;MAEA;QACE;UACE;UACA;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;QACE;QACA;QACA;MACF;;MAEA;MACA;;MAEA;MACA;QACE;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;UACE;UACA;QACF;MACF;;MAEA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;QACE;QACA;MACF;;MAEA;MACA;MACA;MACA;MACA;QACE;;QAEA;;QAEA;QACA;UACE;UACA;YACE;UACF;UACA;QACF;;QAEA;QACA;UACE;UACA;UACA;YACE;UACF;QACF;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;;QAEA;UACE;YACE;UACF;QACF;;QAEA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;UACC;QACF;QACA;;QAEA;MACF;QACE;;QAEA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;;QAEA;YACI;QACJ;;QAEA;MACF;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;UACE;QACF;QACA;MACF;;MAEA;MACA;MACA;MACA;IACF;;;IAGA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;QACA;QACA;MACF;;MAEA;;MAEA;MACA;;MAEA;;MAEA;QACE;MACF;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;MACA;MACA;MACA;MACA;QACE;MACF;MACA;;MAEA;MACA;QACE;QACA;UACE;QACF;;QAEA;UACE;UACA;YACE;YACA;UACF;YACE;UACF;UACA;UACA;UACA;UACA;QACF;MACF;;MAEA;MACA;QACE;MACF;IACF;;IAEA;EACF;;EAEA;IACE;MACE;IACF;EACF;AACF;;AAEA;EACE;EACA,WAAW,MAAM;;;AAGnB;AACA;;EAEE;EACA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA;IACE;MACE;MACA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;UACE;QACF;QACA;;QAEA;UACE;QACF;QACA;QACA;SACC;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;UACC;QACF;QACA;MACF;IACF;EACF;AACF;;AAEA,4CAA4C,KAAK;;AAEjD;CACC;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;MACE;IACF;;IAEA;MACE;QACE;MACF;IACF;EACF;AACF;;AAEA,4CAA4C,aAAa;;AAEzD;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;;EAEE;IACE;MACE;IACF;MACE;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;MACI;MACA;;EAEJ;EACA;EACA;IACE;MACE;QACE;QACA;MACF;IACF;;IAEA;MACE;QACE;UACE;UACA;QACF;QACA;UACE;UACA;QACF;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;MACF;IACF;;IAEA;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;MACE;QACE;YACI;YACA;YACA;;QAEJ;UACE;QACF;QACA;UACE;QACF;;QAEA;;QAEA;UACE;YACE;YACA;UACF;;UAEA;YACE;YACA;UACF;;UAEA;YACE;cACE;YACF;;YAEA;YACA;UACF;QACF;;QAEA;UACE;cACI;cACA;;UAEJ;UACA;UACA;;UAEA;YACE;cACE;gBACE;cACF;;cAEA;gBACE;cACF;YACF;YACA;UACF;;UAEA;UACA;UACA;WACC;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;UACA;QACF;MACF;IACF;EACF;;EAEA;AACF;;AAEA;AACA;EACE;IACE;IACA;IACA;MACE;MACA;QACE;YACI;YACA;;QAEJ;UACE;QACF;;QAEA;QACA;;QAEA;;QAEA;UACE;UACA;UACA;YACE;UACF;UACA;UACA;QACF;;QAEA;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;AACD;EACE;EACA;EACA;AACF;;AAEA,6CAA6C,MAAM;AACnD,6CAA6C,MAAM;;AAEnD;EACE;EACA;EACA;EACA;EACA;AACF;;AAEA;EACE;;EAEA;IACE;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;;EAEA;IACE;IACA;IACA;MACE;MACA;MACA;MACA;MACA;;MAEA;MACA;;MAEA;QACE;UACE;QACF;MACF;;MAEA;QACE;QACA;;QAEA;;QAEA;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;MACF;;MAEA;QACE;UACE;QACF;QACA;MACF;MACA;;MAEA;;MAEA;QACE;QACA;UACE;UACA;YACE;UACF;UACA;;UAEA;UACA;UACA;YACE;cACE;UACJ;QACF;MACF;IACF;EACF;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AAED;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;IACA;MACE;;MAEA;MACA;MACA;MACA;;MAEA;MACA;QACE;QACA;QACA;MACF;;MAEA;;MAEA;MACA;QACE;UACE;QACF;UACE;QACF;MACF;;MAEA;QACE;UACE;QACF;UACE;QACF;MACF;IACF;EACF;AACF;;AAEA;EACE,YAAY,MAAM;EAClB,YAAY,YAAY;EACxB,YAAY,cAAc;;AAE5B;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;EACF;EACA;EACA;AACF;;AAEA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA;EACE;IACE;EACF;EACA;EACA;AACF;;AAEA;EACE,SAAS,OAAO;EAChB,SAAS,eAAe;AAC1B;ACvoIA;CACC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;;EAEE;EACA;;EAEA;EACA;MACI;;EAEJ;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;;IAEA;IACA;;IAEA;IACA;EACF;;EAEA;EACA;MACI;MACA;;EAEJ;GACC;GACA;GACA;EACD;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;EACF;;EAEA;EACA;;EAEA;EACA;MACI;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;;EAEJ;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;IACE;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;;EAEA;EACA;EACA;IACE;EACF;;EAEA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;;IAEJ;MACE;QACE;MACF;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;;IAEA;MACE;IACF;IACA;MACE;IACF;IACA;IACA;;IAEA;MACE;MACA;EACJ;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;QACI;;IAEJ;MACE;IACF;MACE;QACE;MACF;MACA;UACI;;MAEJ;QACE;MACF;QACE;MACF;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;QACA;QACA;;IAEJ;MACE;UACI;;MAEJ;QACE;UACE;QACF;QACA;UACE;QACF;MACF;IACF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;QACI;QACA;QACA;QACA;;IAEJ;QACI;MACF;IACF;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;MACE;IACF;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;MACE;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;IACA;MACE;IACF;EACF;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;MACE;IACF;IACA;QACI;QACA;;IAEJ;MACE;IACF;IACA;EACF;;EAEA;;EAEA;GACC;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;IACE;IACA;IACA;IACA;IACA;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;KACC;KACA;KACA;KACA;KACA;IACD;;IAEA;IACA;QACI;QACA;;IAEJ;IACA;;IAEA;IACA;;IAEA;IACA;MACE;QACE;QACA;IACJ;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;IACA;MACE;MACA;QACE;YACI;YACA;MACN;MACA;IACF;;IAEA;IACA;QACI;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;IAEJ;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;QACA;UACE;YACE;UACF;QACF;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;OACC;OACA;IACH;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;IACA;IACA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;MACE;UACI;UACA;;MAEJ;MACA;MACA;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;OACA;OACA;MACD;QACE;MACF;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;MAEA;OACC;OACA;OACA;OACA;OACA;MACD;;QAEE;SACC;SACA;SACA;SACA;SACA;QACD;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;MAEE;MACA;MACA;MACA;MACA;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;MACA;MACA;OACC;MACD;MACA;MACA;OACC;;OAEA;MACD;OACC;;OAEA;MACD;OACC;;UAEG;;OAEH;MACD;UACI;MACJ;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;OACC;MACD;UACI;MACJ;MACA;MACA;OACC;MACD;MACA;MACA;OACC;MACD;OACC;MACD;OACC;MACD;OACC;MACD;MACA;MACA;cACQ;MACR;OACC;MACD;MACA;MACA;OACC;MACD;OACC;;OAEA;;OAEA;MACD;OACC;MACD;MACA;MACA;;MAEA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;QACA;UACE;UACA;UACA;UACA;UACA;QACF;QACA;QACA;QACA;UACE;UACA;cACI;UACJ;QACF;QACA;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;UACE;QACF;MACF;MACA;MACA;MACA;QACE;QACA;UACE;QACF;QACA;QACA;UACE;UACA;YACE;;UAEF;UACA;YACE;;UAEF;YACE;YACA;YACA;QACJ;MACF;QACE;MACF;MACA;MACA;QACE;QACA;QACA;QACA;;QAEA;QACA;UACE;YACE;UACF;QACF;QACA;MACF;MACA;QACE;MACF;MACA;MACA;QACE;UACE;QACF;QACA;UACE;QACF;MACF;MACA;MACA;QACE;MACF;MACA;MACA;MACA;MACA;;MAEA;MACA;QACE;MACF;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;MACE;QACE;QACA;UACE;YACE;YACA;YACA;UACF;UACA;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;QACE;MACF;MACA;MACA;QACE;UACE;QACF;QACA;QACA;UACE;UACA;YACE;UACF;UACA;YACE;YACA;YACA;UACF;QACF;MACF;MACA;MACA;QACE;MACF;MACA;QACE;UACE;QACF;QACA;UACE;QACF;QACA;UACE;QACF;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;QACF;QACA;UACE;UACA;YACE;UACF;UACA;YACE;YACA;UACF;QACF;QACA;QACA;UACE;QACF;QACA;UACE;UACA;UACA;QACF;QACA;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;QACF;UACE;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;;QAEA;YACI;UACF;UACA;YACE;UACF;UACA;cACI;cACA;;UAEJ;UACA;YACE;UACF;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;UACE;QACF;MACF;MACA;MACA;QACE;QACA;MACF;MACA;UACI;;MAEJ;MACA;UACI;UACA;QACF;MACF;MACA;MACA;MACA;QACE;MACF;MACA;MACA;UACI;;MAEJ;QACE;MACF;MACA;QACE;MACF;MACA;QACE;MACF;MACA;QACE;QACA;UACE;UACA;UACA;;QAEF;UACE;UACA;YACE;YACA;YACA;;QAEJ;QACA;UACE;UACA;UACA;MACJ;MACA;MACA;QACE;QACA;YACI;;QAEJ;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;YACI;;QAEJ;QACA;cACM;cACA;YACF;UACF;QACF;MACF;MACA;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;QACE;UACE;QACF;MACF;MACA;MACA;;MAEA;MACA;MACA;;MAEA;MACA;QACE;QACA;QACA;QACA;;QAEA;UACE;UACA;YACE;gBACI;;YAEJ;cACE;gBACE;kBACE;gBACF;cACF;YACF;cACE;YACF;UACF;QACF;MACF;MACA;QACE;QACA;QACA;UACE;YACE;YACA;YACA;YACA;UACF;QACF;;QAEA;UACE;UACA;YACE;cACE;cACA;YACF;UACF;QACF;MACF;MACA;MACA;;MAEA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;YACA;YACA;;QAEJ;UACE;UACA;UACA;YACE;cACE;cACA;YACF;UACF;UACA;YACE;YACA;cACE;cACA;gBACE;cACF;YACF;YACA;cACE;gBACE;gBACA;YACJ;YACA;YACA;YACA;;YAEA;YACA;cACE;YACF;UACF;QACF;QACA;UACE;YACE;YACA;cACE;YACF;UACF;UACA;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;UACI;;MAEJ;QACE;QACA;QACA;MACF;MACA;QACE;YACI;;QAEJ;cACM;cACA;YACF;UACF;YACE;UACF;UACA;QACF;MACF;MACA;QACE;QACA;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;;QAEA;UACE;cACI;;UAEJ;YACE;YACA;UACF;QACF;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;MACF;MACA;QACE;QACA;MACF;MACA;MACA;QACE;QACA;QACA;UACE;QACF;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;UACE;QACF;QACA;QACA;QACA;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;MACA;MACA;MACA;;MAEA;MACA;QACE;UACE;QACF;MACF;MACA;MACA;;MAEA;MACA;UACI;UACA;UACA;QACF;MACF;;MAEA;MACA;QACE;QACA;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;UACI;UACA;UACA;QACF;MACF;MACA;MACA;MACA;MACA;QACE;UACE;UACA;QACF;QACA;MACF;MACA;MACA;MACA;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;IACA;IACA;MACE;QACE;UACE;MACJ;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;UACI;QACF;MACF;MACA;IACF;;IAEA;IACA;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;QACA;QACA;QACA;QACA;MACF;MACA;MACA;IACF;;IAEA;IACA;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;IACA;;IAEA;IACA;QACI;;IAEJ;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;UACA;UACA;UACA;UACA;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;MAEA;QACE;MACF;;MAEA;MACA;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;UACI;;MAEJ;UACI;UACA;QACF;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;IACA;IACA;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;UACI;;MAEJ;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;MACA;MACA;QACE;MACF;MACA;QACE;MACF;QACE;MACF;MACA;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;UACE;QACF;QACA;;QAEA;YACI;;QAEJ;UACE;UACA;QACF;MACF;QACE;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;YACI;YACA;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;QACA;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;UACE;QACF;UACE;cACI;;UAEJ;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;MACA;QACE;MACF;QACE;MACF;QACE;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;YACE;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;;MAEA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;QACA;UACE;YACE;YACA;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;UACE;YACE;UACF;QACF;MACF;QACE;UACE;UACA;QACF;UACE;QACF;QACA;UACE;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;UACE;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;UACA;;QAEF;UACE;UACA;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;YACE;UACF;QACF;MACF;QACE;UACE;UACA;;QAEF;UACE;UACA;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;QACF;QACA;UACE;QACF;MACF;QACE;UACE;YACE;YACA;QACJ;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;QACE;MACF;MACA;QACE;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;MACF;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;UACE;QACF;UACE;QACF;QACA;QACA;MACF;;MAEA;MACA;MACA;QACE;QACA;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;QACA;UACE;UACA;YACE;QACJ;MACF;MACA;UACI;UACA;UACA;;MAEJ;MACA;QACE;QACA;;QAEA;UACE;UACA;UACA;YACE;YACA;cACE;YACF;UACF;UACA;QACF;MACF;MACA;QACE;QACA;UACE;QACF;MACF;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;QACA;UACE;QACF;MACF;QACE;QACA;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;YACI;QACJ;UACE;YACE;YACA;UACF;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;;MAEA;QACE;QACA;MACF;MACA;MACA;MACA;UACI;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;MACA;QACE;QACA;UACE;UACA;UACA;QACF;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;YACI;YACA;;QAEJ;QACA;UACE;QACF;MACF;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;MACA;MACA;;MAEA;QACE;QACA;UACE;UACA;MACJ;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;QACA;QACA;MACF;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;QACA;UACE;YACE;YACA;QACJ;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;;MAEJ;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;MACF;MACA;QACE;QACA;UACE;QACF;UACE;QACF;MACF;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;QACE;UACE;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;;MAEJ;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;IACJ;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;QACF;MACF;MACA;QACE;YACI;;QAEJ;UACE;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;MAEJ;QACE;MACF;MACA;MACA;QACE;QACA;MACF;QACE;QACA;QACA;MACF;MACA;QACE;QACA;UACE;YACE;UACF;UACA;UACA;UACA;YACE;YACA;YACA;cACE;YACF;UACF;QACF;UACE;QACF;MACF;;MAEA;QACE;UACE;QACF;QACA;QACA;UACE;UACA;UACA;YACE;UACF;QACF;MACF;;MAEA;QACE;QACA;QACA;QACA;;QAEA;UACE;QACF;UACE;YACE;UACF;UACA;cACI;;UAEJ;YACE;cACE;YACF;YACA;YACA;UACF;UACA;YACE;UACF;QACF;QACA;UACE;QACF;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;UACE;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;MACA;QACE;YACI;;QAEJ;UACE;UACA;MACJ;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;QACE;UACE;QACF;QACA;QACA;;QAEA;QACA;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;MACF;MACA;QACE;MACF;QACE;QACA;MACF;MACA;MACA;MACA;;MAEA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;QACE;MACF;MACA;MACA;QACE;MACF;MACA;UACI;UACA;;MAEJ;MACA;QACE;QACA;QACA;UACE;UACA;QACF;MACF;MACA;QACE;YACI;;QAEJ;UACE;YACE;UACF;QACF;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;QACF;QACA;QACA;QACA;QACA;MACF;MACA;QACE;MACF;QACE;MACF;MACA;UACI;;MAEJ;QACE;QACA;UACE;YACE;gBACI;gBACA;;YAEJ;YACA;YACA;cACE;gBACE;cACF;cACA;cACA;YACF;YACA;UACF;QACF;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;UACI;;MAEJ;QACE;UACE;UACA;QACF;QACA;UACE;UACA;QACF;MACF;MACA;QACE;MACF;MACA;MACA;QACE;QACA;MACF;QACE;MACF;MACA;QACE;QACA;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;QACE;QACA;MACF;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;MACA;MACA;MACA;;MAEA;MACA;;MAEA;UACI;UACA;;MAEJ;UACI;UACA;UACA;;MAEJ;MACA;QACE;QACA;QACA;QACA;MACF;;MAEA;QACE;;QAEA;QACA;;QAEA;QACA;UACE;QACF;QACA;UACE;UACA;QACF;QACA;UACE;QACF;QACA;;QAEA;QACA;QACA;MACF;;MAEA;;MAEA;MACA;MACA;UACI;;MAEJ;QACE;QACA;MACF;MACA;MACA;QACE;QACA;;MAEF;MACA;QACE;QACA;QACA;UACE;YACE;UACF;QACF;QACA;QACA;;MAEF;MACA;MACA;;MAEA;QACE;MACF;QACE;QACA;MACF;MACA;QACE;MACF;MACA;MACA;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;UACI;;MAEJ;MACA;QACE;MACF;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;IACD;MACE;IACF;;IAEA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;;IAEA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA;MACE;MACA;QACE;UACE;QACF;MACF;MACA;IACF;;IAEA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;;IAEA;MACE;MACA;QACE;UACE;cACI;;UAEJ;YACE;YACA;QACJ;MACF;IACF;;IAEA;;IAEA;KACC;KACA;KACA;KACA;KACA;KACA;IACD;;IAEA;IACA;IACA;IACA;IACA;;IAEA;IACA;MACE;MACA;QACE;YACI;;QAEJ;UACE;UACA;MACJ;IACF;;IAEA;IACA;MACE;MACA;QACE;QACA;MACF;IACF;;IAEA;IACA;MACE;MACA;QACE;MACF;IACF;;IAEA;IACA;IACA;MACE;QACE;YACI;;QAEJ;UACE;cACI;cACA;;UAEJ;YACE;UACF;UACA;YACE;YACA;QACJ;MACF;IACF;;IAEA;EACF;;EAEA;;EAEA;EACA;;EAEA;EACA;IACE;IACA;IACA;IACA;;IAEA;IACA;IACA;MACE;IACF;EACF;EACA;EACA;IACE;IACA;MACE;IACF;IACA;IACA;MACE;IACF;EACF;EACA;IACE;IACA;EACF;AACF;;ACp/NA;AACA;AACA;AACA;AACA;AACA;;AAEA;EACE;;EAEA;;EAEA;EACA;EACA;;EAEA;;EAEA;IACE;IACA;IACA;MACE;MACA;IACF;IACA;EACF;;EAEA;;EAEA;IACE;MACE;IACF;MACE;IACF;MACE;EACJ;;EAEA;EACA;IACE;IACA;IACA;MACE;MACA;MACA;MACA;IACF;EACF;;EAEA;IACE;IACA;IACA;IACA;IACA;EACF;;EAEA;EACA;EACA;;EAEA;EACA;EACA;EACA;EACA;;EAEA;IACE;MACE;IACF;;IAEA;;IAEA;MACE;QACE;MACF;MACA;IACF;;IAEA;MACE;MACA;QACE;QACA;UACE;QACF;QACA;UACE;UACA;YACE;YACA;cACE;gBACE;cACF;cACA;YACF;UACF;YACE;UACF;UACA;YACE;UACF;;UAEA;YACE;UACF;UACA;YACE;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;UACF;UACA;UACA;UACA;UACA;UACA;QACF;MACF;MACA;IACF;;IAEA;;IAEA;MACE;MACA;QACE;UACE;QACF;QACA;UACE;QACF;QACA;UACE;YACE;YACA;YACA;cACE;cACA;gBACE;kBACE;gBACF;gBACA;kBACE;gBACF;gBACA;kBACE;gBACF;cACF;YACF;YACA;cACE;YACF;YACA;UACF;UACA;YACE;UACF;UACA;YACE;UACF;UACA;QACF;QACA;UACE;QACF;QACA;MACF;MACA;IACF;;IAEA;EACF;;;;EAIA;;EAEA;;IAEE;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;QACE;QACA;;MAEF;QACE;QACA;QACA;QACA;MACF;;MAEA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;QACE;;QAEA;UACE;QACF;UACE;QACF;UACE;QACF;UACE;QACF;MACF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;QACE;;MAEF;;MAEA;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;KACC;KACA;KACA;KACA;IACD;MACE;;MAEA;MACA;;MAEA;;MAEA;QACE;;MAEF;QACE;MACF;QACE;;MAEF;IACF;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;;MAEA;;MAEA;QACE;MACF;QACE;;MAEF;QACE;UACE;UACA;QACF;UACE;UACA;kBACQ;QACV;UACE;UACA;QACF;IACJ;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;;IAEA;MACE;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;;MAEA;MACA;;MAEA;QACE;;MAEF;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;;MAEA;IACF;;IAEA;MACE;MACA;MACA;IACF;;IAEA;MACE;;MAEA;UACI;UACA;;MAEJ;QACE;QACA;MACF;;MAEA;IACF;;IAEA;MACE;IACF;;IAEA;MACE;IACF;;IAEA;MACE;MACA;QACE;MACF;IACF;;IAEA;MACE;;MAEA;QACE;QACA;MACF;;MAEA;IACF;;IAEA;MACE;;MAEA;;MAEA;MACA;;MAEA;MACA;MACA;IACF;;IAEA;MACE;MACA;MACA;;MAEA;QACE;QACA;QACA;;MAEF;QACE;;QAEA;UACE;UACA;YACE;YACA;cACE;UACJ;UACA;QACF;MACF;;MAEA;QACE;;MAEF;IACF;;IAEA;MACE;MACA;MACA;;MAEA;;MAEA;;MAEA;QACE;UACE;YACE;cACE;YACF;cACE;UACJ;YACE;;UAEF;UACA;QACF;;MAEF;IACF;;IAEA;MACE;MACA;MACA;MACA;MACA;IACF;EACF;;EAEA;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;EAEA;EACA;IACE;MACE;;IAEF;EACF;;EAEA;EACA;IACE;;;EAGF;EACA;EACA;EACA;AACF","file":"libs.js","sourcesContent":["/**\n * @license AngularJS v1.3.0-rc.3\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, document, undefined) {'use strict';\n\n/**\n * @description\n *\n * This object provides a utility for producing rich Error messages within\n * Angular. It can be called as follows:\n *\n * var exampleMinErr = minErr('example');\n * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n *\n * The above creates an instance of minErr in the example namespace. The\n * resulting error will have a namespaced error code of example.one. The\n * resulting error will replace {0} with the value of foo, and {1} with the\n * value of bar. The object is not restricted in the number of arguments it can\n * take.\n *\n * If fewer arguments are specified than necessary for interpolation, the extra\n * interpolation markers will be preserved in the final string.\n *\n * Since data will be parsed statically during a build step, some restrictions\n * are applied with respect to how minErr instances are created and called.\n * Instances should have names of the form namespaceMinErr for a minErr created\n * using minErr('namespace') . Error codes, namespaces and template strings\n * should all be static strings, not variables or general expressions.\n *\n * @param {string} module The namespace to use for the new minErr instance.\n * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning\n * error from returned function, for cases when a particular type of error is useful.\n * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance\n */\n\nfunction minErr(module, ErrorConstructor) {\n ErrorConstructor = ErrorConstructor || Error;\n return function () {\n var code = arguments[0],\n prefix = '[' + (module ? module + ':' : '') + code + '] ',\n template = arguments[1],\n templateArgs = arguments,\n stringify = function (obj) {\n if (typeof obj === 'function') {\n return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n } else if (typeof obj === 'undefined') {\n return 'undefined';\n } else if (typeof obj !== 'string') {\n return JSON.stringify(obj);\n }\n return obj;\n },\n message, i;\n\n message = prefix + template.replace(/\\{\\d+\\}/g, function (match) {\n var index = +match.slice(1, -1), arg;\n\n if (index + 2 < templateArgs.length) {\n arg = templateArgs[index + 2];\n if (typeof arg === 'function') {\n return arg.toString().replace(/ ?\\{[\\s\\S]*$/, '');\n } else if (typeof arg === 'undefined') {\n return 'undefined';\n } else if (typeof arg !== 'string') {\n return toJson(arg);\n }\n return arg;\n }\n return match;\n });\n\n message = message + '\\nhttp://errors.angularjs.org/1.3.0-rc.3/' +\n (module ? module + '/' : '') + code;\n for (i = 2; i < arguments.length; i++) {\n message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +\n encodeURIComponent(stringify(arguments[i]));\n }\n return new ErrorConstructor(message);\n };\n}\n\n/* We need to tell jshint what variables are being exported */\n/* global angular: true,\n msie: true,\n jqLite: true,\n jQuery: true,\n slice: true,\n push: true,\n toString: true,\n ngMinErr: true,\n angularModule: true,\n uid: true,\n REGEX_STRING_REGEXP: true,\n VALIDITY_STATE_PROPERTY: true,\n\n lowercase: true,\n uppercase: true,\n manualLowercase: true,\n manualUppercase: true,\n nodeName_: true,\n isArrayLike: true,\n forEach: true,\n sortedKeys: true,\n forEachSorted: true,\n reverseParams: true,\n nextUid: true,\n setHashKey: true,\n extend: true,\n int: true,\n inherit: true,\n noop: true,\n identity: true,\n valueFn: true,\n isUndefined: true,\n isDefined: true,\n isObject: true,\n isString: true,\n isNumber: true,\n isDate: true,\n isArray: true,\n isFunction: true,\n isRegExp: true,\n isWindow: true,\n isScope: true,\n isFile: true,\n isBlob: true,\n isBoolean: true,\n isPromiseLike: true,\n trim: true,\n isElement: true,\n makeMap: true,\n size: true,\n includes: true,\n arrayRemove: true,\n isLeafNode: true,\n copy: true,\n shallowCopy: true,\n equals: true,\n csp: true,\n concat: true,\n sliceArgs: true,\n bind: true,\n toJsonReplacer: true,\n toJson: true,\n fromJson: true,\n startingTag: true,\n tryDecodeURIComponent: true,\n parseKeyValue: true,\n toKeyValue: true,\n encodeUriSegment: true,\n encodeUriQuery: true,\n angularInit: true,\n bootstrap: true,\n getTestability: true,\n snake_case: true,\n bindJQuery: true,\n assertArg: true,\n assertArgFn: true,\n assertNotHasOwnProperty: true,\n getter: true,\n getBlockNodes: true,\n hasOwnProperty: true,\n createMap: true,\n*/\n\n////////////////////////////////////\n\n/**\n * @ngdoc module\n * @name ng\n * @module ng\n * @description\n *\n * # ng (core module)\n * The ng module is loaded by default when an AngularJS application is started. The module itself\n * contains the essential components for an AngularJS application to function. The table below\n * lists a high level breakdown of each of the services/factories, filters, directives and testing\n * components available within this core module.\n *\n * \n */\n\nvar REGEX_STRING_REGEXP = /^\\/(.+)\\/([a-z]*)$/;\n\n// The name of a form control's ValidityState property.\n// This is used so that it's possible for internal tests to create mock ValidityStates.\nvar VALIDITY_STATE_PROPERTY = 'validity';\n\n/**\n * @ngdoc function\n * @name angular.lowercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to lowercase.\n * @param {string} string String to be converted to lowercase.\n * @returns {string} Lowercased string.\n */\nvar lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * @ngdoc function\n * @name angular.uppercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to uppercase.\n * @param {string} string String to be converted to uppercase.\n * @returns {string} Uppercased string.\n */\nvar uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};\n\n\nvar manualLowercase = function(s) {\n /* jshint bitwise: false */\n return isString(s)\n ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})\n : s;\n};\nvar manualUppercase = function(s) {\n /* jshint bitwise: false */\n return isString(s)\n ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})\n : s;\n};\n\n\n// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish\n// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods\n// with correct but slower alternatives.\nif ('i' !== 'I'.toLowerCase()) {\n lowercase = manualLowercase;\n uppercase = manualUppercase;\n}\n\n\nvar /** holds major version number for IE or NaN for real browsers */\n msie,\n jqLite, // delay binding since jQuery could be loaded after us.\n jQuery, // delay binding\n slice = [].slice,\n push = [].push,\n toString = Object.prototype.toString,\n ngMinErr = minErr('ng'),\n\n /** @name angular */\n angular = window.angular || (window.angular = {}),\n angularModule,\n uid = 0;\n\n/**\n * IE 11 changed the format of the UserAgent string.\n * See http://msdn.microsoft.com/en-us/library/ms537503.aspx\n */\nmsie = int((/msie (\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\nif (isNaN(msie)) {\n msie = int((/trident\\/.*; rv:(\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\n}\n\n\n/**\n * @private\n * @param {*} obj\n * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,\n * String ...)\n */\nfunction isArrayLike(obj) {\n if (obj == null || isWindow(obj)) {\n return false;\n }\n\n var length = obj.length;\n\n if (obj.nodeType === 1 && length) {\n return true;\n }\n\n return isString(obj) || isArray(obj) || length === 0 ||\n typeof length === 'number' && length > 0 && (length - 1) in obj;\n}\n\n/**\n * @ngdoc function\n * @name angular.forEach\n * @module ng\n * @kind function\n *\n * @description\n * Invokes the `iterator` function once for each item in `obj` collection, which can be either an\n * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`\n * is the value of an object property or an array element, `key` is the object property key or\n * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.\n *\n * It is worth noting that `.forEach` does not iterate over inherited properties because it filters\n * using the `hasOwnProperty` method.\n *\n ```js\n var values = {name: 'misko', gender: 'male'};\n var log = [];\n angular.forEach(values, function(value, key) {\n this.push(key + ': ' + value);\n }, log);\n expect(log).toEqual(['name: misko', 'gender: male']);\n ```\n *\n * @param {Object|Array} obj Object to iterate over.\n * @param {Function} iterator Iterator function.\n * @param {Object=} context Object to become context (`this`) for the iterator function.\n * @returns {Object|Array} Reference to `obj`.\n */\n\nfunction forEach(obj, iterator, context) {\n var key, length;\n if (obj) {\n if (isFunction(obj)) {\n for (key in obj) {\n // Need to check if hasOwnProperty exists,\n // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function\n if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (isArray(obj) || isArrayLike(obj)) {\n var isPrimitive = typeof obj !== 'object';\n for (key = 0, length = obj.length; key < length; key++) {\n if (isPrimitive || key in obj) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n } else if (obj.forEach && obj.forEach !== forEach) {\n obj.forEach(iterator, context, obj);\n } else {\n for (key in obj) {\n if (obj.hasOwnProperty(key)) {\n iterator.call(context, obj[key], key, obj);\n }\n }\n }\n }\n return obj;\n}\n\nfunction sortedKeys(obj) {\n var keys = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n keys.push(key);\n }\n }\n return keys.sort();\n}\n\nfunction forEachSorted(obj, iterator, context) {\n var keys = sortedKeys(obj);\n for ( var i = 0; i < keys.length; i++) {\n iterator.call(context, obj[keys[i]], keys[i]);\n }\n return keys;\n}\n\n\n/**\n * when using forEach the params are value, key, but it is often useful to have key, value.\n * @param {function(string, *)} iteratorFn\n * @returns {function(*, string)}\n */\nfunction reverseParams(iteratorFn) {\n return function(value, key) { iteratorFn(key, value); };\n}\n\n/**\n * A consistent way of creating unique IDs in angular.\n *\n * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before\n * we hit number precision issues in JavaScript.\n *\n * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M\n *\n * @returns {number} an unique alpha-numeric string\n */\nfunction nextUid() {\n return ++uid;\n}\n\n\n/**\n * Set or clear the hashkey for an object.\n * @param obj object\n * @param h the hashkey (!truthy to delete the hashkey)\n */\nfunction setHashKey(obj, h) {\n if (h) {\n obj.$$hashKey = h;\n }\n else {\n delete obj.$$hashKey;\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.extend\n * @module ng\n * @kind function\n *\n * @description\n * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)\n * to `dst`. You can specify multiple `src` objects.\n *\n * @param {Object} dst Destination object.\n * @param {...Object} src Source object(s).\n * @returns {Object} Reference to `dst`.\n */\nfunction extend(dst) {\n var h = dst.$$hashKey;\n\n for (var i = 1, ii = arguments.length; i < ii; i++) {\n var obj = arguments[i];\n if (obj) {\n var keys = Object.keys(obj);\n for (var j = 0, jj = keys.length; j < jj; j++) {\n var key = keys[j];\n dst[key] = obj[key];\n }\n }\n }\n\n setHashKey(dst, h);\n return dst;\n}\n\nfunction int(str) {\n return parseInt(str, 10);\n}\n\n\nfunction inherit(parent, extra) {\n return extend(new (extend(function() {}, {prototype:parent}))(), extra);\n}\n\n/**\n * @ngdoc function\n * @name angular.noop\n * @module ng\n * @kind function\n *\n * @description\n * A function that performs no operations. This function can be useful when writing code in the\n * functional style.\n ```js\n function foo(callback) {\n var result = calculateResult();\n (callback || angular.noop)(result);\n }\n ```\n */\nfunction noop() {}\nnoop.$inject = [];\n\n\n/**\n * @ngdoc function\n * @name angular.identity\n * @module ng\n * @kind function\n *\n * @description\n * A function that returns its first argument. This function is useful when writing code in the\n * functional style.\n *\n ```js\n function transformer(transformationFn, value) {\n return (transformationFn || angular.identity)(value);\n };\n ```\n */\nfunction identity($) {return $;}\nidentity.$inject = [];\n\n\nfunction valueFn(value) {return function() {return value;};}\n\n/**\n * @ngdoc function\n * @name angular.isUndefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is undefined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is undefined.\n */\nfunction isUndefined(value){return typeof value === 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is defined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is defined.\n */\nfunction isDefined(value){return typeof value !== 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isObject\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not\n * considered to be objects. Note that JavaScript arrays are objects.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Object` but not `null`.\n */\nfunction isObject(value){\n // http://jsperf.com/isobject4\n return value !== null && typeof value === 'object';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isString\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `String`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `String`.\n */\nfunction isString(value){return typeof value === 'string';}\n\n\n/**\n * @ngdoc function\n * @name angular.isNumber\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Number`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Number`.\n */\nfunction isNumber(value){return typeof value === 'number';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDate\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a value is a date.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Date`.\n */\nfunction isDate(value) {\n return toString.call(value) === '[object Date]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isArray\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Array`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Array`.\n */\nvar isArray = Array.isArray;\n\n/**\n * @ngdoc function\n * @name angular.isFunction\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Function`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Function`.\n */\nfunction isFunction(value){return typeof value === 'function';}\n\n\n/**\n * Determines if a value is a regular expression object.\n *\n * @private\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `RegExp`.\n */\nfunction isRegExp(value) {\n return toString.call(value) === '[object RegExp]';\n}\n\n\n/**\n * Checks if `obj` is a window object.\n *\n * @private\n * @param {*} obj Object to check\n * @returns {boolean} True if `obj` is a window obj.\n */\nfunction isWindow(obj) {\n return obj && obj.window === obj;\n}\n\n\nfunction isScope(obj) {\n return obj && obj.$evalAsync && obj.$watch;\n}\n\n\nfunction isFile(obj) {\n return toString.call(obj) === '[object File]';\n}\n\n\nfunction isBlob(obj) {\n return toString.call(obj) === '[object Blob]';\n}\n\n\nfunction isBoolean(value) {\n return typeof value === 'boolean';\n}\n\n\nfunction isPromiseLike(obj) {\n return obj && isFunction(obj.then);\n}\n\n\nvar trim = function(value) {\n return isString(value) ? value.trim() : value;\n};\n\n\n/**\n * @ngdoc function\n * @name angular.isElement\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a DOM element (or wrapped jQuery element).\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).\n */\nfunction isElement(node) {\n return !!(node &&\n (node.nodeName // we are a direct element\n || (node.prop && node.attr && node.find))); // we have an on and find method part of jQuery API\n}\n\n/**\n * @param str 'key1,key2,...'\n * @returns {object} in the form of {key1:true, key2:true, ...}\n */\nfunction makeMap(str) {\n var obj = {}, items = str.split(\",\"), i;\n for ( i = 0; i < items.length; i++ )\n obj[ items[i] ] = true;\n return obj;\n}\n\n\nfunction nodeName_(element) {\n return lowercase(element.nodeName || element[0].nodeName);\n}\n\n\n/**\n * @description\n * Determines the number of elements in an array, the number of properties an object has, or\n * the length of a string.\n *\n * Note: This function is used to augment the Object type in Angular expressions. See\n * {@link angular.Object} for more information about Angular arrays.\n *\n * @param {Object|Array|string} obj Object, array, or string to inspect.\n * @param {boolean} [ownPropsOnly=false] Count only \"own\" properties in an object\n * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.\n */\nfunction size(obj, ownPropsOnly) {\n var count = 0, key;\n\n if (isArray(obj) || isString(obj)) {\n return obj.length;\n } else if (isObject(obj)) {\n for (key in obj)\n if (!ownPropsOnly || obj.hasOwnProperty(key))\n count++;\n }\n\n return count;\n}\n\n\nfunction includes(array, obj) {\n return Array.prototype.indexOf.call(array, obj) != -1;\n}\n\nfunction arrayRemove(array, value) {\n var index = array.indexOf(value);\n if (index >=0)\n array.splice(index, 1);\n return value;\n}\n\nfunction isLeafNode (node) {\n if (node) {\n switch (nodeName_(node)) {\n case \"option\":\n case \"pre\":\n case \"title\":\n return true;\n }\n }\n return false;\n}\n\n/**\n * @ngdoc function\n * @name angular.copy\n * @module ng\n * @kind function\n *\n * @description\n * Creates a deep copy of `source`, which should be an object or an array.\n *\n * * If no destination is supplied, a copy of the object or array is created.\n * * If a destination is provided, all of its elements (for array) or properties (for objects)\n * are deleted and then all elements/properties from the source are copied to it.\n * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.\n * * If `source` is identical to 'destination' an exception will be thrown.\n *\n * @param {*} source The source that will be used to make a copy.\n * Can be any type, including primitives, `null`, and `undefined`.\n * @param {(Object|Array)=} destination Destination into which the source is copied. If\n * provided, must be of the same type as `source`.\n * @returns {*} The copy or updated `destination`, if `destination` was specified.\n *\n * @example\n \n \n \n \n Name: \n E-mail: \n Gender: male\n female\n RESET\n SAVE\n \n form = {{user | json}}\n master = {{master | json}}\n \n\n \n \n \n */\nfunction copy(source, destination, stackSource, stackDest) {\n if (isWindow(source) || isScope(source)) {\n throw ngMinErr('cpws',\n \"Can't copy! Making copies of Window or Scope instances is not supported.\");\n }\n\n if (!destination) {\n destination = source;\n if (source) {\n if (isArray(source)) {\n destination = copy(source, [], stackSource, stackDest);\n } else if (isDate(source)) {\n destination = new Date(source.getTime());\n } else if (isRegExp(source)) {\n destination = new RegExp(source.source, source.toString().match(/[^\\/]*$/)[0]);\n destination.lastIndex = source.lastIndex;\n } else if (isObject(source)) {\n var emptyObject = Object.create(Object.getPrototypeOf(source));\n destination = copy(source, emptyObject, stackSource, stackDest);\n }\n }\n } else {\n if (source === destination) throw ngMinErr('cpi',\n \"Can't copy! Source and destination are identical.\");\n\n stackSource = stackSource || [];\n stackDest = stackDest || [];\n\n if (isObject(source)) {\n var index = stackSource.indexOf(source);\n if (index !== -1) return stackDest[index];\n\n stackSource.push(source);\n stackDest.push(destination);\n }\n\n var result;\n if (isArray(source)) {\n destination.length = 0;\n for ( var i = 0; i < source.length; i++) {\n result = copy(source[i], null, stackSource, stackDest);\n if (isObject(source[i])) {\n stackSource.push(source[i]);\n stackDest.push(result);\n }\n destination.push(result);\n }\n } else {\n var h = destination.$$hashKey;\n if (isArray(destination)) {\n destination.length = 0;\n } else {\n forEach(destination, function(value, key) {\n delete destination[key];\n });\n }\n for ( var key in source) {\n if(source.hasOwnProperty(key)) {\n result = copy(source[key], null, stackSource, stackDest);\n if (isObject(source[key])) {\n stackSource.push(source[key]);\n stackDest.push(result);\n }\n destination[key] = result;\n }\n }\n setHashKey(destination,h);\n }\n\n }\n return destination;\n}\n\n/**\n * Creates a shallow copy of an object, an array or a primitive.\n *\n * Assumes that there are no proto properties for objects.\n */\nfunction shallowCopy(src, dst) {\n if (isArray(src)) {\n dst = dst || [];\n\n for (var i = 0, ii = src.length; i < ii; i++) {\n dst[i] = src[i];\n }\n } else if (isObject(src)) {\n dst = dst || {};\n\n for (var key in src) {\n if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n dst[key] = src[key];\n }\n }\n }\n\n return dst || src;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.equals\n * @module ng\n * @kind function\n *\n * @description\n * Determines if two objects or two values are equivalent. Supports value types, regular\n * expressions, arrays and objects.\n *\n * Two objects or values are considered equivalent if at least one of the following is true:\n *\n * * Both objects or values pass `===` comparison.\n * * Both objects or values are of the same type and all of their properties are equal by\n * comparing them with `angular.equals`.\n * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)\n * * Both values represent the same regular expression (In JavaScript,\n * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual\n * representation matches).\n *\n * During a property comparison, properties of `function` type and properties with names\n * that begin with `$` are ignored.\n *\n * Scope and DOMWindow objects are being compared only by identify (`===`).\n *\n * @param {*} o1 Object or value to compare.\n * @param {*} o2 Object or value to compare.\n * @returns {boolean} True if arguments are equal.\n */\nfunction equals(o1, o2) {\n if (o1 === o2) return true;\n if (o1 === null || o2 === null) return false;\n if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n if (t1 == t2) {\n if (t1 == 'object') {\n if (isArray(o1)) {\n if (!isArray(o2)) return false;\n if ((length = o1.length) == o2.length) {\n for(key=0; key 2 ? sliceArgs(arguments, 2) : [];\n if (isFunction(fn) && !(fn instanceof RegExp)) {\n return curryArgs.length\n ? function() {\n return arguments.length\n ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))\n : fn.apply(self, curryArgs);\n }\n : function() {\n return arguments.length\n ? fn.apply(self, arguments)\n : fn.call(self);\n };\n } else {\n // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)\n return fn;\n }\n}\n\n\nfunction toJsonReplacer(key, value) {\n var val = value;\n\n if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {\n val = undefined;\n } else if (isWindow(value)) {\n val = '$WINDOW';\n } else if (value && document === value) {\n val = '$DOCUMENT';\n } else if (isScope(value)) {\n val = '$SCOPE';\n }\n\n return val;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.toJson\n * @module ng\n * @kind function\n *\n * @description\n * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be\n * stripped since angular uses this notation internally.\n *\n * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.\n * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.\n * @returns {string|undefined} JSON-ified string representing `obj`.\n */\nfunction toJson(obj, pretty) {\n if (typeof obj === 'undefined') return undefined;\n return JSON.stringify(obj, toJsonReplacer, pretty ? ' ' : null);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.fromJson\n * @module ng\n * @kind function\n *\n * @description\n * Deserializes a JSON string.\n *\n * @param {string} json JSON string to deserialize.\n * @returns {Object|Array|string|number} Deserialized thingy.\n */\nfunction fromJson(json) {\n return isString(json)\n ? JSON.parse(json)\n : json;\n}\n\n\n/**\n * @returns {string} Returns the string representation of the element.\n */\nfunction startingTag(element) {\n element = jqLite(element).clone();\n try {\n // turns out IE does not let you set .html() on elements which\n // are not allowed to have children. So we just ignore it.\n element.empty();\n } catch(e) {}\n // As Per DOM Standards\n var TEXT_NODE = 3;\n var elemHtml = jqLite('').append(element).html();\n try {\n return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :\n elemHtml.\n match(/^(<[^>]+>)/)[1].\n replace(/^<([\\w\\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });\n } catch(e) {\n return lowercase(elemHtml);\n }\n\n}\n\n\n/////////////////////////////////////////////////\n\n/**\n * Tries to decode the URI component without throwing an exception.\n *\n * @private\n * @param str value potential URI component to check.\n * @returns {boolean} True if `value` can be decoded\n * with the decodeURIComponent function.\n */\nfunction tryDecodeURIComponent(value) {\n try {\n return decodeURIComponent(value);\n } catch(e) {\n // Ignore any invalid uri component\n }\n}\n\n\n/**\n * Parses an escaped url query string into key-value pairs.\n * @returns {Object.}\n */\nfunction parseKeyValue(/**string*/keyValue) {\n var obj = {}, key_value, key;\n forEach((keyValue || \"\").split('&'), function(keyValue) {\n if ( keyValue ) {\n key_value = keyValue.replace(/\\+/g,'%20').split('=');\n key = tryDecodeURIComponent(key_value[0]);\n if ( isDefined(key) ) {\n var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;\n if (!hasOwnProperty.call(obj, key)) {\n obj[key] = val;\n } else if(isArray(obj[key])) {\n obj[key].push(val);\n } else {\n obj[key] = [obj[key],val];\n }\n }\n }\n });\n return obj;\n}\n\nfunction toKeyValue(obj) {\n var parts = [];\n forEach(obj, function(value, key) {\n if (isArray(value)) {\n forEach(value, function(arrayValue) {\n parts.push(encodeUriQuery(key, true) +\n (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));\n });\n } else {\n parts.push(encodeUriQuery(key, true) +\n (value === true ? '' : '=' + encodeUriQuery(value, true)));\n }\n });\n return parts.length ? parts.join('&') : '';\n}\n\n\n/**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n * segments:\n * segment = *pchar\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriSegment(val) {\n return encodeUriQuery(val, true).\n replace(/%26/gi, '&').\n replace(/%3D/gi, '=').\n replace(/%2B/gi, '+');\n}\n\n\n/**\n * This method is intended for encoding *key* or *value* parts of query component. We need a custom\n * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be\n * encoded per http://tools.ietf.org/html/rfc3986:\n * query = *( pchar / \"/\" / \"?\" )\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriQuery(val, pctEncodeSpaces) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%3B/gi, ';').\n replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n}\n\nvar ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];\n\nfunction getNgAttribute(element, ngAttr) {\n var attr, i, ii = ngAttrPrefixes.length;\n element = jqLite(element);\n for (i=0; i` or `` tags.\n *\n * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`\n * found in the document will be used to define the root element to auto-bootstrap as an\n * application. To run multiple applications in an HTML document you must manually bootstrap them using\n * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.\n *\n * You can specify an **AngularJS module** to be used as the root module for the application. This\n * module will be loaded into the {@link auto.$injector} when the application is bootstrapped and\n * should contain the application code needed or have dependencies on other modules that will\n * contain the code. See {@link angular.module} for more information.\n *\n * In the example below if the `ngApp` directive were not placed on the `html` element then the\n * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`\n * would not be resolved to `3`.\n *\n * `ngApp` is the easiest, and most common, way to bootstrap an application.\n *\n \n \n \n I can add: {{a}} + {{b}} = {{ a+b }}\n \n \n \n angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n });\n \n \n *\n * Using `ngStrictDi`, you would see something like this:\n *\n \n \n \n \n I can add: {{a}} + {{b}} = {{ a+b }}\n\n This renders because the controller does not fail to\n instantiate, by using explicit annotation style (see\n script.js for details)\n \n \n\n \n Name: \n Hello, {{name}}!\n\n This renders because the controller does not fail to\n instantiate, by using explicit annotation style\n (see script.js for details)\n \n \n\n \n I can add: {{a}} + {{b}} = {{ a+b }}\n\n The controller could not be instantiated, due to relying\n on automatic function annotations (which are disabled in\n strict mode). As such, the content of this section is not\n interpolated, and there should be an error in your web console.\n \n \n \n \n \n angular.module('ngAppStrictDemo', [])\n // BadController will fail to instantiate, due to relying on automatic function annotation,\n // rather than an explicit annotation\n .controller('BadController', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n })\n // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,\n // due to using explicit annotations using the array style and $inject property, respectively.\n .controller('GoodController1', ['$scope', function($scope) {\n $scope.a = 1;\n $scope.b = 2;\n }])\n .controller('GoodController2', GoodController2);\n function GoodController2($scope) {\n $scope.name = \"World\";\n }\n GoodController2.$inject = ['$scope'];\n \n \n div[ng-controller] {\n margin-bottom: 1em;\n -webkit-border-radius: 4px;\n border-radius: 4px;\n border: 1px solid;\n padding: .5em;\n }\n div[ng-controller^=Good] {\n border-color: #d6e9c6;\n background-color: #dff0d8;\n color: #3c763d;\n }\n div[ng-controller^=Bad] {\n border-color: #ebccd1;\n background-color: #f2dede;\n color: #a94442;\n margin-bottom: 0;\n }\n \n \n */\nfunction angularInit(element, bootstrap) {\n var appElement,\n module,\n config = {};\n\n // The element `element` has priority over any other element\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n\n if (!appElement && element.hasAttribute && element.hasAttribute(name)) {\n appElement = element;\n module = element.getAttribute(name);\n }\n });\n forEach(ngAttrPrefixes, function(prefix) {\n var name = prefix + 'app';\n var candidate;\n\n if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\\\:') + ']'))) {\n appElement = candidate;\n module = candidate.getAttribute(name);\n }\n });\n if (appElement) {\n config.strictDi = getNgAttribute(appElement, \"strict-di\") !== null;\n bootstrap(appElement, module ? [module] : [], config);\n }\n}\n\n/**\n * @ngdoc function\n * @name angular.bootstrap\n * @module ng\n * @description\n * Use this function to manually start up angular application.\n *\n * See: {@link guide/bootstrap Bootstrap}\n *\n * Note that Protractor based end-to-end tests cannot use this function to bootstrap manually.\n * They must use {@link ng.directive:ngApp ngApp}.\n *\n * Angular will detect if it has been loaded into the browser more than once and only allow the\n * first loaded script to be bootstrapped and will report a warning to the browser console for\n * each of the subsequent scripts. This prevents strange results in applications, where otherwise\n * multiple instances of Angular try to work on the DOM.\n *\n * ```html\n * \n * \n * \n * \n * {{greeting}}\n * \n *\n * \n * \n * \n * \n * ```\n *\n * @param {DOMElement} element DOM element which is the root of angular application.\n * @param {Array=} modules an array of modules to load into the application.\n * Each item in the array should be the name of a predefined module or a (DI annotated)\n * function that will be invoked by the injector as a run block.\n * See: {@link angular.module modules}\n * @param {Object=} config an object for defining configuration options for the application. The\n * following keys are supported:\n *\n * - `strictDi`: disable automatic function annotation for the application. This is meant to\n * assist in finding bugs which break minified code.\n *\n * @returns {auto.$injector} Returns the newly created injector for this app.\n */\nfunction bootstrap(element, modules, config) {\n if (!isObject(config)) config = {};\n var defaultConfig = {\n strictDi: false\n };\n config = extend(defaultConfig, config);\n var doBootstrap = function() {\n element = jqLite(element);\n\n if (element.injector()) {\n var tag = (element[0] === document) ? 'document' : startingTag(element);\n //Encode angle brackets to prevent input from being sanitized to empty string #8683\n throw ngMinErr(\n 'btstrpd',\n \"App Already Bootstrapped with this Element '{0}'\",\n tag.replace(/,'<').replace(/>/,'>'));\n }\n\n modules = modules || [];\n modules.unshift(['$provide', function($provide) {\n $provide.value('$rootElement', element);\n }]);\n\n if (config.debugInfoEnabled) {\n // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.\n modules.push(['$compileProvider', function($compileProvider) {\n $compileProvider.debugInfoEnabled(true);\n }]);\n }\n\n modules.unshift('ng');\n var injector = createInjector(modules, config.strictDi);\n injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',\n function bootstrapApply(scope, element, compile, injector) {\n scope.$apply(function() {\n element.data('$injector', injector);\n compile(element)(scope);\n });\n }]\n );\n return injector;\n };\n\n var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;\n var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\n if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {\n config.debugInfoEnabled = true;\n window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');\n }\n\n if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n return doBootstrap();\n }\n\n window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n angular.resumeBootstrap = function(extraModules) {\n forEach(extraModules, function(module) {\n modules.push(module);\n });\n doBootstrap();\n };\n}\n\n/**\n * @ngdoc function\n * @name angular.reloadWithDebugInfo\n * @module ng\n * @description\n * Use this function to reload the current application with debug information turned on.\n * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.\n *\n * See {@link ng.$compileProvider#debugInfoEnabled} for more.\n */\nfunction reloadWithDebugInfo() {\n window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;\n window.location.reload();\n}\n\n/**\n * @name angular.getTestability\n * @module ng\n * @description\n * Get the testability service for the instance of Angular on the given\n * element.\n * @param {DOMElement} element DOM element which is the root of angular application.\n */\nfunction getTestability(rootElement) {\n return angular.element(rootElement).injector().get('$$testability');\n}\n\nvar SNAKE_CASE_REGEXP = /[A-Z]/g;\nfunction snake_case(name, separator) {\n separator = separator || '_';\n return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n return (pos ? separator : '') + letter.toLowerCase();\n });\n}\n\nvar bindJQueryFired = false;\nvar skipDestroyOnNextJQueryCleanData;\nfunction bindJQuery() {\n var originalCleanData;\n\n if (bindJQueryFired) {\n return;\n }\n\n // bind to jQuery if present;\n jQuery = window.jQuery;\n // Use jQuery if it exists with proper functionality, otherwise default to us.\n // Angular 1.2+ requires jQuery 1.7+ for on()/off() support.\n // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older\n // versions. It will not work for sure with jQuery <1.7, though.\n if (jQuery && jQuery.fn.on) {\n jqLite = jQuery;\n extend(jQuery.fn, {\n scope: JQLitePrototype.scope,\n isolateScope: JQLitePrototype.isolateScope,\n controller: JQLitePrototype.controller,\n injector: JQLitePrototype.injector,\n inheritedData: JQLitePrototype.inheritedData\n });\n\n // All nodes removed from the DOM via various jQuery APIs like .remove()\n // are passed through jQuery.cleanData. Monkey-patch this method to fire\n // the $destroy event on all removed nodes.\n originalCleanData = jQuery.cleanData;\n jQuery.cleanData = function(elems) {\n var events;\n if (!skipDestroyOnNextJQueryCleanData) {\n for (var i = 0, elem; (elem = elems[i]) != null; i++) {\n events = jQuery._data(elem, \"events\");\n if (events && events.$destroy) {\n jQuery(elem).triggerHandler('$destroy');\n }\n }\n } else {\n skipDestroyOnNextJQueryCleanData = false;\n }\n originalCleanData(elems);\n };\n } else {\n jqLite = JQLite;\n }\n\n angular.element = jqLite;\n\n // Prevent double-proxying.\n bindJQueryFired = true;\n}\n\n/**\n * throw error if the argument is falsy.\n */\nfunction assertArg(arg, name, reason) {\n if (!arg) {\n throw ngMinErr('areq', \"Argument '{0}' is {1}\", (name || '?'), (reason || \"required\"));\n }\n return arg;\n}\n\nfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n if (acceptArrayAnnotation && isArray(arg)) {\n arg = arg[arg.length - 1];\n }\n\n assertArg(isFunction(arg), name, 'not a function, got ' +\n (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));\n return arg;\n}\n\n/**\n * throw error if the name given is hasOwnProperty\n * @param {String} name the name to test\n * @param {String} context the context in which the name is used, such as module or directive\n */\nfunction assertNotHasOwnProperty(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', \"hasOwnProperty is not a valid {0} name\", context);\n }\n}\n\n/**\n * Return the value accessible from the object by path. Any undefined traversals are ignored\n * @param {Object} obj starting object\n * @param {String} path path to traverse\n * @param {boolean} [bindFnToScope=true]\n * @returns {Object} value as accessible by path\n */\n//TODO(misko): this function needs to be removed\nfunction getter(obj, path, bindFnToScope) {\n if (!path) return obj;\n var keys = path.split('.');\n var key;\n var lastInstance = obj;\n var len = keys.length;\n\n for (var i = 0; i < len; i++) {\n key = keys[i];\n if (obj) {\n obj = (lastInstance = obj)[key];\n }\n }\n if (!bindFnToScope && isFunction(obj)) {\n return bind(lastInstance, obj);\n }\n return obj;\n}\n\n/**\n * Return the DOM siblings between the first and last node in the given array.\n * @param {Array} array like object\n * @returns {jqLite} jqLite collection containing the nodes\n */\nfunction getBlockNodes(nodes) {\n // TODO(perf): just check if all items in `nodes` are siblings and if they are return the original\n // collection, otherwise update the original collection.\n var node = nodes[0];\n var endNode = nodes[nodes.length - 1];\n var blockNodes = [node];\n\n do {\n node = node.nextSibling;\n if (!node) break;\n blockNodes.push(node);\n } while (node !== endNode);\n\n return jqLite(blockNodes);\n}\n\n\n/**\n * Creates a new object without a prototype. This object is useful for lookup without having to\n * guard against prototypically inherited properties via hasOwnProperty.\n *\n * Related micro-benchmarks:\n * - http://jsperf.com/object-create2\n * - http://jsperf.com/proto-map-lookup/2\n * - http://jsperf.com/for-in-vs-object-keys2\n *\n * @returns {Object}\n */\nfunction createMap() {\n return Object.create(null);\n}\n\n/**\n * @ngdoc type\n * @name angular.Module\n * @module ng\n * @description\n *\n * Interface for configuring angular {@link angular.module modules}.\n */\n\nfunction setupModuleLoader(window) {\n\n var $injectorMinErr = minErr('$injector');\n var ngMinErr = minErr('ng');\n\n function ensure(obj, name, factory) {\n return obj[name] || (obj[name] = factory());\n }\n\n var angular = ensure(window, 'angular', Object);\n\n // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n angular.$$minErr = angular.$$minErr || minErr;\n\n return ensure(angular, 'module', function() {\n /** @type {Object.} */\n var modules = {};\n\n /**\n * @ngdoc function\n * @name angular.module\n * @module ng\n * @description\n *\n * The `angular.module` is a global place for creating, registering and retrieving Angular\n * modules.\n * All modules (angular core or 3rd party) that should be available to an application must be\n * registered using this mechanism.\n *\n * When passed two or more arguments, a new module is created. If passed only one argument, an\n * existing module (the name passed as the first argument to `module`) is retrieved.\n *\n *\n * # Module\n *\n * A module is a collection of services, directives, controllers, filters, and configuration information.\n * `angular.module` is used to configure the {@link auto.$injector $injector}.\n *\n * ```js\n * // Create a new module\n * var myModule = angular.module('myModule', []);\n *\n * // register a new service\n * myModule.value('appName', 'MyCoolApp');\n *\n * // configure existing services inside initialization blocks.\n * myModule.config(['$locationProvider', function($locationProvider) {\n * // Configure existing providers\n * $locationProvider.hashPrefix('!');\n * }]);\n * ```\n *\n * Then you can create an injector and load your modules like this:\n *\n * ```js\n * var injector = angular.injector(['ng', 'myModule'])\n * ```\n *\n * However it's more likely that you'll just use\n * {@link ng.directive:ngApp ngApp} or\n * {@link angular.bootstrap} to simplify this process for you.\n *\n * @param {!string} name The name of the module to create or retrieve.\n * @param {!Array.=} requires If specified then new module is being created. If\n * unspecified then the module is being retrieved for further configuration.\n * @param {Function=} configFn Optional configuration function for the module. Same as\n * {@link angular.Module#config Module#config()}.\n * @returns {module} new module with the {@link angular.Module} api.\n */\n return function module(name, requires, configFn) {\n var assertNotHasOwnProperty = function(name, context) {\n if (name === 'hasOwnProperty') {\n throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n }\n };\n\n assertNotHasOwnProperty(name, 'module');\n if (requires && modules.hasOwnProperty(name)) {\n modules[name] = null;\n }\n return ensure(modules, name, function() {\n if (!requires) {\n throw $injectorMinErr('nomod', \"Module '{0}' is not available! You either misspelled \" +\n \"the module name or forgot to load it. If registering a module ensure that you \" +\n \"specify the dependencies as the second argument.\", name);\n }\n\n /** @type {!Array.>} */\n var invokeQueue = [];\n\n /** @type {!Array.} */\n var configBlocks = [];\n\n /** @type {!Array.} */\n var runBlocks = [];\n\n var config = invokeLater('$injector', 'invoke', 'push', configBlocks);\n\n /** @type {angular.Module} */\n var moduleInstance = {\n // Private state\n _invokeQueue: invokeQueue,\n _configBlocks: configBlocks,\n _runBlocks: runBlocks,\n\n /**\n * @ngdoc property\n * @name angular.Module#requires\n * @module ng\n *\n * @description\n * Holds the list of modules which the injector will load before the current module is\n * loaded.\n */\n requires: requires,\n\n /**\n * @ngdoc property\n * @name angular.Module#name\n * @module ng\n *\n * @description\n * Name of the module.\n */\n name: name,\n\n\n /**\n * @ngdoc method\n * @name angular.Module#provider\n * @module ng\n * @param {string} name service name\n * @param {Function} providerType Construction function for creating new instance of the\n * service.\n * @description\n * See {@link auto.$provide#provider $provide.provider()}.\n */\n provider: invokeLater('$provide', 'provider'),\n\n /**\n * @ngdoc method\n * @name angular.Module#factory\n * @module ng\n * @param {string} name service name\n * @param {Function} providerFunction Function for creating new instance of the service.\n * @description\n * See {@link auto.$provide#factory $provide.factory()}.\n */\n factory: invokeLater('$provide', 'factory'),\n\n /**\n * @ngdoc method\n * @name angular.Module#service\n * @module ng\n * @param {string} name service name\n * @param {Function} constructor A constructor function that will be instantiated.\n * @description\n * See {@link auto.$provide#service $provide.service()}.\n */\n service: invokeLater('$provide', 'service'),\n\n /**\n * @ngdoc method\n * @name angular.Module#value\n * @module ng\n * @param {string} name service name\n * @param {*} object Service instance object.\n * @description\n * See {@link auto.$provide#value $provide.value()}.\n */\n value: invokeLater('$provide', 'value'),\n\n /**\n * @ngdoc method\n * @name angular.Module#constant\n * @module ng\n * @param {string} name constant name\n * @param {*} object Constant value.\n * @description\n * Because the constant are fixed, they get applied before other provide methods.\n * See {@link auto.$provide#constant $provide.constant()}.\n */\n constant: invokeLater('$provide', 'constant', 'unshift'),\n\n /**\n * @ngdoc method\n * @name angular.Module#animation\n * @module ng\n * @param {string} name animation name\n * @param {Function} animationFactory Factory function for creating new instance of an\n * animation.\n * @description\n *\n * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n *\n *\n * Defines an animation hook that can be later used with\n * {@link ngAnimate.$animate $animate} service and directives that use this service.\n *\n * ```js\n * module.animation('.animation-name', function($inject1, $inject2) {\n * return {\n * eventName : function(element, done) {\n * //code to run the animation\n * //once complete, then run done()\n * return function cancellationFunction(element) {\n * //code to cancel the animation\n * }\n * }\n * }\n * })\n * ```\n *\n * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and\n * {@link ngAnimate ngAnimate module} for more information.\n */\n animation: invokeLater('$animateProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#filter\n * @module ng\n * @param {string} name Filter name.\n * @param {Function} filterFactory Factory function for creating new instance of filter.\n * @description\n * See {@link ng.$filterProvider#register $filterProvider.register()}.\n */\n filter: invokeLater('$filterProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#controller\n * @module ng\n * @param {string|Object} name Controller name, or an object map of controllers where the\n * keys are the names and the values are the constructors.\n * @param {Function} constructor Controller constructor function.\n * @description\n * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n */\n controller: invokeLater('$controllerProvider', 'register'),\n\n /**\n * @ngdoc method\n * @name angular.Module#directive\n * @module ng\n * @param {string|Object} name Directive name, or an object map of directives where the\n * keys are the names and the values are the factories.\n * @param {Function} directiveFactory Factory function for creating new instance of\n * directives.\n * @description\n * See {@link ng.$compileProvider#directive $compileProvider.directive()}.\n */\n directive: invokeLater('$compileProvider', 'directive'),\n\n /**\n * @ngdoc method\n * @name angular.Module#config\n * @module ng\n * @param {Function} configFn Execute this function on module load. Useful for service\n * configuration.\n * @description\n * Use this method to register work which needs to be performed on module loading.\n * For more about how to configure services, see\n * {@link providers#providers_provider-recipe Provider Recipe}.\n */\n config: config,\n\n /**\n * @ngdoc method\n * @name angular.Module#run\n * @module ng\n * @param {Function} initializationFn Execute this function after injector creation.\n * Useful for application initialization.\n * @description\n * Use this method to register work which should be performed when the injector is done\n * loading all modules.\n */\n run: function(block) {\n runBlocks.push(block);\n return this;\n }\n };\n\n if (configFn) {\n config(configFn);\n }\n\n return moduleInstance;\n\n /**\n * @param {string} provider\n * @param {string} method\n * @param {String=} insertMethod\n * @returns {angular.Module}\n */\n function invokeLater(provider, method, insertMethod, queue) {\n if (!queue) queue = invokeQueue;\n return function() {\n queue[insertMethod || 'push']([provider, method, arguments]);\n return moduleInstance;\n };\n }\n });\n };\n });\n\n}\n\n/* global angularModule: true,\n version: true,\n\n $LocaleProvider,\n $CompileProvider,\n\n htmlAnchorDirective,\n inputDirective,\n inputDirective,\n formDirective,\n scriptDirective,\n selectDirective,\n styleDirective,\n optionDirective,\n ngBindDirective,\n ngBindHtmlDirective,\n ngBindTemplateDirective,\n ngClassDirective,\n ngClassEvenDirective,\n ngClassOddDirective,\n ngCspDirective,\n ngCloakDirective,\n ngControllerDirective,\n ngFormDirective,\n ngHideDirective,\n ngIfDirective,\n ngIncludeDirective,\n ngIncludeFillContentDirective,\n ngInitDirective,\n ngNonBindableDirective,\n ngPluralizeDirective,\n ngRepeatDirective,\n ngShowDirective,\n ngStyleDirective,\n ngSwitchDirective,\n ngSwitchWhenDirective,\n ngSwitchDefaultDirective,\n ngOptionsDirective,\n ngTranscludeDirective,\n ngModelDirective,\n ngListDirective,\n ngChangeDirective,\n patternDirective,\n patternDirective,\n requiredDirective,\n requiredDirective,\n minlengthDirective,\n minlengthDirective,\n maxlengthDirective,\n maxlengthDirective,\n ngValueDirective,\n ngModelOptionsDirective,\n ngAttributeAliasDirectives,\n ngEventDirectives,\n\n $AnchorScrollProvider,\n $AnimateProvider,\n $BrowserProvider,\n $CacheFactoryProvider,\n $ControllerProvider,\n $DocumentProvider,\n $ExceptionHandlerProvider,\n $FilterProvider,\n $InterpolateProvider,\n $IntervalProvider,\n $HttpProvider,\n $HttpBackendProvider,\n $LocationProvider,\n $LogProvider,\n $ParseProvider,\n $RootScopeProvider,\n $QProvider,\n $$QProvider,\n $$SanitizeUriProvider,\n $SceProvider,\n $SceDelegateProvider,\n $SnifferProvider,\n $TemplateCacheProvider,\n $TemplateRequestProvider,\n $$TestabilityProvider,\n $TimeoutProvider,\n $$RAFProvider,\n $$AsyncCallbackProvider,\n $WindowProvider\n*/\n\n\n/**\n * @ngdoc object\n * @name angular.version\n * @module ng\n * @description\n * An object that contains information about the current AngularJS version. This object has the\n * following properties:\n *\n * - `full` – `{string}` – Full version string, such as \"0.9.18\".\n * - `major` – `{number}` – Major version number, such as \"0\".\n * - `minor` – `{number}` – Minor version number, such as \"9\".\n * - `dot` – `{number}` – Dot version number, such as \"18\".\n * - `codeName` – `{string}` – Code name of the release, such as \"jiggling-armfat\".\n */\nvar version = {\n full: '1.3.0-rc.3', // all of these placeholder strings will be replaced by grunt's\n major: 1, // package task\n minor: 3,\n dot: 0,\n codeName: 'aggressive-pacifism'\n};\n\n\nfunction publishExternalAPI(angular){\n extend(angular, {\n 'bootstrap': bootstrap,\n 'copy': copy,\n 'extend': extend,\n 'equals': equals,\n 'element': jqLite,\n 'forEach': forEach,\n 'injector': createInjector,\n 'noop': noop,\n 'bind': bind,\n 'toJson': toJson,\n 'fromJson': fromJson,\n 'identity': identity,\n 'isUndefined': isUndefined,\n 'isDefined': isDefined,\n 'isString': isString,\n 'isFunction': isFunction,\n 'isObject': isObject,\n 'isNumber': isNumber,\n 'isElement': isElement,\n 'isArray': isArray,\n 'version': version,\n 'isDate': isDate,\n 'lowercase': lowercase,\n 'uppercase': uppercase,\n 'callbacks': {counter: 0},\n 'getTestability': getTestability,\n '$$minErr': minErr,\n '$$csp': csp,\n 'reloadWithDebugInfo': reloadWithDebugInfo,\n '$$hasClass': jqLiteHasClass\n });\n\n angularModule = setupModuleLoader(window);\n try {\n angularModule('ngLocale');\n } catch (e) {\n angularModule('ngLocale', []).provider('$locale', $LocaleProvider);\n }\n\n angularModule('ng', ['ngLocale'], ['$provide',\n function ngModule($provide) {\n // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n $provide.provider({\n $$sanitizeUri: $$SanitizeUriProvider\n });\n $provide.provider('$compile', $CompileProvider).\n directive({\n a: htmlAnchorDirective,\n input: inputDirective,\n textarea: inputDirective,\n form: formDirective,\n script: scriptDirective,\n select: selectDirective,\n style: styleDirective,\n option: optionDirective,\n ngBind: ngBindDirective,\n ngBindHtml: ngBindHtmlDirective,\n ngBindTemplate: ngBindTemplateDirective,\n ngClass: ngClassDirective,\n ngClassEven: ngClassEvenDirective,\n ngClassOdd: ngClassOddDirective,\n ngCloak: ngCloakDirective,\n ngController: ngControllerDirective,\n ngForm: ngFormDirective,\n ngHide: ngHideDirective,\n ngIf: ngIfDirective,\n ngInclude: ngIncludeDirective,\n ngInit: ngInitDirective,\n ngNonBindable: ngNonBindableDirective,\n ngPluralize: ngPluralizeDirective,\n ngRepeat: ngRepeatDirective,\n ngShow: ngShowDirective,\n ngStyle: ngStyleDirective,\n ngSwitch: ngSwitchDirective,\n ngSwitchWhen: ngSwitchWhenDirective,\n ngSwitchDefault: ngSwitchDefaultDirective,\n ngOptions: ngOptionsDirective,\n ngTransclude: ngTranscludeDirective,\n ngModel: ngModelDirective,\n ngList: ngListDirective,\n ngChange: ngChangeDirective,\n pattern: patternDirective,\n ngPattern: patternDirective,\n required: requiredDirective,\n ngRequired: requiredDirective,\n minlength: minlengthDirective,\n ngMinlength: minlengthDirective,\n maxlength: maxlengthDirective,\n ngMaxlength: maxlengthDirective,\n ngValue: ngValueDirective,\n ngModelOptions: ngModelOptionsDirective\n }).\n directive({\n ngInclude: ngIncludeFillContentDirective\n }).\n directive(ngAttributeAliasDirectives).\n directive(ngEventDirectives);\n $provide.provider({\n $anchorScroll: $AnchorScrollProvider,\n $animate: $AnimateProvider,\n $browser: $BrowserProvider,\n $cacheFactory: $CacheFactoryProvider,\n $controller: $ControllerProvider,\n $document: $DocumentProvider,\n $exceptionHandler: $ExceptionHandlerProvider,\n $filter: $FilterProvider,\n $interpolate: $InterpolateProvider,\n $interval: $IntervalProvider,\n $http: $HttpProvider,\n $httpBackend: $HttpBackendProvider,\n $location: $LocationProvider,\n $log: $LogProvider,\n $parse: $ParseProvider,\n $rootScope: $RootScopeProvider,\n $q: $QProvider,\n $$q: $$QProvider,\n $sce: $SceProvider,\n $sceDelegate: $SceDelegateProvider,\n $sniffer: $SnifferProvider,\n $templateCache: $TemplateCacheProvider,\n $templateRequest: $TemplateRequestProvider,\n $$testability: $$TestabilityProvider,\n $timeout: $TimeoutProvider,\n $window: $WindowProvider,\n $$rAF: $$RAFProvider,\n $$asyncCallback : $$AsyncCallbackProvider\n });\n }\n ]);\n}\n\n/* global JQLitePrototype: true,\n addEventListenerFn: true,\n removeEventListenerFn: true,\n BOOLEAN_ATTR: true,\n ALIASED_ATTR: true,\n*/\n\n//////////////////////////////////\n//JQLite\n//////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.element\n * @module ng\n * @kind function\n *\n * @description\n * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n *\n * If jQuery is available, `angular.element` is an alias for the\n * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n * delegates to Angular's built-in subset of jQuery, called \"jQuery lite\" or \"jqLite.\"\n *\n * jqLite is a tiny, API-compatible subset of jQuery that allows\n * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most\n * commonly needed functionality with the goal of having a very small footprint.\n *\n * To use jQuery, simply load it before `DOMContentLoaded` event fired.\n *\n * **Note:** all element references in Angular are always wrapped with jQuery or\n * jqLite; they are never raw DOM references.\n *\n * ## Angular's jqLite\n * jqLite provides only the following jQuery methods:\n *\n * - [`addClass()`](http://api.jquery.com/addClass/)\n * - [`after()`](http://api.jquery.com/after/)\n * - [`append()`](http://api.jquery.com/append/)\n * - [`attr()`](http://api.jquery.com/attr/)\n * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData\n * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n * - [`clone()`](http://api.jquery.com/clone/)\n * - [`contents()`](http://api.jquery.com/contents/)\n * - [`css()`](http://api.jquery.com/css/)\n * - [`data()`](http://api.jquery.com/data/)\n * - [`detach()`](http://api.jquery.com/detach/)\n * - [`empty()`](http://api.jquery.com/empty/)\n * - [`eq()`](http://api.jquery.com/eq/)\n * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n * - [`hasClass()`](http://api.jquery.com/hasClass/)\n * - [`html()`](http://api.jquery.com/html/)\n * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors\n * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n * - [`prepend()`](http://api.jquery.com/prepend/)\n * - [`prop()`](http://api.jquery.com/prop/)\n * - [`ready()`](http://api.jquery.com/ready/)\n * - [`remove()`](http://api.jquery.com/remove/)\n * - [`removeAttr()`](http://api.jquery.com/removeAttr/)\n * - [`removeClass()`](http://api.jquery.com/removeClass/)\n * - [`removeData()`](http://api.jquery.com/removeData/)\n * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n * - [`text()`](http://api.jquery.com/text/)\n * - [`toggleClass()`](http://api.jquery.com/toggleClass/)\n * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.\n * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces\n * - [`val()`](http://api.jquery.com/val/)\n * - [`wrap()`](http://api.jquery.com/wrap/)\n *\n * ## jQuery/jqLite Extras\n * Angular also provides the following additional methods and events to both jQuery and jqLite:\n *\n * ### Events\n * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM\n * element before it is removed.\n *\n * ### Methods\n * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n * retrieves controller associated with the `ngController` directive. If `name` is provided as\n * camelCase directive name, then the controller for this directive will be retrieved (e.g.\n * `'ngModel'`).\n * - `injector()` - retrieves the injector of the current element or its parent.\n * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current\n * element or its parent.\n * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the\n * current element. This getter should be used only on elements that contain a directive which starts a new isolate\n * scope. Calling `scope()` on this element always returns the original non-isolate scope.\n * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n * parent element is reached.\n *\n * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n * @returns {Object} jQuery object.\n */\n\nJQLite.expando = 'ng339';\n\nvar jqCache = JQLite.cache = {},\n jqId = 1,\n addEventListenerFn = function(element, type, fn) {\n element.addEventListener(type, fn, false);\n },\n removeEventListenerFn = function(element, type, fn) {\n element.removeEventListener(type, fn, false);\n };\n\n/*\n * !!! This is an undocumented \"private\" function !!!\n */\nJQLite._data = function(node) {\n //jQuery always returns an object on cache miss\n return this.cache[node[this.expando]] || {};\n};\n\nfunction jqNextId() { return ++jqId; }\n\n\nvar SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\nvar MOZ_HACK_REGEXP = /^moz([A-Z])/;\nvar MOUSE_EVENT_MAP= { mouseleave : \"mouseout\", mouseenter : \"mouseover\"};\nvar jqLiteMinErr = minErr('jqLite');\n\n/**\n * Converts snake_case to camelCase.\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction camelCase(name) {\n return name.\n replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n return offset ? letter.toUpperCase() : letter;\n }).\n replace(MOZ_HACK_REGEXP, 'Moz$1');\n}\n\nvar SINGLE_TAG_REGEXP = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/;\nvar HTML_REGEXP = /<|?\\w+;/;\nvar TAG_NAME_REGEXP = /<([\\w:]+)/;\nvar XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi;\n\nvar wrapMap = {\n 'option': [1, '', ''],\n\n 'thead': [1, '', ''],\n 'col': [2, '', ''],\n 'tr': [2, '', ''],\n 'td': [3, '', ''],\n '_default': [0, \"\", \"\"]\n};\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n\nfunction jqLiteIsTextNode(html) {\n return !HTML_REGEXP.test(html);\n}\n\nfunction jqLiteAcceptsData(node) {\n // The window object can accept data but has no nodeType\n // Otherwise we are only interested in elements (1) and documents (9)\n var nodeType = node.nodeType;\n return nodeType === 1 || !nodeType || nodeType === 9;\n}\n\nfunction jqLiteBuildFragment(html, context) {\n var tmp, tag, wrap,\n fragment = context.createDocumentFragment(),\n nodes = [], i;\n\n if (jqLiteIsTextNode(html)) {\n // Convert non-html into a text node\n nodes.push(context.createTextNode(html));\n } else {\n // Convert html into DOM nodes\n tmp = tmp || fragment.appendChild(context.createElement(\"div\"));\n tag = (TAG_NAME_REGEXP.exec(html) || [\"\", \"\"])[1].toLowerCase();\n wrap = wrapMap[tag] || wrapMap._default;\n tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, \"<$1>$2>\") + wrap[2];\n\n // Descend through wrappers to the right content\n i = wrap[0];\n while (i--) {\n tmp = tmp.lastChild;\n }\n\n nodes = concat(nodes, tmp.childNodes);\n\n tmp = fragment.firstChild;\n tmp.textContent = \"\";\n }\n\n // Remove wrapper from fragment\n fragment.textContent = \"\";\n fragment.innerHTML = \"\"; // Clear inner HTML\n forEach(nodes, function(node) {\n fragment.appendChild(node);\n });\n\n return fragment;\n}\n\nfunction jqLiteParseHTML(html, context) {\n context = context || document;\n var parsed;\n\n if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {\n return [context.createElement(parsed[1])];\n }\n\n if ((parsed = jqLiteBuildFragment(html, context))) {\n return parsed.childNodes;\n }\n\n return [];\n}\n\n/////////////////////////////////////////////\nfunction JQLite(element) {\n if (element instanceof JQLite) {\n return element;\n }\n\n var argIsString;\n\n if (isString(element)) {\n element = trim(element);\n argIsString = true;\n }\n if (!(this instanceof JQLite)) {\n if (argIsString && element.charAt(0) != '<') {\n throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n }\n return new JQLite(element);\n }\n\n if (argIsString) {\n jqLiteAddNodes(this, jqLiteParseHTML(element));\n } else {\n jqLiteAddNodes(this, element);\n }\n}\n\nfunction jqLiteClone(element) {\n return element.cloneNode(true);\n}\n\nfunction jqLiteDealoc(element, onlyDescendants){\n if (!onlyDescendants) jqLiteRemoveData(element);\n\n if (element.querySelectorAll) {\n var descendants = element.querySelectorAll('*');\n for (var i = 0, l = descendants.length; i < l; i++) {\n jqLiteRemoveData(descendants[i]);\n }\n }\n}\n\nfunction jqLiteOff(element, type, fn, unsupported) {\n if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var handle = expandoStore && expandoStore.handle;\n\n if (!handle) return; //no listeners registered\n\n if (!type) {\n for (type in events) {\n if (type !== '$destroy') {\n removeEventListenerFn(element, type, events[type]);\n }\n delete events[type];\n }\n } else {\n forEach(type.split(' '), function(type) {\n if (isUndefined(fn)) {\n removeEventListenerFn(element, type, events[type]);\n delete events[type];\n } else {\n arrayRemove(events[type] || [], fn);\n }\n });\n }\n}\n\nfunction jqLiteRemoveData(element, name) {\n var expandoId = element.ng339;\n var expandoStore = expandoId && jqCache[expandoId];\n\n if (expandoStore) {\n if (name) {\n delete expandoStore.data[name];\n return;\n }\n\n if (expandoStore.handle) {\n if (expandoStore.events.$destroy) {\n expandoStore.handle({}, '$destroy');\n }\n jqLiteOff(element);\n }\n delete jqCache[expandoId];\n element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it\n }\n}\n\n\nfunction jqLiteExpandoStore(element, createIfNecessary) {\n var expandoId = element.ng339,\n expandoStore = expandoId && jqCache[expandoId];\n\n if (createIfNecessary && !expandoStore) {\n element.ng339 = expandoId = jqNextId();\n expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};\n }\n\n return expandoStore;\n}\n\n\nfunction jqLiteData(element, key, value) {\n if (jqLiteAcceptsData(element)) {\n\n var isSimpleSetter = isDefined(value);\n var isSimpleGetter = !isSimpleSetter && key && !isObject(key);\n var massGetter = !key;\n var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);\n var data = expandoStore && expandoStore.data;\n\n if (isSimpleSetter) { // data('key', value)\n data[key] = value;\n } else {\n if (massGetter) { // data()\n return data;\n } else {\n if (isSimpleGetter) { // data('key')\n // don't force creation of expandoStore if it doesn't exist yet\n return data && data[key];\n } else { // mass-setter: data({key1: val1, key2: val2})\n extend(data, key);\n }\n }\n }\n }\n}\n\nfunction jqLiteHasClass(element, selector) {\n if (!element.getAttribute) return false;\n return ((\" \" + (element.getAttribute('class') || '') + \" \").replace(/[\\n\\t]/g, \" \").\n indexOf( \" \" + selector + \" \" ) > -1);\n}\n\nfunction jqLiteRemoveClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n forEach(cssClasses.split(' '), function(cssClass) {\n element.setAttribute('class', trim(\n (\" \" + (element.getAttribute('class') || '') + \" \")\n .replace(/[\\n\\t]/g, \" \")\n .replace(\" \" + trim(cssClass) + \" \", \" \"))\n );\n });\n }\n}\n\nfunction jqLiteAddClass(element, cssClasses) {\n if (cssClasses && element.setAttribute) {\n var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n .replace(/[\\n\\t]/g, \" \");\n\n forEach(cssClasses.split(' '), function(cssClass) {\n cssClass = trim(cssClass);\n if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n existingClasses += cssClass + ' ';\n }\n });\n\n element.setAttribute('class', trim(existingClasses));\n }\n}\n\n\nfunction jqLiteAddNodes(root, elements) {\n // THIS CODE IS VERY HOT. Don't make changes without benchmarking.\n\n if (elements) {\n\n // if a Node (the most common case)\n if (elements.nodeType) {\n root[root.length++] = elements;\n } else {\n var length = elements.length;\n\n // if an Array or NodeList and not a Window\n if (typeof length === 'number' && elements.window !== elements) {\n if (length) {\n for (var i = 0; i < length; i++) {\n root[root.length++] = elements[i];\n }\n }\n } else {\n root[root.length++] = elements;\n }\n }\n }\n}\n\n\nfunction jqLiteController(element, name) {\n return jqLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');\n}\n\nfunction jqLiteInheritedData(element, name, value) {\n // if element is the document object work with the html element instead\n // this makes $(document).scope() possible\n if(element.nodeType == 9) {\n element = element.documentElement;\n }\n var names = isArray(name) ? name : [name];\n\n while (element) {\n for (var i = 0, ii = names.length; i < ii; i++) {\n if ((value = jqLite.data(element, names[i])) !== undefined) return value;\n }\n\n // If dealing with a document fragment node with a host element, and no parent, use the host\n // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM\n // to lookup parent controllers.\n element = element.parentNode || (element.nodeType === 11 && element.host);\n }\n}\n\nfunction jqLiteEmpty(element) {\n jqLiteDealoc(element, true);\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n}\n\nfunction jqLiteRemove(element, keepData) {\n if (!keepData) jqLiteDealoc(element);\n var parent = element.parentNode;\n if (parent) parent.removeChild(element);\n}\n\n//////////////////////////////////////////\n// Functions which are declared directly.\n//////////////////////////////////////////\nvar JQLitePrototype = JQLite.prototype = {\n ready: function(fn) {\n var fired = false;\n\n function trigger() {\n if (fired) return;\n fired = true;\n fn();\n }\n\n // check if document is already loaded\n if (document.readyState === 'complete'){\n setTimeout(trigger);\n } else {\n this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9\n // we can not use jqLite since we are not done loading and jQuery could be loaded later.\n // jshint -W064\n JQLite(window).on('load', trigger); // fallback to window.onload for others\n // jshint +W064\n this.on('DOMContentLoaded', trigger);\n }\n },\n toString: function() {\n var value = [];\n forEach(this, function(e){ value.push('' + e);});\n return '[' + value.join(', ') + ']';\n },\n\n eq: function(index) {\n return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n },\n\n length: 0,\n push: push,\n sort: [].sort,\n splice: [].splice\n};\n\n//////////////////////////////////////////\n// Functions iterating getter/setters.\n// these functions return self on setter and\n// value on get.\n//////////////////////////////////////////\nvar BOOLEAN_ATTR = {};\nforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n BOOLEAN_ATTR[lowercase(value)] = value;\n});\nvar BOOLEAN_ELEMENTS = {};\nforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n BOOLEAN_ELEMENTS[value] = true;\n});\nvar ALIASED_ATTR = {\n 'ngMinlength' : 'minlength',\n 'ngMaxlength' : 'maxlength',\n 'ngMin' : 'min',\n 'ngMax' : 'max',\n 'ngPattern' : 'pattern'\n};\n\nfunction getBooleanAttrName(element, name) {\n // check dom last since we will most likely fail on name\n var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\n // booleanAttr is here twice to minimize DOM access\n return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;\n}\n\nfunction getAliasedAttrName(element, name) {\n var nodeName = element.nodeName;\n return (nodeName === 'INPUT' || nodeName === 'TEXTAREA') && ALIASED_ATTR[name];\n}\n\nforEach({\n data: jqLiteData,\n removeData: jqLiteRemoveData\n}, function(fn, name) {\n JQLite[name] = fn;\n});\n\nforEach({\n data: jqLiteData,\n inheritedData: jqLiteInheritedData,\n\n scope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n },\n\n isolateScope: function(element) {\n // Can't use jqLiteData here directly so we stay compatible with jQuery!\n return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');\n },\n\n controller: jqLiteController,\n\n injector: function(element) {\n return jqLiteInheritedData(element, '$injector');\n },\n\n removeAttr: function(element, name) {\n element.removeAttribute(name);\n },\n\n hasClass: jqLiteHasClass,\n\n css: function(element, name, value) {\n name = camelCase(name);\n\n if (isDefined(value)) {\n element.style[name] = value;\n } else {\n return element.style[name];\n }\n },\n\n attr: function(element, name, value){\n var lowercasedName = lowercase(name);\n if (BOOLEAN_ATTR[lowercasedName]) {\n if (isDefined(value)) {\n if (!!value) {\n element[name] = true;\n element.setAttribute(name, lowercasedName);\n } else {\n element[name] = false;\n element.removeAttribute(lowercasedName);\n }\n } else {\n return (element[name] ||\n (element.attributes.getNamedItem(name)|| noop).specified)\n ? lowercasedName\n : undefined;\n }\n } else if (isDefined(value)) {\n element.setAttribute(name, value);\n } else if (element.getAttribute) {\n // the extra argument \"2\" is to get the right thing for a.href in IE, see jQuery code\n // some elements (e.g. Document) don't have get attribute, so return undefined\n var ret = element.getAttribute(name, 2);\n // normalize non-existing attributes to undefined (as jQuery)\n return ret === null ? undefined : ret;\n }\n },\n\n prop: function(element, name, value) {\n if (isDefined(value)) {\n element[name] = value;\n } else {\n return element[name];\n }\n },\n\n text: (function() {\n getText.$dv = '';\n return getText;\n\n function getText(element, value) {\n if (isUndefined(value)) {\n var nodeType = element.nodeType;\n return (nodeType === 1 || nodeType === 3) ? element.textContent : '';\n }\n element.textContent = value;\n }\n })(),\n\n val: function(element, value) {\n if (isUndefined(value)) {\n if (element.multiple && nodeName_(element) === 'select') {\n var result = [];\n forEach(element.options, function (option) {\n if (option.selected) {\n result.push(option.value || option.text);\n }\n });\n return result.length === 0 ? null : result;\n }\n return element.value;\n }\n element.value = value;\n },\n\n html: function(element, value) {\n if (isUndefined(value)) {\n return element.innerHTML;\n }\n jqLiteDealoc(element, true);\n element.innerHTML = value;\n },\n\n empty: jqLiteEmpty\n}, function(fn, name){\n /**\n * Properties: writes return selection, reads return first value\n */\n JQLite.prototype[name] = function(arg1, arg2) {\n var i, key;\n var nodeCount = this.length;\n\n // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n // in a way that survives minification.\n // jqLiteEmpty takes no arguments but is a setter.\n if (fn !== jqLiteEmpty &&\n (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) {\n if (isObject(arg1)) {\n\n // we are a write, but the object properties are the key/values\n for (i = 0; i < nodeCount; i++) {\n if (fn === jqLiteData) {\n // data() takes the whole object in jQuery\n fn(this[i], arg1);\n } else {\n for (key in arg1) {\n fn(this[i], key, arg1[key]);\n }\n }\n }\n // return self for chaining\n return this;\n } else {\n // we are a read, so read the first child.\n // TODO: do we still need this?\n var value = fn.$dv;\n // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n var jj = (value === undefined) ? Math.min(nodeCount, 1) : nodeCount;\n for (var j = 0; j < jj; j++) {\n var nodeValue = fn(this[j], arg1, arg2);\n value = value ? value + nodeValue : nodeValue;\n }\n return value;\n }\n } else {\n // we are a write, so apply to all children\n for (i = 0; i < nodeCount; i++) {\n fn(this[i], arg1, arg2);\n }\n // return self for chaining\n return this;\n }\n };\n});\n\nfunction createEventHandler(element, events) {\n var eventHandler = function (event, type) {\n // jQuery specific api\n event.isDefaultPrevented = function() {\n return event.defaultPrevented;\n };\n\n var eventFns = events[type || event.type];\n var eventFnsLength = eventFns ? eventFns.length : 0;\n\n if (!eventFnsLength) return;\n\n if (isUndefined(event.immediatePropagationStopped)) {\n var originalStopImmediatePropagation = event.stopImmediatePropagation;\n event.stopImmediatePropagation = function() {\n event.immediatePropagationStopped = true;\n\n if (event.stopPropagation) {\n event.stopPropagation();\n }\n\n if (originalStopImmediatePropagation) {\n originalStopImmediatePropagation.call(event);\n }\n };\n }\n\n event.isImmediatePropagationStopped = function() {\n return event.immediatePropagationStopped === true;\n };\n\n // Copy event handlers in case event handlers array is modified during execution.\n if ((eventFnsLength > 1)) {\n eventFns = shallowCopy(eventFns);\n }\n\n for (var i = 0; i < eventFnsLength; i++) {\n if (!event.isImmediatePropagationStopped()) {\n eventFns[i].call(element, event);\n }\n }\n };\n\n // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all\n // events on `element`\n eventHandler.elem = element;\n return eventHandler;\n}\n\n//////////////////////////////////////////\n// Functions iterating traversal.\n// These functions chain results into a single\n// selector.\n//////////////////////////////////////////\nforEach({\n removeData: jqLiteRemoveData,\n\n on: function jqLiteOn(element, type, fn, unsupported){\n if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\n // Do not add event handlers to non-elements because they will not be cleaned up.\n if (!jqLiteAcceptsData(element)) {\n return;\n }\n\n var expandoStore = jqLiteExpandoStore(element, true);\n var events = expandoStore.events;\n var handle = expandoStore.handle;\n\n if (!handle) {\n handle = expandoStore.handle = createEventHandler(element, events);\n }\n\n // http://jsperf.com/string-indexof-vs-split\n var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];\n var i = types.length;\n\n while (i--) {\n type = types[i];\n var eventFns = events[type];\n\n if (!eventFns) {\n events[type] = [];\n\n if (type === 'mouseenter' || type === 'mouseleave') {\n // Refer to jQuery's implementation of mouseenter & mouseleave\n // Read about mouseenter and mouseleave:\n // http://www.quirksmode.org/js/events_mouse.html#link8\n\n jqLiteOn(element, MOUSE_EVENT_MAP[type], function(event) {\n var target = this, related = event.relatedTarget;\n // For mousenter/leave call the handler if related is outside the target.\n // NB: No relatedTarget if the mouse left/entered the browser window\n if ( !related || (related !== target && !target.contains(related)) ){\n handle(event, type);\n }\n });\n\n } else {\n if (type !== '$destroy') {\n addEventListenerFn(element, type, handle);\n }\n }\n eventFns = events[type];\n }\n eventFns.push(fn);\n }\n },\n\n off: jqLiteOff,\n\n one: function(element, type, fn) {\n element = jqLite(element);\n\n //add the listener twice so that when it is called\n //you can remove the original function and still be\n //able to call element.off(ev, fn) normally\n element.on(type, function onFn() {\n element.off(type, fn);\n element.off(type, onFn);\n });\n element.on(type, fn);\n },\n\n replaceWith: function(element, replaceNode) {\n var index, parent = element.parentNode;\n jqLiteDealoc(element);\n forEach(new JQLite(replaceNode), function(node){\n if (index) {\n parent.insertBefore(node, index.nextSibling);\n } else {\n parent.replaceChild(node, element);\n }\n index = node;\n });\n },\n\n children: function(element) {\n var children = [];\n forEach(element.childNodes, function(element){\n if (element.nodeType === 1)\n children.push(element);\n });\n return children;\n },\n\n contents: function(element) {\n return element.contentDocument || element.childNodes || [];\n },\n\n append: function(element, node) {\n var nodeType = element.nodeType;\n if (nodeType !== 1 && nodeType !== 11) return;\n\n node = new JQLite(node);\n\n for (var i = 0, ii = node.length; i < ii; i++) {\n var child = node[i];\n element.appendChild(child);\n }\n },\n\n prepend: function(element, node) {\n if (element.nodeType === 1) {\n var index = element.firstChild;\n forEach(new JQLite(node), function(child){\n element.insertBefore(child, index);\n });\n }\n },\n\n wrap: function(element, wrapNode) {\n wrapNode = jqLite(wrapNode).eq(0).clone()[0];\n var parent = element.parentNode;\n if (parent) {\n parent.replaceChild(wrapNode, element);\n }\n wrapNode.appendChild(element);\n },\n\n remove: jqLiteRemove,\n\n detach: function(element) {\n jqLiteRemove(element, true);\n },\n\n after: function(element, newElement) {\n var index = element, parent = element.parentNode;\n newElement = new JQLite(newElement);\n\n for (var i = 0, ii = newElement.length; i < ii; i++) {\n var node = newElement[i];\n parent.insertBefore(node, index.nextSibling);\n index = node;\n }\n },\n\n addClass: jqLiteAddClass,\n removeClass: jqLiteRemoveClass,\n\n toggleClass: function(element, selector, condition) {\n if (selector) {\n forEach(selector.split(' '), function(className){\n var classCondition = condition;\n if (isUndefined(classCondition)) {\n classCondition = !jqLiteHasClass(element, className);\n }\n (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);\n });\n }\n },\n\n parent: function(element) {\n var parent = element.parentNode;\n return parent && parent.nodeType !== 11 ? parent : null;\n },\n\n next: function(element) {\n return element.nextElementSibling;\n },\n\n find: function(element, selector) {\n if (element.getElementsByTagName) {\n return element.getElementsByTagName(selector);\n } else {\n return [];\n }\n },\n\n clone: jqLiteClone,\n\n triggerHandler: function(element, event, extraParameters) {\n\n var dummyEvent, eventFnsCopy, handlerArgs;\n var eventName = event.type || event;\n var expandoStore = jqLiteExpandoStore(element);\n var events = expandoStore && expandoStore.events;\n var eventFns = events && events[eventName];\n\n if (eventFns) {\n // Create a dummy event to pass to the handlers\n dummyEvent = {\n preventDefault: function() { this.defaultPrevented = true; },\n isDefaultPrevented: function() { return this.defaultPrevented === true; },\n stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },\n isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },\n stopPropagation: noop,\n type: eventName,\n target: element\n };\n\n // If a custom event was provided then extend our dummy event with it\n if (event.type) {\n dummyEvent = extend(dummyEvent, event);\n }\n\n // Copy event handlers in case event handlers array is modified during execution.\n eventFnsCopy = shallowCopy(eventFns);\n handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];\n\n forEach(eventFnsCopy, function(fn) {\n if (!dummyEvent.isImmediatePropagationStopped()) {\n fn.apply(element, handlerArgs);\n }\n });\n }\n }\n}, function(fn, name){\n /**\n * chaining functions\n */\n JQLite.prototype[name] = function(arg1, arg2, arg3) {\n var value;\n\n for(var i = 0, ii = this.length; i < ii; i++) {\n if (isUndefined(value)) {\n value = fn(this[i], arg1, arg2, arg3);\n if (isDefined(value)) {\n // any function which returns a value needs to be wrapped\n value = jqLite(value);\n }\n } else {\n jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n }\n }\n return isDefined(value) ? value : this;\n };\n\n // bind legacy bind/unbind to on/off\n JQLite.prototype.bind = JQLite.prototype.on;\n JQLite.prototype.unbind = JQLite.prototype.off;\n});\n\n/**\n * Computes a hash of an 'obj'.\n * Hash of a:\n * string is string\n * number is number as string\n * object is either result of calling $$hashKey function on the object or uniquely generated id,\n * that is also assigned to the $$hashKey property of the object.\n *\n * @param obj\n * @returns {string} hash string such that the same input will have the same hash string.\n * The resulting string key is in 'type:hashKey' format.\n */\nfunction hashKey(obj, nextUidFn) {\n var key = obj && obj.$$hashKey;\n\n if (key) {\n if (typeof key === 'function') {\n key = obj.$$hashKey();\n }\n return key;\n }\n\n var objType = typeof obj;\n if (objType == 'function' || (objType == 'object' && obj !== null)) {\n key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();\n } else {\n key = objType + ':' + obj;\n }\n\n return key;\n}\n\n/**\n * HashMap which can use objects as keys\n */\nfunction HashMap(array, isolatedUid) {\n if (isolatedUid) {\n var uid = 0;\n this.nextUid = function() {\n return ++uid;\n };\n }\n forEach(array, this.put, this);\n}\nHashMap.prototype = {\n /**\n * Store key value pair\n * @param key key to store can be any type\n * @param value value to store can be any type\n */\n put: function(key, value) {\n this[hashKey(key, this.nextUid)] = value;\n },\n\n /**\n * @param key\n * @returns {Object} the value for the key\n */\n get: function(key) {\n return this[hashKey(key, this.nextUid)];\n },\n\n /**\n * Remove the key/value pair\n * @param key\n */\n remove: function(key) {\n var value = this[key = hashKey(key, this.nextUid)];\n delete this[key];\n return value;\n }\n};\n\n/**\n * @ngdoc function\n * @module ng\n * @name angular.injector\n * @kind function\n *\n * @description\n * Creates an injector function that can be used for retrieving services as well as for\n * dependency injection (see {@link guide/di dependency injection}).\n *\n\n * @param {Array.} modules A list of module functions or their aliases. See\n * {@link angular.module}. The `ng` module must be explicitly added.\n * @returns {function()} Injector function. See {@link auto.$injector $injector}.\n *\n * @example\n * Typical usage\n * ```js\n * // create an injector\n * var $injector = angular.injector(['ng']);\n *\n * // use the injector to kick off your application\n * // use the type inference to auto inject arguments, or use implicit injection\n * $injector.invoke(function($rootScope, $compile, $document) {\n * $compile($document)($rootScope);\n * $rootScope.$digest();\n * });\n * ```\n *\n * Sometimes you want to get access to the injector of a currently running Angular app\n * from outside Angular. Perhaps, you want to inject and compile some markup after the\n * application has been bootstrapped. You can do this using the extra `injector()` added\n * to JQuery/jqLite elements. See {@link angular.element}.\n *\n * *This is fairly rare but could be the case if a third party library is injecting the\n * markup.*\n *\n * In the following example a new block of HTML containing a `ng-controller`\n * directive is added to the end of the document body by JQuery. We then compile and link\n * it into the current AngularJS scope.\n *\n * ```js\n * var $div = $('{{content.label}}');\n * $(document.body).append($div);\n *\n * angular.element(document).injector().invoke(function($compile) {\n * var scope = angular.element($div).scope();\n * $compile($div)(scope);\n * });\n * ```\n */\n\n\n/**\n * @ngdoc module\n * @name auto\n * @description\n *\n * Implicit module which gets automatically added to each {@link auto.$injector $injector}.\n */\n\nvar FN_ARGS = /^function\\s*[^\\(]*\\(\\s*([^\\)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar $injectorMinErr = minErr('$injector');\n\nfunction anonFn(fn) {\n // For anonymous functions, showing at the very least the function signature can help in\n // debugging.\n var fnText = fn.toString().replace(STRIP_COMMENTS, ''),\n args = fnText.match(FN_ARGS);\n if (args) {\n return 'function(' + (args[1] || '').replace(/[\\s\\r\\n]+/, ' ') + ')';\n }\n return 'fn';\n}\n\nfunction annotate(fn, strictDi, name) {\n var $inject,\n fnText,\n argDecl,\n last;\n\n if (typeof fn === 'function') {\n if (!($inject = fn.$inject)) {\n $inject = [];\n if (fn.length) {\n if (strictDi) {\n if (!isString(name) || !name) {\n name = fn.name || anonFn(fn);\n }\n throw $injectorMinErr('strictdi',\n '{0} is not using explicit annotation and cannot be invoked in strict mode', name);\n }\n fnText = fn.toString().replace(STRIP_COMMENTS, '');\n argDecl = fnText.match(FN_ARGS);\n forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {\n arg.replace(FN_ARG, function(all, underscore, name) {\n $inject.push(name);\n });\n });\n }\n fn.$inject = $inject;\n }\n } else if (isArray(fn)) {\n last = fn.length - 1;\n assertArgFn(fn[last], 'fn');\n $inject = fn.slice(0, last);\n } else {\n assertArgFn(fn, 'fn', true);\n }\n return $inject;\n}\n\n///////////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $injector\n * @kind function\n *\n * @description\n *\n * `$injector` is used to retrieve object instances as defined by\n * {@link auto.$provide provider}, instantiate types, invoke methods,\n * and load modules.\n *\n * The following always holds true:\n *\n * ```js\n * var $injector = angular.injector();\n * expect($injector.get('$injector')).toBe($injector);\n * expect($injector.invoke(function($injector) {\n * return $injector;\n * }).toBe($injector);\n * ```\n *\n * # Injection Function Annotation\n *\n * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n * following are all valid ways of annotating function with injection arguments and are equivalent.\n *\n * ```js\n * // inferred (only works if code not minified/obfuscated)\n * $injector.invoke(function(serviceA){});\n *\n * // annotated\n * function explicit(serviceA) {};\n * explicit.$inject = ['serviceA'];\n * $injector.invoke(explicit);\n *\n * // inline\n * $injector.invoke(['serviceA', function(serviceA){}]);\n * ```\n *\n * ## Inference\n *\n * In JavaScript calling `toString()` on a function returns the function definition. The definition\n * can then be parsed and the function arguments can be extracted. *NOTE:* This does not work with\n * minification, and obfuscation tools since these tools change the argument names.\n *\n * ## `$inject` Annotation\n * By adding an `$inject` property onto a function the injection parameters can be specified.\n *\n * ## Inline\n * As an array of injection names, where the last item in the array is the function to call.\n */\n\n/**\n * @ngdoc method\n * @name $injector#get\n *\n * @description\n * Return an instance of the service.\n *\n * @param {string} name The name of the instance to retrieve.\n * @return {*} The instance.\n */\n\n/**\n * @ngdoc method\n * @name $injector#invoke\n *\n * @description\n * Invoke the method and supply the method arguments from the `$injector`.\n *\n * @param {!Function} fn The function to invoke. Function parameters are injected according to the\n * {@link guide/di $inject Annotation} rules.\n * @param {Object=} self The `this` for the invoked method.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {*} the value returned by the invoked `fn` function.\n */\n\n/**\n * @ngdoc method\n * @name $injector#has\n *\n * @description\n * Allows the user to query if the particular service exists.\n *\n * @param {string} Name of the service to query.\n * @returns {boolean} returns true if injector has given service.\n */\n\n/**\n * @ngdoc method\n * @name $injector#instantiate\n * @description\n * Create a new instance of JS type. The method takes a constructor function, invokes the new\n * operator, and supplies all of the arguments to the constructor function as specified by the\n * constructor annotation.\n *\n * @param {Function} Type Annotated constructor function.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {Object} new instance of `Type`.\n */\n\n/**\n * @ngdoc method\n * @name $injector#annotate\n *\n * @description\n * Returns an array of service names which the function is requesting for injection. This API is\n * used by the injector to determine which services need to be injected into the function when the\n * function is invoked. There are three ways in which the function can be annotated with the needed\n * dependencies.\n *\n * # Argument names\n *\n * The simplest form is to extract the dependencies from the arguments of the function. This is done\n * by converting the function into a string using `toString()` method and extracting the argument\n * names.\n * ```js\n * // Given\n * function MyController($scope, $route) {\n * // ...\n * }\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * This method does not work with code minification / obfuscation. For this reason the following\n * annotation strategies are supported.\n *\n * # The `$inject` property\n *\n * If a function has an `$inject` property and its value is an array of strings, then the strings\n * represent names of services to be injected into the function.\n * ```js\n * // Given\n * var MyController = function(obfuscatedScope, obfuscatedRoute) {\n * // ...\n * }\n * // Define function dependencies\n * MyController['$inject'] = ['$scope', '$route'];\n *\n * // Then\n * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * # The array notation\n *\n * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n * is very inconvenient. In these situations using the array notation to specify the dependencies in\n * a way that survives minification is a better choice:\n *\n * ```js\n * // We wish to write this (not minification / obfuscation safe)\n * injector.invoke(function($compile, $rootScope) {\n * // ...\n * });\n *\n * // We are forced to write break inlining\n * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n * // ...\n * };\n * tmpFn.$inject = ['$compile', '$rootScope'];\n * injector.invoke(tmpFn);\n *\n * // To better support inline function the inline annotation is supported\n * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n * // ...\n * }]);\n *\n * // Therefore\n * expect(injector.annotate(\n * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n * ).toEqual(['$compile', '$rootScope']);\n * ```\n *\n * @param {Function|Array.} fn Function for which dependent service names need to\n * be retrieved as described above.\n *\n * @returns {Array.} The names of the services which the function requires.\n */\n\n\n\n\n/**\n * @ngdoc service\n * @name $provide\n *\n * @description\n *\n * The {@link auto.$provide $provide} service has a number of methods for registering components\n * with the {@link auto.$injector $injector}. Many of these functions are also exposed on\n * {@link angular.Module}.\n *\n * An Angular **service** is a singleton object created by a **service factory**. These **service\n * factories** are functions which, in turn, are created by a **service provider**.\n * The **service providers** are constructor functions. When instantiated they must contain a\n * property called `$get`, which holds the **service factory** function.\n *\n * When you request a service, the {@link auto.$injector $injector} is responsible for finding the\n * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n * function to get the instance of the **service**.\n *\n * Often services have no configuration options and there is no need to add methods to the service\n * provider. The provider will be no more than a constructor function with a `$get` property. For\n * these cases the {@link auto.$provide $provide} service has additional helper methods to register\n * services without specifying a provider.\n *\n * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the\n * {@link auto.$injector $injector}\n * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by\n * providers and services.\n * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by\n * services, not providers.\n * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,\n * that will be wrapped in a **service provider** object, whose `$get` property will contain the\n * given factory function.\n * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`\n * that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n * a new object using the given constructor function.\n *\n * See the individual methods for more information and examples.\n */\n\n/**\n * @ngdoc method\n * @name $provide#provider\n * @description\n *\n * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions\n * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n * service.\n *\n * Service provider names start with the name of the service they provide followed by `Provider`.\n * For example, the {@link ng.$log $log} service has a provider called\n * {@link ng.$logProvider $logProvider}.\n *\n * Service provider objects can have additional methods which allow configuration of the provider\n * and its service. Importantly, you can configure what kind of service is created by the `$get`\n * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n * method {@link ng.$logProvider#debugEnabled debugEnabled}\n * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n * console or not.\n *\n * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n 'Provider'` key.\n * @param {(Object|function())} provider If the provider is:\n *\n * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.\n * - `Constructor`: a new instance of the provider will be created using\n * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n *\n * @returns {Object} registered provider instance\n\n * @example\n *\n * The following example shows how to create a simple event tracking service and register it using\n * {@link auto.$provide#provider $provide.provider()}.\n *\n * ```js\n * // Define the eventTracker provider\n * function EventTrackerProvider() {\n * var trackingUrl = '/track';\n *\n * // A provider method for configuring where the tracked events should been saved\n * this.setTrackingUrl = function(url) {\n * trackingUrl = url;\n * };\n *\n * // The service factory function\n * this.$get = ['$http', function($http) {\n * var trackedEvents = {};\n * return {\n * // Call this to track an event\n * event: function(event) {\n * var count = trackedEvents[event] || 0;\n * count += 1;\n * trackedEvents[event] = count;\n * return count;\n * },\n * // Call this to save the tracked events to the trackingUrl\n * save: function() {\n * $http.post(trackingUrl, trackedEvents);\n * }\n * };\n * }];\n * }\n *\n * describe('eventTracker', function() {\n * var postSpy;\n *\n * beforeEach(module(function($provide) {\n * // Register the eventTracker provider\n * $provide.provider('eventTracker', EventTrackerProvider);\n * }));\n *\n * beforeEach(module(function(eventTrackerProvider) {\n * // Configure eventTracker provider\n * eventTrackerProvider.setTrackingUrl('/custom-track');\n * }));\n *\n * it('tracks events', inject(function(eventTracker) {\n * expect(eventTracker.event('login')).toEqual(1);\n * expect(eventTracker.event('login')).toEqual(2);\n * }));\n *\n * it('saves to the tracking url', inject(function(eventTracker, $http) {\n * postSpy = spyOn($http, 'post');\n * eventTracker.event('login');\n * eventTracker.save();\n * expect(postSpy).toHaveBeenCalled();\n * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n * }));\n * });\n * ```\n */\n\n/**\n * @ngdoc method\n * @name $provide#factory\n * @description\n *\n * Register a **service factory**, which will be called to return the service instance.\n * This is short for registering a service where its provider consists of only a `$get` property,\n * which is the given service factory function.\n * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to\n * configure your service in a provider.\n *\n * @param {string} name The name of the instance.\n * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand\n * for `$provide.provider(name, {$get: $getFn})`.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service\n * ```js\n * $provide.factory('ping', ['$http', function($http) {\n * return function ping() {\n * return $http.send('/ping');\n * };\n * }]);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#service\n * @description\n *\n * Register a **service constructor**, which will be invoked with `new` to create the service\n * instance.\n * This is short for registering a service where its provider's `$get` property is the service\n * constructor function that will be used to instantiate the service instance.\n *\n * You should use {@link auto.$provide#service $provide.service(class)} if you define your service\n * as a type/class.\n *\n * @param {string} name The name of the instance.\n * @param {Function} constructor A class (constructor function) that will be instantiated.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service using\n * {@link auto.$provide#service $provide.service(class)}.\n * ```js\n * var Ping = function($http) {\n * this.$http = $http;\n * };\n *\n * Ping.$inject = ['$http'];\n *\n * Ping.prototype.send = function() {\n * return this.$http.get('/ping');\n * };\n * $provide.service('ping', Ping);\n * ```\n * You would then inject and use this service like this:\n * ```js\n * someModule.controller('Ctrl', ['ping', function(ping) {\n * ping.send();\n * }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#value\n * @description\n *\n * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a\n * number, an array, an object or a function. This is short for registering a service where its\n * provider's `$get` property is a factory function that takes no arguments and returns the **value\n * service**.\n *\n * Value services are similar to constant services, except that they cannot be injected into a\n * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n * an Angular\n * {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the instance.\n * @param {*} value The value.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here are some examples of creating value services.\n * ```js\n * $provide.value('ADMIN_USER', 'admin');\n *\n * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n *\n * $provide.value('halfOf', function(value) {\n * return value / 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#constant\n * @description\n *\n * Register a **constant service**, such as a string, a number, an array, an object or a function,\n * with the {@link auto.$injector $injector}. Unlike {@link auto.$provide#value value} it can be\n * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n * be overridden by an Angular {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the constant.\n * @param {*} value The constant value.\n * @returns {Object} registered instance\n *\n * @example\n * Here a some examples of creating constants:\n * ```js\n * $provide.constant('SHARD_HEIGHT', 306);\n *\n * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n *\n * $provide.constant('double', function(value) {\n * return value * 2;\n * });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#decorator\n * @description\n *\n * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator\n * intercepts the creation of a service, allowing it to override or modify the behaviour of the\n * service. The object returned by the decorator may be the original service, or a new service\n * object which replaces or wraps and delegates to the original service.\n *\n * @param {string} name The name of the service to decorate.\n * @param {function()} decorator This function will be invoked when the service needs to be\n * instantiated and should return the decorated service instance. The function is called using\n * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.\n * Local injection arguments:\n *\n * * `$delegate` - The original service instance, which can be monkey patched, configured,\n * decorated or delegated to.\n *\n * @example\n * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n * calls to {@link ng.$log#error $log.warn()}.\n * ```js\n * $provide.decorator('$log', ['$delegate', function($delegate) {\n * $delegate.warn = $delegate.error;\n * return $delegate;\n * }]);\n * ```\n */\n\n\nfunction createInjector(modulesToLoad, strictDi) {\n strictDi = (strictDi === true);\n var INSTANTIATING = {},\n providerSuffix = 'Provider',\n path = [],\n loadedModules = new HashMap([], true),\n providerCache = {\n $provide: {\n provider: supportObject(provider),\n factory: supportObject(factory),\n service: supportObject(service),\n value: supportObject(value),\n constant: supportObject(constant),\n decorator: decorator\n }\n },\n providerInjector = (providerCache.$injector =\n createInternalInjector(providerCache, function() {\n throw $injectorMinErr('unpr', \"Unknown provider: {0}\", path.join(' <- '));\n })),\n instanceCache = {},\n instanceInjector = (instanceCache.$injector =\n createInternalInjector(instanceCache, function(servicename) {\n var provider = providerInjector.get(servicename + providerSuffix);\n return instanceInjector.invoke(provider.$get, provider, undefined, servicename);\n }));\n\n\n forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });\n\n return instanceInjector;\n\n ////////////////////////////////////\n // $provider\n ////////////////////////////////////\n\n function supportObject(delegate) {\n return function(key, value) {\n if (isObject(key)) {\n forEach(key, reverseParams(delegate));\n } else {\n return delegate(key, value);\n }\n };\n }\n\n function provider(name, provider_) {\n assertNotHasOwnProperty(name, 'service');\n if (isFunction(provider_) || isArray(provider_)) {\n provider_ = providerInjector.instantiate(provider_);\n }\n if (!provider_.$get) {\n throw $injectorMinErr('pget', \"Provider '{0}' must define $get factory method.\", name);\n }\n return providerCache[name + providerSuffix] = provider_;\n }\n\n function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }\n\n function service(name, constructor) {\n return factory(name, ['$injector', function($injector) {\n return $injector.instantiate(constructor);\n }]);\n }\n\n function value(name, val) { return factory(name, valueFn(val)); }\n\n function constant(name, value) {\n assertNotHasOwnProperty(name, 'constant');\n providerCache[name] = value;\n instanceCache[name] = value;\n }\n\n function decorator(serviceName, decorFn) {\n var origProvider = providerInjector.get(serviceName + providerSuffix),\n orig$get = origProvider.$get;\n\n origProvider.$get = function() {\n var origInstance = instanceInjector.invoke(orig$get, origProvider);\n return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n };\n }\n\n ////////////////////////////////////\n // Module Loading\n ////////////////////////////////////\n function loadModules(modulesToLoad){\n var runBlocks = [], moduleFn;\n forEach(modulesToLoad, function(module) {\n if (loadedModules.get(module)) return;\n loadedModules.put(module, true);\n\n function runInvokeQueue(queue) {\n var i, ii;\n for(i = 0, ii = queue.length; i < ii; i++) {\n var invokeArgs = queue[i],\n provider = providerInjector.get(invokeArgs[0]);\n\n provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n }\n }\n\n try {\n if (isString(module)) {\n moduleFn = angularModule(module);\n runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n runInvokeQueue(moduleFn._invokeQueue);\n runInvokeQueue(moduleFn._configBlocks);\n } else if (isFunction(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else if (isArray(module)) {\n runBlocks.push(providerInjector.invoke(module));\n } else {\n assertArgFn(module, 'module');\n }\n } catch (e) {\n if (isArray(module)) {\n module = module[module.length - 1];\n }\n if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {\n // Safari & FF's stack traces don't contain error.message content\n // unlike those of Chrome and IE\n // So if stack doesn't contain message, we create a new string that contains both.\n // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n /* jshint -W022 */\n e = e.message + '\\n' + e.stack;\n }\n throw $injectorMinErr('modulerr', \"Failed to instantiate module {0} due to:\\n{1}\",\n module, e.stack || e.message || e);\n }\n });\n return runBlocks;\n }\n\n ////////////////////////////////////\n // internal Injector\n ////////////////////////////////////\n\n function createInternalInjector(cache, factory) {\n\n function getService(serviceName) {\n if (cache.hasOwnProperty(serviceName)) {\n if (cache[serviceName] === INSTANTIATING) {\n throw $injectorMinErr('cdep', 'Circular dependency found: {0}',\n serviceName + ' <- ' + path.join(' <- '));\n }\n return cache[serviceName];\n } else {\n try {\n path.unshift(serviceName);\n cache[serviceName] = INSTANTIATING;\n return cache[serviceName] = factory(serviceName);\n } catch (err) {\n if (cache[serviceName] === INSTANTIATING) {\n delete cache[serviceName];\n }\n throw err;\n } finally {\n path.shift();\n }\n }\n }\n\n function invoke(fn, self, locals, serviceName) {\n if (typeof locals === 'string') {\n serviceName = locals;\n locals = null;\n }\n\n var args = [],\n $inject = annotate(fn, strictDi, serviceName),\n length, i,\n key;\n\n for(i = 0, length = $inject.length; i < length; i++) {\n key = $inject[i];\n if (typeof key !== 'string') {\n throw $injectorMinErr('itkn',\n 'Incorrect injection token! Expected service name as string, got {0}', key);\n }\n args.push(\n locals && locals.hasOwnProperty(key)\n ? locals[key]\n : getService(key)\n );\n }\n if (isArray(fn)) {\n fn = fn[length];\n }\n\n // http://jsperf.com/angularjs-invoke-apply-vs-switch\n // #5388\n return fn.apply(self, args);\n }\n\n function instantiate(Type, locals, serviceName) {\n var Constructor = function() {},\n instance, returnedValue;\n\n // Check if Type is annotated and use just the given function at n-1 as parameter\n // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;\n instance = new Constructor();\n returnedValue = invoke(Type, instance, locals, serviceName);\n\n return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;\n }\n\n return {\n invoke: invoke,\n instantiate: instantiate,\n get: getService,\n annotate: annotate,\n has: function(name) {\n return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n }\n };\n }\n}\n\ncreateInjector.$$annotate = annotate;\n\n/**\n * @ngdoc service\n * @name $anchorScroll\n * @kind function\n * @requires $window\n * @requires $location\n * @requires $rootScope\n *\n * @description\n * When called, it checks current value of `$location.hash()` and scrolls to the related element,\n * according to rules specified in\n * [Html5 spec](http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document).\n *\n * It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.\n * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.\n *\n * @example\n \n \n \n Go to bottom\n You're at the bottom!\n \n \n \n angular.module('anchorScrollExample', [])\n .controller('ScrollController', ['$scope', '$location', '$anchorScroll',\n function ($scope, $location, $anchorScroll) {\n $scope.gotoBottom = function() {\n // set the location.hash to the id of\n // the element you wish to scroll to.\n $location.hash('bottom');\n\n // call $anchorScroll()\n $anchorScroll();\n };\n }]);\n \n \n #scrollArea {\n height: 350px;\n overflow: auto;\n }\n\n #bottom {\n display: block;\n margin-top: 2000px;\n }\n \n \n */\nfunction $AnchorScrollProvider() {\n\n var autoScrollingEnabled = true;\n\n this.disableAutoScrolling = function() {\n autoScrollingEnabled = false;\n };\n\n this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n var document = $window.document;\n\n // helper function to get first anchor from a NodeList\n // can't use filter.filter, as it accepts only instances of Array\n // and IE can't convert NodeList to an array using [].slice\n // TODO(vojta): use filter if we change it to accept lists as well\n function getFirstAnchor(list) {\n var result = null;\n forEach(list, function(element) {\n if (!result && nodeName_(element) === 'a') result = element;\n });\n return result;\n }\n\n function scroll() {\n var hash = $location.hash(), elm;\n\n // empty hash, scroll to the top of the page\n if (!hash) $window.scrollTo(0, 0);\n\n // element with given id\n else if ((elm = document.getElementById(hash))) elm.scrollIntoView();\n\n // first anchor with given name :-D\n else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView();\n\n // no element and hash == 'top', scroll to the top of the page\n else if (hash === 'top') $window.scrollTo(0, 0);\n }\n\n // does not scroll when user clicks on anchor link that is currently on\n // (no url change, no $location.hash() change), browser native does scroll\n if (autoScrollingEnabled) {\n $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n function autoScrollWatchAction() {\n $rootScope.$evalAsync(scroll);\n });\n }\n\n return scroll;\n }];\n}\n\nvar $animateMinErr = minErr('$animate');\n\n/**\n * @ngdoc provider\n * @name $animateProvider\n *\n * @description\n * Default implementation of $animate that doesn't perform any animations, instead just\n * synchronously performs DOM\n * updates and calls done() callbacks.\n *\n * In order to enable animations the ngAnimate module has to be loaded.\n *\n * To see the functional implementation check out src/ngAnimate/animate.js\n */\nvar $AnimateProvider = ['$provide', function($provide) {\n\n\n this.$$selectors = {};\n\n\n /**\n * @ngdoc method\n * @name $animateProvider#register\n *\n * @description\n * Registers a new injectable animation factory function. The factory function produces the\n * animation object which contains callback functions for each event that is expected to be\n * animated.\n *\n * * `eventFn`: `function(Element, doneFunction)` The element to animate, the `doneFunction`\n * must be called once the element animation is complete. If a function is returned then the\n * animation service will use this function to cancel the animation whenever a cancel event is\n * triggered.\n *\n *\n * ```js\n * return {\n * eventFn : function(element, done) {\n * //code to run the animation\n * //once complete, then run done()\n * return function cancellationFunction() {\n * //code to cancel the animation\n * }\n * }\n * }\n * ```\n *\n * @param {string} name The name of the animation.\n * @param {Function} factory The factory function that will be executed to return the animation\n * object.\n */\n this.register = function(name, factory) {\n var key = name + '-animation';\n if (name && name.charAt(0) != '.') throw $animateMinErr('notcsel',\n \"Expecting class selector starting with '.' got '{0}'.\", name);\n this.$$selectors[name.substr(1)] = key;\n $provide.factory(key, factory);\n };\n\n /**\n * @ngdoc method\n * @name $animateProvider#classNameFilter\n *\n * @description\n * Sets and/or returns the CSS class regular expression that is checked when performing\n * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n * therefore enable $animate to attempt to perform an animation on any element.\n * When setting the classNameFilter value, animations will only be performed on elements\n * that successfully match the filter expression. This in turn can boost performance\n * for low-powered devices as well as applications containing a lot of structural operations.\n * @param {RegExp=} expression The className expression which will be checked against all animations\n * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n */\n this.classNameFilter = function(expression) {\n if(arguments.length === 1) {\n this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;\n }\n return this.$$classNameFilter;\n };\n\n this.$get = ['$$q', '$$asyncCallback', function($$q, $$asyncCallback) {\n\n var currentDefer;\n function asyncPromise() {\n // only serve one instance of a promise in order to save CPU cycles\n if (!currentDefer) {\n currentDefer = $$q.defer();\n $$asyncCallback(function() {\n currentDefer.resolve();\n currentDefer = null;\n });\n }\n return currentDefer.promise;\n }\n\n /**\n *\n * @ngdoc service\n * @name $animate\n * @description The $animate service provides rudimentary DOM manipulation functions to\n * insert, remove and move elements within the DOM, as well as adding and removing classes.\n * This service is the core service used by the ngAnimate $animator service which provides\n * high-level animation hooks for CSS and JavaScript.\n *\n * $animate is available in the AngularJS core, however, the ngAnimate module must be included\n * to enable full out animation support. Otherwise, $animate will only perform simple DOM\n * manipulation operations.\n *\n * To learn more about enabling animation support, click here to visit the {@link ngAnimate\n * ngAnimate module page} as well as the {@link ngAnimate.$animate ngAnimate $animate service\n * page}.\n */\n return {\n\n /**\n *\n * @ngdoc method\n * @name $animate#enter\n * @kind function\n * @description Inserts the element into the DOM either after the `after` element or\n * as the first child within the `parent` element. When the function is called a promise\n * is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will be inserted into the DOM\n * @param {DOMElement} parent the parent element which will append the element as\n * a child (if the after element is not present)\n * @param {DOMElement} after the sibling element which will append the element\n * after itself\n * @return {Promise} the animation callback promise\n */\n enter : function(element, parent, after) {\n after ? after.after(element)\n : parent.prepend(element);\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#leave\n * @kind function\n * @description Removes the element from the DOM. When the function is called a promise\n * is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will be removed from the DOM\n * @return {Promise} the animation callback promise\n */\n leave : function(element) {\n element.remove();\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#move\n * @kind function\n * @description Moves the position of the provided element within the DOM to be placed\n * either after the `after` element or inside of the `parent` element. When the function\n * is called a promise is returned that will be resolved at a later time.\n *\n * @param {DOMElement} element the element which will be moved around within the\n * DOM\n * @param {DOMElement} parent the parent element where the element will be\n * inserted into (if the after element is not present)\n * @param {DOMElement} after the sibling element where the element will be\n * positioned next to\n * @return {Promise} the animation callback promise\n */\n move : function(element, parent, after) {\n // Do not remove element before insert. Removing will cause data associated with the\n // element to be dropped. Insert will implicitly do the remove.\n return this.enter(element, parent, after);\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#addClass\n * @kind function\n * @description Adds the provided className CSS class value to the provided element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have the className value\n * added to it\n * @param {string} className the CSS class which will be added to the element\n * @return {Promise} the animation callback promise\n */\n addClass : function(element, className) {\n className = !isString(className)\n ? (isArray(className) ? className.join(' ') : '')\n : className;\n forEach(element, function (element) {\n jqLiteAddClass(element, className);\n });\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#removeClass\n * @kind function\n * @description Removes the provided className CSS class value from the provided element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have the className value\n * removed from it\n * @param {string} className the CSS class which will be removed from the element\n * @return {Promise} the animation callback promise\n */\n removeClass : function(element, className) {\n className = !isString(className)\n ? (isArray(className) ? className.join(' ') : '')\n : className;\n forEach(element, function (element) {\n jqLiteRemoveClass(element, className);\n });\n return asyncPromise();\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#setClass\n * @kind function\n * @description Adds and/or removes the given CSS classes to and from the element.\n * When the function is called a promise is returned that will be resolved at a later time.\n * @param {DOMElement} element the element which will have its CSS classes changed\n * removed from it\n * @param {string} add the CSS classes which will be added to the element\n * @param {string} remove the CSS class which will be removed from the element\n * @return {Promise} the animation callback promise\n */\n setClass : function(element, add, remove) {\n this.addClass(element, add);\n this.removeClass(element, remove);\n return asyncPromise();\n },\n\n enabled : noop,\n cancel : noop\n };\n }];\n}];\n\nfunction $$AsyncCallbackProvider(){\n this.$get = ['$$rAF', '$timeout', function($$rAF, $timeout) {\n return $$rAF.supported\n ? function(fn) { return $$rAF(fn); }\n : function(fn) {\n return $timeout(fn, 0, false);\n };\n }];\n}\n\n/**\n * ! This is a private undocumented service !\n *\n * @name $browser\n * @requires $log\n * @description\n * This object has two goals:\n *\n * - hide all the global state in the browser caused by the window object\n * - abstract away all the browser specific features and inconsistencies\n *\n * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n * service, which can be used for convenient testing of the application without the interaction with\n * the real browser apis.\n */\n/**\n * @param {object} window The global window object.\n * @param {object} document jQuery wrapped document.\n * @param {function()} XHR XMLHttpRequest constructor.\n * @param {object} $log console.log or an object with the same interface.\n * @param {object} $sniffer $sniffer service\n */\nfunction Browser(window, document, $log, $sniffer) {\n var self = this,\n rawDocument = document[0],\n location = window.location,\n history = window.history,\n setTimeout = window.setTimeout,\n clearTimeout = window.clearTimeout,\n pendingDeferIds = {};\n\n self.isMock = false;\n\n var outstandingRequestCount = 0;\n var outstandingRequestCallbacks = [];\n\n // TODO(vojta): remove this temporary api\n self.$$completeOutstandingRequest = completeOutstandingRequest;\n self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };\n\n /**\n * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`\n * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.\n */\n function completeOutstandingRequest(fn) {\n try {\n fn.apply(null, sliceArgs(arguments, 1));\n } finally {\n outstandingRequestCount--;\n if (outstandingRequestCount === 0) {\n while(outstandingRequestCallbacks.length) {\n try {\n outstandingRequestCallbacks.pop()();\n } catch (e) {\n $log.error(e);\n }\n }\n }\n }\n }\n\n /**\n * @private\n * Note: this method is used only by scenario runner\n * TODO(vojta): prefix this method with $$ ?\n * @param {function()} callback Function that will be called when no outstanding request\n */\n self.notifyWhenNoOutstandingRequests = function(callback) {\n // force browser to execute all pollFns - this is needed so that cookies and other pollers fire\n // at some deterministic time in respect to the test runner's actions. Leaving things up to the\n // regular poller would result in flaky tests.\n forEach(pollFns, function(pollFn){ pollFn(); });\n\n if (outstandingRequestCount === 0) {\n callback();\n } else {\n outstandingRequestCallbacks.push(callback);\n }\n };\n\n //////////////////////////////////////////////////////////////\n // Poll Watcher API\n //////////////////////////////////////////////////////////////\n var pollFns = [],\n pollTimeout;\n\n /**\n * @name $browser#addPollFn\n *\n * @param {function()} fn Poll function to add\n *\n * @description\n * Adds a function to the list of functions that poller periodically executes,\n * and starts polling if not started yet.\n *\n * @returns {function()} the added function\n */\n self.addPollFn = function(fn) {\n if (isUndefined(pollTimeout)) startPoller(100, setTimeout);\n pollFns.push(fn);\n return fn;\n };\n\n /**\n * @param {number} interval How often should browser call poll functions (ms)\n * @param {function()} setTimeout Reference to a real or fake `setTimeout` function.\n *\n * @description\n * Configures the poller to run in the specified intervals, using the specified\n * setTimeout fn and kicks it off.\n */\n function startPoller(interval, setTimeout) {\n (function check() {\n forEach(pollFns, function(pollFn){ pollFn(); });\n pollTimeout = setTimeout(check, interval);\n })();\n }\n\n //////////////////////////////////////////////////////////////\n // URL API\n //////////////////////////////////////////////////////////////\n\n var lastBrowserUrl = location.href,\n baseElement = document.find('base'),\n newLocation = null;\n\n /**\n * @name $browser#url\n *\n * @description\n * GETTER:\n * Without any argument, this method just returns current value of location.href.\n *\n * SETTER:\n * With at least one argument, this method sets url to new value.\n * If html5 history api supported, pushState/replaceState is used, otherwise\n * location.href/location.replace is used.\n * Returns its own instance to allow chaining\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to change url.\n *\n * @param {string} url New url (when used as setter)\n * @param {boolean=} replace Should new url replace current history record ?\n */\n self.url = function(url, replace) {\n // Android Browser BFCache causes location, history reference to become stale.\n if (location !== window.location) location = window.location;\n if (history !== window.history) history = window.history;\n\n // setter\n if (url) {\n if (lastBrowserUrl == url) return;\n lastBrowserUrl = url;\n if ($sniffer.history) {\n if (replace) history.replaceState(null, '', url);\n else {\n history.pushState(null, '', url);\n // Crazy Opera Bug: http://my.opera.com/community/forums/topic.dml?id=1185462\n baseElement.attr('href', baseElement.attr('href'));\n }\n } else {\n newLocation = url;\n if (replace) {\n location.replace(url);\n } else {\n location.href = url;\n }\n }\n return self;\n // getter\n } else {\n // - newLocation is a workaround for an IE7-9 issue with location.replace and location.href\n // methods not updating location.href synchronously.\n // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172\n return newLocation || location.href.replace(/%27/g,\"'\");\n }\n };\n\n var urlChangeListeners = [],\n urlChangeInit = false;\n\n function fireUrlChange() {\n newLocation = null;\n if (lastBrowserUrl == self.url()) return;\n\n lastBrowserUrl = self.url();\n forEach(urlChangeListeners, function(listener) {\n listener(self.url());\n });\n }\n\n /**\n * @name $browser#onUrlChange\n *\n * @description\n * Register callback function that will be called, when url changes.\n *\n * It's only called when the url is changed from outside of angular:\n * - user types different url into address bar\n * - user clicks on history (forward/back) button\n * - user clicks on a link\n *\n * It's not called when url is changed by $browser.url() method\n *\n * The listener gets called with new url as parameter.\n *\n * NOTE: this api is intended for use only by the $location service. Please use the\n * {@link ng.$location $location service} to monitor url changes in angular apps.\n *\n * @param {function(string)} listener Listener function to be called when url changes.\n * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n */\n self.onUrlChange = function(callback) {\n // TODO(vojta): refactor to use node's syntax for events\n if (!urlChangeInit) {\n // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)\n // don't fire popstate when user change the address bar and don't fire hashchange when url\n // changed by push/replaceState\n\n // html5 history api - popstate event\n if ($sniffer.history) jqLite(window).on('popstate', fireUrlChange);\n // hashchange event\n if ($sniffer.hashchange) jqLite(window).on('hashchange', fireUrlChange);\n // polling\n else self.addPollFn(fireUrlChange);\n\n urlChangeInit = true;\n }\n\n urlChangeListeners.push(callback);\n return callback;\n };\n\n /**\n * Checks whether the url has changed outside of Angular.\n * Needs to be exported to be able to check for changes that have been done in sync,\n * as hashchange/popstate events fire in async.\n */\n self.$$checkUrlChange = fireUrlChange;\n\n //////////////////////////////////////////////////////////////\n // Misc API\n //////////////////////////////////////////////////////////////\n\n /**\n * @name $browser#baseHref\n *\n * @description\n * Returns current \n * (always relative - without domain)\n *\n * @returns {string} The current base href\n */\n self.baseHref = function() {\n var href = baseElement.attr('href');\n return href ? href.replace(/^(https?\\:)?\\/\\/[^\\/]*/, '') : '';\n };\n\n //////////////////////////////////////////////////////////////\n // Cookies API\n //////////////////////////////////////////////////////////////\n var lastCookies = {};\n var lastCookieString = '';\n var cookiePath = self.baseHref();\n\n /**\n * @name $browser#cookies\n *\n * @param {string=} name Cookie name\n * @param {string=} value Cookie value\n *\n * @description\n * The cookies method provides a 'private' low level access to browser cookies.\n * It is not meant to be used directly, use the $cookie service instead.\n *\n * The return values vary depending on the arguments that the method was called with as follows:\n *\n * - cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify\n * it\n * - cookies(name, value) -> set name to value, if value is undefined delete the cookie\n * - cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that\n * way)\n *\n * @returns {Object} Hash of all cookies (if called without any parameter)\n */\n self.cookies = function(name, value) {\n var cookieLength, cookieArray, cookie, i, index;\n\n if (name) {\n if (value === undefined) {\n rawDocument.cookie = encodeURIComponent(name) + \"=;path=\" + cookiePath +\n \";expires=Thu, 01 Jan 1970 00:00:00 GMT\";\n } else {\n if (isString(value)) {\n cookieLength = (rawDocument.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value) +\n ';path=' + cookiePath).length + 1;\n\n // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:\n // - 300 cookies\n // - 20 cookies per unique domain\n // - 4096 bytes per cookie\n if (cookieLength > 4096) {\n $log.warn(\"Cookie '\"+ name +\n \"' possibly not set or overflowed because it was too large (\"+\n cookieLength + \" > 4096 bytes)!\");\n }\n }\n }\n } else {\n if (rawDocument.cookie !== lastCookieString) {\n lastCookieString = rawDocument.cookie;\n cookieArray = lastCookieString.split(\"; \");\n lastCookies = {};\n\n for (i = 0; i < cookieArray.length; i++) {\n cookie = cookieArray[i];\n index = cookie.indexOf('=');\n if (index > 0) { //ignore nameless cookies\n name = decodeURIComponent(cookie.substring(0, index));\n // the first value that is seen for a cookie is the most\n // specific one. values for the same cookie name that\n // follow are for less specific paths.\n if (lastCookies[name] === undefined) {\n lastCookies[name] = decodeURIComponent(cookie.substring(index + 1));\n }\n }\n }\n }\n return lastCookies;\n }\n };\n\n\n /**\n * @name $browser#defer\n * @param {function()} fn A function, who's execution should be deferred.\n * @param {number=} [delay=0] of milliseconds to defer the function execution.\n * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n *\n * @description\n * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n *\n * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n * via `$browser.defer.flush()`.\n *\n */\n self.defer = function(fn, delay) {\n var timeoutId;\n outstandingRequestCount++;\n timeoutId = setTimeout(function() {\n delete pendingDeferIds[timeoutId];\n completeOutstandingRequest(fn);\n }, delay || 0);\n pendingDeferIds[timeoutId] = true;\n return timeoutId;\n };\n\n\n /**\n * @name $browser#defer.cancel\n *\n * @description\n * Cancels a deferred task identified with `deferId`.\n *\n * @param {*} deferId Token returned by the `$browser.defer` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n self.defer.cancel = function(deferId) {\n if (pendingDeferIds[deferId]) {\n delete pendingDeferIds[deferId];\n clearTimeout(deferId);\n completeOutstandingRequest(noop);\n return true;\n }\n return false;\n };\n\n}\n\nfunction $BrowserProvider(){\n this.$get = ['$window', '$log', '$sniffer', '$document',\n function( $window, $log, $sniffer, $document){\n return new Browser($window, $document, $log, $sniffer);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $cacheFactory\n *\n * @description\n * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to\n * them.\n *\n * ```js\n *\n * var cache = $cacheFactory('cacheId');\n * expect($cacheFactory.get('cacheId')).toBe(cache);\n * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n *\n * cache.put(\"key\", \"value\");\n * cache.put(\"another key\", \"another value\");\n *\n * // We've specified no options on creation\n * expect(cache.info()).toEqual({id: 'cacheId', size: 2});\n *\n * ```\n *\n *\n * @param {string} cacheId Name or id of the newly created cache.\n * @param {object=} options Options object that specifies the cache behavior. Properties:\n *\n * - `{number=}` `capacity` — turns the cache into LRU cache.\n *\n * @returns {object} Newly created cache object with the following set of methods:\n *\n * - `{object}` `info()` — Returns id, size, and options of cache.\n * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n * it.\n * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n * - `{void}` `removeAll()` — Removes all cached values.\n * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n *\n * @example\n \n \n \n \n \n Cache\n\n Cached Values\n \n \n : \n \n \n\n Cache Info\n \n \n : \n \n \n \n \n \n angular.module('cacheExampleApp', []).\n controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {\n $scope.keys = [];\n $scope.cache = $cacheFactory('cacheId');\n $scope.put = function(key, value) {\n if ($scope.cache.get(key) === undefined) {\n $scope.keys.push(key);\n }\n $scope.cache.put(key, value === undefined ? null : value);\n };\n }]);\n \n \n p {\n margin: 10px 0 3px;\n }\n \n \n */\nfunction $CacheFactoryProvider() {\n\n this.$get = function() {\n var caches = {};\n\n function cacheFactory(cacheId, options) {\n if (cacheId in caches) {\n throw minErr('$cacheFactory')('iid', \"CacheId '{0}' is already taken!\", cacheId);\n }\n\n var size = 0,\n stats = extend({}, options, {id: cacheId}),\n data = {},\n capacity = (options && options.capacity) || Number.MAX_VALUE,\n lruHash = {},\n freshEnd = null,\n staleEnd = null;\n\n /**\n * @ngdoc type\n * @name $cacheFactory.Cache\n *\n * @description\n * A cache object used to store and retrieve data, primarily used by\n * {@link $http $http} and the {@link ng.directive:script script} directive to cache\n * templates and other data.\n *\n * ```js\n * angular.module('superCache')\n * .factory('superCache', ['$cacheFactory', function($cacheFactory) {\n * return $cacheFactory('super-cache');\n * }]);\n * ```\n *\n * Example test:\n *\n * ```js\n * it('should behave like a cache', inject(function(superCache) {\n * superCache.put('key', 'value');\n * superCache.put('another key', 'another value');\n *\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 2\n * });\n *\n * superCache.remove('another key');\n * expect(superCache.get('another key')).toBeUndefined();\n *\n * superCache.removeAll();\n * expect(superCache.info()).toEqual({\n * id: 'super-cache',\n * size: 0\n * });\n * }));\n * ```\n */\n return caches[cacheId] = {\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#put\n * @kind function\n *\n * @description\n * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be\n * retrieved later, and incrementing the size of the cache if the key was not already\n * present in the cache. If behaving like an LRU cache, it will also remove stale\n * entries from the set.\n *\n * It will not insert undefined values into the cache.\n *\n * @param {string} key the key under which the cached data is stored.\n * @param {*} value the value to store alongside the key. If it is undefined, the key\n * will not be stored.\n * @returns {*} the value stored.\n */\n put: function(key, value) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\n refresh(lruEntry);\n }\n\n if (isUndefined(value)) return;\n if (!(key in data)) size++;\n data[key] = value;\n\n if (size > capacity) {\n this.remove(staleEnd.key);\n }\n\n return value;\n },\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#get\n * @kind function\n *\n * @description\n * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the data to be retrieved\n * @returns {*} the value stored.\n */\n get: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n refresh(lruEntry);\n }\n\n return data[key];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#remove\n * @kind function\n *\n * @description\n * Removes an entry from the {@link $cacheFactory.Cache Cache} object.\n *\n * @param {string} key the key of the entry to be removed\n */\n remove: function(key) {\n if (capacity < Number.MAX_VALUE) {\n var lruEntry = lruHash[key];\n\n if (!lruEntry) return;\n\n if (lruEntry == freshEnd) freshEnd = lruEntry.p;\n if (lruEntry == staleEnd) staleEnd = lruEntry.n;\n link(lruEntry.n,lruEntry.p);\n\n delete lruHash[key];\n }\n\n delete data[key];\n size--;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#removeAll\n * @kind function\n *\n * @description\n * Clears the cache object of any entries.\n */\n removeAll: function() {\n data = {};\n size = 0;\n lruHash = {};\n freshEnd = staleEnd = null;\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#destroy\n * @kind function\n *\n * @description\n * Destroys the {@link $cacheFactory.Cache Cache} object entirely,\n * removing it from the {@link $cacheFactory $cacheFactory} set.\n */\n destroy: function() {\n data = null;\n stats = null;\n lruHash = null;\n delete caches[cacheId];\n },\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory.Cache#info\n * @kind function\n *\n * @description\n * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.\n *\n * @returns {object} an object with the following properties:\n * \n * **id**: the id of the cache instance\n * **size**: the number of entries kept in the cache instance\n * **...**: any additional properties from the options object when creating the\n * cache.\n * \n */\n info: function() {\n return extend({}, stats, {size: size});\n }\n };\n\n\n /**\n * makes the `entry` the freshEnd of the LRU linked list\n */\n function refresh(entry) {\n if (entry != freshEnd) {\n if (!staleEnd) {\n staleEnd = entry;\n } else if (staleEnd == entry) {\n staleEnd = entry.n;\n }\n\n link(entry.n, entry.p);\n link(entry, freshEnd);\n freshEnd = entry;\n freshEnd.n = null;\n }\n }\n\n\n /**\n * bidirectionally links two entries of the LRU linked list\n */\n function link(nextEntry, prevEntry) {\n if (nextEntry != prevEntry) {\n if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#info\n *\n * @description\n * Get information about all the caches that have been created\n *\n * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n */\n cacheFactory.info = function() {\n var info = {};\n forEach(caches, function(cache, cacheId) {\n info[cacheId] = cache.info();\n });\n return info;\n };\n\n\n /**\n * @ngdoc method\n * @name $cacheFactory#get\n *\n * @description\n * Get access to a cache object by the `cacheId` used when it was created.\n *\n * @param {string} cacheId Name or id of a cache to access.\n * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n */\n cacheFactory.get = function(cacheId) {\n return caches[cacheId];\n };\n\n\n return cacheFactory;\n };\n}\n\n/**\n * @ngdoc service\n * @name $templateCache\n *\n * @description\n * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n * can load templates directly into the cache in a `script` tag, or by consuming the\n * `$templateCache` service directly.\n *\n * Adding via the `script` tag:\n *\n * ```html\n * \n * ```\n *\n * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n * the document, but it must be below the `ng-app` definition.\n *\n * Adding via the $templateCache service:\n *\n * ```js\n * var myApp = angular.module('myApp', []);\n * myApp.run(function($templateCache) {\n * $templateCache.put('templateId.html', 'This is the content of the template');\n * });\n * ```\n *\n * To retrieve the template later, simply use it in your HTML:\n * ```html\n * \n * ```\n *\n * or get it via Javascript:\n * ```js\n * $templateCache.get('templateId.html')\n * ```\n *\n * See {@link ng.$cacheFactory $cacheFactory}.\n *\n */\nfunction $TemplateCacheProvider() {\n this.$get = ['$cacheFactory', function($cacheFactory) {\n return $cacheFactory('templates');\n }];\n}\n\n/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n *\n * DOM-related variables:\n *\n * - \"node\" - DOM Node\n * - \"element\" - DOM Element or Node\n * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n *\n *\n * Compiler related stuff:\n *\n * - \"linkFn\" - linking fn of a single directive\n * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n * - \"childLinkFn\" - function that aggregates all linking fns for child nodes of a particular node\n * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n */\n\n\n/**\n * @ngdoc service\n * @name $compile\n * @kind function\n *\n * @description\n * Compiles an HTML string or DOM into a template and produces a template function, which\n * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n *\n * The compilation is a process of walking the DOM tree and matching DOM elements to\n * {@link ng.$compileProvider#directive directives}.\n *\n * \n * **Note:** This document is an in-depth reference of all directive options.\n * For a gentle introduction to directives with examples of common use cases,\n * see the {@link guide/directive directive guide}.\n * \n *\n * ## Comprehensive Directive API\n *\n * There are many different options for a directive.\n *\n * The difference resides in the return value of the factory function.\n * You can either return a \"Directive Definition Object\" (see below) that defines the directive properties,\n * or just the `postLink` function (all other properties will have the default values).\n *\n * \n * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n * \n *\n * Here's an example directive declared with a Directive Definition Object:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * priority: 0,\n * template: '', // or // function(tElement, tAttrs) { ... },\n * // or\n * // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },\n * transclude: false,\n * restrict: 'A',\n * scope: false,\n * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n * controllerAs: 'stringAlias',\n * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n * compile: function compile(tElement, tAttrs, transclude) {\n * return {\n * pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n * post: function postLink(scope, iElement, iAttrs, controller) { ... }\n * }\n * // or\n * // return function postLink( ... ) { ... }\n * },\n * // or\n * // link: {\n * // pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n * // post: function postLink(scope, iElement, iAttrs, controller) { ... }\n * // }\n * // or\n * // link: function postLink( ... ) { ... }\n * };\n * return directiveDefinitionObject;\n * });\n * ```\n *\n * \n * **Note:** Any unspecified options will use the default value. You can see the default values below.\n * \n *\n * Therefore the above can be simplified as:\n *\n * ```js\n * var myModule = angular.module(...);\n *\n * myModule.directive('directiveName', function factory(injectables) {\n * var directiveDefinitionObject = {\n * link: function postLink(scope, iElement, iAttrs) { ... }\n * };\n * return directiveDefinitionObject;\n * // or\n * // return function postLink(scope, iElement, iAttrs) { ... }\n * });\n * ```\n *\n *\n *\n * ### Directive Definition Object\n *\n * The directive definition object provides instructions to the {@link ng.$compile\n * compiler}. The attributes are:\n *\n * #### `multiElement`\n * When this property is set to true, the HTML compiler will collect DOM nodes between\n * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them\n * together as the directive elements. It is recomended that this feature be used on directives\n * which are not strictly behavioural (such as {@link api/ng.directive:ngClick ngClick}), and which\n * do not manipulate or replace child nodes (such as {@link api/ng.directive:ngInclude ngInclude}).\n *\n * #### `priority`\n * When there are multiple directives defined on a single DOM element, sometimes it\n * is necessary to specify the order in which the directives are applied. The `priority` is used\n * to sort the directives before their `compile` functions get called. Priority is defined as a\n * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n * are also run in priority order, but post-link functions are run in reverse order. The order\n * of directives with the same priority is undefined. The default priority is `0`.\n *\n * #### `terminal`\n * If set to true then the current `priority` will be the last set of directives\n * which will execute (any directives at the current priority will still execute\n * as the order of execution on same `priority` is undefined).\n *\n * #### `scope`\n * **If set to `true`,** then a new scope will be created for this directive. If multiple directives on the\n * same element request a new scope, only one new scope is created. The new scope rule does not\n * apply for the root of the template since the root of the template always gets a new scope.\n *\n * **If set to `{}` (object hash),** then a new \"isolate\" scope is created. The 'isolate' scope differs from\n * normal scope in that it does not prototypically inherit from the parent scope. This is useful\n * when creating reusable components, which should not accidentally read or modify data in the\n * parent scope.\n *\n * The 'isolate' scope takes an object hash which defines a set of local scope properties\n * derived from the parent scope. These local properties are useful for aliasing values for\n * templates. Locals definition is a hash of local scope property to its source:\n *\n * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n * always a string since DOM attributes are strings. If no `attr` name is specified then the\n * attribute name is assumed to be the same as the local name.\n * Given `` and widget definition\n * of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect\n * the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the\n * `localName` property on the widget scope. The `name` is read from the parent scope (not\n * component scope).\n *\n * * `=` or `=attr` - set up bi-directional binding between a local scope property and the\n * parent scope property of name defined via the value of the `attr` attribute. If no `attr`\n * name is specified then the attribute name is assumed to be the same as the local name.\n * Given `` and widget definition of\n * `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the\n * value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected\n * in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent\n * scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You\n * can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional.\n *\n * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.\n * If no `attr` name is specified then the attribute name is assumed to be the same as the\n * local name. Given `` and widget definition of\n * `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to\n * a function wrapper for the `count = count + value` expression. Often it's desirable to\n * pass data from the isolated scope via an expression to the parent scope, this can be\n * done by passing a map of local variable names and values into the expression wrapper fn.\n * For example, if the expression is `increment(amount)` then we can specify the amount value\n * by calling the `localFn` as `localFn({amount: 22})`.\n *\n *\n * #### `bindToController`\n * When an isolate scope is used for a component (see above), and `controllerAs` is used, `bindToController` will\n * allow a component to have its properties bound to the controller, rather than to scope. When the controller\n * is instantiated, the initial values of the isolate scope bindings are already available.\n *\n * #### `controller`\n * Controller constructor function. The controller is instantiated before the\n * pre-linking phase and it is shared with other directives (see\n * `require` attribute). This allows the directives to communicate with each other and augment\n * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n *\n * * `$scope` - Current scope associated with the element\n * * `$element` - Current element\n * * `$attrs` - Current attributes object for the element\n * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n * * `scope`: optional argument to override the scope.\n * * `cloneLinkingFn`: optional argument to create clones of the original transcluded content.\n * * `futureParentElement`:\n * * defines the parent to which the `cloneLinkingFn` will add the cloned elements.\n * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.\n * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)\n * and when the `cloneLinkinFn` is passed,\n * as those elements need to created and cloned in a special way when they are defined outside their\n * usual containers (e.g. like ``).\n * * See also the `directive.templateNamespace` property.\n *\n *\n * #### `require`\n * Require another directive and inject its controller as the fourth argument to the linking function. The\n * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the\n * injected argument will be an array in corresponding order. If no such directive can be\n * found, or if the directive does not have a controller, then an error is raised. The name can be prefixed with:\n *\n * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.\n * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass\n * `null` to the `link` fn if not found.\n *\n *\n * #### `controllerAs`\n * Controller alias at the directive scope. An alias for the controller so it\n * can be referenced at the directive template. The directive needs to define a scope for this\n * configuration to be used. Useful in the case when directive is used as component.\n *\n *\n * #### `restrict`\n * String of subset of `EACM` which restricts the directive to a specific directive\n * declaration style. If omitted, the defaults (elements and attributes) are used.\n *\n * * `E` - Element name (default): ``\n * * `A` - Attribute (default): ``\n * * `C` - Class: ``\n * * `M` - Comment: ``\n *\n *\n * #### `templateNamespace`\n * String representing the document type used by the markup in the template.\n * AngularJS needs this information as those elements need to be created and cloned\n * in a special way when they are defined outside their usual containers like `` and ``.\n *\n * * `html` - All root nodes in the template are HTML. Root nodes may also be\n * top-level elements such as `` or ``.\n * * `svg` - The root nodes in the template are SVG elements (excluding ``).\n * * `math` - The root nodes in the template are MathML elements (excluding ``).\n *\n * If no `templateNamespace` is specified, then the namespace is considered to be `html`.\n *\n * #### `template`\n * HTML markup that may:\n * * Replace the contents of the directive's element (default).\n * * Replace the directive's element itself (if `replace` is true - DEPRECATED).\n * * Wrap the contents of the directive's element (if `transclude` is true).\n *\n * Value may be:\n *\n * * A string. For example `{{delete_str}}`.\n * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`\n * function api below) and returns a string value.\n *\n *\n * #### `templateUrl`\n * This is similar to `template` but the template is loaded from the specified URL, asynchronously.\n *\n * Because template loading is asynchronous the compiler will suspend compilation of directives on that element\n * for later when the template has been resolved. In the meantime it will continue to compile and link\n * sibling and parent elements as though this element had not contained any directives.\n *\n * The compiler does not suspend the entire compilation to wait for templates to be loaded because this\n * would result in the whole app \"stalling\" until all templates are loaded asynchronously - even in the\n * case when only one deeply nested directive has `templateUrl`.\n *\n * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}\n *\n * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n * a string value representing the url. In either case, the template URL is passed through {@link\n * api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n *\n *\n * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0)\n * specify what the template should replace. Defaults to `false`.\n *\n * * `true` - the template will replace the directive's element.\n * * `false` - the template will replace the contents of the directive's element.\n *\n * The replacement process migrates all of the attributes / classes from the old element to the new\n * one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive\n * Directives Guide} for an example.\n *\n * There are very few scenarios where element replacement is required for the application function,\n * the main one being reusable custom components that are used within SVG contexts\n * (because SVG doesn't work with custom elements in the DOM tree).\n *\n * #### `transclude`\n * compile the content of the element and make it available to the directive.\n * Typically used with {@link ng.directive:ngTransclude\n * ngTransclude}. The advantage of transclusion is that the linking function receives a\n * transclusion function which is pre-bound to the correct scope. In a typical setup the widget\n * creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`\n * scope. This makes it possible for the widget to have private state, and the transclusion to\n * be bound to the parent (pre-`isolate`) scope.\n *\n * * `true` - transclude the content of the directive.\n * * `'element'` - transclude the whole element including any directives defined at lower priority.\n *\n * \n * **Note:** When testing an element transclude directive you must not place the directive at the root of the\n * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives\n * Testing Transclusion Directives}.\n * \n *\n * #### `compile`\n *\n * ```js\n * function compile(tElement, tAttrs, transclude) { ... }\n * ```\n *\n * The compile function deals with transforming the template DOM. Since most directives do not do\n * template transformation, it is not used often. The compile function takes the following arguments:\n *\n * * `tElement` - template element - The element where the directive has been declared. It is\n * safe to do template transformation on the element and child elements only.\n *\n * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n * between all directive compile functions.\n *\n * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n *\n * \n * **Note:** The template instance and the link instance may be different objects if the template has\n * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n * should be done in a linking function rather than in a compile function.\n * \n\n * \n * **Note:** The compile function cannot handle directives that recursively use themselves in their\n * own templates or compile functions. Compiling these directives results in an infinite loop and a\n * stack overflow errors.\n *\n * This can be avoided by manually using $compile in the postLink function to imperatively compile\n * a directive's template instead of relying on automatic template compilation via `template` or\n * `templateUrl` declaration or manual compilation inside the compile function.\n * \n *\n * \n * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n * e.g. does not know about the right outer scope. Please use the transclude function that is passed\n * to the link function instead.\n * \n\n * A compile function can have a return value which can be either a function or an object.\n *\n * * returning a (post-link) function - is equivalent to registering the linking function via the\n * `link` property of the config object when the compile function is empty.\n *\n * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n * control when a linking function should be called during the linking phase. See info about\n * pre-linking and post-linking functions below.\n *\n *\n * #### `link`\n * This property is used only if the `compile` property is not defined.\n *\n * ```js\n * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n * ```\n *\n * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n * executed after the template has been cloned. This is where most of the directive logic will be\n * put.\n *\n * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the\n * directive for registering {@link ng.$rootScope.Scope#$watch watches}.\n *\n * * `iElement` - instance element - The element where the directive is to be used. It is safe to\n * manipulate the children of the element only in `postLink` function since the children have\n * already been linked.\n *\n * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n * between all directive linking functions.\n *\n * * `controller` - a controller instance - A controller instance if at least one directive on the\n * element defines a controller. The controller is shared among all the directives, which allows\n * the directives to use the controllers as a communication channel.\n *\n * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n * This is the same as the `$transclude`\n * parameter of directive controllers, see there for details.\n * `function([scope], cloneLinkingFn, futureParentElement)`.\n *\n * #### Pre-linking function\n *\n * Executed before the child elements are linked. Not safe to do DOM transformation since the\n * compiler linking function will fail to locate the correct elements for linking.\n *\n * #### Post-linking function\n *\n * Executed after the child elements are linked.\n *\n * Note that child elements that contain `templateUrl` directives will not have been compiled\n * and linked since they are waiting for their template to load asynchronously and their own\n * compilation and linking has been suspended until that occurs.\n *\n * It is safe to do DOM transformation in the post-linking function on elements that are not waiting\n * for their async templates to be resolved.\n *\n * \n * ### Attributes\n *\n * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n * `link()` or `compile()` functions. It has a variety of uses.\n *\n * accessing *Normalized attribute names:*\n * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.\n * the attributes object allows for normalized access to\n * the attributes.\n *\n * * *Directive inter-communication:* All directives share the same instance of the attributes\n * object which allows the directives to use the attributes object as inter directive\n * communication.\n *\n * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n * allowing other directives to read the interpolated value.\n *\n * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n * that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n * the only way to easily get the actual value because during the linking phase the interpolation\n * hasn't been evaluated yet and so the value is at this time set to `undefined`.\n *\n * ```js\n * function linkingFn(scope, elm, attrs, ctrl) {\n * // get the attribute value\n * console.log(attrs.ngModel);\n *\n * // change the attribute\n * attrs.$set('ngModel', 'new value');\n *\n * // observe changes to interpolated attribute\n * attrs.$observe('ngModel', function(value) {\n * console.log('ngModel has changed value to ' + value);\n * });\n * }\n * ```\n *\n * Below is an example using `$compileProvider`.\n *\n * \n * **Note**: Typically directives are registered with `module.directive`. The example below is\n * to illustrate how `$compile` works.\n * \n *\n \n \n \n \n \n \n \n \n \n \n it('should auto compile', function() {\n var textarea = $('textarea');\n var output = $('div[compile]');\n // The initial state reads 'Hello Angular'.\n expect(output.getText()).toBe('Hello Angular');\n textarea.clear();\n textarea.sendKeys('{{name}}!');\n expect(output.getText()).toBe('Angular!');\n });\n \n \n\n *\n *\n * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives.\n * @param {number} maxPriority only apply directives lower than given priority (Only effects the\n * root element(s), not their children)\n * @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template\n * (a DOM element/tree) to a scope. Where:\n *\n * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n * `template` and call the `cloneAttachFn` function allowing the caller to attach the\n * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n * called as: `cloneAttachFn(clonedElement, scope)` where:\n *\n * * `clonedElement` - is a clone of the original `element` passed into the compiler.\n * * `scope` - is the current scope with which the linking function is working with.\n *\n * Calling the linking function returns the element of the template. It is either the original\n * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n *\n * After linking the view is not updated until after a call to $digest which typically is done by\n * Angular automatically.\n *\n * If you need access to the bound view, there are two ways to do it:\n *\n * - If you are not asking the linking function to clone the template, create the DOM element(s)\n * before you send them to the compiler and keep this reference around.\n * ```js\n * var element = $compile('{{total}}')(scope);\n * ```\n *\n * - if on the other hand, you need the element to be cloned, the view reference from the original\n * example would not point to the clone, but rather to the original template that was cloned. In\n * this case, you can access the clone via the cloneAttachFn:\n * ```js\n * var templateElement = angular.element('{{total}}'),\n * scope = ....;\n *\n * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n * //attach the clone to DOM document at the right place\n * });\n *\n * //now we have reference to the cloned DOM via `clonedElement`\n * ```\n *\n *\n * For information on how the compiler works, see the\n * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.\n */\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc provider\n * @name $compileProvider\n *\n * @description\n */\n$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\nfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n var hasDirectives = {},\n Suffix = 'Directive',\n COMMENT_DIRECTIVE_REGEXP = /^\\s*directive\\:\\s*([\\d\\w_\\-]+)\\s+(.*)$/,\n CLASS_DIRECTIVE_REGEXP = /(([\\d\\w_\\-]+)(?:\\:([^;]+))?;?)/,\n ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset');\n\n // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n // The assumption is that future DOM event attribute names will begin with\n // 'on' and be composed of only English letters.\n var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n\n function parseIsolateBindings(scope, directiveName) {\n var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n\n var bindings = {};\n\n forEach(scope, function(definition, scopeName) {\n var match = definition.match(LOCAL_REGEXP);\n\n if (!match) {\n throw $compileMinErr('iscp',\n \"Invalid isolate scope definition for directive '{0}'.\" +\n \" Definition: {... {1}: '{2}' ...}\",\n directiveName, scopeName, definition);\n }\n\n bindings[scopeName] = {\n attrName: match[3] || scopeName,\n mode: match[1],\n optional: match[2] === '?'\n };\n });\n\n return bindings;\n }\n\n /**\n * @ngdoc method\n * @name $compileProvider#directive\n * @kind function\n *\n * @description\n * Register a new directive with the compiler.\n *\n * @param {string|Object} name Name of the directive in camel-case (i.e. ngBind which\n * will match as ng-bind), or an object map of directives where the keys are the\n * names and the values are the factories.\n * @param {Function|Array} directiveFactory An injectable directive factory function. See\n * {@link guide/directive} for more info.\n * @returns {ng.$compileProvider} Self for chaining.\n */\n this.directive = function registerDirective(name, directiveFactory) {\n assertNotHasOwnProperty(name, 'directive');\n if (isString(name)) {\n assertArg(directiveFactory, 'directiveFactory');\n if (!hasDirectives.hasOwnProperty(name)) {\n hasDirectives[name] = [];\n $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n function($injector, $exceptionHandler) {\n var directives = [];\n forEach(hasDirectives[name], function(directiveFactory, index) {\n try {\n var directive = $injector.invoke(directiveFactory);\n if (isFunction(directive)) {\n directive = { compile: valueFn(directive) };\n } else if (!directive.compile && directive.link) {\n directive.compile = valueFn(directive.link);\n }\n directive.priority = directive.priority || 0;\n directive.index = index;\n directive.name = directive.name || name;\n directive.require = directive.require || (directive.controller && directive.name);\n directive.restrict = directive.restrict || 'EA';\n if (isObject(directive.scope)) {\n directive.$$isolateBindings = parseIsolateBindings(directive.scope, directive.name);\n }\n directives.push(directive);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n return directives;\n }]);\n }\n hasDirectives[name].push(directiveFactory);\n } else {\n forEach(name, reverseParams(registerDirective));\n }\n return this;\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#aHrefSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during a[href] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.aHrefSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.aHrefSanitizationWhitelist();\n }\n };\n\n\n /**\n * @ngdoc method\n * @name $compileProvider#imgSrcSanitizationWhitelist\n * @kind function\n *\n * @description\n * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n * urls during img[src] sanitization.\n *\n * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n *\n * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n *\n * @param {RegExp=} regexp New regexp to whitelist urls with.\n * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n * chaining otherwise.\n */\n this.imgSrcSanitizationWhitelist = function(regexp) {\n if (isDefined(regexp)) {\n $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);\n return this;\n } else {\n return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();\n }\n };\n\n /**\n * @ngdoc method\n * @name $compileProvider#debugInfoEnabled\n *\n * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the\n * current debugInfoEnabled state\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n *\n * @kind function\n *\n * @description\n * Call this method to enable/disable various debug runtime information in the compiler such as adding\n * binding information and a reference to the current scope on to DOM elements.\n * If enabled, the compiler will add the following to DOM elements that have been bound to the scope\n * * `ng-binding` CSS class\n * * `$binding` data property containing an array of the binding expressions\n *\n * You may want to use this in production for a significant performance boost. See\n * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.\n *\n * The default value is true.\n */\n var debugInfoEnabled = true;\n this.debugInfoEnabled = function(enabled) {\n if(isDefined(enabled)) {\n debugInfoEnabled = enabled;\n return this;\n }\n return debugInfoEnabled;\n };\n\n this.$get = [\n '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',\n '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri',\n function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse,\n $controller, $rootScope, $document, $sce, $animate, $$sanitizeUri) {\n\n var Attributes = function(element, attributesToCopy) {\n if (attributesToCopy) {\n var keys = Object.keys(attributesToCopy);\n var i, l, key;\n\n for (i = 0, l = keys.length; i < l; i++) {\n key = keys[i];\n this[key] = attributesToCopy[key];\n }\n } else {\n this.$attr = {};\n }\n\n this.$$element = element;\n };\n\n Attributes.prototype = {\n $normalize: directiveNormalize,\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$addClass\n * @kind function\n *\n * @description\n * Adds the CSS class value specified by the classVal parameter to the element. If animations\n * are enabled then an animation will be triggered for the class addition.\n *\n * @param {string} classVal The className value that will be added to the element\n */\n $addClass : function(classVal) {\n if(classVal && classVal.length > 0) {\n $animate.addClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$removeClass\n * @kind function\n *\n * @description\n * Removes the CSS class value specified by the classVal parameter from the element. If\n * animations are enabled then an animation will be triggered for the class removal.\n *\n * @param {string} classVal The className value that will be removed from the element\n */\n $removeClass : function(classVal) {\n if(classVal && classVal.length > 0) {\n $animate.removeClass(this.$$element, classVal);\n }\n },\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$updateClass\n * @kind function\n *\n * @description\n * Adds and removes the appropriate CSS class values to the element based on the difference\n * between the new and old CSS class values (specified as newClasses and oldClasses).\n *\n * @param {string} newClasses The current CSS className value\n * @param {string} oldClasses The former CSS className value\n */\n $updateClass : function(newClasses, oldClasses) {\n var toAdd = tokenDifference(newClasses, oldClasses);\n if (toAdd && toAdd.length) {\n $animate.addClass(this.$$element, toAdd);\n }\n\n var toRemove = tokenDifference(oldClasses, newClasses);\n if (toRemove && toRemove.length) {\n $animate.removeClass(this.$$element, toRemove);\n }\n },\n\n /**\n * Set a normalized attribute on the element in a way such that all directives\n * can share the attribute. This function properly handles boolean attributes.\n * @param {string} key Normalized key. (ie ngAttribute)\n * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n * Defaults to true.\n * @param {string=} attrName Optional none normalized name. Defaults to key.\n */\n $set: function(key, value, writeAttr, attrName) {\n // TODO: decide whether or not to throw an error if \"class\"\n //is set through this function since it may cause $updateClass to\n //become unstable.\n\n var node = this.$$element[0],\n booleanKey = getBooleanAttrName(node, key),\n aliasedKey = getAliasedAttrName(node, key),\n observer = key,\n normalizedVal,\n nodeName;\n\n if (booleanKey) {\n this.$$element.prop(key, value);\n attrName = booleanKey;\n } else if(aliasedKey) {\n this[aliasedKey] = value;\n observer = aliasedKey;\n }\n\n this[key] = value;\n\n // translate normalized key to actual key\n if (attrName) {\n this.$attr[key] = attrName;\n } else {\n attrName = this.$attr[key];\n if (!attrName) {\n this.$attr[key] = attrName = snake_case(key, '-');\n }\n }\n\n nodeName = nodeName_(this.$$element);\n\n // sanitize a[href] and img[src] values\n if ((nodeName === 'a' && key === 'href') ||\n (nodeName === 'img' && key === 'src')) {\n this[key] = value = $$sanitizeUri(value, key === 'src');\n }\n\n if (writeAttr !== false) {\n if (value === null || value === undefined) {\n this.$$element.removeAttr(attrName);\n } else {\n this.$$element.attr(attrName, value);\n }\n }\n\n // fire observers\n var $$observers = this.$$observers;\n $$observers && forEach($$observers[observer], function(fn) {\n try {\n fn(value);\n } catch (e) {\n $exceptionHandler(e);\n }\n });\n },\n\n\n /**\n * @ngdoc method\n * @name $compile.directive.Attributes#$observe\n * @kind function\n *\n * @description\n * Observes an interpolated attribute.\n *\n * The observer function will be invoked once during the next `$digest` following\n * compilation. The observer is then invoked whenever the interpolated value\n * changes.\n *\n * @param {string} key Normalized key. (ie ngAttribute) .\n * @param {function(interpolatedValue)} fn Function that will be called whenever\n the interpolated value of the attribute changes.\n * See the {@link guide/directive#Attributes Directives} guide for more info.\n * @returns {function()} Returns a deregistration function for this observer.\n */\n $observe: function(key, fn) {\n var attrs = this,\n $$observers = (attrs.$$observers || (attrs.$$observers = {})),\n listeners = ($$observers[key] || ($$observers[key] = []));\n\n listeners.push(fn);\n $rootScope.$evalAsync(function() {\n if (!listeners.$$inter) {\n // no one registered attribute interpolation function, so lets call it manually\n fn(attrs[key]);\n }\n });\n\n return function() {\n arrayRemove(listeners, fn);\n };\n }\n };\n\n\n function safeAddClass($element, className) {\n try {\n $element.addClass(className);\n } catch(e) {\n // ignore, since it means that we are trying to set class on\n // SVG element, where class name is read-only.\n }\n }\n\n\n var startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n denormalizeTemplate = (startSymbol == '{{' || endSymbol == '}}')\n ? identity\n : function denormalizeTemplate(template) {\n return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n },\n NG_ATTR_BINDING = /^ngAttr[A-Z]/;\n\n compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {\n var bindings = $element.data('$binding') || [];\n\n if (isArray(binding)) {\n bindings = bindings.concat(binding);\n } else {\n bindings.push(binding);\n }\n\n $element.data('$binding', bindings);\n } : noop;\n\n compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {\n safeAddClass($element, 'ng-binding');\n } : noop;\n\n compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {\n var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';\n $element.data(dataName, scope);\n } : noop;\n\n compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {\n safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');\n } : noop;\n\n return compile;\n\n //================================\n\n function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n previousCompileContext) {\n if (!($compileNodes instanceof jqLite)) {\n // jquery always rewraps, whereas we need to preserve the original selector so that we can\n // modify it.\n $compileNodes = jqLite($compileNodes);\n }\n // We can not compile top level text elements since text nodes can be merged and we will\n // not be able to attach scope data to them, so we will wrap them in \n forEach($compileNodes, function(node, index){\n if (node.nodeType == 3 /* text node */ && node.nodeValue.match(/\\S+/) /* non-empty */ ) {\n $compileNodes[index] = jqLite(node).wrap('').parent()[0];\n }\n });\n var compositeLinkFn =\n compileNodes($compileNodes, transcludeFn, $compileNodes,\n maxPriority, ignoreDirective, previousCompileContext);\n compile.$$addScopeClass($compileNodes);\n var namespace = null;\n var namespaceAdaptedCompileNodes = $compileNodes;\n var lastCompileNode;\n return function publicLinkFn(scope, cloneConnectFn, transcludeControllers, parentBoundTranscludeFn, futureParentElement){\n assertArg(scope, 'scope');\n if (!namespace) {\n namespace = detectNamespaceForChildElements(futureParentElement);\n }\n if (namespace !== 'html' && $compileNodes[0] !== lastCompileNode) {\n namespaceAdaptedCompileNodes = jqLite(\n wrapTemplate(namespace, jqLite('').append($compileNodes).html())\n );\n }\n // When using a directive with replace:true and templateUrl the $compileNodes\n // might change, so we need to recreate the namespace adapted compileNodes.\n lastCompileNode = $compileNodes[0];\n\n // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n // and sometimes changes the structure of the DOM.\n var $linkNode = cloneConnectFn\n ? JQLitePrototype.clone.call(namespaceAdaptedCompileNodes) // IMPORTANT!!!\n : namespaceAdaptedCompileNodes;\n\n if (transcludeControllers) {\n for (var controllerName in transcludeControllers) {\n $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);\n }\n }\n\n compile.$$addScopeInfo($linkNode, scope);\n\n if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);\n return $linkNode;\n };\n }\n\n function detectNamespaceForChildElements(parentElement) {\n // TODO: Make this detect MathML as well...\n var node = parentElement && parentElement[0];\n if (!node) {\n return 'html';\n } else {\n return nodeName_(node) !== 'foreignobject' && node.toString().match(/SVG/) ? 'svg': 'html';\n }\n }\n\n /**\n * Compile function matches each node in nodeList against the directives. Once all directives\n * for a particular node are collected their compile functions are executed. The compile\n * functions return values - the linking functions - are combined into a composite linking\n * function, which is the a linking function for the node.\n *\n * @param {NodeList} nodeList an array of nodes or NodeList to compile\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new child of the transcluded parent scope.\n * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n * the rootElement must be set the jqLite collection of the compile root. This is\n * needed so that the jqLite collection items can be replaced with widgets.\n * @param {number=} maxPriority Max directive priority.\n * @returns {Function} A composite linking function of all of the matched directives or null.\n */\n function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n previousCompileContext) {\n var linkFns = [],\n attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;\n\n for (var i = 0; i < nodeList.length; i++) {\n attrs = new Attributes();\n\n // we must always refer to nodeList[i] since the nodes can be replaced underneath us.\n directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n ignoreDirective);\n\n nodeLinkFn = (directives.length)\n ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n null, [], [], previousCompileContext)\n : null;\n\n if (nodeLinkFn && nodeLinkFn.scope) {\n compile.$$addScopeClass(attrs.$$element);\n }\n\n childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n !(childNodes = nodeList[i].childNodes) ||\n !childNodes.length)\n ? null\n : compileNodes(childNodes,\n nodeLinkFn ? (\n (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)\n && nodeLinkFn.transclude) : transcludeFn);\n\n if (nodeLinkFn || childLinkFn) {\n linkFns.push(i, nodeLinkFn, childLinkFn);\n linkFnFound = true;\n nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;\n }\n\n //use the previous context only for the first element in the virtual group\n previousCompileContext = null;\n }\n\n // return a linking function if we have found anything, null otherwise\n return linkFnFound ? compositeLinkFn : null;\n\n function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {\n var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;\n var stableNodeList;\n\n\n if (nodeLinkFnFound) {\n // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our\n // offsets don't get screwed up\n var nodeListLength = nodeList.length;\n stableNodeList = new Array(nodeListLength);\n\n // create a sparse array by only copying the elements which have a linkFn\n for (i = 0; i < linkFns.length; i+=3) {\n idx = linkFns[i];\n stableNodeList[idx] = nodeList[idx];\n }\n } else {\n stableNodeList = nodeList;\n }\n\n for(i = 0, ii = linkFns.length; i < ii;) {\n node = stableNodeList[linkFns[i++]];\n nodeLinkFn = linkFns[i++];\n childLinkFn = linkFns[i++];\n\n if (nodeLinkFn) {\n if (nodeLinkFn.scope) {\n childScope = scope.$new();\n compile.$$addScopeInfo(jqLite(node), childScope);\n } else {\n childScope = scope;\n }\n\n if ( nodeLinkFn.transcludeOnThisElement ) {\n childBoundTranscludeFn = createBoundTranscludeFn(\n scope, nodeLinkFn.transclude, parentBoundTranscludeFn,\n nodeLinkFn.elementTranscludeOnThisElement);\n\n } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {\n childBoundTranscludeFn = parentBoundTranscludeFn;\n\n } else if (!parentBoundTranscludeFn && transcludeFn) {\n childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);\n\n } else {\n childBoundTranscludeFn = null;\n }\n\n nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);\n\n } else if (childLinkFn) {\n childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);\n }\n }\n }\n }\n\n function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn, elementTransclusion) {\n\n var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement) {\n var scopeCreated = false;\n\n if (!transcludedScope) {\n transcludedScope = scope.$new();\n transcludedScope.$$transcluded = true;\n scopeCreated = true;\n }\n\n var clone = transcludeFn(transcludedScope, cloneFn, controllers, previousBoundTranscludeFn, futureParentElement);\n if (scopeCreated && !elementTransclusion) {\n clone.on('$destroy', function() { transcludedScope.$destroy(); });\n }\n return clone;\n };\n\n return boundTranscludeFn;\n }\n\n /**\n * Looks for directives on the given node and adds them to the directive collection which is\n * sorted.\n *\n * @param node Node to search.\n * @param directives An array to which the directives are added to. This array is sorted before\n * the function returns.\n * @param attrs The shared attrs object which is used to populate the normalized attributes.\n * @param {number=} maxPriority Max directive priority.\n */\n function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n var nodeType = node.nodeType,\n attrsMap = attrs.$attr,\n match,\n className;\n\n switch(nodeType) {\n case 1: /* Element */\n // use the node name: \n addDirective(directives,\n directiveNormalize(nodeName_(node)), 'E', maxPriority, ignoreDirective);\n\n // iterate over the attributes\n for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,\n j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n var attrStartName = false;\n var attrEndName = false;\n\n attr = nAttrs[j];\n if (!msie || msie >= 8 || attr.specified) {\n name = attr.name;\n value = trim(attr.value);\n\n // support ngAttr attribute binding\n ngAttrName = directiveNormalize(name);\n if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {\n name = snake_case(ngAttrName.substr(6), '-');\n }\n\n var directiveNName = ngAttrName.replace(/(Start|End)$/, '');\n if (directiveIsMultiElement(directiveNName)) {\n if (ngAttrName === directiveNName + 'Start') {\n attrStartName = name;\n attrEndName = name.substr(0, name.length - 5) + 'end';\n name = name.substr(0, name.length - 6);\n }\n }\n\n nName = directiveNormalize(name.toLowerCase());\n attrsMap[nName] = name;\n if (isNgAttr || !attrs.hasOwnProperty(nName)) {\n attrs[nName] = value;\n if (getBooleanAttrName(node, nName)) {\n attrs[nName] = true; // presence means true\n }\n }\n addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);\n addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n attrEndName);\n }\n }\n\n // use class as directive\n className = node.className;\n if (isString(className) && className !== '') {\n while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {\n nName = directiveNormalize(match[2]);\n if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[3]);\n }\n className = className.substr(match.index + match[0].length);\n }\n }\n break;\n case 3: /* Text Node */\n addTextInterpolateDirective(directives, node.nodeValue);\n break;\n case 8: /* Comment */\n try {\n match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n if (match) {\n nName = directiveNormalize(match[1]);\n if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n attrs[nName] = trim(match[2]);\n }\n }\n } catch (e) {\n // turns out that under some circumstances IE9 throws errors when one attempts to read\n // comment's node value.\n // Just ignore it and continue. (Can't seem to reproduce in test case.)\n }\n break;\n }\n\n directives.sort(byPriority);\n return directives;\n }\n\n /**\n * Given a node with an directive-start it collects all of the siblings until it finds\n * directive-end.\n * @param node\n * @param attrStart\n * @param attrEnd\n * @returns {*}\n */\n function groupScan(node, attrStart, attrEnd) {\n var nodes = [];\n var depth = 0;\n if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n var startNode = node;\n do {\n if (!node) {\n throw $compileMinErr('uterdir',\n \"Unterminated attribute, found '{0}' but no matching '{1}' found.\",\n attrStart, attrEnd);\n }\n if (node.nodeType == 1 /** Element **/) {\n if (node.hasAttribute(attrStart)) depth++;\n if (node.hasAttribute(attrEnd)) depth--;\n }\n nodes.push(node);\n node = node.nextSibling;\n } while (depth > 0);\n } else {\n nodes.push(node);\n }\n\n return jqLite(nodes);\n }\n\n /**\n * Wrapper for linking function which converts normal linking function into a grouped\n * linking function.\n * @param linkFn\n * @param attrStart\n * @param attrEnd\n * @returns {Function}\n */\n function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n return function(scope, element, attrs, controllers, transcludeFn) {\n element = groupScan(element[0], attrStart, attrEnd);\n return linkFn(scope, element, attrs, controllers, transcludeFn);\n };\n }\n\n /**\n * Once the directives have been collected, their compile functions are executed. This method\n * is responsible for inlining directive templates as well as terminating the application\n * of the directives if the terminal directive has been reached.\n *\n * @param {Array} directives Array of collected directives to execute their compile function.\n * this needs to be pre-sorted by priority order.\n * @param {Node} compileNode The raw DOM node to apply the compile functions to\n * @param {Object} templateAttrs The shared attribute function\n * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n * scope argument is auto-generated to the new\n * child of the transcluded parent scope.\n * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n * argument has the root jqLite array so that we can replace nodes\n * on it.\n * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n * compiling the transclusion.\n * @param {Array.} preLinkFns\n * @param {Array.} postLinkFns\n * @param {Object} previousCompileContext Context used for previous compilation of the current\n * node\n * @returns {Function} linkFn\n */\n function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n previousCompileContext) {\n previousCompileContext = previousCompileContext || {};\n\n var terminalPriority = -Number.MAX_VALUE,\n newScopeDirective,\n controllerDirectives = previousCompileContext.controllerDirectives,\n controllers,\n newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n templateDirective = previousCompileContext.templateDirective,\n nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n hasTranscludeDirective = false,\n hasTemplate = false,\n hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,\n $compileNode = templateAttrs.$$element = jqLite(compileNode),\n directive,\n directiveName,\n $template,\n replaceDirective = originalReplaceDirective,\n childTranscludeFn = transcludeFn,\n linkFn,\n directiveValue;\n\n // executes all directives on the current element\n for(var i = 0, ii = directives.length; i < ii; i++) {\n directive = directives[i];\n var attrStart = directive.$$start;\n var attrEnd = directive.$$end;\n\n // collect multiblock sections\n if (attrStart) {\n $compileNode = groupScan(compileNode, attrStart, attrEnd);\n }\n $template = undefined;\n\n if (terminalPriority > directive.priority) {\n break; // prevent further processing of directives\n }\n\n if (directiveValue = directive.scope) {\n\n // skip the check for directives with async templates, we'll check the derived sync\n // directive when the template arrives\n if (!directive.templateUrl) {\n if (isObject(directiveValue)) {\n // This directive is trying to add an isolated scope.\n // Check that there is no scope of any kind already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,\n directive, $compileNode);\n newIsolateScopeDirective = directive;\n } else {\n // This directive is trying to add a child scope.\n // Check that there is no isolated scope already\n assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n $compileNode);\n }\n }\n\n newScopeDirective = newScopeDirective || directive;\n }\n\n directiveName = directive.name;\n\n if (!directive.templateUrl && directive.controller) {\n directiveValue = directive.controller;\n controllerDirectives = controllerDirectives || {};\n assertNoDuplicate(\"'\" + directiveName + \"' controller\",\n controllerDirectives[directiveName], directive, $compileNode);\n controllerDirectives[directiveName] = directive;\n }\n\n if (directiveValue = directive.transclude) {\n hasTranscludeDirective = true;\n\n // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n // This option should only be used by directives that know how to safely handle element transclusion,\n // where the transcluded nodes are added or replaced after linking.\n if (!directive.$$tlb) {\n assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n nonTlbTranscludeDirective = directive;\n }\n\n if (directiveValue == 'element') {\n hasElementTranscludeDirective = true;\n terminalPriority = directive.priority;\n $template = $compileNode;\n $compileNode = templateAttrs.$$element =\n jqLite(document.createComment(' ' + directiveName + ': ' +\n templateAttrs[directiveName] + ' '));\n compileNode = $compileNode[0];\n replaceWith(jqCollection, sliceArgs($template), compileNode);\n\n childTranscludeFn = compile($template, transcludeFn, terminalPriority,\n replaceDirective && replaceDirective.name, {\n // Don't pass in:\n // - controllerDirectives - otherwise we'll create duplicates controllers\n // - newIsolateScopeDirective or templateDirective - combining templates with\n // element transclusion doesn't make sense.\n //\n // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n // on the same element more than once.\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n } else {\n $template = jqLite(jqLiteClone(compileNode)).contents();\n $compileNode.empty(); // clear contents\n childTranscludeFn = compile($template, transcludeFn);\n }\n }\n\n if (directive.template) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n directiveValue = (isFunction(directive.template))\n ? directive.template($compileNode, templateAttrs)\n : directive.template;\n\n directiveValue = denormalizeTemplate(directiveValue);\n\n if (directive.replace) {\n replaceDirective = directive;\n if (jqLiteIsTextNode(directiveValue)) {\n $template = [];\n } else {\n $template = jqLite(wrapTemplate(directive.templateNamespace, trim(directiveValue)));\n }\n compileNode = $template[0];\n\n if ($template.length != 1 || compileNode.nodeType !== 1) {\n throw $compileMinErr('tplrt',\n \"Template for directive '{0}' must have exactly one root element. {1}\",\n directiveName, '');\n }\n\n replaceWith(jqCollection, $compileNode, compileNode);\n\n var newTemplateAttrs = {$attr: {}};\n\n // combine directives from the original node and from the template:\n // - take the array of directives for this element\n // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n // - collect directives from the template and sort them by priority\n // - combine directives as: processed + template + unprocessed\n var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\n if (newIsolateScopeDirective) {\n markDirectivesAsIsolate(templateDirectives);\n }\n directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\n ii = directives.length;\n } else {\n $compileNode.html(directiveValue);\n }\n }\n\n if (directive.templateUrl) {\n hasTemplate = true;\n assertNoDuplicate('template', templateDirective, directive, $compileNode);\n templateDirective = directive;\n\n if (directive.replace) {\n replaceDirective = directive;\n }\n\n nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {\n controllerDirectives: controllerDirectives,\n newIsolateScopeDirective: newIsolateScopeDirective,\n templateDirective: templateDirective,\n nonTlbTranscludeDirective: nonTlbTranscludeDirective\n });\n ii = directives.length;\n } else if (directive.compile) {\n try {\n linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n if (isFunction(linkFn)) {\n addLinkFns(null, linkFn, attrStart, attrEnd);\n } else if (linkFn) {\n addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);\n }\n } catch (e) {\n $exceptionHandler(e, startingTag($compileNode));\n }\n }\n\n if (directive.terminal) {\n nodeLinkFn.terminal = true;\n terminalPriority = Math.max(terminalPriority, directive.priority);\n }\n\n }\n\n nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;\n nodeLinkFn.elementTranscludeOnThisElement = hasElementTranscludeDirective;\n nodeLinkFn.templateOnThisElement = hasTemplate;\n nodeLinkFn.transclude = childTranscludeFn;\n\n previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;\n\n // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n return nodeLinkFn;\n\n ////////////////////\n\n function addLinkFns(pre, post, attrStart, attrEnd) {\n if (pre) {\n if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n pre.require = directive.require;\n pre.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n }\n preLinkFns.push(pre);\n }\n if (post) {\n if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n post.require = directive.require;\n post.directiveName = directiveName;\n if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n post = cloneAndAnnotateFn(post, {isolateScope: true});\n }\n postLinkFns.push(post);\n }\n }\n\n\n function getControllers(directiveName, require, $element, elementControllers) {\n var value, retrievalMethod = 'data', optional = false;\n if (isString(require)) {\n while((value = require.charAt(0)) == '^' || value == '?') {\n require = require.substr(1);\n if (value == '^') {\n retrievalMethod = 'inheritedData';\n }\n optional = optional || value == '?';\n }\n value = null;\n\n if (elementControllers && retrievalMethod === 'data') {\n if (value = elementControllers[require]) {\n value = value.instance;\n }\n }\n value = value || $element[retrievalMethod]('$' + require + 'Controller');\n\n if (!value && !optional) {\n throw $compileMinErr('ctreq',\n \"Controller '{0}', required by directive '{1}', can't be found!\",\n require, directiveName);\n }\n return value;\n } else if (isArray(require)) {\n value = [];\n forEach(require, function(require) {\n value.push(getControllers(directiveName, require, $element, elementControllers));\n });\n }\n return value;\n }\n\n\n function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n var i, ii, linkFn, controller, isolateScope, elementControllers, transcludeFn, $element,\n attrs;\n\n if (compileNode === linkNode) {\n attrs = templateAttrs;\n $element = templateAttrs.$$element;\n } else {\n $element = jqLite(linkNode);\n attrs = new Attributes($element, templateAttrs);\n }\n\n if (newIsolateScopeDirective) {\n isolateScope = scope.$new(true);\n }\n\n transcludeFn = boundTranscludeFn && controllersBoundTransclude;\n if (controllerDirectives) {\n // TODO: merge `controllers` and `elementControllers` into single object.\n controllers = {};\n elementControllers = {};\n forEach(controllerDirectives, function(directive) {\n var locals = {\n $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n $element: $element,\n $attrs: attrs,\n $transclude: transcludeFn\n }, controllerInstance;\n\n controller = directive.controller;\n if (controller == '@') {\n controller = attrs[directive.name];\n }\n\n controllerInstance = $controller(controller, locals, true, directive.controllerAs);\n\n // For directives with element transclusion the element is a comment,\n // but jQuery .data doesn't support attaching data to comment nodes as it's hard to\n // clean up (http://bugs.jquery.com/ticket/8335).\n // Instead, we save the controllers for the element in a local hash and attach to .data\n // later, once we have the actual element.\n elementControllers[directive.name] = controllerInstance;\n if (!hasElementTranscludeDirective) {\n $element.data('$' + directive.name + 'Controller', controllerInstance.instance);\n }\n\n controllers[directive.name] = controllerInstance;\n });\n }\n\n if (newIsolateScopeDirective) {\n var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n\n compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||\n templateDirective === newIsolateScopeDirective.$$originalDirective)));\n compile.$$addScopeClass($element, true);\n\n var isolateScopeController = controllers && controllers[newIsolateScopeDirective.name];\n var isolateBindingContext = isolateScope;\n if (isolateScopeController && isolateScopeController.identifier &&\n newIsolateScopeDirective.bindToController === true) {\n isolateBindingContext = isolateScopeController.instance;\n }\n\n forEach(isolateScope.$$isolateBindings = newIsolateScopeDirective.$$isolateBindings, function(definition, scopeName) {\n var attrName = definition.attrName,\n optional = definition.optional,\n mode = definition.mode, // @, =, or &\n lastValue,\n parentGet, parentSet, compare;\n\n switch (mode) {\n\n case '@':\n attrs.$observe(attrName, function(value) {\n isolateBindingContext[scopeName] = value;\n });\n attrs.$$observers[attrName].$$scope = scope;\n if( attrs[attrName] ) {\n // If the attribute has been provided then we trigger an interpolation to ensure\n // the value is there for use in the link fn\n isolateBindingContext[scopeName] = $interpolate(attrs[attrName])(scope);\n }\n break;\n\n case '=':\n if (optional && !attrs[attrName]) {\n return;\n }\n parentGet = $parse(attrs[attrName]);\n if (parentGet.literal) {\n compare = equals;\n } else {\n compare = function(a,b) { return a === b || (a !== a && b !== b); };\n }\n parentSet = parentGet.assign || function() {\n // reset the change, or we will throw this exception on every $digest\n lastValue = isolateBindingContext[scopeName] = parentGet(scope);\n throw $compileMinErr('nonassign',\n \"Expression '{0}' used with directive '{1}' is non-assignable!\",\n attrs[attrName], newIsolateScopeDirective.name);\n };\n lastValue = isolateBindingContext[scopeName] = parentGet(scope);\n var parentValueWatch = function parentValueWatch(parentValue) {\n if (!compare(parentValue, isolateBindingContext[scopeName])) {\n // we are out of sync and need to copy\n if (!compare(parentValue, lastValue)) {\n // parent changed and it has precedence\n isolateBindingContext[scopeName] = parentValue;\n } else {\n // if the parent can be assigned then do so\n parentSet(scope, parentValue = isolateBindingContext[scopeName]);\n }\n }\n return lastValue = parentValue;\n };\n parentValueWatch.$stateful = true;\n var unwatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);\n isolateScope.$on('$destroy', unwatch);\n break;\n\n case '&':\n parentGet = $parse(attrs[attrName]);\n isolateBindingContext[scopeName] = function(locals) {\n return parentGet(scope, locals);\n };\n break;\n }\n });\n }\n if (controllers) {\n forEach(controllers, function(controller) {\n controller();\n });\n controllers = null;\n }\n\n // PRELINKING\n for(i = 0, ii = preLinkFns.length; i < ii; i++) {\n linkFn = preLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // RECURSION\n // We only pass the isolate scope, if the isolate directive has a template,\n // otherwise the child elements do not belong to the isolate directive.\n var scopeToChild = scope;\n if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n scopeToChild = isolateScope;\n }\n childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n\n // POSTLINKING\n for(i = postLinkFns.length - 1; i >= 0; i--) {\n linkFn = postLinkFns[i];\n invokeLinkFn(linkFn,\n linkFn.isolateScope ? isolateScope : scope,\n $element,\n attrs,\n linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),\n transcludeFn\n );\n }\n\n // This is the function that is injected as `$transclude`.\n // Note: all arguments are optional!\n function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement) {\n var transcludeControllers;\n\n // No scope passed in:\n if (!isScope(scope)) {\n futureParentElement = cloneAttachFn;\n cloneAttachFn = scope;\n scope = undefined;\n }\n\n if (hasElementTranscludeDirective) {\n transcludeControllers = elementControllers;\n }\n if (!futureParentElement) {\n futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;\n }\n return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement);\n }\n }\n }\n\n function markDirectivesAsIsolate(directives) {\n // mark all directives as needing isolate scope.\n for (var j = 0, jj = directives.length; j < jj; j++) {\n directives[j] = inherit(directives[j], {$$isolateScope: true});\n }\n }\n\n /**\n * looks up the directive and decorates it with exception handling and proper parameters. We\n * call this the boundDirective.\n *\n * @param {string} name name of the directive to look up.\n * @param {string} location The directive must be found in specific format.\n * String containing any of theses characters:\n *\n * * `E`: element name\n * * `A': attribute\n * * `C`: class\n * * `M`: comment\n * @returns {boolean} true if directive was added.\n */\n function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n endAttrName) {\n if (name === ignoreDirective) return null;\n var match = null;\n if (hasDirectives.hasOwnProperty(name)) {\n for(var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i directive.priority) &&\n directive.restrict.indexOf(location) != -1) {\n if (startAttrName) {\n directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n }\n tDirectives.push(directive);\n match = directive;\n }\n } catch(e) { $exceptionHandler(e); }\n }\n }\n return match;\n }\n\n\n /**\n * looks up the directive and returns true if it is a multi-element directive,\n * and therefore requires DOM nodes between -start and -end markers to be grouped\n * together.\n *\n * @param {string} name name of the directive to look up.\n * @returns true if directive was registered as multi-element.\n */\n function directiveIsMultiElement(name) {\n if (hasDirectives.hasOwnProperty(name)) {\n for(var directive, directives = $injector.get(name + Suffix),\n i = 0, ii = directives.length; i'+template+''+type+'>';\n return wrapper.childNodes[0].childNodes;\n default:\n return template;\n }\n }\n\n\n function getTrustedContext(node, attrNormalizedName) {\n if (attrNormalizedName == \"srcdoc\") {\n return $sce.HTML;\n }\n var tag = nodeName_(node);\n // maction[xlink:href] can source SVG. It's not limited to .\n if (attrNormalizedName == \"xlinkHref\" ||\n (tag == \"form\" && attrNormalizedName == \"action\") ||\n (tag != \"img\" && (attrNormalizedName == \"src\" ||\n attrNormalizedName == \"ngSrc\"))) {\n return $sce.RESOURCE_URL;\n }\n }\n\n\n function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {\n var interpolateFn = $interpolate(value, true);\n\n // no interpolation found -> ignore\n if (!interpolateFn) return;\n\n\n if (name === \"multiple\" && nodeName_(node) === \"select\") {\n throw $compileMinErr(\"selmulti\",\n \"Binding to the 'multiple' attribute is not supported. Element: {0}\",\n startingTag(node));\n }\n\n directives.push({\n priority: 100,\n compile: function() {\n return {\n pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n var $$observers = (attr.$$observers || (attr.$$observers = {}));\n\n if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n throw $compileMinErr('nodomevents',\n \"Interpolations for HTML DOM event attributes are disallowed. Please use the \" +\n \"ng- versions (such as ng-click instead of onclick) instead.\");\n }\n\n // we need to interpolate again, in case the attribute value has been updated\n // (e.g. by another directive's compile function)\n interpolateFn = $interpolate(attr[name], true, getTrustedContext(node, name),\n ALL_OR_NOTHING_ATTRS[name] || allOrNothing);\n\n // if attribute was updated so that there is no interpolation going on we don't want to\n // register any observers\n if (!interpolateFn) return;\n\n // initialize attr object so that it's ready in case we need the value for isolate\n // scope initialization, otherwise the value would not be available from isolate\n // directive's linking fn during linking phase\n attr[name] = interpolateFn(scope);\n\n ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n (attr.$$observers && attr.$$observers[name].$$scope || scope).\n $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n //special case for class attribute addition + removal\n //so that class changes can tap into the animation\n //hooks provided by the $animate service. Be sure to\n //skip animations when the first digest occurs (when\n //both the new and the old values are the same) since\n //the CSS classes are the non-interpolated values\n if(name === 'class' && newValue != oldValue) {\n attr.$updateClass(newValue, oldValue);\n } else {\n attr.$set(name, newValue);\n }\n });\n }\n };\n }\n });\n }\n\n\n /**\n * This is a special jqLite.replaceWith, which can replace items which\n * have no parents, provided that the containing jqLite collection is provided.\n *\n * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n * in the root of the tree.\n * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n * the shell, but replace its DOM node reference.\n * @param {Node} newNode The new DOM node.\n */\n function replaceWith($rootElement, elementsToRemove, newNode) {\n var firstElementToRemove = elementsToRemove[0],\n removeCount = elementsToRemove.length,\n parent = firstElementToRemove.parentNode,\n i, ii;\n\n if ($rootElement) {\n for(i = 0, ii = $rootElement.length; i < ii; i++) {\n if ($rootElement[i] == firstElementToRemove) {\n $rootElement[i++] = newNode;\n for (var j = i, j2 = j + removeCount - 1,\n jj = $rootElement.length;\n j < jj; j++, j2++) {\n if (j2 < jj) {\n $rootElement[j] = $rootElement[j2];\n } else {\n delete $rootElement[j];\n }\n }\n $rootElement.length -= removeCount - 1;\n\n // If the replaced element is also the jQuery .context then replace it\n // .context is a deprecated jQuery api, so we should set it only when jQuery set it\n // http://api.jquery.com/context/\n if ($rootElement.context === firstElementToRemove) {\n $rootElement.context = newNode;\n }\n break;\n }\n }\n }\n\n if (parent) {\n parent.replaceChild(newNode, firstElementToRemove);\n }\n\n // TODO(perf): what's this document fragment for? is it needed? can we at least reuse it?\n var fragment = document.createDocumentFragment();\n fragment.appendChild(firstElementToRemove);\n\n // Copy over user data (that includes Angular's $scope etc.). Don't copy private\n // data here because there's no public interface in jQuery to do that and copying over\n // event listeners (which is the main use of private data) wouldn't work anyway.\n jqLite(newNode).data(jqLite(firstElementToRemove).data());\n\n // Remove data of the replaced element. We cannot just call .remove()\n // on the element it since that would deallocate scope that is needed\n // for the new node. Instead, remove the data \"manually\".\n if (!jQuery) {\n delete jqLite.cache[firstElementToRemove[jqLite.expando]];\n } else {\n // jQuery 2.x doesn't expose the data storage. Use jQuery.cleanData to clean up after\n // the replaced element. The cleanData version monkey-patched by Angular would cause\n // the scope to be trashed and we do need the very same scope to work with the new\n // element. However, we cannot just cache the non-patched version and use it here as\n // that would break if another library patches the method after Angular does (one\n // example is jQuery UI). Instead, set a flag indicating scope destroying should be\n // skipped this one time.\n skipDestroyOnNextJQueryCleanData = true;\n jQuery.cleanData([firstElementToRemove]);\n }\n\n for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {\n var element = elementsToRemove[k];\n jqLite(element).remove(); // must do this way to clean up expando\n fragment.appendChild(element);\n delete elementsToRemove[k];\n }\n\n elementsToRemove[0] = newNode;\n elementsToRemove.length = 1;\n }\n\n\n function cloneAndAnnotateFn(fn, annotation) {\n return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n }\n\n\n function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {\n try {\n linkFn(scope, $element, attrs, controllers, transcludeFn);\n } catch(e) {\n $exceptionHandler(e, startingTag($element));\n }\n }\n }];\n}\n\nvar PREFIX_REGEXP = /^(x[\\:\\-_]|data[\\:\\-_])/i;\n/**\n * Converts all accepted directives format into proper directive name.\n * All of these will become 'myDirective':\n * my:Directive\n * my-directive\n * x-my-directive\n * data-my:directive\n *\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction directiveNormalize(name) {\n return camelCase(name.replace(PREFIX_REGEXP, ''));\n}\n\n/**\n * @ngdoc type\n * @name $compile.directive.Attributes\n *\n * @description\n * A shared object between directive compile / linking functions which contains normalized DOM\n * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n * needed since all of these are treated as equivalent in Angular:\n *\n * ```\n * \n * ```\n */\n\n/**\n * @ngdoc property\n * @name $compile.directive.Attributes#$attr\n *\n * @description\n * A map of DOM element attribute names to the normalized name. This is\n * needed to do reverse lookup from normalized name back to actual name.\n */\n\n\n/**\n * @ngdoc method\n * @name $compile.directive.Attributes#$set\n * @kind function\n *\n * @description\n * Set DOM element attribute value.\n *\n *\n * @param {string} name Normalized element attribute name of the property to modify. The name is\n * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n * property to the original name.\n * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n */\n\n\n\n/**\n * Closure compiler type information\n */\n\nfunction nodesetLinkingFn(\n /* angular.Scope */ scope,\n /* NodeList */ nodeList,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n){}\n\nfunction directiveLinkingFn(\n /* nodesetLinkingFn */ nodesetLinkingFn,\n /* angular.Scope */ scope,\n /* Node */ node,\n /* Element */ rootElement,\n /* function(Function) */ boundTranscludeFn\n){}\n\nfunction tokenDifference(str1, str2) {\n var values = '',\n tokens1 = str1.split(/\\s+/),\n tokens2 = str2.split(/\\s+/);\n\n outer:\n for(var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for(var j = 0; j < tokens2.length; j++) {\n if(token == tokens2[j]) continue outer;\n }\n values += (values.length > 0 ? ' ' : '') + token;\n }\n return values;\n}\n\n/**\n * @ngdoc provider\n * @name $controllerProvider\n * @description\n * The {@link ng.$controller $controller service} is used by Angular to create new\n * controllers.\n *\n * This provider allows controller registration via the\n * {@link ng.$controllerProvider#register register} method.\n */\nfunction $ControllerProvider() {\n var controllers = {},\n globals = false,\n CNTRL_REG = /^(\\S+)(\\s+as\\s+(\\w+))?$/;\n\n\n /**\n * @ngdoc method\n * @name $controllerProvider#register\n * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n * the names and the values are the constructors.\n * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n * annotations in the array notation).\n */\n this.register = function(name, constructor) {\n assertNotHasOwnProperty(name, 'controller');\n if (isObject(name)) {\n extend(controllers, name);\n } else {\n controllers[name] = constructor;\n }\n };\n\n /**\n * @ngdoc method\n * @name $controllerProvider#allowGlobals\n * @description If called, allows `$controller` to find controller constructors on `window`\n */\n this.allowGlobals = function() {\n globals = true;\n };\n\n\n this.$get = ['$injector', '$window', function($injector, $window) {\n\n /**\n * @ngdoc service\n * @name $controller\n * @requires $injector\n *\n * @param {Function|string} constructor If called with a function then it's considered to be the\n * controller constructor function. Otherwise it's considered to be a string which is used\n * to retrieve the controller constructor using the following steps:\n *\n * * check if a controller with given name is registered via `$controllerProvider`\n * * check if evaluating the string on the current scope returns a constructor\n * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global\n * `window` object (not recommended)\n *\n * @param {Object} locals Injection locals for Controller.\n * @return {Object} Instance of given controller.\n *\n * @description\n * `$controller` service is responsible for instantiating controllers.\n *\n * It's just a simple call to {@link auto.$injector $injector}, but extracted into\n * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).\n */\n return function(expression, locals, later, ident) {\n // PRIVATE API:\n // param `later` --- indicates that the controller's constructor is invoked at a later time.\n // If true, $controller will allocate the object with the correct\n // prototype chain, but will not invoke the controller until a returned\n // callback is invoked.\n // param `ident` --- An optional label which overrides the label parsed from the controller\n // expression, if any.\n var instance, match, constructor, identifier;\n later = later === true;\n if (ident && isString(ident)) {\n identifier = ident;\n }\n\n if(isString(expression)) {\n match = expression.match(CNTRL_REG),\n constructor = match[1],\n identifier = identifier || match[3];\n expression = controllers.hasOwnProperty(constructor)\n ? controllers[constructor]\n : getter(locals.$scope, constructor, true) ||\n (globals ? getter($window, constructor, true) : undefined);\n\n assertArgFn(expression, constructor, true);\n }\n\n if (later) {\n // Instantiate controller later:\n // This machinery is used to create an instance of the object before calling the\n // controller's constructor itself.\n //\n // This allows properties to be added to the controller before the constructor is\n // invoked. Primarily, this is used for isolate scope bindings in $compile.\n //\n // This feature is not intended for use by applications, and is thus not documented\n // publicly.\n var Constructor = function() {};\n Constructor.prototype = (isArray(expression) ?\n expression[expression.length - 1] : expression).prototype;\n instance = new Constructor();\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return extend(function() {\n $injector.invoke(expression, instance, locals, constructor);\n return instance;\n }, {\n instance: instance,\n identifier: identifier\n });\n }\n\n instance = $injector.instantiate(expression, locals, constructor);\n\n if (identifier) {\n addIdentifier(locals, identifier, instance, constructor || expression.name);\n }\n\n return instance;\n };\n\n function addIdentifier(locals, identifier, instance, name) {\n if (!(locals && isObject(locals.$scope))) {\n throw minErr('$controller')('noscp',\n \"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.\",\n name, identifier);\n }\n\n locals.$scope[identifier] = instance;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $document\n * @requires $window\n *\n * @description\n * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n *\n * @example\n \n \n \n $document title: \n window.document title: \n \n \n \n angular.module('documentExample', [])\n .controller('ExampleController', ['$scope', '$document', function($scope, $document) {\n $scope.title = $document[0].title;\n $scope.windowTitle = angular.element(window.document)[0].title;\n }]);\n \n \n */\nfunction $DocumentProvider(){\n this.$get = ['$window', function(window){\n return jqLite(window.document);\n }];\n}\n\n/**\n * @ngdoc service\n * @name $exceptionHandler\n * @requires ng.$log\n *\n * @description\n * Any uncaught exception in angular expressions is delegated to this service.\n * The default implementation simply delegates to `$log.error` which logs it into\n * the browser console.\n *\n * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n *\n * ## Example:\n *\n * ```js\n * angular.module('exceptionOverride', []).factory('$exceptionHandler', function () {\n * return function (exception, cause) {\n * exception.message += ' (caused by \"' + cause + '\")';\n * throw exception;\n * };\n * });\n * ```\n *\n * This example will override the normal action of `$exceptionHandler`, to make angular\n * exceptions fail hard when they happen, instead of just logging to the console.\n *\n * @param {Error} exception Exception associated with the error.\n * @param {string=} cause optional information about the context in which\n * the error was thrown.\n *\n */\nfunction $ExceptionHandlerProvider() {\n this.$get = ['$log', function($log) {\n return function(exception, cause) {\n $log.error.apply($log, arguments);\n };\n }];\n}\n\n/**\n * Parse headers into key value object\n *\n * @param {string} headers Raw headers as a string\n * @returns {Object} Parsed headers as key value object\n */\nfunction parseHeaders(headers) {\n var parsed = {}, key, val, i;\n\n if (!headers) return parsed;\n\n forEach(headers.split('\\n'), function(line) {\n i = line.indexOf(':');\n key = lowercase(trim(line.substr(0, i)));\n val = trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n}\n\n\n/**\n * Returns a function that provides access to parsed headers.\n *\n * Headers are lazy parsed when first requested.\n * @see parseHeaders\n *\n * @param {(string|Object)} headers Headers to provide access to.\n * @returns {function(string=)} Returns a getter function which if called with:\n *\n * - if called with single an argument returns a single header value or null\n * - if called with no arguments returns an object containing all headers.\n */\nfunction headersGetter(headers) {\n var headersObj = isObject(headers) ? headers : undefined;\n\n return function(name) {\n if (!headersObj) headersObj = parseHeaders(headers);\n\n if (name) {\n return headersObj[lowercase(name)] || null;\n }\n\n return headersObj;\n };\n}\n\n\n/**\n * Chain all given functions\n *\n * This function is used for both request and response transforming\n *\n * @param {*} data Data to transform.\n * @param {function(string=)} headers Http headers getter fn.\n * @param {(Function|Array.)} fns Function or an array of functions.\n * @returns {*} Transformed data.\n */\nfunction transformData(data, headers, fns) {\n if (isFunction(fns))\n return fns(data, headers);\n\n forEach(fns, function(fn) {\n data = fn(data, headers);\n });\n\n return data;\n}\n\n\nfunction isSuccess(status) {\n return 200 <= status && status < 300;\n}\n\n\n/**\n * @ngdoc provider\n * @name $httpProvider\n * @description\n * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.\n * */\nfunction $HttpProvider() {\n var JSON_START = /^\\s*(\\[|\\{[^\\{])/,\n JSON_END = /[\\}\\]]\\s*$/,\n PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/,\n CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': 'application/json;charset=utf-8'};\n\n /**\n * @ngdoc property\n * @name $httpProvider#defaults\n * @description\n *\n * Object containing default values for all {@link ng.$http $http} requests.\n *\n * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.\n * Defaults value is `'XSRF-TOKEN'`.\n *\n * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the\n * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.\n *\n * - **`defaults.headers`** - {Object} - Default headers for all $http requests.\n * Refer to {@link ng.$http#setting-http-headers $http} for documentation on\n * setting default headers.\n * - **`defaults.headers.common`**\n * - **`defaults.headers.post`**\n * - **`defaults.headers.put`**\n * - **`defaults.headers.patch`**\n **/\n var defaults = this.defaults = {\n // transform incoming response data\n transformResponse: [function(data) {\n if (isString(data)) {\n // strip json vulnerability protection prefix\n data = data.replace(PROTECTION_PREFIX, '');\n if (JSON_START.test(data) && JSON_END.test(data))\n data = fromJson(data);\n }\n return data;\n }],\n\n // transform outgoing request data\n transformRequest: [function(d) {\n return isObject(d) && !isFile(d) && !isBlob(d) ? toJson(d) : d;\n }],\n\n // default headers\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n },\n post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)\n },\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN'\n };\n\n var useApplyAsync = false;\n /**\n * @ngdoc method\n * @name $httpProvider#useApplyAsync\n * @description\n *\n * Configure $http service to combine processing of multiple http responses received at around\n * the same time via {@link ng.$rootScope#applyAsync $rootScope.$applyAsync}. This can result in\n * significant performance improvement for bigger applications that make many HTTP requests\n * concurrently (common during application bootstrap).\n *\n * Defaults to false. If no value is specifed, returns the current configured value.\n *\n * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred\n * \"apply\" on the next tick, giving time for subsequent requests in a roughly ~10ms window\n * to load and share the same digest cycle.\n *\n * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.\n * otherwise, returns the current configured value.\n **/\n this.useApplyAsync = function(value) {\n if (isDefined(value)) {\n useApplyAsync = !!value;\n return this;\n }\n return useApplyAsync;\n };\n\n /**\n * Are ordered by request, i.e. they are applied in the same order as the\n * array, on request, but reverse order, on response.\n */\n var interceptorFactories = this.interceptors = [];\n\n this.$get = ['$httpBackend', '$browser', '$cacheFactory', '$rootScope', '$q', '$injector',\n function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) {\n\n var defaultCache = $cacheFactory('$http');\n\n /**\n * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n * The reversal is needed so that we can build up the interception chain around the\n * server request.\n */\n var reversedInterceptors = [];\n\n forEach(interceptorFactories, function(interceptorFactory) {\n reversedInterceptors.unshift(isString(interceptorFactory)\n ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n });\n\n /**\n * @ngdoc service\n * @kind function\n * @name $http\n * @requires ng.$httpBackend\n * @requires $cacheFactory\n * @requires $rootScope\n * @requires $q\n * @requires $injector\n *\n * @description\n * The `$http` service is a core Angular service that facilitates communication with the remote\n * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)\n * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).\n *\n * For unit testing applications that use `$http` service, see\n * {@link ngMock.$httpBackend $httpBackend mock}.\n *\n * For a higher level of abstraction, please check out the {@link ngResource.$resource\n * $resource} service.\n *\n * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n * it is important to familiarize yourself with these APIs and the guarantees they provide.\n *\n *\n * ## General usage\n * The `$http` service is a function which takes a single argument — a configuration object —\n * that is used to generate an HTTP request and returns a {@link ng.$q promise}\n * with two $http specific methods: `success` and `error`.\n *\n * ```js\n * $http({method: 'GET', url: '/someUrl'}).\n * success(function(data, status, headers, config) {\n * // this callback will be called asynchronously\n * // when the response is available\n * }).\n * error(function(data, status, headers, config) {\n * // called asynchronously if an error occurs\n * // or server returns response with an error status.\n * });\n * ```\n *\n * Since the returned value of calling the $http function is a `promise`, you can also use\n * the `then` method to register callbacks, and these callbacks will receive a single argument –\n * an object representing the response. See the API signature and type info below for more\n * details.\n *\n * A response status code between 200 and 299 is considered a success status and\n * will result in the success callback being called. Note that if the response is a redirect,\n * XMLHttpRequest will transparently follow it, meaning that the error callback will not be\n * called for such responses.\n *\n * ## Writing Unit Tests that use $http\n * When unit testing (using {@link ngMock ngMock}), it is necessary to call\n * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending\n * request using trained responses.\n *\n * ```\n * $httpBackend.expectGET(...);\n * $http.get(...);\n * $httpBackend.flush();\n * ```\n *\n * ## Shortcut methods\n *\n * Shortcut methods are also available. All shortcut methods require passing in the URL, and\n * request data must be passed in for POST/PUT requests.\n *\n * ```js\n * $http.get('/someUrl').success(successCallback);\n * $http.post('/someUrl', data).success(successCallback);\n * ```\n *\n * Complete list of shortcut methods:\n *\n * - {@link ng.$http#get $http.get}\n * - {@link ng.$http#head $http.head}\n * - {@link ng.$http#post $http.post}\n * - {@link ng.$http#put $http.put}\n * - {@link ng.$http#delete $http.delete}\n * - {@link ng.$http#jsonp $http.jsonp}\n * - {@link ng.$http#patch $http.patch}\n *\n *\n * ## Setting HTTP Headers\n *\n * The $http service will automatically add certain HTTP headers to all requests. These defaults\n * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n * object, which currently contains this default configuration:\n *\n * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n * - `Accept: application/json, text/plain, * / *`\n * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n * - `Content-Type: application/json`\n * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n * - `Content-Type: application/json`\n *\n * To add or overwrite these defaults, simply add or remove a property from these configuration\n * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n * with the lowercased HTTP method name as the key, e.g.\n * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.\n *\n * The defaults can also be set at runtime via the `$http.defaults` object in the same\n * fashion. For example:\n *\n * ```\n * module.run(function($http) {\n * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'\n * });\n * ```\n *\n * In addition, you can supply a `headers` property in the config object passed when\n * calling `$http(config)`, which overrides the defaults without changing them globally.\n *\n *\n * ## Transforming Requests and Responses\n *\n * Both requests and responses can be transformed using transformation functions: `transformRequest`\n * and `transformResponse`. These properties can be a single function that returns\n * the transformed value (`{function(data, headersGetter)`) or an array of such transformation functions,\n * which allows you to `push` or `unshift` a new transformation function into the transformation chain.\n *\n * ### Default Transformations\n *\n * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and\n * `defaults.transformResponse` properties. If a request does not provide its own transformations\n * then these will be applied.\n *\n * You can augment or replace the default transformations by modifying these properties by adding to or\n * replacing the array.\n *\n * Angular provides the following default transformations:\n *\n * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`):\n *\n * - If the `data` property of the request configuration object contains an object, serialize it\n * into JSON format.\n *\n * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`):\n *\n * - If XSRF prefix is detected, strip it (see Security Considerations section below).\n * - If JSON response is detected, deserialize it using a JSON parser.\n *\n *\n * ### Overriding the Default Transformations Per Request\n *\n * If you wish override the request/response transformations only for a single request then provide\n * `transformRequest` and/or `transformResponse` properties on the configuration object passed\n * into `$http`.\n *\n * Note that if you provide these properties on the config object the default transformations will be\n * overwritten. If you wish to augment the default transformations then you must include them in your\n * local transformation array.\n *\n * The following code demonstrates adding a new response transformation to be run after the default response\n * transformations have been run.\n *\n * ```js\n * function appendTransform(defaults, transform) {\n *\n * // We can't guarantee that the default transformation is an array\n * defaults = angular.isArray(defaults) ? defaults : [defaults];\n *\n * // Append the new transformation to the defaults\n * return defaults.concat(transform);\n * }\n *\n * $http({\n * url: '...',\n * method: 'GET',\n * transformResponse: appendTransform($http.defaults.transformResponse, function(value) {\n * return doTransform(value);\n * })\n * });\n * ```\n *\n *\n * ## Caching\n *\n * To enable caching, set the request configuration `cache` property to `true` (to use default\n * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}).\n * When the cache is enabled, `$http` stores the response from the server in the specified\n * cache. The next time the same request is made, the response is served from the cache without\n * sending a request to the server.\n *\n * Note that even if the response is served from cache, delivery of the data is asynchronous in\n * the same way that real requests are.\n *\n * If there are multiple GET requests for the same URL that should be cached using the same\n * cache, but the cache is not populated yet, only one request to the server will be made and\n * the remaining requests will be fulfilled using the response from the first request.\n *\n * You can change the default cache to a new object (built with\n * {@link ng.$cacheFactory `$cacheFactory`}) by updating the\n * {@link ng.$http#properties_defaults `$http.defaults.cache`} property. All requests who set\n * their `cache` property to `true` will now use this cache object.\n *\n * If you set the default cache to `false` then only requests that specify their own custom\n * cache object will be cached.\n *\n * ## Interceptors\n *\n * Before you start creating interceptors, be sure to understand the\n * {@link ng.$q $q and deferred/promise APIs}.\n *\n * For purposes of global error handling, authentication, or any kind of synchronous or\n * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n * able to intercept requests before they are handed to the server and\n * responses before they are handed over to the application code that\n * initiated these requests. The interceptors leverage the {@link ng.$q\n * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n *\n * The interceptors are service factories that are registered with the `$httpProvider` by\n * adding them to the `$httpProvider.interceptors` array. The factory is called and\n * injected with dependencies (if specified) and returns the interceptor.\n *\n * There are two kinds of interceptors (and two kinds of rejection interceptors):\n *\n * * `request`: interceptors get called with a http `config` object. The function is free to\n * modify the `config` object or create a new one. The function needs to return the `config`\n * object directly, or a promise containing the `config` or a new `config` object.\n * * `requestError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n * * `response`: interceptors get called with http `response` object. The function is free to\n * modify the `response` object or create a new one. The function needs to return the `response`\n * object directly, or as a promise containing the `response` or a new `response` object.\n * * `responseError`: interceptor gets called when a previous interceptor threw an error or\n * resolved with a rejection.\n *\n *\n * ```js\n * // register the interceptor as a service\n * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n * return {\n * // optional method\n * 'request': function(config) {\n * // do something on success\n * return config;\n * },\n *\n * // optional method\n * 'requestError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * },\n *\n *\n *\n * // optional method\n * 'response': function(response) {\n * // do something on success\n * return response;\n * },\n *\n * // optional method\n * 'responseError': function(rejection) {\n * // do something on error\n * if (canRecover(rejection)) {\n * return responseOrNewPromise\n * }\n * return $q.reject(rejection);\n * }\n * };\n * });\n *\n * $httpProvider.interceptors.push('myHttpInterceptor');\n *\n *\n * // alternatively, register the interceptor via an anonymous factory\n * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n * return {\n * 'request': function(config) {\n * // same as above\n * },\n *\n * 'response': function(response) {\n * // same as above\n * }\n * };\n * });\n * ```\n *\n * ## Security Considerations\n *\n * When designing web applications, consider security threats from:\n *\n * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)\n *\n * Both server and the client must cooperate in order to eliminate these threats. Angular comes\n * pre-configured with strategies that address these issues, but for this to work backend server\n * cooperation is required.\n *\n * ### JSON Vulnerability Protection\n *\n * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n * allows third party website to turn your JSON resource URL into\n * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To\n * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n * Angular will automatically strip the prefix before processing it as JSON.\n *\n * For example if your server needs to return:\n * ```js\n * ['one','two']\n * ```\n *\n * which is vulnerable to attack, your server can return:\n * ```js\n * )]}',\n * ['one','two']\n * ```\n *\n * Angular will strip the prefix, before processing the JSON.\n *\n *\n * ### Cross Site Request Forgery (XSRF) Protection\n *\n * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is a technique by which\n * an unauthorized site can gain your user's private data. Angular provides a mechanism\n * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie\n * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only\n * JavaScript that runs on your domain could read the cookie, your server can be assured that\n * the XHR came from JavaScript running on your domain. The header will not be set for\n * cross-domain requests.\n *\n * To take advantage of this, your server needs to set a token in a JavaScript readable session\n * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure\n * that only JavaScript running on your domain could have sent the request. The token must be\n * unique for each user and must be verifiable by the server (to prevent the JavaScript from\n * making up its own tokens). We recommend that the token is a digest of your site's\n * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography))\n * for added security.\n *\n * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName\n * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,\n * or the per-request config object.\n *\n *\n * @param {object} config Object describing the request to be made and how it should be\n * processed. The object has following properties:\n *\n * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)\n * - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.\n * - **params** – `{Object.}` – Map of strings or objects which will be turned\n * to `?key1=value1&key2=value2` after the url. If the value is not a string, it will be\n * JSONified.\n * - **data** – `{string|Object}` – Data to be sent as the request message data.\n * - **headers** – `{Object}` – Map of strings or functions which return strings representing\n * HTTP headers to send to the server. If the return value of a function is null, the\n * header will not be sent.\n * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.\n * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.\n * - **transformRequest** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * request body and headers and returns its transformed (typically serialized) version.\n * See {@link #overriding-the-default-transformations-per-request Overriding the Default Transformations}\n * - **transformResponse** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * response body and headers and returns its transformed (typically deserialized) version.\n * See {@link #overriding-the-default-transformations-per-request Overriding the Default Transformations}\n * - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the\n * GET request, otherwise if a cache instance built with\n * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for\n * caching.\n * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}\n * that should abort the request when resolved.\n * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the\n * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)\n * for more information.\n * - **responseType** - `{string}` - see\n * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).\n *\n * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the\n * standard `then` method and two http specific methods: `success` and `error`. The `then`\n * method takes two arguments a success and an error callback which will be called with a\n * response object. The `success` and `error` methods take a single argument - a function that\n * will be called when the request succeeds or fails respectively. The arguments passed into\n * these functions are destructured representation of the response object passed into the\n * `then` method. The response object has these properties:\n *\n * - **data** – `{string|Object}` – The response body transformed with the transform\n * functions.\n * - **status** – `{number}` – HTTP status code of the response.\n * - **headers** – `{function([headerName])}` – Header getter function.\n * - **config** – `{Object}` – The configuration object that was used to generate the request.\n * - **statusText** – `{string}` – HTTP status text of the response.\n *\n * @property {Array.} pendingRequests Array of config objects for currently pending\n * requests. This is primarily meant to be used for debugging purposes.\n *\n *\n * @example\n\n\n \n \n GET\n JSONP\n \n \n fetch\n Sample GET\n \n Sample JSONP\n \n \n Invalid JSONP\n \n http status code: {{status}}\n http response data: {{data}}\n \n\n\n angular.module('httpExample', [])\n .controller('FetchController', ['$scope', '$http', '$templateCache',\n function($scope, $http, $templateCache) {\n $scope.method = 'GET';\n $scope.url = 'http-hello.html';\n\n $scope.fetch = function() {\n $scope.code = null;\n $scope.response = null;\n\n $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n success(function(data, status) {\n $scope.status = status;\n $scope.data = data;\n }).\n error(function(data, status) {\n $scope.data = data || \"Request failed\";\n $scope.status = status;\n });\n };\n\n $scope.updateModel = function(method, url) {\n $scope.method = method;\n $scope.url = url;\n };\n }]);\n\n\n Hello, $http!\n\n\n var status = element(by.binding('status'));\n var data = element(by.binding('data'));\n var fetchBtn = element(by.id('fetchbtn'));\n var sampleGetBtn = element(by.id('samplegetbtn'));\n var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\n it('should make an xhr GET request', function() {\n sampleGetBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('200');\n expect(data.getText()).toMatch(/Hello, \\$http!/);\n });\n\n// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185\n// it('should make a JSONP request to angularjs.org', function() {\n// sampleJsonpBtn.click();\n// fetchBtn.click();\n// expect(status.getText()).toMatch('200');\n// expect(data.getText()).toMatch(/Super Hero!/);\n// });\n\n it('should make JSONP request to invalid URL and invoke the error handler',\n function() {\n invalidJsonpBtn.click();\n fetchBtn.click();\n expect(status.getText()).toMatch('0');\n expect(data.getText()).toMatch('Request failed');\n });\n\n\n */\n function $http(requestConfig) {\n var config = {\n method: 'get',\n transformRequest: defaults.transformRequest,\n transformResponse: defaults.transformResponse\n };\n var headers = mergeHeaders(requestConfig);\n\n extend(config, requestConfig);\n config.headers = headers;\n config.method = uppercase(config.method);\n\n var serverRequest = function(config) {\n headers = config.headers;\n var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);\n\n // strip content-type if data is undefined\n if (isUndefined(reqData)) {\n forEach(headers, function(value, header) {\n if (lowercase(header) === 'content-type') {\n delete headers[header];\n }\n });\n }\n\n if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n config.withCredentials = defaults.withCredentials;\n }\n\n // send request\n return sendReq(config, reqData, headers).then(transformResponse, transformResponse);\n };\n\n var chain = [serverRequest, undefined];\n var promise = $q.when(config);\n\n // apply interceptors\n forEach(reversedInterceptors, function(interceptor) {\n if (interceptor.request || interceptor.requestError) {\n chain.unshift(interceptor.request, interceptor.requestError);\n }\n if (interceptor.response || interceptor.responseError) {\n chain.push(interceptor.response, interceptor.responseError);\n }\n });\n\n while(chain.length) {\n var thenFn = chain.shift();\n var rejectFn = chain.shift();\n\n promise = promise.then(thenFn, rejectFn);\n }\n\n promise.success = function(fn) {\n promise.then(function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n promise.error = function(fn) {\n promise.then(null, function(response) {\n fn(response.data, response.status, response.headers, config);\n });\n return promise;\n };\n\n return promise;\n\n function transformResponse(response) {\n // make a copy since the response must be cacheable\n var resp = extend({}, response, {\n data: transformData(response.data, response.headers, config.transformResponse)\n });\n return (isSuccess(response.status))\n ? resp\n : $q.reject(resp);\n }\n\n function mergeHeaders(config) {\n var defHeaders = defaults.headers,\n reqHeaders = extend({}, config.headers),\n defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\n defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\n // using for-in instead of forEach to avoid unecessary iteration after header has been found\n defaultHeadersIteration:\n for (defHeaderName in defHeaders) {\n lowercaseDefHeaderName = lowercase(defHeaderName);\n\n for (reqHeaderName in reqHeaders) {\n if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n continue defaultHeadersIteration;\n }\n }\n\n reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n }\n\n // execute if header value is a function for merged headers\n execHeaders(reqHeaders);\n return reqHeaders;\n\n function execHeaders(headers) {\n var headerContent;\n\n forEach(headers, function(headerFn, header) {\n if (isFunction(headerFn)) {\n headerContent = headerFn();\n if (headerContent != null) {\n headers[header] = headerContent;\n } else {\n delete headers[header];\n }\n }\n });\n }\n }\n }\n\n $http.pendingRequests = [];\n\n /**\n * @ngdoc method\n * @name $http#get\n *\n * @description\n * Shortcut method to perform `GET` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#delete\n *\n * @description\n * Shortcut method to perform `DELETE` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#head\n *\n * @description\n * Shortcut method to perform `HEAD` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#jsonp\n *\n * @description\n * Shortcut method to perform `JSONP` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request.\n * The name of the callback should be the string `JSON_CALLBACK`.\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n createShortMethods('get', 'delete', 'head', 'jsonp');\n\n /**\n * @ngdoc method\n * @name $http#post\n *\n * @description\n * Shortcut method to perform `POST` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#put\n *\n * @description\n * Shortcut method to perform `PUT` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n\n /**\n * @ngdoc method\n * @name $http#patch\n *\n * @description\n * Shortcut method to perform `PATCH` request.\n *\n * @param {string} url Relative or absolute URL specifying the destination of the request\n * @param {*} data Request content\n * @param {Object=} config Optional configuration object\n * @returns {HttpPromise} Future object\n */\n createShortMethodsWithData('post', 'put', 'patch');\n\n /**\n * @ngdoc property\n * @name $http#defaults\n *\n * @description\n * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n * default headers, withCredentials as well as request and response transformations.\n *\n * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n */\n $http.defaults = defaults;\n\n\n return $http;\n\n\n function createShortMethods(names) {\n forEach(arguments, function(name) {\n $http[name] = function(url, config) {\n return $http(extend(config || {}, {\n method: name,\n url: url\n }));\n };\n });\n }\n\n\n function createShortMethodsWithData(name) {\n forEach(arguments, function(name) {\n $http[name] = function(url, data, config) {\n return $http(extend(config || {}, {\n method: name,\n url: url,\n data: data\n }));\n };\n });\n }\n\n\n /**\n * Makes the request.\n *\n * !!! ACCESSES CLOSURE VARS:\n * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n */\n function sendReq(config, reqData, reqHeaders) {\n var deferred = $q.defer(),\n promise = deferred.promise,\n cache,\n cachedResp,\n url = buildUrl(config.url, config.params);\n\n $http.pendingRequests.push(config);\n promise.then(removePendingReq, removePendingReq);\n\n\n if ((config.cache || defaults.cache) && config.cache !== false &&\n (config.method === 'GET' || config.method === 'JSONP')) {\n cache = isObject(config.cache) ? config.cache\n : isObject(defaults.cache) ? defaults.cache\n : defaultCache;\n }\n\n if (cache) {\n cachedResp = cache.get(url);\n if (isDefined(cachedResp)) {\n if (isPromiseLike(cachedResp)) {\n // cached request has already been sent, but there is no response yet\n cachedResp.then(removePendingReq, removePendingReq);\n return cachedResp;\n } else {\n // serving from cache\n if (isArray(cachedResp)) {\n resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);\n } else {\n resolvePromise(cachedResp, 200, {}, 'OK');\n }\n }\n } else {\n // put the promise for the non-transformed response into cache as a placeholder\n cache.put(url, promise);\n }\n }\n\n\n // if we won't have the response in cache, set the xsrf headers and\n // send the request to the backend\n if (isUndefined(cachedResp)) {\n var xsrfValue = urlIsSameOrigin(config.url)\n ? $browser.cookies()[config.xsrfCookieName || defaults.xsrfCookieName]\n : undefined;\n if (xsrfValue) {\n reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n }\n\n $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n config.withCredentials, config.responseType);\n }\n\n return promise;\n\n\n /**\n * Callback registered to $httpBackend():\n * - caches the response if desired\n * - resolves the raw $http promise\n * - calls $apply\n */\n function done(status, response, headersString, statusText) {\n if (cache) {\n if (isSuccess(status)) {\n cache.put(url, [status, response, parseHeaders(headersString), statusText]);\n } else {\n // remove promise from the cache\n cache.remove(url);\n }\n }\n\n function resolveHttpPromise() {\n resolvePromise(response, status, headersString, statusText);\n }\n\n if (useApplyAsync) {\n $rootScope.$applyAsync(resolveHttpPromise);\n } else {\n resolveHttpPromise();\n if (!$rootScope.$$phase) $rootScope.$apply();\n }\n }\n\n\n /**\n * Resolves the raw $http promise.\n */\n function resolvePromise(response, status, headers, statusText) {\n // normalize internal statuses to 0\n status = Math.max(status, 0);\n\n (isSuccess(status) ? deferred.resolve : deferred.reject)({\n data: response,\n status: status,\n headers: headersGetter(headers),\n config: config,\n statusText : statusText\n });\n }\n\n\n function removePendingReq() {\n var idx = $http.pendingRequests.indexOf(config);\n if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n }\n }\n\n\n function buildUrl(url, params) {\n if (!params) return url;\n var parts = [];\n forEachSorted(params, function(value, key) {\n if (value === null || isUndefined(value)) return;\n if (!isArray(value)) value = [value];\n\n forEach(value, function(v) {\n if (isObject(v)) {\n if (isDate(v)){\n v = v.toISOString();\n } else {\n v = toJson(v);\n }\n }\n parts.push(encodeUriQuery(key) + '=' +\n encodeUriQuery(v));\n });\n });\n if(parts.length > 0) {\n url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');\n }\n return url;\n }\n }];\n}\n\nfunction createXhr(method) {\n //if IE and the method is not RFC2616 compliant, or if XMLHttpRequest\n //is not available, try getting an ActiveXObject. Otherwise, use XMLHttpRequest\n //if it is available\n if (msie <= 8 && (!method.match(/^(get|post|head|put|delete|options)$/i) ||\n !window.XMLHttpRequest)) {\n return new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n } else if (window.XMLHttpRequest) {\n return new window.XMLHttpRequest();\n }\n\n throw minErr('$httpBackend')('noxhr', \"This browser does not support XMLHttpRequest.\");\n}\n\n/**\n * @ngdoc service\n * @name $httpBackend\n * @requires $window\n * @requires $document\n *\n * @description\n * HTTP backend used by the {@link ng.$http service} that delegates to\n * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n *\n * You should never need to use this service directly, instead use the higher-level abstractions:\n * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n *\n * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n * $httpBackend} which can be trained with responses.\n */\nfunction $HttpBackendProvider() {\n this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) {\n return createHttpBackend($browser, createXhr, $browser.defer, $window.angular.callbacks, $document[0]);\n }];\n}\n\nfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n var ABORTED = -1;\n\n // TODO(vojta): fix the signature\n return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {\n var status;\n $browser.$$incOutstandingRequestCount();\n url = url || $browser.url();\n\n if (lowercase(method) == 'jsonp') {\n var callbackId = '_' + (callbacks.counter++).toString(36);\n callbacks[callbackId] = function(data) {\n callbacks[callbackId].data = data;\n callbacks[callbackId].called = true;\n };\n\n var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),\n callbackId, function(status, text) {\n completeRequest(callback, status, callbacks[callbackId].data, \"\", text);\n callbacks[callbackId] = noop;\n });\n } else {\n\n var xhr = createXhr(method);\n\n xhr.open(method, url, true);\n forEach(headers, function(value, key) {\n if (isDefined(value)) {\n xhr.setRequestHeader(key, value);\n }\n });\n\n // In IE6 and 7, this might be called synchronously when xhr.send below is called and the\n // response is in the cache. the promise api will ensure that to the app code the api is\n // always async\n xhr.onreadystatechange = function() {\n // onreadystatechange might get called multiple times with readyState === 4 on mobile webkit caused by\n // xhrs that are resolved while the app is in the background (see #5426).\n // since calling completeRequest sets the `xhr` variable to null, we just check if it's not null before\n // continuing\n //\n // we can't set xhr.onreadystatechange to undefined or delete it because that breaks IE8 (method=PATCH) and\n // Safari respectively.\n if (xhr && xhr.readyState == 4) {\n var responseHeaders = null,\n response = null,\n statusText = '';\n\n if(status !== ABORTED) {\n responseHeaders = xhr.getAllResponseHeaders();\n\n // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n response = ('response' in xhr) ? xhr.response : xhr.responseText;\n }\n\n // Accessing statusText on an aborted xhr object will\n // throw an 'c00c023f error' in IE9 and lower, don't touch it.\n if (!(status === ABORTED && msie < 10)) {\n statusText = xhr.statusText;\n }\n\n completeRequest(callback,\n status || xhr.status,\n response,\n responseHeaders,\n statusText);\n }\n };\n\n if (withCredentials) {\n xhr.withCredentials = true;\n }\n\n if (responseType) {\n try {\n xhr.responseType = responseType;\n } catch (e) {\n // WebKit added support for the json responseType value on 09/03/2013\n // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n // known to throw when setting the value \"json\" as the response type. Other older\n // browsers implementing the responseType\n //\n // The json response type can be ignored if not supported, because JSON payloads are\n // parsed on the client-side regardless.\n if (responseType !== 'json') {\n throw e;\n }\n }\n }\n\n xhr.send(post || null);\n }\n\n if (timeout > 0) {\n var timeoutId = $browserDefer(timeoutRequest, timeout);\n } else if (isPromiseLike(timeout)) {\n timeout.then(timeoutRequest);\n }\n\n\n function timeoutRequest() {\n status = ABORTED;\n jsonpDone && jsonpDone();\n xhr && xhr.abort();\n }\n\n function completeRequest(callback, status, response, headersString, statusText) {\n // cancel timeout and subsequent timeout promise resolution\n timeoutId && $browserDefer.cancel(timeoutId);\n jsonpDone = xhr = null;\n\n // fix status code when it is 0 (0 status is undocumented).\n // Occurs when accessing file resources or on Android 4.1 stock browser\n // while retrieving files from application cache.\n if (status === 0) {\n status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;\n }\n\n // normalize IE bug (http://bugs.jquery.com/ticket/1450)\n status = status === 1223 ? 204 : status;\n statusText = statusText || '';\n\n callback(status, response, headersString, statusText);\n $browser.$$completeOutstandingRequest(noop);\n }\n };\n\n function jsonpReq(url, callbackId, done) {\n // we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:\n // - fetches local scripts via XHR and evals them\n // - adds and immediately removes script elements from the document\n var script = rawDocument.createElement('script'), callback = null;\n script.type = \"text/javascript\";\n script.src = url;\n script.async = true;\n\n callback = function(event) {\n removeEventListenerFn(script, \"load\", callback);\n removeEventListenerFn(script, \"error\", callback);\n rawDocument.body.removeChild(script);\n script = null;\n var status = -1;\n var text = \"unknown\";\n\n if (event) {\n if (event.type === \"load\" && !callbacks[callbackId].called) {\n event = { type: \"error\" };\n }\n text = event.type;\n status = event.type === \"error\" ? 404 : 200;\n }\n\n if (done) {\n done(status, text);\n }\n };\n\n addEventListenerFn(script, \"load\", callback);\n addEventListenerFn(script, \"error\", callback);\n rawDocument.body.appendChild(script);\n return callback;\n }\n}\n\nvar $interpolateMinErr = minErr('$interpolate');\n\n/**\n * @ngdoc provider\n * @name $interpolateProvider\n *\n * @description\n *\n * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n *\n * @example\n\n\n\n\n //demo.label//\n\n\n\n it('should interpolate binding with custom symbols', function() {\n expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n });\n\n\n */\nfunction $InterpolateProvider() {\n var startSymbol = '{{';\n var endSymbol = '}}';\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#startSymbol\n * @description\n * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n *\n * @param {string=} value new value to set the starting symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.startSymbol = function(value){\n if (value) {\n startSymbol = value;\n return this;\n } else {\n return startSymbol;\n }\n };\n\n /**\n * @ngdoc method\n * @name $interpolateProvider#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * @param {string=} value new value to set the ending symbol to.\n * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n */\n this.endSymbol = function(value){\n if (value) {\n endSymbol = value;\n return this;\n } else {\n return endSymbol;\n }\n };\n\n\n this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n var startSymbolLength = startSymbol.length,\n endSymbolLength = endSymbol.length,\n escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),\n escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');\n\n function escape(ch) {\n return '\\\\\\\\\\\\' + ch;\n }\n\n /**\n * @ngdoc service\n * @name $interpolate\n * @kind function\n *\n * @requires $parse\n * @requires $sce\n *\n * @description\n *\n * Compiles a string with markup into an interpolation function. This service is used by the\n * HTML {@link ng.$compile $compile} service for data binding. See\n * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n * interpolation markup.\n *\n *\n * ```js\n * var $interpolate = ...; // injected\n * var exp = $interpolate('Hello {{name | uppercase}}!');\n * expect(exp({name:'Angular'}).toEqual('Hello ANGULAR!');\n * ```\n *\n * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is\n * `true`, the interpolation function will return `undefined` unless all embedded expressions\n * evaluate to a value other than `undefined`.\n *\n * ```js\n * var $interpolate = ...; // injected\n * var context = {greeting: 'Hello', name: undefined };\n *\n * // default \"forgiving\" mode\n * var exp = $interpolate('{{greeting}} {{name}}!');\n * expect(exp(context)).toEqual('Hello !');\n *\n * // \"allOrNothing\" mode\n * exp = $interpolate('{{greeting}} {{name}}!', false, null, true);\n * expect(exp(context)).toBeUndefined();\n * context.name = 'Angular';\n * expect(exp(context)).toEqual('Hello Angular!');\n * ```\n *\n * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.\n *\n * ####Escaped Interpolation\n * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers\n * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).\n * It will be rendered as a regular start/end marker, and will not be interpreted as an expression\n * or binding.\n *\n * This enables web-servers to prevent script injection attacks and defacing attacks, to some\n * degree, while also enabling code examples to work without relying on the\n * {@link ng.directive:ngNonBindable ngNonBindable} directive.\n *\n * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,\n * replacing angle brackets (<, >) with < and > respectively, and replacing all\n * interpolation start/end markers with their escaped counterparts.**\n *\n * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered\n * output when the $interpolate service processes the text. So, for HTML elements interpolated\n * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter\n * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,\n * this is typically useful only when user-data is used in rendering a template from the server, or\n * when otherwise untrusted data is used by a directive.\n *\n * \n * \n * \n * {{apptitle}}: \\{\\{ username = \"defaced value\"; \\}\\}\n * \n * {{username}} attempts to inject code which will deface the\n * application, but fails to accomplish their task, because the server has correctly\n * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)\n * characters.\n * Instead, the result of the attempted script injection is visible, and can be removed\n * from the database by an administrator.\n * \n * \n * \n *\n * @param {string} text The text with markup to interpolate.\n * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n * embedded expression in order to return an interpolation function. Strings with no\n * embedded expression will return null for the interpolation function.\n * @param {string=} trustedContext when provided, the returned function passes the interpolated\n * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,\n * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that\n * provides Strict Contextual Escaping for details.\n * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined\n * unless all embedded expressions evaluate to a value other than `undefined`.\n * @returns {function(context)} an interpolation function which is used to compute the\n * interpolated string. The function has these parameters:\n *\n * - `context`: evaluation context for all expressions embedded in the interpolated text\n */\n function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {\n allOrNothing = !!allOrNothing;\n var startIndex,\n endIndex,\n index = 0,\n expressions = [],\n parseFns = [],\n textLength = text.length,\n exp,\n concat = [],\n expressionPositions = [];\n\n while(index < textLength) {\n if ( ((startIndex = text.indexOf(startSymbol, index)) != -1) &&\n ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1) ) {\n if (index !== startIndex) {\n concat.push(unescapeText(text.substring(index, startIndex)));\n }\n exp = text.substring(startIndex + startSymbolLength, endIndex);\n expressions.push(exp);\n parseFns.push($parse(exp, parseStringifyInterceptor));\n index = endIndex + endSymbolLength;\n expressionPositions.push(concat.length);\n concat.push('');\n } else {\n // we did not find an interpolation, so we have to add the remainder to the separators array\n if (index !== textLength) {\n concat.push(unescapeText(text.substring(index)));\n }\n break;\n }\n }\n\n // Concatenating expressions makes it hard to reason about whether some combination of\n // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a\n // single expression be used for iframe[src], object[src], etc., we ensure that the value\n // that's used is assigned or constructed by some JS code somewhere that is more testable or\n // make it obvious that you bound the value to some user controlled value. This helps reduce\n // the load when auditing for XSS issues.\n if (trustedContext && concat.length > 1) {\n throw $interpolateMinErr('noconcat',\n \"Error while interpolating: {0}\\nStrict Contextual Escaping disallows \" +\n \"interpolations that concatenate multiple expressions when a trusted value is \" +\n \"required. See http://docs.angularjs.org/api/ng.$sce\", text);\n }\n\n if (!mustHaveExpression || expressions.length) {\n var compute = function(values) {\n for(var i = 0, ii = expressions.length; i < ii; i++) {\n if (allOrNothing && isUndefined(values[i])) return;\n concat[expressionPositions[i]] = values[i];\n }\n return concat.join('');\n };\n\n var getValue = function (value) {\n return trustedContext ?\n $sce.getTrusted(trustedContext, value) :\n $sce.valueOf(value);\n };\n\n var stringify = function (value) {\n if (value == null) { // null || undefined\n return '';\n }\n switch (typeof value) {\n case 'string': {\n break;\n }\n case 'number': {\n value = '' + value;\n break;\n }\n default: {\n value = toJson(value);\n }\n }\n\n return value;\n };\n\n return extend(function interpolationFn(context) {\n var i = 0;\n var ii = expressions.length;\n var values = new Array(ii);\n\n try {\n for (; i < ii; i++) {\n values[i] = parseFns[i](context);\n }\n\n return compute(values);\n } catch(err) {\n var newErr = $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text,\n err.toString());\n $exceptionHandler(newErr);\n }\n\n }, {\n // all of these properties are undocumented for now\n exp: text, //just for compatibility with regular watchers created via $watch\n expressions: expressions,\n $$watchDelegate: function (scope, listener, objectEquality) {\n var lastValue;\n return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) {\n var currValue = compute(values);\n if (isFunction(listener)) {\n listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);\n }\n lastValue = currValue;\n }, objectEquality);\n }\n });\n }\n\n function unescapeText(text) {\n return text.replace(escapedStartRegexp, startSymbol).\n replace(escapedEndRegexp, endSymbol);\n }\n\n function parseStringifyInterceptor(value) {\n try {\n return stringify(getValue(value));\n } catch(err) {\n var newErr = $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text,\n err.toString());\n $exceptionHandler(newErr);\n }\n }\n }\n\n\n /**\n * @ngdoc method\n * @name $interpolate#startSymbol\n * @description\n * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n *\n * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change\n * the symbol.\n *\n * @returns {string} start symbol.\n */\n $interpolate.startSymbol = function() {\n return startSymbol;\n };\n\n\n /**\n * @ngdoc method\n * @name $interpolate#endSymbol\n * @description\n * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n *\n * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change\n * the symbol.\n *\n * @returns {string} end symbol.\n */\n $interpolate.endSymbol = function() {\n return endSymbol;\n };\n\n return $interpolate;\n }];\n}\n\nfunction $IntervalProvider() {\n this.$get = ['$rootScope', '$window', '$q', '$$q',\n function($rootScope, $window, $q, $$q) {\n var intervals = {};\n\n\n /**\n * @ngdoc service\n * @name $interval\n *\n * @description\n * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n * milliseconds.\n *\n * The return value of registering an interval function is a promise. This promise will be\n * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n * run indefinitely if `count` is not defined. The value of the notification will be the\n * number of iterations that have run.\n * To cancel an interval, call `$interval.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to\n * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n * time.\n *\n * \n * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n * with them. In particular they are not automatically destroyed when a controller's scope or a\n * directive's element are destroyed.\n * You should take this into consideration and make sure to always cancel the interval at the\n * appropriate moment. See the example below for more details on how and when to do this.\n * \n *\n * @param {function()} fn A function that should be called repeatedly.\n * @param {number} delay Number of milliseconds between each function call.\n * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n * indefinitely.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @returns {promise} A promise which will be notified on each iteration.\n *\n * @example\n * \n * \n * \n *\n * \n * \n * Date format: \n * Current time is: \n * \n * Blood 1 : {{blood_1}}\n * Blood 2 : {{blood_2}}\n * Fight\n * StopFight\n * resetFight\n * \n * \n *\n * \n * \n */\n function interval(fn, delay, count, invokeApply) {\n var setInterval = $window.setInterval,\n clearInterval = $window.clearInterval,\n iteration = 0,\n skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise;\n\n count = isDefined(count) ? count : 0;\n\n promise.then(null, null, fn);\n\n promise.$$intervalId = setInterval(function tick() {\n deferred.notify(iteration++);\n\n if (count > 0 && iteration >= count) {\n deferred.resolve(iteration);\n clearInterval(promise.$$intervalId);\n delete intervals[promise.$$intervalId];\n }\n\n if (!skipApply) $rootScope.$apply();\n\n }, delay);\n\n intervals[promise.$$intervalId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $interval#cancel\n *\n * @description\n * Cancels a task associated with the `promise`.\n *\n * @param {promise} promise returned by the `$interval` function.\n * @returns {boolean} Returns `true` if the task was successfully canceled.\n */\n interval.cancel = function(promise) {\n if (promise && promise.$$intervalId in intervals) {\n intervals[promise.$$intervalId].reject('canceled');\n $window.clearInterval(promise.$$intervalId);\n delete intervals[promise.$$intervalId];\n return true;\n }\n return false;\n };\n\n return interval;\n }];\n}\n\n/**\n * @ngdoc service\n * @name $locale\n *\n * @description\n * $locale service provides localization rules for various Angular components. As of right now the\n * only public api is:\n *\n * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)\n */\nfunction $LocaleProvider(){\n this.$get = function() {\n return {\n id: 'en-us',\n\n NUMBER_FORMATS: {\n DECIMAL_SEP: '.',\n GROUP_SEP: ',',\n PATTERNS: [\n { // Decimal Pattern\n minInt: 1,\n minFrac: 0,\n maxFrac: 3,\n posPre: '',\n posSuf: '',\n negPre: '-',\n negSuf: '',\n gSize: 3,\n lgSize: 3\n },{ //Currency Pattern\n minInt: 1,\n minFrac: 2,\n maxFrac: 2,\n posPre: '\\u00A4',\n posSuf: '',\n negPre: '(\\u00A4',\n negSuf: ')',\n gSize: 3,\n lgSize: 3\n }\n ],\n CURRENCY_SYM: '$'\n },\n\n DATETIME_FORMATS: {\n MONTH:\n 'January,February,March,April,May,June,July,August,September,October,November,December'\n .split(','),\n SHORTMONTH: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),\n DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),\n SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),\n AMPMS: ['AM','PM'],\n medium: 'MMM d, y h:mm:ss a',\n short: 'M/d/yy h:mm a',\n fullDate: 'EEEE, MMMM d, y',\n longDate: 'MMMM d, y',\n mediumDate: 'MMM d, y',\n shortDate: 'M/d/yy',\n mediumTime: 'h:mm:ss a',\n shortTime: 'h:mm a'\n },\n\n pluralCat: function(num) {\n if (num === 1) {\n return 'one';\n }\n return 'other';\n }\n };\n };\n}\n\nvar PATH_MATCH = /^([^\\?#]*)(\\?([^#]*))?(#(.*))?$/,\n DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\nvar $locationMinErr = minErr('$location');\n\n\n/**\n * Encode path using encodeUriSegment, ignoring forward slashes\n *\n * @param {string} path Path to encode\n * @returns {string}\n */\nfunction encodePath(path) {\n var segments = path.split('/'),\n i = segments.length;\n\n while (i--) {\n segments[i] = encodeUriSegment(segments[i]);\n }\n\n return segments.join('/');\n}\n\nfunction parseAbsoluteUrl(absoluteUrl, locationObj, appBase) {\n var parsedUrl = urlResolve(absoluteUrl, appBase);\n\n locationObj.$$protocol = parsedUrl.protocol;\n locationObj.$$host = parsedUrl.hostname;\n locationObj.$$port = int(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n}\n\n\nfunction parseAppUrl(relativeUrl, locationObj, appBase) {\n var prefixed = (relativeUrl.charAt(0) !== '/');\n if (prefixed) {\n relativeUrl = '/' + relativeUrl;\n }\n var match = urlResolve(relativeUrl, appBase);\n locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?\n match.pathname.substring(1) : match.pathname);\n locationObj.$$search = parseKeyValue(match.search);\n locationObj.$$hash = decodeURIComponent(match.hash);\n\n // make sure path starts with '/';\n if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {\n locationObj.$$path = '/' + locationObj.$$path;\n }\n}\n\n\n/**\n *\n * @param {string} begin\n * @param {string} whole\n * @returns {string} returns text from whole after begin or undefined if it does not begin with\n * expected string.\n */\nfunction beginsWith(begin, whole) {\n if (whole.indexOf(begin) === 0) {\n return whole.substr(begin.length);\n }\n}\n\n\nfunction stripHash(url) {\n var index = url.indexOf('#');\n return index == -1 ? url : url.substr(0, index);\n}\n\n\nfunction stripFile(url) {\n return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n}\n\n/* return the server only (scheme://host:port) */\nfunction serverBase(url) {\n return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n}\n\n\n/**\n * LocationHtml5Url represents an url\n * This object is exposed as $location service when HTML5 mode is enabled and supported\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} basePrefix url path prefix\n */\nfunction LocationHtml5Url(appBase, basePrefix) {\n this.$$html5 = true;\n basePrefix = basePrefix || '';\n var appBaseNoFile = stripFile(appBase);\n parseAbsoluteUrl(appBase, this, appBase);\n\n\n /**\n * Parse given html5 (regular) url string into properties\n * @param {string} newAbsoluteUrl HTML5 url\n * @private\n */\n this.$$parse = function(url) {\n var pathUrl = beginsWith(appBaseNoFile, url);\n if (!isString(pathUrl)) {\n throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n appBaseNoFile);\n }\n\n parseAppUrl(pathUrl, this, appBase);\n\n if (!this.$$path) {\n this.$$path = '/';\n }\n\n this.$$compose();\n };\n\n /**\n * Compose url and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n var appUrl, prevAppUrl;\n var rewrittenUrl;\n\n if ( (appUrl = beginsWith(appBase, url)) !== undefined ) {\n prevAppUrl = appUrl;\n if ( (appUrl = beginsWith(basePrefix, appUrl)) !== undefined ) {\n rewrittenUrl = appBaseNoFile + (beginsWith('/', appUrl) || appUrl);\n } else {\n rewrittenUrl = appBase + prevAppUrl;\n }\n } else if ( (appUrl = beginsWith(appBaseNoFile, url)) !== undefined ) {\n rewrittenUrl = appBaseNoFile + appUrl;\n } else if (appBaseNoFile == url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when developer doesn't opt into html5 mode.\n * It also serves as the base class for html5 mode fallback on legacy browsers.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangUrl(appBase, hashPrefix) {\n var appBaseNoFile = stripFile(appBase);\n\n parseAbsoluteUrl(appBase, this, appBase);\n\n\n /**\n * Parse given hashbang url into properties\n * @param {string} url Hashbang url\n * @private\n */\n this.$$parse = function(url) {\n var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);\n var withoutHashUrl = withoutBaseUrl.charAt(0) == '#'\n ? beginsWith(hashPrefix, withoutBaseUrl)\n : (this.$$html5)\n ? withoutBaseUrl\n : '';\n\n if (!isString(withoutHashUrl)) {\n throw $locationMinErr('ihshprfx', 'Invalid url \"{0}\", missing hash prefix \"{1}\".', url,\n hashPrefix);\n }\n parseAppUrl(withoutHashUrl, this, appBase);\n\n this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\n this.$$compose();\n\n /*\n * In Windows, on an anchor node on documents loaded from\n * the filesystem, the browser will return a pathname\n * prefixed with the drive name ('/C:/path') when a\n * pathname without a drive is set:\n * * a.setAttribute('href', '/foo')\n * * a.pathname === '/C:/foo' //true\n *\n * Inside of Angular, we're always using pathnames that\n * do not include drive names for routing.\n */\n function removeWindowsDriveName (path, url, base) {\n /*\n Matches paths for file protocol on windows,\n such as /C:/foo/bar, and captures only /foo/bar.\n */\n var windowsFilePathExp = /^\\/[A-Z]:(\\/.*)/;\n\n var firstPathSegmentMatch;\n\n //Get the relative path from the input URL.\n if (url.indexOf(base) === 0) {\n url = url.replace(base, '');\n }\n\n // The input URL intentionally contains a first path segment that ends with a colon.\n if (windowsFilePathExp.exec(url)) {\n return path;\n }\n\n firstPathSegmentMatch = windowsFilePathExp.exec(path);\n return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n }\n };\n\n /**\n * Compose hashbang url and update `absUrl` property\n * @private\n */\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');\n };\n\n this.$$parseLinkUrl = function(url, relHref) {\n if(stripHash(appBase) == stripHash(url)) {\n this.$$parse(url);\n return true;\n }\n return false;\n };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when html5 history api is enabled but the browser\n * does not support it.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangInHtml5Url(appBase, hashPrefix) {\n this.$$html5 = true;\n LocationHashbangUrl.apply(this, arguments);\n\n var appBaseNoFile = stripFile(appBase);\n\n this.$$parseLinkUrl = function(url, relHref) {\n if (relHref && relHref[0] === '#') {\n // special case for links to hash fragments:\n // keep the old url and only replace the hash fragment\n this.hash(relHref.slice(1));\n return true;\n }\n\n var rewrittenUrl;\n var appUrl;\n\n if ( appBase == stripHash(url) ) {\n rewrittenUrl = url;\n } else if ( (appUrl = beginsWith(appBaseNoFile, url)) ) {\n rewrittenUrl = appBase + hashPrefix + appUrl;\n } else if ( appBaseNoFile === url + '/') {\n rewrittenUrl = appBaseNoFile;\n }\n if (rewrittenUrl) {\n this.$$parse(rewrittenUrl);\n }\n return !!rewrittenUrl;\n };\n\n this.$$compose = function() {\n var search = toKeyValue(this.$$search),\n hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n // include hashPrefix in $$absUrl when $$url is empty so IE8 & 9 do not reload page because of removal of '#'\n this.$$absUrl = appBase + hashPrefix + this.$$url;\n };\n\n}\n\n\nLocationHashbangInHtml5Url.prototype =\n LocationHashbangUrl.prototype =\n LocationHtml5Url.prototype = {\n\n /**\n * Are we in html5 mode?\n * @private\n */\n $$html5: false,\n\n /**\n * Has any change been replacing ?\n * @private\n */\n $$replace: false,\n\n /**\n * @ngdoc method\n * @name $location#absUrl\n *\n * @description\n * This method is getter only.\n *\n * Return full url representation with all segments encoded according to rules specified in\n * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).\n *\n * @return {string} full url\n */\n absUrl: locationGetter('$$absUrl'),\n\n /**\n * @ngdoc method\n * @name $location#url\n *\n * @description\n * This method is getter / setter.\n *\n * Return url (e.g. `/path?a=b#hash`) when called without any parameter.\n *\n * Change path, search and hash, when called with parameter and return `$location`.\n *\n * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)\n * @return {string} url\n */\n url: function(url) {\n if (isUndefined(url))\n return this.$$url;\n\n var match = PATH_MATCH.exec(url);\n if (match[1]) this.path(decodeURIComponent(match[1]));\n if (match[2] || match[1]) this.search(match[3] || '');\n this.hash(match[5] || '');\n\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#protocol\n *\n * @description\n * This method is getter only.\n *\n * Return protocol of current url.\n *\n * @return {string} protocol of current url\n */\n protocol: locationGetter('$$protocol'),\n\n /**\n * @ngdoc method\n * @name $location#host\n *\n * @description\n * This method is getter only.\n *\n * Return host of current url.\n *\n * @return {string} host of current url.\n */\n host: locationGetter('$$host'),\n\n /**\n * @ngdoc method\n * @name $location#port\n *\n * @description\n * This method is getter only.\n *\n * Return port of current url.\n *\n * @return {Number} port\n */\n port: locationGetter('$$port'),\n\n /**\n * @ngdoc method\n * @name $location#path\n *\n * @description\n * This method is getter / setter.\n *\n * Return path of current url when called without any parameter.\n *\n * Change path when called with parameter and return `$location`.\n *\n * Note: Path should always begin with forward slash (/), this method will add the forward slash\n * if it is missing.\n *\n * @param {(string|number)=} path New path\n * @return {string} path\n */\n path: locationGetterSetter('$$path', function(path) {\n path = path ? path.toString() : '';\n return path.charAt(0) == '/' ? path : '/' + path;\n }),\n\n /**\n * @ngdoc method\n * @name $location#search\n *\n * @description\n * This method is getter / setter.\n *\n * Return search part (as object) of current url when called without any parameter.\n *\n * Change search part when called with parameter and return `$location`.\n *\n *\n * ```js\n * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n * var searchObject = $location.search();\n * // => {foo: 'bar', baz: 'xoxo'}\n *\n *\n * // set foo to 'yipee'\n * $location.search('foo', 'yipee');\n * // => $location\n * ```\n *\n * @param {string|Object.|Object.>} search New search params - string or\n * hash object.\n *\n * When called with a single argument the method acts as a setter, setting the `search` component\n * of `$location` to the specified value.\n *\n * If the argument is a hash object containing an array of values, these values will be encoded\n * as duplicate search parameters in the url.\n *\n * @param {(string|Number|Array|boolean)=} paramValue If `search` is a string or number, then `paramValue`\n * will override only a single search property.\n *\n * If `paramValue` is an array, it will override the property of the `search` component of\n * `$location` specified via the first argument.\n *\n * If `paramValue` is `null`, the property specified via the first argument will be deleted.\n *\n * If `paramValue` is `true`, the property specified via the first argument will be added with no\n * value nor trailing equal sign.\n *\n * @return {Object} If called with no arguments returns the parsed `search` object. If called with\n * one or more arguments returns `$location` object itself.\n */\n search: function(search, paramValue) {\n switch (arguments.length) {\n case 0:\n return this.$$search;\n case 1:\n if (isString(search) || isNumber(search)) {\n search = search.toString();\n this.$$search = parseKeyValue(search);\n } else if (isObject(search)) {\n // remove object undefined or null properties\n forEach(search, function(value, key) {\n if (value == null) delete search[key];\n });\n\n this.$$search = search;\n } else {\n throw $locationMinErr('isrcharg',\n 'The first argument of the `$location#search()` call must be a string or an object.');\n }\n break;\n default:\n if (isUndefined(paramValue) || paramValue === null) {\n delete this.$$search[search];\n } else {\n this.$$search[search] = paramValue;\n }\n }\n\n this.$$compose();\n return this;\n },\n\n /**\n * @ngdoc method\n * @name $location#hash\n *\n * @description\n * This method is getter / setter.\n *\n * Return hash fragment when called without any parameter.\n *\n * Change hash fragment when called with parameter and return `$location`.\n *\n * @param {(string|number)=} hash New hash fragment\n * @return {string} hash\n */\n hash: locationGetterSetter('$$hash', function(hash) {\n return hash ? hash.toString() : '';\n }),\n\n /**\n * @ngdoc method\n * @name $location#replace\n *\n * @description\n * If called, all changes to $location during current `$digest` will be replacing current history\n * record, instead of adding new one.\n */\n replace: function() {\n this.$$replace = true;\n return this;\n }\n};\n\nfunction locationGetter(property) {\n return function() {\n return this[property];\n };\n}\n\n\nfunction locationGetterSetter(property, preprocess) {\n return function(value) {\n if (isUndefined(value))\n return this[property];\n\n this[property] = preprocess(value);\n this.$$compose();\n\n return this;\n };\n}\n\n\n/**\n * @ngdoc service\n * @name $location\n *\n * @requires $rootElement\n *\n * @description\n * The $location service parses the URL in the browser address bar (based on the\n * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL\n * available to your application. Changes to the URL in the address bar are reflected into\n * $location service and changes to $location are reflected into the browser address bar.\n *\n * **The $location service:**\n *\n * - Exposes the current URL in the browser address bar, so you can\n * - Watch and observe the URL.\n * - Change the URL.\n * - Synchronizes the URL with the browser when the user\n * - Changes the address bar.\n * - Clicks the back or forward button (or clicks a History link).\n * - Clicks on a link.\n * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n *\n * For more information see {@link guide/$location Developer Guide: Using $location}\n */\n\n/**\n * @ngdoc provider\n * @name $locationProvider\n * @description\n * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n */\nfunction $LocationProvider(){\n var hashPrefix = '',\n html5Mode = {\n enabled: false,\n requireBase: true\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#hashPrefix\n * @description\n * @param {string=} prefix Prefix for hash part (containing path and search)\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.hashPrefix = function(prefix) {\n if (isDefined(prefix)) {\n hashPrefix = prefix;\n return this;\n } else {\n return hashPrefix;\n }\n };\n\n /**\n * @ngdoc method\n * @name $locationProvider#html5Mode\n * @description\n * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.\n * If object, sets `enabled` and `requireBase` to respective values.\n * - **enabled** – `{boolean}` – Sets `html5Mode.enabled`. If true, will rely on\n * `history.pushState` to change urls where supported. Will fall back to hash-prefixed paths\n * in browsers that do not support `pushState`.\n * - **requireBase** - `{boolean}` - Sets `html5Mode.requireBase` (default: `true`). When\n * html5Mode is enabled, specifies whether or not a tag is required to be present. If\n * `enabled` and `requireBase` are true, and a base tag is not present, an error will be\n * thrown when `$location` is injected. See the\n * {@link guide/$location $location guide for more information}\n *\n * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter\n */\n this.html5Mode = function(mode) {\n if (isBoolean(mode)) {\n html5Mode.enabled = mode;\n return this;\n } else if (isObject(mode)) {\n html5Mode.enabled = isBoolean(mode.enabled) ?\n mode.enabled :\n html5Mode.enabled;\n html5Mode.requireBase = isBoolean(mode.requireBase) ?\n mode.requireBase :\n html5Mode.requireBase;\n return this;\n } else {\n return html5Mode;\n }\n };\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeStart\n * @eventType broadcast on root scope\n * @description\n * Broadcasted before a URL will change. This change can be prevented by calling\n * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n * details about event object. Upon successful change\n * {@link ng.$location#events_$locationChangeSuccess $locationChangeSuccess} is fired.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n */\n\n /**\n * @ngdoc event\n * @name $location#$locationChangeSuccess\n * @eventType broadcast on root scope\n * @description\n * Broadcasted after a URL was changed.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {string} newUrl New URL\n * @param {string=} oldUrl URL that was before it was changed.\n */\n\n this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',\n function( $rootScope, $browser, $sniffer, $rootElement) {\n var $location,\n LocationMode,\n baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n initialUrl = $browser.url(),\n appBase;\n\n if (html5Mode.enabled) {\n if (!baseHref && html5Mode.requireBase) {\n throw $locationMinErr('nobase',\n \"$location in HTML5 mode requires a tag to be present!\");\n }\n appBase = serverBase(initialUrl) + (baseHref || '/');\n LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n } else {\n appBase = stripHash(initialUrl);\n LocationMode = LocationHashbangUrl;\n }\n $location = new LocationMode(appBase, '#' + hashPrefix);\n $location.$$parseLinkUrl(initialUrl, initialUrl);\n\n var IGNORE_URI_REGEXP = /^\\s*(javascript|mailto):/i;\n\n $rootElement.on('click', function(event) {\n // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n // currently we open nice url link and redirect then\n\n if (event.ctrlKey || event.metaKey || event.which == 2) return;\n\n var elm = jqLite(event.target);\n\n // traverse the DOM up to find first A tag\n while (nodeName_(elm[0]) !== 'a') {\n // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n }\n\n var absHref = elm.prop('href');\n // get the actual href attribute - see\n // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx\n var relHref = elm.attr('href') || elm.attr('xlink:href');\n\n if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n // an animation.\n absHref = urlResolve(absHref.animVal).href;\n }\n\n // Ignore when url is started with javascript: or mailto:\n if (IGNORE_URI_REGEXP.test(absHref)) return;\n\n if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {\n if ($location.$$parseLinkUrl(absHref, relHref)) {\n event.preventDefault();\n // update location manually\n if ($location.absUrl() != $browser.url()) {\n $rootScope.$apply();\n // hack to work around FF6 bug 684208 when scenario runner clicks on links\n window.angular['ff-684208-preventDefault'] = true;\n }\n }\n }\n });\n\n\n // rewrite hashbang url <> html5 url\n if ($location.absUrl() != initialUrl) {\n $browser.url($location.absUrl(), true);\n }\n\n // update $location when $browser url changes\n $browser.onUrlChange(function(newUrl) {\n if ($location.absUrl() != newUrl) {\n $rootScope.$evalAsync(function() {\n var oldUrl = $location.absUrl();\n\n $location.$$parse(newUrl);\n if ($rootScope.$broadcast('$locationChangeStart', newUrl,\n oldUrl).defaultPrevented) {\n $location.$$parse(oldUrl);\n $browser.url(oldUrl);\n } else {\n afterLocationChange(oldUrl);\n }\n });\n if (!$rootScope.$$phase) $rootScope.$digest();\n }\n });\n\n // update browser\n var changeCounter = 0;\n $rootScope.$watch(function $locationWatch() {\n var oldUrl = $browser.url();\n var currentReplace = $location.$$replace;\n\n if (!changeCounter || oldUrl != $location.absUrl()) {\n changeCounter++;\n $rootScope.$evalAsync(function() {\n if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n defaultPrevented) {\n $location.$$parse(oldUrl);\n } else {\n $browser.url($location.absUrl(), currentReplace);\n afterLocationChange(oldUrl);\n }\n });\n }\n $location.$$replace = false;\n\n return changeCounter;\n });\n\n return $location;\n\n function afterLocationChange(oldUrl) {\n $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl);\n }\n}];\n}\n\n/**\n * @ngdoc service\n * @name $log\n * @requires $window\n *\n * @description\n * Simple service for logging. Default implementation safely writes the message\n * into the browser's console (if present).\n *\n * The main purpose of this service is to simplify debugging and troubleshooting.\n *\n * The default is to log `debug` messages. You can use\n * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n *\n * @example\n \n \n angular.module('logExample', [])\n .controller('LogController', ['$scope', '$log', function($scope, $log) {\n $scope.$log = $log;\n $scope.message = 'Hello World!';\n }]);\n \n \n \n Reload this page with open console, enter text and hit the log button...\n Message:\n \n log\n warn\n info\n error\n \n \n \n */\n\n/**\n * @ngdoc provider\n * @name $logProvider\n * @description\n * Use the `$logProvider` to configure how the application logs messages\n */\nfunction $LogProvider(){\n var debug = true,\n self = this;\n\n /**\n * @ngdoc method\n * @name $logProvider#debugEnabled\n * @description\n * @param {boolean=} flag enable or disable debug level messages\n * @returns {*} current value if used as getter or itself (chaining) if used as setter\n */\n this.debugEnabled = function(flag) {\n if (isDefined(flag)) {\n debug = flag;\n return this;\n } else {\n return debug;\n }\n };\n\n this.$get = ['$window', function($window){\n return {\n /**\n * @ngdoc method\n * @name $log#log\n *\n * @description\n * Write a log message\n */\n log: consoleLog('log'),\n\n /**\n * @ngdoc method\n * @name $log#info\n *\n * @description\n * Write an information message\n */\n info: consoleLog('info'),\n\n /**\n * @ngdoc method\n * @name $log#warn\n *\n * @description\n * Write a warning message\n */\n warn: consoleLog('warn'),\n\n /**\n * @ngdoc method\n * @name $log#error\n *\n * @description\n * Write an error message\n */\n error: consoleLog('error'),\n\n /**\n * @ngdoc method\n * @name $log#debug\n *\n * @description\n * Write a debug message\n */\n debug: (function () {\n var fn = consoleLog('debug');\n\n return function() {\n if (debug) {\n fn.apply(self, arguments);\n }\n };\n }())\n };\n\n function formatError(arg) {\n if (arg instanceof Error) {\n if (arg.stack) {\n arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n ? 'Error: ' + arg.message + '\\n' + arg.stack\n : arg.stack;\n } else if (arg.sourceURL) {\n arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n }\n }\n return arg;\n }\n\n function consoleLog(type) {\n var console = $window.console || {},\n logFn = console[type] || console.log || noop,\n hasApply = false;\n\n // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.\n // The reason behind this is that console.log has type \"object\" in IE8...\n try {\n hasApply = !!logFn.apply;\n } catch (e) {}\n\n if (hasApply) {\n return function() {\n var args = [];\n forEach(arguments, function(arg) {\n args.push(formatError(arg));\n });\n return logFn.apply(console, args);\n };\n }\n\n // we are IE which either doesn't have window.console => this is noop and we do nothing,\n // or we are IE where console.log doesn't have apply so we log at least first 2 args\n return function(arg1, arg2) {\n logFn(arg1, arg2 == null ? '' : arg2);\n };\n }\n }];\n}\n\nvar $parseMinErr = minErr('$parse');\n\n// Sandboxing Angular Expressions\n// ------------------------------\n// Angular expressions are generally considered safe because these expressions only have direct\n// access to $scope and locals. However, one can obtain the ability to execute arbitrary JS code by\n// obtaining a reference to native JS functions such as the Function constructor.\n//\n// As an example, consider the following Angular expression:\n//\n// {}.toString.constructor('alert(\"evil JS code\")')\n//\n// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits\n// against the expression language, but not to prevent exploits that were enabled by exposing\n// sensitive JavaScript or browser apis on Scope. Exposing such objects on a Scope is never a good\n// practice and therefore we are not even trying to protect against interaction with an object\n// explicitly exposed in this way.\n//\n// In general, it is not possible to access a Window object from an angular expression unless a\n// window or some DOM object that has a reference to window is published onto a Scope.\n// Similarly we prevent invocations of function known to be dangerous, as well as assignments to\n// native objects.\n\n\nfunction ensureSafeMemberName(name, fullExpression) {\n if (name === \"__defineGetter__\" || name === \"__defineSetter__\"\n || name === \"__lookupGetter__\" || name === \"__lookupSetter__\"\n || name === \"__proto__\") {\n throw $parseMinErr('isecfld',\n 'Attempting to access a disallowed field in Angular expressions! '\n +'Expression: {0}', fullExpression);\n }\n return name;\n}\n\nfunction ensureSafeObject(obj, fullExpression) {\n // nifty check if obj is Function that is fast and works across iframes and other contexts\n if (obj) {\n if (obj.constructor === obj) {\n throw $parseMinErr('isecfn',\n 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// isWindow(obj)\n obj.window === obj) {\n throw $parseMinErr('isecwindow',\n 'Referencing the Window in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// isElement(obj)\n obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {\n throw $parseMinErr('isecdom',\n 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (// block Object so that we can't get hold of dangerous Object.* methods\n obj === Object) {\n throw $parseMinErr('isecobj',\n 'Referencing Object in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n }\n }\n return obj;\n}\n\nvar CALL = Function.prototype.call;\nvar APPLY = Function.prototype.apply;\nvar BIND = Function.prototype.bind;\n\nfunction ensureSafeFunction(obj, fullExpression) {\n if (obj) {\n if (obj.constructor === obj) {\n throw $parseMinErr('isecfn',\n 'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n } else if (obj === CALL || obj === APPLY || obj === BIND) {\n throw $parseMinErr('isecff',\n 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',\n fullExpression);\n }\n }\n}\n\n//Keyword constants\nvar CONSTANTS = createMap();\nforEach({\n 'null': function() { return null; },\n 'true': function() { return true; },\n 'false': function() { return false; },\n 'undefined': function() {}\n}, function(constantGetter, name) {\n constantGetter.constant = constantGetter.literal = constantGetter.sharedGetter = true;\n CONSTANTS[name] = constantGetter;\n});\n\n//Operators - will be wrapped by binaryFn/unaryFn/assignment/filter\nvar OPERATORS = extend(createMap(), {\n /* jshint bitwise : false */\n '+':function(self, locals, a,b){\n a=a(self, locals); b=b(self, locals);\n if (isDefined(a)) {\n if (isDefined(b)) {\n return a + b;\n }\n return a;\n }\n return isDefined(b)?b:undefined;},\n '-':function(self, locals, a,b){\n a=a(self, locals); b=b(self, locals);\n return (isDefined(a)?a:0)-(isDefined(b)?b:0);\n },\n '*':function(self, locals, a,b){return a(self, locals)*b(self, locals);},\n '/':function(self, locals, a,b){return a(self, locals)/b(self, locals);},\n '%':function(self, locals, a,b){return a(self, locals)%b(self, locals);},\n '^':function(self, locals, a,b){return a(self, locals)^b(self, locals);},\n '===':function(self, locals, a, b){return a(self, locals)===b(self, locals);},\n '!==':function(self, locals, a, b){return a(self, locals)!==b(self, locals);},\n '==':function(self, locals, a,b){return a(self, locals)==b(self, locals);},\n '!=':function(self, locals, a,b){return a(self, locals)!=b(self, locals);},\n '<':function(self, locals, a,b){return a(self, locals)':function(self, locals, a,b){return a(self, locals)>b(self, locals);},\n '<=':function(self, locals, a,b){return a(self, locals)<=b(self, locals);},\n '>=':function(self, locals, a,b){return a(self, locals)>=b(self, locals);},\n '&&':function(self, locals, a,b){return a(self, locals)&&b(self, locals);},\n '||':function(self, locals, a,b){return a(self, locals)||b(self, locals);},\n '&':function(self, locals, a,b){return a(self, locals)&b(self, locals);},\n '!':function(self, locals, a){return !a(self, locals);},\n\n //Tokenized as operators but parsed as assignment/filters\n '=':true,\n '|':true\n});\n/* jshint bitwise: true */\nvar ESCAPE = {\"n\":\"\\n\", \"f\":\"\\f\", \"r\":\"\\r\", \"t\":\"\\t\", \"v\":\"\\v\", \"'\":\"'\", '\"':'\"'};\n\n\n/////////////////////////////////////////\n\n\n/**\n * @constructor\n */\nvar Lexer = function (options) {\n this.options = options;\n};\n\nLexer.prototype = {\n constructor: Lexer,\n\n lex: function (text) {\n this.text = text;\n this.index = 0;\n this.ch = undefined;\n this.tokens = [];\n\n while (this.index < this.text.length) {\n this.ch = this.text.charAt(this.index);\n if (this.is('\"\\'')) {\n this.readString(this.ch);\n } else if (this.isNumber(this.ch) || this.is('.') && this.isNumber(this.peek())) {\n this.readNumber();\n } else if (this.isIdent(this.ch)) {\n this.readIdent();\n } else if (this.is('(){}[].,;:?')) {\n this.tokens.push({\n index: this.index,\n text: this.ch\n });\n this.index++;\n } else if (this.isWhitespace(this.ch)) {\n this.index++;\n } else {\n var ch2 = this.ch + this.peek();\n var ch3 = ch2 + this.peek(2);\n var fn = OPERATORS[this.ch];\n var fn2 = OPERATORS[ch2];\n var fn3 = OPERATORS[ch3];\n if (fn3) {\n this.tokens.push({index: this.index, text: ch3, fn: fn3});\n this.index += 3;\n } else if (fn2) {\n this.tokens.push({index: this.index, text: ch2, fn: fn2});\n this.index += 2;\n } else if (fn) {\n this.tokens.push({\n index: this.index,\n text: this.ch,\n fn: fn\n });\n this.index += 1;\n } else {\n this.throwError('Unexpected next character ', this.index, this.index + 1);\n }\n }\n }\n return this.tokens;\n },\n\n is: function(chars) {\n return chars.indexOf(this.ch) !== -1;\n },\n\n peek: function(i) {\n var num = i || 1;\n return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n },\n\n isNumber: function(ch) {\n return ('0' <= ch && ch <= '9');\n },\n\n isWhitespace: function(ch) {\n // IE treats non-breaking space as \\u00A0\n return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n },\n\n isIdent: function(ch) {\n return ('a' <= ch && ch <= 'z' ||\n 'A' <= ch && ch <= 'Z' ||\n '_' === ch || ch === '$');\n },\n\n isExpOperator: function(ch) {\n return (ch === '-' || ch === '+' || this.isNumber(ch));\n },\n\n throwError: function(error, start, end) {\n end = end || this.index;\n var colStr = (isDefined(start)\n ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n : ' ' + end);\n throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n error, colStr, this.text);\n },\n\n readNumber: function() {\n var number = '';\n var start = this.index;\n while (this.index < this.text.length) {\n var ch = lowercase(this.text.charAt(this.index));\n if (ch == '.' || this.isNumber(ch)) {\n number += ch;\n } else {\n var peekCh = this.peek();\n if (ch == 'e' && this.isExpOperator(peekCh)) {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n peekCh && this.isNumber(peekCh) &&\n number.charAt(number.length - 1) == 'e') {\n number += ch;\n } else if (this.isExpOperator(ch) &&\n (!peekCh || !this.isNumber(peekCh)) &&\n number.charAt(number.length - 1) == 'e') {\n this.throwError('Invalid exponent');\n } else {\n break;\n }\n }\n this.index++;\n }\n number = 1 * number;\n this.tokens.push({\n index: start,\n text: number,\n constant: true,\n fn: function() { return number; }\n });\n },\n\n readIdent: function() {\n var expression = this.text;\n\n var ident = '';\n var start = this.index;\n\n var lastDot, peekIndex, methodName, ch;\n\n while (this.index < this.text.length) {\n ch = this.text.charAt(this.index);\n if (ch === '.' || this.isIdent(ch) || this.isNumber(ch)) {\n if (ch === '.') lastDot = this.index;\n ident += ch;\n } else {\n break;\n }\n this.index++;\n }\n\n //check if the identifier ends with . and if so move back one char\n if (lastDot && ident[ident.length - 1] === '.') {\n this.index--;\n ident = ident.slice(0, -1);\n lastDot = ident.lastIndexOf('.');\n if (lastDot === -1) {\n lastDot = undefined;\n }\n }\n\n //check if this is not a method invocation and if it is back out to last dot\n if (lastDot) {\n peekIndex = this.index;\n while (peekIndex < this.text.length) {\n ch = this.text.charAt(peekIndex);\n if (ch === '(') {\n methodName = ident.substr(lastDot - start + 1);\n ident = ident.substr(0, lastDot - start);\n this.index = peekIndex;\n break;\n }\n if (this.isWhitespace(ch)) {\n peekIndex++;\n } else {\n break;\n }\n }\n }\n\n this.tokens.push({\n index: start,\n text: ident,\n fn: CONSTANTS[ident] || getterFn(ident, this.options, expression)\n });\n\n if (methodName) {\n this.tokens.push({\n index: lastDot,\n text: '.'\n });\n this.tokens.push({\n index: lastDot + 1,\n text: methodName\n });\n }\n },\n\n readString: function(quote) {\n var start = this.index;\n this.index++;\n var string = '';\n var rawString = quote;\n var escape = false;\n while (this.index < this.text.length) {\n var ch = this.text.charAt(this.index);\n rawString += ch;\n if (escape) {\n if (ch === 'u') {\n var hex = this.text.substring(this.index + 1, this.index + 5);\n if (!hex.match(/[\\da-f]{4}/i))\n this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n this.index += 4;\n string += String.fromCharCode(parseInt(hex, 16));\n } else {\n var rep = ESCAPE[ch];\n string = string + (rep || ch);\n }\n escape = false;\n } else if (ch === '\\\\') {\n escape = true;\n } else if (ch === quote) {\n this.index++;\n this.tokens.push({\n index: start,\n text: rawString,\n string: string,\n constant: true,\n fn: function() { return string; }\n });\n return;\n } else {\n string += ch;\n }\n this.index++;\n }\n this.throwError('Unterminated quote', start);\n }\n};\n\n\nfunction isConstant(exp) {\n return exp.constant;\n}\n\n/**\n * @constructor\n */\nvar Parser = function (lexer, $filter, options) {\n this.lexer = lexer;\n this.$filter = $filter;\n this.options = options;\n};\n\nParser.ZERO = extend(function () {\n return 0;\n}, {\n sharedGetter: true,\n constant: true\n});\n\nParser.prototype = {\n constructor: Parser,\n\n parse: function (text) {\n this.text = text;\n this.tokens = this.lexer.lex(text);\n\n var value = this.statements();\n\n if (this.tokens.length !== 0) {\n this.throwError('is an unexpected token', this.tokens[0]);\n }\n\n value.literal = !!value.literal;\n value.constant = !!value.constant;\n\n return value;\n },\n\n primary: function () {\n var primary;\n if (this.expect('(')) {\n primary = this.filterChain();\n this.consume(')');\n } else if (this.expect('[')) {\n primary = this.arrayDeclaration();\n } else if (this.expect('{')) {\n primary = this.object();\n } else {\n var token = this.expect();\n primary = token.fn;\n if (!primary) {\n this.throwError('not a primary expression', token);\n }\n if (token.constant) {\n primary.constant = true;\n primary.literal = true;\n }\n }\n\n var next, context;\n while ((next = this.expect('(', '[', '.'))) {\n if (next.text === '(') {\n primary = this.functionCall(primary, context);\n context = null;\n } else if (next.text === '[') {\n context = primary;\n primary = this.objectIndex(primary);\n } else if (next.text === '.') {\n context = primary;\n primary = this.fieldAccess(primary);\n } else {\n this.throwError('IMPOSSIBLE');\n }\n }\n return primary;\n },\n\n throwError: function(msg, token) {\n throw $parseMinErr('syntax',\n 'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n },\n\n peekToken: function() {\n if (this.tokens.length === 0)\n throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n return this.tokens[0];\n },\n\n peek: function(e1, e2, e3, e4) {\n if (this.tokens.length > 0) {\n var token = this.tokens[0];\n var t = token.text;\n if (t === e1 || t === e2 || t === e3 || t === e4 ||\n (!e1 && !e2 && !e3 && !e4)) {\n return token;\n }\n }\n return false;\n },\n\n expect: function(e1, e2, e3, e4){\n var token = this.peek(e1, e2, e3, e4);\n if (token) {\n this.tokens.shift();\n return token;\n }\n return false;\n },\n\n consume: function(e1){\n if (!this.expect(e1)) {\n this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n }\n },\n\n unaryFn: function(fn, right) {\n return extend(function $parseUnaryFn(self, locals) {\n return fn(self, locals, right);\n }, {\n constant:right.constant,\n inputs: [right]\n });\n },\n\n binaryFn: function(left, fn, right, isBranching) {\n return extend(function $parseBinaryFn(self, locals) {\n return fn(self, locals, left, right);\n }, {\n constant: left.constant && right.constant,\n inputs: !isBranching && [left, right]\n });\n },\n\n statements: function() {\n var statements = [];\n while (true) {\n if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n statements.push(this.filterChain());\n if (!this.expect(';')) {\n // optimize for the common case where there is only one statement.\n // TODO(size): maybe we should not support multiple statements?\n return (statements.length === 1)\n ? statements[0]\n : function $parseStatements(self, locals) {\n var value;\n for (var i = 0, ii = statements.length; i < ii; i++) {\n value = statements[i](self, locals);\n }\n return value;\n };\n }\n }\n },\n\n filterChain: function() {\n var left = this.expression();\n var token;\n while ((token = this.expect('|'))) {\n left = this.filter(left);\n }\n return left;\n },\n\n filter: function(inputFn) {\n var token = this.expect();\n var fn = this.$filter(token.text);\n var argsFn;\n var args;\n\n if (this.peek(':')) {\n argsFn = [];\n args = []; // we can safely reuse the array\n while (this.expect(':')) {\n argsFn.push(this.expression());\n }\n }\n\n var inputs = [inputFn].concat(argsFn || []);\n\n return extend(function $parseFilter(self, locals) {\n var input = inputFn(self, locals);\n if (args) {\n args[0] = input;\n\n var i = argsFn.length;\n while (i--) {\n args[i + 1] = argsFn[i](self, locals);\n }\n\n return fn.apply(undefined, args);\n }\n\n return fn(input);\n }, {\n constant: !fn.$stateful && inputs.every(isConstant),\n inputs: !fn.$stateful && inputs\n });\n },\n\n expression: function() {\n return this.assignment();\n },\n\n assignment: function() {\n var left = this.ternary();\n var right;\n var token;\n if ((token = this.expect('='))) {\n if (!left.assign) {\n this.throwError('implies assignment but [' +\n this.text.substring(0, token.index) + '] can not be assigned to', token);\n }\n right = this.ternary();\n return extend(function $parseAssignment(scope, locals) {\n return left.assign(scope, right(scope, locals), locals);\n }, {\n inputs: [left, right]\n });\n }\n return left;\n },\n\n ternary: function() {\n var left = this.logicalOR();\n var middle;\n var token;\n if ((token = this.expect('?'))) {\n middle = this.assignment();\n if ((token = this.expect(':'))) {\n var right = this.assignment();\n\n return extend(function $parseTernary(self, locals){\n return left(self, locals) ? middle(self, locals) : right(self, locals);\n }, {\n constant: left.constant && middle.constant && right.constant\n });\n\n } else {\n this.throwError('expected :', token);\n }\n }\n\n return left;\n },\n\n logicalOR: function() {\n var left = this.logicalAND();\n var token;\n while ((token = this.expect('||'))) {\n left = this.binaryFn(left, token.fn, this.logicalAND(), true);\n }\n return left;\n },\n\n logicalAND: function() {\n var left = this.equality();\n var token;\n if ((token = this.expect('&&'))) {\n left = this.binaryFn(left, token.fn, this.logicalAND(), true);\n }\n return left;\n },\n\n equality: function() {\n var left = this.relational();\n var token;\n if ((token = this.expect('==','!=','===','!=='))) {\n left = this.binaryFn(left, token.fn, this.equality());\n }\n return left;\n },\n\n relational: function() {\n var left = this.additive();\n var token;\n if ((token = this.expect('<', '>', '<=', '>='))) {\n left = this.binaryFn(left, token.fn, this.relational());\n }\n return left;\n },\n\n additive: function() {\n var left = this.multiplicative();\n var token;\n while ((token = this.expect('+','-'))) {\n left = this.binaryFn(left, token.fn, this.multiplicative());\n }\n return left;\n },\n\n multiplicative: function() {\n var left = this.unary();\n var token;\n while ((token = this.expect('*','/','%'))) {\n left = this.binaryFn(left, token.fn, this.unary());\n }\n return left;\n },\n\n unary: function() {\n var token;\n if (this.expect('+')) {\n return this.primary();\n } else if ((token = this.expect('-'))) {\n return this.binaryFn(Parser.ZERO, token.fn, this.unary());\n } else if ((token = this.expect('!'))) {\n return this.unaryFn(token.fn, this.unary());\n } else {\n return this.primary();\n }\n },\n\n fieldAccess: function(object) {\n var expression = this.text;\n var field = this.expect().text;\n var getter = getterFn(field, this.options, expression);\n\n return extend(function $parseFieldAccess(scope, locals, self) {\n return getter(self || object(scope, locals));\n }, {\n assign: function(scope, value, locals) {\n var o = object(scope, locals);\n if (!o) object.assign(scope, o = {});\n return setter(o, field, value, expression);\n }\n });\n },\n\n objectIndex: function(obj) {\n var expression = this.text;\n\n var indexFn = this.expression();\n this.consume(']');\n\n return extend(function $parseObjectIndex(self, locals) {\n var o = obj(self, locals),\n i = indexFn(self, locals),\n v;\n\n ensureSafeMemberName(i, expression);\n if (!o) return undefined;\n v = ensureSafeObject(o[i], expression);\n return v;\n }, {\n assign: function(self, value, locals) {\n var key = ensureSafeMemberName(indexFn(self, locals), expression);\n // prevent overwriting of Function.constructor which would break ensureSafeObject check\n var o = ensureSafeObject(obj(self, locals), expression);\n if (!o) obj.assign(self, o = {});\n return o[key] = value;\n }\n });\n },\n\n functionCall: function(fnGetter, contextGetter) {\n var argsFn = [];\n if (this.peekToken().text !== ')') {\n do {\n argsFn.push(this.expression());\n } while (this.expect(','));\n }\n this.consume(')');\n\n var expressionText = this.text;\n // we can safely reuse the array across invocations\n var args = argsFn.length ? [] : null;\n\n return function $parseFunctionCall(scope, locals) {\n var context = contextGetter ? contextGetter(scope, locals) : scope;\n var fn = fnGetter(scope, locals, context) || noop;\n\n if (args) {\n var i = argsFn.length;\n while (i--) {\n args[i] = ensureSafeObject(argsFn[i](scope, locals), expressionText);\n }\n }\n\n ensureSafeObject(context, expressionText);\n ensureSafeFunction(fn, expressionText);\n\n // IE stupidity! (IE doesn't have apply for some native functions)\n var v = fn.apply\n ? fn.apply(context, args)\n : fn(args[0], args[1], args[2], args[3], args[4]);\n\n return ensureSafeObject(v, expressionText);\n };\n },\n\n // This is used with json array declaration\n arrayDeclaration: function () {\n var elementFns = [];\n if (this.peekToken().text !== ']') {\n do {\n if (this.peek(']')) {\n // Support trailing commas per ES5.1.\n break;\n }\n var elementFn = this.expression();\n elementFns.push(elementFn);\n } while (this.expect(','));\n }\n this.consume(']');\n\n return extend(function $parseArrayLiteral(self, locals) {\n var array = [];\n for (var i = 0, ii = elementFns.length; i < ii; i++) {\n array.push(elementFns[i](self, locals));\n }\n return array;\n }, {\n literal: true,\n constant: elementFns.every(isConstant),\n inputs: elementFns\n });\n },\n\n object: function () {\n var keys = [], valueFns = [];\n if (this.peekToken().text !== '}') {\n do {\n if (this.peek('}')) {\n // Support trailing commas per ES5.1.\n break;\n }\n var token = this.expect();\n keys.push(token.string || token.text);\n this.consume(':');\n var value = this.expression();\n valueFns.push(value);\n } while (this.expect(','));\n }\n this.consume('}');\n\n return extend(function $parseObjectLiteral(self, locals) {\n var object = {};\n for (var i = 0, ii = valueFns.length; i < ii; i++) {\n object[keys[i]] = valueFns[i](self, locals);\n }\n return object;\n }, {\n literal: true,\n constant: valueFns.every(isConstant),\n inputs: valueFns\n });\n }\n};\n\n\n//////////////////////////////////////////////////\n// Parser helper functions\n//////////////////////////////////////////////////\n\nfunction setter(obj, path, setValue, fullExp) {\n ensureSafeObject(obj, fullExp);\n\n var element = path.split('.'), key;\n for (var i = 0; element.length > 1; i++) {\n key = ensureSafeMemberName(element.shift(), fullExp);\n var propertyObj = ensureSafeObject(obj[key], fullExp);\n if (!propertyObj) {\n propertyObj = {};\n obj[key] = propertyObj;\n }\n obj = propertyObj;\n }\n key = ensureSafeMemberName(element.shift(), fullExp);\n ensureSafeObject(obj[key], fullExp);\n obj[key] = setValue;\n return setValue;\n}\n\nvar getterFnCache = createMap();\n\n/**\n * Implementation of the \"Black Hole\" variant from:\n * - http://jsperf.com/angularjs-parse-getter/4\n * - http://jsperf.com/path-evaluation-simplified/7\n */\nfunction cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp) {\n ensureSafeMemberName(key0, fullExp);\n ensureSafeMemberName(key1, fullExp);\n ensureSafeMemberName(key2, fullExp);\n ensureSafeMemberName(key3, fullExp);\n ensureSafeMemberName(key4, fullExp);\n\n return function cspSafeGetter(scope, locals) {\n var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope;\n\n if (pathVal == null) return pathVal;\n pathVal = pathVal[key0];\n\n if (!key1) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key1];\n\n if (!key2) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key2];\n\n if (!key3) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key3];\n\n if (!key4) return pathVal;\n if (pathVal == null) return undefined;\n pathVal = pathVal[key4];\n\n return pathVal;\n };\n}\n\nfunction getterFn(path, options, fullExp) {\n var fn = getterFnCache[path];\n\n if (fn) return fn;\n\n var pathKeys = path.split('.'),\n pathKeysLength = pathKeys.length;\n\n // http://jsperf.com/angularjs-parse-getter/6\n if (options.csp) {\n if (pathKeysLength < 6) {\n fn = cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4], fullExp);\n } else {\n fn = function cspSafeGetter(scope, locals) {\n var i = 0, val;\n do {\n val = cspSafeGetterFn(pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++],\n pathKeys[i++], fullExp)(scope, locals);\n\n locals = undefined; // clear after first iteration\n scope = val;\n } while (i < pathKeysLength);\n return val;\n };\n }\n } else {\n var code = '';\n forEach(pathKeys, function(key, index) {\n ensureSafeMemberName(key, fullExp);\n code += 'if(s == null) return undefined;\\n' +\n 's='+ (index\n // we simply dereference 's' on any .dot notation\n ? 's'\n // but if we are first then we check locals first, and if so read it first\n : '((l&&l.hasOwnProperty(\"' + key + '\"))?l:s)') + '.' + key + ';\\n';\n });\n code += 'return s;';\n\n /* jshint -W054 */\n var evaledFnGetter = new Function('s', 'l', code); // s=scope, l=locals\n /* jshint +W054 */\n evaledFnGetter.toString = valueFn(code);\n\n fn = evaledFnGetter;\n }\n\n fn.sharedGetter = true;\n fn.assign = function(self, value) {\n return setter(self, path, value, path);\n };\n getterFnCache[path] = fn;\n return fn;\n}\n\n///////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $parse\n * @kind function\n *\n * @description\n *\n * Converts Angular {@link guide/expression expression} into a function.\n *\n * ```js\n * var getter = $parse('user.name');\n * var setter = getter.assign;\n * var context = {user:{name:'angular'}};\n * var locals = {user:{name:'local'}};\n *\n * expect(getter(context)).toEqual('angular');\n * setter(context, 'newValue');\n * expect(context.user.name).toEqual('newValue');\n * expect(getter(context, locals)).toEqual('local');\n * ```\n *\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n *\n * The returned function also has the following properties:\n * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript\n * literal.\n * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript\n * constant literals.\n * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be\n * set to a function to change its value on the given context.\n *\n */\n\n\n/**\n * @ngdoc provider\n * @name $parseProvider\n *\n * @description\n * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n * service.\n */\nfunction $ParseProvider() {\n var cache = createMap();\n\n var $parseOptions = {\n csp: false\n };\n\n\n this.$get = ['$filter', '$sniffer', function($filter, $sniffer) {\n $parseOptions.csp = $sniffer.csp;\n\n function wrapSharedExpression(exp) {\n var wrapped = exp;\n\n if (exp.sharedGetter) {\n wrapped = function $parseWrapper(self, locals) {\n return exp(self, locals);\n };\n wrapped.literal = exp.literal;\n wrapped.constant = exp.constant;\n wrapped.assign = exp.assign;\n }\n\n return wrapped;\n }\n\n return function $parse(exp, interceptorFn) {\n var parsedExpression, oneTime, cacheKey;\n\n switch (typeof exp) {\n case 'string':\n cacheKey = exp = exp.trim();\n\n parsedExpression = cache[cacheKey];\n\n if (!parsedExpression) {\n if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {\n oneTime = true;\n exp = exp.substring(2);\n }\n\n var lexer = new Lexer($parseOptions);\n var parser = new Parser(lexer, $filter, $parseOptions);\n parsedExpression = parser.parse(exp);\n\n if (parsedExpression.constant) {\n parsedExpression.$$watchDelegate = constantWatchDelegate;\n } else if (oneTime) {\n //oneTime is not part of the exp passed to the Parser so we may have to\n //wrap the parsedExpression before adding a $$watchDelegate\n parsedExpression = wrapSharedExpression(parsedExpression);\n parsedExpression.$$watchDelegate = parsedExpression.literal ?\n oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;\n } else if (parsedExpression.inputs) {\n parsedExpression.$$watchDelegate = inputsWatchDelegate;\n }\n\n cache[cacheKey] = parsedExpression;\n }\n return addInterceptor(parsedExpression, interceptorFn);\n\n case 'function':\n return addInterceptor(exp, interceptorFn);\n\n default:\n return addInterceptor(noop, interceptorFn);\n }\n };\n\n function collectExpressionInputs(inputs, list) {\n for (var i = 0, ii = inputs.length; i < ii; i++) {\n var input = inputs[i];\n if (!input.constant) {\n if (input.inputs) {\n collectExpressionInputs(input.inputs, list);\n } else if (list.indexOf(input) === -1) { // TODO(perf) can we do better?\n list.push(input);\n }\n }\n }\n\n return list;\n }\n\n function expressionInputDirtyCheck(newValue, oldValueOfValue) {\n\n if (newValue == null || oldValueOfValue == null) { // null/undefined\n return newValue === oldValueOfValue;\n }\n\n if (typeof newValue === 'object') {\n\n // attempt to convert the value to a primitive type\n // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can\n // be cheaply dirty-checked\n newValue = newValue.valueOf();\n\n if (typeof newValue === 'object') {\n // objects/arrays are not supported - deep-watching them would be too expensive\n return false;\n }\n\n // fall-through to the primitive equality check\n }\n\n //Primitive or NaN\n return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);\n }\n\n function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var inputExpressions = parsedExpression.$$inputs ||\n (parsedExpression.$$inputs = collectExpressionInputs(parsedExpression.inputs, []));\n\n var lastResult;\n\n if (inputExpressions.length === 1) {\n var oldInputValue = expressionInputDirtyCheck; // init to something unique so that equals check fails\n inputExpressions = inputExpressions[0];\n return scope.$watch(function expressionInputWatch(scope) {\n var newInputValue = inputExpressions(scope);\n if (!expressionInputDirtyCheck(newInputValue, oldInputValue)) {\n lastResult = parsedExpression(scope);\n oldInputValue = newInputValue && newInputValue.valueOf();\n }\n return lastResult;\n }, listener, objectEquality);\n }\n\n var oldInputValueOfValues = [];\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails\n }\n\n return scope.$watch(function expressionInputsWatch(scope) {\n var changed = false;\n\n for (var i = 0, ii = inputExpressions.length; i < ii; i++) {\n var newInputValue = inputExpressions[i](scope);\n if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) {\n oldInputValueOfValues[i] = newInputValue && newInputValue.valueOf();\n }\n }\n\n if (changed) {\n lastResult = parsedExpression(scope);\n }\n\n return lastResult;\n }, listener, objectEquality);\n }\n\n function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch, lastValue;\n return unwatch = scope.$watch(function oneTimeWatch(scope) {\n return parsedExpression(scope);\n }, function oneTimeListener(value, old, scope) {\n lastValue = value;\n if (isFunction(listener)) {\n listener.apply(this, arguments);\n }\n if (isDefined(value)) {\n scope.$$postDigest(function () {\n if (isDefined(lastValue)) {\n unwatch();\n }\n });\n }\n }, objectEquality);\n }\n\n function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch;\n return unwatch = scope.$watch(function oneTimeWatch(scope) {\n return parsedExpression(scope);\n }, function oneTimeListener(value, old, scope) {\n if (isFunction(listener)) {\n listener.call(this, value, old, scope);\n }\n if (isAllDefined(value)) {\n scope.$$postDigest(function () {\n if(isAllDefined(value)) unwatch();\n });\n }\n }, objectEquality);\n\n function isAllDefined(value) {\n var allDefined = true;\n forEach(value, function (val) {\n if (!isDefined(val)) allDefined = false;\n });\n return allDefined;\n }\n }\n\n function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {\n var unwatch;\n return unwatch = scope.$watch(function constantWatch(scope) {\n return parsedExpression(scope);\n }, function constantListener(value, old, scope) {\n if (isFunction(listener)) {\n listener.apply(this, arguments);\n }\n unwatch();\n }, objectEquality);\n }\n\n function addInterceptor(parsedExpression, interceptorFn) {\n if (!interceptorFn) return parsedExpression;\n\n var fn = function interceptedExpression(scope, locals) {\n var value = parsedExpression(scope, locals);\n var result = interceptorFn(value, scope, locals);\n // we only return the interceptor's result if the\n // initial value is defined (for bind-once)\n return isDefined(value) ? result : value;\n };\n\n // Propagate $$watchDelegates other then inputsWatchDelegate\n if (parsedExpression.$$watchDelegate &&\n parsedExpression.$$watchDelegate !== inputsWatchDelegate) {\n fn.$$watchDelegate = parsedExpression.$$watchDelegate;\n } else if (!interceptorFn.$stateful) {\n // If there is an interceptor, but no watchDelegate then treat the interceptor like\n // we treat filters - it is assumed to be a pure function unless flagged with $stateful\n fn.$$watchDelegate = inputsWatchDelegate;\n fn.inputs = [parsedExpression];\n }\n\n return fn;\n }\n }];\n}\n\n/**\n * @ngdoc service\n * @name $q\n * @requires $rootScope\n *\n * @description\n * A promise/deferred implementation inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).\n *\n * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred\n * implementations, and the other which resembles ES6 promises to some degree.\n *\n * # $q constructor\n *\n * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`\n * function as the first argument. This is similar to the native Promise implementation from ES6 Harmony,\n * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n *\n * While the constructor-style use is supported, not all of the supporting methods from ES6 Harmony promises are\n * available yet.\n *\n * It can be used like so:\n *\n * ```js\n * return $q(function(resolve, reject) {\n * // perform some asynchronous operation, resolve or reject the promise when appropriate.\n * setInterval(function() {\n * if (pollStatus > 0) {\n * resolve(polledValue);\n * } else if (pollStatus < 0) {\n * reject(polledValue);\n * } else {\n * pollStatus = pollAgain(function(value) {\n * polledValue = value;\n * });\n * }\n * }, 10000);\n * }).\n * then(function(value) {\n * // handle success\n * }, function(reason) {\n * // handle failure\n * });\n * ```\n *\n * Note: progress/notify callbacks are not currently supported via the ES6-style interface.\n *\n * However, the more traditional CommonJS-style usage is still available, and documented below.\n *\n * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n * interface for interacting with an object that represents the result of an action that is\n * performed asynchronously, and may or may not be finished at any given point in time.\n *\n * From the perspective of dealing with error handling, deferred and promise APIs are to\n * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n *\n * ```js\n * // for the purpose of this example let's assume that variables `$q`, `scope` and `okToGreet`\n * // are available in the current lexical scope (they could have been injected or passed in).\n *\n * function asyncGreet(name) {\n * var deferred = $q.defer();\n *\n * setTimeout(function() {\n * deferred.notify('About to greet ' + name + '.');\n *\n * if (okToGreet(name)) {\n * deferred.resolve('Hello, ' + name + '!');\n * } else {\n * deferred.reject('Greeting ' + name + ' is not allowed.');\n * }\n * }, 1000);\n *\n * return deferred.promise;\n * }\n *\n * var promise = asyncGreet('Robin Hood');\n * promise.then(function(greeting) {\n * alert('Success: ' + greeting);\n * }, function(reason) {\n * alert('Failed: ' + reason);\n * }, function(update) {\n * alert('Got notification: ' + update);\n * });\n * ```\n *\n * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n * comes in the way of guarantees that promise and deferred APIs make, see\n * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n *\n * Additionally the promise api allows for composition that is very hard to do with the\n * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n * section on serial or parallel joining of promises.\n *\n * # The Deferred API\n *\n * A new instance of deferred is constructed by calling `$q.defer()`.\n *\n * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n * that can be used for signaling the successful or unsuccessful completion, as well as the status\n * of the task.\n *\n * **Methods**\n *\n * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection\n * constructed via `$q.reject`, the promise will be rejected instead.\n * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to\n * resolving it with a rejection constructed via `$q.reject`.\n * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n * multiple times before the promise is either resolved or rejected.\n *\n * **Properties**\n *\n * - promise – `{Promise}` – promise object associated with this deferred.\n *\n *\n * # The Promise API\n *\n * A new promise instance is created when a deferred instance is created and can be retrieved by\n * calling `deferred.promise`.\n *\n * The purpose of the promise object is to allow for interested parties to get access to the result\n * of the deferred task when it completes.\n *\n * **Methods**\n *\n * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or\n * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n * as soon as the result is available. The callbacks are called with a single argument: the result\n * or rejection reason. Additionally, the notify callback may be called zero or more times to\n * provide a progress indication, before the promise is resolved or rejected.\n *\n * This method *returns a new promise* which is resolved or rejected via the return value of the\n * `successCallback`, `errorCallback`. It also notifies via the return value of the\n * `notifyCallback` method. The promise cannot be resolved or rejected from the notifyCallback\n * method.\n *\n * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`\n *\n * - `finally(callback)` – allows you to observe either the fulfillment or rejection of a promise,\n * but to do so without modifying the final value. This is useful to release resources or do some\n * clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n * more information.\n *\n * Because `finally` is a reserved word in JavaScript and reserved keywords are not supported as\n * property names by ES3, you'll need to invoke the method like `promise['finally'](callback)` to\n * make your code IE8 and Android 2.x compatible.\n *\n * # Chaining promises\n *\n * Because calling the `then` method of a promise returns a new derived promise, it is easily\n * possible to create a chain of promises:\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * return result + 1;\n * });\n *\n * // promiseB will be resolved immediately after promiseA is resolved and its value\n * // will be the result of promiseA incremented by 1\n * ```\n *\n * It is possible to create chains of any length and since a promise can be resolved with another\n * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n * $http's response interceptors.\n *\n *\n * # Differences between Kris Kowal's Q and $q\n *\n * There are two main differences:\n *\n * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n * mechanism in angular, which means faster propagation of resolution or rejection into your\n * models and avoiding unnecessary browser repaints, which would result in flickering UI.\n * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n * all the important functionality needed for common async tasks.\n *\n * # Testing\n *\n * ```js\n * it('should simulate promise', inject(function($q, $rootScope) {\n * var deferred = $q.defer();\n * var promise = deferred.promise;\n * var resolvedValue;\n *\n * promise.then(function(value) { resolvedValue = value; });\n * expect(resolvedValue).toBeUndefined();\n *\n * // Simulate resolving of promise\n * deferred.resolve(123);\n * // Note that the 'then' function does not get called synchronously.\n * // This is because we want the promise API to always be async, whether or not\n * // it got called synchronously or asynchronously.\n * expect(resolvedValue).toBeUndefined();\n *\n * // Propagate promise resolution to 'then' functions using $apply().\n * $rootScope.$apply();\n * expect(resolvedValue).toEqual(123);\n * }));\n * ```\n *\n * @param {function(function, function)} resolver Function which is responsible for resolving or\n * rejecting the newly created promise. The first parameter is a function which resolves the\n * promise, the second parameter is a function which rejects the promise.\n *\n * @returns {Promise} The newly created promise.\n */\nfunction $QProvider() {\n\n this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n return qFactory(function(callback) {\n $rootScope.$evalAsync(callback);\n }, $exceptionHandler);\n }];\n}\n\nfunction $$QProvider() {\n this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {\n return qFactory(function(callback) {\n $browser.defer(callback);\n }, $exceptionHandler);\n }];\n}\n\n/**\n * Constructs a promise manager.\n *\n * @param {function(function)} nextTick Function for executing functions in the next turn.\n * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n * debugging purposes.\n * @returns {object} Promise manager.\n */\nfunction qFactory(nextTick, exceptionHandler) {\n var $qMinErr = minErr('$q', TypeError);\n function callOnce(self, resolveFn, rejectFn) {\n var called = false;\n function wrap(fn) {\n return function(value) {\n if (called) return;\n called = true;\n fn.call(self, value);\n };\n }\n\n return [wrap(resolveFn), wrap(rejectFn)];\n }\n\n /**\n * @ngdoc method\n * @name ng.$q#defer\n * @kind function\n *\n * @description\n * Creates a `Deferred` object which represents a task which will finish in the future.\n *\n * @returns {Deferred} Returns a new instance of deferred.\n */\n var defer = function() {\n return new Deferred();\n };\n\n function Promise() {\n this.$$state = { status: 0 };\n }\n\n Promise.prototype = {\n then: function(onFulfilled, onRejected, progressBack) {\n var result = new Deferred();\n\n this.$$state.pending = this.$$state.pending || [];\n this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);\n if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);\n\n return result.promise;\n },\n\n \"catch\": function(callback) {\n return this.then(null, callback);\n },\n\n \"finally\": function(callback, progressBack) {\n return this.then(function(value) {\n return handleCallback(value, true, callback);\n }, function(error) {\n return handleCallback(error, false, callback);\n }, progressBack);\n }\n };\n\n //Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native\n function simpleBind(context, fn) {\n return function(value) {\n fn.call(context, value);\n };\n }\n\n function processQueue(state) {\n var fn, promise, pending;\n\n pending = state.pending;\n state.processScheduled = false;\n state.pending = undefined;\n for (var i = 0, ii = pending.length; i < ii; ++i) {\n promise = pending[i][0];\n fn = pending[i][state.status];\n try {\n if (isFunction(fn)) {\n promise.resolve(fn(state.value));\n } else if (state.status === 1) {\n promise.resolve(state.value);\n } else {\n promise.reject(state.value);\n }\n } catch(e) {\n promise.reject(e);\n exceptionHandler(e);\n }\n }\n }\n\n function scheduleProcessQueue(state) {\n if (state.processScheduled || !state.pending) return;\n state.processScheduled = true;\n nextTick(function() { processQueue(state); });\n }\n\n function Deferred() {\n this.promise = new Promise();\n //Necessary to support unbound execution :/\n this.resolve = simpleBind(this, this.resolve);\n this.reject = simpleBind(this, this.reject);\n this.notify = simpleBind(this, this.notify);\n }\n\n Deferred.prototype = {\n resolve: function(val) {\n if (this.promise.$$state.status) return;\n if (val === this.promise) {\n this.$$reject($qMinErr(\n 'qcycle',\n \"Expected promise to be resolved with value other than itself '{0}'\",\n val));\n }\n else {\n this.$$resolve(val);\n }\n\n },\n\n $$resolve: function(val) {\n var then, fns;\n\n fns = callOnce(this, this.$$resolve, this.$$reject);\n try {\n if ((isObject(val) || isFunction(val))) then = val && val.then;\n if (isFunction(then)) {\n this.promise.$$state.status = -1;\n then.call(val, fns[0], fns[1], this.notify);\n } else {\n this.promise.$$state.value = val;\n this.promise.$$state.status = 1;\n scheduleProcessQueue(this.promise.$$state);\n }\n } catch(e) {\n fns[1](e);\n exceptionHandler(e);\n }\n },\n\n reject: function(reason) {\n if (this.promise.$$state.status) return;\n this.$$reject(reason);\n },\n\n $$reject: function(reason) {\n this.promise.$$state.value = reason;\n this.promise.$$state.status = 2;\n scheduleProcessQueue(this.promise.$$state);\n },\n\n notify: function(progress) {\n var callbacks = this.promise.$$state.pending;\n\n if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) {\n nextTick(function() {\n var callback, result;\n for (var i = 0, ii = callbacks.length; i < ii; i++) {\n result = callbacks[i][0];\n callback = callbacks[i][3];\n try {\n result.notify(isFunction(callback) ? callback(progress) : progress);\n } catch(e) {\n exceptionHandler(e);\n }\n }\n });\n }\n }\n };\n\n /**\n * @ngdoc method\n * @name $q#reject\n * @kind function\n *\n * @description\n * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n * a promise chain, you don't need to worry about it.\n *\n * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n * a promise error callback and you want to forward the error to the promise derived from the\n * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n * `reject`.\n *\n * ```js\n * promiseB = promiseA.then(function(result) {\n * // success: do something and resolve promiseB\n * // with the old or a new result\n * return result;\n * }, function(reason) {\n * // error: handle the error if possible and\n * // resolve promiseB with newPromiseOrValue,\n * // otherwise forward the rejection to promiseB\n * if (canHandle(reason)) {\n * // handle the error and recover\n * return newPromiseOrValue;\n * }\n * return $q.reject(reason);\n * });\n * ```\n *\n * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n */\n var reject = function(reason) {\n var result = new Deferred();\n result.reject(reason);\n return result.promise;\n };\n\n var makePromise = function makePromise(value, resolved) {\n var result = new Deferred();\n if (resolved) {\n result.resolve(value);\n } else {\n result.reject(value);\n }\n return result.promise;\n };\n\n var handleCallback = function handleCallback(value, isResolved, callback) {\n var callbackOutput = null;\n try {\n if (isFunction(callback)) callbackOutput = callback();\n } catch(e) {\n return makePromise(e, false);\n }\n if (isPromiseLike(callbackOutput)) {\n return callbackOutput.then(function() {\n return makePromise(value, isResolved);\n }, function(error) {\n return makePromise(error, false);\n });\n } else {\n return makePromise(value, isResolved);\n }\n };\n\n /**\n * @ngdoc method\n * @name $q#when\n * @kind function\n *\n * @description\n * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n * This is useful when you are dealing with an object that might or might not be a promise, or if\n * the promise comes from a source that can't be trusted.\n *\n * @param {*} value Value or a promise\n * @returns {Promise} Returns a promise of the passed value or promise\n */\n\n\n var when = function(value, callback, errback, progressBack) {\n var result = new Deferred();\n result.resolve(value);\n return result.promise.then(callback, errback, progressBack);\n };\n\n /**\n * @ngdoc method\n * @name $q#all\n * @kind function\n *\n * @description\n * Combines multiple promises into a single promise that is resolved when all of the input\n * promises are resolved.\n *\n * @param {Array.|Object.} promises An array or hash of promises.\n * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n * each value corresponding to the promise at the same index/key in the `promises` array/hash.\n * If any of the promises is resolved with a rejection, this resulting promise will be rejected\n * with the same rejection value.\n */\n\n function all(promises) {\n var deferred = new Deferred(),\n counter = 0,\n results = isArray(promises) ? [] : {};\n\n forEach(promises, function(promise, key) {\n counter++;\n when(promise).then(function(value) {\n if (results.hasOwnProperty(key)) return;\n results[key] = value;\n if (!(--counter)) deferred.resolve(results);\n }, function(reason) {\n if (results.hasOwnProperty(key)) return;\n deferred.reject(reason);\n });\n });\n\n if (counter === 0) {\n deferred.resolve(results);\n }\n\n return deferred.promise;\n }\n\n var $Q = function Q(resolver) {\n if (!isFunction(resolver)) {\n throw $qMinErr('norslvr', \"Expected resolverFn, got '{0}'\", resolver);\n }\n\n if (!(this instanceof Q)) {\n // More useful when $Q is the Promise itself.\n return new Q(resolver);\n }\n\n var deferred = new Deferred();\n\n function resolveFn(value) {\n deferred.resolve(value);\n }\n\n function rejectFn(reason) {\n deferred.reject(reason);\n }\n\n resolver(resolveFn, rejectFn);\n\n return deferred.promise;\n };\n\n $Q.defer = defer;\n $Q.reject = reject;\n $Q.when = when;\n $Q.all = all;\n\n return $Q;\n}\n\nfunction $$RAFProvider(){ //rAF\n this.$get = ['$window', '$timeout', function($window, $timeout) {\n var requestAnimationFrame = $window.requestAnimationFrame ||\n $window.webkitRequestAnimationFrame ||\n $window.mozRequestAnimationFrame;\n\n var cancelAnimationFrame = $window.cancelAnimationFrame ||\n $window.webkitCancelAnimationFrame ||\n $window.mozCancelAnimationFrame ||\n $window.webkitCancelRequestAnimationFrame;\n\n var rafSupported = !!requestAnimationFrame;\n var raf = rafSupported\n ? function(fn) {\n var id = requestAnimationFrame(fn);\n return function() {\n cancelAnimationFrame(id);\n };\n }\n : function(fn) {\n var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666\n return function() {\n $timeout.cancel(timer);\n };\n };\n\n raf.supported = rafSupported;\n\n return raf;\n }];\n}\n\n/**\n * DESIGN NOTES\n *\n * The design decisions behind the scope are heavily favored for speed and memory consumption.\n *\n * The typical use of scope is to watch the expressions, which most of the time return the same\n * value as last time so we optimize the operation.\n *\n * Closures construction is expensive in terms of speed as well as memory:\n * - No closures, instead use prototypical inheritance for API\n * - Internal state needs to be stored on scope directly, which means that private state is\n * exposed as $$____ properties\n *\n * Loop operations are optimized by using while(count--) { ... }\n * - this means that in order to keep the same order of execution as addition we have to add\n * items to the array at the beginning (unshift) instead of at the end (push)\n *\n * Child scopes are created and removed often\n * - Using an array would be slow since inserts in middle are expensive so we use linked list\n *\n * There are few watches then a lot of observers. This is why you don't want the observer to be\n * implemented in the same way as watch. Watch requires return of initialization function which\n * are expensive to construct.\n */\n\n\n/**\n * @ngdoc provider\n * @name $rootScopeProvider\n * @description\n *\n * Provider for the $rootScope service.\n */\n\n/**\n * @ngdoc method\n * @name $rootScopeProvider#digestTtl\n * @description\n *\n * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that the dependencies between `$watch`s will result in\n * several digest iterations. However if an application needs more than the default 10 digest\n * iterations for its model to stabilize then you should investigate what is causing the model to\n * continuously change during the digest.\n *\n * Increasing the TTL could have performance implications, so you should not change it without\n * proper justification.\n *\n * @param {number} limit The number of digest iterations.\n */\n\n\n/**\n * @ngdoc service\n * @name $rootScope\n * @description\n *\n * Every application has a single root {@link ng.$rootScope.Scope scope}.\n * All other scopes are descendant scopes of the root scope. Scopes provide separation\n * between the model and the view, via a mechanism for watching the model for changes.\n * They also provide an event emission/broadcast and subscription facility. See the\n * {@link guide/scope developer guide on scopes}.\n */\nfunction $RootScopeProvider(){\n var TTL = 10;\n var $rootScopeMinErr = minErr('$rootScope');\n var lastDirtyWatch = null;\n var applyAsyncId = null;\n\n this.digestTtl = function(value) {\n if (arguments.length) {\n TTL = value;\n }\n return TTL;\n };\n\n this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',\n function( $injector, $exceptionHandler, $parse, $browser) {\n\n /**\n * @ngdoc type\n * @name $rootScope.Scope\n *\n * @description\n * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n * {@link auto.$injector $injector}. Child scopes are created using the\n * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when\n * compiled HTML template is executed.)\n *\n * Here is a simple scope snippet to show how you can interact with the scope.\n * ```html\n * \n * ```\n *\n * # Inheritance\n * A scope can inherit from a parent scope, as in this example:\n * ```js\n var parent = $rootScope;\n var child = parent.$new();\n\n parent.salutation = \"Hello\";\n child.name = \"World\";\n expect(child.salutation).toEqual('Hello');\n\n child.salutation = \"Welcome\";\n expect(child.salutation).toEqual('Welcome');\n expect(parent.salutation).toEqual('Hello');\n * ```\n *\n *\n * @param {Object.=} providers Map of service factory which need to be\n * provided for the current scope. Defaults to {@link ng}.\n * @param {Object.=} instanceCache Provides pre-instantiated services which should\n * append/override services provided by `providers`. This is handy\n * when unit-testing and having the need to override a default\n * service.\n * @returns {Object} Newly created scope.\n *\n */\n function Scope() {\n this.$id = nextUid();\n this.$$phase = this.$parent = this.$$watchers =\n this.$$nextSibling = this.$$prevSibling =\n this.$$childHead = this.$$childTail = null;\n this['this'] = this.$root = this;\n this.$$destroyed = false;\n this.$$asyncQueue = [];\n this.$$postDigestQueue = [];\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$$isolateBindings = null;\n this.$$applyAsyncQueue = [];\n }\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$id\n *\n * @description\n * Unique scope ID (monotonically increasing) useful for debugging.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$parent\n *\n * @description\n * Reference to the parent scope.\n */\n\n /**\n * @ngdoc property\n * @name $rootScope.Scope#$root\n *\n * @description\n * Reference to the root scope.\n */\n\n Scope.prototype = {\n constructor: Scope,\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$new\n * @kind function\n *\n * @description\n * Creates a new child {@link ng.$rootScope.Scope scope}.\n *\n * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.\n * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.\n *\n * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is\n * desired for the scope and its child scopes to be permanently detached from the parent and\n * thus stop participating in model change detection and listener notification by invoking.\n *\n * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n * parent scope. The scope is isolated, as it can not see parent scope properties.\n * When creating widgets, it is useful for the widget to not accidentally read parent\n * state.\n *\n * @returns {Object} The newly created child scope.\n *\n */\n $new: function(isolate) {\n var child;\n\n if (isolate) {\n child = new Scope();\n child.$root = this.$root;\n // ensure that there is just one async queue per $rootScope and its children\n child.$$asyncQueue = this.$$asyncQueue;\n child.$$postDigestQueue = this.$$postDigestQueue;\n } else {\n // Only create a child scope class if somebody asks for one,\n // but cache it to allow the VM to optimize lookups.\n if (!this.$$ChildScope) {\n this.$$ChildScope = function ChildScope() {\n this.$$watchers = this.$$nextSibling =\n this.$$childHead = this.$$childTail = null;\n this.$$listeners = {};\n this.$$listenerCount = {};\n this.$id = nextUid();\n this.$$ChildScope = null;\n };\n this.$$ChildScope.prototype = this;\n }\n child = new this.$$ChildScope();\n }\n child['this'] = child;\n child.$parent = this;\n child.$$prevSibling = this.$$childTail;\n if (this.$$childHead) {\n this.$$childTail.$$nextSibling = child;\n this.$$childTail = child;\n } else {\n this.$$childHead = this.$$childTail = child;\n }\n return child;\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watch\n * @kind function\n *\n * @description\n * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n *\n * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest\n * $digest()} and should return the value that will be watched. (Since\n * {@link ng.$rootScope.Scope#$digest $digest()} reruns when it detects changes the\n * `watchExpression` can execute multiple times per\n * {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)\n * - The `listener` is called only when the value from the current `watchExpression` and the\n * previous call to `watchExpression` are not equal (with the exception of the initial run,\n * see below). Inequality is determined according to reference inequality,\n * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)\n * via the `!==` Javascript operator, unless `objectEquality == true`\n * (see next point)\n * - When `objectEquality == true`, inequality of the `watchExpression` is determined\n * according to the {@link angular.equals} function. To save the value of the object for\n * later comparison, the {@link angular.copy} function is used. This therefore means that\n * watching complex objects will have adverse memory and performance implications.\n * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n * This is achieved by rerunning the watchers until no changes are detected. The rerun\n * iteration limit is 10 to prevent an infinite loop deadlock.\n *\n *\n * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,\n * you can register a `watchExpression` function with no `listener`. (Since `watchExpression`\n * can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a\n * change is detected, be prepared for multiple calls to your listener.)\n *\n * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the\n * watcher. In rare cases, this is undesirable because the listener is called when the result\n * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n * listener was called due to initialization.\n *\n *\n *\n * # Example\n * ```js\n // let's assume that scope was dependency injected as the $rootScope\n var scope = $rootScope;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n\n\n\n // Using a function as a watchExpression\n var food;\n scope.foodCounter = 0;\n expect(scope.foodCounter).toEqual(0);\n scope.$watch(\n // This function returns the value being watched. It is called for each turn of the $digest loop\n function() { return food; },\n // This is the change listener, called when the value returned from the above function changes\n function(newValue, oldValue) {\n if ( newValue !== oldValue ) {\n // Only increment the counter if the value changed\n scope.foodCounter = scope.foodCounter + 1;\n }\n }\n );\n // No digest has been run so the counter will be zero\n expect(scope.foodCounter).toEqual(0);\n\n // Run the digest but since food has not changed count will still be zero\n scope.$digest();\n expect(scope.foodCounter).toEqual(0);\n\n // Update food and run digest. Now the counter will increment\n food = 'cheeseburger';\n scope.$digest();\n expect(scope.foodCounter).toEqual(1);\n\n * ```\n *\n *\n *\n * @param {(function()|string)} watchExpression Expression that is evaluated on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers\n * a call to the `listener`.\n *\n * - `string`: Evaluated as {@link guide/expression expression}\n * - `function(scope)`: called with current `scope` as a parameter.\n * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value\n * of `watchExpression` changes.\n *\n * - `newVal` contains the current value of the `watchExpression`\n * - `oldVal` contains the previous value of the `watchExpression`\n * - `scope` refers to the current scope\n * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of\n * comparing for reference equality.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $watch: function(watchExp, listener, objectEquality) {\n var get = $parse(watchExp);\n\n if (get.$$watchDelegate) {\n return get.$$watchDelegate(this, listener, objectEquality, get);\n }\n var scope = this,\n array = scope.$$watchers,\n watcher = {\n fn: listener,\n last: initWatchVal,\n get: get,\n exp: watchExp,\n eq: !!objectEquality\n };\n\n lastDirtyWatch = null;\n\n if (!isFunction(listener)) {\n watcher.fn = noop;\n }\n\n if (!array) {\n array = scope.$$watchers = [];\n }\n // we use unshift since we use a while loop in $digest for speed.\n // the while loop reads in reverse order.\n array.unshift(watcher);\n\n return function deregisterWatch() {\n arrayRemove(array, watcher);\n lastDirtyWatch = null;\n };\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchGroup\n * @kind function\n *\n * @description\n * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.\n * If any one expression in the collection changes the `listener` is executed.\n *\n * - The items in the `watchExpressions` array are observed via standard $watch operation and are examined on every\n * call to $digest() to see if any items changes.\n * - The `listener` is called whenever any expression in the `watchExpressions` array changes.\n *\n * @param {Array.} watchExpressions Array of expressions that will be individually\n * watched using {@link ng.$rootScope.Scope#$watch $watch()}\n *\n * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any\n * expression in `watchExpressions` changes\n * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching\n * those of `watchExpression`\n * The `scope` refers to the current scope.\n * @returns {function()} Returns a de-registration function for all listeners.\n */\n $watchGroup: function(watchExpressions, listener) {\n var oldValues = new Array(watchExpressions.length);\n var newValues = new Array(watchExpressions.length);\n var deregisterFns = [];\n var self = this;\n var changeReactionScheduled = false;\n var firstRun = true;\n\n if (!watchExpressions.length) {\n // No expressions means we call the listener ASAP\n var shouldCall = true;\n self.$evalAsync(function () {\n if (shouldCall) listener(newValues, newValues, self);\n });\n return function deregisterWatchGroup() {\n shouldCall = false;\n };\n }\n\n if (watchExpressions.length === 1) {\n // Special case size of one\n return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {\n newValues[0] = value;\n oldValues[0] = oldValue;\n listener(newValues, (value === oldValue) ? newValues : oldValues, scope);\n });\n }\n\n forEach(watchExpressions, function (expr, i) {\n var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) {\n newValues[i] = value;\n oldValues[i] = oldValue;\n if (!changeReactionScheduled) {\n changeReactionScheduled = true;\n self.$evalAsync(watchGroupAction);\n }\n });\n deregisterFns.push(unwatchFn);\n });\n\n function watchGroupAction() {\n changeReactionScheduled = false;\n\n if (firstRun) {\n firstRun = false;\n listener(newValues, newValues, self);\n } else {\n listener(newValues, oldValues, self);\n }\n }\n\n return function deregisterWatchGroup() {\n while (deregisterFns.length) {\n deregisterFns.shift()();\n }\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$watchCollection\n * @kind function\n *\n * @description\n * Shallow watches the properties of an object and fires whenever any of the properties change\n * (for arrays, this implies watching the array items; for object maps, this implies watching\n * the properties). If a change is detected, the `listener` callback is fired.\n *\n * - The `obj` collection is observed via standard $watch operation and is examined on every\n * call to $digest() to see if any items have been added, removed, or moved.\n * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n * adding, removing, and moving items belonging to an object or array.\n *\n *\n * # Example\n * ```js\n $scope.names = ['igor', 'matias', 'misko', 'james'];\n $scope.dataCount = 4;\n\n $scope.$watchCollection('names', function(newNames, oldNames) {\n $scope.dataCount = newNames.length;\n });\n\n expect($scope.dataCount).toEqual(4);\n $scope.$digest();\n\n //still at 4 ... no changes\n expect($scope.dataCount).toEqual(4);\n\n $scope.names.pop();\n $scope.$digest();\n\n //now there's been a change\n expect($scope.dataCount).toEqual(3);\n * ```\n *\n *\n * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The\n * expression value should evaluate to an object or an array which is observed on each\n * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the\n * collection will trigger a call to the `listener`.\n *\n * @param {function(newCollection, oldCollection, scope)} listener a callback function called\n * when a change is detected.\n * - The `newCollection` object is the newly modified data obtained from the `obj` expression\n * - The `oldCollection` object is a copy of the former collection data.\n * Due to performance considerations, the`oldCollection` value is computed only if the\n * `listener` function declares two or more arguments.\n * - The `scope` argument refers to the current scope.\n *\n * @returns {function()} Returns a de-registration function for this listener. When the\n * de-registration function is executed, the internal watch operation is terminated.\n */\n $watchCollection: function(obj, listener) {\n $watchCollectionInterceptor.$stateful = true;\n\n var self = this;\n // the current value, updated on each dirty-check run\n var newValue;\n // a shallow copy of the newValue from the last dirty-check run,\n // updated to match newValue during dirty-check run\n var oldValue;\n // a shallow copy of the newValue from when the last change happened\n var veryOldValue;\n // only track veryOldValue if the listener is asking for it\n var trackVeryOldValue = (listener.length > 1);\n var changeDetected = 0;\n var changeDetector = $parse(obj, $watchCollectionInterceptor);\n var internalArray = [];\n var internalObject = {};\n var initRun = true;\n var oldLength = 0;\n\n function $watchCollectionInterceptor(_value) {\n newValue = _value;\n var newLength, key, bothNaN, newItem, oldItem;\n\n if (!isObject(newValue)) { // if primitive\n if (oldValue !== newValue) {\n oldValue = newValue;\n changeDetected++;\n }\n } else if (isArrayLike(newValue)) {\n if (oldValue !== internalArray) {\n // we are transitioning from something which was not an array into array.\n oldValue = internalArray;\n oldLength = oldValue.length = 0;\n changeDetected++;\n }\n\n newLength = newValue.length;\n\n if (oldLength !== newLength) {\n // if lengths do not match we need to trigger change notification\n changeDetected++;\n oldValue.length = oldLength = newLength;\n }\n // copy the items to oldValue and look for changes.\n for (var i = 0; i < newLength; i++) {\n oldItem = oldValue[i];\n newItem = newValue[i];\n\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[i] = newItem;\n }\n }\n } else {\n if (oldValue !== internalObject) {\n // we are transitioning from something which was not an object into object.\n oldValue = internalObject = {};\n oldLength = 0;\n changeDetected++;\n }\n // copy the items to oldValue and look for changes.\n newLength = 0;\n for (key in newValue) {\n if (newValue.hasOwnProperty(key)) {\n newLength++;\n newItem = newValue[key];\n oldItem = oldValue[key];\n\n if (key in oldValue) {\n bothNaN = (oldItem !== oldItem) && (newItem !== newItem);\n if (!bothNaN && (oldItem !== newItem)) {\n changeDetected++;\n oldValue[key] = newItem;\n }\n } else {\n oldLength++;\n oldValue[key] = newItem;\n changeDetected++;\n }\n }\n }\n if (oldLength > newLength) {\n // we used to have more keys, need to find them and destroy them.\n changeDetected++;\n for(key in oldValue) {\n if (!newValue.hasOwnProperty(key)) {\n oldLength--;\n delete oldValue[key];\n }\n }\n }\n }\n return changeDetected;\n }\n\n function $watchCollectionAction() {\n if (initRun) {\n initRun = false;\n listener(newValue, newValue, self);\n } else {\n listener(newValue, veryOldValue, self);\n }\n\n // make a copy for the next time a collection is changed\n if (trackVeryOldValue) {\n if (!isObject(newValue)) {\n //primitive\n veryOldValue = newValue;\n } else if (isArrayLike(newValue)) {\n veryOldValue = new Array(newValue.length);\n for (var i = 0; i < newValue.length; i++) {\n veryOldValue[i] = newValue[i];\n }\n } else { // if object\n veryOldValue = {};\n for (var key in newValue) {\n if (hasOwnProperty.call(newValue, key)) {\n veryOldValue[key] = newValue[key];\n }\n }\n }\n }\n }\n\n return this.$watch(changeDetector, $watchCollectionAction);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$digest\n * @kind function\n *\n * @description\n * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and\n * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change\n * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}\n * until no more listeners are firing. This means that it is possible to get into an infinite\n * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n * iterations exceeds 10.\n *\n * Usually, you don't call `$digest()` directly in\n * {@link ng.directive:ngController controllers} or in\n * {@link ng.$compileProvider#directive directives}.\n * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within\n * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.\n *\n * If you want to be notified whenever `$digest()` is called,\n * you can register a `watchExpression` function with\n * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.\n *\n * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n *\n * # Example\n * ```js\n var scope = ...;\n scope.name = 'misko';\n scope.counter = 0;\n\n expect(scope.counter).toEqual(0);\n scope.$watch('name', function(newValue, oldValue) {\n scope.counter = scope.counter + 1;\n });\n expect(scope.counter).toEqual(0);\n\n scope.$digest();\n // the listener is always called during the first $digest loop after it was registered\n expect(scope.counter).toEqual(1);\n\n scope.$digest();\n // but now it will not be called unless the value changes\n expect(scope.counter).toEqual(1);\n\n scope.name = 'adam';\n scope.$digest();\n expect(scope.counter).toEqual(2);\n * ```\n *\n */\n $digest: function() {\n var watch, value, last,\n watchers,\n asyncQueue = this.$$asyncQueue,\n postDigestQueue = this.$$postDigestQueue,\n length,\n dirty, ttl = TTL,\n next, current, target = this,\n watchLog = [],\n logIdx, logMsg, asyncTask;\n\n beginPhase('$digest');\n // Check for changes to browser url that happened in sync before the call to $digest\n $browser.$$checkUrlChange();\n\n if (this === $rootScope && applyAsyncId !== null) {\n // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then\n // cancel the scheduled $apply and flush the queue of expressions to be evaluated.\n $browser.defer.cancel(applyAsyncId);\n flushApplyAsync();\n }\n\n lastDirtyWatch = null;\n\n do { // \"while dirty\" loop\n dirty = false;\n current = target;\n\n while(asyncQueue.length) {\n try {\n asyncTask = asyncQueue.shift();\n asyncTask.scope.$eval(asyncTask.expression);\n } catch (e) {\n $exceptionHandler(e);\n }\n lastDirtyWatch = null;\n }\n\n traverseScopesLoop:\n do { // \"traverse the scopes\" loop\n if ((watchers = current.$$watchers)) {\n // process our watches\n length = watchers.length;\n while (length--) {\n try {\n watch = watchers[length];\n // Most common watches are on primitives, in which case we can short\n // circuit it with === operator, only when === fails do we use .equals\n if (watch) {\n if ((value = watch.get(current)) !== (last = watch.last) &&\n !(watch.eq\n ? equals(value, last)\n : (typeof value === 'number' && typeof last === 'number'\n && isNaN(value) && isNaN(last)))) {\n dirty = true;\n lastDirtyWatch = watch;\n watch.last = watch.eq ? copy(value, null) : value;\n watch.fn(value, ((last === initWatchVal) ? value : last), current);\n if (ttl < 5) {\n logIdx = 4 - ttl;\n if (!watchLog[logIdx]) watchLog[logIdx] = [];\n logMsg = (isFunction(watch.exp))\n ? 'fn: ' + (watch.exp.name || watch.exp.toString())\n : watch.exp;\n logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last);\n watchLog[logIdx].push(logMsg);\n }\n } else if (watch === lastDirtyWatch) {\n // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n // have already been tested.\n dirty = false;\n break traverseScopesLoop;\n }\n }\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n }\n\n // Insanity Warning: scope depth-first traversal\n // yes, this code is a bit crazy, but it works and we have tests to prove it!\n // this piece should be kept in sync with the traversal in $broadcast\n if (!(next = (current.$$childHead ||\n (current !== target && current.$$nextSibling)))) {\n while(current !== target && !(next = current.$$nextSibling)) {\n current = current.$parent;\n }\n }\n } while ((current = next));\n\n // `break traverseScopesLoop;` takes us to here\n\n if((dirty || asyncQueue.length) && !(ttl--)) {\n clearPhase();\n throw $rootScopeMinErr('infdig',\n '{0} $digest() iterations reached. Aborting!\\n' +\n 'Watchers fired in the last 5 iterations: {1}',\n TTL, toJson(watchLog));\n }\n\n } while (dirty || asyncQueue.length);\n\n clearPhase();\n\n while(postDigestQueue.length) {\n try {\n postDigestQueue.shift()();\n } catch (e) {\n $exceptionHandler(e);\n }\n }\n },\n\n\n /**\n * @ngdoc event\n * @name $rootScope.Scope#$destroy\n * @eventType broadcast on scope being destroyed\n *\n * @description\n * Broadcasted when a scope and its children are being destroyed.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$destroy\n * @kind function\n *\n * @description\n * Removes the current scope (and all of its children) from the parent scope. Removal implies\n * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer\n * propagate to the current scope and its children. Removal also implies that the current\n * scope is eligible for garbage collection.\n *\n * The `$destroy()` is usually used by directives such as\n * {@link ng.directive:ngRepeat ngRepeat} for managing the\n * unrolling of the loop.\n *\n * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n * Application code can register a `$destroy` event handler that will give it a chance to\n * perform any necessary cleanup.\n *\n * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n * clean up DOM bindings before an element is removed from the DOM.\n */\n $destroy: function() {\n // we can't destroy the root scope or a scope that has been already destroyed\n if (this.$$destroyed) return;\n var parent = this.$parent;\n\n this.$broadcast('$destroy');\n this.$$destroyed = true;\n if (this === $rootScope) return;\n\n for (var eventName in this.$$listenerCount) {\n decrementListenerCount(this, this.$$listenerCount[eventName], eventName);\n }\n\n // sever all the references to parent scopes (after this cleanup, the current scope should\n // not be retained by any of our references and should be eligible for garbage collection)\n if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;\n if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;\n if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\n\n // All of the code below is bogus code that works around V8's memory leak via optimized code\n // and inline caches.\n //\n // see:\n // - https://code.google.com/p/v8/issues/detail?id=2073#c26\n // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909\n // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n\n this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =\n this.$$childTail = this.$root = null;\n\n // don't reset these to null in case some async task tries to register a listener/watch/task\n this.$$listeners = {};\n this.$$watchers = this.$$asyncQueue = this.$$postDigestQueue = [];\n\n // prevent NPEs since these methods have references to properties we nulled out\n this.$destroy = this.$digest = this.$apply = noop;\n this.$on = this.$watch = this.$watchGroup = function() { return noop; };\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$eval\n * @kind function\n *\n * @description\n * Executes the `expression` on the current scope and returns the result. Any exceptions in\n * the expression are propagated (uncaught). This is useful when evaluating Angular\n * expressions.\n *\n * # Example\n * ```js\n var scope = ng.$rootScope.Scope();\n scope.a = 1;\n scope.b = 2;\n\n expect(scope.$eval('a+b')).toEqual(3);\n expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n * ```\n *\n * @param {(string|function())=} expression An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n * @returns {*} The result of evaluating the expression.\n */\n $eval: function(expr, locals) {\n return $parse(expr)(this, locals);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$evalAsync\n * @kind function\n *\n * @description\n * Executes the expression on the current scope at a later point in time.\n *\n * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n * that:\n *\n * - it will execute after the function that scheduled the evaluation (preferably before DOM\n * rendering).\n * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after\n * `expression` execution.\n *\n * Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n * will be scheduled. However, it is encouraged to always call code that changes the model\n * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n *\n * @param {(string|function())=} expression An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with the current `scope` parameter.\n *\n */\n $evalAsync: function(expr) {\n // if we are outside of an $digest loop and this is the first time we are scheduling async\n // task also schedule async auto-flush\n if (!$rootScope.$$phase && !$rootScope.$$asyncQueue.length) {\n $browser.defer(function() {\n if ($rootScope.$$asyncQueue.length) {\n $rootScope.$digest();\n }\n });\n }\n\n this.$$asyncQueue.push({scope: this, expression: expr});\n },\n\n $$postDigest : function(fn) {\n this.$$postDigestQueue.push(fn);\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$apply\n * @kind function\n *\n * @description\n * `$apply()` is used to execute an expression in angular from outside of the angular\n * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n * Because we are calling into the angular framework we need to perform proper scope life\n * cycle of {@link ng.$exceptionHandler exception handling},\n * {@link ng.$rootScope.Scope#$digest executing watches}.\n *\n * ## Life cycle\n *\n * # Pseudo-Code of `$apply()`\n * ```js\n function $apply(expr) {\n try {\n return $eval(expr);\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n $root.$digest();\n }\n }\n * ```\n *\n *\n * Scope's `$apply()` method transitions through the following stages:\n *\n * 1. The {@link guide/expression expression} is executed using the\n * {@link ng.$rootScope.Scope#$eval $eval()} method.\n * 2. Any exceptions from the execution of the expression are forwarded to the\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the\n * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.\n *\n *\n * @param {(string|function())=} exp An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n *\n * @returns {*} The result of evaluating the expression.\n */\n $apply: function(expr) {\n try {\n beginPhase('$apply');\n return this.$eval(expr);\n } catch (e) {\n $exceptionHandler(e);\n } finally {\n clearPhase();\n try {\n $rootScope.$digest();\n } catch (e) {\n $exceptionHandler(e);\n throw e;\n }\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$applyAsync\n * @kind function\n *\n * @description\n * Schedule the invokation of $apply to occur at a later time. The actual time difference\n * varies across browsers, but is typically around ~10 milliseconds.\n *\n * This can be used to queue up multiple expressions which need to be evaluated in the same\n * digest.\n *\n * @param {(string|function())=} exp An angular expression to be executed.\n *\n * - `string`: execute using the rules as defined in {@link guide/expression expression}.\n * - `function(scope)`: execute the function with current `scope` parameter.\n */\n $applyAsync: function(expr) {\n var scope = this;\n expr && $rootScope.$$applyAsyncQueue.push($applyAsyncExpression);\n scheduleApplyAsync();\n\n function $applyAsyncExpression() {\n scope.$eval(expr);\n }\n },\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$on\n * @kind function\n *\n * @description\n * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for\n * discussion of event life cycle.\n *\n * The event listener function format is: `function(event, args...)`. The `event` object\n * passed into the listener has the following attributes:\n *\n * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n * `$broadcast`-ed.\n * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the\n * event propagates through the scope hierarchy, this property is set to null.\n * - `name` - `{string}`: name of the event.\n * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n * further event propagation (available only for events that were `$emit`-ed).\n * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n * to true.\n * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n *\n * @param {string} name Event name to listen on.\n * @param {function(event, ...args)} listener Function to call when the event is emitted.\n * @returns {function()} Returns a deregistration function for this listener.\n */\n $on: function(name, listener) {\n var namedListeners = this.$$listeners[name];\n if (!namedListeners) {\n this.$$listeners[name] = namedListeners = [];\n }\n namedListeners.push(listener);\n\n var current = this;\n do {\n if (!current.$$listenerCount[name]) {\n current.$$listenerCount[name] = 0;\n }\n current.$$listenerCount[name]++;\n } while ((current = current.$parent));\n\n var self = this;\n return function() {\n namedListeners[namedListeners.indexOf(listener)] = null;\n decrementListenerCount(self, 1, name);\n };\n },\n\n\n /**\n * @ngdoc method\n * @name $rootScope.Scope#$emit\n * @kind function\n *\n * @description\n * Dispatches an event `name` upwards through the scope hierarchy notifying the\n * registered {@link ng.$rootScope.Scope#$on} listeners.\n *\n * The event life cycle starts at the scope on which `$emit` was called. All\n * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n * registered listeners along the way. The event will stop propagating if one of the listeners\n * cancels it.\n *\n * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * @param {string} name Event name to emit.\n * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).\n */\n $emit: function(name, args) {\n var empty = [],\n namedListeners,\n scope = this,\n stopPropagation = false,\n event = {\n name: name,\n targetScope: scope,\n stopPropagation: function() {stopPropagation = true;},\n preventDefault: function() {\n event.defaultPrevented = true;\n },\n defaultPrevented: false\n },\n listenerArgs = concat([event], arguments, 1),\n i, length;\n\n do {\n namedListeners = scope.$$listeners[name] || empty;\n event.currentScope = scope;\n for (i=0, length=namedListeners.length; i= 8 ) {\n normalizedVal = urlResolve(uri).href;\n if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n return 'unsafe:'+normalizedVal;\n }\n }\n return uri;\n };\n };\n}\n\nvar $sceMinErr = minErr('$sce');\n\nvar SCE_CONTEXTS = {\n HTML: 'html',\n CSS: 'css',\n URL: 'url',\n // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a\n // url. (e.g. ng-include, script src, templateUrl)\n RESOURCE_URL: 'resourceUrl',\n JS: 'js'\n};\n\n// Helper functions follow.\n\n// Copied from:\n// http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962\n// Prereq: s is a string.\nfunction escapeForRegexp(s) {\n return s.replace(/([-()\\[\\]{}+?*.$\\^|,:# -1) {\n throw $sceMinErr('iwcard',\n 'Illegal sequence *** in string matcher. String: {0}', matcher);\n }\n matcher = escapeForRegexp(matcher).\n replace('\\\\*\\\\*', '.*').\n replace('\\\\*', '[^:/.?&;]*');\n return new RegExp('^' + matcher + '$');\n } else if (isRegExp(matcher)) {\n // The only other type of matcher allowed is a Regexp.\n // Match entire URL / disallow partial matches.\n // Flags are reset (i.e. no global, ignoreCase or multiline)\n return new RegExp('^' + matcher.source + '$');\n } else {\n throw $sceMinErr('imatcher',\n 'Matchers may only be \"self\", string patterns or RegExp objects');\n }\n}\n\n\nfunction adjustMatchers(matchers) {\n var adjustedMatchers = [];\n if (isDefined(matchers)) {\n forEach(matchers, function(matcher) {\n adjustedMatchers.push(adjustMatcher(matcher));\n });\n }\n return adjustedMatchers;\n}\n\n\n/**\n * @ngdoc service\n * @name $sceDelegate\n * @kind function\n *\n * @description\n *\n * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n * Contextual Escaping (SCE)} services to AngularJS.\n *\n * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is\n * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n * work because `$sce` delegates to `$sceDelegate` for these operations.\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n *\n * The default instance of `$sceDelegate` should work out of the box with little pain. While you\n * can override it completely to change the behavior of `$sce`, the common case would\n * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as\n * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist\n * $sceDelegateProvider.resourceUrlWhitelist} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n */\n\n/**\n * @ngdoc provider\n * @name $sceDelegateProvider\n * @description\n *\n * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n * $sceDelegate} service. This allows one to get/set the whitelists and blacklists used to ensure\n * that the URLs used for sourcing Angular templates are safe. Refer {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and\n * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n *\n * For the general details about this service in Angular, read the main page for {@link ng.$sce\n * Strict Contextual Escaping (SCE)}.\n *\n * **Example**: Consider the following case. \n *\n * - your app is hosted at url `http://myapp.example.com/`\n * - but some of your templates are hosted on other domains you control such as\n * `http://srv01.assets.example.com/`, `http://srv02.assets.example.com/`, etc.\n * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n *\n * Here is what a secure configuration for this scenario might look like:\n *\n * ```\n * angular.module('myApp', []).config(function($sceDelegateProvider) {\n * $sceDelegateProvider.resourceUrlWhitelist([\n * // Allow same origin resource loads.\n * 'self',\n * // Allow loading from our assets domain. Notice the difference between * and **.\n * 'http://srv*.assets.example.com/**'\n * ]);\n *\n * // The blacklist overrides the whitelist so the open redirect here is blocked.\n * $sceDelegateProvider.resourceUrlBlacklist([\n * 'http://myapp.example.com/clickThru**'\n * ]);\n * });\n * ```\n */\n\nfunction $SceDelegateProvider() {\n this.SCE_CONTEXTS = SCE_CONTEXTS;\n\n // Resource URLs can also be trusted by policy.\n var resourceUrlWhitelist = ['self'],\n resourceUrlBlacklist = [];\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlWhitelist\n * @kind function\n *\n * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.\n *\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * Note: **an empty whitelist array will block all URLs**!\n *\n * @return {Array} the currently set whitelist array.\n *\n * The **default value** when no whitelist has been explicitly set is `['self']` allowing only\n * same origin resource requests.\n *\n * @description\n * Sets/Gets the whitelist of trusted resource URLs.\n */\n this.resourceUrlWhitelist = function (value) {\n if (arguments.length) {\n resourceUrlWhitelist = adjustMatchers(value);\n }\n return resourceUrlWhitelist;\n };\n\n /**\n * @ngdoc method\n * @name $sceDelegateProvider#resourceUrlBlacklist\n * @kind function\n *\n * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value\n * provided. This must be an array or null. A snapshot of this array is used so further\n * changes to the array are ignored.\n *\n * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n * allowed in this array.\n *\n * The typical usage for the blacklist is to **block\n * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n * these would otherwise be trusted but actually return content from the redirected domain.\n *\n * Finally, **the blacklist overrides the whitelist** and has the final say.\n *\n * @return {Array} the currently set blacklist array.\n *\n * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there\n * is no blacklist.)\n *\n * @description\n * Sets/Gets the blacklist of trusted resource URLs.\n */\n\n this.resourceUrlBlacklist = function (value) {\n if (arguments.length) {\n resourceUrlBlacklist = adjustMatchers(value);\n }\n return resourceUrlBlacklist;\n };\n\n this.$get = ['$injector', function($injector) {\n\n var htmlSanitizer = function htmlSanitizer(html) {\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n };\n\n if ($injector.has('$sanitize')) {\n htmlSanitizer = $injector.get('$sanitize');\n }\n\n\n function matchUrl(matcher, parsedUrl) {\n if (matcher === 'self') {\n return urlIsSameOrigin(parsedUrl);\n } else {\n // definitely a regex. See adjustMatchers()\n return !!matcher.exec(parsedUrl.href);\n }\n }\n\n function isResourceUrlAllowedByPolicy(url) {\n var parsedUrl = urlResolve(url.toString());\n var i, n, allowed = false;\n // Ensure that at least one item from the whitelist allows this url.\n for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {\n if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {\n allowed = true;\n break;\n }\n }\n if (allowed) {\n // Ensure that no item from the blacklist blocked this url.\n for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {\n if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {\n allowed = false;\n break;\n }\n }\n }\n return allowed;\n }\n\n function generateHolderType(Base) {\n var holderType = function TrustedValueHolderType(trustedValue) {\n this.$$unwrapTrustedValue = function() {\n return trustedValue;\n };\n };\n if (Base) {\n holderType.prototype = new Base();\n }\n holderType.prototype.valueOf = function sceValueOf() {\n return this.$$unwrapTrustedValue();\n };\n holderType.prototype.toString = function sceToString() {\n return this.$$unwrapTrustedValue().toString();\n };\n return holderType;\n }\n\n var trustedValueHolderBase = generateHolderType(),\n byType = {};\n\n byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\n /**\n * @ngdoc method\n * @name $sceDelegate#trustAs\n *\n * @description\n * Returns an object that is trusted by angular for use in specified strict\n * contextual escaping contexts (such as ng-bind-html, ng-include, any src\n * attribute interpolation, any dom event binding attribute interpolation\n * such as for onclick, etc.) that uses the provided value.\n * See {@link ng.$sce $sce} for enabling strict contextual escaping.\n *\n * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n * resourceUrl, html, js and css.\n * @param {*} value The value that that should be considered trusted/safe.\n * @returns {*} A value that can be used to stand in for the provided `value` in places\n * where Angular expects a $sce.trustAs() return value.\n */\n function trustAs(type, trustedValue) {\n var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (!Constructor) {\n throw $sceMinErr('icontext',\n 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n type, trustedValue);\n }\n if (trustedValue === null || trustedValue === undefined || trustedValue === '') {\n return trustedValue;\n }\n // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting\n // mutable objects, we ensure here that the value passed in is actually a string.\n if (typeof trustedValue !== 'string') {\n throw $sceMinErr('itype',\n 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n type);\n }\n return new Constructor(trustedValue);\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#valueOf\n *\n * @description\n * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.\n *\n * If the passed parameter is not a value that had been returned by {@link\n * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.\n *\n * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}\n * call or anything else.\n * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns\n * `value` unchanged.\n */\n function valueOf(maybeTrusted) {\n if (maybeTrusted instanceof trustedValueHolderBase) {\n return maybeTrusted.$$unwrapTrustedValue();\n } else {\n return maybeTrusted;\n }\n }\n\n /**\n * @ngdoc method\n * @name $sceDelegate#getTrusted\n *\n * @description\n * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and\n * returns the originally supplied value if the queried context type is a supertype of the\n * created type. If this condition isn't satisfied, throws an exception.\n *\n * @param {string} type The kind of context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} call.\n * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs\n * `$sceDelegate.trustAs`} if valid in this context. Otherwise, throws an exception.\n */\n function getTrusted(type, maybeTrusted) {\n if (maybeTrusted === null || maybeTrusted === undefined || maybeTrusted === '') {\n return maybeTrusted;\n }\n var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n if (constructor && maybeTrusted instanceof constructor) {\n return maybeTrusted.$$unwrapTrustedValue();\n }\n // If we get here, then we may only take one of two actions.\n // 1. sanitize the value for the requested type, or\n // 2. throw an exception.\n if (type === SCE_CONTEXTS.RESOURCE_URL) {\n if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n return maybeTrusted;\n } else {\n throw $sceMinErr('insecurl',\n 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',\n maybeTrusted.toString());\n }\n } else if (type === SCE_CONTEXTS.HTML) {\n return htmlSanitizer(maybeTrusted);\n }\n throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n }\n\n return { trustAs: trustAs,\n getTrusted: getTrusted,\n valueOf: valueOf };\n }];\n}\n\n\n/**\n * @ngdoc provider\n * @name $sceProvider\n * @description\n *\n * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n * - enable/disable Strict Contextual Escaping (SCE) in a module\n * - override the default implementation with a custom delegate\n *\n * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n */\n\n/* jshint maxlen: false*/\n\n/**\n * @ngdoc service\n * @name $sce\n * @kind function\n *\n * @description\n *\n * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n *\n * # Strict Contextual Escaping\n *\n * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain\n * contexts to result in a value that is marked as safe to use for that context. One example of\n * such a context is binding arbitrary html controlled by the user via `ng-bind-html`. We refer\n * to these contexts as privileged or SCE contexts.\n *\n * As of version 1.2, Angular ships with SCE enabled by default.\n *\n * Note: When enabled (the default), IE8 in quirks mode is not supported. In this mode, IE8 allows\n * one to execute arbitrary javascript by the use of the expression() syntax. Refer\n * to learn more about them.\n * You can ensure your document is in standards mode and not quirks mode by adding ``\n * to the top of your HTML document.\n *\n * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for\n * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n *\n * Here's an example of a binding in a privileged context:\n *\n * ```\n * \n * \n * ```\n *\n * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE\n * disabled, this application allows the user to render arbitrary HTML into the DIV.\n * In a more realistic example, one may be rendering user comments, blog articles, etc. via\n * bindings. (HTML is just one example of a context where rendering user controlled input creates\n * security vulnerabilities.)\n *\n * For the case of HTML, you might use a library, either on the client side, or on the server side,\n * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n *\n * How would you ensure that every place that used these types of bindings was bound to a value that\n * was sanitized by your library (or returned as safe for rendering by your server?) How can you\n * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n * properties/fields and forgot to update the binding to the sanitized value?\n *\n * To be secure by default, you want to ensure that any such bindings are disallowed unless you can\n * determine that something explicitly says it's safe to use a value for binding in that\n * context. You can then audit your code (a simple grep would do) to ensure that this is only done\n * for those values that you can easily tell are safe - because they were received from your server,\n * sanitized by your library, etc. You can organize your codebase to help with this - perhaps\n * allowing only the files in a specific directory to do this. Ensuring that the internal API\n * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.\n *\n * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}\n * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to\n * obtain values that will be accepted by SCE / privileged contexts.\n *\n *\n * ## How does it work?\n *\n * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted\n * $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link\n * ng.$sce#parse $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the\n * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.\n *\n * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly\n * simplified):\n *\n * ```\n * var ngBindHtmlDirective = ['$sce', function($sce) {\n * return function(scope, element, attr) {\n * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n * element.html(value || '');\n * });\n * };\n * }];\n * ```\n *\n * ## Impact on loading templates\n *\n * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n * `templateUrl`'s specified by {@link guide/directive directives}.\n *\n * By default, Angular only loads templates from the same domain and protocol as the application\n * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or\n * protocols, you may either either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist\n * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.\n *\n * *Please note*:\n * The browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy apply in addition to this and may further restrict whether the template is successfully\n * loaded. This means that without the right CORS policy, loading templates from a different domain\n * won't work on all browsers. Also, loading templates from `file://` URL does not work on some\n * browsers.\n *\n * ## This feels like too much overhead\n *\n * It's important to remember that SCE only applies to interpolation expressions.\n *\n * If your expressions are constant literals, they're automatically trusted and you don't need to\n * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.\n * `implicitly trusted'\">`) just works.\n *\n * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them\n * through {@link ng.$sce#getTrusted $sce.getTrusted}. SCE doesn't play a role here.\n *\n * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n * templates in `ng-include` from your application's domain without having to even know about SCE.\n * It blocks loading templates from other domains or loading templates over http from an https\n * served document. You can change these by setting your own custom {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.\n *\n * This significantly reduces the overhead. It is far easier to pay the small overhead and have an\n * application that's secure and can be audited to verify that with much more ease than bolting\n * security onto an application later.\n *\n * \n * ## What trusted context types are supported?\n *\n * | Context | Notes |\n * |---------------------|----------------|\n * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |\n * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |\n * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |\n * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |\n *\n * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} \n *\n * Each element in these arrays must be one of the following:\n *\n * - **'self'**\n * - The special **string**, `'self'`, can be used to match against all URLs of the **same\n * domain** as the application document using the **same protocol**.\n * - **String** (except the special value `'self'`)\n * - The string is matched against the full *normalized / absolute URL* of the resource\n * being tested (substring matches are not good enough.)\n * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters\n * match themselves.\n * - `*`: matches zero or more occurrences of any character other than one of the following 6\n * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and ';'. It's a useful wildcard for use\n * in a whitelist.\n * - `**`: matches zero or more occurrences of *any* character. As such, it's not\n * not appropriate to use in for a scheme, domain, etc. as it would match too much. (e.g.\n * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n * not have been the intention.) Its usage at the very end of the path is ok. (e.g.\n * http://foo.example.com/templates/**).\n * - **RegExp** (*see caveat below*)\n * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax\n * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to\n * accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n * have good test coverage.). For instance, the use of `.` in the regex is correct only in a\n * small number of cases. A `.` character in the regex used when matching the scheme or a\n * subdomain could be matched against a `:` or literal `.` that was likely not intended. It\n * is highly recommended to use the string patterns and only fall back to regular expressions\n * if they as a last resort.\n * - The regular expression must be an instance of RegExp (i.e. not a string.) It is\n * matched against the **entire** *normalized / absolute URL* of the resource being tested\n * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags\n * present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n * - If you are generating your JavaScript from some other templating engine (not\n * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n * remember to escape your regular expression (and be aware that you might need more than\n * one level of escaping depending on your templating engine and the way you interpolated\n * the value.) Do make use of your platform's escaping mechanism as it might be good\n * enough before coding your own. e.g. Ruby has\n * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n * Javascript lacks a similar built in function for escaping. Take a look at Google\n * Closure library's [goog.string.regExpEscape(s)](\n * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n *\n * ## Show me an example using SCE.\n *\n * \n * \n * \n * \n * User comments\n * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n * $sanitize is available. If $sanitize isn't available, this results in an error instead of an\n * exploit.\n * \n * \n * {{userComment.name}}:\n * \n * \n * \n * \n * \n * \n *\n * \n * angular.module('mySceApp', ['ngSanitize'])\n * .controller('AppController', ['$http', '$templateCache', '$sce',\n * function($http, $templateCache, $sce) {\n * var self = this;\n * $http.get(\"test_data.json\", {cache: $templateCache}).success(function(userComments) {\n * self.userComments = userComments;\n * });\n * self.explicitlyTrustedHtml = $sce.trustAsHtml(\n * 'Hover over this text.');\n * }]);\n * \n *\n * \n * [\n * { \"name\": \"Alice\",\n * \"htmlComment\":\n * \"Is anyone reading this?\"\n * },\n * { \"name\": \"Bob\",\n * \"htmlComment\": \"Yes! Am I the only other one?\"\n * }\n * ]\n * \n *\n * \n * describe('SCE doc demo', function() {\n * it('should sanitize untrusted values', function() {\n * expect(element.all(by.css('.htmlComment')).first().getInnerHtml())\n * .toBe('Is anyone reading this?');\n * });\n *\n * it('should NOT sanitize explicitly trusted values', function() {\n * expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(\n * 'Hover over this text.');\n * });\n * });\n * \n * \n *\n *\n *\n * ## Can I disable SCE completely?\n *\n * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits\n * for little coding overhead. It will be much harder to take an SCE disabled application and\n * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE\n * for cases where you have a lot of existing code that was written before SCE was introduced and\n * you're migrating them a module at a time.\n *\n * That said, here's how you can completely disable SCE:\n *\n * ```\n * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n * // Completely disable SCE. For demonstration purposes only!\n * // Do not use in new projects.\n * $sceProvider.enabled(false);\n * });\n * ```\n *\n */\n/* jshint maxlen: 100 */\n\nfunction $SceProvider() {\n var enabled = true;\n\n /**\n * @ngdoc method\n * @name $sceProvider#enabled\n * @kind function\n *\n * @param {boolean=} value If provided, then enables/disables SCE.\n * @return {boolean} true if SCE is enabled, false otherwise.\n *\n * @description\n * Enables/disables SCE and returns the current value.\n */\n this.enabled = function (value) {\n if (arguments.length) {\n enabled = !!value;\n }\n return enabled;\n };\n\n\n /* Design notes on the default implementation for SCE.\n *\n * The API contract for the SCE delegate\n * -------------------------------------\n * The SCE delegate object must provide the following 3 methods:\n *\n * - trustAs(contextEnum, value)\n * This method is used to tell the SCE service that the provided value is OK to use in the\n * contexts specified by contextEnum. It must return an object that will be accepted by\n * getTrusted() for a compatible contextEnum and return this value.\n *\n * - valueOf(value)\n * For values that were not produced by trustAs(), return them as is. For values that were\n * produced by trustAs(), return the corresponding input value to trustAs. Basically, if\n * trustAs is wrapping the given values into some type, this operation unwraps it when given\n * such a value.\n *\n * - getTrusted(contextEnum, value)\n * This function should return the a value that is safe to use in the context specified by\n * contextEnum or throw and exception otherwise.\n *\n * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n * opaque or wrapped in some holder object. That happens to be an implementation detail. For\n * instance, an implementation could maintain a registry of all trusted objects by context. In\n * such a case, trustAs() would return the same object that was passed in. getTrusted() would\n * return the same object passed in if it was found in the registry under a compatible context or\n * throw an exception otherwise. An implementation might only wrap values some of the time based\n * on some criteria. getTrusted() might return a value and not throw an exception for special\n * constants or objects even if not wrapped. All such implementations fulfill this contract.\n *\n *\n * A note on the inheritance model for SCE contexts\n * ------------------------------------------------\n * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This\n * is purely an implementation details.\n *\n * The contract is simply this:\n *\n * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n * will also succeed.\n *\n * Inheritance happens to capture this in a natural way. In some future, we\n * may not use inheritance anymore. That is OK because no code outside of\n * sce.js and sceSpecs.js would need to be aware of this detail.\n */\n\n this.$get = ['$parse', '$sniffer', '$sceDelegate', function(\n $parse, $sniffer, $sceDelegate) {\n // Prereq: Ensure that we're not running in IE8 quirks mode. In that mode, IE allows\n // the \"expression(javascript expression)\" syntax which is insecure.\n if (enabled && $sniffer.msie && $sniffer.msieDocumentMode < 8) {\n throw $sceMinErr('iequirks',\n 'Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks ' +\n 'mode. You can fix this by adding the text to the top of your HTML ' +\n 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');\n }\n\n var sce = shallowCopy(SCE_CONTEXTS);\n\n /**\n * @ngdoc method\n * @name $sce#isEnabled\n * @kind function\n *\n * @return {Boolean} true if SCE is enabled, false otherwise. If you want to set the value, you\n * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n *\n * @description\n * Returns a boolean indicating if SCE is enabled.\n */\n sce.isEnabled = function () {\n return enabled;\n };\n sce.trustAs = $sceDelegate.trustAs;\n sce.getTrusted = $sceDelegate.getTrusted;\n sce.valueOf = $sceDelegate.valueOf;\n\n if (!enabled) {\n sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n sce.valueOf = identity;\n }\n\n /**\n * @ngdoc method\n * @name $sce#parseAs\n *\n * @description\n * Converts Angular {@link guide/expression expression} into a function. This is like {@link\n * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it\n * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,\n * *result*)}\n *\n * @param {string} type The kind of SCE context in which this result will be used.\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n sce.parseAs = function sceParseAs(type, expr) {\n var parsed = $parse(expr);\n if (parsed.literal && parsed.constant) {\n return parsed;\n } else {\n return $parse(expr, function (value) {\n return sce.getTrusted(type, value);\n });\n }\n };\n\n /**\n * @ngdoc method\n * @name $sce#trustAs\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such,\n * returns an object that is trusted by angular for use in specified strict contextual\n * escaping contexts (such as ng-bind-html, ng-include, any src attribute\n * interpolation, any dom event binding attribute interpolation such as for onclick, etc.)\n * that uses the provided value. See * {@link ng.$sce $sce} for enabling strict contextual\n * escaping.\n *\n * @param {string} type The kind of context in which this value is safe for use. e.g. url,\n * resource_url, html, js and css.\n * @param {*} value The value that that should be considered trusted/safe.\n * @returns {*} A value that can be used to stand in for the provided `value` in places\n * where Angular expects a $sce.trustAs() return value.\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsHtml\n *\n * @description\n * Shorthand method. `$sce.trustAsHtml(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml\n * $sce.getTrustedHtml(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl\n * $sce.getTrustedUrl(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.trustAsResourceUrl(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the return\n * value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#trustAsJs\n *\n * @description\n * Shorthand method. `$sce.trustAsJs(value)` →\n * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n *\n * @param {*} value The value to trustAs.\n * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs\n * $sce.getTrustedJs(value)} to obtain the original value. (privileged directives\n * only accept expressions that are either literal constants or are the\n * return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrusted\n *\n * @description\n * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,\n * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the\n * originally supplied value if the queried context type is a supertype of the created type.\n * If this condition isn't satisfied, throws an exception.\n *\n * @param {string} type The kind of context in which this value is to be used.\n * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}\n * call.\n * @returns {*} The value the was originally provided to\n * {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.\n * Otherwise, throws an exception.\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedHtml\n *\n * @description\n * Shorthand method. `$sce.getTrustedHtml(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedCss\n *\n * @description\n * Shorthand method. `$sce.getTrustedCss(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedResourceUrl\n *\n * @description\n * Shorthand method. `$sce.getTrustedResourceUrl(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n *\n * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#getTrustedJs\n *\n * @description\n * Shorthand method. `$sce.getTrustedJs(value)` →\n * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n *\n * @param {*} value The value to pass to `$sce.getTrusted`.\n * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsHtml\n *\n * @description\n * Shorthand method. `$sce.parseAsHtml(expression string)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.HTML, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsCss\n *\n * @description\n * Shorthand method. `$sce.parseAsCss(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.CSS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsUrl(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsResourceUrl\n *\n * @description\n * Shorthand method. `$sce.parseAsResourceUrl(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.RESOURCE_URL, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n /**\n * @ngdoc method\n * @name $sce#parseAsJs\n *\n * @description\n * Shorthand method. `$sce.parseAsJs(value)` →\n * {@link ng.$sce#parse `$sce.parseAs($sce.JS, value)`}\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n * * `context` – `{object}` – an object against which any expressions embedded in the strings\n * are evaluated against (typically a scope object).\n * * `locals` – `{object=}` – local variables context object, useful for overriding values in\n * `context`.\n */\n\n // Shorthand delegations.\n var parse = sce.parseAs,\n getTrusted = sce.getTrusted,\n trustAs = sce.trustAs;\n\n forEach(SCE_CONTEXTS, function (enumValue, name) {\n var lName = lowercase(name);\n sce[camelCase(\"parse_as_\" + lName)] = function (expr) {\n return parse(enumValue, expr);\n };\n sce[camelCase(\"get_trusted_\" + lName)] = function (value) {\n return getTrusted(enumValue, value);\n };\n sce[camelCase(\"trust_as_\" + lName)] = function (value) {\n return trustAs(enumValue, value);\n };\n });\n\n return sce;\n }];\n}\n\n/**\n * !!! This is an undocumented \"private\" service !!!\n *\n * @name $sniffer\n * @requires $window\n * @requires $document\n *\n * @property {boolean} history Does the browser support html5 history api ?\n * @property {boolean} hashchange Does the browser support hashchange event ?\n * @property {boolean} transitions Does the browser support CSS transition events ?\n * @property {boolean} animations Does the browser support CSS animation events ?\n *\n * @description\n * This is very simple implementation of testing browser's features.\n */\nfunction $SnifferProvider() {\n this.$get = ['$window', '$document', function($window, $document) {\n var eventSupport = {},\n android =\n int((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n document = $document[0] || {},\n documentMode = document.documentMode,\n vendorPrefix,\n vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/,\n bodyStyle = document.body && document.body.style,\n transitions = false,\n animations = false,\n match;\n\n if (bodyStyle) {\n for(var prop in bodyStyle) {\n if(match = vendorRegex.exec(prop)) {\n vendorPrefix = match[0];\n vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);\n break;\n }\n }\n\n if(!vendorPrefix) {\n vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';\n }\n\n transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));\n animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));\n\n if (android && (!transitions||!animations)) {\n transitions = isString(document.body.style.webkitTransition);\n animations = isString(document.body.style.webkitAnimation);\n }\n }\n\n\n return {\n // Android has history.pushState, but it does not update location correctly\n // so let's not use the history API at all.\n // http://code.google.com/p/android/issues/detail?id=17471\n // https://github.com/angular/angular.js/issues/904\n\n // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n // so let's not use the history API also\n // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n // jshint -W018\n history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),\n // jshint +W018\n hashchange: 'onhashchange' in $window &&\n // IE8 compatible mode lies\n (!documentMode || documentMode > 7),\n hasEvent: function(event) {\n // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n // it. In particular the event is not fired when backspace or delete key are pressed or\n // when cut operation is performed.\n if (event == 'input' && msie == 9) return false;\n\n if (isUndefined(eventSupport[event])) {\n var divElm = document.createElement('div');\n eventSupport[event] = 'on' + event in divElm;\n }\n\n return eventSupport[event];\n },\n csp: csp(),\n vendorPrefix: vendorPrefix,\n transitions : transitions,\n animations : animations,\n android: android,\n msie : msie,\n msieDocumentMode: documentMode\n };\n }];\n}\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc service\n * @name $templateRequest\n *\n * @description\n * The `$templateRequest` service downloads the provided template using `$http` and, upon success,\n * stores the contents inside of `$templateCache`. If the HTTP request fails or the response data\n * of the HTTP request is empty then a `$compile` error will be thrown (the exception can be thwarted\n * by setting the 2nd parameter of the function to true).\n *\n * @param {string} tpl The HTTP request template URL\n * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty\n *\n * @return {Promise} the HTTP Promise for the given.\n *\n * @property {number} totalPendingRequests total amount of pending template requests being downloaded.\n */\nfunction $TemplateRequestProvider() {\n this.$get = ['$templateCache', '$http', '$q', function($templateCache, $http, $q) {\n function handleRequestFn(tpl, ignoreRequestError) {\n var self = handleRequestFn;\n self.totalPendingRequests++;\n\n return $http.get(tpl, { cache : $templateCache })\n .then(function(response) {\n var html = response.data;\n if(!html || html.length === 0) {\n return handleError();\n }\n\n self.totalPendingRequests--;\n $templateCache.put(tpl, html);\n return html;\n }, handleError);\n\n function handleError() {\n self.totalPendingRequests--;\n if (!ignoreRequestError) {\n throw $compileMinErr('tpload', 'Failed to load template: {0}', tpl);\n }\n return $q.reject();\n }\n }\n\n handleRequestFn.totalPendingRequests = 0;\n\n return handleRequestFn;\n }];\n}\n\nfunction $$TestabilityProvider() {\n this.$get = ['$rootScope', '$browser', '$location',\n function($rootScope, $browser, $location) {\n\n /**\n * @name $testability\n *\n * @description\n * The private $$testability service provides a collection of methods for use when debugging\n * or by automated test and debugging tools.\n */\n var testability = {};\n\n /**\n * @name $$testability#findBindings\n *\n * @description\n * Returns an array of elements that are bound (via ng-bind or {{}})\n * to expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The binding expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression. Filters and whitespace are ignored.\n */\n testability.findBindings = function(element, expression, opt_exactMatch) {\n var bindings = element.getElementsByClassName('ng-binding');\n var matches = [];\n forEach(bindings, function(binding) {\n var dataBinding = angular.element(binding).data('$binding');\n if (dataBinding) {\n forEach(dataBinding, function(bindingName) {\n if (opt_exactMatch) {\n var matcher = new RegExp('(^|\\\\s)' + expression + '(\\\\s|\\\\||$)');\n if (matcher.test(bindingName)) {\n matches.push(binding);\n }\n } else {\n if (bindingName.indexOf(expression) != -1) {\n matches.push(binding);\n }\n }\n });\n }\n });\n return matches;\n };\n\n /**\n * @name $$testability#findModels\n *\n * @description\n * Returns an array of elements that are two-way found via ng-model to\n * expressions matching the input.\n *\n * @param {Element} element The element root to search from.\n * @param {string} expression The model expression to match.\n * @param {boolean} opt_exactMatch If true, only returns exact matches\n * for the expression.\n */\n testability.findModels = function(element, expression, opt_exactMatch) {\n var prefixes = ['ng-', 'data-ng-', 'ng\\\\:'];\n for (var p = 0; p < prefixes.length; ++p) {\n var attributeEquals = opt_exactMatch ? '=' : '*=';\n var selector = '[' + prefixes[p] + 'model' + attributeEquals + '\"' + expression + '\"]';\n var elements = element.querySelectorAll(selector);\n if (elements.length) {\n return elements;\n }\n }\n };\n\n /**\n * @name $$testability#getLocation\n *\n * @description\n * Shortcut for getting the location in a browser agnostic way. Returns\n * the path, search, and hash. (e.g. /path?a=b#hash)\n */\n testability.getLocation = function() {\n return $location.url();\n };\n\n /**\n * @name $$testability#setLocation\n *\n * @description\n * Shortcut for navigating to a location without doing a full page reload.\n *\n * @param {string} url The location url (path, search and hash,\n * e.g. /path?a=b#hash) to go to.\n */\n testability.setLocation = function(url) {\n if (url !== $location.url()) {\n $location.url(url);\n $rootScope.$digest();\n }\n };\n\n /**\n * @name $$testability#whenStable\n *\n * @description\n * Calls the callback when $timeout and $http requests are completed.\n *\n * @param {function} callback\n */\n testability.whenStable = function(callback) {\n $browser.notifyWhenNoOutstandingRequests(callback);\n };\n\n return testability;\n }];\n}\n\nfunction $TimeoutProvider() {\n this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',\n function($rootScope, $browser, $q, $$q, $exceptionHandler) {\n var deferreds = {};\n\n\n /**\n * @ngdoc service\n * @name $timeout\n *\n * @description\n * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n * block and delegates any exceptions to\n * {@link ng.$exceptionHandler $exceptionHandler} service.\n *\n * The return value of registering a timeout function is a promise, which will be resolved when\n * the timeout is reached and the timeout function is executed.\n *\n * To cancel a timeout request, call `$timeout.cancel(promise)`.\n *\n * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n * synchronously flush the queue of deferred functions.\n *\n * @param {function()} fn A function, whose execution should be delayed.\n * @param {number=} [delay=0] Delay in milliseconds.\n * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this\n * promise will be resolved with is the return value of the `fn` function.\n *\n */\n function timeout(fn, delay, invokeApply) {\n var skipApply = (isDefined(invokeApply) && !invokeApply),\n deferred = (skipApply ? $$q : $q).defer(),\n promise = deferred.promise,\n timeoutId;\n\n timeoutId = $browser.defer(function() {\n try {\n deferred.resolve(fn());\n } catch(e) {\n deferred.reject(e);\n $exceptionHandler(e);\n }\n finally {\n delete deferreds[promise.$$timeoutId];\n }\n\n if (!skipApply) $rootScope.$apply();\n }, delay);\n\n promise.$$timeoutId = timeoutId;\n deferreds[timeoutId] = deferred;\n\n return promise;\n }\n\n\n /**\n * @ngdoc method\n * @name $timeout#cancel\n *\n * @description\n * Cancels a task associated with the `promise`. As a result of this, the promise will be\n * resolved with a rejection.\n *\n * @param {Promise=} promise Promise returned by the `$timeout` function.\n * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n * canceled.\n */\n timeout.cancel = function(promise) {\n if (promise && promise.$$timeoutId in deferreds) {\n deferreds[promise.$$timeoutId].reject('canceled');\n delete deferreds[promise.$$timeoutId];\n return $browser.defer.cancel(promise.$$timeoutId);\n }\n return false;\n };\n\n return timeout;\n }];\n}\n\n// NOTE: The usage of window and document instead of $window and $document here is\n// deliberate. This service depends on the specific behavior of anchor nodes created by the\n// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n// cause us to break tests. In addition, when the browser resolves a URL for XHR, it\n// doesn't know about mocked locations and resolves URLs to the real document - which is\n// exactly the behavior needed here. There is little value is mocking these out for this\n// service.\nvar urlParsingNode = document.createElement(\"a\");\nvar originUrl = urlResolve(window.location.href, true);\n\n\n/**\n *\n * Implementation Notes for non-IE browsers\n * ----------------------------------------\n * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n * results both in the normalizing and parsing of the URL. Normalizing means that a relative\n * URL will be resolved into an absolute URL in the context of the application document.\n * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n * properties are all populated to reflect the normalized URL. This approach has wide\n * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc. See\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *\n * Implementation Notes for IE\n * ---------------------------\n * IE >= 8 and <= 10 normalizes the URL when assigned to the anchor node similar to the other\n * browsers. However, the parsed components will not be set if the URL assigned did not specify\n * them. (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.) We\n * work around that by performing the parsing in a 2nd step by taking a previously normalized\n * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the\n * properties such as protocol, hostname, port, etc.\n *\n * IE7 does not normalize the URL when assigned to an anchor node. (Apparently, it does, if one\n * uses the inner HTML approach to assign the URL as part of an HTML snippet -\n * http://stackoverflow.com/a/472729) However, setting img[src] does normalize the URL.\n * Unfortunately, setting img[src] to something like \"javascript:foo\" on IE throws an exception.\n * Since the primary usage for normalizing URLs is to sanitize such URLs, we can't use that\n * method and IE < 8 is unsupported.\n *\n * References:\n * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n * http://url.spec.whatwg.org/#urlutils\n * https://github.com/angular/angular.js/pull/2902\n * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n *\n * @kind function\n * @param {string} url The URL to be parsed.\n * @description Normalizes and parses a URL.\n * @returns {object} Returns the normalized URL as a dictionary.\n *\n * | member name | Description |\n * |---------------|----------------|\n * | href | A normalized version of the provided URL if it was not an absolute URL |\n * | protocol | The protocol including the trailing colon |\n * | host | The host and port (if the port is non-default) of the normalizedUrl |\n * | search | The search params, minus the question mark |\n * | hash | The hash string, minus the hash symbol\n * | hostname | The hostname\n * | port | The port, without \":\"\n * | pathname | The pathname, beginning with \"/\"\n *\n */\nfunction urlResolve(url, base) {\n var href = url;\n\n if (msie) {\n // Normalize before parse. Refer Implementation Notes on why this is\n // done in two steps on IE.\n urlParsingNode.setAttribute(\"href\", href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/')\n ? urlParsingNode.pathname\n : '/' + urlParsingNode.pathname\n };\n}\n\n/**\n * Parse a request URL and determine whether this is a same-origin request as the application document.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the request is for the same origin as the application document.\n */\nfunction urlIsSameOrigin(requestUrl) {\n var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n return (parsed.protocol === originUrl.protocol &&\n parsed.host === originUrl.host);\n}\n\n/**\n * @ngdoc service\n * @name $window\n *\n * @description\n * A reference to the browser's `window` object. While `window`\n * is globally available in JavaScript, it causes testability problems, because\n * it is a global variable. In angular we always refer to it through the\n * `$window` service, so it may be overridden, removed or mocked for testing.\n *\n * Expressions, like the one defined for the `ngClick` directive in the example\n * below, are evaluated with respect to the current scope. Therefore, there is\n * no risk of inadvertently coding in a dependency on a global value in such an\n * expression.\n *\n * @example\n \n \n \n \n \n ALERT\n \n \n \n it('should display the greeting in the input box', function() {\n element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n // If we click the button it will block the test runner\n // element(':button').click();\n });\n \n \n */\nfunction $WindowProvider(){\n this.$get = valueFn(window);\n}\n\n/* global currencyFilter: true,\n dateFilter: true,\n filterFilter: true,\n jsonFilter: true,\n limitToFilter: true,\n lowercaseFilter: true,\n numberFilter: true,\n orderByFilter: true,\n uppercaseFilter: true,\n */\n\n/**\n * @ngdoc provider\n * @name $filterProvider\n * @description\n *\n * Filters are just functions which transform input to an output. However filters need to be\n * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n * annotated with dependencies and is responsible for creating a filter function.\n *\n * ```js\n * // Filter registration\n * function MyModule($provide, $filterProvider) {\n * // create a service to demonstrate injection (not always needed)\n * $provide.value('greet', function(name){\n * return 'Hello ' + name + '!';\n * });\n *\n * // register a filter factory which uses the\n * // greet service to demonstrate DI.\n * $filterProvider.register('greet', function(greet){\n * // return the filter function which uses the greet service\n * // to generate salutation\n * return function(text) {\n * // filters need to be forgiving so check input validity\n * return text && greet(text) || text;\n * };\n * });\n * }\n * ```\n *\n * The filter function is registered with the `$injector` under the filter name suffix with\n * `Filter`.\n *\n * ```js\n * it('should be the same instance', inject(\n * function($filterProvider) {\n * $filterProvider.register('reverse', function(){\n * return ...;\n * });\n * },\n * function($filter, reverseFilter) {\n * expect($filter('reverse')).toBe(reverseFilter);\n * });\n * ```\n *\n *\n * For more information about how angular filters work, and how to create your own filters, see\n * {@link guide/filter Filters} in the Angular Developer Guide.\n */\n\n/**\n * @ngdoc service\n * @name $filter\n * @kind function\n * @description\n * Filters are used for formatting data displayed to the user.\n *\n * The general syntax in templates is as follows:\n *\n * {{ expression [| filter_name[:parameter_value] ... ] }}\n *\n * @param {String} name Name of the filter function to retrieve\n * @return {Function} the filter function\n * @example\n \n \n \n {{ originalText }}\n {{ filteredText }}\n \n \n\n \n angular.module('filterExample', [])\n .controller('MainCtrl', function($scope, $filter) {\n $scope.originalText = 'hello';\n $scope.filteredText = $filter('uppercase')($scope.originalText);\n });\n \n \n */\n$FilterProvider.$inject = ['$provide'];\nfunction $FilterProvider($provide) {\n var suffix = 'Filter';\n\n /**\n * @ngdoc method\n * @name $filterProvider#register\n * @param {string|Object} name Name of the filter function, or an object map of filters where\n * the keys are the filter names and the values are the filter factories.\n * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n * of the registered filter instances.\n */\n function register(name, factory) {\n if(isObject(name)) {\n var filters = {};\n forEach(name, function(filter, key) {\n filters[key] = register(key, filter);\n });\n return filters;\n } else {\n return $provide.factory(name + suffix, factory);\n }\n }\n this.register = register;\n\n this.$get = ['$injector', function($injector) {\n return function(name) {\n return $injector.get(name + suffix);\n };\n }];\n\n ////////////////////////////////////////\n\n /* global\n currencyFilter: false,\n dateFilter: false,\n filterFilter: false,\n jsonFilter: false,\n limitToFilter: false,\n lowercaseFilter: false,\n numberFilter: false,\n orderByFilter: false,\n uppercaseFilter: false,\n */\n\n register('currency', currencyFilter);\n register('date', dateFilter);\n register('filter', filterFilter);\n register('json', jsonFilter);\n register('limitTo', limitToFilter);\n register('lowercase', lowercaseFilter);\n register('number', numberFilter);\n register('orderBy', orderByFilter);\n register('uppercase', uppercaseFilter);\n}\n\n/**\n * @ngdoc filter\n * @name filter\n * @kind function\n *\n * @description\n * Selects a subset of items from `array` and returns it as a new array.\n *\n * @param {Array} array The source array.\n * @param {string|Object|function()} expression The predicate to be used for selecting items from\n * `array`.\n *\n * Can be one of:\n *\n * - `string`: The string is evaluated as an expression and the resulting value is used for substring match against\n * the contents of the `array`. All strings or objects with string properties in `array` that contain this string\n * will be returned. The predicate can be negated by prefixing the string with `!`.\n *\n * - `Object`: A pattern object can be used to filter specific properties on objects contained\n * by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n * which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n * property name `$` can be used (as in `{$:\"text\"}`) to accept a match against any\n * property of the object. That's equivalent to the simple substring match with a `string`\n * as described above. The predicate can be negated by prefixing the string with `!`.\n * For Example `{name: \"!M\"}` predicate will return an array of items which have property `name`\n * not containing \"M\".\n *\n * - `function(value, index)`: A predicate function can be used to write arbitrary filters. The\n * function is called for each element of `array`. The final result is an array of those\n * elements that the predicate returned true for.\n *\n * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in\n * determining if the expected value (from the filter expression) and actual value (from\n * the object in the array) should be considered a match.\n *\n * Can be one of:\n *\n * - `function(actual, expected)`:\n * The function will be given the object value and the predicate value to compare and\n * should return true if the item should be included in filtered result.\n *\n * - `true`: A shorthand for `function(actual, expected) { return angular.equals(expected, actual)}`.\n * this is essentially strict comparison of expected and actual.\n *\n * - `false|undefined`: A short hand for a function which will look for a substring match in case\n * insensitive way.\n *\n * @example\n \n \n \n\n Search: \n \n NamePhone\n \n {{friend.name}}\n {{friend.phone}}\n \n \n \n Any: \n Name only \n Phone only \n Equality \n \n NamePhone\n \n {{friendObj.name}}\n {{friendObj.phone}}\n \n \n \n \n var expectFriendNames = function(expectedNames, key) {\n element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n arr.forEach(function(wd, i) {\n expect(wd.getText()).toMatch(expectedNames[i]);\n });\n });\n };\n\n it('should search across all fields when filtering with a string', function() {\n var searchText = element(by.model('searchText'));\n searchText.clear();\n searchText.sendKeys('m');\n expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\n searchText.clear();\n searchText.sendKeys('76');\n expectFriendNames(['John', 'Julie'], 'friend');\n });\n\n it('should search in specific fields when filtering with a predicate object', function() {\n var searchAny = element(by.model('search.$'));\n searchAny.clear();\n searchAny.sendKeys('i');\n expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n });\n it('should use a equal comparison when comparator is true', function() {\n var searchName = element(by.model('search.name'));\n var strict = element(by.model('strict'));\n searchName.clear();\n searchName.sendKeys('Julie');\n strict.click();\n expectFriendNames(['Julie'], 'friendObj');\n });\n \n \n */\nfunction filterFilter() {\n return function(array, expression, comparator) {\n if (!isArray(array)) return array;\n\n var comparatorType = typeof(comparator),\n predicates = [];\n\n predicates.check = function(value, index) {\n for (var j = 0; j < predicates.length; j++) {\n if(!predicates[j](value, index)) {\n return false;\n }\n }\n return true;\n };\n\n if (comparatorType !== 'function') {\n if (comparatorType === 'boolean' && comparator) {\n comparator = function(obj, text) {\n return angular.equals(obj, text);\n };\n } else {\n comparator = function(obj, text) {\n if (obj && text && typeof obj === 'object' && typeof text === 'object') {\n for (var objKey in obj) {\n if (objKey.charAt(0) !== '$' && hasOwnProperty.call(obj, objKey) &&\n comparator(obj[objKey], text[objKey])) {\n return true;\n }\n }\n return false;\n }\n text = (''+text).toLowerCase();\n return (''+obj).toLowerCase().indexOf(text) > -1;\n };\n }\n }\n\n var search = function(obj, text){\n if (typeof text == 'string' && text.charAt(0) === '!') {\n return !search(obj, text.substr(1));\n }\n switch (typeof obj) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n return comparator(obj, text);\n case \"object\":\n switch (typeof text) {\n case \"object\":\n return comparator(obj, text);\n default:\n for ( var objKey in obj) {\n if (objKey.charAt(0) !== '$' && search(obj[objKey], text)) {\n return true;\n }\n }\n break;\n }\n return false;\n case \"array\":\n for ( var i = 0; i < obj.length; i++) {\n if (search(obj[i], text)) {\n return true;\n }\n }\n return false;\n default:\n return false;\n }\n };\n switch (typeof expression) {\n case \"boolean\":\n case \"number\":\n case \"string\":\n // Set up expression object and fall through\n expression = {$:expression};\n // jshint -W086\n case \"object\":\n // jshint +W086\n for (var key in expression) {\n (function(path) {\n if (typeof expression[path] === 'undefined') return;\n predicates.push(function(value) {\n return search(path == '$' ? value : (value && value[path]), expression[path]);\n });\n })(key);\n }\n break;\n case 'function':\n predicates.push(expression);\n break;\n default:\n return array;\n }\n var filtered = [];\n for ( var j = 0; j < array.length; j++) {\n var value = array[j];\n if (predicates.check(value, j)) {\n filtered.push(value);\n }\n }\n return filtered;\n };\n}\n\n/**\n * @ngdoc filter\n * @name currency\n * @kind function\n *\n * @description\n * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n * symbol for current locale is used.\n *\n * @param {number} amount Input to filter.\n * @param {string=} symbol Currency symbol or identifier to be displayed.\n * @returns {string} Formatted number.\n *\n *\n * @example\n \n \n \n \n \n default currency symbol ($): {{amount | currency}}\n custom currency identifier (USD$): {{amount | currency:\"USD$\"}}\n \n \n \n it('should init with 1234.56', function() {\n expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('USD$1,234.56');\n });\n it('should update', function() {\n if (browser.params.browser == 'safari') {\n // Safari does not understand the minus key. See\n // https://github.com/angular/protractor/issues/481\n return;\n }\n element(by.model('amount')).clear();\n element(by.model('amount')).sendKeys('-1234');\n expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)');\n expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('(USD$1,234.00)');\n });\n \n \n */\ncurrencyFilter.$inject = ['$locale'];\nfunction currencyFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(amount, currencySymbol){\n if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;\n\n // if null or undefined pass it through\n return (amount == null)\n ? amount\n : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2).\n replace(/\\u00A4/g, currencySymbol);\n };\n}\n\n/**\n * @ngdoc filter\n * @name number\n * @kind function\n *\n * @description\n * Formats a number as text.\n *\n * If the input is not a number an empty string is returned.\n *\n * @param {number|string} number Number to format.\n * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n * If this is not provided then the fraction size is computed from the current locale's number\n * formatting pattern. In the case of the default locale, it will be 3.\n * @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit.\n *\n * @example\n \n \n \n \n Enter number: \n Default formatting: {{val | number}}\n No fractions: {{val | number:0}}\n Negative number: {{-val | number:4}}\n \n \n \n it('should format numbers', function() {\n expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n });\n\n it('should update', function() {\n element(by.model('val')).clear();\n element(by.model('val')).sendKeys('3374.333');\n expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n });\n \n \n */\n\n\nnumberFilter.$inject = ['$locale'];\nfunction numberFilter($locale) {\n var formats = $locale.NUMBER_FORMATS;\n return function(number, fractionSize) {\n\n // if null or undefined pass it through\n return (number == null)\n ? number\n : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n fractionSize);\n };\n}\n\nvar DECIMAL_SEP = '.';\nfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n if (!isFinite(number) || isObject(number)) return '';\n\n var isNegative = number < 0;\n number = Math.abs(number);\n var numStr = number + '',\n formatedText = '',\n parts = [];\n\n var hasExponent = false;\n if (numStr.indexOf('e') !== -1) {\n var match = numStr.match(/([\\d\\.]+)e(-?)(\\d+)/);\n if (match && match[2] == '-' && match[3] > fractionSize + 1) {\n numStr = '0';\n number = 0;\n } else {\n formatedText = numStr;\n hasExponent = true;\n }\n }\n\n if (!hasExponent) {\n var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;\n\n // determine fractionSize if it is not specified\n if (isUndefined(fractionSize)) {\n fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);\n }\n\n // safely round numbers in JS without hitting imprecisions of floating-point arithmetics\n // inspired by:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\n number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize);\n\n if (number === 0) {\n isNegative = false;\n }\n\n var fraction = ('' + number).split(DECIMAL_SEP);\n var whole = fraction[0];\n fraction = fraction[1] || '';\n\n var i, pos = 0,\n lgroup = pattern.lgSize,\n group = pattern.gSize;\n\n if (whole.length >= (lgroup + group)) {\n pos = whole.length - lgroup;\n for (i = 0; i < pos; i++) {\n if ((pos - i)%group === 0 && i !== 0) {\n formatedText += groupSep;\n }\n formatedText += whole.charAt(i);\n }\n }\n\n for (i = pos; i < whole.length; i++) {\n if ((whole.length - i)%lgroup === 0 && i !== 0) {\n formatedText += groupSep;\n }\n formatedText += whole.charAt(i);\n }\n\n // format fraction part.\n while(fraction.length < fractionSize) {\n fraction += '0';\n }\n\n if (fractionSize && fractionSize !== \"0\") formatedText += decimalSep + fraction.substr(0, fractionSize);\n } else {\n\n if (fractionSize > 0 && number > -1 && number < 1) {\n formatedText = number.toFixed(fractionSize);\n }\n }\n\n parts.push(isNegative ? pattern.negPre : pattern.posPre);\n parts.push(formatedText);\n parts.push(isNegative ? pattern.negSuf : pattern.posSuf);\n return parts.join('');\n}\n\nfunction padNumber(num, digits, trim) {\n var neg = '';\n if (num < 0) {\n neg = '-';\n num = -num;\n }\n num = '' + num;\n while(num.length < digits) num = '0' + num;\n if (trim)\n num = num.substr(num.length - digits);\n return neg + num;\n}\n\n\nfunction dateGetter(name, size, offset, trim) {\n offset = offset || 0;\n return function(date) {\n var value = date['get' + name]();\n if (offset > 0 || value > -offset)\n value += offset;\n if (value === 0 && offset == -12 ) value = 12;\n return padNumber(value, size, trim);\n };\n}\n\nfunction dateStrGetter(name, shortForm) {\n return function(date, formats) {\n var value = date['get' + name]();\n var get = uppercase(shortForm ? ('SHORT' + name) : name);\n\n return formats[get][value];\n };\n}\n\nfunction timeZoneGetter(date) {\n var zone = -1 * date.getTimezoneOffset();\n var paddedZone = (zone >= 0) ? \"+\" : \"\";\n\n paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n padNumber(Math.abs(zone % 60), 2);\n\n return paddedZone;\n}\n\nfunction getFirstThursdayOfYear(year) {\n // 0 = index of January\n var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();\n // 4 = index of Thursday (+1 to account for 1st = 5)\n // 11 = index of *next* Thursday (+1 account for 1st = 12)\n return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);\n}\n\nfunction getThursdayThisWeek(datetime) {\n return new Date(datetime.getFullYear(), datetime.getMonth(),\n // 4 = index of Thursday\n datetime.getDate() + (4 - datetime.getDay()));\n}\n\nfunction weekGetter(size) {\n return function(date) {\n var firstThurs = getFirstThursdayOfYear(date.getFullYear()),\n thisThurs = getThursdayThisWeek(date);\n\n var diff = +thisThurs - +firstThurs,\n result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week\n\n return padNumber(result, size);\n };\n}\n\nfunction ampmGetter(date, formats) {\n return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n}\n\nvar DATE_FORMATS = {\n yyyy: dateGetter('FullYear', 4),\n yy: dateGetter('FullYear', 2, 0, true),\n y: dateGetter('FullYear', 1),\n MMMM: dateStrGetter('Month'),\n MMM: dateStrGetter('Month', true),\n MM: dateGetter('Month', 2, 1),\n M: dateGetter('Month', 1, 1),\n dd: dateGetter('Date', 2),\n d: dateGetter('Date', 1),\n HH: dateGetter('Hours', 2),\n H: dateGetter('Hours', 1),\n hh: dateGetter('Hours', 2, -12),\n h: dateGetter('Hours', 1, -12),\n mm: dateGetter('Minutes', 2),\n m: dateGetter('Minutes', 1),\n ss: dateGetter('Seconds', 2),\n s: dateGetter('Seconds', 1),\n // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n sss: dateGetter('Milliseconds', 3),\n EEEE: dateStrGetter('Day'),\n EEE: dateStrGetter('Day', true),\n a: ampmGetter,\n Z: timeZoneGetter,\n ww: weekGetter(2),\n w: weekGetter(1)\n};\n\nvar DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,\n NUMBER_STRING = /^\\-?\\d+$/;\n\n/**\n * @ngdoc filter\n * @name date\n * @kind function\n *\n * @description\n * Formats `date` to a string based on the requested `format`.\n *\n * `format` string can be composed of the following elements:\n *\n * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n * * `'MMMM'`: Month in year (January-December)\n * * `'MMM'`: Month in year (Jan-Dec)\n * * `'MM'`: Month in year, padded (01-12)\n * * `'M'`: Month in year (1-12)\n * * `'dd'`: Day in month, padded (01-31)\n * * `'d'`: Day in month (1-31)\n * * `'EEEE'`: Day in Week,(Sunday-Saturday)\n * * `'EEE'`: Day in Week, (Sun-Sat)\n * * `'HH'`: Hour in day, padded (00-23)\n * * `'H'`: Hour in day (0-23)\n * * `'hh'`: Hour in AM/PM, padded (01-12)\n * * `'h'`: Hour in AM/PM, (1-12)\n * * `'mm'`: Minute in hour, padded (00-59)\n * * `'m'`: Minute in hour (0-59)\n * * `'ss'`: Second in minute, padded (00-59)\n * * `'s'`: Second in minute (0-59)\n * * `'.sss' or ',sss'`: Millisecond in second, padded (000-999)\n * * `'a'`: AM/PM marker\n * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n * * `'ww'`: ISO-8601 week of year (00-53)\n * * `'w'`: ISO-8601 week of year (0-53)\n *\n * `format` string can also be one of the following predefined\n * {@link guide/i18n localizable formats}:\n *\n * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n * (e.g. Sep 3, 2010 12:05:08 PM)\n * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM)\n * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale\n * (e.g. Friday, September 3, 2010)\n * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)\n * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)\n * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)\n * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)\n *\n * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.\n * `\"h 'in the morning'\"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence\n * (e.g. `\"h 'o''clock'\"`).\n *\n * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its\n * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n * specified in the string input, the time is considered to be in the local timezone.\n * @param {string=} format Formatting rules (see Description). If not specified,\n * `mediumDate` is used.\n * @param {string=} timezone Timezone to be used for formatting. Right now, only `'UTC'` is supported.\n * If not specified, the timezone of the browser will be used.\n * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n *\n * @example\n \n \n {{1288323623006 | date:'medium'}}:\n {{1288323623006 | date:'medium'}}\n {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}:\n {{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}\n {{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}:\n {{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}\n {{1288323623006 | date:\"MM/dd/yyyy 'at' h:mma\"}}:\n {{'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"}}\n \n \n it('should format date', function() {\n expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n toMatch(/2010\\-10\\-2\\d \\d{2}:\\d{2}:\\d{2} (\\-|\\+)?\\d{4}/);\n expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n expect(element(by.binding(\"'1288323623006' | date:\\\"MM/dd/yyyy 'at' h:mma\\\"\")).getText()).\n toMatch(/10\\/2\\d\\/2010 at \\d{1,2}:\\d{2}(AM|PM)/);\n });\n \n \n */\ndateFilter.$inject = ['$locale'];\nfunction dateFilter($locale) {\n\n\n var R_ISO8601_STR = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n // 1 2 3 4 5 6 7 8 9 10 11\n function jsonStringToDate(string) {\n var match;\n if (match = string.match(R_ISO8601_STR)) {\n var date = new Date(0),\n tzHour = 0,\n tzMin = 0,\n dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n if (match[9]) {\n tzHour = int(match[9] + match[10]);\n tzMin = int(match[9] + match[11]);\n }\n dateSetter.call(date, int(match[1]), int(match[2]) - 1, int(match[3]));\n var h = int(match[4]||0) - tzHour;\n var m = int(match[5]||0) - tzMin;\n var s = int(match[6]||0);\n var ms = Math.round(parseFloat('0.' + (match[7]||0)) * 1000);\n timeSetter.call(date, h, m, s, ms);\n return date;\n }\n return string;\n }\n\n\n return function(date, format, timezone) {\n var text = '',\n parts = [],\n fn, match;\n\n format = format || 'mediumDate';\n format = $locale.DATETIME_FORMATS[format] || format;\n if (isString(date)) {\n date = NUMBER_STRING.test(date) ? int(date) : jsonStringToDate(date);\n }\n\n if (isNumber(date)) {\n date = new Date(date);\n }\n\n if (!isDate(date)) {\n return date;\n }\n\n while(format) {\n match = DATE_FORMATS_SPLIT.exec(format);\n if (match) {\n parts = concat(parts, match, 1);\n format = parts.pop();\n } else {\n parts.push(format);\n format = null;\n }\n }\n\n if (timezone && timezone === 'UTC') {\n date = new Date(date.getTime());\n date.setMinutes(date.getMinutes() + date.getTimezoneOffset());\n }\n forEach(parts, function(value){\n fn = DATE_FORMATS[value];\n text += fn ? fn(date, $locale.DATETIME_FORMATS)\n : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n });\n\n return text;\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name json\n * @kind function\n *\n * @description\n * Allows you to convert a JavaScript object into JSON string.\n *\n * This filter is mostly useful for debugging. When using the double curly {{value}} notation\n * the binding is automatically converted to JSON.\n *\n * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n * @returns {string} JSON string.\n *\n *\n * @example\n \n \n {{ {'name':'value'} | json }}\n \n \n it('should jsonify filtered objects', function() {\n expect(element(by.binding(\"{'name':'value'}\")).getText()).toMatch(/\\{\\n \"name\": ?\"value\"\\n}/);\n });\n \n \n *\n */\nfunction jsonFilter() {\n return function(object) {\n return toJson(object, true);\n };\n}\n\n\n/**\n * @ngdoc filter\n * @name lowercase\n * @kind function\n * @description\n * Converts string to lowercase.\n * @see angular.lowercase\n */\nvar lowercaseFilter = valueFn(lowercase);\n\n\n/**\n * @ngdoc filter\n * @name uppercase\n * @kind function\n * @description\n * Converts string to uppercase.\n * @see angular.uppercase\n */\nvar uppercaseFilter = valueFn(uppercase);\n\n/**\n * @ngdoc filter\n * @name limitTo\n * @kind function\n *\n * @description\n * Creates a new array or string containing only a specified number of elements. The elements\n * are taken from either the beginning or the end of the source array, string or number, as specified by\n * the value and sign (positive or negative) of `limit`. If a number is used as input, it is\n * converted to a string.\n *\n * @param {Array|string|number} input Source array, string or number to be limited.\n * @param {string|number} limit The length of the returned array or string. If the `limit` number\n * is positive, `limit` number of items from the beginning of the source array/string are copied.\n * If the number is negative, `limit` number of items from the end of the source array/string\n * are copied. The `limit` will be trimmed if it exceeds `array.length`\n * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array\n * had less than `limit` elements.\n *\n * @example\n \n \n \n \n Limit {{numbers}} to: \n Output numbers: {{ numbers | limitTo:numLimit }}\n Limit {{letters}} to: \n Output letters: {{ letters | limitTo:letterLimit }}\n Limit {{longNumber}} to: \n Output long number: {{ longNumber | limitTo:longNumberLimit }}\n \n \n \n var numLimitInput = element(by.model('numLimit'));\n var letterLimitInput = element(by.model('letterLimit'));\n var longNumberLimitInput = element(by.model('longNumberLimit'));\n var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));\n\n it('should limit the number array to first three items', function() {\n expect(numLimitInput.getAttribute('value')).toBe('3');\n expect(letterLimitInput.getAttribute('value')).toBe('3');\n expect(longNumberLimitInput.getAttribute('value')).toBe('3');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n expect(limitedLetters.getText()).toEqual('Output letters: abc');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 234');\n });\n\n // There is a bug in safari and protractor that doesn't like the minus key\n // it('should update the output when -3 is entered', function() {\n // numLimitInput.clear();\n // numLimitInput.sendKeys('-3');\n // letterLimitInput.clear();\n // letterLimitInput.sendKeys('-3');\n // longNumberLimitInput.clear();\n // longNumberLimitInput.sendKeys('-3');\n // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n // expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n // expect(limitedLongNumber.getText()).toEqual('Output long number: 342');\n // });\n\n it('should not exceed the maximum size of input array', function() {\n numLimitInput.clear();\n numLimitInput.sendKeys('100');\n letterLimitInput.clear();\n letterLimitInput.sendKeys('100');\n longNumberLimitInput.clear();\n longNumberLimitInput.sendKeys('100');\n expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');\n });\n \n \n*/\nfunction limitToFilter(){\n return function(input, limit) {\n if (isNumber(input)) input = input.toString();\n if (!isArray(input) && !isString(input)) return input;\n\n if (Math.abs(Number(limit)) === Infinity) {\n limit = Number(limit);\n } else {\n limit = int(limit);\n }\n\n if (isString(input)) {\n //NaN check on limit\n if (limit) {\n return limit >= 0 ? input.slice(0, limit) : input.slice(limit, input.length);\n } else {\n return \"\";\n }\n }\n\n var out = [],\n i, n;\n\n // if abs(limit) exceeds maximum length, trim it\n if (limit > input.length)\n limit = input.length;\n else if (limit < -input.length)\n limit = -input.length;\n\n if (limit > 0) {\n i = 0;\n n = limit;\n } else {\n i = input.length + limit;\n n = input.length;\n }\n\n for (; i} expression A predicate to be\n * used by the comparator to determine the order of elements.\n *\n * Can be one of:\n *\n * - `function`: Getter function. The result of this function will be sorted using the\n * `<`, `=`, `>` operator.\n * - `string`: An Angular expression. The result of this expression is used to compare elements\n * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by\n * 3 first characters of a property called `name`). The result of a constant expression\n * is interpreted as a property name to be used in comparisons (for example `\"special name\"`\n * to sort object by the value of their `special name` property). An expression can be\n * optionally prefixed with `+` or `-` to control ascending or descending sort order\n * (for example, `+name` or `-name`).\n * - `Array`: An array of function or string predicates. The first predicate in the array\n * is used for sorting, but when two items are equivalent, the next predicate is used.\n *\n * @param {boolean=} reverse Reverse the order of the array.\n * @returns {Array} Sorted copy of the source array.\n *\n * @example\n \n \n \n \n Sorting predicate = {{predicate}}; reverse = {{reverse}}\n \n [ unsorted ]\n \n \n Name\n (^)\n Phone Number\n Age\n \n \n {{friend.name}}\n {{friend.phone}}\n {{friend.age}}\n \n \n \n \n \n *\n * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the\n * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the\n * desired parameters.\n *\n * Example:\n *\n * @example\n \n \n \n \n \n Name\n (^)\n Phone Number\n Age\n \n \n {{friend.name}}\n {{friend.phone}}\n {{friend.age}}\n \n \n \n \n\n \n angular.module('orderByExample', [])\n .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {\n var orderBy = $filter('orderBy');\n $scope.friends = [\n { name: 'John', phone: '555-1212', age: 10 },\n { name: 'Mary', phone: '555-9876', age: 19 },\n { name: 'Mike', phone: '555-4321', age: 21 },\n { name: 'Adam', phone: '555-5678', age: 35 },\n { name: 'Julie', phone: '555-8765', age: 29 }\n ];\n $scope.order = function(predicate, reverse) {\n $scope.friends = orderBy($scope.friends, predicate, reverse);\n };\n $scope.order('-age',false);\n }]);\n \n\n */\norderByFilter.$inject = ['$parse'];\nfunction orderByFilter($parse){\n return function(array, sortPredicate, reverseOrder) {\n if (!(isArrayLike(array))) return array;\n if (!sortPredicate) return array;\n sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];\n sortPredicate = sortPredicate.map(function(predicate){\n var descending = false, get = predicate || identity;\n if (isString(predicate)) {\n if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {\n descending = predicate.charAt(0) == '-';\n predicate = predicate.substring(1);\n }\n get = $parse(predicate);\n if (get.constant) {\n var key = get();\n return reverseComparator(function(a,b) {\n return compare(a[key], b[key]);\n }, descending);\n }\n }\n return reverseComparator(function(a,b){\n return compare(get(a),get(b));\n }, descending);\n });\n var arrayCopy = [];\n for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); }\n return arrayCopy.sort(reverseComparator(comparator, reverseOrder));\n\n function comparator(o1, o2){\n for ( var i = 0; i < sortPredicate.length; i++) {\n var comp = sortPredicate[i](o1, o2);\n if (comp !== 0) return comp;\n }\n return 0;\n }\n function reverseComparator(comp, descending) {\n return descending\n ? function(a,b){return comp(b,a);}\n : comp;\n }\n function compare(v1, v2){\n var t1 = typeof v1;\n var t2 = typeof v2;\n if (t1 == t2) {\n if (isDate(v1) && isDate(v2)) {\n v1 = v1.valueOf();\n v2 = v2.valueOf();\n }\n if (t1 == \"string\") {\n v1 = v1.toLowerCase();\n v2 = v2.toLowerCase();\n }\n if (v1 === v2) return 0;\n return v1 < v2 ? -1 : 1;\n } else {\n return t1 < t2 ? -1 : 1;\n }\n }\n };\n}\n\nfunction ngDirective(directive) {\n if (isFunction(directive)) {\n directive = {\n link: directive\n };\n }\n directive.restrict = directive.restrict || 'AC';\n return valueFn(directive);\n}\n\n/**\n * @ngdoc directive\n * @name a\n * @restrict E\n *\n * @description\n * Modifies the default behavior of the html A tag so that the default action is prevented when\n * the href attribute is empty.\n *\n * This change permits the easy creation of action links with the `ngClick` directive\n * without changing the location or causing page reloads, e.g.:\n * `Add Item`\n */\nvar htmlAnchorDirective = valueFn({\n restrict: 'E',\n compile: function(element, attr) {\n\n if (msie <= 8) {\n\n // turn link into a stylable link in IE\n // but only if it doesn't have name attribute, in which case it's an anchor\n if (!attr.href && !attr.name) {\n attr.$set('href', '');\n }\n\n // add a comment node to anchors to workaround IE bug that causes element content to be reset\n // to new attribute content if attribute is updated with value containing @ and element also\n // contains value with @\n // see issue #1949\n element.append(document.createComment('IE fix'));\n }\n\n if (!attr.href && !attr.xlinkHref && !attr.name) {\n return function(scope, element) {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n 'xlink:href' : 'href';\n element.on('click', function(event){\n // if we have no href url, then don't navigate anywhere.\n if (!element.attr(href)) {\n event.preventDefault();\n }\n });\n };\n }\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngHref\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in an href attribute will\n * make the link go to the wrong URL if the user clicks it before\n * Angular has a chance to replace the `{{hash}}` markup with its\n * value. Until Angular replaces the markup the link will be broken\n * and will most likely return a 404 error.\n *\n * The `ngHref` directive solves this problem.\n *\n * The wrong way to write it:\n * ```html\n * link1\n * ```\n *\n * The correct way to write it:\n * ```html\n * link1\n * ```\n *\n * @element A\n * @param {template} ngHref any string which can contain `{{}}` markup.\n *\n * @example\n * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n * in links and their different behaviors:\n \n \n \n link 1 (link, don't reload)\n link 2 (link, don't reload)\n link 3 (link, reload!)\n anchor (link, don't reload)\n anchor (no link)\n link (link, change location)\n \n \n it('should execute ng-click but not reload when href without value', function() {\n element(by.id('link-1')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when href empty string', function() {\n element(by.id('link-2')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click and change url when ng-href specified', function() {\n expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\n element(by.id('link-3')).click();\n\n // At this point, we navigate away from an Angular page, so we need\n // to use browser.driver to get the base webdriver.\n\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/123$/);\n });\n }, 5000, 'page should navigate to /123');\n });\n\n xit('should execute ng-click but not reload when href empty string and name specified', function() {\n element(by.id('link-4')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n });\n\n it('should execute ng-click but not reload when no href but name specified', function() {\n element(by.id('link-5')).click();\n expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n });\n\n it('should only change url when only ng-href', function() {\n element(by.model('value')).clear();\n element(by.model('value')).sendKeys('6');\n expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\n element(by.id('link-6')).click();\n\n // At this point, we navigate away from an Angular page, so we need\n // to use browser.driver to get the base webdriver.\n browser.wait(function() {\n return browser.driver.getCurrentUrl().then(function(url) {\n return url.match(/\\/6$/);\n });\n }, 5000, 'page should navigate to /6');\n });\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngSrc\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `src` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrc` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * \n * ```\n *\n * The correct way to write it:\n * ```html\n * \n * ```\n *\n * @element IMG\n * @param {template} ngSrc any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngSrcset\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrcset` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * \n * ```\n *\n * The correct way to write it:\n * ```html\n * \n * ```\n *\n * @element IMG\n * @param {template} ngSrcset any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngDisabled\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * We shouldn't do this, because it will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:\n * ```html\n * \n * Disabled\n * \n * ```\n *\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as disabled. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngDisabled` directive solves this problem for the `disabled` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n \n \n Click me to toggle: \n Button\n \n \n it('should toggle button', function() {\n expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();\n });\n \n \n *\n * @element INPUT\n * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,\n * then special attribute \"disabled\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngChecked\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as checked. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngChecked` directive solves this problem for the `checked` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me to check both: \n \n \n \n it('should check both checkBoxes', function() {\n expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();\n element(by.model('master')).click();\n expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();\n });\n \n \n *\n * @element INPUT\n * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,\n * then special attribute \"checked\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngReadonly\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as readonly. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngReadonly` directive solves this problem for the `readonly` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me to make text readonly: \n \n \n \n it('should toggle readonly attr', function() {\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n element(by.model('checked')).click();\n expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n });\n \n \n *\n * @element INPUT\n * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,\n * then special attribute \"readonly\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSelected\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as selected. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngSelected` directive solves this problem for the `selected` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n \n \n Check me to select: \n \n Hello!\n Greetings!\n \n \n \n it('should select Greetings!', function() {\n expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n element(by.model('selected')).click();\n expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n });\n \n \n *\n * @element OPTION\n * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,\n * then special attribute \"selected\" will be set on the element\n */\n\n/**\n * @ngdoc directive\n * @name ngOpen\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as open. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngOpen` directive solves this problem for the `open` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n \n \n Check me check multiple: \n \n Show/Hide me\n \n \n \n it('should toggle open', function() {\n expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n element(by.model('open')).click();\n expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n });\n \n \n *\n * @element DETAILS\n * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,\n * then special attribute \"open\" will be set on the element\n */\n\nvar ngAttributeAliasDirectives = {};\n\n\n// boolean attrs are evaluated\nforEach(BOOLEAN_ATTR, function(propName, attrName) {\n // binding to multiple is not supported\n if (propName == \"multiple\") return;\n\n var normalized = directiveNormalize('ng-' + attrName);\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n restrict: 'A',\n priority: 100,\n link: function(scope, element, attr) {\n scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n attr.$set(attrName, !!value);\n });\n }\n };\n };\n});\n\n// aliased input attrs are evaluated\nforEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {\n ngAttributeAliasDirectives[ngAttr] = function() {\n return {\n priority: 100,\n link: function(scope, element, attr) {\n //special case ngPattern when a literal regular expression value\n //is used as the expression (this way we don't have to watch anything).\n if (ngAttr === \"ngPattern\" && attr.ngPattern.charAt(0) == \"/\") {\n var match = attr.ngPattern.match(REGEX_STRING_REGEXP);\n if (match) {\n attr.$set(\"ngPattern\", new RegExp(match[1], match[2]));\n return;\n }\n }\n\n scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {\n attr.$set(ngAttr, value);\n });\n }\n };\n };\n});\n\n// ng-src, ng-srcset, ng-href are interpolated\nforEach(['src', 'srcset', 'href'], function(attrName) {\n var normalized = directiveNormalize('ng-' + attrName);\n ngAttributeAliasDirectives[normalized] = function() {\n return {\n priority: 99, // it needs to run after the attributes are interpolated\n link: function(scope, element, attr) {\n var propName = attrName,\n name = attrName;\n\n if (attrName === 'href' &&\n toString.call(element.prop('href')) === '[object SVGAnimatedString]') {\n name = 'xlinkHref';\n attr.$attr[name] = 'xlink:href';\n propName = null;\n }\n\n attr.$observe(normalized, function(value) {\n if (!value) {\n if (attrName === 'href') {\n attr.$set(name, null);\n }\n return;\n }\n\n attr.$set(name, value);\n\n // on IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n // to set the property as well to achieve the desired effect.\n // we use attr[attrName] value since $set can sanitize the url.\n if (msie && propName) element.prop(propName, attr[name]);\n });\n }\n };\n };\n});\n\n/* global -nullFormCtrl, -SUBMITTED_CLASS, addSetValidityMethod: true\n */\nvar nullFormCtrl = {\n $addControl: noop,\n $$renameControl: nullFormRenameControl,\n $removeControl: noop,\n $setValidity: noop,\n $$setPending: noop,\n $setDirty: noop,\n $setPristine: noop,\n $setSubmitted: noop,\n $$clearControlValidity: noop\n},\nSUBMITTED_CLASS = 'ng-submitted';\n\nfunction nullFormRenameControl(control, name) {\n control.$name = name;\n}\n\n/**\n * @ngdoc type\n * @name form.FormController\n *\n * @property {boolean} $pristine True if user has not interacted with the form yet.\n * @property {boolean} $dirty True if user has already interacted with the form.\n * @property {boolean} $valid True if all of the containing forms and controls are valid.\n * @property {boolean} $invalid True if at least one containing control or form is invalid.\n * @property {boolean} $submitted True if user has submitted the form even if its invalid.\n *\n * @property {Object} $error Is an object hash, containing references to controls or\n * forms with failing validators, where:\n *\n * - keys are validation tokens (error names),\n * - values are arrays of controls or forms that have a failing validator for given error name.\n *\n * Built-in validation tokens:\n *\n * - `email`\n * - `max`\n * - `maxlength`\n * - `min`\n * - `minlength`\n * - `number`\n * - `pattern`\n * - `required`\n * - `url`\n *\n * @description\n * `FormController` keeps track of all its controls and nested forms as well as the state of them,\n * such as being valid/invalid or dirty/pristine.\n *\n * Each {@link ng.directive:form form} directive creates an instance\n * of `FormController`.\n *\n */\n//asks for $scope to fool the BC controller module\nFormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];\nfunction FormController(element, attrs, $scope, $animate, $interpolate) {\n var form = this,\n controls = [];\n\n var parentForm = form.$$parentForm = element.parent().controller('form') || nullFormCtrl;\n\n // init state\n form.$error = {};\n form.$$success = {};\n form.$pending = undefined;\n form.$name = $interpolate(attrs.name || attrs.ngForm || '')($scope);\n form.$dirty = false;\n form.$pristine = true;\n form.$valid = true;\n form.$invalid = false;\n form.$submitted = false;\n\n parentForm.$addControl(form);\n\n // Setup initial state of the control\n element.addClass(PRISTINE_CLASS);\n\n /**\n * @ngdoc method\n * @name form.FormController#$rollbackViewValue\n *\n * @description\n * Rollback all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is typically needed by the reset button of\n * a form that uses `ng-model-options` to pend updates.\n */\n form.$rollbackViewValue = function() {\n forEach(controls, function(control) {\n control.$rollbackViewValue();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$commitViewValue\n *\n * @description\n * Commit all form controls pending updates to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n form.$commitViewValue = function() {\n forEach(controls, function(control) {\n control.$commitViewValue();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$addControl\n *\n * @description\n * Register a control with the form.\n *\n * Input elements using ngModelController do this automatically when they are linked.\n */\n form.$addControl = function(control) {\n // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n // and not added to the scope. Now we throw an error.\n assertNotHasOwnProperty(control.$name, 'input');\n controls.push(control);\n\n if (control.$name) {\n form[control.$name] = control;\n }\n };\n\n // Private API: rename a form control\n form.$$renameControl = function(control, newName) {\n var oldName = control.$name;\n\n if (form[oldName] === control) {\n delete form[oldName];\n }\n form[newName] = control;\n control.$name = newName;\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$removeControl\n *\n * @description\n * Deregister a control from the form.\n *\n * Input elements using ngModelController do this automatically when they are destroyed.\n */\n form.$removeControl = function(control) {\n if (control.$name && form[control.$name] === control) {\n delete form[control.$name];\n }\n forEach(form.$pending, function(value, name) {\n form.$setValidity(name, null, control);\n });\n forEach(form.$error, function(value, name) {\n form.$setValidity(name, null, control);\n });\n\n arrayRemove(controls, control);\n };\n\n\n /**\n * @ngdoc method\n * @name form.FormController#$setValidity\n *\n * @description\n * Sets the validity of a form control.\n *\n * This method will also propagate to parent forms.\n */\n addSetValidityMethod({\n ctrl: this,\n $element: element,\n set: function(object, property, control) {\n var list = object[property];\n if (!list) {\n object[property] = [control];\n } else {\n var index = list.indexOf(control);\n if (index === -1) {\n list.push(control);\n }\n }\n },\n unset: function(object, property, control) {\n var list = object[property];\n if (!list) {\n return;\n }\n arrayRemove(list, control);\n if (list.length === 0) {\n delete object[property];\n }\n },\n parentForm: parentForm,\n $animate: $animate\n });\n\n /**\n * @ngdoc method\n * @name form.FormController#$setDirty\n *\n * @description\n * Sets the form to a dirty state.\n *\n * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n * state (ng-dirty class). This method will also propagate to parent forms.\n */\n form.$setDirty = function() {\n $animate.removeClass(element, PRISTINE_CLASS);\n $animate.addClass(element, DIRTY_CLASS);\n form.$dirty = true;\n form.$pristine = false;\n parentForm.$setDirty();\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setPristine\n *\n * @description\n * Sets the form to its pristine state.\n *\n * This method can be called to remove the 'ng-dirty' class and set the form to its pristine\n * state (ng-pristine class). This method will also propagate to all the controls contained\n * in this form.\n *\n * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n * saving or resetting it.\n */\n form.$setPristine = function () {\n $animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);\n form.$dirty = false;\n form.$pristine = true;\n form.$submitted = false;\n forEach(controls, function(control) {\n control.$setPristine();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setUntouched\n *\n * @description\n * Sets the form to its untouched state.\n *\n * This method can be called to remove the 'ng-touched' class and set the form controls to their\n * untouched state (ng-untouched class).\n *\n * Setting a form controls back to their untouched state is often useful when setting the form\n * back to its pristine state.\n */\n form.$setUntouched = function () {\n forEach(controls, function(control) {\n control.$setUntouched();\n });\n };\n\n /**\n * @ngdoc method\n * @name form.FormController#$setSubmitted\n *\n * @description\n * Sets the form to its submitted state.\n */\n form.$setSubmitted = function () {\n $animate.addClass(element, SUBMITTED_CLASS);\n form.$submitted = true;\n parentForm.$setSubmitted();\n };\n}\n\n/**\n * @ngdoc directive\n * @name ngForm\n * @restrict EAC\n *\n * @description\n * Nestable alias of {@link ng.directive:form `form`} directive. HTML\n * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a\n * sub-group of controls needs to be determined.\n *\n * Note: the purpose of `ngForm` is to group controls,\n * but not to be a replacement for the `` tag with all of its capabilities\n * (e.g. posting to the server, ...).\n *\n * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n *\n */\n\n /**\n * @ngdoc directive\n * @name form\n * @restrict E\n *\n * @description\n * Directive that instantiates\n * {@link form.FormController FormController}.\n *\n * If the `name` attribute is specified, the form controller is published onto the current scope under\n * this name.\n *\n * # Alias: {@link ng.directive:ngForm `ngForm`}\n *\n * In Angular forms can be nested. This means that the outer form is valid when all of the child\n * forms are valid as well. However, browsers do not allow nesting of `` elements, so\n * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to\n * `` but can be nested. This allows you to have nested forms, which is very useful when\n * using Angular validation directives in forms that are dynamically generated using the\n * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`\n * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an\n * `ngForm` directive and nest these in an outer `form` element.\n *\n *\n * # CSS classes\n * - `ng-valid` is set if the form is valid.\n * - `ng-invalid` is set if the form is invalid.\n * - `ng-pristine` is set if the form is pristine.\n * - `ng-dirty` is set if the form is dirty.\n * - `ng-submitted` is set if the form was submitted.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n *\n * # Submitting a form and preventing the default action\n *\n * Since the role of forms in client-side Angular applications is different than in classical\n * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n * page reload that sends the data to the server. Instead some javascript logic should be triggered\n * to handle the form submission in an application-specific way.\n *\n * For this reason, Angular prevents the default action (form submission to the server) unless the\n * `` element has an `action` attribute specified.\n *\n * You can use one of the following two ways to specify what javascript method should be called when\n * a form is submitted:\n *\n * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n * - {@link ng.directive:ngClick ngClick} directive on the first\n * button or input field of type submit (input[type=submit])\n *\n * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n * or {@link ng.directive:ngClick ngClick} directives.\n * This is because of the following form submission rules in the HTML specification:\n *\n * - If a form has only one input field then hitting enter in this field triggers form submit\n * (`ngSubmit`)\n * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n * doesn't trigger submit\n * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n *\n * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is\n * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * ## Animation Hooks\n *\n * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.\n * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any\n * other validations that are performed within the form. Animations in ngForm are similar to how\n * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well\n * as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style a form element\n * that has been rendered as invalid after it has been validated:\n *\n * \n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-form {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-form.ng-invalid {\n * background: red;\n * color:white;\n * }\n * \n *\n * @example\n \n \n \n \n \n userType: \n Required!\n userType = {{userType}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n it('should initialize to model', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n\n expect(userType.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n var userType = element(by.binding('userType'));\n var valid = element(by.binding('myForm.input.$valid'));\n var userInput = element(by.model('userType'));\n\n userInput.clear();\n userInput.sendKeys('');\n\n expect(userType.getText()).toEqual('userType =');\n expect(valid.getText()).toContain('false');\n });\n \n \n *\n * @param {string=} name Name of the form. If specified, the form controller will be published into\n * related scope, under this name.\n */\nvar formDirectiveFactory = function(isNgForm) {\n return ['$timeout', function($timeout) {\n var formDirective = {\n name: 'form',\n restrict: isNgForm ? 'EAC' : 'E',\n controller: FormController,\n compile: function() {\n return {\n pre: function(scope, formElement, attr, controller) {\n if (!attr.action) {\n // we can't use jq events because if a form is destroyed during submission the default\n // action is not prevented. see #1238\n //\n // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n // page reload if the form was destroyed by submission of the form via a click handler\n // on a button in the form. Looks like an IE9 specific bug.\n var handleFormSubmission = function(event) {\n scope.$apply(function() {\n controller.$commitViewValue();\n controller.$setSubmitted();\n });\n\n event.preventDefault\n ? event.preventDefault()\n : event.returnValue = false; // IE\n };\n\n addEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n\n // unregister the preventDefault listener so that we don't not leak memory but in a\n // way that will achieve the prevention of the default action.\n formElement.on('$destroy', function() {\n $timeout(function() {\n removeEventListenerFn(formElement[0], 'submit', handleFormSubmission);\n }, 0, false);\n });\n }\n\n var parentFormCtrl = controller.$$parentForm,\n alias = controller.$name;\n\n if (alias) {\n setter(scope, alias, controller, alias);\n attr.$observe(attr.name ? 'name' : 'ngForm', function(newValue) {\n if (alias === newValue) return;\n setter(scope, alias, undefined, alias);\n alias = newValue;\n setter(scope, alias, controller, alias);\n parentFormCtrl.$$renameControl(controller, alias);\n });\n }\n if (parentFormCtrl !== nullFormCtrl) {\n formElement.on('$destroy', function() {\n parentFormCtrl.$removeControl(controller);\n if (alias) {\n setter(scope, alias, undefined, alias);\n }\n extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n });\n }\n }\n };\n }\n };\n\n return formDirective;\n }];\n};\n\nvar formDirective = formDirectiveFactory();\nvar ngFormDirective = formDirectiveFactory(true);\n\n/* global VALID_CLASS: true,\n INVALID_CLASS: true,\n PRISTINE_CLASS: true,\n DIRTY_CLASS: true,\n UNTOUCHED_CLASS: true,\n TOUCHED_CLASS: true,\n*/\n\n// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231\nvar ISO_DATE_REGEXP = /\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z)/;\nvar URL_REGEXP = /^(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$/;\nvar EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;\nvar NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))\\s*$/;\nvar DATE_REGEXP = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\nvar DATETIMELOCAL_REGEXP = /^(\\d{4})-(\\d\\d)-(\\d\\d)T(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar WEEK_REGEXP = /^(\\d{4})-W(\\d\\d)$/;\nvar MONTH_REGEXP = /^(\\d{4})-(\\d\\d)$/;\nvar TIME_REGEXP = /^(\\d\\d):(\\d\\d)(?::(\\d\\d)(\\.\\d{1,3})?)?$/;\nvar DEFAULT_REGEXP = /(\\s+|^)default(\\s+|$)/;\n\nvar $ngModelMinErr = new minErr('ngModel');\n\nvar inputType = {\n\n /**\n * @ngdoc input\n * @name input[text]\n *\n * @description\n * Standard HTML text input with angular data binding, inherited by most of the `input` elements.\n *\n * *NOTE* Not every feature offered is available for all input types.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Adds `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n \n \n \n \n Single word: \n \n Required!\n \n Single word only!\n\n text = {{text}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('guest');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if multi word', function() {\n input.clear();\n input.sendKeys('hello world');\n\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'text': textInputType,\n\n /**\n * @ngdoc input\n * @name input[date]\n *\n * @description\n * Input with date validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601\n * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many\n * modern browsers do not yet support this input type, it is important to provide cues to users on the\n * expected input format via a placeholder or label. The model must always be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO date string (yyyy-MM-dd).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO date string (yyyy-MM-dd).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a date in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-MM-dd\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-MM-dd\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (see https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10-22');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'date': createDateInputType('date', DATE_REGEXP,\n createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),\n 'yyyy-MM-dd'),\n\n /**\n * @ngdoc input\n * @name input[dateTimeLocal]\n *\n * @description\n * Input with datetime validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`. The model must be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO datetime format (yyyy-MM-ddTHH:mm:ss).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a date between in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-MM-ddTHH:mm:ss\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-MM-ddTHH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2010-12-28T14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01-01T23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,\n createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),\n 'yyyy-MM-ddTHH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[time]\n *\n * @description\n * Input with time validation and transformation. In browsers that do not yet support\n * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a\n * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO time format (HH:mm:ss).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be a\n * valid ISO time format (HH:mm:ss).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a between 8am and 5pm:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"HH:mm:ss\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"HH:mm:ss\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('14:57:00');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('23:59:00');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'time': createDateInputType('time', TIME_REGEXP,\n createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),\n 'HH:mm:ss.sss'),\n\n /**\n * @ngdoc input\n * @name input[week]\n *\n * @description\n * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support\n * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * week format (yyyy-W##), for example: `2013-W02`. The model must always be a Date object.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a\n * valid ISO week format (yyyy-W##).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be\n * a valid ISO week format (yyyy-W##).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a date between in 2013:\n \n \n Required!\n \n Not a valid date!\n value = {{value | date: \"yyyy-Www\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-Www\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-W01');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-W01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),\n\n /**\n * @ngdoc input\n * @name input[month]\n *\n * @description\n * Input with month validation and transformation. In browsers that do not yet support\n * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601\n * month format (yyyy-MM), for example: `2009-01`. The model must always be a Date object. In the event the model is\n * not set to the first of the month, the first of that model's month is assumed.\n *\n * The timezone to be used to read/write the `Date` instance in the model can be defined using\n * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be\n * a valid ISO month format (yyyy-MM).\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must\n * be a valid ISO month format (yyyy-MM).\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Pick a month int 2013:\n \n \n Required!\n \n Not a valid month!\n value = {{value | date: \"yyyy-MM\"}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value | date: \"yyyy-MM\"'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n // currently protractor/webdriver does not support\n // sending keys to all known HTML5 input controls\n // for various browsers (https://github.com/angular/protractor/issues/562).\n function setInput(val) {\n // set the value of the element and force validation.\n var scr = \"var ipt = document.getElementById('exampleInput'); \" +\n \"ipt.value = '\" + val + \"';\" +\n \"angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('\" + val + \"'); });\";\n browser.executeScript(scr);\n }\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('2013-10');\n expect(valid.getText()).toContain('myForm.input.$valid = true');\n });\n\n it('should be invalid if empty', function() {\n setInput('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n\n it('should be invalid if over max', function() {\n setInput('2015-01');\n expect(value.getText()).toContain('');\n expect(valid.getText()).toContain('myForm.input.$valid = false');\n });\n \n \n */\n 'month': createDateInputType('month', MONTH_REGEXP,\n createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),\n 'yyyy-MM'),\n\n /**\n * @ngdoc input\n * @name input[number]\n *\n * @description\n * Text input with number validation and transformation. Sets the `number` validation\n * error if not a valid number.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Number: \n \n Required!\n \n Not valid number!\n value = {{value}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n \n \n \n var value = element(by.binding('value'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('value'));\n\n it('should initialize to model', function() {\n expect(value.getText()).toContain('12');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if over max', function() {\n input.clear();\n input.sendKeys('123');\n expect(value.getText()).toEqual('value =');\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'number': numberInputType,\n\n\n /**\n * @ngdoc input\n * @name input[url]\n *\n * @description\n * Text input with URL validation. Sets the `url` validation error key if the content is not a\n * valid URL.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n URL: \n \n Required!\n \n Not valid url!\n text = {{text}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n myForm.$error.url = {{!!myForm.$error.url}}\n \n \n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('http://google.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not url', function() {\n input.clear();\n input.sendKeys('box');\n\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'url': urlInputType,\n\n\n /**\n * @ngdoc input\n * @name input[email]\n *\n * @description\n * Text input with email validation. Sets the `email` validation error key if not a valid email\n * address.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Email: \n \n Required!\n \n Not valid email!\n text = {{text}}\n myForm.input.$valid = {{myForm.input.$valid}}\n myForm.input.$error = {{myForm.input.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n myForm.$error.email = {{!!myForm.$error.email}}\n \n \n \n var text = element(by.binding('text'));\n var valid = element(by.binding('myForm.input.$valid'));\n var input = element(by.model('text'));\n\n it('should initialize to model', function() {\n expect(text.getText()).toContain('me@example.com');\n expect(valid.getText()).toContain('true');\n });\n\n it('should be invalid if empty', function() {\n input.clear();\n input.sendKeys('');\n expect(text.getText()).toEqual('text =');\n expect(valid.getText()).toContain('false');\n });\n\n it('should be invalid if not email', function() {\n input.clear();\n input.sendKeys('xxx');\n\n expect(valid.getText()).toContain('false');\n });\n \n \n */\n 'email': emailInputType,\n\n\n /**\n * @ngdoc input\n * @name input[radio]\n *\n * @description\n * HTML radio button.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string} value The value to which the expression should be set when selected.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {string} ngValue Angular expression which sets the value to which the expression should\n * be set when selected.\n *\n * @example\n \n \n \n \n Red \n Green \n Blue \n color = {{color | json}}\n \n Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n \n \n it('should change state', function() {\n var color = element(by.binding('color'));\n\n expect(color.getText()).toContain('blue');\n\n element.all(by.model('color')).get(0).click();\n\n expect(color.getText()).toContain('red');\n });\n \n \n */\n 'radio': radioInputType,\n\n\n /**\n * @ngdoc input\n * @name input[checkbox]\n *\n * @description\n * HTML checkbox.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {expression=} ngTrueValue The value to which the expression should be set when selected.\n * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n *\n * @example\n \n \n \n \n Value1: \n Value2: \n value1 = {{value1}}\n value2 = {{value2}}\n \n \n \n it('should change state', function() {\n var value1 = element(by.binding('value1'));\n var value2 = element(by.binding('value2'));\n\n expect(value1.getText()).toContain('true');\n expect(value2.getText()).toContain('YES');\n\n element(by.model('value1')).click();\n element(by.model('value2')).click();\n\n expect(value1.getText()).toContain('false');\n expect(value2.getText()).toContain('NO');\n });\n \n \n */\n 'checkbox': checkboxInputType,\n\n 'hidden': noop,\n 'button': noop,\n 'submit': noop,\n 'reset': noop,\n 'file': noop\n};\n\nfunction testFlags(validity, flags) {\n var i, flag;\n if (flags) {\n for (i=0; i= minVal;\n };\n attr.$observe('min', function(val) {\n minVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n if (isDefined(attr.max) || attr.ngMax) {\n var maxVal;\n ctrl.$validators.max = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(maxVal) || parseDate(value) <= maxVal;\n };\n attr.$observe('max', function(val) {\n maxVal = parseObservedDateValue(val);\n ctrl.$validate();\n });\n }\n\n function parseObservedDateValue(val) {\n return isDefined(val) ? (isDate(val) ? val : parseDate(val)) : undefined;\n }\n };\n}\n\nfunction badInputChecker(scope, element, attr, ctrl) {\n var node = element[0];\n var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);\n if (nativeValidation) {\n ctrl.$parsers.push(function(value) {\n var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};\n // Detect bug in FF35 for input[email] (https://bugzilla.mozilla.org/show_bug.cgi?id=1064430):\n // - also sets validity.badInput (should only be validity.typeMismatch).\n // - see http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email)\n // - can ignore this case as we can still read out the erroneous email...\n return validity.badInput && !validity.typeMismatch ? undefined : value;\n });\n }\n}\n\nfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n badInputChecker(scope, element, attr, ctrl);\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n ctrl.$$parserName = 'number';\n ctrl.$parsers.push(function(value) {\n if (ctrl.$isEmpty(value)) return null;\n if (NUMBER_REGEXP.test(value)) return parseFloat(value);\n return undefined;\n });\n\n ctrl.$formatters.push(function(value) {\n if (!ctrl.$isEmpty(value)) {\n if (!isNumber(value)) {\n throw $ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);\n }\n value = value.toString();\n }\n return value;\n });\n\n if (attr.min || attr.ngMin) {\n var minVal;\n ctrl.$validators.min = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;\n };\n\n attr.$observe('min', function(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val, 10);\n }\n minVal = isNumber(val) && !isNaN(val) ? val : undefined;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n\n if (attr.max || attr.ngMax) {\n var maxVal;\n ctrl.$validators.max = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;\n };\n\n attr.$observe('max', function(val) {\n if (isDefined(val) && !isNumber(val)) {\n val = parseFloat(val, 10);\n }\n maxVal = isNumber(val) && !isNaN(val) ? val : undefined;\n // TODO(matsko): implement validateLater to reduce number of validations\n ctrl.$validate();\n });\n }\n}\n\nfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$$parserName = 'url';\n ctrl.$validators.url = function(value) {\n return ctrl.$isEmpty(value) || URL_REGEXP.test(value);\n };\n}\n\nfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n // Note: no badInputChecker here by purpose as `url` is only a validation\n // in browsers, i.e. we can always read out input.value even if it is not valid!\n baseInputType(scope, element, attr, ctrl, $sniffer, $browser);\n stringBasedInputType(ctrl);\n\n ctrl.$$parserName = 'email';\n ctrl.$validators.email = function(value) {\n return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);\n };\n}\n\nfunction radioInputType(scope, element, attr, ctrl) {\n // make the name unique, if not defined\n if (isUndefined(attr.name)) {\n element.attr('name', nextUid());\n }\n\n var listener = function(ev) {\n if (element[0].checked) {\n ctrl.$setViewValue(attr.value, ev && ev.type);\n }\n };\n\n element.on('click', listener);\n\n ctrl.$render = function() {\n var value = attr.value;\n element[0].checked = (value == ctrl.$viewValue);\n };\n\n attr.$observe('value', ctrl.$render);\n}\n\nfunction parseConstantExpr($parse, context, name, expression, fallback) {\n var parseFn;\n if (isDefined(expression)) {\n parseFn = $parse(expression);\n if (!parseFn.constant) {\n throw minErr('ngModel')('constexpr', 'Expected constant expression for `{0}`, but saw ' +\n '`{1}`.', name, expression);\n }\n return parseFn(context);\n }\n return fallback;\n}\n\nfunction checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {\n var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);\n var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);\n\n var listener = function(ev) {\n ctrl.$setViewValue(element[0].checked, ev && ev.type);\n };\n\n element.on('click', listener);\n\n ctrl.$render = function() {\n element[0].checked = ctrl.$viewValue;\n };\n\n // Override the standard `$isEmpty` because an empty checkbox is never equal to the trueValue\n ctrl.$isEmpty = function(value) {\n return value !== trueValue;\n };\n\n ctrl.$formatters.push(function(value) {\n return equals(value, trueValue);\n });\n\n ctrl.$parsers.push(function(value) {\n return value ? trueValue : falseValue;\n });\n}\n\n\n/**\n * @ngdoc directive\n * @name textarea\n * @restrict E\n *\n * @description\n * HTML textarea element control with angular data-binding. The data-binding and validation\n * properties of this element are exactly the same as those of the\n * {@link ng.directive:input input element}.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n */\n\n\n/**\n * @ngdoc directive\n * @name input\n * @restrict E\n *\n * @description\n * HTML input element control with angular data-binding. Input control follows HTML5 input types\n * and polyfills the HTML5 validation behavior for older browsers.\n *\n * *NOTE* Not every feature offered is available for all input types.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {boolean=} ngRequired Sets `required` attribute if set to true\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n * minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n * maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n * RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n * patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n * interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n * This parameter is ignored for input[type=password] controls, which will never trim the\n * input.\n *\n * @example\n \n \n \n \n \n User name: \n \n Required!\n Last name: \n \n Too short!\n \n Too long!\n \n \n user = {{user}}\n myForm.userName.$valid = {{myForm.userName.$valid}}\n myForm.userName.$error = {{myForm.userName.$error}}\n myForm.lastName.$valid = {{myForm.lastName.$valid}}\n myForm.lastName.$error = {{myForm.lastName.$error}}\n myForm.$valid = {{myForm.$valid}}\n myForm.$error.required = {{!!myForm.$error.required}}\n myForm.$error.minlength = {{!!myForm.$error.minlength}}\n myForm.$error.maxlength = {{!!myForm.$error.maxlength}}\n \n \n \n var user = element(by.exactBinding('user'));\n var userNameValid = element(by.binding('myForm.userName.$valid'));\n var lastNameValid = element(by.binding('myForm.lastName.$valid'));\n var lastNameError = element(by.binding('myForm.lastName.$error'));\n var formValid = element(by.binding('myForm.$valid'));\n var userNameInput = element(by.model('user.name'));\n var userLastInput = element(by.model('user.last'));\n\n it('should initialize to model', function() {\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if empty when required', function() {\n userNameInput.clear();\n userNameInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"last\":\"visitor\"}');\n expect(userNameValid.getText()).toContain('false');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be valid if empty when min length is set', function() {\n userLastInput.clear();\n userLastInput.sendKeys('');\n\n expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"\"}');\n expect(lastNameValid.getText()).toContain('true');\n expect(formValid.getText()).toContain('true');\n });\n\n it('should be invalid if less than required min length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('xx');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('minlength');\n expect(formValid.getText()).toContain('false');\n });\n\n it('should be invalid if longer than max length', function() {\n userLastInput.clear();\n userLastInput.sendKeys('some ridiculously long name');\n\n expect(user.getText()).toContain('{\"name\":\"guest\"}');\n expect(lastNameValid.getText()).toContain('false');\n expect(lastNameError.getText()).toContain('maxlength');\n expect(formValid.getText()).toContain('false');\n });\n \n \n */\nvar inputDirective = ['$browser', '$sniffer', '$filter', '$parse',\n function($browser, $sniffer, $filter, $parse) {\n return {\n restrict: 'E',\n require: ['?ngModel'],\n link: function(scope, element, attr, ctrls) {\n if (ctrls[0]) {\n (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,\n $browser, $filter, $parse);\n }\n }\n };\n}];\n\nvar VALID_CLASS = 'ng-valid',\n INVALID_CLASS = 'ng-invalid',\n PRISTINE_CLASS = 'ng-pristine',\n DIRTY_CLASS = 'ng-dirty',\n UNTOUCHED_CLASS = 'ng-untouched',\n TOUCHED_CLASS = 'ng-touched',\n PENDING_CLASS = 'ng-pending';\n\n/**\n * @ngdoc type\n * @name ngModel.NgModelController\n *\n * @property {string} $viewValue Actual string value in the view.\n * @property {*} $modelValue The value in the model, that the control is bound to.\n * @property {Array.} $parsers Array of functions to execute, as a pipeline, whenever\n the control reads value from the DOM. Each function is called, in turn, passing the value\n through to the next. The last return value is used to populate the model.\n Used to sanitize / convert the value as well as validation. For validation,\n the parsers should update the validity state using\n {@link ngModel.NgModelController#$setValidity $setValidity()},\n and return `undefined` for invalid values.\n\n *\n * @property {Array.} $formatters Array of functions to execute, as a pipeline, whenever\n the model value changes. Each function is called, in turn, passing the value through to the\n next. Used to format / convert values for display in the control and validation.\n * ```js\n * function formatter(value) {\n * if (value) {\n * return value.toUpperCase();\n * }\n * }\n * ngModel.$formatters.push(formatter);\n * ```\n *\n * @property {Object.} $validators A collection of validators that are applied\n * whenever the model value changes. The key value within the object refers to the name of the\n * validator while the function refers to the validation operation. The validation operation is\n * provided with the model value as an argument and must return a true or false value depending\n * on the response of that validation.\n *\n * ```js\n * ngModel.$validators.validCharacters = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n * return /[0-9]+/.test(value) &&\n * /[a-z]+/.test(value) &&\n * /[A-Z]+/.test(value) &&\n * /\\W+/.test(value);\n * };\n * ```\n *\n * @property {Object.} $asyncValidators A collection of validations that are expected to\n * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided\n * is expected to return a promise when it is run during the model validation process. Once the promise\n * is delivered then the validation status will be set to true when fulfilled and false when rejected.\n * When the asynchronous validators are triggered, each of the validators will run in parallel and the model\n * value will only be updated once all validators have been fulfilled. Also, keep in mind that all\n * asynchronous validators will only run once all synchronous validators have passed.\n *\n * Please note that if $http is used then it is important that the server returns a success HTTP response code\n * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.\n *\n * ```js\n * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {\n * var value = modelValue || viewValue;\n *\n * // Lookup user by username\n * return $http.get('/api/users/' + value).\n * then(function resolved() {\n * //username exists, this means validation fails\n * return $q.reject('exists');\n * }, function rejected() {\n * //username does not exist, therefore this validation passes\n * return true;\n * });\n * };\n * ```\n *\n * @param {string} name The name of the validator.\n * @param {Function} validationFn The validation function that will be run.\n *\n * @property {Array.} $viewChangeListeners Array of functions to execute whenever the\n * view value has changed. It is called with no arguments, and its return value is ignored.\n * This can be used in place of additional $watches against the model value.\n *\n * @property {Object} $error An object hash with all failing validator ids as keys.\n * @property {Object} $pending An object hash with all pending validator ids as keys.\n *\n * @property {boolean} $untouched True if control has not lost focus yet.\n * @property {boolean} $touched True if control has lost focus.\n * @property {boolean} $pristine True if user has not interacted with the control yet.\n * @property {boolean} $dirty True if user has already interacted with the control.\n * @property {boolean} $valid True if there is no error.\n * @property {boolean} $invalid True if at least one error on the control.\n *\n * @description\n *\n * `NgModelController` provides API for the `ng-model` directive. The controller contains\n * services for data-binding, validation, CSS updates, and value formatting and parsing. It\n * purposefully does not contain any logic which deals with DOM rendering or listening to\n * DOM events. Such DOM related logic should be provided by other directives which make use of\n * `NgModelController` for data-binding.\n *\n * ## Custom Control Example\n * This example shows how to use `NgModelController` with a custom control to achieve\n * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n * collaborate together to achieve the desired result.\n *\n * Note that `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n * contents be edited in place by the user. This will not work on older browsers.\n *\n * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}\n * module to automatically remove \"bad\" content like inline event listener (e.g. ``).\n * However, as we are using `$sce` the model can still decide to to provide unsafe content if it marks\n * that content using the `$sce` service.\n *\n * \n \n [contenteditable] {\n border: 1px solid black;\n background-color: white;\n min-height: 20px;\n }\n\n .ng-invalid {\n border: 1px solid red;\n }\n\n \n \n angular.module('customControl', ['ngSanitize']).\n directive('contenteditable', ['$sce', function($sce) {\n return {\n restrict: 'A', // only activate on element attribute\n require: '?ngModel', // get a hold of NgModelController\n link: function(scope, element, attrs, ngModel) {\n if (!ngModel) return; // do nothing if no ng-model\n\n // Specify how UI should be updated\n ngModel.$render = function() {\n element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));\n };\n\n // Listen for change events to enable binding\n element.on('blur keyup change', function() {\n scope.$apply(read);\n });\n read(); // initialize\n\n // Write data to the model\n function read() {\n var html = element.html();\n // When we clear the content editable the browser leaves a behind\n // If strip-br attribute is provided then we strip this out\n if ( attrs.stripBr && html == '' ) {\n html = '';\n }\n ngModel.$setViewValue(html);\n }\n }\n };\n }]);\n \n \n \n Change me!\n Required!\n \n \n \n \n \n it('should data-bind and become invalid', function() {\n if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {\n // SafariDriver can't handle contenteditable\n // and Firefox driver can't clear contenteditables very well\n return;\n }\n var contentEditable = element(by.css('[contenteditable]'));\n var content = 'Change me!';\n\n expect(contentEditable.getText()).toEqual(content);\n\n contentEditable.clear();\n contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n expect(contentEditable.getText()).toEqual('');\n expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n });\n \n * \n *\n *\n */\nvar NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$rootScope', '$q', '$interpolate',\n function($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $rootScope, $q, $interpolate) {\n this.$viewValue = Number.NaN;\n this.$modelValue = Number.NaN;\n this.$validators = {};\n this.$asyncValidators = {};\n this.$parsers = [];\n this.$formatters = [];\n this.$viewChangeListeners = [];\n this.$untouched = true;\n this.$touched = false;\n this.$pristine = true;\n this.$dirty = false;\n this.$valid = true;\n this.$invalid = false;\n this.$error = {}; // keep invalid keys here\n this.$$success = {}; // keep valid keys here\n this.$pending = undefined; // keep pending keys here\n this.$name = $interpolate($attr.name || '', false)($scope);\n\n\n var parsedNgModel = $parse($attr.ngModel),\n pendingDebounce = null,\n ctrl = this;\n\n var ngModelGet = function ngModelGet() {\n var modelValue = parsedNgModel($scope);\n if (ctrl.$options && ctrl.$options.getterSetter && isFunction(modelValue)) {\n modelValue = modelValue();\n }\n return modelValue;\n };\n\n var ngModelSet = function ngModelSet(newValue) {\n var getterSetter;\n if (ctrl.$options && ctrl.$options.getterSetter &&\n isFunction(getterSetter = parsedNgModel($scope))) {\n\n getterSetter(ctrl.$modelValue);\n } else {\n parsedNgModel.assign($scope, ctrl.$modelValue);\n }\n };\n\n this.$$setOptions = function(options) {\n ctrl.$options = options;\n\n if (!parsedNgModel.assign && (!options || !options.getterSetter)) {\n throw $ngModelMinErr('nonassign', \"Expression '{0}' is non-assignable. Element: {1}\",\n $attr.ngModel, startingTag($element));\n }\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$render\n *\n * @description\n * Called when the view needs to be updated. It is expected that the user of the ng-model\n * directive will implement this method.\n *\n * The `$render()` method is invoked in the following situations:\n *\n * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last\n * committed value then `$render()` is called to update the input control.\n * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and\n * the `$viewValue` are different to last time.\n *\n * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of\n * `$modelValue` and `$viewValue` are actually different to their previous value. If `$modelValue`\n * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be\n * invoked if you only change a property on the objects.\n */\n this.$render = noop;\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$isEmpty\n *\n * @description\n * This is called when we need to determine if the value of the input is empty.\n *\n * For instance, the required directive does this to work out if the input has data or not.\n * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n *\n * You can override this for input directives whose concept of being empty is different to the\n * default. The `checkboxInputType` directive does this because in its case a value of `false`\n * implies empty.\n *\n * @param {*} value Model value to check.\n * @returns {boolean} True if `value` is empty.\n */\n this.$isEmpty = function(value) {\n return isUndefined(value) || value === '' || value === null || value !== value;\n };\n\n var parentForm = $element.inheritedData('$formController') || nullFormCtrl,\n currentValidationRunId = 0;\n\n // Setup initial state of the control\n $element\n .addClass(PRISTINE_CLASS)\n .addClass(UNTOUCHED_CLASS);\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setValidity\n *\n * @description\n * Change the validity state, and notifies the form.\n *\n * This method can be called within $parsers/$formatters. However, if possible, please use the\n * `ngModel.$validators` pipeline which is designed to call this method automatically.\n *\n * @param {string} validationErrorKey Name of the validator. the `validationErrorKey` will assign\n * to `$error[validationErrorKey]` and `$pending[validationErrorKey]`\n * so that it is available for data-binding.\n * The `validationErrorKey` should be in camelCase and will get converted into dash-case\n * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n * class and can be bound to as `{{someForm.someControl.$error.myError}}` .\n * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),\n * or skipped (null).\n */\n addSetValidityMethod({\n ctrl: this,\n $element: $element,\n set: function(object, property) {\n object[property] = true;\n },\n unset: function(object, property) {\n delete object[property];\n },\n parentForm: parentForm,\n $animate: $animate\n });\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setPristine\n *\n * @description\n * Sets the control to its pristine state.\n *\n * This method can be called to remove the 'ng-dirty' class and set the control to its pristine\n * state (ng-pristine class). A model is considered to be pristine when the model has not been changed\n * from when first compiled within then form.\n */\n this.$setPristine = function () {\n ctrl.$dirty = false;\n ctrl.$pristine = true;\n $animate.removeClass($element, DIRTY_CLASS);\n $animate.addClass($element, PRISTINE_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setUntouched\n *\n * @description\n * Sets the control to its untouched state.\n *\n * This method can be called to remove the 'ng-touched' class and set the control to its\n * untouched state (ng-untouched class). Upon compilation, a model is set as untouched\n * by default, however this function can be used to restore that state if the model has\n * already been touched by the user.\n */\n this.$setUntouched = function() {\n ctrl.$touched = false;\n ctrl.$untouched = true;\n $animate.setClass($element, UNTOUCHED_CLASS, TOUCHED_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setTouched\n *\n * @description\n * Sets the control to its touched state.\n *\n * This method can be called to remove the 'ng-untouched' class and set the control to its\n * touched state (ng-touched class). A model is considered to be touched when the user has\n * first interacted (focussed) on the model input element and then shifted focus away (blurred)\n * from the input element.\n */\n this.$setTouched = function() {\n ctrl.$touched = true;\n ctrl.$untouched = false;\n $animate.setClass($element, TOUCHED_CLASS, UNTOUCHED_CLASS);\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$rollbackViewValue\n *\n * @description\n * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,\n * which may be caused by a pending debounced event or because the input is waiting for a some\n * future event.\n *\n * If you have an input that uses `ng-model-options` to set up debounced events or events such\n * as blur you can have a situation where there is a period when the `$viewValue`\n * is out of synch with the ngModel's `$modelValue`.\n *\n * In this case, you can run into difficulties if you try to update the ngModel's `$modelValue`\n * programmatically before these debounced/future events have resolved/occurred, because Angular's\n * dirty checking mechanism is not able to tell whether the model has actually changed or not.\n *\n * The `$rollbackViewValue()` method should be called before programmatically changing the model of an\n * input which may have such events pending. This is important in order to make sure that the\n * input field will be updated with the new model value and any pending operations are cancelled.\n *\n * \n * \n * angular.module('cancel-update-example', [])\n *\n * .controller('CancelUpdateController', ['$scope', function($scope) {\n * $scope.resetWithCancel = function (e) {\n * if (e.keyCode == 27) {\n * $scope.myForm.myInput1.$rollbackViewValue();\n * $scope.myValue = '';\n * }\n * };\n * $scope.resetWithoutCancel = function (e) {\n * if (e.keyCode == 27) {\n * $scope.myValue = '';\n * }\n * };\n * }]);\n * \n * \n * \n * Try typing something in each input. See that the model only updates when you\n * blur off the input.\n * \n * Now see what happens if you start typing then press the Escape key\n *\n * \n * With $rollbackViewValue()\n * \n * myValue: \"{{ myValue }}\"\n *\n * Without $rollbackViewValue()\n * \n * myValue: \"{{ myValue }}\"\n * \n * \n * \n * \n */\n this.$rollbackViewValue = function() {\n $timeout.cancel(pendingDebounce);\n ctrl.$viewValue = ctrl.$$lastCommittedViewValue;\n ctrl.$render();\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$validate\n *\n * @description\n * Runs each of the registered validators (first synchronous validators and then asynchronous validators).\n */\n this.$validate = function() {\n // ignore $validate before model is initialized\n if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n return;\n }\n this.$$parseAndValidate();\n };\n\n this.$$runValidators = function(parseValid, modelValue, viewValue, doneCallback) {\n currentValidationRunId++;\n var localValidationRunId = currentValidationRunId;\n\n // check parser error\n if (!processParseErrors(parseValid)) {\n validationDone(false);\n return;\n }\n if (!processSyncValidators()) {\n validationDone(false);\n return;\n }\n processAsyncValidators();\n\n function processParseErrors(parseValid) {\n var errorKey = ctrl.$$parserName || 'parse';\n if (parseValid === undefined) {\n setValidity(errorKey, null);\n } else {\n setValidity(errorKey, parseValid);\n if (!parseValid) {\n forEach(ctrl.$validators, function(v, name) {\n setValidity(name, null);\n });\n forEach(ctrl.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n return false;\n }\n }\n return true;\n }\n\n function processSyncValidators() {\n var syncValidatorsValid = true;\n forEach(ctrl.$validators, function(validator, name) {\n var result = validator(modelValue, viewValue);\n syncValidatorsValid = syncValidatorsValid && result;\n setValidity(name, result);\n });\n if (!syncValidatorsValid) {\n forEach(ctrl.$asyncValidators, function(v, name) {\n setValidity(name, null);\n });\n return false;\n }\n return true;\n }\n\n function processAsyncValidators() {\n var validatorPromises = [];\n var allValid = true;\n forEach(ctrl.$asyncValidators, function(validator, name) {\n var promise = validator(modelValue, viewValue);\n if (!isPromiseLike(promise)) {\n throw $ngModelMinErr(\"$asyncValidators\",\n \"Expected asynchronous validator to return a promise but got '{0}' instead.\", promise);\n }\n setValidity(name, undefined);\n validatorPromises.push(promise.then(function() {\n setValidity(name, true);\n }, function(error) {\n allValid = false;\n setValidity(name, false);\n }));\n });\n if (!validatorPromises.length) {\n validationDone(true);\n } else {\n $q.all(validatorPromises).then(function() {\n validationDone(allValid);\n }, noop);\n }\n }\n\n function setValidity(name, isValid) {\n if (localValidationRunId === currentValidationRunId) {\n ctrl.$setValidity(name, isValid);\n }\n }\n\n function validationDone(allValid) {\n if (localValidationRunId === currentValidationRunId) {\n\n doneCallback(allValid);\n }\n }\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$commitViewValue\n *\n * @description\n * Commit a pending update to the `$modelValue`.\n *\n * Updates may be pending by a debounced event or because the input is waiting for a some future\n * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`\n * usually handles calling this in response to input events.\n */\n this.$commitViewValue = function() {\n var viewValue = ctrl.$viewValue;\n\n $timeout.cancel(pendingDebounce);\n\n // If the view value has not changed then we should just exit, except in the case where there is\n // a native validator on the element. In this case the validation state may have changed even though\n // the viewValue has stayed empty.\n if (ctrl.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !ctrl.$$hasNativeValidators)) {\n return;\n }\n ctrl.$$lastCommittedViewValue = viewValue;\n\n // change to dirty\n if (ctrl.$pristine) {\n ctrl.$dirty = true;\n ctrl.$pristine = false;\n $animate.removeClass($element, PRISTINE_CLASS);\n $animate.addClass($element, DIRTY_CLASS);\n parentForm.$setDirty();\n }\n this.$$parseAndValidate();\n };\n\n this.$$parseAndValidate = function() {\n var parserValid = true,\n viewValue = ctrl.$$lastCommittedViewValue,\n modelValue = viewValue;\n for(var i = 0; i < ctrl.$parsers.length; i++) {\n modelValue = ctrl.$parsers[i](modelValue);\n if (isUndefined(modelValue)) {\n parserValid = false;\n break;\n }\n }\n if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {\n // ctrl.$modelValue has not been touched yet...\n ctrl.$modelValue = ngModelGet();\n }\n var prevModelValue = ctrl.$modelValue;\n var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;\n if (allowInvalid) {\n ctrl.$modelValue = modelValue;\n writeToModelIfNeeded();\n }\n ctrl.$$runValidators(parserValid, modelValue, viewValue, function(allValid) {\n if (!allowInvalid) {\n // Note: Don't check ctrl.$valid here, as we could have\n // external validators (e.g. calculated on the server),\n // that just call $setValidity and need the model value\n // to calculate their validity.\n ctrl.$modelValue = allValid ? modelValue : undefined;\n writeToModelIfNeeded();\n }\n });\n\n function writeToModelIfNeeded() {\n if (ctrl.$modelValue !== prevModelValue) {\n ctrl.$$writeModelToScope();\n }\n }\n };\n\n this.$$writeModelToScope = function() {\n ngModelSet(ctrl.$modelValue);\n forEach(ctrl.$viewChangeListeners, function(listener) {\n try {\n listener();\n } catch(e) {\n $exceptionHandler(e);\n }\n });\n };\n\n /**\n * @ngdoc method\n * @name ngModel.NgModelController#$setViewValue\n *\n * @description\n * Update the view value.\n *\n * This method should be called when an input directive want to change the view value; typically,\n * this is done from within a DOM event handler.\n *\n * For example {@link ng.directive:input input} calls it when the value of the input changes and\n * {@link ng.directive:select select} calls it when an option is selected.\n *\n * If the new `value` is an object (rather than a string or a number), we should make a copy of the\n * object before passing it to `$setViewValue`. This is because `ngModel` does not perform a deep\n * watch of objects, it only looks for a change of identity. If you only change the property of\n * the object then ngModel will not realise that the object has changed and will not invoke the\n * `$parsers` and `$validators` pipelines.\n *\n * For this reason, you should not change properties of the copy once it has been passed to\n * `$setViewValue`. Otherwise you may cause the model value on the scope to change incorrectly.\n *\n * When this method is called, the new `value` will be staged for committing through the `$parsers`\n * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged\n * value sent directly for processing, finally to be applied to `$modelValue` and then the\n * **expression** specified in the `ng-model` attribute.\n *\n * Lastly, all the registered change listeners, in the `$viewChangeListeners` list, are called.\n *\n * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`\n * and the `default` trigger is not listed, all those actions will remain pending until one of the\n * `updateOn` events is triggered on the DOM element.\n * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}\n * directive is used with a custom debounce for this particular event.\n *\n * Note that calling this function does not trigger a `$digest`.\n *\n * @param {string} value Value from the view.\n * @param {string} trigger Event that triggered the update.\n */\n this.$setViewValue = function(value, trigger) {\n ctrl.$viewValue = value;\n if (!ctrl.$options || ctrl.$options.updateOnDefault) {\n ctrl.$$debounceViewValueCommit(trigger);\n }\n };\n\n this.$$debounceViewValueCommit = function(trigger) {\n var debounceDelay = 0,\n options = ctrl.$options,\n debounce;\n\n if (options && isDefined(options.debounce)) {\n debounce = options.debounce;\n if (isNumber(debounce)) {\n debounceDelay = debounce;\n } else if (isNumber(debounce[trigger])) {\n debounceDelay = debounce[trigger];\n } else if (isNumber(debounce['default'])) {\n debounceDelay = debounce['default'];\n }\n }\n\n $timeout.cancel(pendingDebounce);\n if (debounceDelay) {\n pendingDebounce = $timeout(function() {\n ctrl.$commitViewValue();\n }, debounceDelay);\n } else if ($rootScope.$$phase) {\n ctrl.$commitViewValue();\n } else {\n $scope.$apply(function() {\n ctrl.$commitViewValue();\n });\n }\n };\n\n // model -> value\n // Note: we cannot use a normal scope.$watch as we want to detect the following:\n // 1. scope value is 'a'\n // 2. user enters 'b'\n // 3. ng-change kicks in and reverts scope value to 'a'\n // -> scope value did not change since the last digest as\n // ng-change executes in apply phase\n // 4. view should be changed back to 'a'\n $scope.$watch(function ngModelWatch() {\n var modelValue = ngModelGet();\n\n // if scope model value and ngModel value are out of sync\n // TODO(perf): why not move this to the action fn?\n if (modelValue !== ctrl.$modelValue) {\n ctrl.$modelValue = modelValue;\n\n var formatters = ctrl.$formatters,\n idx = formatters.length;\n\n var viewValue = modelValue;\n while(idx--) {\n viewValue = formatters[idx](viewValue);\n }\n if (ctrl.$viewValue !== viewValue) {\n ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;\n ctrl.$render();\n\n ctrl.$$runValidators(undefined, modelValue, viewValue, noop);\n }\n }\n\n return modelValue;\n });\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngModel\n *\n * @element input\n *\n * @description\n * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n * property on the scope using {@link ngModel.NgModelController NgModelController},\n * which is created and exposed by this directive.\n *\n * `ngModel` is responsible for:\n *\n * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n * require.\n * - Providing validation behavior (i.e. required, number, email, url).\n * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).\n * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`, `ng-untouched`) including animations.\n * - Registering the control with its parent {@link ng.directive:form form}.\n *\n * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n * current scope. If the property doesn't already exist on this scope, it will be created\n * implicitly and added to the scope.\n *\n * For best practices on using `ngModel`, see:\n *\n * - [https://github.com/angular/angular.js/wiki/Understanding-Scopes]\n *\n * For basic examples, how to use `ngModel`, see:\n *\n * - {@link ng.directive:input input}\n * - {@link input[text] text}\n * - {@link input[checkbox] checkbox}\n * - {@link input[radio] radio}\n * - {@link input[number] number}\n * - {@link input[email] email}\n * - {@link input[url] url}\n * - {@link input[date] date}\n * - {@link input[dateTimeLocal] dateTimeLocal}\n * - {@link input[time] time}\n * - {@link input[month] month}\n * - {@link input[week] week}\n * - {@link ng.directive:select select}\n * - {@link ng.directive:textarea textarea}\n *\n * # CSS classes\n * The following CSS classes are added and removed on the associated input/select/textarea element\n * depending on the validity of the model.\n *\n * - `ng-valid` is set if the model is valid.\n * - `ng-invalid` is set if the model is invalid.\n * - `ng-pristine` is set if the model is pristine.\n * - `ng-dirty` is set if the model is dirty.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n * ## Animation Hooks\n *\n * Animations within models are triggered when any of the associated CSS classes are added and removed\n * on the input element which is attached to the model. These classes are: `.ng-pristine`, `.ng-dirty`,\n * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.\n * The animations that are triggered within ngModel are similar to how they work in ngClass and\n * animations can be hooked into using CSS transitions, keyframes as well as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style an input element\n * that has been rendered as invalid after it has been validated:\n *\n * \n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-input {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-input.ng-invalid {\n * background: red;\n * color:white;\n * }\n * \n *\n * @example\n * \n \n \n \n Update input to see transitions when valid/invalid.\n Integer is a valid value.\n \n \n \n \n * \n *\n * ## Binding to a getter/setter\n *\n * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a\n * function that returns a representation of the model when called with zero arguments, and sets\n * the internal state of a model when called with an argument. It's sometimes useful to use this\n * for models that have an internal representation that's different than what the model exposes\n * to the view.\n *\n * \n * **Best Practice:** It's best to keep getters fast because Angular is likely to call them more\n * frequently than other parts of your code.\n * \n *\n * You use this behavior by adding `ng-model-options=\"{ getterSetter: true }\"` to an element that\n * has `ng-model` attached to it. You can also add `ng-model-options=\"{ getterSetter: true }\"` to\n * a ``, which will enable this behavior for all ``s within it. See\n * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.\n *\n * The following example shows how to use `ngModel` with a getter/setter:\n *\n * @example\n * \n \n \n \n Name:\n \n \n user.name = \n \n \n \n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function (newName) {\n if (angular.isDefined(newName)) {\n _name = newName;\n }\n return _name;\n }\n };\n }]);\n \n * \n */\nvar ngModelDirective = function() {\n return {\n restrict: 'A',\n require: ['ngModel', '^?form', '^?ngModelOptions'],\n controller: NgModelController,\n link: {\n pre: function(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0],\n formCtrl = ctrls[1] || nullFormCtrl;\n\n modelCtrl.$$setOptions(ctrls[2] && ctrls[2].$options);\n\n // notify others, especially parent forms\n formCtrl.$addControl(modelCtrl);\n\n attr.$observe('name', function(newValue) {\n if (modelCtrl.$name !== newValue) {\n formCtrl.$$renameControl(modelCtrl, newValue);\n }\n });\n\n scope.$on('$destroy', function() {\n formCtrl.$removeControl(modelCtrl);\n });\n },\n post: function(scope, element, attr, ctrls) {\n var modelCtrl = ctrls[0];\n if (modelCtrl.$options && modelCtrl.$options.updateOn) {\n element.on(modelCtrl.$options.updateOn, function(ev) {\n modelCtrl.$$debounceViewValueCommit(ev && ev.type);\n });\n }\n\n element.on('blur', function(ev) {\n if (modelCtrl.$touched) return;\n\n scope.$apply(function() {\n modelCtrl.$setTouched();\n });\n });\n }\n }\n };\n};\n\n\n/**\n * @ngdoc directive\n * @name ngChange\n *\n * @description\n * Evaluate the given expression when the user changes the input.\n * The expression is evaluated immediately, unlike the JavaScript onchange event\n * which only triggers at the end of a change (usually, when the user leaves the\n * form element or presses the return key).\n *\n * The `ngChange` expression is only evaluated when a change in the input value causes\n * a new value to be committed to the model.\n *\n * It will not be evaluated:\n * * if the value returned from the `$parsers` transformation pipeline has not changed\n * * if the input has continued to be invalid since the model will stay `null`\n * * if the model is changed programmatically and not by a change to the input value\n *\n *\n * Note, this directive requires `ngModel` to be present.\n *\n * @element input\n * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change\n * in input value.\n *\n * @example\n * \n * \n * \n * \n * \n * \n * Confirmed\n * debug = {{confirmed}}\n * counter = {{counter}}\n * \n * \n * \n * var counter = element(by.binding('counter'));\n * var debug = element(by.binding('confirmed'));\n *\n * it('should evaluate the expression if changing from view', function() {\n * expect(counter.getText()).toContain('0');\n *\n * element(by.id('ng-change-example1')).click();\n *\n * expect(counter.getText()).toContain('1');\n * expect(debug.getText()).toContain('true');\n * });\n *\n * it('should not evaluate the expression if changing from model', function() {\n * element(by.id('ng-change-example2')).click();\n\n * expect(counter.getText()).toContain('0');\n * expect(debug.getText()).toContain('true');\n * });\n * \n * \n */\nvar ngChangeDirective = valueFn({\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n ctrl.$viewChangeListeners.push(function() {\n scope.$eval(attr.ngChange);\n });\n }\n});\n\n\nvar requiredDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n attr.required = true; // force truthy in case we are on non input element\n\n ctrl.$validators.required = function(value) {\n return !attr.required || !ctrl.$isEmpty(value);\n };\n\n attr.$observe('required', function() {\n ctrl.$validate();\n });\n }\n };\n};\n\n\nvar patternDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var regexp, patternExp = attr.ngPattern || attr.pattern;\n attr.$observe('pattern', function(regex) {\n if (isString(regex) && regex.length > 0) {\n regex = new RegExp(regex);\n }\n\n if (regex && !regex.test) {\n throw minErr('ngPattern')('noregexp',\n 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,\n regex, startingTag(elm));\n }\n\n regexp = regex || undefined;\n ctrl.$validate();\n });\n\n ctrl.$validators.pattern = function(value) {\n return ctrl.$isEmpty(value) || isUndefined(regexp) || regexp.test(value);\n };\n }\n };\n};\n\n\nvar maxlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var maxlength = 0;\n attr.$observe('maxlength', function(value) {\n maxlength = int(value) || 0;\n ctrl.$validate();\n });\n ctrl.$validators.maxlength = function(modelValue, viewValue) {\n return ctrl.$isEmpty(modelValue) || viewValue.length <= maxlength;\n };\n }\n };\n};\n\nvar minlengthDirective = function() {\n return {\n restrict: 'A',\n require: '?ngModel',\n link: function(scope, elm, attr, ctrl) {\n if (!ctrl) return;\n\n var minlength = 0;\n attr.$observe('minlength', function(value) {\n minlength = int(value) || 0;\n ctrl.$validate();\n });\n ctrl.$validators.minlength = function(modelValue, viewValue) {\n return ctrl.$isEmpty(modelValue) || viewValue.length >= minlength;\n };\n }\n };\n};\n\n\n/**\n * @ngdoc directive\n * @name ngList\n *\n * @description\n * Text input that converts between a delimited string and an array of strings. The default\n * delimiter is a comma followed by a space - equivalent to `ng-list=\", \"`. You can specify a custom\n * delimiter as the value of the `ngList` attribute - for example, `ng-list=\" | \"`.\n *\n * The behaviour of the directive is affected by the use of the `ngTrim` attribute.\n * * If `ngTrim` is set to `\"false\"` then whitespace around both the separator and each\n * list item is respected. This implies that the user of the directive is responsible for\n * dealing with whitespace but also allows you to use whitespace as a delimiter, such as a\n * tab or newline character.\n * * Otherwise whitespace around the delimiter is ignored when splitting (although it is respected\n * when joining the list items back together) and whitespace around each list item is stripped\n * before it is added to the model.\n *\n * ### Example with Validation\n *\n * \n * \n * angular.module('listExample', [])\n * .controller('ExampleController', ['$scope', function($scope) {\n * $scope.names = ['morpheus', 'neo', 'trinity'];\n * }]);\n * \n * \n * \n * List: \n * \n * Required!\n * \n * names = {{names}}\n * myForm.namesInput.$valid = {{myForm.namesInput.$valid}}\n * myForm.namesInput.$error = {{myForm.namesInput.$error}}\n * myForm.$valid = {{myForm.$valid}}\n * myForm.$error.required = {{!!myForm.$error.required}}\n * \n * \n * \n * var listInput = element(by.model('names'));\n * var names = element(by.exactBinding('names'));\n * var valid = element(by.binding('myForm.namesInput.$valid'));\n * var error = element(by.css('span.error'));\n *\n * it('should initialize to model', function() {\n * expect(names.getText()).toContain('[\"morpheus\",\"neo\",\"trinity\"]');\n * expect(valid.getText()).toContain('true');\n * expect(error.getCssValue('display')).toBe('none');\n * });\n *\n * it('should be invalid if empty', function() {\n * listInput.clear();\n * listInput.sendKeys('');\n *\n * expect(names.getText()).toContain('');\n * expect(valid.getText()).toContain('false');\n * expect(error.getCssValue('display')).not.toBe('none');\n * });\n * \n * \n *\n * ### Example - splitting on whitespace\n * \n * \n * \n * {{ list | json }}\n * \n * \n * it(\"should split the text by newlines\", function() {\n * var listInput = element(by.model('list'));\n * var output = element(by.binding('list | json'));\n * listInput.sendKeys('abc\\ndef\\nghi');\n * expect(output.getText()).toContain('[\\n \"abc\",\\n \"def\",\\n \"ghi\"\\n]');\n * });\n * \n * \n *\n * @element input\n * @param {string=} ngList optional delimiter that should be used to split the value.\n */\nvar ngListDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n require: 'ngModel',\n link: function(scope, element, attr, ctrl) {\n // We want to control whitespace trimming so we use this convoluted approach\n // to access the ngList attribute, which doesn't pre-trim the attribute\n var ngList = element.attr(attr.$attr.ngList) || ', ';\n var trimValues = attr.ngTrim !== 'false';\n var separator = trimValues ? trim(ngList) : ngList;\n\n var parse = function(viewValue) {\n // If the viewValue is invalid (say required but empty) it will be `undefined`\n if (isUndefined(viewValue)) return;\n\n var list = [];\n\n if (viewValue) {\n forEach(viewValue.split(separator), function(value) {\n if (value) list.push(trimValues ? trim(value) : value);\n });\n }\n\n return list;\n };\n\n ctrl.$parsers.push(parse);\n ctrl.$formatters.push(function(value) {\n if (isArray(value)) {\n return value.join(ngList);\n }\n\n return undefined;\n });\n\n // Override the standard $isEmpty because an empty array means the input is empty.\n ctrl.$isEmpty = function(value) {\n return !value || !value.length;\n };\n }\n };\n};\n\n\nvar CONSTANT_VALUE_REGEXP = /^(true|false|\\d+)$/;\n/**\n * @ngdoc directive\n * @name ngValue\n *\n * @description\n * Binds the given expression to the value of `input[select]` or `input[radio]`, so\n * that when the element is selected, the `ngModel` of that element is set to the\n * bound value.\n *\n * `ngValue` is useful when dynamically generating lists of radio buttons using `ng-repeat`, as\n * shown below.\n *\n * @element input\n * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute\n * of the `input` element\n *\n * @example\n \n \n \n \n Which is your favorite?\n \n {{name}}\n \n \n You chose {{my.favorite}}\n \n \n \n var favorite = element(by.binding('my.favorite'));\n\n it('should initialize to model', function() {\n expect(favorite.getText()).toContain('unicorns');\n });\n it('should bind the values to the inputs', function() {\n element.all(by.model('my.favorite')).get(0).click();\n expect(favorite.getText()).toContain('pizza');\n });\n \n \n */\nvar ngValueDirective = function() {\n return {\n restrict: 'A',\n priority: 100,\n compile: function(tpl, tplAttr) {\n if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {\n return function ngValueConstantLink(scope, elm, attr) {\n attr.$set('value', scope.$eval(attr.ngValue));\n };\n } else {\n return function ngValueLink(scope, elm, attr) {\n scope.$watch(attr.ngValue, function valueWatchAction(value) {\n attr.$set('value', value);\n });\n };\n }\n }\n };\n};\n\n/**\n * @ngdoc directive\n * @name ngModelOptions\n *\n * @description\n * Allows tuning how model updates are done. Using `ngModelOptions` you can specify a custom list of\n * events that will trigger a model update and/or a debouncing delay so that the actual update only\n * takes place when a timer expires; this timer will be reset after another change takes place.\n *\n * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might\n * be different than the value in the actual model. This means that if you update the model you\n * should also invoke {@link ngModel.NgModelController `$rollbackViewValue`} on the relevant input field in\n * order to make sure it is synchronized with the model and that any debounced action is canceled.\n *\n * The easiest way to reference the control's {@link ngModel.NgModelController `$rollbackViewValue`}\n * method is by making sure the input is placed inside a form that has a `name` attribute. This is\n * important because `form` controllers are published to the related scope under the name in their\n * `name` attribute.\n *\n * Any pending changes will take place immediately when an enclosing form is submitted via the\n * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`\n * to have access to the updated model.\n *\n * `ngModelOptions` has an effect on the element it's declared on and its descendants.\n *\n * @param {Object} ngModelOptions options to apply to the current model. Valid keys are:\n * - `updateOn`: string specifying which event should be the input bound to. You can set several\n * events using an space delimited list. There is a special event called `default` that\n * matches the default events belonging of the control.\n * - `debounce`: integer value which contains the debounce model update value in milliseconds. A\n * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a\n * custom value for each event. For example:\n * `ng-model-options=\"{ updateOn: 'default blur', debounce: {'default': 500, 'blur': 0} }\"`\n * - `allowInvalid`: boolean value which indicates that the model can be set with values that did\n * not validate correctly instead of the default behavior of setting the model to undefined.\n * - `getterSetter`: boolean value which determines whether or not to treat functions bound to\n `ngModel` as getters/setters.\n * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for\n * ``, ``, ... . Right now, the only supported value is `'UTC'`,\n * otherwise the default timezone of the browser will be used.\n *\n * @example\n\n The following example shows how to override immediate updates. Changes on the inputs within the\n form will update the model only when the control loses focus (blur event). If `escape` key is\n pressed while the input field is focused, the value is reset to the value in the current model.\n\n \n \n \n \n Name:\n \n\n Other data:\n \n \n user.name = \n \n \n \n angular.module('optionsExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = { name: 'say', data: '' };\n\n $scope.cancel = function (e) {\n if (e.keyCode == 27) {\n $scope.userForm.userName.$rollbackViewValue();\n }\n };\n }]);\n \n \n var model = element(by.binding('user.name'));\n var input = element(by.model('user.name'));\n var other = element(by.model('user.data'));\n\n it('should allow custom events', function() {\n input.sendKeys(' hello');\n input.click();\n expect(model.getText()).toEqual('say');\n other.click();\n expect(model.getText()).toEqual('say hello');\n });\n\n it('should $rollbackViewValue when model changes', function() {\n input.sendKeys(' hello');\n expect(input.getAttribute('value')).toEqual('say hello');\n input.sendKeys(protractor.Key.ESCAPE);\n expect(input.getAttribute('value')).toEqual('say');\n other.click();\n expect(model.getText()).toEqual('say');\n });\n \n \n\n This one shows how to debounce model changes. Model will be updated only 1 sec after last change.\n If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.\n\n \n \n \n \n Name:\n \n Clear\n \n user.name = \n \n \n \n angular.module('optionsExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.user = { name: 'say' };\n }]);\n \n \n\n This one shows how to bind to getter/setters:\n\n \n \n \n \n Name:\n \n \n user.name = \n \n \n \n angular.module('getterSetterExample', [])\n .controller('ExampleController', ['$scope', function($scope) {\n var _name = 'Brian';\n $scope.user = {\n name: function (newName) {\n return angular.isDefined(newName) ? (_name = newName) : _name;\n }\n };\n }]);\n \n \n */\nvar ngModelOptionsDirective = function() {\n return {\n restrict: 'A',\n controller: ['$scope', '$attrs', function($scope, $attrs) {\n var that = this;\n this.$options = $scope.$eval($attrs.ngModelOptions);\n // Allow adding/overriding bound events\n if (this.$options.updateOn !== undefined) {\n this.$options.updateOnDefault = false;\n // extract \"default\" pseudo-event from list of events that can trigger a model update\n this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {\n that.$options.updateOnDefault = true;\n return ' ';\n }));\n } else {\n this.$options.updateOnDefault = true;\n }\n }]\n };\n};\n\n// helper methods\nfunction addSetValidityMethod(context) {\n var ctrl = context.ctrl,\n $element = context.$element,\n classCache = {},\n set = context.set,\n unset = context.unset,\n parentForm = context.parentForm,\n $animate = context.$animate;\n\n ctrl.$setValidity = setValidity;\n toggleValidationCss('', true);\n\n function setValidity(validationErrorKey, state, options) {\n if (state === undefined) {\n createAndSet('$pending', validationErrorKey, options);\n } else {\n unsetAndCleanup('$pending', validationErrorKey, options);\n }\n if (!isBoolean(state)) {\n unset(ctrl.$error, validationErrorKey, options);\n unset(ctrl.$$success, validationErrorKey, options);\n } else {\n if (state) {\n unset(ctrl.$error, validationErrorKey, options);\n set(ctrl.$$success, validationErrorKey, options);\n } else {\n set(ctrl.$error, validationErrorKey, options);\n unset(ctrl.$$success, validationErrorKey, options);\n }\n }\n if (ctrl.$pending) {\n cachedToggleClass(PENDING_CLASS, true);\n ctrl.$valid = ctrl.$invalid = undefined;\n toggleValidationCss('', null);\n } else {\n cachedToggleClass(PENDING_CLASS, false);\n ctrl.$valid = isObjectEmpty(ctrl.$error);\n ctrl.$invalid = !ctrl.$valid;\n toggleValidationCss('', ctrl.$valid);\n }\n\n // re-read the state as the set/unset methods could have\n // combined state in ctrl.$error[validationError] (used for forms),\n // where setting/unsetting only increments/decrements the value,\n // and does not replace it.\n var combinedState;\n if (ctrl.$pending && ctrl.$pending[validationErrorKey]) {\n combinedState = undefined;\n } else if (ctrl.$error[validationErrorKey]) {\n combinedState = false;\n } else if (ctrl.$$success[validationErrorKey]) {\n combinedState = true;\n } else {\n combinedState = null;\n }\n toggleValidationCss(validationErrorKey, combinedState);\n parentForm.$setValidity(validationErrorKey, combinedState, ctrl);\n }\n\n function createAndSet(name, value, options) {\n if (!ctrl[name]) {\n ctrl[name] = {};\n }\n set(ctrl[name], value, options);\n }\n\n function unsetAndCleanup(name, value, options) {\n if (ctrl[name]) {\n unset(ctrl[name], value, options);\n }\n if (isObjectEmpty(ctrl[name])) {\n ctrl[name] = undefined;\n }\n }\n\n function cachedToggleClass(className, switchValue) {\n if (switchValue && !classCache[className]) {\n $animate.addClass($element, className);\n classCache[className] = true;\n } else if (!switchValue && classCache[className]) {\n $animate.removeClass($element, className);\n classCache[className] = false;\n }\n }\n\n function toggleValidationCss(validationErrorKey, isValid) {\n validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n\n cachedToggleClass(VALID_CLASS + validationErrorKey, isValid === true);\n cachedToggleClass(INVALID_CLASS + validationErrorKey, isValid === false);\n }\n}\n\nfunction isObjectEmpty(obj) {\n if (obj) {\n for (var prop in obj) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * @ngdoc directive\n * @name ngBind\n * @restrict AC\n *\n * @description\n * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element\n * with the value of a given expression, and to update the text content when the value of that\n * expression changes.\n *\n * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like\n * `{{ expression }}` which is similar but less verbose.\n *\n * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily\n * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an\n * element attribute, it makes the bindings invisible to the user while the page is loading.\n *\n * An alternative solution to this problem would be using the\n * {@link ng.directive:ngCloak ngCloak} directive.\n *\n *\n * @element ANY\n * @param {expression} ngBind {@link guide/expression Expression} to evaluate.\n *\n * @example\n * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.\n \n \n \n \n Enter name: \n Hello !\n \n \n \n it('should check ng-bind', function() {\n var nameInput = element(by.model('name'));\n\n expect(element(by.binding('name')).getText()).toBe('Whirled');\n nameInput.clear();\n nameInput.sendKeys('world');\n expect(element(by.binding('name')).getText()).toBe('world');\n });\n \n \n */\nvar ngBindDirective = ['$compile', function($compile) {\n return {\n restrict: 'AC',\n compile: function ngBindCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBind);\n scope.$watch(attr.ngBind, function ngBindWatchAction(value) {\n // We are purposefully using == here rather than === because we want to\n // catch when value is \"null or undefined\"\n // jshint -W041\n element.text(value == undefined ? '' : value);\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindTemplate\n *\n * @description\n * The `ngBindTemplate` directive specifies that the element\n * text content should be replaced with the interpolation of the template\n * in the `ngBindTemplate` attribute.\n * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`\n * expressions. This directive is needed since some HTML elements\n * (such as TITLE and OPTION) cannot contain SPAN elements.\n *\n * @element ANY\n * @param {string} ngBindTemplate template of form\n * {{ expression }} to eval.\n *\n * @example\n * Try it here: enter text in text box and watch the greeting change.\n \n \n \n \n Salutation: \n Name: \n \n \n \n \n it('should check ng-bind', function() {\n var salutationElem = element(by.binding('salutation'));\n var salutationInput = element(by.model('salutation'));\n var nameInput = element(by.model('name'));\n\n expect(salutationElem.getText()).toBe('Hello World!');\n\n salutationInput.clear();\n salutationInput.sendKeys('Greetings');\n nameInput.clear();\n nameInput.sendKeys('user');\n\n expect(salutationElem.getText()).toBe('Greetings user!');\n });\n \n \n */\nvar ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {\n return {\n compile: function ngBindTemplateCompile(templateElement) {\n $compile.$$addBindingClass(templateElement);\n return function ngBindTemplateLink(scope, element, attr) {\n var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));\n $compile.$$addBindingInfo(element, interpolateFn.expressions);\n attr.$observe('ngBindTemplate', function(value) {\n element.text(value);\n });\n };\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindHtml\n *\n * @description\n * Creates a binding that will innerHTML the result of evaluating the `expression` into the current\n * element in a secure way. By default, the innerHTML-ed content will be sanitized using the {@link\n * ngSanitize.$sanitize $sanitize} service. To utilize this functionality, ensure that `$sanitize`\n * is available, for example, by including {@link ngSanitize} in your module's dependencies (not in\n * core Angular.) You may also bypass sanitization for values you know are safe. To do so, bind to\n * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example\n * under {@link ng.$sce#Example Strict Contextual Escaping (SCE)}.\n *\n * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you\n * will have an exception (instead of an exploit.)\n *\n * @element ANY\n * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.\n *\n * @example\n\n \n \n \n \n \n \n\n \n angular.module('bindHtmlExample', ['ngSanitize'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.myHTML =\n 'I am an HTMLstring with ' +\n 'links! and other stuff';\n }]);\n \n\n \n it('should check ng-bind-html', function() {\n expect(element(by.binding('myHTML')).getText()).toBe(\n 'I am an HTMLstring with links! and other stuff');\n });\n \n \n */\nvar ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {\n return {\n restrict: 'A',\n compile: function ngBindHtmlCompile(tElement, tAttrs) {\n var ngBindHtmlGetter = $parse(tAttrs.ngBindHtml);\n var ngBindHtmlWatch = $parse(tAttrs.ngBindHtml, function getStringValue(value) {\n return (value || '').toString();\n });\n $compile.$$addBindingClass(tElement);\n\n return function ngBindHtmlLink(scope, element, attr) {\n $compile.$$addBindingInfo(element, attr.ngBindHtml);\n\n scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {\n // we re-evaluate the expr because we want a TrustedValueHolderType\n // for $sce, not a string\n element.html($sce.getTrustedHtml(ngBindHtmlGetter(scope)) || '');\n });\n };\n }\n };\n}];\n\nfunction classDirective(name, selector) {\n name = 'ngClass' + name;\n return ['$animate', function($animate) {\n return {\n restrict: 'AC',\n link: function(scope, element, attr) {\n var oldVal;\n\n scope.$watch(attr[name], ngClassWatchAction, true);\n\n attr.$observe('class', function(value) {\n ngClassWatchAction(scope.$eval(attr[name]));\n });\n\n\n if (name !== 'ngClass') {\n scope.$watch('$index', function($index, old$index) {\n // jshint bitwise: false\n var mod = $index & 1;\n if (mod !== (old$index & 1)) {\n var classes = arrayClasses(scope.$eval(attr[name]));\n mod === selector ?\n addClasses(classes) :\n removeClasses(classes);\n }\n });\n }\n\n function addClasses(classes) {\n var newClasses = digestClassCounts(classes, 1);\n attr.$addClass(newClasses);\n }\n\n function removeClasses(classes) {\n var newClasses = digestClassCounts(classes, -1);\n attr.$removeClass(newClasses);\n }\n\n function digestClassCounts (classes, count) {\n var classCounts = element.data('$classCounts') || {};\n var classesToUpdate = [];\n forEach(classes, function (className) {\n if (count > 0 || classCounts[className]) {\n classCounts[className] = (classCounts[className] || 0) + count;\n if (classCounts[className] === +(count > 0)) {\n classesToUpdate.push(className);\n }\n }\n });\n element.data('$classCounts', classCounts);\n return classesToUpdate.join(' ');\n }\n\n function updateClasses (oldClasses, newClasses) {\n var toAdd = arrayDifference(newClasses, oldClasses);\n var toRemove = arrayDifference(oldClasses, newClasses);\n toAdd = digestClassCounts(toAdd, 1);\n toRemove = digestClassCounts(toRemove, -1);\n if (toAdd && toAdd.length) {\n $animate.addClass(element, toAdd);\n }\n if (toRemove && toRemove.length) {\n $animate.removeClass(element, toRemove);\n }\n }\n\n function ngClassWatchAction(newVal) {\n if (selector === true || scope.$index % 2 === selector) {\n var newClasses = arrayClasses(newVal || []);\n if (!oldVal) {\n addClasses(newClasses);\n } else if (!equals(newVal,oldVal)) {\n var oldClasses = arrayClasses(oldVal);\n updateClasses(oldClasses, newClasses);\n }\n }\n oldVal = shallowCopy(newVal);\n }\n }\n };\n\n function arrayDifference(tokens1, tokens2) {\n var values = [];\n\n outer:\n for(var i = 0; i < tokens1.length; i++) {\n var token = tokens1[i];\n for(var j = 0; j < tokens2.length; j++) {\n if(token == tokens2[j]) continue outer;\n }\n values.push(token);\n }\n return values;\n }\n\n function arrayClasses (classVal) {\n if (isArray(classVal)) {\n return classVal;\n } else if (isString(classVal)) {\n return classVal.split(' ');\n } else if (isObject(classVal)) {\n var classes = [], i = 0;\n forEach(classVal, function(v, k) {\n if (v) {\n classes = classes.concat(k.split(' '));\n }\n });\n return classes;\n }\n return classVal;\n }\n }];\n}\n\n/**\n * @ngdoc directive\n * @name ngClass\n * @restrict AC\n *\n * @description\n * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding\n * an expression that represents all classes to be added.\n *\n * The directive operates in three different ways, depending on which of three types the expression\n * evaluates to:\n *\n * 1. If the expression evaluates to a string, the string should be one or more space-delimited class\n * names.\n *\n * 2. If the expression evaluates to an array, each element of the array should be a string that is\n * one or more space-delimited class names.\n *\n * 3. If the expression evaluates to an object, then for each key-value pair of the\n * object with a truthy value the corresponding key is used as a class name.\n *\n * The directive won't add duplicate classes if a particular class was already set.\n *\n * When the expression changes, the previously added classes are removed and only then the\n * new classes are added.\n *\n * @animations\n * add - happens just before the class is applied to the element\n * remove - happens just before the class is removed from the element\n *\n * @element ANY\n * @param {expression} ngClass {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class\n * names, an array, or a map of class names to boolean values. In the case of a map, the\n * names of the properties whose values are truthy will be added as css classes to the\n * element.\n *\n * @example Example that demonstrates basic bindings via ngClass directive.\n \n \n Map Syntax Example\n deleted (apply \"strike\" class)\n important (apply \"bold\" class)\n error (apply \"red\" class)\n \n Using String Syntax\n \n \n Using Array Syntax\n \n \n \n \n \n .strike {\n text-decoration: line-through;\n }\n .bold {\n font-weight: bold;\n }\n .red {\n color: red;\n }\n \n \n var ps = element.all(by.css('p'));\n\n it('should let you toggle the class', function() {\n\n expect(ps.first().getAttribute('class')).not.toMatch(/bold/);\n expect(ps.first().getAttribute('class')).not.toMatch(/red/);\n\n element(by.model('important')).click();\n expect(ps.first().getAttribute('class')).toMatch(/bold/);\n\n element(by.model('error')).click();\n expect(ps.first().getAttribute('class')).toMatch(/red/);\n });\n\n it('should let you toggle string example', function() {\n expect(ps.get(1).getAttribute('class')).toBe('');\n element(by.model('style')).clear();\n element(by.model('style')).sendKeys('red');\n expect(ps.get(1).getAttribute('class')).toBe('red');\n });\n\n it('array example should have 3 classes', function() {\n expect(ps.last().getAttribute('class')).toBe('');\n element(by.model('style1')).sendKeys('bold');\n element(by.model('style2')).sendKeys('strike');\n element(by.model('style3')).sendKeys('red');\n expect(ps.last().getAttribute('class')).toBe('bold strike red');\n });\n \n \n\n ## Animations\n\n The example below demonstrates how to perform animations using ngClass.\n\n \n \n \n \n \n Sample Text\n \n \n .base-class {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .base-class.my-class {\n color: red;\n font-size:3em;\n }\n \n \n it('should check ng-class', function() {\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n\n element(by.id('setbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).\n toMatch(/my-class/);\n\n element(by.id('clearbtn')).click();\n\n expect(element(by.css('.base-class')).getAttribute('class')).not.\n toMatch(/my-class/);\n });\n \n \n\n\n ## ngClass and pre-existing CSS3 Transitions/Animations\n The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.\n Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder\n any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure\n to view the step by step details of {@link ngAnimate.$animate#addclass $animate.addClass} and\n {@link ngAnimate.$animate#removeclass $animate.removeClass}.\n */\nvar ngClassDirective = classDirective('', true);\n\n/**\n * @ngdoc directive\n * @name ngClassOdd\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result\n * of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n \n \n \n \n \n {{name}}\n \n \n \n \n \n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n \n \n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n \n \n */\nvar ngClassOddDirective = classDirective('Odd', 0);\n\n/**\n * @ngdoc directive\n * @name ngClassEven\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The\n * result of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n \n \n \n \n \n {{name}} \n \n \n \n \n \n .odd {\n color: red;\n }\n .even {\n color: blue;\n }\n \n \n it('should check ng-class-odd and ng-class-even', function() {\n expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n toMatch(/odd/);\n expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n toMatch(/even/);\n });\n \n \n */\nvar ngClassEvenDirective = classDirective('Even', 1);\n\n/**\n * @ngdoc directive\n * @name ngCloak\n * @restrict AC\n *\n * @description\n * The `ngCloak` directive is used to prevent the Angular html template from being briefly\n * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this\n * directive to avoid the undesirable flicker effect caused by the html template display.\n *\n * The directive can be applied to the `` element, but the preferred usage is to apply\n * multiple `ngCloak` directives to small portions of the page to permit progressive rendering\n * of the browser view.\n *\n * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and\n * `angular.min.js`.\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```css\n * [ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {\n * display: none !important;\n * }\n * ```\n *\n * When this css rule is loaded by the browser, all html elements (including their children) that\n * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive\n * during the compilation of the template it deletes the `ngCloak` element attribute, making\n * the compiled element visible.\n *\n * For the best result, the `angular.js` script must be loaded in the head section of the html\n * document; alternatively, the css rule above must be included in the external stylesheet of the\n * application.\n *\n * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they\n * cannot match the `[ng\\:cloak]` selector. To work around this limitation, you must add the css\n * class `ng-cloak` in addition to the `ngCloak` directive as shown in the example below.\n *\n * @element ANY\n *\n * @example\n \n \n {{ 'hello' }}\n {{ 'hello IE7' }}\n \n \n it('should remove the template directive and css class', function() {\n expect($('#template1').getAttribute('ng-cloak')).\n toBeNull();\n expect($('#template2').getAttribute('ng-cloak')).\n toBeNull();\n });\n \n \n *\n */\nvar ngCloakDirective = ngDirective({\n compile: function(element, attr) {\n attr.$set('ngCloak', undefined);\n element.removeClass('ng-cloak');\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngController\n *\n * @description\n * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular\n * supports the principles behind the Model-View-Controller design pattern.\n *\n * MVC components in angular:\n *\n * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties\n * are accessed through bindings.\n * * View — The template (HTML with data bindings) that is rendered into the View.\n * * Controller — The `ngController` directive specifies a Controller class; the class contains business\n * logic behind the application to decorate the scope with functions and values\n *\n * Note that you can also attach controllers to the DOM by declaring it in a route definition\n * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller\n * again using `ng-controller` in the template itself. This will cause the controller to be attached\n * and executed twice.\n *\n * @element ANY\n * @scope\n * @priority 500\n * @param {expression} ngController Name of a constructor function registered with the current\n * {@link ng.$controllerProvider $controllerProvider} or an {@link guide/expression expression}\n * that on the current scope evaluates to a constructor function.\n *\n * The controller instance can be published into a scope property by specifying\n * `ng-controller=\"as propertyName\"`.\n *\n * If the current `$controllerProvider` is configured to use globals (via\n * {@link ng.$controllerProvider#allowGlobals `$controllerProvider.allowGlobals()` }), this may\n * also be the name of a globally accessible constructor function (not recommended).\n *\n * @example\n * Here is a simple form for editing user contact information. Adding, removing, clearing, and\n * greeting are methods declared on the controller (see source tab). These methods can\n * easily be called from the angular markup. Any changes to the data are automatically reflected\n * in the View without the need for a manual update.\n *\n * Two different declaration styles are included below:\n *\n * * one binds methods and properties directly onto the controller using `this`:\n * `ng-controller=\"SettingsController1 as settings\"`\n * * one injects `$scope` into the controller:\n * `ng-controller=\"SettingsController2\"`\n *\n * The second option is more common in the Angular community, and is generally used in boilerplates\n * and in this guide. However, there are advantages to binding properties directly to the controller\n * and avoiding scope.\n *\n * * Using `controller as` makes it obvious which controller you are accessing in the template when\n * multiple controllers apply to an element.\n * * If you are writing your controllers as classes you have easier access to the properties and\n * methods, which will appear on the scope, from inside the controller code.\n * * Since there is always a `.` in the bindings, you don't have to worry about prototypal\n * inheritance masking primitives.\n *\n * This example demonstrates the `controller as` syntax.\n *\n * \n * \n * \n * Name: \n * [ greet ]\n * Contact:\n * \n * \n * \n * phone\n * email\n * \n * \n * [ clear\n * | X ]\n * \n * [ add ]\n * \n * \n * \n * \n * angular.module('controllerAsExample', [])\n * .controller('SettingsController1', SettingsController1);\n *\n * function SettingsController1() {\n * this.name = \"John Smith\";\n * this.contacts = [\n * {type: 'phone', value: '408 555 1212'},\n * {type: 'email', value: 'john.smith@example.org'} ];\n * }\n *\n * SettingsController1.prototype.greet = function() {\n * alert(this.name);\n * };\n *\n * SettingsController1.prototype.addContact = function() {\n * this.contacts.push({type: 'email', value: 'yourname@example.org'});\n * };\n *\n * SettingsController1.prototype.removeContact = function(contactToRemove) {\n * var index = this.contacts.indexOf(contactToRemove);\n * this.contacts.splice(index, 1);\n * };\n *\n * SettingsController1.prototype.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * \n * \n * it('should check controller as', function() {\n * var container = element(by.id('ctrl-as-exmpl'));\n * expect(container.element(by.model('settings.name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in settings.contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n *\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.linkText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.linkText('add')).click();\n *\n * expect(container.element(by.repeater('contact in settings.contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * \n * \n *\n * This example demonstrates the \"attach to `$scope`\" style of controller.\n *\n * \n * \n * \n * Name: \n * [ greet ]\n * Contact:\n * \n * \n * \n * phone\n * email\n * \n * \n * [ clear\n * | X ]\n * \n * [ add ]\n * \n * \n * \n * \n * angular.module('controllerExample', [])\n * .controller('SettingsController2', ['$scope', SettingsController2]);\n *\n * function SettingsController2($scope) {\n * $scope.name = \"John Smith\";\n * $scope.contacts = [\n * {type:'phone', value:'408 555 1212'},\n * {type:'email', value:'john.smith@example.org'} ];\n *\n * $scope.greet = function() {\n * alert($scope.name);\n * };\n *\n * $scope.addContact = function() {\n * $scope.contacts.push({type:'email', value:'yourname@example.org'});\n * };\n *\n * $scope.removeContact = function(contactToRemove) {\n * var index = $scope.contacts.indexOf(contactToRemove);\n * $scope.contacts.splice(index, 1);\n * };\n *\n * $scope.clearContact = function(contact) {\n * contact.type = 'phone';\n * contact.value = '';\n * };\n * }\n * \n * \n * it('should check controller', function() {\n * var container = element(by.id('ctrl-exmpl'));\n *\n * expect(container.element(by.model('name'))\n * .getAttribute('value')).toBe('John Smith');\n *\n * var firstRepeat =\n * container.element(by.repeater('contact in contacts').row(0));\n * var secondRepeat =\n * container.element(by.repeater('contact in contacts').row(1));\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('408 555 1212');\n * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('john.smith@example.org');\n *\n * firstRepeat.element(by.linkText('clear')).click();\n *\n * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n * .toBe('');\n *\n * container.element(by.linkText('add')).click();\n *\n * expect(container.element(by.repeater('contact in contacts').row(2))\n * .element(by.model('contact.value'))\n * .getAttribute('value'))\n * .toBe('yourname@example.org');\n * });\n * \n *\n\n */\nvar ngControllerDirective = [function() {\n return {\n restrict: 'A',\n scope: true,\n controller: '@',\n priority: 500\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngCsp\n *\n * @element html\n * @description\n * Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support.\n *\n * This is necessary when developing things like Google Chrome Extensions.\n *\n * CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).\n * For Angular to be CSP compatible there are only two things that we need to do differently:\n *\n * - don't use `Function` constructor to generate optimized value getters\n * - don't inject custom stylesheet into the document\n *\n * AngularJS uses `Function(string)` generated functions as a speed optimization. Applying the `ngCsp`\n * directive will cause Angular to use CSP compatibility mode. When this mode is on AngularJS will\n * evaluate all expressions up to 30% slower than in non-CSP mode, but no security violations will\n * be raised.\n *\n * CSP forbids JavaScript to inline stylesheet rules. In non CSP mode Angular automatically\n * includes some CSS rules (e.g. {@link ng.directive:ngCloak ngCloak}).\n * To make those directives work in CSP mode, include the `angular-csp.css` manually.\n *\n * Angular tries to autodetect if CSP is active and automatically turn on the CSP-safe mode. This\n * autodetection however triggers a CSP error to be logged in the console:\n *\n * ```\n * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of\n * script in the following Content Security Policy directive: \"default-src 'self'\". Note that\n * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.\n * ```\n *\n * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`\n * directive on the root element of the application or on the `angular.js` script tag, whichever\n * appears first in the html document.\n *\n * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*\n *\n * @example\n * This example shows how to apply the `ngCsp` directive to the `html` tag.\n ```html\n \n \n ...\n ...\n \n ```\n */\n\n// ngCsp is not implemented as a proper directive any more, because we need it be processed while we\n// bootstrap the system (before $parse is instantiated), for this reason we just have\n// the csp.isActive() fn that looks for ng-csp attribute anywhere in the current doc\n\n/**\n * @ngdoc directive\n * @name ngClick\n *\n * @description\n * The ngClick directive allows you to specify custom behavior when\n * an element is clicked.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon\n * click. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment\n \n \n count: {{count}}\n \n \n \n it('should check ng-click', function() {\n expect(element(by.binding('count')).getText()).toMatch('0');\n element(by.css('button')).click();\n expect(element(by.binding('count')).getText()).toMatch('1');\n });\n \n \n */\n/*\n * A directive that allows creation of custom onclick handlers that are defined as angular\n * expressions and are compiled and executed within the current scope.\n *\n * Events that are handled via these handler are always configured not to propagate further.\n */\nvar ngEventDirectives = {};\n\n// For events that might fire synchronously during DOM manipulation\n// we need to execute their event handlers asynchronously using $evalAsync,\n// so that they are not executed in an inconsistent state.\nvar forceAsyncEvents = {\n 'blur': true,\n 'focus': true\n};\nforEach(\n 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),\n function(eventName) {\n var directiveName = directiveNormalize('ng-' + eventName);\n ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {\n return {\n restrict: 'A',\n compile: function($element, attr) {\n var fn = $parse(attr[directiveName]);\n return function ngEventHandler(scope, element) {\n element.on(eventName, function(event) {\n var callback = function() {\n fn(scope, {$event:event});\n };\n if (forceAsyncEvents[eventName] && $rootScope.$$phase) {\n scope.$evalAsync(callback);\n } else {\n scope.$apply(callback);\n }\n });\n };\n }\n };\n }];\n }\n);\n\n/**\n * @ngdoc directive\n * @name ngDblclick\n *\n * @description\n * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon\n * a dblclick. (The Event object is available as `$event`)\n *\n * @example\n \n \n \n Increment (on double click)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousedown\n *\n * @description\n * The ngMousedown directive allows you to specify custom behavior on mousedown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon\n * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (on mouse down)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseup\n *\n * @description\n * Specify custom behavior on mouseup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon\n * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (on mouse up)\n \n count: {{count}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngMouseover\n *\n * @description\n * Specify custom behavior on mouseover event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon\n * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse is over)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseenter\n *\n * @description\n * Specify custom behavior on mouseenter event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon\n * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse enters)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseleave\n *\n * @description\n * Specify custom behavior on mouseleave event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon\n * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse leaves)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousemove\n *\n * @description\n * Specify custom behavior on mousemove event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon\n * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n Increment (when mouse moves)\n \n count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeydown\n *\n * @description\n * Specify custom behavior on keydown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon\n * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n \n key down count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeyup\n *\n * @description\n * Specify custom behavior on keyup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon\n * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n Typing in the input box below updates the key count\n key up count: {{count}}\n\n Typing in the input box below updates the keycode\n \n event keyCode: {{ event.keyCode }}\n event altKey: {{ event.altKey }}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeypress\n *\n * @description\n * Specify custom behavior on keypress event.\n *\n * @element ANY\n * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon\n * keypress. ({@link guide/expression#-event- Event object is available as `$event`}\n * and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n \n \n \n key press count: {{count}}\n \n \n */\n\n\n/**\n * @ngdoc directive\n * @name ngSubmit\n *\n * @description\n * Enables binding angular expressions to onsubmit events.\n *\n * Additionally it prevents the default action (which for form means sending the request to the\n * server and reloading the current page), but only if the form does not contain `action`,\n * `data-action`, or `x-action` attributes.\n *\n * \n * **Warning:** Be careful not to cause \"double-submission\" by using both the `ngClick` and\n * `ngSubmit` handlers together. See the\n * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}\n * for a detailed discussion of when `ngSubmit` may be triggered.\n * \n *\n * @element form\n * @priority 0\n * @param {expression} ngSubmit {@link guide/expression Expression} to eval.\n * ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n \n Enter text and hit enter:\n \n \n list={{list}}\n \n \n \n it('should check ng-submit', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n expect(element(by.model('text')).getAttribute('value')).toBe('');\n });\n it('should ignore empty strings', function() {\n expect(element(by.binding('list')).getText()).toBe('list=[]');\n element(by.css('#submit')).click();\n element(by.css('#submit')).click();\n expect(element(by.binding('list')).getText()).toContain('hello');\n });\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngFocus\n *\n * @description\n * Specify custom behavior on focus event.\n *\n * Note: As the `focus` event is executed synchronously when calling `input.focus()`\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon\n * focus. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngBlur\n *\n * @description\n * Specify custom behavior on blur event.\n *\n * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when\n * an element has lost focus.\n *\n * Note: As the `blur` event is executed synchronously also during DOM manipulations\n * (e.g. removing a focussed input),\n * AngularJS executes the expression using `scope.$evalAsync` if the event is fired\n * during an `$apply` to ensure a consistent state.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon\n * blur. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngCopy\n *\n * @description\n * Specify custom behavior on copy event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon\n * copy. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n copied: {{copied}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngCut\n *\n * @description\n * Specify custom behavior on cut event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon\n * cut. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n cut: {{cut}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngPaste\n *\n * @description\n * Specify custom behavior on paste event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon\n * paste. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n \n \n \n pasted: {{paste}}\n \n \n */\n\n/**\n * @ngdoc directive\n * @name ngIf\n * @restrict A\n *\n * @description\n * The `ngIf` directive removes or recreates a portion of the DOM tree based on an\n * {expression}. If the expression assigned to `ngIf` evaluates to a false\n * value then the element is removed from the DOM, otherwise a clone of the\n * element is reinserted into the DOM.\n *\n * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the\n * element in the DOM rather than changing its visibility via the `display` css property. A common\n * case when this difference is significant is when using css selectors that rely on an element's\n * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.\n *\n * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope\n * is created when the element is restored. The scope created within `ngIf` inherits from\n * its parent scope using\n * [prototypal inheritance](https://github.com/angular/angular.js/wiki/The-Nuances-of-Scope-Prototypal-Inheritance).\n * An important implication of this is if `ngModel` is used within `ngIf` to bind to\n * a javascript primitive defined in the parent scope. In this case any modifications made to the\n * variable within the child scope will override (hide) the value in the parent scope.\n *\n * Also, `ngIf` recreates elements using their compiled state. An example of this behavior\n * is if an element's class attribute is directly modified after it's compiled, using something like\n * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element\n * the added class will be lost because the original compiled state is used to regenerate the element.\n *\n * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`\n * and `leave` effects.\n *\n * @animations\n * enter - happens just after the ngIf contents change and a new DOM element is created and injected into the ngIf container\n * leave - happens just before the ngIf contents are removed from the DOM\n *\n * @element ANY\n * @scope\n * @priority 600\n * @param {expression} ngIf If the {@link guide/expression expression} is falsy then\n * the element is removed from the DOM tree. If it is truthy a copy of the compiled\n * element is added to the DOM tree.\n *\n * @example\n \n \n Click me: \n Show when checked:\n \n I'm removed when the checkbox is unchecked.\n \n \n \n .animate-if {\n background:white;\n border:1px solid black;\n padding:10px;\n }\n\n .animate-if.ng-enter, .animate-if.ng-leave {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n }\n\n .animate-if.ng-enter,\n .animate-if.ng-leave.ng-leave-active {\n opacity:0;\n }\n\n .animate-if.ng-leave,\n .animate-if.ng-enter.ng-enter-active {\n opacity:1;\n }\n \n \n */\nvar ngIfDirective = ['$animate', function($animate) {\n return {\n multiElement: true,\n transclude: 'element',\n priority: 600,\n terminal: true,\n restrict: 'A',\n $$tlb: true,\n link: function ($scope, $element, $attr, ctrl, $transclude) {\n var block, childScope, previousElements;\n $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {\n\n if (value) {\n if (!childScope) {\n $transclude(function (clone, newScope) {\n childScope = newScope;\n clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block = {\n clone: clone\n };\n $animate.enter(clone, $element.parent(), $element);\n });\n }\n } else {\n if(previousElements) {\n previousElements.remove();\n previousElements = null;\n }\n if(childScope) {\n childScope.$destroy();\n childScope = null;\n }\n if(block) {\n previousElements = getBlockNodes(block.clone);\n $animate.leave(previousElements).then(function() {\n previousElements = null;\n });\n block = null;\n }\n }\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngInclude\n * @restrict ECA\n *\n * @description\n * Fetches, compiles and includes an external HTML fragment.\n *\n * By default, the template URL is restricted to the same domain and protocol as the\n * application document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols\n * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or\n * [wrap them](ng.$sce#trustAsResourceUrl) as trusted values. Refer to Angular's {@link\n * ng.$sce Strict Contextual Escaping}.\n *\n * In addition, the browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy may further restrict whether the template is successfully loaded.\n * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`\n * access on some browsers.\n *\n * @animations\n * enter - animation is used to bring new content into the browser.\n * leave - animation is used to animate existing content away.\n *\n * The enter and leave animation occur concurrently.\n *\n * @scope\n * @priority 400\n *\n * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,\n * make sure you wrap it in **single** quotes, e.g. `src=\"'myPartialTemplate.html'\"`.\n * @param {string=} onload Expression to evaluate when a new partial is loaded.\n *\n * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll\n * $anchorScroll} to scroll the viewport after the content is loaded.\n *\n * - If the attribute is not set, disable scrolling.\n * - If the attribute is set without value, enable scrolling.\n * - Otherwise enable scrolling only if the expression evaluates to truthy value.\n *\n * @example\n \n \n \n \n (blank)\n \n url of the template: {{template.url}}\n \n \n \n \n \n \n \n angular.module('includeExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.templates =\n [ { name: 'template1.html', url: 'template1.html'},\n { name: 'template2.html', url: 'template2.html'} ];\n $scope.template = $scope.templates[0];\n }]);\n \n \n Content of template1.html\n \n \n Content of template2.html\n \n \n .slide-animate-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .slide-animate {\n padding:10px;\n }\n\n .slide-animate.ng-enter, .slide-animate.ng-leave {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n display:block;\n padding:10px;\n }\n\n .slide-animate.ng-enter {\n top:-50px;\n }\n .slide-animate.ng-enter.ng-enter-active {\n top:0;\n }\n\n .slide-animate.ng-leave {\n top:0;\n }\n .slide-animate.ng-leave.ng-leave-active {\n top:50px;\n }\n \n \n var templateSelect = element(by.model('template'));\n var includeElem = element(by.css('[ng-include]'));\n\n it('should load template1.html', function() {\n expect(includeElem.getText()).toMatch(/Content of template1.html/);\n });\n\n it('should load template2.html', function() {\n if (browser.params.browser == 'firefox') {\n // Firefox can't handle using selects\n // See https://github.com/angular/protractor/issues/480\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(2).click();\n expect(includeElem.getText()).toMatch(/Content of template2.html/);\n });\n\n it('should change to blank', function() {\n if (browser.params.browser == 'firefox') {\n // Firefox can't handle using selects\n return;\n }\n templateSelect.click();\n templateSelect.all(by.css('option')).get(0).click();\n expect(includeElem.isPresent()).toBe(false);\n });\n \n \n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentRequested\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted every time the ngInclude content is requested.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentLoaded\n * @eventType emit on the current ngInclude scope\n * @description\n * Emitted every time the ngInclude content is reloaded.\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentError\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted when a template HTTP request yields an erronous response (status < 200 || status > 299)\n *\n * @param {Object} angularEvent Synthetic event object.\n * @param {String} src URL of content to load.\n */\nvar ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate', '$sce',\n function($templateRequest, $anchorScroll, $animate, $sce) {\n return {\n restrict: 'ECA',\n priority: 400,\n terminal: true,\n transclude: 'element',\n controller: angular.noop,\n compile: function(element, attr) {\n var srcExp = attr.ngInclude || attr.src,\n onloadExp = attr.onload || '',\n autoScrollExp = attr.autoscroll;\n\n return function(scope, $element, $attr, ctrl, $transclude) {\n var changeCounter = 0,\n currentScope,\n previousElement,\n currentElement;\n\n var cleanupLastIncludeContent = function() {\n if(previousElement) {\n previousElement.remove();\n previousElement = null;\n }\n if(currentScope) {\n currentScope.$destroy();\n currentScope = null;\n }\n if(currentElement) {\n $animate.leave(currentElement).then(function() {\n previousElement = null;\n });\n previousElement = currentElement;\n currentElement = null;\n }\n };\n\n scope.$watch($sce.parseAsResourceUrl(srcExp), function ngIncludeWatchAction(src) {\n var afterAnimation = function() {\n if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n $anchorScroll();\n }\n };\n var thisChangeId = ++changeCounter;\n\n if (src) {\n //set the 2nd param to true to ignore the template request error so that the inner\n //contents and scope can be cleaned up.\n $templateRequest(src, true).then(function(response) {\n if (thisChangeId !== changeCounter) return;\n var newScope = scope.$new();\n ctrl.template = response;\n\n // Note: This will also link all children of ng-include that were contained in the original\n // html. If that content contains controllers, ... they could pollute/change the scope.\n // However, using ng-include on an element with additional content does not make sense...\n // Note: We can't remove them in the cloneAttchFn of $transclude as that\n // function is called before linking the content, which would apply child\n // directives to non existing elements.\n var clone = $transclude(newScope, function(clone) {\n cleanupLastIncludeContent();\n $animate.enter(clone, null, $element).then(afterAnimation);\n });\n\n currentScope = newScope;\n currentElement = clone;\n\n currentScope.$emit('$includeContentLoaded', src);\n scope.$eval(onloadExp);\n }, function() {\n if (thisChangeId === changeCounter) {\n cleanupLastIncludeContent();\n scope.$emit('$includeContentError', src);\n }\n });\n scope.$emit('$includeContentRequested', src);\n } else {\n cleanupLastIncludeContent();\n ctrl.template = null;\n }\n });\n };\n }\n };\n}];\n\n// This directive is called during the $transclude call of the first `ngInclude` directive.\n// It will replace and compile the content of the element with the loaded template.\n// We need this directive so that the element content is already filled when\n// the link function of another directive on the same element as ngInclude\n// is called.\nvar ngIncludeFillContentDirective = ['$compile',\n function($compile) {\n return {\n restrict: 'ECA',\n priority: -400,\n require: 'ngInclude',\n link: function(scope, $element, $attr, ctrl) {\n if (/SVG/.test($element[0].toString())) {\n // WebKit: https://bugs.webkit.org/show_bug.cgi?id=135698 --- SVG elements do not\n // support innerHTML, so detect this here and try to generate the contents\n // specially.\n $element.empty();\n $compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,\n function namespaceAdaptedClone(clone) {\n $element.append(clone);\n }, undefined, undefined, $element);\n return;\n }\n\n $element.html(ctrl.template);\n $compile($element.contents())(scope);\n }\n };\n }];\n\n/**\n * @ngdoc directive\n * @name ngInit\n * @restrict AC\n *\n * @description\n * The `ngInit` directive allows you to evaluate an expression in the\n * current scope.\n *\n * \n * The only appropriate use of `ngInit` is for aliasing special properties of\n * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below. Besides this case, you\n * should use {@link guide/controller controllers} rather than `ngInit`\n * to initialize values on a scope.\n * \n * \n * **Note**: If you have assignment in `ngInit` along with {@link ng.$filter `$filter`}, make\n * sure you have parenthesis for correct precedence:\n * \n * \n * \n * \n *\n * @priority 450\n *\n * @element ANY\n * @param {expression} ngInit {@link guide/expression Expression} to eval.\n *\n * @example\n \n \n \n \n \n \n list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};\n \n \n \n \n \n it('should alias index positions', function() {\n var elements = element.all(by.css('.example-init'));\n expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');\n expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');\n expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');\n expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');\n });\n \n \n */\nvar ngInitDirective = ngDirective({\n priority: 450,\n compile: function() {\n return {\n pre: function(scope, element, attrs) {\n scope.$eval(attrs.ngInit);\n }\n };\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngNonBindable\n * @restrict AC\n * @priority 1000\n *\n * @description\n * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current\n * DOM element. This is useful if the element contains what appears to be Angular directives and\n * bindings but which should be ignored by Angular. This could be the case if you have a site that\n * displays snippets of code, for instance.\n *\n * @element ANY\n *\n * @example\n * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n * but the one wrapped in `ngNonBindable` is left alone.\n *\n * @example\n \n \n Normal: {{1 + 2}}\n Ignored: {{1 + 2}}\n \n \n it('should check ng-non-bindable', function() {\n expect(element(by.binding('1 + 2')).getText()).toContain('3');\n expect(element.all(by.css('div')).last().getText()).toMatch(/1 \\+ 2/);\n });\n \n \n */\nvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\n/**\n * @ngdoc directive\n * @name ngPluralize\n * @restrict EA\n *\n * @description\n * `ngPluralize` is a directive that displays messages according to en-US localization rules.\n * These rules are bundled with angular.js, but can be overridden\n * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive\n * by specifying the mappings between\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * and the strings to be displayed.\n *\n * # Plural categories and explicit number rules\n * There are two\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * in Angular's default en-US locale: \"one\" and \"other\".\n *\n * While a plural category may match many numbers (for example, in en-US locale, \"other\" can match\n * any number that is not 1), an explicit number rule can only match one number. For example, the\n * explicit number rule for \"3\" matches the number 3. There are examples of plural categories\n * and explicit number rules throughout the rest of this documentation.\n *\n * # Configuring ngPluralize\n * You configure ngPluralize by providing 2 attributes: `count` and `when`.\n * You can also provide an optional attribute, `offset`.\n *\n * The value of the `count` attribute can be either a string or an {@link guide/expression\n * Angular expression}; these are evaluated on the current scope for its bound value.\n *\n * The `when` attribute specifies the mappings between plural categories and the actual\n * string to be displayed. The value of the attribute should be a JSON object.\n *\n * The following example shows how to configure ngPluralize:\n *\n * ```html\n * \n * \n *```\n *\n * In the example, `\"0: Nobody is viewing.\"` is an explicit number rule. If you did not\n * specify this rule, 0 would be matched to the \"other\" category and \"0 people are viewing\"\n * would be shown instead of \"Nobody is viewing\". You can specify an explicit number rule for\n * other numbers, for example 12, so that instead of showing \"12 people are viewing\", you can\n * show \"a dozen people are viewing\".\n *\n * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted\n * into pluralized strings. In the previous example, Angular will replace `{}` with\n * `{{personCount}}`. The closed braces `{}` is a placeholder\n * for {{numberExpression}}.\n *\n * # Configuring ngPluralize with offset\n * The `offset` attribute allows further customization of pluralized text, which can result in\n * a better user experience. For example, instead of the message \"4 people are viewing this document\",\n * you might display \"John, Kate and 2 others are viewing this document\".\n * The offset attribute allows you to offset a number by any desired value.\n * Let's take a look at an example:\n *\n * ```html\n * \n * \n * ```\n *\n * Notice that we are still using two plural categories(one, other), but we added\n * three explicit number rules 0, 1 and 2.\n * When one person, perhaps John, views the document, \"John is viewing\" will be shown.\n * When three people view the document, no explicit number rule is found, so\n * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.\n * In this case, plural category 'one' is matched and \"John, Mary and one other person are viewing\"\n * is shown.\n *\n * Note that when you specify offsets, you must provide explicit number rules for\n * numbers from 0 up to and including the offset. If you use an offset of 3, for example,\n * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for\n * plural categories \"one\" and \"other\".\n *\n * @param {string|expression} count The variable to be bound to.\n * @param {string} when The mapping between plural category to its corresponding strings.\n * @param {number=} offset Offset to deduct from the total number.\n *\n * @example\n \n \n \n \n Person 1:\n Person 2:\n Number of People:\n\n \n Without Offset:\n \n \n\n \n With Offset(2):\n \n \n \n \n \n it('should show correct pluralized string', function() {\n var withoutOffset = element.all(by.css('ng-pluralize')).get(0);\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var countInput = element(by.model('personCount'));\n\n expect(withoutOffset.getText()).toEqual('1 person is viewing.');\n expect(withOffset.getText()).toEqual('Igor is viewing.');\n\n countInput.clear();\n countInput.sendKeys('0');\n\n expect(withoutOffset.getText()).toEqual('Nobody is viewing.');\n expect(withOffset.getText()).toEqual('Nobody is viewing.');\n\n countInput.clear();\n countInput.sendKeys('2');\n\n expect(withoutOffset.getText()).toEqual('2 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');\n\n countInput.clear();\n countInput.sendKeys('3');\n\n expect(withoutOffset.getText()).toEqual('3 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');\n\n countInput.clear();\n countInput.sendKeys('4');\n\n expect(withoutOffset.getText()).toEqual('4 people are viewing.');\n expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');\n });\n it('should show data-bound names', function() {\n var withOffset = element.all(by.css('ng-pluralize')).get(1);\n var personCount = element(by.model('personCount'));\n var person1 = element(by.model('person1'));\n var person2 = element(by.model('person2'));\n personCount.clear();\n personCount.sendKeys('4');\n person1.clear();\n person1.sendKeys('Di');\n person2.clear();\n person2.sendKeys('Vojta');\n expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');\n });\n \n \n */\nvar ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interpolate) {\n var BRACE = /{}/g;\n return {\n restrict: 'EA',\n link: function(scope, element, attr) {\n var numberExp = attr.count,\n whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs\n offset = attr.offset || 0,\n whens = scope.$eval(whenExp) || {},\n whensExpFns = {},\n startSymbol = $interpolate.startSymbol(),\n endSymbol = $interpolate.endSymbol(),\n isWhen = /^when(Minus)?(.+)$/;\n\n forEach(attr, function(expression, attributeName) {\n if (isWhen.test(attributeName)) {\n whens[lowercase(attributeName.replace('when', '').replace('Minus', '-'))] =\n element.attr(attr.$attr[attributeName]);\n }\n });\n forEach(whens, function(expression, key) {\n whensExpFns[key] =\n $interpolate(expression.replace(BRACE, startSymbol + numberExp + '-' +\n offset + endSymbol));\n });\n\n scope.$watch(function ngPluralizeWatch() {\n var value = parseFloat(scope.$eval(numberExp));\n\n if (!isNaN(value)) {\n //if explicit number rule such as 1, 2, 3... is defined, just use it. Otherwise,\n //check it against pluralization rules in $locale service\n if (!(value in whens)) value = $locale.pluralCat(value - offset);\n return whensExpFns[value](scope);\n } else {\n return '';\n }\n }, function ngPluralizeWatchAction(newVal) {\n element.text(newVal);\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngRepeat\n *\n * @description\n * The `ngRepeat` directive instantiates a template once per item from a collection. Each template\n * instance gets its own scope, where the given loop variable is set to the current collection item,\n * and `$index` is set to the item index or key.\n *\n * Special properties are exposed on the local scope of each template instance, including:\n *\n * | Variable | Type | Details |\n * |-----------|-----------------|-----------------------------------------------------------------------------|\n * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |\n * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |\n * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |\n * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |\n * | `$even` | {@type boolean} | true if the iterator position `$index` is even (otherwise false). |\n * | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |\n *\n * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.\n * This may be useful when, for instance, nesting ngRepeats.\n *\n * # Special repeat start and end points\n * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending\n * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.\n * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)\n * up to and including the ending HTML tag where **ng-repeat-end** is placed.\n *\n * The example below makes use of this feature:\n * ```html\n * \n * Header {{ item }}\n * \n * \n * Body {{ item }}\n * \n * \n * ```\n *\n * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:\n * ```html\n * \n * Header A\n * \n * \n * Body A\n * \n * \n * \n * Header B\n * \n * \n * Body B\n * \n * \n * ```\n *\n * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such\n * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).\n *\n * @animations\n * **.enter** - when a new item is added to the list or when an item is revealed after a filter\n *\n * **.leave** - when an item is removed from the list or when an item is filtered out\n *\n * **.move** - when an adjacent item is filtered out causing a reorder or when the item contents are reordered\n *\n * @element ANY\n * @scope\n * @priority 1000\n * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These\n * formats are currently supported:\n *\n * * `variable in expression` – where variable is the user defined loop variable and `expression`\n * is a scope expression giving the collection to enumerate.\n *\n * For example: `album in artist.albums`.\n *\n * * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,\n * and `expression` is the scope expression giving the collection to enumerate.\n *\n * For example: `(name, age) in {'adam':10, 'amalie':12}`.\n *\n * * `variable in expression track by tracking_expression` – You can also provide an optional tracking function\n * which can be used to associate the objects in the collection with the DOM elements. If no tracking function\n * is specified the ng-repeat associates elements by identity in the collection. It is an error to have\n * more than one tracking function to resolve to the same key. (This would mean that two distinct objects are\n * mapped to the same DOM element, which is not possible.) Filters should be applied to the expression,\n * before specifying a tracking expression.\n *\n * For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements\n * will be associated by item identity in the array.\n *\n * * `variable in expression as alias_expression` – You can also provide an optional alias expression which will then store the\n * intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message\n * when a filter is active on the repeater, but the filtered result set is empty.\n *\n * For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after\n * the items have been processed through the filter.\n *\n * For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique\n * `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements\n * with the corresponding item in the array by identity. Moving the same object in array would move the DOM\n * element in the same way in the DOM.\n *\n * For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this\n * case the object identity does not matter. Two objects are considered equivalent as long as their `id`\n * property is same.\n *\n * For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter\n * to items in conjunction with a tracking expression.\n *\n * @example\n * This example initializes the scope to a list of names and\n * then uses `ngRepeat` to display every person:\n \n \n \n I have {{friends.length}} friends. They are:\n \n \n \n [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.\n \n \n No results found...\n \n \n \n \n \n .example-animate-container {\n background:white;\n border:1px solid black;\n list-style:none;\n margin:0;\n padding:0 10px;\n }\n\n .animate-repeat {\n line-height:40px;\n list-style:none;\n box-sizing:border-box;\n }\n\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter,\n .animate-repeat.ng-leave {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n }\n\n .animate-repeat.ng-leave.ng-leave-active,\n .animate-repeat.ng-move,\n .animate-repeat.ng-enter {\n opacity:0;\n max-height:0;\n }\n\n .animate-repeat.ng-leave,\n .animate-repeat.ng-move.ng-move-active,\n .animate-repeat.ng-enter.ng-enter-active {\n opacity:1;\n max-height:40px;\n }\n \n \n var friends = element.all(by.repeater('friend in friends'));\n\n it('should render initial data set', function() {\n expect(friends.count()).toBe(10);\n expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');\n expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');\n expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');\n expect(element(by.binding('friends.length')).getText())\n .toMatch(\"I have 10 friends. They are:\");\n });\n\n it('should update repeater when filter predicate changes', function() {\n expect(friends.count()).toBe(10);\n\n element(by.model('q')).sendKeys('ma');\n\n expect(friends.count()).toBe(2);\n expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');\n expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');\n });\n \n \n */\nvar ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {\n var NG_REMOVED = '$$NG_REMOVED';\n var ngRepeatMinErr = minErr('ngRepeat');\n\n var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {\n // TODO(perf): generate setters to shave off ~40ms or 1-1.5%\n scope[valueIdentifier] = value;\n if (keyIdentifier) scope[keyIdentifier] = key;\n scope.$index = index;\n scope.$first = (index === 0);\n scope.$last = (index === (arrayLength - 1));\n scope.$middle = !(scope.$first || scope.$last);\n // jshint bitwise: false\n scope.$odd = !(scope.$even = (index&1) === 0);\n // jshint bitwise: true\n };\n\n var getBlockStart = function(block) {\n return block.clone[0];\n };\n\n var getBlockEnd = function(block) {\n return block.clone[block.clone.length - 1];\n };\n\n\n return {\n restrict: 'A',\n multiElement: true,\n transclude: 'element',\n priority: 1000,\n terminal: true,\n $$tlb: true,\n compile: function ngRepeatCompile($element, $attr) {\n var expression = $attr.ngRepeat;\n var ngRepeatEndComment = document.createComment(' end ngRepeat: ' + expression + ' ');\n\n var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n\n if (!match) {\n throw ngRepeatMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n expression);\n }\n\n var lhs = match[1];\n var rhs = match[2];\n var aliasAs = match[3];\n var trackByExp = match[4];\n\n match = lhs.match(/^(?:([\\$\\w]+)|\\(([\\$\\w]+)\\s*,\\s*([\\$\\w]+)\\))$/);\n\n if (!match) {\n throw ngRepeatMinErr('iidexp', \"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.\",\n lhs);\n }\n var valueIdentifier = match[3] || match[1];\n var keyIdentifier = match[2];\n\n if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||\n /^(null|undefined|this|\\$index|\\$first|\\$middle|\\$last|\\$even|\\$odd|\\$parent)$/.test(aliasAs))) {\n throw ngRepeatMinErr('badident', \"alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.\",\n aliasAs);\n }\n\n var trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn;\n var hashFnLocals = {$id: hashKey};\n\n if (trackByExp) {\n trackByExpGetter = $parse(trackByExp);\n } else {\n trackByIdArrayFn = function (key, value) {\n return hashKey(value);\n };\n trackByIdObjFn = function (key) {\n return key;\n };\n }\n\n return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {\n\n if (trackByExpGetter) {\n trackByIdExpFn = function(key, value, index) {\n // assign key, value, and $index to the locals so that they can be used in hash functions\n if (keyIdentifier) hashFnLocals[keyIdentifier] = key;\n hashFnLocals[valueIdentifier] = value;\n hashFnLocals.$index = index;\n return trackByExpGetter($scope, hashFnLocals);\n };\n }\n\n // Store a list of elements from previous run. This is a hash where key is the item from the\n // iterator, and the value is objects with following properties.\n // - scope: bound scope\n // - element: previous element.\n // - index: position\n //\n // We are using no-proto object so that we don't need to guard against inherited props via\n // hasOwnProperty.\n var lastBlockMap = createMap();\n\n //watch props\n $scope.$watchCollection(rhs, function ngRepeatAction(collection) {\n var index, length,\n previousNode = $element[0], // node that cloned nodes should be inserted after\n // initialized to the comment node anchor\n nextNode,\n // Same as lastBlockMap but it has the current state. It will become the\n // lastBlockMap on the next iteration.\n nextBlockMap = createMap(),\n collectionLength,\n key, value, // key/value of iteration\n trackById,\n trackByIdFn,\n collectionKeys,\n block, // last object information {scope, element, id}\n nextBlockOrder,\n elementsToRemove;\n\n if (aliasAs) {\n $scope[aliasAs] = collection;\n }\n\n if (isArrayLike(collection)) {\n collectionKeys = collection;\n trackByIdFn = trackByIdExpFn || trackByIdArrayFn;\n } else {\n trackByIdFn = trackByIdExpFn || trackByIdObjFn;\n // if object, extract keys, sort them and use to determine order of iteration over obj props\n collectionKeys = [];\n for (var itemKey in collection) {\n if (collection.hasOwnProperty(itemKey) && itemKey.charAt(0) != '$') {\n collectionKeys.push(itemKey);\n }\n }\n collectionKeys.sort();\n }\n\n collectionLength = collectionKeys.length;\n nextBlockOrder = new Array(collectionLength);\n\n // locate existing items\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n trackById = trackByIdFn(key, value, index);\n if (lastBlockMap[trackById]) {\n // found previously seen block\n block = lastBlockMap[trackById];\n delete lastBlockMap[trackById];\n nextBlockMap[trackById] = block;\n nextBlockOrder[index] = block;\n } else if (nextBlockMap[trackById]) {\n // if collision detected. restore lastBlockMap and throw an error\n forEach(nextBlockOrder, function (block) {\n if (block && block.scope) lastBlockMap[block.id] = block;\n });\n throw ngRepeatMinErr('dupes',\n \"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}\",\n expression, trackById, toJson(value));\n } else {\n // new never before seen block\n nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};\n nextBlockMap[trackById] = true;\n }\n }\n\n // remove leftover items\n for (var blockKey in lastBlockMap) {\n block = lastBlockMap[blockKey];\n elementsToRemove = getBlockNodes(block.clone);\n $animate.leave(elementsToRemove);\n if (elementsToRemove[0].parentNode) {\n // if the element was not removed yet because of pending animation, mark it as deleted\n // so that we can ignore it later\n for (index = 0, length = elementsToRemove.length; index < length; index++) {\n elementsToRemove[index][NG_REMOVED] = true;\n }\n }\n block.scope.$destroy();\n }\n\n // we are not using forEach for perf reasons (trying to avoid #call)\n for (index = 0; index < collectionLength; index++) {\n key = (collection === collectionKeys) ? index : collectionKeys[index];\n value = collection[key];\n block = nextBlockOrder[index];\n\n if (block.scope) {\n // if we have already seen this object, then we need to reuse the\n // associated scope/element\n\n nextNode = previousNode;\n\n // skip nodes that are already pending removal via leave animation\n do {\n nextNode = nextNode.nextSibling;\n } while (nextNode && nextNode[NG_REMOVED]);\n\n if (getBlockStart(block) != nextNode) {\n // existing item which got moved\n $animate.move(getBlockNodes(block.clone), null, jqLite(previousNode));\n }\n previousNode = getBlockEnd(block);\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n } else {\n // new item which we don't know about\n $transclude(function ngRepeatTransclude(clone, scope) {\n block.scope = scope;\n // http://jsperf.com/clone-vs-createcomment\n var endNode = ngRepeatEndComment.cloneNode(false);\n clone[clone.length++] = endNode;\n\n // TODO(perf): support naked previousNode in `enter` to avoid creation of jqLite wrapper?\n $animate.enter(clone, null, jqLite(previousNode));\n previousNode = endNode;\n // Note: We only need the first/last node of the cloned nodes.\n // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n // by a directive with templateUrl when its template arrives.\n block.clone = clone;\n nextBlockMap[block.id] = block;\n updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);\n });\n }\n }\n lastBlockMap = nextBlockMap;\n });\n };\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngShow\n *\n * @description\n * The `ngShow` directive shows or hides the given HTML element based on the expression\n * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding\n * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * \n * \n *\n * \n * \n * ```\n *\n * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When truthy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n * /* this is just another form of hiding an element */\n * display:block!important;\n * position:absolute;\n * top:-9999px;\n * left:-9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngShow`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass except that\n * you must also include the !important flag to override the display property\n * so that you can perform an animation when the element is hidden during the time of the animation.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * /* this is required as of 1.3x to properly\n * apply all styling in a show/hide animation */\n * transition:0s linear all;\n * }\n *\n * .my-element.ng-hide-add-active,\n * .my-element.ng-hide-remove-active {\n * /* the transition is defined in the active class */\n * transition:1s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * addClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a truthy value and the just before contents are set to visible\n * removeClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden\n *\n * @element ANY\n * @param {expression} ngShow If the {@link guide/expression expression} is truthy\n * then the element is shown or hidden respectively.\n *\n * @example\n \n \n Click me: \n \n Show:\n \n I show up when your checkbox is checked.\n \n \n \n Hide:\n \n I hide when your checkbox is checked.\n \n \n \n \n @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);\n \n \n .animate-show {\n line-height:20px;\n opacity:1;\n padding:10px;\n border:1px solid black;\n background:white;\n }\n\n .animate-show.ng-hide-add.ng-hide-add-active,\n .animate-show.ng-hide-remove.ng-hide-remove-active {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n }\n\n .animate-show.ng-hide {\n line-height:0;\n opacity:0;\n padding:0 10px;\n }\n\n .check-element {\n padding:10px;\n border:1px solid black;\n background:white;\n }\n \n \n var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n it('should check ng-show / ng-hide', function() {\n expect(thumbsUp.isDisplayed()).toBeFalsy();\n expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n element(by.model('checked')).click();\n\n expect(thumbsUp.isDisplayed()).toBeTruthy();\n expect(thumbsDown.isDisplayed()).toBeFalsy();\n });\n \n \n */\nvar ngShowDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngShow, function ngShowWatchAction(value){\n $animate[value ? 'removeClass' : 'addClass'](element, 'ng-hide');\n });\n }\n };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngHide\n *\n * @description\n * The `ngHide` directive shows or hides the given HTML element based on the expression\n * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * \n * \n *\n * \n * \n * ```\n *\n * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added to the class\n * attribute on the element causing it to become hidden. When falsy, the `.ng-hide` CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding `.ng-hide`\n *\n * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n * /* this is just another form of hiding an element */\n * display:block!important;\n * position:absolute;\n * top:-9999px;\n * left:-9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with `ngHide`\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`\n * CSS class is added and removed for you instead of your own CSS class.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n * transition:0.5s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * removeClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden\n * addClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a non truthy value and just before the contents are set to visible\n *\n * @element ANY\n * @param {expression} ngHide If the {@link guide/expression expression} is truthy then\n * the element is shown or hidden respectively.\n *\n * @example\n \n \n Click me: \n \n Show:\n \n I show up when your checkbox is checked.\n \n \n \n Hide:\n \n I hide when your checkbox is checked.\n \n \n \n \n @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);\n \n \n .animate-hide {\n -webkit-transition:all linear 0.5s;\n transition:all linear 0.5s;\n line-height:20px;\n opacity:1;\n padding:10px;\n border:1px solid black;\n background:white;\n }\n\n .animate-hide.ng-hide {\n line-height:0;\n opacity:0;\n padding:0 10px;\n }\n\n .check-element {\n padding:10px;\n border:1px solid black;\n background:white;\n }\n \n \n var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n it('should check ng-show / ng-hide', function() {\n expect(thumbsUp.isDisplayed()).toBeFalsy();\n expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n element(by.model('checked')).click();\n\n expect(thumbsUp.isDisplayed()).toBeTruthy();\n expect(thumbsDown.isDisplayed()).toBeFalsy();\n });\n \n \n */\nvar ngHideDirective = ['$animate', function($animate) {\n return {\n restrict: 'A',\n multiElement: true,\n link: function(scope, element, attr) {\n scope.$watch(attr.ngHide, function ngHideWatchAction(value){\n $animate[value ? 'addClass' : 'removeClass'](element, 'ng-hide');\n });\n }\n };\n}];\n\n/**\n * @ngdoc directive\n * @name ngStyle\n * @restrict AC\n *\n * @description\n * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.\n *\n * @element ANY\n * @param {expression} ngStyle\n *\n * {@link guide/expression Expression} which evals to an\n * object whose keys are CSS style names and values are corresponding values for those CSS\n * keys.\n *\n * Since some CSS style names are not valid keys for an object, they must be quoted.\n * See the 'background-color' style in the example below.\n *\n * @example\n \n \n \n \n \n \n Sample Text\n myStyle={{myStyle}}\n \n \n span {\n color: black;\n }\n \n \n var colorSpan = element(by.css('span'));\n\n it('should check ng-style', function() {\n expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n element(by.css('input[value=\\'set color\\']')).click();\n expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');\n element(by.css('input[value=clear]')).click();\n expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n });\n \n \n */\nvar ngStyleDirective = ngDirective(function(scope, element, attr) {\n scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {\n if (oldStyles && (newStyles !== oldStyles)) {\n forEach(oldStyles, function(val, style) { element.css(style, '');});\n }\n if (newStyles) element.css(newStyles);\n }, true);\n});\n\n/**\n * @ngdoc directive\n * @name ngSwitch\n * @restrict EA\n *\n * @description\n * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.\n * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location\n * as specified in the template.\n *\n * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it\n * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element\n * matches the value obtained from the evaluated expression. In other words, you define a container element\n * (where you place the directive), place an expression on the **`on=\"...\"` attribute**\n * (or the **`ng-switch=\"...\"` attribute**), define any inner elements inside of the directive and place\n * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on\n * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default\n * attribute is displayed.\n *\n * \n * Be aware that the attribute values to match against cannot be expressions. They are interpreted\n * as literal string values to match against.\n * For example, **`ng-switch-when=\"someVal\"`** will match against the string `\"someVal\"` not against the\n * value of the expression `$scope.someVal`.\n * \n\n * @animations\n * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container\n * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM\n *\n * @usage\n *\n * ```\n * \n * ...\n * ...\n * ...\n * \n * ```\n *\n *\n * @scope\n * @priority 1200\n * @param {*} ngSwitch|on expression to match against ng-switch-when.\n * On child elements add:\n *\n * * `ngSwitchWhen`: the case statement to match against. If match then this\n * case will be displayed. If the same match appears multiple times, all the\n * elements will be displayed.\n * * `ngSwitchDefault`: the default case when no other case match. If there\n * are multiple default cases, all of them will be displayed when no other\n * case match.\n *\n *\n * @example\n \n \n \n \n \n selection={{selection}}\n \n \n Settings Div\n Home Span\n default\n \n \n \n \n angular.module('switchExample', ['ngAnimate'])\n .controller('ExampleController', ['$scope', function($scope) {\n $scope.items = ['settings', 'home', 'other'];\n $scope.selection = $scope.items[0];\n }]);\n \n \n .animate-switch-container {\n position:relative;\n background:white;\n border:1px solid black;\n height:40px;\n overflow:hidden;\n }\n\n .animate-switch {\n padding:10px;\n }\n\n .animate-switch.ng-animate {\n -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n position:absolute;\n top:0;\n left:0;\n right:0;\n bottom:0;\n }\n\n .animate-switch.ng-leave.ng-leave-active,\n .animate-switch.ng-enter {\n top:-50px;\n }\n .animate-switch.ng-leave,\n .animate-switch.ng-enter.ng-enter-active {\n top:0;\n }\n \n \n var switchElem = element(by.css('[ng-switch]'));\n var select = element(by.model('selection'));\n\n it('should start in settings', function() {\n expect(switchElem.getText()).toMatch(/Settings Div/);\n });\n it('should change to home', function() {\n select.all(by.css('option')).get(1).click();\n expect(switchElem.getText()).toMatch(/Home Span/);\n });\n it('should select default', function() {\n select.all(by.css('option')).get(2).click();\n expect(switchElem.getText()).toMatch(/default/);\n });\n \n \n */\nvar ngSwitchDirective = ['$animate', function($animate) {\n return {\n restrict: 'EA',\n require: 'ngSwitch',\n\n // asks for $scope to fool the BC controller module\n controller: ['$scope', function ngSwitchController() {\n this.cases = {};\n }],\n link: function(scope, element, attr, ngSwitchController) {\n var watchExpr = attr.ngSwitch || attr.on,\n selectedTranscludes = [],\n selectedElements = [],\n previousLeaveAnimations = [],\n selectedScopes = [];\n\n var spliceFactory = function(array, index) {\n return function() { array.splice(index, 1); };\n };\n\n scope.$watch(watchExpr, function ngSwitchWatchAction(value) {\n var i, ii;\n for (i = 0, ii = previousLeaveAnimations.length; i < ii; ++i) {\n $animate.cancel(previousLeaveAnimations[i]);\n }\n previousLeaveAnimations.length = 0;\n\n for (i = 0, ii = selectedScopes.length; i < ii; ++i) {\n var selected = getBlockNodes(selectedElements[i].clone);\n selectedScopes[i].$destroy();\n var promise = previousLeaveAnimations[i] = $animate.leave(selected);\n promise.then(spliceFactory(previousLeaveAnimations, i));\n }\n\n selectedElements.length = 0;\n selectedScopes.length = 0;\n\n if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {\n forEach(selectedTranscludes, function(selectedTransclude) {\n selectedTransclude.transclude(function(caseElement, selectedScope) {\n selectedScopes.push(selectedScope);\n var anchor = selectedTransclude.element;\n caseElement[caseElement.length++] = document.createComment(' end ngSwitchWhen: ');\n var block = { clone: caseElement };\n\n selectedElements.push(block);\n $animate.enter(caseElement, anchor.parent(), anchor);\n });\n });\n }\n });\n }\n };\n}];\n\nvar ngSwitchWhenDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attrs, ctrl, $transclude) {\n ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);\n ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });\n }\n});\n\nvar ngSwitchDefaultDirective = ngDirective({\n transclude: 'element',\n priority: 1200,\n require: '^ngSwitch',\n multiElement: true,\n link: function(scope, element, attr, ctrl, $transclude) {\n ctrl.cases['?'] = (ctrl.cases['?'] || []);\n ctrl.cases['?'].push({ transclude: $transclude, element: element });\n }\n});\n\n/**\n * @ngdoc directive\n * @name ngTransclude\n * @restrict EAC\n *\n * @description\n * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n *\n * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.\n *\n * @element ANY\n *\n * @example\n \n \n \n \n \n \n {{text}}\n \n \n \n it('should have transcluded', function() {\n var titleElement = element(by.model('title'));\n titleElement.clear();\n titleElement.sendKeys('TITLE');\n var textElement = element(by.model('text'));\n textElement.clear();\n textElement.sendKeys('TEXT');\n expect(element(by.binding('title')).getText()).toEqual('TITLE');\n expect(element(by.binding('text')).getText()).toEqual('TEXT');\n });\n \n \n *\n */\nvar ngTranscludeDirective = ngDirective({\n restrict: 'EAC',\n link: function($scope, $element, $attrs, controller, $transclude) {\n if (!$transclude) {\n throw minErr('ngTransclude')('orphan',\n 'Illegal use of ngTransclude directive in the template! ' +\n 'No parent directive that requires a transclusion found. ' +\n 'Element: {0}',\n startingTag($element));\n }\n\n $transclude(function(clone) {\n $element.empty();\n $element.append(clone);\n });\n }\n});\n\n/**\n * @ngdoc directive\n * @name script\n * @restrict E\n *\n * @description\n * Load the content of a `\n\n Load inlined template\n \n \n \n it('should load template defined inside script tag', function() {\n element(by.css('#tpl-link')).click();\n expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);\n });\n \n \n */\nvar scriptDirective = ['$templateCache', function($templateCache) {\n return {\n restrict: 'E',\n terminal: true,\n compile: function(element, attr) {\n if (attr.type == 'text/ng-template') {\n var templateUrl = attr.id,\n // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent\n text = element[0].text;\n\n $templateCache.put(templateUrl, text);\n }\n }\n };\n}];\n\nvar ngOptionsMinErr = minErr('ngOptions');\n/**\n * @ngdoc directive\n * @name select\n * @restrict E\n *\n * @description\n * HTML `SELECT` element with angular data-binding.\n *\n * # `ngOptions`\n *\n * The `ngOptions` attribute can be used to dynamically generate a list of ``\n * elements for the `` element using the array or object obtained by evaluating the\n * `ngOptions` comprehension_expression.\n *\n * When an item in the `` menu is selected, the array element or object property\n * represented by the selected option will be bound to the model identified by the `ngModel`\n * directive.\n *\n * \n * **Note:** `ngModel` compares by reference, not value. This is important when binding to an\n * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/).\n * \n *\n * Optionally, a single hard-coded `` element, with the value set to an empty string, can\n * be nested into the `` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * \n * **Note:** `ngOptions` provides an iterator facility for the `` element which should be used instead\n * of {@link ng.directive:ngRepeat ngRepeat} when you want the\n * `select` model to be bound to a non-string value. This is because an option element can only\n * be bound to string values at present.\n * \n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required The control is considered valid only if value is entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n * `required` when you want to data-bind to the `required` attribute.\n * @param {comprehension_expression=} ngOptions in one of the following forms:\n *\n * * for array data sources:\n * * `label` **`for`** `value` **`in`** `array`\n * * `select` **`as`** `label` **`for`** `value` **`in`** `array`\n * * `label` **`group by`** `group` **`for`** `value` **`in`** `array`\n * * `select` **`as`** `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n * * for object data sources:\n * * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n * * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`\n * * `select` **`as`** `label` **`group by`** `group`\n * **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n *\n * Where:\n *\n * * `array` / `object`: an expression which evaluates to an array / object to iterate over.\n * * `value`: local variable which will refer to each item in the `array` or each property value\n * of `object` during iteration.\n * * `key`: local variable which will refer to a property name in `object` during iteration.\n * * `label`: The result of this expression will be the label for `` element. The\n * `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).\n * * `select`: The result of this expression will be bound to the model of the parent ``\n * element. If not specified, `select` expression will default to `value`.\n * * `group`: The result of this expression will be used to group options using the ``\n * DOM element.\n * * `trackexpr`: Used when working with an array of objects. The result of this expression will be\n * used to identify the objects in the array. The `trackexpr` will most likely refer to the\n * `value` variable (e.g. `value.propertyName`).\n *\n * @example\n \n \n \n \n \n \n Name: \n [X]\n \n \n [add]\n \n \n \n Color (null not allowed):\n \n\n Color (null allowed):\n \n \n -- choose color --\n \n \n\n Color grouped by shade:\n \n \n\n\n Select bogus.\n \n Currently selected: {{ {selected_color:myColor} }}\n \n \n \n \n \n it('should check ng-options', function() {\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');\n element.all(by.model('myColor')).first().click();\n element.all(by.css('select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');\n element(by.css('.nullable select[ng-model=\"myColor\"]')).click();\n element.all(by.css('.nullable select[ng-model=\"myColor\"] option')).first().click();\n expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');\n });\n \n \n */\n\nvar ngOptionsDirective = valueFn({\n restrict: 'A',\n terminal: true\n});\n\n// jshint maxlen: false\nvar selectDirective = ['$compile', '$parse', function($compile, $parse) {\n //000011111111110000000000022222222220000000000000000000003333333333000000000000004444444444444440000000005555555555555550000000666666666666666000000000000000777777777700000000000000000008888888888\n var NG_OPTIONS_REGEXP = /^\\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]+?))?$/,\n nullModelCtrl = {$setViewValue: noop};\n// jshint maxlen: 100\n\n return {\n restrict: 'E',\n require: ['select', '?ngModel'],\n controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {\n var self = this,\n optionsMap = {},\n ngModelCtrl = nullModelCtrl,\n nullOption,\n unknownOption;\n\n\n self.databound = $attrs.ngModel;\n\n\n self.init = function(ngModelCtrl_, nullOption_, unknownOption_) {\n ngModelCtrl = ngModelCtrl_;\n nullOption = nullOption_;\n unknownOption = unknownOption_;\n };\n\n\n self.addOption = function(value, element) {\n assertNotHasOwnProperty(value, '\"option value\"');\n optionsMap[value] = true;\n\n if (ngModelCtrl.$viewValue == value) {\n $element.val(value);\n if (unknownOption.parent()) unknownOption.remove();\n }\n // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459\n // Adding an element to a should\n // automatically select the new element\n if (element[0].hasAttribute('selected')) {\n element[0].selected = true;\n }\n };\n\n\n self.removeOption = function(value) {\n if (this.hasOption(value)) {\n delete optionsMap[value];\n if (ngModelCtrl.$viewValue == value) {\n this.renderUnknownOption(value);\n }\n }\n };\n\n\n self.renderUnknownOption = function(val) {\n var unknownVal = '? ' + hashKey(val) + ' ?';\n unknownOption.val(unknownVal);\n $element.prepend(unknownOption);\n $element.val(unknownVal);\n unknownOption.prop('selected', true); // needed for IE\n };\n\n\n self.hasOption = function(value) {\n return optionsMap.hasOwnProperty(value);\n };\n\n $scope.$on('$destroy', function() {\n // disable unknown option so that we don't do work when the whole select is being destroyed\n self.renderUnknownOption = noop;\n });\n }],\n\n link: function(scope, element, attr, ctrls) {\n // if ngModel is not defined, we don't need to do anything\n if (!ctrls[1]) return;\n\n var selectCtrl = ctrls[0],\n ngModelCtrl = ctrls[1],\n multiple = attr.multiple,\n optionsExp = attr.ngOptions,\n nullOption = false, // if false, user will not be able to select it (used by ngOptions)\n emptyOption,\n renderScheduled = false,\n // we can't just jqLite('') since jqLite is not smart enough\n // to create it in and IE barfs otherwise.\n optionTemplate = jqLite(document.createElement('option')),\n optGroupTemplate =jqLite(document.createElement('optgroup')),\n unknownOption = optionTemplate.clone();\n\n // find \"null\" option\n for(var i = 0, children = element.children(), ii = children.length; i < ii; i++) {\n if (children[i].value === '') {\n emptyOption = nullOption = children.eq(i);\n break;\n }\n }\n\n selectCtrl.init(ngModelCtrl, nullOption, unknownOption);\n\n // required validator\n if (multiple) {\n ngModelCtrl.$isEmpty = function(value) {\n return !value || value.length === 0;\n };\n }\n\n if (optionsExp) setupAsOptions(scope, element, ngModelCtrl);\n else if (multiple) setupAsMultiple(scope, element, ngModelCtrl);\n else setupAsSingle(scope, element, ngModelCtrl, selectCtrl);\n\n\n ////////////////////////////\n\n\n\n function setupAsSingle(scope, selectElement, ngModelCtrl, selectCtrl) {\n ngModelCtrl.$render = function() {\n var viewValue = ngModelCtrl.$viewValue;\n\n if (selectCtrl.hasOption(viewValue)) {\n if (unknownOption.parent()) unknownOption.remove();\n selectElement.val(viewValue);\n if (viewValue === '') emptyOption.prop('selected', true); // to make IE9 happy\n } else {\n if (isUndefined(viewValue) && emptyOption) {\n selectElement.val('');\n } else {\n selectCtrl.renderUnknownOption(viewValue);\n }\n }\n };\n\n selectElement.on('change', function() {\n scope.$apply(function() {\n if (unknownOption.parent()) unknownOption.remove();\n ngModelCtrl.$setViewValue(selectElement.val());\n });\n });\n }\n\n function setupAsMultiple(scope, selectElement, ctrl) {\n var lastView;\n ctrl.$render = function() {\n var items = new HashMap(ctrl.$viewValue);\n forEach(selectElement.find('option'), function(option) {\n option.selected = isDefined(items.get(option.value));\n });\n };\n\n // we have to do it on each watch since ngModel watches reference, but\n // we need to work of an array, so we need to see if anything was inserted/removed\n scope.$watch(function selectMultipleWatch() {\n if (!equals(lastView, ctrl.$viewValue)) {\n lastView = shallowCopy(ctrl.$viewValue);\n ctrl.$render();\n }\n });\n\n selectElement.on('change', function() {\n scope.$apply(function() {\n var array = [];\n forEach(selectElement.find('option'), function(option) {\n if (option.selected) {\n array.push(option.value);\n }\n });\n ctrl.$setViewValue(array);\n });\n });\n }\n\n function setupAsOptions(scope, selectElement, ctrl) {\n var match;\n\n if (!(match = optionsExp.match(NG_OPTIONS_REGEXP))) {\n throw ngOptionsMinErr('iexp',\n \"Expected expression in form of \" +\n \"'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'\" +\n \" but got '{0}'. Element: {1}\",\n optionsExp, startingTag(selectElement));\n }\n\n var displayFn = $parse(match[2] || match[1]),\n valueName = match[4] || match[6],\n keyName = match[5],\n groupByFn = $parse(match[3] || ''),\n valueFn = $parse(match[2] ? match[1] : valueName),\n valuesFn = $parse(match[7]),\n track = match[8],\n trackFn = track ? $parse(match[8]) : null,\n // This is an array of array of existing option groups in DOM.\n // We try to reuse these if possible\n // - optionGroupsCache[0] is the options with no option group\n // - optionGroupsCache[?][0] is the parent: either the SELECT or OPTGROUP element\n optionGroupsCache = [[{element: selectElement, label:''}]];\n\n if (nullOption) {\n // compile the element since there might be bindings in it\n $compile(nullOption)(scope);\n\n // remove the class, which is added automatically because we recompile the element and it\n // becomes the compilation root\n nullOption.removeClass('ng-scope');\n\n // we need to remove it before calling selectElement.empty() because otherwise IE will\n // remove the label from the element. wtf?\n nullOption.remove();\n }\n\n // clear contents, we'll add what's needed based on the model\n selectElement.empty();\n\n selectElement.on('change', function() {\n scope.$apply(function() {\n var optionGroup,\n collection = valuesFn(scope) || [],\n locals = {},\n key, value, optionElement, index, groupIndex, length, groupLength, trackIndex;\n\n if (multiple) {\n value = [];\n for (groupIndex = 0, groupLength = optionGroupsCache.length;\n groupIndex < groupLength;\n groupIndex++) {\n // list of options for that group. (first item has the parent)\n optionGroup = optionGroupsCache[groupIndex];\n\n for(index = 1, length = optionGroup.length; index < length; index++) {\n if ((optionElement = optionGroup[index].element)[0].selected) {\n key = optionElement.val();\n if (keyName) locals[keyName] = key;\n if (trackFn) {\n for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n locals[valueName] = collection[trackIndex];\n if (trackFn(scope, locals) == key) break;\n }\n } else {\n locals[valueName] = collection[key];\n }\n value.push(valueFn(scope, locals));\n }\n }\n }\n } else {\n key = selectElement.val();\n if (key == '?') {\n value = undefined;\n } else if (key === ''){\n value = null;\n } else {\n if (trackFn) {\n for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n locals[valueName] = collection[trackIndex];\n if (trackFn(scope, locals) == key) {\n value = valueFn(scope, locals);\n break;\n }\n }\n } else {\n locals[valueName] = collection[key];\n if (keyName) locals[keyName] = key;\n value = valueFn(scope, locals);\n }\n }\n }\n ctrl.$setViewValue(value);\n render();\n });\n });\n\n ctrl.$render = render;\n\n scope.$watchCollection(valuesFn, scheduleRendering);\n scope.$watchCollection(function () {\n var locals = {},\n values = valuesFn(scope);\n if (values) {\n var toDisplay = new Array(values.length);\n for (var i = 0, ii = values.length; i < ii; i++) {\n locals[valueName] = values[i];\n toDisplay[i] = displayFn(scope, locals);\n }\n return toDisplay;\n }\n }, scheduleRendering);\n\n if (multiple) {\n scope.$watchCollection(function() { return ctrl.$modelValue; }, scheduleRendering);\n }\n\n\n function getSelectedSet() {\n var selectedSet = false;\n if (multiple) {\n var modelValue = ctrl.$modelValue;\n if (trackFn && isArray(modelValue)) {\n selectedSet = new HashMap([]);\n var locals = {};\n for (var trackIndex = 0; trackIndex < modelValue.length; trackIndex++) {\n locals[valueName] = modelValue[trackIndex];\n selectedSet.put(trackFn(scope, locals), modelValue[trackIndex]);\n }\n } else {\n selectedSet = new HashMap(modelValue);\n }\n }\n return selectedSet;\n }\n\n\n function scheduleRendering() {\n if (!renderScheduled) {\n scope.$$postDigest(render);\n renderScheduled = true;\n }\n }\n\n\n function render() {\n renderScheduled = false;\n\n // Temporary location for the option groups before we render them\n var optionGroups = {'':[]},\n optionGroupNames = [''],\n optionGroupName,\n optionGroup,\n option,\n existingParent, existingOptions, existingOption,\n modelValue = ctrl.$modelValue,\n values = valuesFn(scope) || [],\n keys = keyName ? sortedKeys(values) : values,\n key,\n groupLength, length,\n groupIndex, index,\n locals = {},\n selected,\n selectedSet = getSelectedSet(),\n lastElement,\n element,\n label;\n\n\n // We now build up the list of options we need (we merge later)\n for (index = 0; length = keys.length, index < length; index++) {\n\n key = index;\n if (keyName) {\n key = keys[index];\n if ( key.charAt(0) === '$' ) continue;\n locals[keyName] = key;\n }\n\n locals[valueName] = values[key];\n\n optionGroupName = groupByFn(scope, locals) || '';\n if (!(optionGroup = optionGroups[optionGroupName])) {\n optionGroup = optionGroups[optionGroupName] = [];\n optionGroupNames.push(optionGroupName);\n }\n if (multiple) {\n selected = isDefined(\n selectedSet.remove(trackFn ? trackFn(scope, locals) : valueFn(scope, locals))\n );\n } else {\n if (trackFn) {\n var modelCast = {};\n modelCast[valueName] = modelValue;\n selected = trackFn(scope, modelCast) === trackFn(scope, locals);\n } else {\n selected = modelValue === valueFn(scope, locals);\n }\n selectedSet = selectedSet || selected; // see if at least one item is selected\n }\n label = displayFn(scope, locals); // what will be seen by the user\n\n // doing displayFn(scope, locals) || '' overwrites zero values\n label = isDefined(label) ? label : '';\n optionGroup.push({\n // either the index into array or key from object\n id: trackFn ? trackFn(scope, locals) : (keyName ? keys[index] : index),\n label: label,\n selected: selected // determine if we should be selected\n });\n }\n if (!multiple) {\n if (nullOption || modelValue === null) {\n // insert null option if we have a placeholder, or the model is null\n optionGroups[''].unshift({id:'', label:'', selected:!selectedSet});\n } else if (!selectedSet) {\n // option could not be found, we have to insert the undefined item\n optionGroups[''].unshift({id:'?', label:'', selected:true});\n }\n }\n\n // Now we need to update the list of DOM nodes to match the optionGroups we computed above\n for (groupIndex = 0, groupLength = optionGroupNames.length;\n groupIndex < groupLength;\n groupIndex++) {\n // current option group name or '' if no group\n optionGroupName = optionGroupNames[groupIndex];\n\n // list of options for that group. (first item has the parent)\n optionGroup = optionGroups[optionGroupName];\n\n if (optionGroupsCache.length <= groupIndex) {\n // we need to grow the optionGroups\n existingParent = {\n element: optGroupTemplate.clone().attr('label', optionGroupName),\n label: optionGroup.label\n };\n existingOptions = [existingParent];\n optionGroupsCache.push(existingOptions);\n selectElement.append(existingParent.element);\n } else {\n existingOptions = optionGroupsCache[groupIndex];\n existingParent = existingOptions[0]; // either SELECT (no group) or OPTGROUP element\n\n // update the OPTGROUP label if not the same.\n if (existingParent.label != optionGroupName) {\n existingParent.element.attr('label', existingParent.label = optionGroupName);\n }\n }\n\n lastElement = null; // start at the beginning\n for(index = 0, length = optionGroup.length; index < length; index++) {\n option = optionGroup[index];\n if ((existingOption = existingOptions[index+1])) {\n // reuse elements\n lastElement = existingOption.element;\n if (existingOption.label !== option.label) {\n lastElement.text(existingOption.label = option.label);\n }\n if (existingOption.id !== option.id) {\n lastElement.val(existingOption.id = option.id);\n }\n // lastElement.prop('selected') provided by jQuery has side-effects\n if (lastElement[0].selected !== option.selected) {\n lastElement.prop('selected', (existingOption.selected = option.selected));\n if (msie) {\n // See #7692\n // The selected item wouldn't visually update on IE without this.\n // Tested on Win7: IE9, IE10 and IE11. Future IEs should be tested as well\n lastElement.prop('selected', existingOption.selected);\n }\n }\n } else {\n // grow elements\n\n // if it's a null option\n if (option.id === '' && nullOption) {\n // put back the pre-compiled element\n element = nullOption;\n } else {\n // jQuery(v1.4.2) Bug: We should be able to chain the method calls, but\n // in this version of jQuery on some browser the .text() returns a string\n // rather then the element.\n (element = optionTemplate.clone())\n .val(option.id)\n .prop('selected', option.selected)\n .attr('selected', option.selected)\n .text(option.label);\n }\n\n existingOptions.push(existingOption = {\n element: element,\n label: option.label,\n id: option.id,\n selected: option.selected\n });\n if (lastElement) {\n lastElement.after(element);\n } else {\n existingParent.element.append(element);\n }\n lastElement = element;\n }\n }\n // remove any excessive OPTIONs in a group\n index++; // increment since the existingOptions[0] is parent element not OPTION\n while(existingOptions.length > index) {\n existingOptions.pop().element.remove();\n }\n }\n // remove any excessive OPTGROUPs from select\n while(optionGroupsCache.length > groupIndex) {\n optionGroupsCache.pop()[0].element.remove();\n }\n }\n }\n }\n };\n}];\n\nvar optionDirective = ['$interpolate', function($interpolate) {\n var nullSelectCtrl = {\n addOption: noop,\n removeOption: noop\n };\n\n return {\n restrict: 'E',\n priority: 100,\n compile: function(element, attr) {\n if (isUndefined(attr.value)) {\n var interpolateFn = $interpolate(element.text(), true);\n if (!interpolateFn) {\n attr.$set('value', element.text());\n }\n }\n\n return function (scope, element, attr) {\n var selectCtrlName = '$selectController',\n parent = element.parent(),\n selectCtrl = parent.data(selectCtrlName) ||\n parent.parent().data(selectCtrlName); // in case we are in optgroup\n\n if (selectCtrl && selectCtrl.databound) {\n // For some reason Opera defaults to true and if not overridden this messes up the repeater.\n // We don't want the view to drive the initialization of the model anyway.\n element.prop('selected', false);\n } else {\n selectCtrl = nullSelectCtrl;\n }\n\n if (interpolateFn) {\n scope.$watch(interpolateFn, function interpolateWatchAction(newVal, oldVal) {\n attr.$set('value', newVal);\n if (oldVal !== newVal) {\n selectCtrl.removeOption(oldVal);\n }\n selectCtrl.addOption(newVal, element);\n });\n } else {\n selectCtrl.addOption(attr.value, element);\n }\n\n element.on('$destroy', function() {\n selectCtrl.removeOption(attr.value);\n });\n };\n }\n };\n}];\n\nvar styleDirective = valueFn({\n restrict: 'E',\n terminal: false\n});\n\n if (window.angular.bootstrap) {\n //AngularJS is already loaded, so we can return here...\n console.log('WARNING: Tried to load angular more than once.');\n return;\n }\n\n //try to bind to jquery now so that one can write jqLite(document).ready()\n //but we will rebind on bootstrap again.\n bindJQuery();\n\n publishExternalAPI(angular);\n\n jqLite(document).ready(function() {\n angularInit(document, bootstrap);\n });\n\n})(window, document);\n\n!window.angular.$$csp() && window.angular.element(document).find('head').prepend('');","/**\n * @license AngularJS v1.3.0-rc.3\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/* jshint maxlen: false */\n\n/**\n * @ngdoc module\n * @name ngAnimate\n * @description\n *\n * The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives.\n *\n * \n *\n * # Usage\n *\n * To see animations in action, all that is required is to define the appropriate CSS classes\n * or to register a JavaScript animation via the myModule.animation() function. The directives that support animation automatically are:\n * `ngRepeat`, `ngInclude`, `ngIf`, `ngSwitch`, `ngShow`, `ngHide`, `ngView` and `ngClass`. Custom directives can take advantage of animation\n * by using the `$animate` service.\n *\n * Below is a more detailed breakdown of the supported animation events provided by pre-existing ng directives:\n *\n * | Directive | Supported Animations |\n * |-----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|\n * | {@link ng.directive:ngRepeat#usage_animations ngRepeat} | enter, leave and move |\n * | {@link ngRoute.directive:ngView#usage_animations ngView} | enter and leave |\n * | {@link ng.directive:ngInclude#usage_animations ngInclude} | enter and leave |\n * | {@link ng.directive:ngSwitch#usage_animations ngSwitch} | enter and leave |\n * | {@link ng.directive:ngIf#usage_animations ngIf} | enter and leave |\n * | {@link ng.directive:ngClass#usage_animations ngClass} | add and remove (the CSS class(es) present) |\n * | {@link ng.directive:ngShow#usage_animations ngShow} & {@link ng.directive:ngHide#usage_animations ngHide} | add and remove (the ng-hide class value) |\n * | {@link ng.directive:form#usage_animations form} & {@link ng.directive:ngModel#usage_animations ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) |\n * | {@link ngMessages.directive:ngMessage#usage_animations ngMessages} | add and remove (ng-active & ng-inactive) |\n * | {@link ngMessages.directive:ngMessage#usage_animations ngMessage} | enter and leave |\n *\n * You can find out more information about animations upon visiting each directive page.\n *\n * Below is an example of how to apply animations to a directive that supports animation hooks:\n *\n * ```html\n * \n *\n * \n * \n * ```\n *\n * Keep in mind that, by default, if an animation is running, any child elements cannot be animated\n * until the parent element's animation has completed. This blocking feature can be overridden by\n * placing the `ng-animate-children` attribute on a parent container tag.\n *\n * ```html\n * \n * \n * \n * ...\n * \n * \n * \n * ```\n *\n * When the `on` expression value changes and an animation is triggered then each of the elements within\n * will all animate without the block being applied to child elements.\n *\n * ## Are animations run when the application starts?\n * No they are not. When an application is bootstrapped Angular will disable animations from running to avoid\n * a frenzy of animations from being triggered as soon as the browser has rendered the screen. For this to work,\n * Angular will wait for two digest cycles until enabling animations. From there on, any animation-triggering\n * layout changes in the application will trigger animations as normal.\n *\n * In addition, upon bootstrap, if the routing system or any directives or load remote data (via $http) then Angular\n * will automatically extend the wait time to enable animations once **all** of the outbound HTTP requests\n * are complete.\n *\n * CSS-defined Animations\n * The animate service will automatically apply two CSS classes to the animated element and these two CSS classes\n * are designed to contain the start and end CSS styling. Both CSS transitions and keyframe animations are supported\n * and can be used to play along with this naming structure.\n *\n * The following code below demonstrates how to perform animations using **CSS transitions** with Angular:\n *\n * ```html\n * \n *\n * \n * \n * \n * ```\n *\n * The following code below demonstrates how to perform animations using **CSS animations** with Angular:\n *\n * ```html\n * \n *\n * \n * \n * \n * ```\n *\n * Both CSS3 animations and transitions can be used together and the animate service will figure out the correct duration and delay timing.\n *\n * Upon DOM mutation, the event class is added first (something like `ng-enter`), then the browser prepares itself to add\n * the active class (in this case `ng-enter-active`) which then triggers the animation. The animation module will automatically\n * detect the CSS code to determine when the animation ends. Once the animation is over then both CSS classes will be\n * removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end\n * immediately resulting in a DOM element that is at its final state. This final state is when the DOM element\n * has no CSS transition/animation classes applied to it.\n *\n * ### Structural transition animations\n *\n * Structural transitions (such as enter, leave and move) will always apply a `0s none` transition\n * value to force the browser into rendering the styles defined in the setup (.ng-enter, .ng-leave\n * or .ng-move) class. This means that any active transition animations operating on the element\n * will be cut off to make way for the enter, leave or move animation.\n *\n * ### Class-based transition animations\n *\n * Class-based transitions refer to transition animations that are triggered when a CSS class is\n * added to or removed from the element (via `$animate.addClass`, `$animate.removeClass`,\n * `$animate.setClass`, or by directives such as `ngClass`, `ngModel` and `form`).\n * They are different when compared to structural animations since they **do not cancel existing\n * animations** nor do they **block successive transitions** from rendering on the same element.\n * This distinction allows for **multiple class-based transitions** to be performed on the same element.\n *\n * In addition to ngAnimate supporting the default (natural) functionality of class-based transition\n * animations, ngAnimate also decorates the element with starting and ending CSS classes to aid the\n * developer in further styling the element throughout the transition animation. Earlier versions\n * of ngAnimate may have caused natural CSS transitions to break and not render properly due to\n * $animate temporarily blocking transitions using `0s none` in order to allow the setup CSS class\n * (the `-add` or `-remove` class) to be applied without triggering an animation. However, as of\n * **version 1.3**, this workaround has been removed with ngAnimate and all non-ngAnimate CSS\n * class transitions are compatible with ngAnimate.\n *\n * There is, however, one special case when dealing with class-based transitions in ngAnimate.\n * When rendering class-based transitions that make use of the setup and active CSS classes\n * (e.g. `.fade-add` and `.fade-add-active` for when `.fade` is added) be sure to define\n * the transition value **on the active CSS class** and not the setup class.\n *\n * ```css\n * .fade-add {\n * /* remember to place a 0s transition here\n * to ensure that the styles are applied instantly\n * even if the element already has a transition style */\n * transition:0s linear all;\n *\n * /* starting CSS styles */\n * opacity:1;\n * }\n * .fade-add.fade-add-active {\n * /* this will be the length of the animation */\n * transition:1s linear all;\n * opacity:0;\n * }\n * ```\n *\n * The setup CSS class (in this case `.fade-add`) also has a transition style property, however, it\n * has a duration of zero. This may not be required, however, incase the browser is unable to render\n * the styling present in this CSS class instantly then it could be that the browser is attempting\n * to perform an unnecessary transition.\n *\n * This workaround, however, does not apply to standard class-based transitions that are rendered\n * when a CSS class containing a transition is applied to an element:\n *\n * ```css\n * .fade {\n * /* this works as expected */\n * transition:1s linear all;\n * opacity:0;\n * }\n * ```\n *\n * Please keep this in mind when coding the CSS markup that will be used within class-based transitions.\n * Also, try not to mix the two class-based animation flavors together since the CSS code may become\n * overly complex.\n *\n * ### CSS Staggering Animations\n * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a\n * curtain-like effect. The ngAnimate module, as of 1.2.0, supports staggering animations and the stagger effect can be\n * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for\n * the animation. The style property expected within the stagger class can either be a **transition-delay** or an\n * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).\n *\n * ```css\n * .my-animation.ng-enter {\n * /* standard transition code */\n * -webkit-transition: 1s linear all;\n * transition: 1s linear all;\n * opacity:0;\n * }\n * .my-animation.ng-enter-stagger {\n * /* this will have a 100ms delay between each successive leave animation */\n * -webkit-transition-delay: 0.1s;\n * transition-delay: 0.1s;\n *\n * /* in case the stagger doesn't work then these two values\n * must be set to 0 to avoid an accidental CSS inheritance */\n * -webkit-transition-duration: 0s;\n * transition-duration: 0s;\n * }\n * .my-animation.ng-enter.ng-enter-active {\n * /* standard transition styles */\n * opacity:1;\n * }\n * ```\n *\n * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations\n * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this\n * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation\n * will also be reset if more than 10ms has passed after the last animation has been fired.\n *\n * The following code will issue the **ng-leave-stagger** event on the element provided:\n *\n * ```js\n * var kids = parent.children();\n *\n * $animate.leave(kids[0]); //stagger index=0\n * $animate.leave(kids[1]); //stagger index=1\n * $animate.leave(kids[2]); //stagger index=2\n * $animate.leave(kids[3]); //stagger index=3\n * $animate.leave(kids[4]); //stagger index=4\n *\n * $timeout(function() {\n * //stagger has reset itself\n * $animate.leave(kids[5]); //stagger index=0\n * $animate.leave(kids[6]); //stagger index=1\n * }, 100, false);\n * ```\n *\n * Stagger animations are currently only supported within CSS-defined animations.\n *\n * ## JavaScript-defined Animations\n * In the event that you do not want to use CSS3 transitions or CSS3 animations or if you wish to offer animations on browsers that do not\n * yet support CSS transitions/animations, then you can make use of JavaScript animations defined inside of your AngularJS module.\n *\n * ```js\n * //!annotate=\"YourApp\" Your AngularJS Module|Replace this or ngModule with the module that you used to define your application.\n * var ngModule = angular.module('YourApp', ['ngAnimate']);\n * ngModule.animation('.my-crazy-animation', function() {\n * return {\n * enter: function(element, done) {\n * //run the animation here and call done when the animation is complete\n * return function(cancelled) {\n * //this (optional) function will be called when the animation\n * //completes or when the animation is cancelled (the cancelled\n * //flag will be set to true if cancelled).\n * };\n * },\n * leave: function(element, done) { },\n * move: function(element, done) { },\n *\n * //animation that can be triggered before the class is added\n * beforeAddClass: function(element, className, done) { },\n *\n * //animation that can be triggered after the class is added\n * addClass: function(element, className, done) { },\n *\n * //animation that can be triggered before the class is removed\n * beforeRemoveClass: function(element, className, done) { },\n *\n * //animation that can be triggered after the class is removed\n * removeClass: function(element, className, done) { }\n * };\n * });\n * ```\n *\n * JavaScript-defined animations are created with a CSS-like class selector and a collection of events which are set to run\n * a javascript callback function. When an animation is triggered, $animate will look for a matching animation which fits\n * the element's CSS class attribute value and then run the matching animation event function (if found).\n * In other words, if the CSS classes present on the animated element match any of the JavaScript animations then the callback function will\n * be executed. It should be also noted that only simple, single class selectors are allowed (compound class selectors are not supported).\n *\n * Within a JavaScript animation, an object containing various event callback animation functions is expected to be returned.\n * As explained above, these callbacks are triggered based on the animation event. Therefore if an enter animation is run,\n * and the JavaScript animation is found, then the enter callback will handle that animation (in addition to the CSS keyframe animation\n * or transition code that is defined via a stylesheet).\n *\n */\n\nangular.module('ngAnimate', ['ng'])\n\n /**\n * @ngdoc provider\n * @name $animateProvider\n * @description\n *\n * The `$animateProvider` allows developers to register JavaScript animation event handlers directly inside of a module.\n * When an animation is triggered, the $animate service will query the $animate service to find any animations that match\n * the provided name value.\n *\n * Requires the {@link ngAnimate `ngAnimate`} module to be installed.\n *\n * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.\n *\n */\n .directive('ngAnimateChildren', function() {\n var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren';\n return function(scope, element, attrs) {\n var val = attrs.ngAnimateChildren;\n if (angular.isString(val) && val.length === 0) { //empty attribute\n element.data(NG_ANIMATE_CHILDREN, true);\n } else {\n scope.$watch(val, function(value) {\n element.data(NG_ANIMATE_CHILDREN, !!value);\n });\n }\n };\n })\n\n //this private service is only used within CSS-enabled animations\n //IE8 + IE9 do not support rAF natively, but that is fine since they\n //also don't support transitions and keyframes which means that the code\n //below will never be used by the two browsers.\n .factory('$$animateReflow', ['$$rAF', '$document', function($$rAF, $document) {\n var bod = $document[0].body;\n return function(fn) {\n //the returned function acts as the cancellation function\n return $$rAF(function() {\n //the line below will force the browser to perform a repaint\n //so that all the animated elements within the animation frame\n //will be properly updated and drawn on screen. This is\n //required to perform multi-class CSS based animations with\n //Firefox. DO NOT REMOVE THIS LINE.\n var a = bod.offsetWidth + 1;\n fn();\n });\n };\n }])\n\n .config(['$provide', '$animateProvider', function($provide, $animateProvider) {\n var noop = angular.noop;\n var forEach = angular.forEach;\n var selectors = $animateProvider.$$selectors;\n var isArray = angular.isArray;\n\n var ELEMENT_NODE = 1;\n var NG_ANIMATE_STATE = '$$ngAnimateState';\n var NG_ANIMATE_CHILDREN = '$$ngAnimateChildren';\n var NG_ANIMATE_CLASS_NAME = 'ng-animate';\n var rootAnimateState = {running: true};\n\n function extractElementNode(element) {\n for(var i = 0; i < element.length; i++) {\n var elm = element[i];\n if (elm.nodeType == ELEMENT_NODE) {\n return elm;\n }\n }\n }\n\n function prepareElement(element) {\n return element && angular.element(element);\n }\n\n function stripCommentsFromElement(element) {\n return angular.element(extractElementNode(element));\n }\n\n function isMatchingElement(elm1, elm2) {\n return extractElementNode(elm1) == extractElementNode(elm2);\n }\n\n $provide.decorator('$animate',\n ['$delegate', '$$q', '$injector', '$sniffer', '$rootElement', '$$asyncCallback', '$rootScope', '$document', '$templateRequest',\n function($delegate, $$q, $injector, $sniffer, $rootElement, $$asyncCallback, $rootScope, $document, $templateRequest) {\n\n $rootElement.data(NG_ANIMATE_STATE, rootAnimateState);\n\n // Wait until all directive and route-related templates are downloaded and\n // compiled. The $templateRequest.totalPendingRequests variable keeps track of\n // all of the remote templates being currently downloaded. If there are no\n // templates currently downloading then the watcher will still fire anyway.\n var deregisterWatch = $rootScope.$watch(\n function() { return $templateRequest.totalPendingRequests; },\n function(val, oldVal) {\n if (val !== 0) return;\n deregisterWatch();\n\n // Now that all templates have been downloaded, $animate will wait until\n // the post digest queue is empty before enabling animations. By having two\n // calls to $postDigest calls we can ensure that the flag is enabled at the\n // very end of the post digest queue. Since all of the animations in $animate\n // use $postDigest, it's important that the code below executes at the end.\n // This basically means that the page is fully downloaded and compiled before\n // any animations are triggered.\n $rootScope.$$postDigest(function() {\n $rootScope.$$postDigest(function() {\n rootAnimateState.running = false;\n });\n });\n }\n );\n\n var globalAnimationCounter = 0;\n var classNameFilter = $animateProvider.classNameFilter();\n var isAnimatableClassName = !classNameFilter\n ? function() { return true; }\n : function(className) {\n return classNameFilter.test(className);\n };\n\n function classBasedAnimationsBlocked(element, setter) {\n var data = element.data(NG_ANIMATE_STATE) || {};\n if (setter) {\n data.running = true;\n data.structural = true;\n element.data(NG_ANIMATE_STATE, data);\n }\n return data.disabled || (data.running && data.structural);\n }\n\n function runAnimationPostDigest(fn) {\n var cancelFn, defer = $$q.defer();\n defer.promise.$$cancelFn = function() {\n cancelFn && cancelFn();\n };\n $rootScope.$$postDigest(function() {\n cancelFn = fn(function() {\n defer.resolve();\n });\n });\n return defer.promise;\n }\n\n function resolveElementClasses(element, cache, runningAnimations) {\n runningAnimations = runningAnimations || {};\n var map = {};\n\n forEach(cache.add, function(className) {\n if (className && className.length) {\n map[className] = map[className] || 0;\n map[className]++;\n }\n });\n\n forEach(cache.remove, function(className) {\n if (className && className.length) {\n map[className] = map[className] || 0;\n map[className]--;\n }\n });\n\n var lookup = [];\n forEach(runningAnimations, function(data, selector) {\n forEach(selector.split(' '), function(s) {\n lookup[s]=data;\n });\n });\n\n var toAdd = [], toRemove = [];\n forEach(map, function(status, className) {\n var hasClass = angular.$$hasClass(element[0], className);\n var matchingAnimation = lookup[className] || {};\n\n // When addClass and removeClass is called then $animate will check to\n // see if addClass and removeClass cancel each other out. When there are\n // more calls to removeClass than addClass then the count falls below 0\n // and then the removeClass animation will be allowed. Otherwise if the\n // count is above 0 then that means an addClass animation will commence.\n // Once an animation is allowed then the code will also check to see if\n // there exists any on-going animation that is already adding or remvoing\n // the matching CSS class.\n if (status < 0) {\n //does it have the class or will it have the class\n if (hasClass || matchingAnimation.event == 'addClass') {\n toRemove.push(className);\n }\n } else if (status > 0) {\n //is the class missing or will it be removed?\n if (!hasClass || matchingAnimation.event == 'removeClass') {\n toAdd.push(className);\n }\n }\n });\n\n return (toAdd.length + toRemove.length) > 0 && [toAdd.join(' '), toRemove.join(' ')];\n }\n\n function lookup(name) {\n if (name) {\n var matches = [],\n flagMap = {},\n classes = name.substr(1).split('.');\n\n //the empty string value is the default animation\n //operation which performs CSS transition and keyframe\n //animations sniffing. This is always included for each\n //element animation procedure if the browser supports\n //transitions and/or keyframe animations. The default\n //animation is added to the top of the list to prevent\n //any previous animations from affecting the element styling\n //prior to the element being animated.\n if ($sniffer.transitions || $sniffer.animations) {\n matches.push($injector.get(selectors['']));\n }\n\n for(var i=0; i < classes.length; i++) {\n var klass = classes[i],\n selectorFactoryName = selectors[klass];\n if (selectorFactoryName && !flagMap[klass]) {\n matches.push($injector.get(selectorFactoryName));\n flagMap[klass] = true;\n }\n }\n return matches;\n }\n }\n\n function animationRunner(element, animationEvent, className) {\n //transcluded directives may sometimes fire an animation using only comment nodes\n //best to catch this early on to prevent any animation operations from occurring\n var node = element[0];\n if (!node) {\n return;\n }\n\n var classNameAdd;\n var classNameRemove;\n if (isArray(className)) {\n classNameAdd = className[0];\n classNameRemove = className[1];\n if (!classNameAdd) {\n className = classNameRemove;\n animationEvent = 'removeClass';\n } else if (!classNameRemove) {\n className = classNameAdd;\n animationEvent = 'addClass';\n } else {\n className = classNameAdd + ' ' + classNameRemove;\n }\n }\n\n var isSetClassOperation = animationEvent == 'setClass';\n var isClassBased = isSetClassOperation ||\n animationEvent == 'addClass' ||\n animationEvent == 'removeClass';\n\n var currentClassName = element.attr('class');\n var classes = currentClassName + ' ' + className;\n if (!isAnimatableClassName(classes)) {\n return;\n }\n\n var beforeComplete = noop,\n beforeCancel = [],\n before = [],\n afterComplete = noop,\n afterCancel = [],\n after = [];\n\n var animationLookup = (' ' + classes).replace(/\\s+/g,'.');\n forEach(lookup(animationLookup), function(animationFactory) {\n var created = registerAnimation(animationFactory, animationEvent);\n if (!created && isSetClassOperation) {\n registerAnimation(animationFactory, 'addClass');\n registerAnimation(animationFactory, 'removeClass');\n }\n });\n\n function registerAnimation(animationFactory, event) {\n var afterFn = animationFactory[event];\n var beforeFn = animationFactory['before' + event.charAt(0).toUpperCase() + event.substr(1)];\n if (afterFn || beforeFn) {\n if (event == 'leave') {\n beforeFn = afterFn;\n //when set as null then animation knows to skip this phase\n afterFn = null;\n }\n after.push({\n event : event, fn : afterFn\n });\n before.push({\n event : event, fn : beforeFn\n });\n return true;\n }\n }\n\n function run(fns, cancellations, allCompleteFn) {\n var animations = [];\n forEach(fns, function(animation) {\n animation.fn && animations.push(animation);\n });\n\n var count = 0;\n function afterAnimationComplete(index) {\n if (cancellations) {\n (cancellations[index] || noop)();\n if (++count < animations.length) return;\n cancellations = null;\n }\n allCompleteFn();\n }\n\n //The code below adds directly to the array in order to work with\n //both sync and async animations. Sync animations are when the done()\n //operation is called right away. DO NOT REFACTOR!\n forEach(animations, function(animation, index) {\n var progress = function() {\n afterAnimationComplete(index);\n };\n switch(animation.event) {\n case 'setClass':\n cancellations.push(animation.fn(element, classNameAdd, classNameRemove, progress));\n break;\n case 'addClass':\n cancellations.push(animation.fn(element, classNameAdd || className, progress));\n break;\n case 'removeClass':\n cancellations.push(animation.fn(element, classNameRemove || className, progress));\n break;\n default:\n cancellations.push(animation.fn(element, progress));\n break;\n }\n });\n\n if (cancellations && cancellations.length === 0) {\n allCompleteFn();\n }\n }\n\n return {\n node : node,\n event : animationEvent,\n className : className,\n isClassBased : isClassBased,\n isSetClassOperation : isSetClassOperation,\n before : function(allCompleteFn) {\n beforeComplete = allCompleteFn;\n run(before, beforeCancel, function() {\n beforeComplete = noop;\n allCompleteFn();\n });\n },\n after : function(allCompleteFn) {\n afterComplete = allCompleteFn;\n run(after, afterCancel, function() {\n afterComplete = noop;\n allCompleteFn();\n });\n },\n cancel : function() {\n if (beforeCancel) {\n forEach(beforeCancel, function(cancelFn) {\n (cancelFn || noop)(true);\n });\n beforeComplete(true);\n }\n if (afterCancel) {\n forEach(afterCancel, function(cancelFn) {\n (cancelFn || noop)(true);\n });\n afterComplete(true);\n }\n }\n };\n }\n\n /**\n * @ngdoc service\n * @name $animate\n * @kind object\n *\n * @description\n * The `$animate` service provides animation detection support while performing DOM operations (enter, leave and move) as well as during addClass and removeClass operations.\n * When any of these operations are run, the $animate service\n * will examine any JavaScript-defined animations (which are defined by using the $animateProvider provider object)\n * as well as any CSS-defined animations against the CSS classes present on the element once the DOM operation is run.\n *\n * The `$animate` service is used behind the scenes with pre-existing directives and animation with these directives\n * will work out of the box without any extra configuration.\n *\n * Requires the {@link ngAnimate `ngAnimate`} module to be installed.\n *\n * Please visit the {@link ngAnimate `ngAnimate`} module overview page learn more about how to use animations in your application.\n * ## Callback Promises\n * With AngularJS 1.3, each of the animation methods, on the `$animate` service, return a promise when called. The\n * promise itself is then resolved once the animation has completed itself, has been cancelled or has been\n * skipped due to animations being disabled. (Note that even if the animation is cancelled it will still\n * call the resolve function of the animation.)\n *\n * ```js\n * $animate.enter(element, container).then(function() {\n * //...this is called once the animation is complete...\n * });\n * ```\n *\n * Also note that, due to the nature of the callback promise, if any Angular-specific code (like changing the scope,\n * location of the page, etc...) is executed within the callback promise then be sure to wrap the code using\n * `$scope.$apply(...)`;\n *\n * ```js\n * $animate.leave(element).then(function() {\n * $scope.$apply(function() {\n * $location.path('/new-page');\n * });\n * });\n * ```\n *\n * An animation can also be cancelled by calling the `$animate.cancel(promise)` method with the provided\n * promise that was returned when the animation was started.\n *\n * ```js\n * var promise = $animate.addClass(element, 'super-long-animation').then(function() {\n * //this will still be called even if cancelled\n * });\n *\n * element.on('click', function() {\n * //tooo lazy to wait for the animation to end\n * $animate.cancel(promise);\n * });\n * ```\n *\n * (Keep in mind that the promise cancellation is unique to `$animate` since promises in\n * general cannot be cancelled.)\n *\n */\n return {\n /**\n * @ngdoc method\n * @name $animate#enter\n * @kind function\n *\n * @description\n * Appends the element to the parentElement element that resides in the document and then runs the enter animation. Once\n * the animation is started, the following CSS classes will be present on the element for the duration of the animation:\n *\n * Below is a breakdown of each step that occurs during enter animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|\n * | 1. $animate.enter(...) is called | class=\"my-animation\" |\n * | 2. element is inserted into the parentElement element or beside the afterElement element | class=\"my-animation\" |\n * | 3. $animate waits for the next digest to start the animation | class=\"my-animation ng-animate\" |\n * | 4. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 5. the .ng-enter class is added to the element | class=\"my-animation ng-animate ng-enter\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate ng-enter\" |\n * | 7. $animate blocks all CSS transitions on the element to ensure the .ng-enter class styling is applied right away | class=\"my-animation ng-animate ng-enter\" |\n * | 8. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate ng-enter\" |\n * | 9. $animate removes the CSS transition block placed on the element | class=\"my-animation ng-animate ng-enter\" |\n * | 10. the .ng-enter-active class is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-enter ng-enter-active\" |\n * | 11. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate ng-enter ng-enter-active\" |\n * | 12. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 13. The returned promise is resolved. | class=\"my-animation\" |\n *\n * @param {DOMElement} element the element that will be the focus of the enter animation\n * @param {DOMElement} parentElement the parent element of the element that will be the focus of the enter animation\n * @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation\n * @return {Promise} the animation callback promise\n */\n enter : function(element, parentElement, afterElement) {\n element = angular.element(element);\n parentElement = prepareElement(parentElement);\n afterElement = prepareElement(afterElement);\n\n classBasedAnimationsBlocked(element, true);\n $delegate.enter(element, parentElement, afterElement);\n return runAnimationPostDigest(function(done) {\n return performAnimation('enter', 'ng-enter', stripCommentsFromElement(element), parentElement, afterElement, noop, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#leave\n * @kind function\n *\n * @description\n * Runs the leave animation operation and, upon completion, removes the element from the DOM. Once\n * the animation is started, the following CSS classes will be added for the duration of the animation:\n *\n * Below is a breakdown of each step that occurs during leave animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |-------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|\n * | 1. $animate.leave(...) is called | class=\"my-animation\" |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 3. $animate waits for the next digest to start the animation | class=\"my-animation ng-animate\" |\n * | 4. the .ng-leave class is added to the element | class=\"my-animation ng-animate ng-leave\" |\n * | 5. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate ng-leave\" |\n * | 6. $animate blocks all CSS transitions on the element to ensure the .ng-leave class styling is applied right away | class=\"my-animation ng-animate ng-leave” |\n * | 7. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate ng-leave\" |\n * | 8. $animate removes the CSS transition block placed on the element | class=\"my-animation ng-animate ng-leave” |\n * | 9. the .ng-leave-active class is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-leave ng-leave-active\" |\n * | 10. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate ng-leave ng-leave-active\" |\n * | 11. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 12. The element is removed from the DOM | ... |\n * | 13. The returned promise is resolved. | ... |\n *\n * @param {DOMElement} element the element that will be the focus of the leave animation\n * @return {Promise} the animation callback promise\n */\n leave : function(element) {\n element = angular.element(element);\n\n cancelChildAnimations(element);\n classBasedAnimationsBlocked(element, true);\n this.enabled(false, element);\n return runAnimationPostDigest(function(done) {\n return performAnimation('leave', 'ng-leave', stripCommentsFromElement(element), null, null, function() {\n $delegate.leave(element);\n }, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#move\n * @kind function\n *\n * @description\n * Fires the move DOM operation. Just before the animation starts, the animate service will either append it into the parentElement container or\n * add the element directly after the afterElement element if present. Then the move animation will be run. Once\n * the animation is started, the following CSS classes will be added for the duration of the animation:\n *\n * Below is a breakdown of each step that occurs during move animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------|\n * | 1. $animate.move(...) is called | class=\"my-animation\" |\n * | 2. element is moved into the parentElement element or beside the afterElement element | class=\"my-animation\" |\n * | 3. $animate waits for the next digest to start the animation | class=\"my-animation ng-animate\" |\n * | 4. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 5. the .ng-move class is added to the element | class=\"my-animation ng-animate ng-move\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate ng-move\" |\n * | 7. $animate blocks all CSS transitions on the element to ensure the .ng-move class styling is applied right away | class=\"my-animation ng-animate ng-move” |\n * | 8. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate ng-move\" |\n * | 9. $animate removes the CSS transition block placed on the element | class=\"my-animation ng-animate ng-move” |\n * | 10. the .ng-move-active class is added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate ng-move ng-move-active\" |\n * | 11. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate ng-move ng-move-active\" |\n * | 12. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 13. The returned promise is resolved. | class=\"my-animation\" |\n *\n * @param {DOMElement} element the element that will be the focus of the move animation\n * @param {DOMElement} parentElement the parentElement element of the element that will be the focus of the move animation\n * @param {DOMElement} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation\n * @return {Promise} the animation callback promise\n */\n move : function(element, parentElement, afterElement) {\n element = angular.element(element);\n parentElement = prepareElement(parentElement);\n afterElement = prepareElement(afterElement);\n\n cancelChildAnimations(element);\n classBasedAnimationsBlocked(element, true);\n $delegate.move(element, parentElement, afterElement);\n return runAnimationPostDigest(function(done) {\n return performAnimation('move', 'ng-move', stripCommentsFromElement(element), parentElement, afterElement, noop, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#addClass\n *\n * @description\n * Triggers a custom animation event based off the className variable and then attaches the className value to the element as a CSS class.\n * Unlike the other animation methods, the animate service will suffix the className value with {@type -add} in order to provide\n * the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if no CSS transitions\n * or keyframes are defined on the -add-active or base CSS class).\n *\n * Below is a breakdown of each step that occurs during addClass animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |----------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n * | 1. $animate.addClass(element, 'super') is called | class=\"my-animation\" |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation ng-animate\" |\n * | 3. the .super-add class is added to the element | class=\"my-animation ng-animate super-add\" |\n * | 4. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate super-add\" |\n * | 5. the .super and .super-add-active classes are added (this triggers the CSS transition/animation) | class=\"my-animation ng-animate super super-add super-add-active\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate super-add\" |\n * | 7. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation super super-add super-add-active\" |\n * | 8. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation super\" |\n * | 9. The super class is kept on the element | class=\"my-animation super\" |\n * | 10. The returned promise is resolved. | class=\"my-animation super\" |\n *\n * @param {DOMElement} element the element that will be animated\n * @param {string} className the CSS class that will be added to the element and then animated\n * @return {Promise} the animation callback promise\n */\n addClass : function(element, className) {\n return this.setClass(element, className, []);\n },\n\n /**\n * @ngdoc method\n * @name $animate#removeClass\n *\n * @description\n * Triggers a custom animation event based off the className variable and then removes the CSS class provided by the className value\n * from the element. Unlike the other animation methods, the animate service will suffix the className value with {@type -remove} in\n * order to provide the animate service the setup and active CSS classes in order to trigger the animation (this will be skipped if\n * no CSS transitions or keyframes are defined on the -remove or base CSS classes).\n *\n * Below is a breakdown of each step that occurs during removeClass animation:\n *\n * | Animation Step | What the element class attribute looks like |\n * |------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n * | 1. $animate.removeClass(element, 'super') is called | class=\"my-animation super\" |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation super ng-animate\" |\n * | 3. the .super-remove class is added to the element | class=\"my-animation super ng-animate super-remove\" |\n * | 4. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation super ng-animate super-remove\" |\n * | 5. the .super-remove-active classes are added and .super is removed (this triggers the CSS transition/animation) | class=\"my-animation ng-animate super-remove super-remove-active\" |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation super ng-animate super-remove\" |\n * | 7. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate super-remove super-remove-active\" |\n * | 8. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation\" |\n * | 9. The returned promise is resolved. | class=\"my-animation\" |\n *\n *\n * @param {DOMElement} element the element that will be animated\n * @param {string} className the CSS class that will be animated and then removed from the element\n * @return {Promise} the animation callback promise\n */\n removeClass : function(element, className) {\n return this.setClass(element, [], className);\n },\n\n /**\n *\n * @ngdoc method\n * @name $animate#setClass\n *\n * @description Adds and/or removes the given CSS classes to and from the element.\n * Once complete, the done() callback will be fired (if provided).\n *\n * | Animation Step | What the element class attribute looks like |\n * |--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|\n * | 1. $animate.removeClass(element, ‘on’, ‘off’) is called | class=\"my-animation super off” |\n * | 2. $animate runs the JavaScript-defined animations detected on the element | class=\"my-animation super ng-animate off” |\n * | 3. the .on-add and .off-remove classes are added to the element | class=\"my-animation ng-animate on-add off-remove off” |\n * | 4. $animate waits for a single animation frame (this performs a reflow) | class=\"my-animation ng-animate on-add off-remove off” |\n * | 5. the .on, .on-add-active and .off-remove-active classes are added and .off is removed (this triggers the CSS transition/animation) | class=\"my-animation ng-animate on on-add on-add-active off-remove off-remove-active” |\n * | 6. $animate scans the element styles to get the CSS transition/animation duration and delay | class=\"my-animation ng-animate on on-add on-add-active off-remove off-remove-active\" |\n * | 7. $animate waits for the animation to complete (via events and timeout) | class=\"my-animation ng-animate on on-add on-add-active off-remove off-remove-active\" |\n * | 8. The animation ends and all generated CSS classes are removed from the element | class=\"my-animation on\" |\n * | 9. The returned promise is resolved. | class=\"my-animation on\" |\n *\n * @param {DOMElement} element the element which will have its CSS classes changed\n * removed from it\n * @param {string} add the CSS classes which will be added to the element\n * @param {string} remove the CSS class which will be removed from the element\n * CSS classes have been set on the element\n * @return {Promise} the animation callback promise\n */\n setClass : function(element, add, remove) {\n var STORAGE_KEY = '$$animateClasses';\n element = angular.element(element);\n element = stripCommentsFromElement(element);\n\n if (classBasedAnimationsBlocked(element)) {\n return $delegate.setClass(element, add, remove);\n }\n\n add = isArray(add) ? add : add.split(' ');\n remove = isArray(remove) ? remove : remove.split(' ');\n\n var cache = element.data(STORAGE_KEY);\n if (cache) {\n cache.add = cache.add.concat(add);\n cache.remove = cache.remove.concat(remove);\n\n //the digest cycle will combine all the animations into one function\n return cache.promise;\n } else {\n element.data(STORAGE_KEY, cache = {\n add : add,\n remove : remove\n });\n }\n\n return cache.promise = runAnimationPostDigest(function(done) {\n var cache = element.data(STORAGE_KEY);\n element.removeData(STORAGE_KEY);\n\n var state = element.data(NG_ANIMATE_STATE) || {};\n var classes = resolveElementClasses(element, cache, state.active);\n return !classes\n ? done()\n : performAnimation('setClass', classes, element, null, null, function() {\n $delegate.setClass(element, classes[0], classes[1]);\n }, done);\n });\n },\n\n /**\n * @ngdoc method\n * @name $animate#cancel\n * @kind function\n *\n * @param {Promise} animationPromise The animation promise that is returned when an animation is started.\n *\n * @description\n * Cancels the provided animation.\n */\n cancel : function(promise) {\n promise.$$cancelFn();\n },\n\n /**\n * @ngdoc method\n * @name $animate#enabled\n * @kind function\n *\n * @param {boolean=} value If provided then set the animation on or off.\n * @param {DOMElement=} element If provided then the element will be used to represent the enable/disable operation\n * @return {boolean} Current animation state.\n *\n * @description\n * Globally enables/disables animations.\n *\n */\n enabled : function(value, element) {\n switch(arguments.length) {\n case 2:\n if (value) {\n cleanup(element);\n } else {\n var data = element.data(NG_ANIMATE_STATE) || {};\n data.disabled = true;\n element.data(NG_ANIMATE_STATE, data);\n }\n break;\n\n case 1:\n rootAnimateState.disabled = !value;\n break;\n\n default:\n value = !rootAnimateState.disabled;\n break;\n }\n return !!value;\n }\n };\n\n /*\n all animations call this shared animation triggering function internally.\n The animationEvent variable refers to the JavaScript animation event that will be triggered\n and the className value is the name of the animation that will be applied within the\n CSS code. Element, parentElement and afterElement are provided DOM elements for the animation\n and the onComplete callback will be fired once the animation is fully complete.\n */\n function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {\n\n var noopCancel = noop;\n var runner = animationRunner(element, animationEvent, className);\n if (!runner) {\n fireDOMOperation();\n fireBeforeCallbackAsync();\n fireAfterCallbackAsync();\n closeAnimation();\n return noopCancel;\n }\n\n animationEvent = runner.event;\n className = runner.className;\n var elementEvents = angular.element._data(runner.node);\n elementEvents = elementEvents && elementEvents.events;\n\n if (!parentElement) {\n parentElement = afterElement ? afterElement.parent() : element.parent();\n }\n\n //skip the animation if animations are disabled, a parent is already being animated,\n //the element is not currently attached to the document body or then completely close\n //the animation if any matching animations are not found at all.\n //NOTE: IE8 + IE9 should close properly (run closeAnimation()) in case an animation was found.\n if (animationsDisabled(element, parentElement)) {\n fireDOMOperation();\n fireBeforeCallbackAsync();\n fireAfterCallbackAsync();\n closeAnimation();\n return noopCancel;\n }\n\n var ngAnimateState = element.data(NG_ANIMATE_STATE) || {};\n var runningAnimations = ngAnimateState.active || {};\n var totalActiveAnimations = ngAnimateState.totalActive || 0;\n var lastAnimation = ngAnimateState.last;\n var skipAnimation = false;\n\n if (totalActiveAnimations > 0) {\n var animationsToCancel = [];\n if (!runner.isClassBased) {\n if (animationEvent == 'leave' && runningAnimations['ng-leave']) {\n skipAnimation = true;\n } else {\n //cancel all animations when a structural animation takes place\n for(var klass in runningAnimations) {\n animationsToCancel.push(runningAnimations[klass]);\n }\n ngAnimateState = {};\n cleanup(element, true);\n }\n } else if (lastAnimation.event == 'setClass') {\n animationsToCancel.push(lastAnimation);\n cleanup(element, className);\n }\n else if (runningAnimations[className]) {\n var current = runningAnimations[className];\n if (current.event == animationEvent) {\n skipAnimation = true;\n } else {\n animationsToCancel.push(current);\n cleanup(element, className);\n }\n }\n\n if (animationsToCancel.length > 0) {\n forEach(animationsToCancel, function(operation) {\n operation.cancel();\n });\n }\n }\n\n if (runner.isClassBased && !runner.isSetClassOperation && !skipAnimation) {\n skipAnimation = (animationEvent == 'addClass') == element.hasClass(className); //opposite of XOR\n }\n\n if (skipAnimation) {\n fireDOMOperation();\n fireBeforeCallbackAsync();\n fireAfterCallbackAsync();\n fireDoneCallbackAsync();\n return noopCancel;\n }\n\n runningAnimations = ngAnimateState.active || {};\n totalActiveAnimations = ngAnimateState.totalActive || 0;\n\n if (animationEvent == 'leave') {\n //there's no need to ever remove the listener since the element\n //will be removed (destroyed) after the leave animation ends or\n //is cancelled midway\n element.one('$destroy', function(e) {\n var element = angular.element(this);\n var state = element.data(NG_ANIMATE_STATE);\n if (state) {\n var activeLeaveAnimation = state.active['ng-leave'];\n if (activeLeaveAnimation) {\n activeLeaveAnimation.cancel();\n cleanup(element, 'ng-leave');\n }\n }\n });\n }\n\n //the ng-animate class does nothing, but it's here to allow for\n //parent animations to find and cancel child animations when needed\n element.addClass(NG_ANIMATE_CLASS_NAME);\n\n var localAnimationCount = globalAnimationCounter++;\n totalActiveAnimations++;\n runningAnimations[className] = runner;\n\n element.data(NG_ANIMATE_STATE, {\n last : runner,\n active : runningAnimations,\n index : localAnimationCount,\n totalActive : totalActiveAnimations\n });\n\n //first we run the before animations and when all of those are complete\n //then we perform the DOM operation and run the next set of animations\n fireBeforeCallbackAsync();\n runner.before(function(cancelled) {\n var data = element.data(NG_ANIMATE_STATE);\n cancelled = cancelled ||\n !data || !data.active[className] ||\n (runner.isClassBased && data.active[className].event != animationEvent);\n\n fireDOMOperation();\n if (cancelled === true) {\n closeAnimation();\n } else {\n fireAfterCallbackAsync();\n runner.after(closeAnimation);\n }\n });\n\n return runner.cancel;\n\n function fireDOMCallback(animationPhase) {\n var eventName = '$animate:' + animationPhase;\n if (elementEvents && elementEvents[eventName] && elementEvents[eventName].length > 0) {\n $$asyncCallback(function() {\n element.triggerHandler(eventName, {\n event : animationEvent,\n className : className\n });\n });\n }\n }\n\n function fireBeforeCallbackAsync() {\n fireDOMCallback('before');\n }\n\n function fireAfterCallbackAsync() {\n fireDOMCallback('after');\n }\n\n function fireDoneCallbackAsync() {\n fireDOMCallback('close');\n doneCallback();\n }\n\n //it is less complicated to use a flag than managing and canceling\n //timeouts containing multiple callbacks.\n function fireDOMOperation() {\n if (!fireDOMOperation.hasBeenRun) {\n fireDOMOperation.hasBeenRun = true;\n domOperation();\n }\n }\n\n function closeAnimation() {\n if (!closeAnimation.hasBeenRun) {\n closeAnimation.hasBeenRun = true;\n var data = element.data(NG_ANIMATE_STATE);\n if (data) {\n /* only structural animations wait for reflow before removing an\n animation, but class-based animations don't. An example of this\n failing would be when a parent HTML tag has a ng-class attribute\n causing ALL directives below to skip animations during the digest */\n if (runner && runner.isClassBased) {\n cleanup(element, className);\n } else {\n $$asyncCallback(function() {\n var data = element.data(NG_ANIMATE_STATE) || {};\n if (localAnimationCount == data.index) {\n cleanup(element, className, animationEvent);\n }\n });\n element.data(NG_ANIMATE_STATE, data);\n }\n }\n fireDoneCallbackAsync();\n }\n }\n }\n\n function cancelChildAnimations(element) {\n var node = extractElementNode(element);\n if (node) {\n var nodes = angular.isFunction(node.getElementsByClassName) ?\n node.getElementsByClassName(NG_ANIMATE_CLASS_NAME) :\n node.querySelectorAll('.' + NG_ANIMATE_CLASS_NAME);\n forEach(nodes, function(element) {\n element = angular.element(element);\n var data = element.data(NG_ANIMATE_STATE);\n if (data && data.active) {\n forEach(data.active, function(runner) {\n runner.cancel();\n });\n }\n });\n }\n }\n\n function cleanup(element, className) {\n if (isMatchingElement(element, $rootElement)) {\n if (!rootAnimateState.disabled) {\n rootAnimateState.running = false;\n rootAnimateState.structural = false;\n }\n } else if (className) {\n var data = element.data(NG_ANIMATE_STATE) || {};\n\n var removeAnimations = className === true;\n if (!removeAnimations && data.active && data.active[className]) {\n data.totalActive--;\n delete data.active[className];\n }\n\n if (removeAnimations || !data.totalActive) {\n element.removeClass(NG_ANIMATE_CLASS_NAME);\n element.removeData(NG_ANIMATE_STATE);\n }\n }\n }\n\n function animationsDisabled(element, parentElement) {\n if (rootAnimateState.disabled) {\n return true;\n }\n\n if (isMatchingElement(element, $rootElement)) {\n return rootAnimateState.running;\n }\n\n var allowChildAnimations, parentRunningAnimation, hasParent;\n do {\n //the element did not reach the root element which means that it\n //is not apart of the DOM. Therefore there is no reason to do\n //any animations on it\n if (parentElement.length === 0) break;\n\n var isRoot = isMatchingElement(parentElement, $rootElement);\n var state = isRoot ? rootAnimateState : (parentElement.data(NG_ANIMATE_STATE) || {});\n if (state.disabled) {\n return true;\n }\n\n //no matter what, for an animation to work it must reach the root element\n //this implies that the element is attached to the DOM when the animation is run\n if (isRoot) {\n hasParent = true;\n }\n\n //once a flag is found that is strictly false then everything before\n //it will be discarded and all child animations will be restricted\n if (allowChildAnimations !== false) {\n var animateChildrenFlag = parentElement.data(NG_ANIMATE_CHILDREN);\n if (angular.isDefined(animateChildrenFlag)) {\n allowChildAnimations = animateChildrenFlag;\n }\n }\n\n parentRunningAnimation = parentRunningAnimation ||\n state.running ||\n (state.last && !state.last.isClassBased);\n }\n while(parentElement = parentElement.parent());\n\n return !hasParent || (!allowChildAnimations && parentRunningAnimation);\n }\n }]);\n\n $animateProvider.register('', ['$window', '$sniffer', '$timeout', '$$animateReflow',\n function($window, $sniffer, $timeout, $$animateReflow) {\n // Detect proper transitionend/animationend event names.\n var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;\n\n // If unprefixed events are not supported but webkit-prefixed are, use the latter.\n // Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.\n // Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`\n // but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.\n // Register both events in case `window.onanimationend` is not supported because of that,\n // do the same for `transitionend` as Safari is likely to exhibit similar behavior.\n // Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit\n // therefore there is no reason to test anymore for other vendor prefixes: http://caniuse.com/#search=transition\n if (window.ontransitionend === undefined && window.onwebkittransitionend !== undefined) {\n CSS_PREFIX = '-webkit-';\n TRANSITION_PROP = 'WebkitTransition';\n TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';\n } else {\n TRANSITION_PROP = 'transition';\n TRANSITIONEND_EVENT = 'transitionend';\n }\n\n if (window.onanimationend === undefined && window.onwebkitanimationend !== undefined) {\n CSS_PREFIX = '-webkit-';\n ANIMATION_PROP = 'WebkitAnimation';\n ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';\n } else {\n ANIMATION_PROP = 'animation';\n ANIMATIONEND_EVENT = 'animationend';\n }\n\n var DURATION_KEY = 'Duration';\n var PROPERTY_KEY = 'Property';\n var DELAY_KEY = 'Delay';\n var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';\n var ANIMATION_PLAYSTATE_KEY = 'PlayState';\n var NG_ANIMATE_PARENT_KEY = '$$ngAnimateKey';\n var NG_ANIMATE_CSS_DATA_KEY = '$$ngAnimateCSS3Data';\n var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;\n var CLOSING_TIME_BUFFER = 1.5;\n var ONE_SECOND = 1000;\n\n var lookupCache = {};\n var parentCounter = 0;\n var animationReflowQueue = [];\n var cancelAnimationReflow;\n function afterReflow(element, callback) {\n if (cancelAnimationReflow) {\n cancelAnimationReflow();\n }\n animationReflowQueue.push(callback);\n cancelAnimationReflow = $$animateReflow(function() {\n forEach(animationReflowQueue, function(fn) {\n fn();\n });\n\n animationReflowQueue = [];\n cancelAnimationReflow = null;\n lookupCache = {};\n });\n }\n\n var closingTimer = null;\n var closingTimestamp = 0;\n var animationElementQueue = [];\n function animationCloseHandler(element, totalTime) {\n var node = extractElementNode(element);\n element = angular.element(node);\n\n //this item will be garbage collected by the closing\n //animation timeout\n animationElementQueue.push(element);\n\n //but it may not need to cancel out the existing timeout\n //if the timestamp is less than the previous one\n var futureTimestamp = Date.now() + totalTime;\n if (futureTimestamp <= closingTimestamp) {\n return;\n }\n\n $timeout.cancel(closingTimer);\n\n closingTimestamp = futureTimestamp;\n closingTimer = $timeout(function() {\n closeAllAnimations(animationElementQueue);\n animationElementQueue = [];\n }, totalTime, false);\n }\n\n function closeAllAnimations(elements) {\n forEach(elements, function(element) {\n var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n if (elementData) {\n forEach(elementData.closeAnimationFns, function(fn) {\n fn();\n });\n }\n });\n }\n\n function getElementAnimationDetails(element, cacheKey) {\n var data = cacheKey ? lookupCache[cacheKey] : null;\n if (!data) {\n var transitionDuration = 0;\n var transitionDelay = 0;\n var animationDuration = 0;\n var animationDelay = 0;\n\n //we want all the styles defined before and after\n forEach(element, function(element) {\n if (element.nodeType == ELEMENT_NODE) {\n var elementStyles = $window.getComputedStyle(element) || {};\n\n var transitionDurationStyle = elementStyles[TRANSITION_PROP + DURATION_KEY];\n transitionDuration = Math.max(parseMaxTime(transitionDurationStyle), transitionDuration);\n\n var transitionDelayStyle = elementStyles[TRANSITION_PROP + DELAY_KEY];\n transitionDelay = Math.max(parseMaxTime(transitionDelayStyle), transitionDelay);\n\n var animationDelayStyle = elementStyles[ANIMATION_PROP + DELAY_KEY];\n animationDelay = Math.max(parseMaxTime(elementStyles[ANIMATION_PROP + DELAY_KEY]), animationDelay);\n\n var aDuration = parseMaxTime(elementStyles[ANIMATION_PROP + DURATION_KEY]);\n\n if (aDuration > 0) {\n aDuration *= parseInt(elementStyles[ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY], 10) || 1;\n }\n animationDuration = Math.max(aDuration, animationDuration);\n }\n });\n data = {\n total : 0,\n transitionDelay: transitionDelay,\n transitionDuration: transitionDuration,\n animationDelay: animationDelay,\n animationDuration: animationDuration\n };\n if (cacheKey) {\n lookupCache[cacheKey] = data;\n }\n }\n return data;\n }\n\n function parseMaxTime(str) {\n var maxValue = 0;\n var values = angular.isString(str) ?\n str.split(/\\s*,\\s*/) :\n [];\n forEach(values, function(value) {\n maxValue = Math.max(parseFloat(value) || 0, maxValue);\n });\n return maxValue;\n }\n\n function getCacheKey(element) {\n var parentElement = element.parent();\n var parentID = parentElement.data(NG_ANIMATE_PARENT_KEY);\n if (!parentID) {\n parentElement.data(NG_ANIMATE_PARENT_KEY, ++parentCounter);\n parentID = parentCounter;\n }\n return parentID + '-' + extractElementNode(element).getAttribute('class');\n }\n\n function animateSetup(animationEvent, element, className) {\n var structural = ['ng-enter','ng-leave','ng-move'].indexOf(className) >= 0;\n\n var cacheKey = getCacheKey(element);\n var eventCacheKey = cacheKey + ' ' + className;\n var itemIndex = lookupCache[eventCacheKey] ? ++lookupCache[eventCacheKey].total : 0;\n\n var stagger = {};\n if (itemIndex > 0) {\n var staggerClassName = className + '-stagger';\n var staggerCacheKey = cacheKey + ' ' + staggerClassName;\n var applyClasses = !lookupCache[staggerCacheKey];\n\n applyClasses && element.addClass(staggerClassName);\n\n stagger = getElementAnimationDetails(element, staggerCacheKey);\n\n applyClasses && element.removeClass(staggerClassName);\n }\n\n element.addClass(className);\n\n var formerData = element.data(NG_ANIMATE_CSS_DATA_KEY) || {};\n var timings = getElementAnimationDetails(element, eventCacheKey);\n var transitionDuration = timings.transitionDuration;\n var animationDuration = timings.animationDuration;\n\n if (structural && transitionDuration === 0 && animationDuration === 0) {\n element.removeClass(className);\n return false;\n }\n\n var blockTransition = structural && transitionDuration > 0;\n var blockAnimation = animationDuration > 0 &&\n stagger.animationDelay > 0 &&\n stagger.animationDuration === 0;\n\n var closeAnimationFns = formerData.closeAnimationFns || [];\n element.data(NG_ANIMATE_CSS_DATA_KEY, {\n stagger : stagger,\n cacheKey : eventCacheKey,\n running : formerData.running || 0,\n itemIndex : itemIndex,\n blockTransition : blockTransition,\n closeAnimationFns : closeAnimationFns\n });\n\n var node = extractElementNode(element);\n\n if (blockTransition) {\n blockTransitions(node, true);\n }\n\n if (blockAnimation) {\n blockAnimations(node, true);\n }\n\n return true;\n }\n\n function animateRun(animationEvent, element, className, activeAnimationComplete) {\n var node = extractElementNode(element);\n var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);\n if (node.getAttribute('class').indexOf(className) == -1 || !elementData) {\n activeAnimationComplete();\n return;\n }\n\n if (elementData.blockTransition) {\n blockTransitions(node, false);\n }\n\n var activeClassName = '';\n var pendingClassName = '';\n forEach(className.split(' '), function(klass, i) {\n var prefix = (i > 0 ? ' ' : '') + klass;\n activeClassName += prefix + '-active';\n pendingClassName += prefix + '-pending';\n });\n\n var style = '';\n var appliedStyles = [];\n var itemIndex = elementData.itemIndex;\n var stagger = elementData.stagger;\n var staggerTime = 0;\n if (itemIndex > 0) {\n var transitionStaggerDelay = 0;\n if (stagger.transitionDelay > 0 && stagger.transitionDuration === 0) {\n transitionStaggerDelay = stagger.transitionDelay * itemIndex;\n }\n\n var animationStaggerDelay = 0;\n if (stagger.animationDelay > 0 && stagger.animationDuration === 0) {\n animationStaggerDelay = stagger.animationDelay * itemIndex;\n appliedStyles.push(CSS_PREFIX + 'animation-play-state');\n }\n\n staggerTime = Math.round(Math.max(transitionStaggerDelay, animationStaggerDelay) * 100) / 100;\n }\n\n if (!staggerTime) {\n element.addClass(activeClassName);\n }\n\n var eventCacheKey = elementData.cacheKey + ' ' + activeClassName;\n var timings = getElementAnimationDetails(element, eventCacheKey);\n var maxDuration = Math.max(timings.transitionDuration, timings.animationDuration);\n if (maxDuration === 0) {\n element.removeClass(activeClassName);\n animateClose(element, className);\n activeAnimationComplete();\n return;\n }\n\n var maxDelay = Math.max(timings.transitionDelay, timings.animationDelay);\n var maxDelayTime = maxDelay * ONE_SECOND;\n\n if (appliedStyles.length > 0) {\n //the element being animated may sometimes contain comment nodes in\n //the jqLite object, so we're safe to use a single variable to house\n //the styles since there is always only one element being animated\n var oldStyle = node.getAttribute('style') || '';\n if (oldStyle.charAt(oldStyle.length-1) !== ';') {\n oldStyle += ';';\n }\n node.setAttribute('style', oldStyle + ' ' + style);\n }\n\n var startTime = Date.now();\n var css3AnimationEvents = ANIMATIONEND_EVENT + ' ' + TRANSITIONEND_EVENT;\n var animationTime = (maxDelay + maxDuration) * CLOSING_TIME_BUFFER;\n var totalTime = (staggerTime + animationTime) * ONE_SECOND;\n\n var staggerTimeout;\n if (staggerTime > 0) {\n element.addClass(pendingClassName);\n staggerTimeout = $timeout(function() {\n staggerTimeout = null;\n element.addClass(activeClassName);\n element.removeClass(pendingClassName);\n if (timings.animationDuration > 0) {\n blockAnimations(node, false);\n }\n }, staggerTime * ONE_SECOND, false);\n }\n\n element.on(css3AnimationEvents, onAnimationProgress);\n elementData.closeAnimationFns.push(function() {\n onEnd();\n activeAnimationComplete();\n });\n\n elementData.running++;\n animationCloseHandler(element, totalTime);\n return onEnd;\n\n // This will automatically be called by $animate so\n // there is no need to attach this internally to the\n // timeout done method.\n function onEnd(cancelled) {\n element.off(css3AnimationEvents, onAnimationProgress);\n element.removeClass(activeClassName);\n element.removeClass(pendingClassName);\n if (staggerTimeout) {\n $timeout.cancel(staggerTimeout);\n }\n animateClose(element, className);\n var node = extractElementNode(element);\n for (var i in appliedStyles) {\n node.style.removeProperty(appliedStyles[i]);\n }\n }\n\n function onAnimationProgress(event) {\n event.stopPropagation();\n var ev = event.originalEvent || event;\n var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now();\n\n /* Firefox (or possibly just Gecko) likes to not round values up\n * when a ms measurement is used for the animation */\n var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));\n\n /* $manualTimeStamp is a mocked timeStamp value which is set\n * within browserTrigger(). This is only here so that tests can\n * mock animations properly. Real events fallback to event.timeStamp,\n * or, if they don't, then a timeStamp is automatically created for them.\n * We're checking to see if the timeStamp surpasses the expected delay,\n * but we're using elapsedTime instead of the timeStamp on the 2nd\n * pre-condition since animations sometimes close off early */\n if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {\n activeAnimationComplete();\n }\n }\n }\n\n function blockTransitions(node, bool) {\n node.style[TRANSITION_PROP + PROPERTY_KEY] = bool ? 'none' : '';\n }\n\n function blockAnimations(node, bool) {\n node.style[ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY] = bool ? 'paused' : '';\n }\n\n function animateBefore(animationEvent, element, className, calculationDecorator) {\n if (animateSetup(animationEvent, element, className, calculationDecorator)) {\n return function(cancelled) {\n cancelled && animateClose(element, className);\n };\n }\n }\n\n function animateAfter(animationEvent, element, className, afterAnimationComplete) {\n if (element.data(NG_ANIMATE_CSS_DATA_KEY)) {\n return animateRun(animationEvent, element, className, afterAnimationComplete);\n } else {\n animateClose(element, className);\n afterAnimationComplete();\n }\n }\n\n function animate(animationEvent, element, className, animationComplete) {\n //If the animateSetup function doesn't bother returning a\n //cancellation function then it means that there is no animation\n //to perform at all\n var preReflowCancellation = animateBefore(animationEvent, element, className);\n if (!preReflowCancellation) {\n animationComplete();\n return;\n }\n\n //There are two cancellation functions: one is before the first\n //reflow animation and the second is during the active state\n //animation. The first function will take care of removing the\n //data from the element which will not make the 2nd animation\n //happen in the first place\n var cancel = preReflowCancellation;\n afterReflow(element, function() {\n //once the reflow is complete then we point cancel to\n //the new cancellation function which will remove all of the\n //animation properties from the active animation\n cancel = animateAfter(animationEvent, element, className, animationComplete);\n });\n\n return function(cancelled) {\n (cancel || noop)(cancelled);\n };\n }\n\n function animateClose(element, className) {\n element.removeClass(className);\n var data = element.data(NG_ANIMATE_CSS_DATA_KEY);\n if (data) {\n if (data.running) {\n data.running--;\n }\n if (!data.running || data.running === 0) {\n element.removeData(NG_ANIMATE_CSS_DATA_KEY);\n }\n }\n }\n\n return {\n enter : function(element, animationCompleted) {\n return animate('enter', element, 'ng-enter', animationCompleted);\n },\n\n leave : function(element, animationCompleted) {\n return animate('leave', element, 'ng-leave', animationCompleted);\n },\n\n move : function(element, animationCompleted) {\n return animate('move', element, 'ng-move', animationCompleted);\n },\n\n beforeSetClass : function(element, add, remove, animationCompleted) {\n var className = suffixClasses(remove, '-remove') + ' ' +\n suffixClasses(add, '-add');\n var cancellationMethod = animateBefore('setClass', element, className);\n if (cancellationMethod) {\n afterReflow(element, animationCompleted);\n return cancellationMethod;\n }\n animationCompleted();\n },\n\n beforeAddClass : function(element, className, animationCompleted) {\n var cancellationMethod = animateBefore('addClass', element, suffixClasses(className, '-add'));\n if (cancellationMethod) {\n afterReflow(element, animationCompleted);\n return cancellationMethod;\n }\n animationCompleted();\n },\n\n beforeRemoveClass : function(element, className, animationCompleted) {\n var cancellationMethod = animateBefore('removeClass', element, suffixClasses(className, '-remove'));\n if (cancellationMethod) {\n afterReflow(element, animationCompleted);\n return cancellationMethod;\n }\n animationCompleted();\n },\n\n setClass : function(element, add, remove, animationCompleted) {\n remove = suffixClasses(remove, '-remove');\n add = suffixClasses(add, '-add');\n var className = remove + ' ' + add;\n return animateAfter('setClass', element, className, animationCompleted);\n },\n\n addClass : function(element, className, animationCompleted) {\n return animateAfter('addClass', element, suffixClasses(className, '-add'), animationCompleted);\n },\n\n removeClass : function(element, className, animationCompleted) {\n return animateAfter('removeClass', element, suffixClasses(className, '-remove'), animationCompleted);\n }\n };\n\n function suffixClasses(classes, suffix) {\n var className = '';\n classes = isArray(classes) ? classes : classes.split(/\\s+/);\n forEach(classes, function(klass, i) {\n if (klass && klass.length > 0) {\n className += (i > 0 ? ' ' : '') + klass + suffix;\n }\n });\n return className;\n }\n }]);\n }]);\n\n\n})(window, window.angular);\n","/*\n * angular-elastic v2.3.6\n * (c) 2014 Monospaced http://monospaced.com\n * License: MIT\n */\n\nangular.module('monospaced.elastic', [])\n\n .constant('msdElasticConfig', {\n append: ''\n })\n\n .directive('msdElastic', [\n '$timeout', '$window', 'msdElasticConfig',\n function($timeout, $window, config) {\n 'use strict';\n\n return {\n require: 'ngModel',\n restrict: 'A, C',\n link: function(scope, element, attrs, ngModel) {\n\n // cache a reference to the DOM element\n var ta = element[0],\n $ta = element;\n\n // ensure the element is a textarea, and browser is capable\n if (ta.nodeName !== 'TEXTAREA' || !$window.getComputedStyle) {\n return;\n }\n\n // set these properties before measuring dimensions\n $ta.css({\n 'overflow': 'hidden',\n 'overflow-y': 'hidden',\n 'word-wrap': 'break-word'\n });\n\n // force text reflow\n var text = ta.value;\n ta.value = '';\n ta.value = text;\n\n var append = attrs.msdElastic ? attrs.msdElastic.replace(/\\\\n/g, '\\n') : config.append,\n $win = angular.element($window),\n mirrorStyle = 'position: absolute; top: -999px; right: auto; bottom: auto;' +\n 'left: 0; overflow: hidden; -webkit-box-sizing: content-box;' +\n '-moz-box-sizing: content-box; box-sizing: content-box;' +\n 'min-height: 0 !important; height: 0 !important; padding: 0;' +\n 'word-wrap: break-word; border: 0;',\n $mirror = angular.element('').data('elastic', true),\n mirror = $mirror[0],\n taStyle = getComputedStyle(ta),\n resize = taStyle.getPropertyValue('resize'),\n borderBox = taStyle.getPropertyValue('box-sizing') === 'border-box' ||\n taStyle.getPropertyValue('-moz-box-sizing') === 'border-box' ||\n taStyle.getPropertyValue('-webkit-box-sizing') === 'border-box',\n boxOuter = !borderBox ? {width: 0, height: 0} : {\n width: parseInt(taStyle.getPropertyValue('border-right-width'), 10) +\n parseInt(taStyle.getPropertyValue('padding-right'), 10) +\n parseInt(taStyle.getPropertyValue('padding-left'), 10) +\n parseInt(taStyle.getPropertyValue('border-left-width'), 10),\n height: parseInt(taStyle.getPropertyValue('border-top-width'), 10) +\n parseInt(taStyle.getPropertyValue('padding-top'), 10) +\n parseInt(taStyle.getPropertyValue('padding-bottom'), 10) +\n parseInt(taStyle.getPropertyValue('border-bottom-width'), 10)\n },\n minHeightValue = parseInt(taStyle.getPropertyValue('min-height'), 10),\n heightValue = parseInt(taStyle.getPropertyValue('height'), 10),\n minHeight = Math.max(minHeightValue, heightValue) - boxOuter.height,\n maxHeight = parseInt(taStyle.getPropertyValue('max-height'), 10),\n mirrored,\n active,\n copyStyle = ['font-family',\n 'font-size',\n 'font-weight',\n 'font-style',\n 'letter-spacing',\n 'line-height',\n 'text-transform',\n 'word-spacing',\n 'text-indent'];\n\n // exit if elastic already applied (or is the mirror element)\n if ($ta.data('elastic')) {\n return;\n }\n\n // Opera returns max-height of -1 if not set\n maxHeight = maxHeight && maxHeight > 0 ? maxHeight : 9e4;\n\n // append mirror to the DOM\n if (mirror.parentNode !== document.body) {\n angular.element(document.body).append(mirror);\n }\n\n // set resize and apply elastic\n $ta.css({\n 'resize': (resize === 'none' || resize === 'vertical') ? 'none' : 'horizontal'\n }).data('elastic', true);\n\n /*\n * methods\n */\n\n function initMirror() {\n mirrored = ta;\n // copy the essential styles from the textarea to the mirror\n taStyle = getComputedStyle(ta);\n angular.forEach(copyStyle, function(val) {\n mirrorStyle += val + ':' + taStyle.getPropertyValue(val) + ';';\n });\n mirror.setAttribute('style', mirrorStyle);\n }\n\n function adjust() {\n var taHeight,\n taComputedStyleWidth,\n mirrorHeight,\n width,\n overflow;\n\n if (mirrored !== ta) {\n initMirror();\n }\n\n // active flag prevents actions in function from calling adjust again\n if (!active) {\n active = true;\n\n mirror.value = ta.value + append; // optional whitespace to improve animation\n mirror.style.overflowY = ta.style.overflowY;\n\n taHeight = ta.style.height === '' ? 'auto' : parseInt(ta.style.height, 10);\n\n taComputedStyleWidth = getComputedStyle(ta).getPropertyValue('width');\n\n // ensure getComputedStyle has returned a readable 'used value' pixel width\n if (taComputedStyleWidth.substr(taComputedStyleWidth.length - 2, 2) === 'px') {\n // update mirror width in case the textarea width has changed\n width = parseInt(taComputedStyleWidth, 10) - boxOuter.width;\n mirror.style.width = width + 'px';\n }\n\n mirrorHeight = mirror.scrollHeight;\n\n if (mirrorHeight > maxHeight) {\n mirrorHeight = maxHeight;\n overflow = 'scroll';\n } else if (mirrorHeight < minHeight) {\n mirrorHeight = minHeight;\n }\n mirrorHeight += boxOuter.height;\n\n ta.style.overflowY = overflow || 'hidden';\n\n if (taHeight !== mirrorHeight) {\n ta.style.height = mirrorHeight + 'px';\n scope.$emit('elastic:resize', $ta);\n }\n\n // small delay to prevent an infinite loop\n $timeout(function() {\n active = false;\n }, 1);\n\n }\n }\n\n function forceAdjust() {\n active = false;\n adjust();\n }\n\n /*\n * initialise\n */\n\n // listen\n if ('onpropertychange' in ta && 'oninput' in ta) {\n // IE9\n ta['oninput'] = ta.onkeyup = adjust;\n } else {\n ta['oninput'] = adjust;\n }\n\n $win.bind('resize', forceAdjust);\n\n scope.$watch(function() {\n return ngModel.$modelValue;\n }, function(newValue) {\n forceAdjust();\n });\n\n scope.$on('elastic:adjust', function() {\n forceAdjust();\n });\n\n $timeout(adjust);\n\n /*\n * destroy\n */\n\n scope.$on('$destroy', function() {\n $mirror.remove();\n $win.unbind('resize', forceAdjust);\n });\n }\n };\n }\n ]);\n","/**\n * @license AngularJS v1.3.0-rc.3\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\nvar $resourceMinErr = angular.$$minErr('$resource');\n\n// Helper functions and regex to lookup a dotted path on an object\n// stopping at undefined/null. The path must be composed of ASCII\n// identifiers (just like $parse)\nvar MEMBER_NAME_REGEX = /^(\\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;\n\nfunction isValidDottedPath(path) {\n return (path != null && path !== '' && path !== 'hasOwnProperty' &&\n MEMBER_NAME_REGEX.test('.' + path));\n}\n\nfunction lookupDottedPath(obj, path) {\n if (!isValidDottedPath(path)) {\n throw $resourceMinErr('badmember', 'Dotted member path \"@{0}\" is invalid.', path);\n }\n var keys = path.split('.');\n for (var i = 0, ii = keys.length; i < ii && obj !== undefined; i++) {\n var key = keys[i];\n obj = (obj !== null) ? obj[key] : undefined;\n }\n return obj;\n}\n\n/**\n * Create a shallow copy of an object and clear other fields from the destination\n */\nfunction shallowClearAndCopy(src, dst) {\n dst = dst || {};\n\n angular.forEach(dst, function(value, key){\n delete dst[key];\n });\n\n for (var key in src) {\n if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n dst[key] = src[key];\n }\n }\n\n return dst;\n}\n\n/**\n * @ngdoc module\n * @name ngResource\n * @description\n *\n * # ngResource\n *\n * The `ngResource` module provides interaction support with RESTful services\n * via the $resource service.\n *\n *\n * \n *\n * See {@link ngResource.$resource `$resource`} for usage.\n */\n\n/**\n * @ngdoc service\n * @name $resource\n * @requires $http\n *\n * @description\n * A factory which creates a resource object that lets you interact with\n * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.\n *\n * The returned resource object has action methods which provide high-level behaviors without\n * the need to interact with the low level {@link ng.$http $http} service.\n *\n * Requires the {@link ngResource `ngResource`} module to be installed.\n *\n * By default, trailing slashes will be stripped from the calculated URLs,\n * which can pose problems with server backends that do not expect that\n * behavior. This can be disabled by configuring the `$resourceProvider` like\n * this:\n *\n * ```js\n app.config(['$resourceProvider', function ($resourceProvider) {\n // Don't strip trailing slashes from calculated URLs\n $resourceProvider.defaults.stripTrailingSlashes = false;\n }]);\n * ```\n *\n * @param {string} url A parametrized URL template with parameters prefixed by `:` as in\n * `/user/:username`. If you are using a URL with a port number (e.g.\n * `http://example.com:8080/api`), it will be respected.\n *\n * If you are using a url with a suffix, just add the suffix, like this:\n * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')`\n * or even `$resource('http://example.com/resource/:resource_id.:format')`\n * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be\n * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you\n * can escape it with `/\\.`.\n *\n * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in\n * `actions` methods. If any of the parameter value is a function, it will be executed every time\n * when a param value needs to be obtained for a request (unless the param was overridden).\n *\n * Each key value in the parameter object is first bound to url template if present and then any\n * excess keys are appended to the url search query after the `?`.\n *\n * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in\n * URL `/path/greet?salutation=Hello`.\n *\n * If the parameter value is prefixed with `@` then the value for that parameter will be extracted\n * from the corresponding property on the `data` object (provided when calling an action method). For\n * example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam`\n * will be `data.someProp`.\n *\n * @param {Object.=} actions Hash with declaration of custom action that should extend\n * the default set of resource actions. The declaration should be created in the format of {@link\n * ng.$http#usage_parameters $http.config}:\n *\n * {action1: {method:?, params:?, isArray:?, headers:?, ...},\n * action2: {method:?, params:?, isArray:?, headers:?, ...},\n * ...}\n *\n * Where:\n *\n * - **`action`** – {string} – The name of action. This name becomes the name of the method on\n * your resource object.\n * - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`,\n * `DELETE`, `JSONP`, etc).\n * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of\n * the parameter value is a function, it will be executed every time when a param value needs to\n * be obtained for a request (unless the param was overridden).\n * - **`url`** – {string} – action specific `url` override. The url templating is supported just\n * like for the resource-level urls.\n * - **`isArray`** – {boolean=} – If true then the returned object for this action is an array,\n * see `returns` section.\n * - **`transformRequest`** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * request body and headers and returns its transformed (typically serialized) version.\n * By default, transformRequest will contain one function that checks if the request data is\n * an object and serializes to using `angular.toJson`. To prevent this behavior, set\n * `transformRequest` to an empty array: `transformRequest: []`\n * - **`transformResponse`** –\n * `{function(data, headersGetter)|Array.}` –\n * transform function or an array of such functions. The transform function takes the http\n * response body and headers and returns its transformed (typically deserialized) version.\n * By default, transformResponse will contain one function that checks if the response looks like\n * a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior, set\n * `transformResponse` to an empty array: `transformResponse: []`\n * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the\n * GET request, otherwise if a cache instance built with\n * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for\n * caching.\n * - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that\n * should abort the request when resolved.\n * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the\n * XHR object. See\n * [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)\n * for more information.\n * - **`responseType`** - `{string}` - see\n * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).\n * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -\n * `response` and `responseError`. Both `response` and `responseError` interceptors get called\n * with `http response` object. See {@link ng.$http $http interceptors}.\n *\n * @param {Object} options Hash with custom settings that should extend the\n * default `$resourceProvider` behavior. The only supported option is\n *\n * Where:\n *\n * - **`stripTrailingSlashes`** – {boolean} – If true then the trailing\n * slashes from any calculated URL will be stripped. (Defaults to true.)\n *\n * @returns {Object} A resource \"class\" object with methods for the default set of resource actions\n * optionally extended with custom `actions`. The default set contains these actions:\n * ```js\n * { 'get': {method:'GET'},\n * 'save': {method:'POST'},\n * 'query': {method:'GET', isArray:true},\n * 'remove': {method:'DELETE'},\n * 'delete': {method:'DELETE'} };\n * ```\n *\n * Calling these methods invoke an {@link ng.$http} with the specified http method,\n * destination and parameters. When the data is returned from the server then the object is an\n * instance of the resource class. The actions `save`, `remove` and `delete` are available on it\n * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create,\n * read, update, delete) on server-side data like this:\n * ```js\n * var User = $resource('/user/:userId', {userId:'@id'});\n * var user = User.get({userId:123}, function() {\n * user.abc = true;\n * user.$save();\n * });\n * ```\n *\n * It is important to realize that invoking a $resource object method immediately returns an\n * empty reference (object or array depending on `isArray`). Once the data is returned from the\n * server the existing reference is populated with the actual data. This is a useful trick since\n * usually the resource is assigned to a model which is then rendered by the view. Having an empty\n * object results in no rendering, once the data arrives from the server then the object is\n * populated with the data and the view automatically re-renders itself showing the new data. This\n * means that in most cases one never has to write a callback function for the action methods.\n *\n * The action methods on the class object or instance object can be invoked with the following\n * parameters:\n *\n * - HTTP GET \"class\" actions: `Resource.action([parameters], [success], [error])`\n * - non-GET \"class\" actions: `Resource.action([parameters], postData, [success], [error])`\n * - non-GET instance actions: `instance.$action([parameters], [success], [error])`\n *\n * Success callback is called with (value, responseHeaders) arguments. Error callback is called\n * with (httpResponse) argument.\n *\n * Class actions return empty instance (with additional properties below).\n * Instance actions return promise of the action.\n *\n * The Resource instances and collection have these additional properties:\n *\n * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this\n * instance or collection.\n *\n * On success, the promise is resolved with the same resource instance or collection object,\n * updated with data from server. This makes it easy to use in\n * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view\n * rendering until the resource(s) are loaded.\n *\n * On failure, the promise is resolved with the {@link ng.$http http response} object, without\n * the `resource` property.\n *\n * If an interceptor object was provided, the promise will instead be resolved with the value\n * returned by the interceptor.\n *\n * - `$resolved`: `true` after first server interaction is completed (either with success or\n * rejection), `false` before that. Knowing if the Resource has been resolved is useful in\n * data-binding.\n *\n * @example\n *\n * # Credit card resource\n *\n * ```js\n // Define CreditCard class\n var CreditCard = $resource('/user/:userId/card/:cardId',\n {userId:123, cardId:'@id'}, {\n charge: {method:'POST', params:{charge:true}}\n });\n\n // We can retrieve a collection from the server\n var cards = CreditCard.query(function() {\n // GET: /user/123/card\n // server returns: [ {id:456, number:'1234', name:'Smith'} ];\n\n var card = cards[0];\n // each item is an instance of CreditCard\n expect(card instanceof CreditCard).toEqual(true);\n card.name = \"J. Smith\";\n // non GET methods are mapped onto the instances\n card.$save();\n // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}\n // server returns: {id:456, number:'1234', name: 'J. Smith'};\n\n // our custom method is mapped as well.\n card.$charge({amount:9.99});\n // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}\n });\n\n // we can create an instance as well\n var newCard = new CreditCard({number:'0123'});\n newCard.name = \"Mike Smith\";\n newCard.$save();\n // POST: /user/123/card {number:'0123', name:'Mike Smith'}\n // server returns: {id:789, number:'0123', name: 'Mike Smith'};\n expect(newCard.id).toEqual(789);\n * ```\n *\n * The object returned from this function execution is a resource \"class\" which has \"static\" method\n * for each action in the definition.\n *\n * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and\n * `headers`.\n * When the data is returned from the server then the object is an instance of the resource type and\n * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD\n * operations (create, read, update, delete) on server-side data.\n\n ```js\n var User = $resource('/user/:userId', {userId:'@id'});\n User.get({userId:123}, function(user) {\n user.abc = true;\n user.$save();\n });\n ```\n *\n * It's worth noting that the success callback for `get`, `query` and other methods gets passed\n * in the response that came from the server as well as $http header getter function, so one\n * could rewrite the above example and get access to http headers as:\n *\n ```js\n var User = $resource('/user/:userId', {userId:'@id'});\n User.get({userId:123}, function(u, getResponseHeaders){\n u.abc = true;\n u.$save(function(u, putResponseHeaders) {\n //u => saved user object\n //putResponseHeaders => $http header getter\n });\n });\n ```\n *\n * You can also access the raw `$http` promise via the `$promise` property on the object returned\n *\n ```\n var User = $resource('/user/:userId', {userId:'@id'});\n User.get({userId:123})\n .$promise.then(function(user) {\n $scope.user = user;\n });\n ```\n\n * # Creating a custom 'PUT' request\n * In this example we create a custom method on our resource to make a PUT request\n * ```js\n * var app = angular.module('app', ['ngResource', 'ngRoute']);\n *\n * // Some APIs expect a PUT request in the format URL/object/ID\n * // Here we are creating an 'update' method\n * app.factory('Notes', ['$resource', function($resource) {\n * return $resource('/notes/:id', null,\n * {\n * 'update': { method:'PUT' }\n * });\n * }]);\n *\n * // In our controller we get the ID from the URL using ngRoute and $routeParams\n * // We pass in $routeParams and our Notes factory along with $scope\n * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',\n function($scope, $routeParams, Notes) {\n * // First get a note object from the factory\n * var note = Notes.get({ id:$routeParams.id });\n * $id = note.id;\n *\n * // Now call update passing in the ID first then the object you are updating\n * Notes.update({ id:$id }, note);\n *\n * // This will PUT /notes/ID with the note object in the request payload\n * }]);\n * ```\n */\nangular.module('ngResource', ['ng']).\n provider('$resource', function () {\n var provider = this;\n\n this.defaults = {\n // Strip slashes by default\n stripTrailingSlashes: true,\n\n // Default actions configuration\n actions: {\n 'get': {method: 'GET'},\n 'save': {method: 'POST'},\n 'query': {method: 'GET', isArray: true},\n 'remove': {method: 'DELETE'},\n 'delete': {method: 'DELETE'}\n }\n };\n\n this.$get = ['$http', '$q', function ($http, $q) {\n\n var noop = angular.noop,\n forEach = angular.forEach,\n extend = angular.extend,\n copy = angular.copy,\n isFunction = angular.isFunction;\n\n /**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set\n * (pchar) allowed in path segments:\n * segment = *pchar\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\n function encodeUriSegment(val) {\n return encodeUriQuery(val, true).\n replace(/%26/gi, '&').\n replace(/%3D/gi, '=').\n replace(/%2B/gi, '+');\n }\n\n\n /**\n * This method is intended for encoding *key* or *value* parts of query component. We need a\n * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't\n * have to be encoded per http://tools.ietf.org/html/rfc3986:\n * query = *( pchar / \"/\" / \"?\" )\n * pchar = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n * unreserved = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n * pct-encoded = \"%\" HEXDIG HEXDIG\n * sub-delims = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n * / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\n function encodeUriQuery(val, pctEncodeSpaces) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n }\n\n function Route(template, defaults) {\n this.template = template;\n this.defaults = extend({}, provider.defaults, defaults);\n this.urlParams = {};\n }\n\n Route.prototype = {\n setUrlParams: function (config, params, actionUrl) {\n var self = this,\n url = actionUrl || self.template,\n val,\n encodedVal;\n\n var urlParams = self.urlParams = {};\n forEach(url.split(/\\W/), function (param) {\n if (param === 'hasOwnProperty') {\n throw $resourceMinErr('badname', \"hasOwnProperty is not a valid parameter name.\");\n }\n if (!(new RegExp(\"^\\\\d+$\").test(param)) && param &&\n (new RegExp(\"(^|[^\\\\\\\\]):\" + param + \"(\\\\W|$)\").test(url))) {\n urlParams[param] = true;\n }\n });\n url = url.replace(/\\\\:/g, ':');\n\n params = params || {};\n forEach(self.urlParams, function (_, urlParam) {\n val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];\n if (angular.isDefined(val) && val !== null) {\n encodedVal = encodeUriSegment(val);\n url = url.replace(new RegExp(\":\" + urlParam + \"(\\\\W|$)\", \"g\"), function (match, p1) {\n return encodedVal + p1;\n });\n } else {\n url = url.replace(new RegExp(\"(\\/?):\" + urlParam + \"(\\\\W|$)\", \"g\"), function (match,\n leadingSlashes, tail) {\n if (tail.charAt(0) == '/') {\n return tail;\n } else {\n return leadingSlashes + tail;\n }\n });\n }\n });\n\n // strip trailing slashes and set the url (unless this behavior is specifically disabled)\n if (self.defaults.stripTrailingSlashes) {\n url = url.replace(/\\/+$/, '') || '/';\n }\n\n // then replace collapse `/.` if found in the last URL path segment before the query\n // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`\n url = url.replace(/\\/\\.(?=\\w+($|\\?))/, '.');\n // replace escaped `/\\.` with `/.`\n config.url = url.replace(/\\/\\\\\\./, '/.');\n\n\n // set params - delegate param encoding to $http\n forEach(params, function (value, key) {\n if (!self.urlParams[key]) {\n config.params = config.params || {};\n config.params[key] = value;\n }\n });\n }\n };\n\n\n function resourceFactory(url, paramDefaults, actions, options) {\n var route = new Route(url, options);\n\n actions = extend({}, provider.defaults.actions, actions);\n\n function extractParams(data, actionParams) {\n var ids = {};\n actionParams = extend({}, paramDefaults, actionParams);\n forEach(actionParams, function (value, key) {\n if (isFunction(value)) { value = value(); }\n ids[key] = value && value.charAt && value.charAt(0) == '@' ?\n lookupDottedPath(data, value.substr(1)) : value;\n });\n return ids;\n }\n\n function defaultResponseInterceptor(response) {\n return response.resource;\n }\n\n function Resource(value) {\n shallowClearAndCopy(value || {}, this);\n }\n\n Resource.prototype.toJSON = function () {\n var data = extend({}, this);\n delete data.$promise;\n delete data.$resolved;\n return data;\n };\n\n forEach(actions, function (action, name) {\n var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);\n\n Resource[name] = function (a1, a2, a3, a4) {\n var params = {}, data, success, error;\n\n /* jshint -W086 */ /* (purposefully fall through case statements) */\n switch (arguments.length) {\n case 4:\n error = a4;\n success = a3;\n //fallthrough\n case 3:\n case 2:\n if (isFunction(a2)) {\n if (isFunction(a1)) {\n success = a1;\n error = a2;\n break;\n }\n\n success = a2;\n error = a3;\n //fallthrough\n } else {\n params = a1;\n data = a2;\n success = a3;\n break;\n }\n case 1:\n if (isFunction(a1)) success = a1;\n else if (hasBody) data = a1;\n else params = a1;\n break;\n case 0: break;\n default:\n throw $resourceMinErr('badargs',\n \"Expected up to 4 arguments [params, data, success, error], got {0} arguments\",\n arguments.length);\n }\n /* jshint +W086 */ /* (purposefully fall through case statements) */\n\n var isInstanceCall = this instanceof Resource;\n var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));\n var httpConfig = {};\n var responseInterceptor = action.interceptor && action.interceptor.response ||\n defaultResponseInterceptor;\n var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||\n undefined;\n\n forEach(action, function (value, key) {\n if (key != 'params' && key != 'isArray' && key != 'interceptor') {\n httpConfig[key] = copy(value);\n }\n });\n\n if (hasBody) httpConfig.data = data;\n route.setUrlParams(httpConfig,\n extend({}, extractParams(data, action.params || {}), params),\n action.url);\n\n var promise = $http(httpConfig).then(function (response) {\n var data = response.data,\n promise = value.$promise;\n\n if (data) {\n // Need to convert action.isArray to boolean in case it is undefined\n // jshint -W018\n if (angular.isArray(data) !== (!!action.isArray)) {\n throw $resourceMinErr('badcfg',\n 'Error in resource configuration for action `{0}`. Expected response to ' +\n 'contain an {1} but got an {2}', name, action.isArray ? 'array' : 'object',\n angular.isArray(data) ? 'array' : 'object');\n }\n // jshint +W018\n if (action.isArray) {\n value.length = 0;\n forEach(data, function (item) {\n if (typeof item === \"object\") {\n value.push(new Resource(item));\n } else {\n // Valid JSON values may be string literals, and these should not be converted\n // into objects. These items will not have access to the Resource prototype\n // methods, but unfortunately there\n value.push(item);\n }\n });\n } else {\n shallowClearAndCopy(data, value);\n value.$promise = promise;\n }\n }\n\n value.$resolved = true;\n\n response.resource = value;\n\n return response;\n }, function (response) {\n value.$resolved = true;\n\n (error || noop)(response);\n\n return $q.reject(response);\n });\n\n promise = promise.then(\n function (response) {\n var value = responseInterceptor(response);\n (success || noop)(value, response.headers);\n return value;\n },\n responseErrorInterceptor);\n\n if (!isInstanceCall) {\n // we are creating instance / collection\n // - set the initial promise\n // - return the instance / collection\n value.$promise = promise;\n value.$resolved = false;\n\n return value;\n }\n\n // instance call\n return promise;\n };\n\n\n Resource.prototype['$' + name] = function (params, success, error) {\n if (isFunction(params)) {\n error = success; success = params; params = {};\n }\n var result = Resource[name].call(this, params, this, success, error);\n return result.$promise || result;\n };\n });\n\n Resource.bind = function (additionalParamDefaults) {\n return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);\n };\n\n return Resource;\n }\n\n return resourceFactory;\n }];\n });\n\n\n})(window, window.angular);\n","var hljs=new function(){function k(v){return v.replace(/&/gm,\"&\").replace(//gm,\">\")}function t(v){return v.nodeName.toLowerCase()}function i(w,x){var v=w&&w.exec(x);return v&&v.index==0}function d(v){return Array.prototype.map.call(v.childNodes,function(w){if(w.nodeType==3){return b.useBR?w.nodeValue.replace(/\\n/g,\"\"):w.nodeValue}if(t(w)==\"br\"){return\"\\n\"}return d(w)}).join(\"\")}function r(w){var v=(w.className+\" \"+(w.parentNode?w.parentNode.className:\"\")).split(/\\s+/);v=v.map(function(x){return x.replace(/^language-/,\"\")});return v.filter(function(x){return j(x)||x==\"no-highlight\"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)==\"br\"){z+=1}else{if(A.nodeType==1){v.push({event:\"start\",offset:z,node:A});z=w(A,z);v.push({event:\"stop\",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F=\"\";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset
form = {{user | json}}
master = {{master | json}}
This renders because the controller does not fail to\n instantiate, by using explicit annotation style (see\n script.js for details)\n
This renders because the controller does not fail to\n instantiate, by using explicit annotation style\n (see script.js for details)\n
The controller could not be instantiated, due to relying\n on automatic function annotations (which are disabled in\n strict mode). As such, the content of this section is not\n interpolated, and there should be an error in your web console.\n
Cached Values
Cache Info
{{total}}
ngBind
ng-bind
$document title:
window.document title:
http status code: {{status}}
http response data: {{data}}
{{apptitle}}: \\{\\{ username = \"defaced value\"; \\}\\}\n *
{{username}} attempts to inject code which will deface the\n * application, but fails to accomplish their task, because the server has correctly\n * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)\n * characters.
Instead, the result of the attempted script injection is visible, and can be removed\n * from the database by an administrator.
Reload this page with open console, enter text and hit the log button...
{{ {'name':'value'} | json }}
Output numbers: {{ numbers | limitTo:numLimit }}
Output letters: {{ letters | limitTo:letterLimit }}
Output long number: {{ longNumber | limitTo:longNumberLimit }}
Sorting predicate = {{predicate}}; reverse = {{reverse}}
\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-form {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-form.ng-invalid {\n * background: red;\n * color:white;\n * }\n *
Try typing something in each input. See that the model only updates when you\n * blur off the input.\n *
Now see what happens if you start typing then press the Escape key
With $rollbackViewValue()
Without $rollbackViewValue()
\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-input {\n * transition:0.5s linear all;\n * background: white;\n * }\n * .my-input.ng-invalid {\n * background: red;\n * color:white;\n * }\n *
user.name =
{{ list | json }}
HTML
Map Syntax Example
Using String Syntax
Using Array Syntax
Typing in the input box below updates the key count
Typing in the input box below updates the keycode
event keyCode: {{ event.keyCode }}
event altKey: {{ event.altKey }}
list={{list}}
\n * \n *
myStyle={{myStyle}}