text: "use strict";function registerHDirective(e){directivesModule.directive("h"+e,function(){return{restrict:"E",require:{tocCollector:"^^?"},link:function(t,n,r,o){var a=o.tocCollector;a&&r.id&&a.register({level:e,fragment:r.id,title:n.text(),children:[]})}}})}angular.module("docsApp",["ngRoute","ngCookies","ngSanitize","ngAnimate","DocsController","pagesData","navData","directives","errors","examples","search","tutorials","versions","ui.bootstrap.dropdown"]).config(["$locationProvider",function(e){e.html5Mode(!0).hashPrefix("!")}]);var directivesModule=angular.module("directives",[]);directivesModule.directive("backToTop",["$anchorScroll","$location",function(e,t){return function(n,r){r.on("click",function(r){t.hash(""),n.$apply(e)})}}]).directive("code",function(){return{restrict:"E",terminal:!0,compile:function(e){var t=e.hasClass("linenum"),n=/lang-(\S+)/.exec(e[0].className),r=n&&n[1],o=e.html();e.html(window.prettyPrintOne(o,r,t))}}}).directive("scrollYOffsetElement",["$anchorScroll",function(e){return function(t,n){e.yOffset=n}}]).directive("table",function(){return{restrict:"E",link:function(e,t,n){n["class"]||t.addClass("table table-bordered table-striped code-table")}}}).directive("tocCollector",["$rootScope",function(e){return{controller:["$element",function(t){var n=this;e.$on("$includeContentRequested",function(){n.hs=[],n.root=[]}),this.hs=[],this.root=[],this.element=t,this.register=function(e){for(var t,r=n.hs.length-1;r>=0;r--)if(n.hs[r].level===e.level-1){t=n.hs[r];break}t?t.children.push(e):this.root.push(e),n.hs.push(e)}}]}}]).component("tocTree",{template:'<ul><li ng-repeat="item in $ctrl.items"><a ng-href="{{ $ctrl.path }}#{{item.fragment}}">{{item.title}}</a><toc-tree ng-if="::item.children.length > 0" items="item.children"></toc-tree></li></ul>',bindings:{items:"<"},controller:["$location",function(e){this.path=e.path().replace(/^\/?(.+?)(\/index)?\/?$/,"$1")}]}).directive("tocContainer",function(){return{scope:!0,restrict:"E",require:{tocContainer:"",tocCollector:"^^"},controller:function(){this.showToc=!0,this.items=[]},controllerAs:"$ctrl",link:function(e,t,n,r){r.tocContainer.items=r.tocCollector.root},template:'<div ng-if="::$ctrl.items.length > 1"><b>Contents</b><button class="btn" ng-click="$ctrl.showToc = !$ctrl.showToc">{{$ctrl.showToc ? \'Hide\' : \'Show\'}}</button><br><toc-tree items="$ctrl.items" ng-show="$ctrl.showToc"></toc-tree></div>'}}).directive("header",function(){return{restrict:"E",controller:["$element",function(e){this.element=e}]}}).directive("h1",["$compile",function(e){return{restrict:"E",require:{tocCollector:"^^?",header:"^^?"},link:function(t,n,r,o){if(o.tocCollector){var a=angular.element("<toc-container></toc-container>"),i=o.header?o.header.element:n;i.after(a),e(a)(t)}}}}]);for(var i=2;i<=5;i++)registerHDirective(i);angular.module("DocsController",["currentVersionData"]).controller("DocsController",["$scope","$rootScope","$location","$window","$cookies","NG_PAGES","NG_NAVIGATION","CURRENT_NG_VERSION",function(e,t,n,r,o,a,i,c){var l="Error404.html";e.navClass=function(e){return{active:e.href&&this.currentPage&&this.currentPage.path,current:this.currentPage&&this.currentPage.path===e.href,"nav-index-section":"section"===e.type}},e.$on("$includeContentLoaded",function(){var t=e.currentPage?e.currentPage.path:n.path();r._gaq.push(["_trackPageview",t]),e.loading=!1}),e.$on("$includeContentError",function(){e.loading=!1,e.loadingError=!0}),e.$watch(function(){return n.path()},function(t){t=t.replace(/^\/?(.+?)(\/index)?\/?$/,"$1");var n=e.currentPage=a[t];if(e.loading=!0,e.loadingError=!1,n){e.partialPath="partials/"+t+".html",e.currentArea=i[n.area];var r=n.path.split("/"),o=e.breadcrumb=[],c="";angular.forEach(r,function(e){c+=e,o.push({name:a[c]&&a[c].name||e,url:c}),c+="/"})}else e.currentArea=i.api,e.breadcrumb=[],e.partialPath=l}),e.hasError=function(){return e.partialPath===l||e.loadingError},e.versionNumber=c.full,e.version=c.full+" "+c.codeName,e.loading=!1,e.loadingError=!1;var s=/^(\/|\/index[^.]*.html)$/;n.path()&&!s.test(n.path())||n.path("/api").replace()}]),angular.module("errors",["ngSanitize"]).filter("errorLink",["$sanitize",function(e){var t=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>]/g,n=/^mailto:/,r=/:\d+:\d+$/,o=function(e,t){return e.length>t?e.substr(0,t-3)+"...":e};return function(a,i){if(!a)return a;var c=i?' target="'+i+'"':"";return e(a.replace(t,function(e){return r.test(e)?e:(/^((ftp|https?):\/\/|mailto:)/.test(e)||(e="mailto:"+e),"<a"+c+' href="'+e+'">'+o(e.replace(n,""),60)+"</a>")}))}}]).directive("errorDisplay",["$location","errorLinkFilter",function(e,t){var n=function(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")},r=function(e){var t=arguments;return e.replace(/\{\d+\}/g,function(e){var n=+e.slice(1,-1);return n+1>=t.length?e:t[n+1]})};return{link:function(o,a,i){var c,l,s=e.search(),u=[i.errorDisplay];for(l=0;angular.isDefined(s["p"+l]);l++)u.push(s["p"+l]);c=n(r.apply(null,u)),a.html(t(c,"_blank"))}}}]),angular.module("examples",[]).directive("runnableExample",[function(){var e=".runnable-example-file",t='<nav class="runnable-example-tabs" ng-if="tabs">  <a ng-class="{active:$index==activeTabIndex}"ng-repeat="tab in tabs track by $index" href="" class="btn"ng-click="setTab($index)">    {{ tab }}  </a></nav>';return{restrict:"C",scope:!0,controller:["$scope",function(e){e.setTab=function(t){var n=e.tabs[t];e.activeTabIndex=t,e.$broadcast("tabChange",t,n)}}],compile:function(n){return n.html(t+n.html()),function(t,n){var r=n[0],o=r.querySelectorAll(e),a=[];angular.forEach(o,function(e,t){a.push(e.getAttribute("name"))}),a.length>0&&(t.tabs=a,t.$on("tabChange",function(e,t,n){angular.forEach(o,function(e){e.style.display="none"});var r=o[t];r.style.display="block"}),t.setTab(0))}}}}]).factory("formPostData",["$document",function(e){return function(t,n,r){var o=n?"_blank":"_self",a=angular.element('<form style="display: none;" method="post" action="'+t+'" target="'+o+'"></form>');angular.forEach(r,function(e,t){var n=angular.element('<input type="hidden" name="'+t+'">');n.attr("value",e),a.append(n)}),e.find("body").append(a),a[0].submit(),a.remove()}}]).factory("createCopyrightNotice",function(){var e="Copyright "+(new Date).getFullYear()+" Google Inc. All Rights Reserved.\nUse of this source code is governed by an MIT-style license that\ncan be found in the LICENSE file at http://angular.io/license",t="\n\n/*\n"+e+"\n*/",n="\n\n<!-- \n"+e+"\n-->";return function(r){switch(r.substr(r.lastIndexOf("."))){case".html":return n;case".js":case".css":return t;case".md":return e}return""}}).directive("plnkrOpener",["$q","getExampleData","formPostData","createCopyrightNotice",function(e,t,n,r){return{scope:{},bindToController:{examplePath:"@"},controllerAs:"plnkr",template:'<button ng-click="plnkr.open($event)" class="btn pull-right"> <i class="glyphicon glyphicon-edit">&nbsp;</i> Edit in Plunker</button> ',controller:[function(){var o=this;o.example={path:o.examplePath,manifest:void 0,files:void 0,name:"AngularJS Example"},o.prepareExampleData=function(){return o.example.manifest?e.resolve(o.example):t(o.examplePath).then(function(e){o.example.files=e.files,o.example.manifest=e.manifest;var t=e.manifest.name.split("-");return t.unshift("AngularJS"),angular.forEach(t,function(e,n){t[n]=e.charAt(0).toUpperCase()+e.substr(1)}),o.example.name=t.join(" - "),o.example})},o.open=function(e){var t=e.ctrlKey||e.metaKey,a={"tags[0]":"angularjs","tags[1]":"example","private":!0};o.prepareExampleData().then(function(){angular.forEach(o.example.files,function(e){a["files["+e.name+"]"]=e.content+r(e.name)}),a.description=o.example.name,n("https://plnkr.co/edit/?p=preview",t,a)})},o.$onInit=function(){o.prepareExampleData(o.example.path)}}]}}]).factory("getExampleData",["$http","$q",function(e,t){return function(n){return e.get(n+"/manifest.json").then(function(e){return e.data}).then(function(r){var o=[];return angular.forEach(r.files,function(t){o.push(e.get(n+"/"+t,{transformResponse:[]}).then(function(e){return"index-production.html"===t&&(t="index.html"),{name:t,content:e.data}}))}),t.all({manifest:r,files:t.all(o)})})}}]),angular.module("search",[]).controller("DocsSearchCtrl",["$scope","$location","docsSearch",function(e,t,n){function r(){e.results=[],e.colClassName=null,e.hasResults=!1}e.search=function(t){var o=2;t.length>=o?n(t).then(function(t){var n={api:[],guide:[],tutorial:[],error:[],misc:[]};angular.forEach(t,function(e){var t=e.area,r="api"===t?40:14;n[t]=n[t]||[],n[t].length<r&&n[t].push(e)});var r=Object.keys(n).length;r>0&&(e.colClassName="cols-"+r),e.hasResults=r>0,e.results=n}):r(),e.$$phase||e.$apply()},e.submit=function(){var n;if(e.results.api)n=e.results.api[0];else for(var r in e.results)if(n=e.results[r][0])break;n&&(t.path(n.path),e.hideResults())},e.hideResults=function(){r(),e.q=""},e.handleResultClicked=function(t){1!==t.which||t.ctrlKey||t.metaKey||e.hideResults()}}]).controller("Error404SearchCtrl",["$scope","$location","docsSearch",function(e,t,n){n(t.path().split(/[\/.:]/).pop()).then(function(t){e.results={},angular.forEach(t,function(t){var n=e.results[t.area]||[];n.push(t),e.results[t.area]=n})})}]).provider("docsSearch",function(){function e(e,t,n){window.console&&window.console.log&&window.console.log("Using Local Search Index");var r=lunr(function(){this.ref("path"),this.field("titleWords",{boost:50}),this.field("members",{boost:40}),this.field("keywords",{boost:20})}),o=e.get("js/search-data.json").then(function(e){var n=e.data;return t(function(){angular.forEach(n,function(e){r.add(e)})},500)});return function(e){return o.then(function(){var t=r.search(e),o=[];return angular.forEach(t,function(e){o.push(n[e.ref])}),o})}}function t(e,t,n){window.console&&window.console.log&&window.console.log("Using WebWorker Search Index");var r,o=e.defer(),a=new window.Worker("js/search-worker.js");return a.onmessage=function(e){t.$apply(function(){switch(e.data.e){case"index-ready":o.resolve();break;case"query-ready":var t=e.data.d.map(function(e){return n[e]});r.resolve(t)}})},function(t){return o.promise.then(function(){return r=e.defer(),a.postMessage({q:t}),r.promise})}}return e.$inject=["$http","$timeout","NG_PAGES"],t.$inject=["$q","$rootScope","NG_PAGES"],{$get:window.Worker?t:e}}).directive("focused",function(e){return function(t,n,r){n[0].focus(),n.on("focus",function(){t.$apply(r.focused+"=true")}),n.on("blur",function(){e(function(){t.$eval(r.focused+"=false")})}),t.$eval(r.focused+"=true")}}).directive("docsSearchInput",["$document",function(e){return function(t,n,r){var o=27,a=191;angular.element(e[0].body).on("keydown",function(t){var r=n[0];t.keyCode===a&&e[0].activeElement!==r&&(t.stopPropagation(),t.preventDefault(),r.focus())}),n.on("keydown",function(e){e.keyCode===o&&(e.stopPropagation(),e.preventDefault(),t.$apply(function(){t.hideResults()}))})}}]),angular.module("tutorials",[]).directive("docTutorialNav",function(){var e=["","step_00","step_01","step_02","step_03","step_04","step_05","step_06","step_07","step_08","step_09","step_10","step_11","step_12","step_13","step_14","the_end"];return{scope:{},template:'<a ng-href="tutorial/{{prev}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-step-backward"></i> Previous</li></a>\n<a ng-href="http://angular.github.io/angular-phonecat/step-{{seq}}/app"><li class="btn btn-primary"><i class="glyphicon glyphicon-play"></i> Live Demo</li></a>\n<a ng-href="https://github.com/angular/angular-phonecat/compare/step-{{diffLo}}...step-{{diffHi}}"><li class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> Code Diff</li></a>\n<a ng-href="tutorial/{{next}}"><li class="btn btn-primary">Next <i class="glyphicon glyphicon-step-forward"></i></li></a>',link:function(t,n,r){var o=1*r.docTutorialNav;t.seq=o,t.prev=e[o],t.next=e[2+o],t.diffLo=o?o-1:"0~1",t.diffHi=o,n.addClass("btn-group"),n.addClass("tutorial-nav")}}}).directive("docTutorialReset",function(){return{scope:{step:"@docTutorialReset"},template:'<p><button class="btn" ng-click="show=!show">Workspace Reset Instructions  ➤</button></p>\n<div class="alert alert-info" ng-show="show">\n  <p>Reset the workspace to step {{step}}.</p>  <p><pre>git checkout -f step-{{step}}</pre></p>\n  <p>Refresh your browser or check out this step online: <a href="http://angular.github.io/angular-phonecat/step-{{step}}/app">Step {{step}} Live Demo</a>.</p>\n</div>\n<p>The most important changes are listed below. You can see the full diff on <a ng-href="https://github.com/angular/angular-phonecat/compare/step-{{step ? (step - 1): \'0~1\'}}...step-{{step}}" title="See diff on Github">GitHub</a>.\n</p>'}}),angular.module("versions",["currentVersionData","allVersionsData"]).directive("versionPicker",function(){function e(e,t){for(var n=0,r=e.length;n<r;++n)if(t(e[n]))return e[n]}return{restrict:"E",scope:!0,controllerAs:"$ctrl",controller:["$location","$window","CURRENT_NG_VERSION","ALL_NG_VERSIONS",function(t,n,r,o){var a=r.version;r.isSnapshot&&(a="latest"===r.distTag?"snapshot-stable":"snapshot"),this.versions=o,this.selectedVersion=e(o,function(e){return e.version.version===a}),this.jumpToDocsVersion=function(e){var r=t.path().replace(/\/$/,"");n.location=e.docsUrl+r}}],template:'<div class="picker version-picker">  <select ng-options="v as v.label group by v.group for v in $ctrl.versions"          ng-model="$ctrl.selectedVersion"          ng-change="$ctrl.jumpToDocsVersion($ctrl.selectedVersion)"          class="docs-version-jump">  </select></div>'}});
  //# sourceMappingURL=docs.min.js.map
  