tablo_connect 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +22 -0
  3. data/README.md +43 -0
  4. data/Rakefile +26 -0
  5. data/app/assets/fonts/tablo_connect/bootstrap/glyphicons-halflings-regular.eot +0 -0
  6. data/app/assets/fonts/tablo_connect/bootstrap/glyphicons-halflings-regular.svg +288 -0
  7. data/app/assets/fonts/tablo_connect/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  8. data/app/assets/fonts/tablo_connect/bootstrap/glyphicons-halflings-regular.woff +0 -0
  9. data/app/assets/fonts/tablo_connect/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
  10. data/app/assets/javascripts/tablo_connect/angular/angular-animate.js +3928 -0
  11. data/app/assets/javascripts/tablo_connect/angular/angular-animate.min.js +56 -0
  12. data/app/assets/javascripts/tablo_connect/angular/angular-animate.min.js.map +8 -0
  13. data/app/assets/javascripts/tablo_connect/angular/angular-aria.js +397 -0
  14. data/app/assets/javascripts/tablo_connect/angular/angular-aria.min.js +14 -0
  15. data/app/assets/javascripts/tablo_connect/angular/angular-aria.min.js.map +8 -0
  16. data/app/assets/javascripts/tablo_connect/angular/angular-cookies.js +321 -0
  17. data/app/assets/javascripts/tablo_connect/angular/angular-cookies.min.js +9 -0
  18. data/app/assets/javascripts/tablo_connect/angular/angular-cookies.min.js.map +8 -0
  19. data/app/assets/javascripts/tablo_connect/angular/angular-csp.css +21 -0
  20. data/app/assets/javascripts/tablo_connect/angular/angular-loader.js +443 -0
  21. data/app/assets/javascripts/tablo_connect/angular/angular-loader.min.js +10 -0
  22. data/app/assets/javascripts/tablo_connect/angular/angular-loader.min.js.map +8 -0
  23. data/app/assets/javascripts/tablo_connect/angular/angular-message-format.js +980 -0
  24. data/app/assets/javascripts/tablo_connect/angular/angular-message-format.min.js +26 -0
  25. data/app/assets/javascripts/tablo_connect/angular/angular-message-format.min.js.map +8 -0
  26. data/app/assets/javascripts/tablo_connect/angular/angular-messages.js +685 -0
  27. data/app/assets/javascripts/tablo_connect/angular/angular-messages.min.js +12 -0
  28. data/app/assets/javascripts/tablo_connect/angular/angular-messages.min.js.map +8 -0
  29. data/app/assets/javascripts/tablo_connect/angular/angular-mocks.js +2470 -0
  30. data/app/assets/javascripts/tablo_connect/angular/angular-resource.js +675 -0
  31. data/app/assets/javascripts/tablo_connect/angular/angular-resource.min.js +13 -0
  32. data/app/assets/javascripts/tablo_connect/angular/angular-resource.min.js.map +8 -0
  33. data/app/assets/javascripts/tablo_connect/angular/angular-route.js +991 -0
  34. data/app/assets/javascripts/tablo_connect/angular/angular-route.min.js +15 -0
  35. data/app/assets/javascripts/tablo_connect/angular/angular-route.min.js.map +8 -0
  36. data/app/assets/javascripts/tablo_connect/angular/angular-sanitize.js +683 -0
  37. data/app/assets/javascripts/tablo_connect/angular/angular-sanitize.min.js +16 -0
  38. data/app/assets/javascripts/tablo_connect/angular/angular-sanitize.min.js.map +8 -0
  39. data/app/assets/javascripts/tablo_connect/angular/angular-scenario.js +40324 -0
  40. data/app/assets/javascripts/tablo_connect/angular/angular-touch.js +628 -0
  41. data/app/assets/javascripts/tablo_connect/angular/angular-touch.min.js +13 -0
  42. data/app/assets/javascripts/tablo_connect/angular/angular-touch.min.js.map +8 -0
  43. data/app/assets/javascripts/tablo_connect/angular/angular-ui-router.js +4370 -0
  44. data/app/assets/javascripts/tablo_connect/angular/angular.js +28904 -0
  45. data/app/assets/javascripts/tablo_connect/angular/angular.min.js +294 -0
  46. data/app/assets/javascripts/tablo_connect/angular/angular.min.js.map +8 -0
  47. data/app/assets/javascripts/tablo_connect/angular/errors.json +1 -0
  48. data/app/assets/javascripts/tablo_connect/angular/version.json +1 -0
  49. data/app/assets/javascripts/tablo_connect/angular/version.txt +1 -0
  50. data/app/assets/javascripts/tablo_connect/application.js +21 -0
  51. data/app/assets/javascripts/tablo_connect/bootstrap/affix.js +162 -0
  52. data/app/assets/javascripts/tablo_connect/bootstrap/alert.js +94 -0
  53. data/app/assets/javascripts/tablo_connect/bootstrap/button.js +120 -0
  54. data/app/assets/javascripts/tablo_connect/bootstrap/carousel.js +237 -0
  55. data/app/assets/javascripts/tablo_connect/bootstrap/collapse.js +211 -0
  56. data/app/assets/javascripts/tablo_connect/bootstrap/dropdown.js +165 -0
  57. data/app/assets/javascripts/tablo_connect/bootstrap/modal.js +337 -0
  58. data/app/assets/javascripts/tablo_connect/bootstrap/popover.js +108 -0
  59. data/app/assets/javascripts/tablo_connect/bootstrap/scrollspy.js +172 -0
  60. data/app/assets/javascripts/tablo_connect/bootstrap/tab.js +155 -0
  61. data/app/assets/javascripts/tablo_connect/bootstrap/tooltip.js +514 -0
  62. data/app/assets/javascripts/tablo_connect/bootstrap/transition.js +59 -0
  63. data/app/assets/javascripts/tablo_connect/jquery/jquery.js +9210 -0
  64. data/app/assets/javascripts/tablo_connect/ng_app/app.js +39 -0
  65. data/app/assets/javascripts/tablo_connect/ng_app/controllers/episodes_controller.js +17 -0
  66. data/app/assets/javascripts/tablo_connect/ng_app/controllers/home_controller.js +9 -0
  67. data/app/assets/javascripts/tablo_connect/ng_app/controllers/movies_controller.js +17 -0
  68. data/app/assets/javascripts/tablo_connect/ng_app/controllers/shows_controller.js +9 -0
  69. data/app/assets/javascripts/tablo_connect/ng_app/filters/titleize_filter.js +17 -0
  70. data/app/assets/javascripts/tablo_connect/ng_app/filters/url_filter.js +19 -0
  71. data/app/assets/javascripts/tablo_connect/ng_app/modules/alerts/alerts.js +9 -0
  72. data/app/assets/javascripts/tablo_connect/ng_app/modules/alerts/directives/alerts_directive.js +19 -0
  73. data/app/assets/javascripts/tablo_connect/ng_app/modules/alerts/services/alerts_service.js +22 -0
  74. data/app/assets/javascripts/tablo_connect/ng_app/modules/alerts/templates/alerts.html +6 -0
  75. data/app/assets/javascripts/tablo_connect/ng_app/modules/tablo_sync/directives/tablo_sync_directive.js +31 -0
  76. data/app/assets/javascripts/tablo_connect/ng_app/modules/tablo_sync/services/tablo_sync_service.js +20 -0
  77. data/app/assets/javascripts/tablo_connect/ng_app/modules/tablo_sync/tablo_sync.js +9 -0
  78. data/app/assets/javascripts/tablo_connect/ng_app/modules/tablo_sync/templates/tablo_sync.html +4 -0
  79. data/app/assets/javascripts/tablo_connect/ng_app/services/tablo_service.js +98 -0
  80. data/app/assets/javascripts/tablo_connect/ng_app/templates/episodes.html +36 -0
  81. data/app/assets/javascripts/tablo_connect/ng_app/templates/index.html +3 -0
  82. data/app/assets/javascripts/tablo_connect/ng_app/templates/movies.html +33 -0
  83. data/app/assets/javascripts/tablo_connect/ng_app/templates/shows.html +13 -0
  84. data/app/assets/stylesheets/tablo_connect/_bootstrap.scss +56 -0
  85. data/app/assets/stylesheets/tablo_connect/_global.scss +19 -0
  86. data/app/assets/stylesheets/tablo_connect/_movies.scss +0 -0
  87. data/app/assets/stylesheets/tablo_connect/_shows.scss +30 -0
  88. data/app/assets/stylesheets/tablo_connect/application.scss +18 -0
  89. data/app/assets/stylesheets/tablo_connect/bootstrap/_alerts.scss +73 -0
  90. data/app/assets/stylesheets/tablo_connect/bootstrap/_badges.scss +68 -0
  91. data/app/assets/stylesheets/tablo_connect/bootstrap/_breadcrumbs.scss +26 -0
  92. data/app/assets/stylesheets/tablo_connect/bootstrap/_button-groups.scss +244 -0
  93. data/app/assets/stylesheets/tablo_connect/bootstrap/_buttons.scss +168 -0
  94. data/app/assets/stylesheets/tablo_connect/bootstrap/_carousel.scss +269 -0
  95. data/app/assets/stylesheets/tablo_connect/bootstrap/_close.scss +36 -0
  96. data/app/assets/stylesheets/tablo_connect/bootstrap/_code.scss +69 -0
  97. data/app/assets/stylesheets/tablo_connect/bootstrap/_component-animations.scss +37 -0
  98. data/app/assets/stylesheets/tablo_connect/bootstrap/_dropdowns.scss +216 -0
  99. data/app/assets/stylesheets/tablo_connect/bootstrap/_forms.scss +611 -0
  100. data/app/assets/stylesheets/tablo_connect/bootstrap/_glyphicons.scss +307 -0
  101. data/app/assets/stylesheets/tablo_connect/bootstrap/_grid.scss +84 -0
  102. data/app/assets/stylesheets/tablo_connect/bootstrap/_input-groups.scss +167 -0
  103. data/app/assets/stylesheets/tablo_connect/bootstrap/_jumbotron.scss +52 -0
  104. data/app/assets/stylesheets/tablo_connect/bootstrap/_labels.scss +66 -0
  105. data/app/assets/stylesheets/tablo_connect/bootstrap/_list-group.scss +130 -0
  106. data/app/assets/stylesheets/tablo_connect/bootstrap/_media.scss +66 -0
  107. data/app/assets/stylesheets/tablo_connect/bootstrap/_mixins.scss +40 -0
  108. data/app/assets/stylesheets/tablo_connect/bootstrap/_modals.scss +150 -0
  109. data/app/assets/stylesheets/tablo_connect/bootstrap/_navbar.scss +662 -0
  110. data/app/assets/stylesheets/tablo_connect/bootstrap/_navs.scss +242 -0
  111. data/app/assets/stylesheets/tablo_connect/bootstrap/_normalize.scss +424 -0
  112. data/app/assets/stylesheets/tablo_connect/bootstrap/_pager.scss +54 -0
  113. data/app/assets/stylesheets/tablo_connect/bootstrap/_pagination.scss +89 -0
  114. data/app/assets/stylesheets/tablo_connect/bootstrap/_panels.scss +271 -0
  115. data/app/assets/stylesheets/tablo_connect/bootstrap/_popovers.scss +131 -0
  116. data/app/assets/stylesheets/tablo_connect/bootstrap/_print.scss +101 -0
  117. data/app/assets/stylesheets/tablo_connect/bootstrap/_progress-bars.scss +87 -0
  118. data/app/assets/stylesheets/tablo_connect/bootstrap/_responsive-embed.scss +35 -0
  119. data/app/assets/stylesheets/tablo_connect/bootstrap/_responsive-utilities.scss +179 -0
  120. data/app/assets/stylesheets/tablo_connect/bootstrap/_scaffolding.scss +161 -0
  121. data/app/assets/stylesheets/tablo_connect/bootstrap/_tables.scss +234 -0
  122. data/app/assets/stylesheets/tablo_connect/bootstrap/_theme.scss +291 -0
  123. data/app/assets/stylesheets/tablo_connect/bootstrap/_thumbnails.scss +38 -0
  124. data/app/assets/stylesheets/tablo_connect/bootstrap/_tooltip.scss +101 -0
  125. data/app/assets/stylesheets/tablo_connect/bootstrap/_type.scss +298 -0
  126. data/app/assets/stylesheets/tablo_connect/bootstrap/_utilities.scss +55 -0
  127. data/app/assets/stylesheets/tablo_connect/bootstrap/_variables.scss +872 -0
  128. data/app/assets/stylesheets/tablo_connect/bootstrap/_wells.scss +29 -0
  129. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_alerts.scss +14 -0
  130. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_background-variant.scss +12 -0
  131. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_border-radius.scss +18 -0
  132. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_buttons.scss +68 -0
  133. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_center-block.scss +7 -0
  134. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_clearfix.scss +22 -0
  135. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_forms.scss +88 -0
  136. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_gradients.scss +58 -0
  137. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_grid-framework.scss +81 -0
  138. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_grid.scss +122 -0
  139. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_hide-text.scss +21 -0
  140. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_image.scss +33 -0
  141. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_labels.scss +12 -0
  142. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_list-group.scss +32 -0
  143. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_nav-divider.scss +10 -0
  144. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  145. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_opacity.scss +8 -0
  146. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_pagination.scss +24 -0
  147. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_panels.scss +24 -0
  148. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_progress-bar.scss +10 -0
  149. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_reset-filter.scss +8 -0
  150. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_reset-text.scss +18 -0
  151. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_resize.scss +6 -0
  152. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_responsive-visibility.scss +21 -0
  153. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_size.scss +10 -0
  154. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_tab-focus.scss +9 -0
  155. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_table-row.scss +28 -0
  156. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_text-emphasis.scss +12 -0
  157. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_text-overflow.scss +8 -0
  158. data/app/assets/stylesheets/tablo_connect/bootstrap/mixins/_vendor-prefixes.scss +222 -0
  159. data/app/controllers/tablo_connect/application_controller.rb +4 -0
  160. data/app/controllers/tablo_connect/copy_controller.rb +75 -0
  161. data/app/controllers/tablo_connect/home_controller.rb +6 -0
  162. data/app/controllers/tablo_connect/movies_controller.rb +9 -0
  163. data/app/controllers/tablo_connect/shows_controller.rb +11 -0
  164. data/app/controllers/tablo_connect/sync_controller.rb +73 -0
  165. data/app/helpers/tablo_connect/application_helper.rb +4 -0
  166. data/app/helpers/tablo_connect/movies_helper.rb +4 -0
  167. data/app/helpers/tablo_connect/shows_helper.rb +4 -0
  168. data/app/models/tablo_connect/movie.rb +14 -0
  169. data/app/models/tablo_connect/show.rb +23 -0
  170. data/app/views/layouts/tablo_connect/_header.html.erb +20 -0
  171. data/app/views/layouts/tablo_connect/application.html.erb +19 -0
  172. data/app/views/tablo_connect/home/index.html.erb +1 -0
  173. data/config/routes.rb +10 -0
  174. data/db/migrate/20151101164611_create_tablo_connect_movies.rb +18 -0
  175. data/db/migrate/20151101165020_create_tablo_connect_shows.rb +21 -0
  176. data/lib/tablo_connect.rb +7 -0
  177. data/lib/tablo_connect/engine.rb +28 -0
  178. data/lib/tablo_connect/version.rb +3 -0
  179. data/lib/tasks/tablo_connect_tasks.rake +4 -0
  180. data/spec/controllers/tablo_connect/copy_controller_spec.rb +244 -0
  181. data/spec/controllers/tablo_connect/movies_controller_spec.rb +27 -0
  182. data/spec/controllers/tablo_connect/shows_controller_spec.rb +45 -0
  183. data/spec/controllers/tablo_connect/sync_controller_spec.rb +209 -0
  184. data/spec/factories/tablo_connect_movies.rb +11 -0
  185. data/spec/factories/tablo_connect_shows.rb +15 -0
  186. data/spec/javascript/angular-environment.js +1 -0
  187. data/spec/javascript/karma.conf.js +48 -0
  188. data/spec/javascript/unit/controllers/episodes_controller_spec.js +49 -0
  189. data/spec/javascript/unit/controllers/home_controller_spec.js +34 -0
  190. data/spec/javascript/unit/controllers/movies_controller_spec.js +55 -0
  191. data/spec/javascript/unit/controllers/shows_controller_spec.js +33 -0
  192. data/spec/javascript/unit/filters/titleize_filter_spec.js +25 -0
  193. data/spec/javascript/unit/filters/url_filter_spec.js +33 -0
  194. data/spec/javascript/unit/modules/alerts/directives/alerts_directive_spec.js +39 -0
  195. data/spec/javascript/unit/modules/alerts/services/alerts_service_spec.js +51 -0
  196. data/spec/javascript/unit/modules/tablo_sync/directives/tablo_sync_directive_spec.js +68 -0
  197. data/spec/javascript/unit/modules/tablo_sync/services/tablo_sync_service_spec.js +26 -0
  198. data/spec/javascript/unit/services/tablo_service_spec.js +28 -0
  199. data/spec/models/tablo_connect/movie_spec.rb +32 -0
  200. data/spec/models/tablo_connect/show_spec.rb +65 -0
  201. data/spec/spec_helper.rb +86 -0
  202. data/spec/test_app/README.rdoc +28 -0
  203. data/spec/test_app/Rakefile +6 -0
  204. data/spec/test_app/app/assets/javascripts/application.js +13 -0
  205. data/spec/test_app/app/assets/stylesheets/application.css +15 -0
  206. data/spec/test_app/app/controllers/application_controller.rb +5 -0
  207. data/spec/test_app/app/helpers/application_helper.rb +2 -0
  208. data/spec/test_app/app/views/layouts/application.html.erb +14 -0
  209. data/spec/test_app/bin/bundle +3 -0
  210. data/spec/test_app/bin/rails +4 -0
  211. data/spec/test_app/bin/rake +4 -0
  212. data/spec/test_app/bin/setup +29 -0
  213. data/spec/test_app/config.ru +4 -0
  214. data/spec/test_app/config/application.rb +32 -0
  215. data/spec/test_app/config/boot.rb +5 -0
  216. data/spec/test_app/config/database.yml +25 -0
  217. data/spec/test_app/config/environment.rb +5 -0
  218. data/spec/test_app/config/environments/development.rb +41 -0
  219. data/spec/test_app/config/environments/production.rb +79 -0
  220. data/spec/test_app/config/environments/test.rb +42 -0
  221. data/spec/test_app/config/initializers/assets.rb +11 -0
  222. data/spec/test_app/config/initializers/backtrace_silencers.rb +7 -0
  223. data/spec/test_app/config/initializers/cookies_serializer.rb +3 -0
  224. data/spec/test_app/config/initializers/filter_parameter_logging.rb +4 -0
  225. data/spec/test_app/config/initializers/inflections.rb +16 -0
  226. data/spec/test_app/config/initializers/mime_types.rb +4 -0
  227. data/spec/test_app/config/initializers/session_store.rb +3 -0
  228. data/spec/test_app/config/initializers/wrap_parameters.rb +14 -0
  229. data/spec/test_app/config/locales/en.yml +23 -0
  230. data/spec/test_app/config/routes.rb +4 -0
  231. data/spec/test_app/config/secrets.yml +22 -0
  232. data/spec/test_app/db/schema.rb +49 -0
  233. data/spec/test_app/db/test.sqlite3 +0 -0
  234. data/spec/test_app/log/test.log +5561 -0
  235. data/spec/test_app/public/404.html +67 -0
  236. data/spec/test_app/public/422.html +67 -0
  237. data/spec/test_app/public/500.html +66 -0
  238. data/spec/test_app/public/favicon.ico +0 -0
  239. metadata +550 -0
@@ -0,0 +1,26 @@
1
+ /*
2
+ AngularJS v1.4.7
3
+ (c) 2010-2015 Google, Inc. http://angularjs.org
4
+ License: MIT
5
+ */
6
+ (function(h){'use strict';function C(a){if(null==a)return"";switch(typeof a){case "string":return a;case "number":return""+a;default:return D(a)}}function f(a,b){for(var d=a.split(/\n/g),k=0;k<d.length;k++){var c=d[k];if(b>=c.length)b-=c.length;else return{h:k+1,f:b+1}}}function t(a){function b(){return a}var d=u[a];if(null!=d)return d;b.$$watchDelegate=function(b,d,c){var e=b.$watch(v,function(){m(d)&&d.call(null,a,a,b);e()},c);return e};u[a]=b;b.exp=a;b.expressions=[];return b}function F(a,b){function d(a){return void 0==
7
+ a?a:a-b}function c(b){return d(a(b))}if(0===b)return a;var e;c.$$watchDelegate=function(b,c,k){return e=b.$watch(a,function(a,k){m(c)&&c.call(null,d(a),d(k),b)},k)};return c}function l(a,b){var d=this;this.b=a;this.e=b;if(void 0===b.other)throw e("reqother");this.d=function(a){return d.D(a)};this.d.$$watchDelegate=function(a,b,c){return d.P(a,b,c)};this.d.exp=a.exp;this.d.expressions=a.expressions}function n(a,b,d,c){var e=this;this.scope=b;this.oa=a;this.v=d;this.qa=c;this.U=void 0;this.K=v;this.ka=
8
+ b.$watch(a.b,function(a){return e.ja(a)},c)}function p(a,b){l.call(this,a,b)}function w(){}function q(a,b,d,c){l.call(this,a,b);this.offset=d;this.M=c}function x(){}function g(a,b){this.u=a;this.B=b;this.i=[];this.g=[];this.J=[];this.s="";this.q=null}function r(a,b,d){this.c=a;this.scope=b;this.W=void 0;this.v=d;var c=this;this.la=b.$watchGroup(a.g,function(a,b){c.Ea(a,b)})}function s(a,b){b.b=a.b;b.C=a.C;b.w=a.w;b.e=a.e;b.k=a.k;b.c=a.c;b.n=a.n;b.F=a.F;b.l=a.l}function y(a){s(a,this)}function c(a,
9
+ b,d,c,e,E,f,g){this.text=a;this.index=b||0;this.A=d;this.M=c;this.Da=e;this.pa=!!E;this.u=f;this.B=!!g;this.F=this.c=this.k=this.e=this.w=this.C=this.b=null;this.L=[];this.G=this.j=this.ca=this.O=this.da=this.l=this.n=this.o=this.a=this.d=null}function z(a){switch(a){case "{":return"}";case "[":return"]";case "(":return")";default:return null}}function G(a){switch(a){case "}":return"{";case "]":return"[";case ")":return"(";default:return null}}var e=h.angular.$interpolateMinErr,v=h.angular.noop,m=
10
+ h.angular.isFunction,D=h.angular.toJson,u=Object.create(null);l.prototype.T=function(a){return this.e[this.R(a)]};l.prototype.D=function(a){return this.T(this.b(a))(a)};l.prototype.P=function(a,b,d){var c=new n(this,a,b,d);return function(){c.I()}};n.prototype.ja=function(a){var b=this;this.K();a=this.oa.T(a);this.K=this.scope.$watch(a,function(a,c){return b.na(a,c)},this.qa)};n.prototype.na=function(a,b){m(this.v)&&this.v.call(null,a,a===b?a:this.U,this.scope);this.U=a};n.prototype.I=function(){this.ka();
11
+ this.K()};w.prototype=l.prototype;p.prototype=new w;p.prototype.R=function(a){return void 0!==this.e[a]?a:"other"};x.prototype=l.prototype;q.prototype=new x;q.prototype.R=function(a){if(isNaN(a))return"other";if(void 0!==this.e[a])return a;a=this.M(a-this.offset);return void 0!==this.e[a]?a:"other"};g.prototype.S=function(){this.s&&(null==this.q?this.i.push(this.s):(this.i.push(this.q.join("")),this.q=null),this.s="")};g.prototype.p=function(a){a.length&&(this.s?this.q?this.q.push(a):this.q=[this.s,
12
+ a]:this.s=a)};g.prototype.H=function(a){this.S();this.J.push(this.i.length);this.g.push(a);this.i.push("")};g.prototype.ma=function(a){for(var b=Array(this.g.length),d=0;d<this.g.length;d++)b[d]=this.g[d](a);return b};g.prototype.D=function(a){for(var b=0;b<this.J.length;b++){var d=a[b];if(this.B&&void 0===d)return;this.i[this.J[b]]=d}return this.i.join("")};g.prototype.ea=function(a,b){var d=this;this.S();if(!a||0!==this.g.length){if(0===this.i.length)return t("");this.u&&1<this.i.length&&e.throwNoconcat(b);
13
+ if(0===this.g.length)return 1!=this.i.length&&this.r(),t(this.i[0]);var c=function(a){return d.D(d.ma(a))};c.$$watchDelegate=function(a,b,c){return d.P(a,b,c)};c.exp=b;c.expressions=Array(this.g.length);for(var f=0;f<this.g.length;f++)c.expressions[f]=this.g[f].exp;return c}};g.prototype.P=function(a,b){var c=new r(this,a,b);return function(){c.I()}};r.prototype.Ea=function(a,b){var c=this.c.D(a);m(this.v)&&this.v.call(null,c,a===b?c:this.W,this.scope);this.W=c};r.prototype.I=function(){this.la()};
14
+ var H=new y(new c("",0,null,null,null,!1,null,!1));c.prototype.pushState=function(){this.L.push(new y(this));s(H,this)};c.prototype.V=function(){0===this.L.length&&this.r();var a=this.L.pop();s(a,this)};c.prototype.m=function(a,b){a.lastIndex=this.index;var c=a.exec(this.text);return null==c||!0!==b&&c.index!=this.index?null:(this.index=a.lastIndex,c)};c.prototype.t=function(a){return this.m(a,!0)};c.prototype.ha=function(a){return!!this.m(a)};c.prototype.Ba=function(a){this.o=[a];do{for(this.a=this.o.pop();this.a;)this.a();
15
+ this.ga(this.a)}while(0<this.o.length)};c.prototype.r=function(){throw e("logicbug",this.text);};c.prototype.ga=function(a){void 0===a&&this.r()};var I=/\s*(\w+)\s*/g;c.prototype.ia=function(){var a=this.m(I);if(null==a)throw a=f(this.text,this.index),e("reqarg",a.h,a.f,this.text);var b=a[1];if("select"==b||"plural"==b)throw a=f(this.text,this.index),e("reqcomma",b,a.h,a.f,this.text);a=f(this.text,this.index);throw e("unknarg",b,a.h,a.f,this.text);};c.prototype.Ca=function(a){this.da=a.index;this.O=
16
+ a[0];this.ca="'"==this.O?J:K;this.a=this.ua};var J=/\\(?:\\|'|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|'/g,K=/\\(?:\\|"|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|"/g;c.prototype.ua=function(){var a=this.t(this.ca);if(null==a)throw a=f(this.text,this.da),e("untermstr",a.h,a.f,this.text);a==this.O&&(this.a=null)};var L=/\s*(plural|select)\s*,\s*/g;c.prototype.ya=function(){var a=this.t(L);null==a&&this.ia();switch(a[1]){case "plural":this.a=this.za;break;case "select":this.a=
17
+ this.Aa;break;default:this.r()}};c.prototype.za=function(){this.e=Object.create(null);this.n=this.N;this.a=this.xa};c.prototype.Aa=function(){this.e=Object.create(null);this.a=this.n=this.ba};var A=/[0]|(?:[1-9][0-9]*)/g,M=new RegExp("\\s*offset\\s*:\\s*("+A.source+")","g");c.prototype.xa=function(){var a=this.m(M);this.w=null==a?0:parseInt(a[1],10);this.C=F(this.b,this.w);this.a=this.N};c.prototype.Q=function(a,b){if(void 0!==this.e[a]){var c=f(this.text,b);throw e("dupvalue",a,c.h,c.f,this.text);
18
+ }};var N=/\s*(\w+)/g;c.prototype.ba=function(){var a=this.m(N);null==a?(this.d=(new p(this.b,this.e)).d,this.a=null):(this.k=a[1],this.Q(this.k,a.index),this.a=this.aa)};var O=new RegExp("\\s*(?:(?:=("+A.source+"))|(\\w+))","g");c.prototype.N=function(){var a=this.m(O);null==a?(this.d=(new q(this.b,this.e,this.w,this.M)).d,this.a=null):(this.k=null!=a[1]?parseInt(a[1],10):a[2],this.Q(this.k,a.index),this.a=this.aa)};var P=/\s*{/g;c.prototype.aa=function(){if(!this.ha(P)){var a=f(this.text,this.index);
19
+ throw e("reqopenbrace",this.k,a.h,a.f,this.text);}this.F=this.index;this.c=new g(this.u,this.B);this.a=this.$};var Q=/\\.|{{|}/g,R=/\\.|{{|#|}/g,B=/\\.|{{/g;c.prototype.fa=function(){var a=this.index,b;if(null==this.n){if(b=this.t(B),null==b)return this.G=this.text.substring(a),this.index=this.text.length,null}else if(b=this.t(this.n==this.N?R:Q),null==b)throw a=f(this.text,this.F),e("reqendbrace",this.k,a.h,a.f,this.text);var c=b[0];this.G=this.text.substring(a,b.index);return c};c.prototype.$=function(){var a=
20
+ this.index,b=this.fa();null==b?(this.index=this.text.length,this.c.p(this.text.substring(a)),this.a=null):"\\"==b[0]?this.c.p(this.G+b[1]):(this.c.p(this.G),"{{"==b?(this.pushState(),this.o.push(this.ta),this.a=this.X):"}"==b?(this.e[this.k]=this.c.ea(!1,this.text),this.a=this.n):"#"==b?this.c.H(this.C):this.r())};c.prototype.va=function(){this.c=new g(this.u,this.B);this.a=this.Z};c.prototype.Z=function(){var a=this.index,b=this.t(B);if(null==b)this.index=this.text.length,this.c.p(this.text.substring(a)),
21
+ this.d=this.c.ea(this.pa,this.text),this.a=null;else{var c=b[0];"\\"==c[0]?this.c.p(this.text.substring(a,b.index)+c[1]):(this.c.p(this.text.substring(a,b.index)),this.pushState(),this.o.push(this.wa),this.a=this.X)}};c.prototype.wa=function(){var a=this.d;this.V();this.c.H(a);this.a=this.Z};c.prototype.X=function(){this.d=null;this.o.push(this.sa);this.a=this.ra};c.prototype.ta=function(){var a=this.d;this.V();this.c.H(a);this.a=this.$};var S=/\s*}}/g;c.prototype.sa=function(){if(null==this.m(S)){var a=
22
+ f(this.text,this.index);throw e("reqendinterp","}}",a.h,a.f,this.text);}null==this.d&&(this.d=this.A(this.b,this.Da),this.d.exp=this.b.exp,this.d.expressions=this.b.expressions);this.a=null};c.prototype.ra=function(){this.j=[];this.l=this.index;this.a=this.Y};var T=/[[\]{}()'",]/g;c.prototype.Y=function(){var a=this.t(T);if(null==a){if(0===this.j.length){this.index=this.text.length;this.b=this.A(this.text.substring(this.l,this.index));this.b.exp=this.text.substring(this.l,this.index);this.b.expressions=
23
+ this.b.expressions;this.a=null;return}throw e("badexpr",this.Ga(this.j[0]),this.text);}var b=a[0];if("'"==b||'"'==b)this.o.push(this.Y),this.Ca(a);else if(","==b){if(this.u)throw a=f(this.text,this.index),e("unsafe",this.u,a.h,a.f,this.text);0===this.j.length&&(this.b=this.A(this.text.substring(this.l,a.index)),this.b.exp=this.text.substring(this.l,a.index),this.b.expressions=this.b.expressions,this.a=null,this.a=this.ya)}else if(null!=z(b))this.j.unshift(b);else{var c=G(b);null==c&&this.r();if(0<
24
+ this.j.length){if(c==this.j[0]){this.j.shift();return}a=f(this.text,this.index);throw e("badexpr",b,a.h,a.f,z(this.j[0]),this.text);}this.index=a.index;this.b=this.A(this.text.substring(this.l,this.index));this.b.exp=this.text.substring(this.l,this.index);this.b.expressions=this.b.expressions;this.a=null}};var U=["$$messageFormat","$delegate",function(a,b){if("{{"!=b.startSymbol()||"}}"!=b.endSymbol())throw e("nochgmustache");var c=a.interpolate;c.startSymbol=b.startSymbol;c.endSymbol=b.endSymbol;
25
+ return c}];h=h.angular.module("ngMessageFormat",["ng"]);h.factory("$$messageFormat",["$parse","$locale","$sce","$exceptionHandler",function(a,b,d,f){function g(a,b,c){return function(g){try{return g=a?d.getTrusted(a,g):d.valueOf(g),b&&void 0===g?g:C(g)}catch(h){f(e.interr(c,h))}}}return{interpolate:function(d,e,f,h){d=new c(d,0,a,b.pluralCat,g(f,h,d),e,f,h);d.Ba(d.va);return d.d}}}]);h.config(["$provide",function(a){a.decorator("$interpolate",U)}])})(window,window.Fa);
26
+ //# sourceMappingURL=angular-message-format.min.js.map
@@ -0,0 +1,8 @@
1
+ {
2
+ "version":3,
3
+ "file":"angular-message-format.min.js",
4
+ "lineCount":25,
5
+ "mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAA6B,CAatCC,QAASA,EAAS,CAACC,CAAD,CAAQ,CACxB,GAAa,IAAb,EAAIA,CAAJ,CAA0C,MAAO,EACjD,QAAQ,MAAOA,EAAf,EACE,KAAK,QAAL,CAAmB,MAAOA,EAC1B,MAAK,QAAL,CAAmB,MAAO,EAAP,CAAYA,CAC/B,SAAmB,MAAOC,EAAA,CAAOD,CAAP,CAH5B,CAFwB,CAW1BE,QAASA,EAAoB,CAACC,CAAD,CAAOC,CAAP,CAAc,CAEzC,IADA,IAAIC,EAAQF,CAAAG,MAAA,CAAW,KAAX,CAAZ,CACSC,EAAE,CAAX,CAAcA,CAAd,CAAkBF,CAAAG,OAAlB,CAAgCD,CAAA,EAAhC,CAAqC,CACnC,IAAIE,EAAKJ,CAAA,CAAME,CAAN,CACT,IAAIH,CAAJ,EAAaK,CAAAD,OAAb,CACEJ,CAAA,EAASK,CAAAD,OADX,KAGE,OAAO,CAAEC,EAAMF,CAANE,CAAU,CAAZ,CAAeC,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AAA,CAAiB,CAAC,UAAD,CAAa,QAAQ,CAACO,CAAD,CAAW,CAC/CA,CAAA,UAAA,CAAsB,cAAtB,CAAsCX,CAAtC,CAD+C,CAAhC,CAAjB,CAz8BsC,CAArC,CAAD,CA88BGxO,MA98BH,CA88BWA,MAAAoP,GA98BX;",
6
+ "sources":["angular-message-format.js"],
7
+ "names":["window","stringify","value","toJson","indexToLineAndColumn","text","index","lines","split","i","length","line","column","parseTextLiteral","parsedFn","cachedFn","PARSE_CACHE_FOR_TEXT_LITERALS","scope","listener","objectEquality","unwatch","noop","textLiteralWatcher","isFunction","call","subtractOffset","expressionFn","offset","minusOffset","context","pluralExpressionWatchListener","newValue","oldValue","MessageSelectorBase","choices","self","$interpolateMinErr","this.parsedFn","getResult","watchDelegate","MessageSelectorWatchers","msgSelector","lastMessage","messageFnWatcher","expressionFnWatcher","expressionFnListener","SelectMessage","SelectMessageProto","PluralMessage","pluralCat","PluralMessageProto","InterpolationParts","trustedContext","allOrNothing","textParts","expressionFns","expressionIndices","partialText","concatParts","InterpolationPartsWatcher","interpolationParts","previousResult","expressionFnsWatcher","newExpressionValues","oldExpressionValues","watchListener","copyNestedParserState","src","dst","expressionMinusOffsetFn","pluralOffset","choiceKey","ruleChoiceKeyword","msgStartIndex","expressionStartIndex","NestedParserState","parser","MessageFormatParser","startIndex","$parse","stringifier","mustHaveExpression","nestedStateStack","textPart","angularOperatorStack","stringInterestsRe","stringQuote","stringStartIndex","ruleStack","rule","getEndOperator","opBegin","getBeginOperator","opEnd","Object","create","prototype","getMessageFn","MessageSelectorBase.prototype.getMessageFn","categorizeValue","MessageSelectorBase.prototype.getResult","MessageSelectorBase.prototype.watchDelegate","watchers","cancelWatch","MessageSelectorWatchers.prototype.expressionFnListener","messageFn","messageFnListener","newMessage","oldMessage","MessageSelectorWatchers.prototype.messageFnListener","MessageSelectorWatchers.prototype.cancelWatch","SelectMessage.prototype.categorizeValue","PluralMessage.prototype.categorizeValue","isNaN","category","flushPartialText","InterpolationParts.prototype.flushPartialText","push","join","addText","InterpolationParts.prototype.addText","addExpressionFn","InterpolationParts.prototype.addExpressionFn","getExpressionValues","InterpolationParts.prototype.getExpressionValues","expressionValues","Array","InterpolationParts.prototype.getResult","expressionValue","toParsedFn","InterpolationParts.prototype.toParsedFn","originalText","errorInParseLogic","InterpolationParts.prototype.watchDelegate","watcher","InterpolationPartsWatcher.prototype.watchListener","result","InterpolationPartsWatcher.prototype.cancelWatch","EMPTY_STATE","pushState","MessageFormatParser.prototype.pushState","popState","MessageFormatParser.prototype.popState","previousState","pop","matchRe","MessageFormatParser.prototype.matchRe","re","search","lastIndex","match","exec","searchRe","MessageFormatParser.prototype.searchRe","consumeRe","MessageFormatParser.prototype.consumeRe","run","MessageFormatParser.prototype.run","initialRule","assertRuleOrNull","MessageFormatParser.prototype.errorInParseLogic","MessageFormatParser.prototype.assertRuleOrNull","NEXT_WORD_RE","errorExpecting","MessageFormatParser.prototype.errorExpecting","position","word","startStringAtMatch","MessageFormatParser.prototype.startStringAtMatch","SQUOTED_STRING_INTEREST_RE","DQUOTED_STRING_INTEREST_RE","ruleInsideString","MessageFormatParser.prototype.ruleInsideString","PLURAL_OR_SELECT_ARG_TYPE_RE","rulePluralOrSelect","MessageFormatParser.prototype.rulePluralOrSelect","argType","rulePluralStyle","ruleSelectStyle","MessageFormatParser.prototype.rulePluralStyle","rulePluralValueOrKeyword","rulePluralOffset","MessageFormatParser.prototype.ruleSelectStyle","ruleSelectKeyword","NUMBER_RE","PLURAL_OFFSET_RE","RegExp","source","MessageFormatParser.prototype.rulePluralOffset","parseInt","assertChoiceKeyIsNew","MessageFormatParser.prototype.assertChoiceKeyIsNew","SELECT_KEYWORD","MessageFormatParser.prototype.ruleSelectKeyword","ruleMessageText","EXPLICIT_VALUE_OR_KEYWORD_RE","MessageFormatParser.prototype.rulePluralValueOrKeyword","BRACE_OPEN_RE","MessageFormatParser.prototype.ruleMessageText","ruleInInterpolationOrMessageText","INTERP_OR_END_MESSAGE_RE","INTERP_OR_PLURALVALUE_OR_END_MESSAGE_RE","ESCAPE_OR_MUSTACHE_BEGIN_RE","advanceInInterpolationOrMessageText","MessageFormatParser.prototype.advanceInInterpolationOrMessageText","currentIndex","substring","token","MessageFormatParser.prototype.ruleInInterpolationOrMessageText","ruleEndMustacheInInterpolationOrMessage","ruleEnteredMustache","ruleInterpolate","MessageFormatParser.prototype.ruleInterpolate","ruleInInterpolation","MessageFormatParser.prototype.ruleInInterpolation","ruleInterpolationEndMustache","MessageFormatParser.prototype.ruleInterpolationEndMustache","MessageFormatParser.prototype.ruleEnteredMustache","ruleEndMustache","ruleAngularExpression","MessageFormatParser.prototype.ruleEndMustacheInInterpolationOrMessage","INTERP_END_RE","MessageFormatParser.prototype.ruleEndMustache","MessageFormatParser.prototype.ruleAngularExpression","ruleInAngularExpression","INTERESTING_OPERATORS_RE","MessageFormatParser.prototype.ruleInAngularExpression","innermostOperator","operator","unshift","beginOperator","shift","$$interpolateDecorator","$$messageFormat","$interpolate","interpolate","module","$$MessageFormatFactory","$locale","$sce","$exceptionHandler","getStringifier","err","$provide","angular"]
8
+ }
@@ -0,0 +1,685 @@
1
+ /**
2
+ * @license AngularJS v1.4.7
3
+ * (c) 2010-2015 Google, Inc. http://angularjs.org
4
+ * License: MIT
5
+ */
6
+ (function(window, angular, undefined) {'use strict';
7
+
8
+ /* jshint ignore:start */
9
+ // this code is in the core, but not in angular-messages.js
10
+ var isArray = angular.isArray;
11
+ var forEach = angular.forEach;
12
+ var isString = angular.isString;
13
+ var jqLite = angular.element;
14
+ /* jshint ignore:end */
15
+
16
+ /**
17
+ * @ngdoc module
18
+ * @name ngMessages
19
+ * @description
20
+ *
21
+ * The `ngMessages` module provides enhanced support for displaying messages within templates
22
+ * (typically within forms or when rendering message objects that return key/value data).
23
+ * Instead of relying on JavaScript code and/or complex ng-if statements within your form template to
24
+ * show and hide error messages specific to the state of an input field, the `ngMessages` and
25
+ * `ngMessage` directives are designed to handle the complexity, inheritance and priority
26
+ * sequencing based on the order of how the messages are defined in the template.
27
+ *
28
+ * Currently, the ngMessages module only contains the code for the `ngMessages`, `ngMessagesInclude`
29
+ * `ngMessage` and `ngMessageExp` directives.
30
+ *
31
+ * # Usage
32
+ * The `ngMessages` directive listens on a key/value collection which is set on the ngMessages attribute.
33
+ * Since the {@link ngModel ngModel} directive exposes an `$error` object, this error object can be
34
+ * used with `ngMessages` to display control error messages in an easier way than with just regular angular
35
+ * template directives.
36
+ *
37
+ * ```html
38
+ * <form name="myForm">
39
+ * <label>
40
+ * Enter text:
41
+ * <input type="text" ng-model="field" name="myField" required minlength="5" />
42
+ * </label>
43
+ * <div ng-messages="myForm.myField.$error" role="alert">
44
+ * <div ng-message="required">You did not enter a field</div>
45
+ * <div ng-message="minlength, maxlength">
46
+ * Your email must be between 5 and 100 characters long
47
+ * </div>
48
+ * </div>
49
+ * </form>
50
+ * ```
51
+ *
52
+ * Now whatever key/value entries are present within the provided object (in this case `$error`) then
53
+ * the ngMessages directive will render the inner first ngMessage directive (depending if the key values
54
+ * match the attribute value present on each ngMessage directive). In other words, if your errors
55
+ * object contains the following data:
56
+ *
57
+ * ```javascript
58
+ * <!-- keep in mind that ngModel automatically sets these error flags -->
59
+ * myField.$error = { minlength : true, required : true };
60
+ * ```
61
+ *
62
+ * Then the `required` message will be displayed first. When required is false then the `minlength` message
63
+ * will be displayed right after (since these messages are ordered this way in the template HTML code).
64
+ * The prioritization of each message is determined by what order they're present in the DOM.
65
+ * Therefore, instead of having custom JavaScript code determine the priority of what errors are
66
+ * present before others, the presentation of the errors are handled within the template.
67
+ *
68
+ * By default, ngMessages will only display one error at a time. However, if you wish to display all
69
+ * messages then the `ng-messages-multiple` attribute flag can be used on the element containing the
70
+ * ngMessages directive to make this happen.
71
+ *
72
+ * ```html
73
+ * <!-- attribute-style usage -->
74
+ * <div ng-messages="myForm.myField.$error" ng-messages-multiple>...</div>
75
+ *
76
+ * <!-- element-style usage -->
77
+ * <ng-messages for="myForm.myField.$error" multiple>...</ng-messages>
78
+ * ```
79
+ *
80
+ * ## Reusing and Overriding Messages
81
+ * In addition to prioritization, ngMessages also allows for including messages from a remote or an inline
82
+ * template. This allows for generic collection of messages to be reused across multiple parts of an
83
+ * application.
84
+ *
85
+ * ```html
86
+ * <script type="text/ng-template" id="error-messages">
87
+ * <div ng-message="required">This field is required</div>
88
+ * <div ng-message="minlength">This field is too short</div>
89
+ * </script>
90
+ *
91
+ * <div ng-messages="myForm.myField.$error" role="alert">
92
+ * <div ng-messages-include="error-messages"></div>
93
+ * </div>
94
+ * ```
95
+ *
96
+ * However, including generic messages may not be useful enough to match all input fields, therefore,
97
+ * `ngMessages` provides the ability to override messages defined in the remote template by redefining
98
+ * them within the directive container.
99
+ *
100
+ * ```html
101
+ * <!-- a generic template of error messages known as "my-custom-messages" -->
102
+ * <script type="text/ng-template" id="my-custom-messages">
103
+ * <div ng-message="required">This field is required</div>
104
+ * <div ng-message="minlength">This field is too short</div>
105
+ * </script>
106
+ *
107
+ * <form name="myForm">
108
+ * <label>
109
+ * Email address
110
+ * <input type="email"
111
+ * id="email"
112
+ * name="myEmail"
113
+ * ng-model="email"
114
+ * minlength="5"
115
+ * required />
116
+ * </label>
117
+ * <!-- any ng-message elements that appear BEFORE the ng-messages-include will
118
+ * override the messages present in the ng-messages-include template -->
119
+ * <div ng-messages="myForm.myEmail.$error" role="alert">
120
+ * <!-- this required message has overridden the template message -->
121
+ * <div ng-message="required">You did not enter your email address</div>
122
+ *
123
+ * <!-- this is a brand new message and will appear last in the prioritization -->
124
+ * <div ng-message="email">Your email address is invalid</div>
125
+ *
126
+ * <!-- and here are the generic error messages -->
127
+ * <div ng-messages-include="my-custom-messages"></div>
128
+ * </div>
129
+ * </form>
130
+ * ```
131
+ *
132
+ * In the example HTML code above the message that is set on required will override the corresponding
133
+ * required message defined within the remote template. Therefore, with particular input fields (such
134
+ * email addresses, date fields, autocomplete inputs, etc...), specialized error messages can be applied
135
+ * while more generic messages can be used to handle other, more general input errors.
136
+ *
137
+ * ## Dynamic Messaging
138
+ * ngMessages also supports using expressions to dynamically change key values. Using arrays and
139
+ * repeaters to list messages is also supported. This means that the code below will be able to
140
+ * fully adapt itself and display the appropriate message when any of the expression data changes:
141
+ *
142
+ * ```html
143
+ * <form name="myForm">
144
+ * <label>
145
+ * Email address
146
+ * <input type="email"
147
+ * name="myEmail"
148
+ * ng-model="email"
149
+ * minlength="5"
150
+ * required />
151
+ * </label>
152
+ * <div ng-messages="myForm.myEmail.$error" role="alert">
153
+ * <div ng-message="required">You did not enter your email address</div>
154
+ * <div ng-repeat="errorMessage in errorMessages">
155
+ * <!-- use ng-message-exp for a message whose key is given by an expression -->
156
+ * <div ng-message-exp="errorMessage.type">{{ errorMessage.text }}</div>
157
+ * </div>
158
+ * </div>
159
+ * </form>
160
+ * ```
161
+ *
162
+ * The `errorMessage.type` expression can be a string value or it can be an array so
163
+ * that multiple errors can be associated with a single error message:
164
+ *
165
+ * ```html
166
+ * <label>
167
+ * Email address
168
+ * <input type="email"
169
+ * ng-model="data.email"
170
+ * name="myEmail"
171
+ * ng-minlength="5"
172
+ * ng-maxlength="100"
173
+ * required />
174
+ * </label>
175
+ * <div ng-messages="myForm.myEmail.$error" role="alert">
176
+ * <div ng-message-exp="'required'">You did not enter your email address</div>
177
+ * <div ng-message-exp="['minlength', 'maxlength']">
178
+ * Your email must be between 5 and 100 characters long
179
+ * </div>
180
+ * </div>
181
+ * ```
182
+ *
183
+ * Feel free to use other structural directives such as ng-if and ng-switch to further control
184
+ * what messages are active and when. Be careful, if you place ng-message on the same element
185
+ * as these structural directives, Angular may not be able to determine if a message is active
186
+ * or not. Therefore it is best to place the ng-message on a child element of the structural
187
+ * directive.
188
+ *
189
+ * ```html
190
+ * <div ng-messages="myForm.myEmail.$error" role="alert">
191
+ * <div ng-if="showRequiredError">
192
+ * <div ng-message="required">Please enter something</div>
193
+ * </div>
194
+ * </div>
195
+ * ```
196
+ *
197
+ * ## Animations
198
+ * If the `ngAnimate` module is active within the application then the `ngMessages`, `ngMessage` and
199
+ * `ngMessageExp` directives will trigger animations whenever any messages are added and removed from
200
+ * the DOM by the `ngMessages` directive.
201
+ *
202
+ * Whenever the `ngMessages` directive contains one or more visible messages then the `.ng-active` CSS
203
+ * class will be added to the element. The `.ng-inactive` CSS class will be applied when there are no
204
+ * messages present. Therefore, CSS transitions and keyframes as well as JavaScript animations can
205
+ * hook into the animations whenever these classes are added/removed.
206
+ *
207
+ * Let's say that our HTML code for our messages container looks like so:
208
+ *
209
+ * ```html
210
+ * <div ng-messages="myMessages" class="my-messages" role="alert">
211
+ * <div ng-message="alert" class="some-message">...</div>
212
+ * <div ng-message="fail" class="some-message">...</div>
213
+ * </div>
214
+ * ```
215
+ *
216
+ * Then the CSS animation code for the message container looks like so:
217
+ *
218
+ * ```css
219
+ * .my-messages {
220
+ * transition:1s linear all;
221
+ * }
222
+ * .my-messages.ng-active {
223
+ * // messages are visible
224
+ * }
225
+ * .my-messages.ng-inactive {
226
+ * // messages are hidden
227
+ * }
228
+ * ```
229
+ *
230
+ * Whenever an inner message is attached (becomes visible) or removed (becomes hidden) then the enter
231
+ * and leave animation is triggered for each particular element bound to the `ngMessage` directive.
232
+ *
233
+ * Therefore, the CSS code for the inner messages looks like so:
234
+ *
235
+ * ```css
236
+ * .some-message {
237
+ * transition:1s linear all;
238
+ * }
239
+ *
240
+ * .some-message.ng-enter {}
241
+ * .some-message.ng-enter.ng-enter-active {}
242
+ *
243
+ * .some-message.ng-leave {}
244
+ * .some-message.ng-leave.ng-leave-active {}
245
+ * ```
246
+ *
247
+ * {@link ngAnimate Click here} to learn how to use JavaScript animations or to learn more about ngAnimate.
248
+ */
249
+ angular.module('ngMessages', [])
250
+
251
+ /**
252
+ * @ngdoc directive
253
+ * @module ngMessages
254
+ * @name ngMessages
255
+ * @restrict AE
256
+ *
257
+ * @description
258
+ * `ngMessages` is a directive that is designed to show and hide messages based on the state
259
+ * of a key/value object that it listens on. The directive itself complements error message
260
+ * reporting with the `ngModel` $error object (which stores a key/value state of validation errors).
261
+ *
262
+ * `ngMessages` manages the state of internal messages within its container element. The internal
263
+ * messages use the `ngMessage` directive and will be inserted/removed from the page depending
264
+ * on if they're present within the key/value object. By default, only one message will be displayed
265
+ * at a time and this depends on the prioritization of the messages within the template. (This can
266
+ * be changed by using the `ng-messages-multiple` or `multiple` attribute on the directive container.)
267
+ *
268
+ * A remote template can also be used to promote message reusability and messages can also be
269
+ * overridden.
270
+ *
271
+ * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.
272
+ *
273
+ * @usage
274
+ * ```html
275
+ * <!-- using attribute directives -->
276
+ * <ANY ng-messages="expression" role="alert">
277
+ * <ANY ng-message="stringValue">...</ANY>
278
+ * <ANY ng-message="stringValue1, stringValue2, ...">...</ANY>
279
+ * <ANY ng-message-exp="expressionValue">...</ANY>
280
+ * </ANY>
281
+ *
282
+ * <!-- or by using element directives -->
283
+ * <ng-messages for="expression" role="alert">
284
+ * <ng-message when="stringValue">...</ng-message>
285
+ * <ng-message when="stringValue1, stringValue2, ...">...</ng-message>
286
+ * <ng-message when-exp="expressionValue">...</ng-message>
287
+ * </ng-messages>
288
+ * ```
289
+ *
290
+ * @param {string} ngMessages an angular expression evaluating to a key/value object
291
+ * (this is typically the $error object on an ngModel instance).
292
+ * @param {string=} ngMessagesMultiple|multiple when set, all messages will be displayed with true
293
+ *
294
+ * @example
295
+ * <example name="ngMessages-directive" module="ngMessagesExample"
296
+ * deps="angular-messages.js"
297
+ * animations="true" fixBase="true">
298
+ * <file name="index.html">
299
+ * <form name="myForm">
300
+ * <label>
301
+ * Enter your name:
302
+ * <input type="text"
303
+ * name="myName"
304
+ * ng-model="name"
305
+ * ng-minlength="5"
306
+ * ng-maxlength="20"
307
+ * required />
308
+ * </label>
309
+ * <pre>myForm.myName.$error = {{ myForm.myName.$error | json }}</pre>
310
+ *
311
+ * <div ng-messages="myForm.myName.$error" style="color:maroon" role="alert">
312
+ * <div ng-message="required">You did not enter a field</div>
313
+ * <div ng-message="minlength">Your field is too short</div>
314
+ * <div ng-message="maxlength">Your field is too long</div>
315
+ * </div>
316
+ * </form>
317
+ * </file>
318
+ * <file name="script.js">
319
+ * angular.module('ngMessagesExample', ['ngMessages']);
320
+ * </file>
321
+ * </example>
322
+ */
323
+ .directive('ngMessages', ['$animate', function($animate) {
324
+ var ACTIVE_CLASS = 'ng-active';
325
+ var INACTIVE_CLASS = 'ng-inactive';
326
+
327
+ return {
328
+ require: 'ngMessages',
329
+ restrict: 'AE',
330
+ controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {
331
+ var ctrl = this;
332
+ var latestKey = 0;
333
+ var nextAttachId = 0;
334
+
335
+ this.getAttachId = function getAttachId() { return nextAttachId++; };
336
+
337
+ var messages = this.messages = {};
338
+ var renderLater, cachedCollection;
339
+
340
+ this.render = function(collection) {
341
+ collection = collection || {};
342
+
343
+ renderLater = false;
344
+ cachedCollection = collection;
345
+
346
+ // this is true if the attribute is empty or if the attribute value is truthy
347
+ var multiple = isAttrTruthy($scope, $attrs.ngMessagesMultiple) ||
348
+ isAttrTruthy($scope, $attrs.multiple);
349
+
350
+ var unmatchedMessages = [];
351
+ var matchedKeys = {};
352
+ var messageItem = ctrl.head;
353
+ var messageFound = false;
354
+ var totalMessages = 0;
355
+
356
+ // we use != instead of !== to allow for both undefined and null values
357
+ while (messageItem != null) {
358
+ totalMessages++;
359
+ var messageCtrl = messageItem.message;
360
+
361
+ var messageUsed = false;
362
+ if (!messageFound) {
363
+ forEach(collection, function(value, key) {
364
+ if (!messageUsed && truthy(value) && messageCtrl.test(key)) {
365
+ // this is to prevent the same error name from showing up twice
366
+ if (matchedKeys[key]) return;
367
+ matchedKeys[key] = true;
368
+
369
+ messageUsed = true;
370
+ messageCtrl.attach();
371
+ }
372
+ });
373
+ }
374
+
375
+ if (messageUsed) {
376
+ // unless we want to display multiple messages then we should
377
+ // set a flag here to avoid displaying the next message in the list
378
+ messageFound = !multiple;
379
+ } else {
380
+ unmatchedMessages.push(messageCtrl);
381
+ }
382
+
383
+ messageItem = messageItem.next;
384
+ }
385
+
386
+ forEach(unmatchedMessages, function(messageCtrl) {
387
+ messageCtrl.detach();
388
+ });
389
+
390
+ unmatchedMessages.length !== totalMessages
391
+ ? $animate.setClass($element, ACTIVE_CLASS, INACTIVE_CLASS)
392
+ : $animate.setClass($element, INACTIVE_CLASS, ACTIVE_CLASS);
393
+ };
394
+
395
+ $scope.$watchCollection($attrs.ngMessages || $attrs['for'], ctrl.render);
396
+
397
+ this.reRender = function() {
398
+ if (!renderLater) {
399
+ renderLater = true;
400
+ $scope.$evalAsync(function() {
401
+ if (renderLater) {
402
+ cachedCollection && ctrl.render(cachedCollection);
403
+ }
404
+ });
405
+ }
406
+ };
407
+
408
+ this.register = function(comment, messageCtrl) {
409
+ var nextKey = latestKey.toString();
410
+ messages[nextKey] = {
411
+ message: messageCtrl
412
+ };
413
+ insertMessageNode($element[0], comment, nextKey);
414
+ comment.$$ngMessageNode = nextKey;
415
+ latestKey++;
416
+
417
+ ctrl.reRender();
418
+ };
419
+
420
+ this.deregister = function(comment) {
421
+ var key = comment.$$ngMessageNode;
422
+ delete comment.$$ngMessageNode;
423
+ removeMessageNode($element[0], comment, key);
424
+ delete messages[key];
425
+ ctrl.reRender();
426
+ };
427
+
428
+ function findPreviousMessage(parent, comment) {
429
+ var prevNode = comment;
430
+ var parentLookup = [];
431
+ while (prevNode && prevNode !== parent) {
432
+ var prevKey = prevNode.$$ngMessageNode;
433
+ if (prevKey && prevKey.length) {
434
+ return messages[prevKey];
435
+ }
436
+
437
+ // dive deeper into the DOM and examine its children for any ngMessage
438
+ // comments that may be in an element that appears deeper in the list
439
+ if (prevNode.childNodes.length && parentLookup.indexOf(prevNode) == -1) {
440
+ parentLookup.push(prevNode);
441
+ prevNode = prevNode.childNodes[prevNode.childNodes.length - 1];
442
+ } else {
443
+ prevNode = prevNode.previousSibling || prevNode.parentNode;
444
+ }
445
+ }
446
+ }
447
+
448
+ function insertMessageNode(parent, comment, key) {
449
+ var messageNode = messages[key];
450
+ if (!ctrl.head) {
451
+ ctrl.head = messageNode;
452
+ } else {
453
+ var match = findPreviousMessage(parent, comment);
454
+ if (match) {
455
+ messageNode.next = match.next;
456
+ match.next = messageNode;
457
+ } else {
458
+ messageNode.next = ctrl.head;
459
+ ctrl.head = messageNode;
460
+ }
461
+ }
462
+ }
463
+
464
+ function removeMessageNode(parent, comment, key) {
465
+ var messageNode = messages[key];
466
+
467
+ var match = findPreviousMessage(parent, comment);
468
+ if (match) {
469
+ match.next = messageNode.next;
470
+ } else {
471
+ ctrl.head = messageNode.next;
472
+ }
473
+ }
474
+ }]
475
+ };
476
+
477
+ function isAttrTruthy(scope, attr) {
478
+ return (isString(attr) && attr.length === 0) || //empty attribute
479
+ truthy(scope.$eval(attr));
480
+ }
481
+
482
+ function truthy(val) {
483
+ return isString(val) ? val.length : !!val;
484
+ }
485
+ }])
486
+
487
+ /**
488
+ * @ngdoc directive
489
+ * @name ngMessagesInclude
490
+ * @restrict AE
491
+ * @scope
492
+ *
493
+ * @description
494
+ * `ngMessagesInclude` is a directive with the purpose to import existing ngMessage template
495
+ * code from a remote template and place the downloaded template code into the exact spot
496
+ * that the ngMessagesInclude directive is placed within the ngMessages container. This allows
497
+ * for a series of pre-defined messages to be reused and also allows for the developer to
498
+ * determine what messages are overridden due to the placement of the ngMessagesInclude directive.
499
+ *
500
+ * @usage
501
+ * ```html
502
+ * <!-- using attribute directives -->
503
+ * <ANY ng-messages="expression" role="alert">
504
+ * <ANY ng-messages-include="remoteTplString">...</ANY>
505
+ * </ANY>
506
+ *
507
+ * <!-- or by using element directives -->
508
+ * <ng-messages for="expression" role="alert">
509
+ * <ng-messages-include src="expressionValue1">...</ng-messages-include>
510
+ * </ng-messages>
511
+ * ```
512
+ *
513
+ * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.
514
+ *
515
+ * @param {string} ngMessagesInclude|src a string value corresponding to the remote template.
516
+ */
517
+ .directive('ngMessagesInclude',
518
+ ['$templateRequest', '$document', '$compile', function($templateRequest, $document, $compile) {
519
+
520
+ return {
521
+ restrict: 'AE',
522
+ require: '^^ngMessages', // we only require this for validation sake
523
+ link: function($scope, element, attrs) {
524
+ var src = attrs.ngMessagesInclude || attrs.src;
525
+ $templateRequest(src).then(function(html) {
526
+ $compile(html)($scope, function(contents) {
527
+ element.after(contents);
528
+
529
+ // the anchor is placed for debugging purposes
530
+ var anchor = jqLite($document[0].createComment(' ngMessagesInclude: ' + src + ' '));
531
+ element.after(anchor);
532
+
533
+ // we don't want to pollute the DOM anymore by keeping an empty directive element
534
+ element.remove();
535
+ });
536
+ });
537
+ }
538
+ };
539
+ }])
540
+
541
+ /**
542
+ * @ngdoc directive
543
+ * @name ngMessage
544
+ * @restrict AE
545
+ * @scope
546
+ *
547
+ * @description
548
+ * `ngMessage` is a directive with the purpose to show and hide a particular message.
549
+ * For `ngMessage` to operate, a parent `ngMessages` directive on a parent DOM element
550
+ * must be situated since it determines which messages are visible based on the state
551
+ * of the provided key/value map that `ngMessages` listens on.
552
+ *
553
+ * More information about using `ngMessage` can be found in the
554
+ * {@link module:ngMessages `ngMessages` module documentation}.
555
+ *
556
+ * @usage
557
+ * ```html
558
+ * <!-- using attribute directives -->
559
+ * <ANY ng-messages="expression" role="alert">
560
+ * <ANY ng-message="stringValue">...</ANY>
561
+ * <ANY ng-message="stringValue1, stringValue2, ...">...</ANY>
562
+ * </ANY>
563
+ *
564
+ * <!-- or by using element directives -->
565
+ * <ng-messages for="expression" role="alert">
566
+ * <ng-message when="stringValue">...</ng-message>
567
+ * <ng-message when="stringValue1, stringValue2, ...">...</ng-message>
568
+ * </ng-messages>
569
+ * ```
570
+ *
571
+ * @param {expression} ngMessage|when a string value corresponding to the message key.
572
+ */
573
+ .directive('ngMessage', ngMessageDirectiveFactory('AE'))
574
+
575
+
576
+ /**
577
+ * @ngdoc directive
578
+ * @name ngMessageExp
579
+ * @restrict AE
580
+ * @scope
581
+ *
582
+ * @description
583
+ * `ngMessageExp` is a directive with the purpose to show and hide a particular message.
584
+ * For `ngMessageExp` to operate, a parent `ngMessages` directive on a parent DOM element
585
+ * must be situated since it determines which messages are visible based on the state
586
+ * of the provided key/value map that `ngMessages` listens on.
587
+ *
588
+ * @usage
589
+ * ```html
590
+ * <!-- using attribute directives -->
591
+ * <ANY ng-messages="expression">
592
+ * <ANY ng-message-exp="expressionValue">...</ANY>
593
+ * </ANY>
594
+ *
595
+ * <!-- or by using element directives -->
596
+ * <ng-messages for="expression">
597
+ * <ng-message when-exp="expressionValue">...</ng-message>
598
+ * </ng-messages>
599
+ * ```
600
+ *
601
+ * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.
602
+ *
603
+ * @param {expression} ngMessageExp|whenExp an expression value corresponding to the message key.
604
+ */
605
+ .directive('ngMessageExp', ngMessageDirectiveFactory('A'));
606
+
607
+ function ngMessageDirectiveFactory(restrict) {
608
+ return ['$animate', function($animate) {
609
+ return {
610
+ restrict: 'AE',
611
+ transclude: 'element',
612
+ terminal: true,
613
+ require: '^^ngMessages',
614
+ link: function(scope, element, attrs, ngMessagesCtrl, $transclude) {
615
+ var commentNode = element[0];
616
+
617
+ var records;
618
+ var staticExp = attrs.ngMessage || attrs.when;
619
+ var dynamicExp = attrs.ngMessageExp || attrs.whenExp;
620
+ var assignRecords = function(items) {
621
+ records = items
622
+ ? (isArray(items)
623
+ ? items
624
+ : items.split(/[\s,]+/))
625
+ : null;
626
+ ngMessagesCtrl.reRender();
627
+ };
628
+
629
+ if (dynamicExp) {
630
+ assignRecords(scope.$eval(dynamicExp));
631
+ scope.$watchCollection(dynamicExp, assignRecords);
632
+ } else {
633
+ assignRecords(staticExp);
634
+ }
635
+
636
+ var currentElement, messageCtrl;
637
+ ngMessagesCtrl.register(commentNode, messageCtrl = {
638
+ test: function(name) {
639
+ return contains(records, name);
640
+ },
641
+ attach: function() {
642
+ if (!currentElement) {
643
+ $transclude(scope, function(elm) {
644
+ $animate.enter(elm, null, element);
645
+ currentElement = elm;
646
+
647
+ // Each time we attach this node to a message we get a new id that we can match
648
+ // when we are destroying the node later.
649
+ var $$attachId = currentElement.$$attachId = ngMessagesCtrl.getAttachId();
650
+
651
+ // in the event that the parent element is destroyed
652
+ // by any other structural directive then it's time
653
+ // to deregister the message from the controller
654
+ currentElement.on('$destroy', function() {
655
+ if (currentElement && currentElement.$$attachId === $$attachId) {
656
+ ngMessagesCtrl.deregister(commentNode);
657
+ messageCtrl.detach();
658
+ }
659
+ });
660
+ });
661
+ }
662
+ },
663
+ detach: function() {
664
+ if (currentElement) {
665
+ var elm = currentElement;
666
+ currentElement = null;
667
+ $animate.leave(elm);
668
+ }
669
+ }
670
+ });
671
+ }
672
+ };
673
+ }];
674
+
675
+ function contains(collection, key) {
676
+ if (collection) {
677
+ return isArray(collection)
678
+ ? collection.indexOf(key) >= 0
679
+ : collection.hasOwnProperty(key);
680
+ }
681
+ }
682
+ }
683
+
684
+
685
+ })(window, window.angular);