fomantic-ui 2.9.0-beta.282 → 2.9.0-beta.285

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 (174) hide show
  1. package/.all-contributorsrc +18 -0
  2. package/.github/dependabot.yml +10 -0
  3. package/.github/workflows/ci.yml +5 -2
  4. package/.github/workflows/nightly.yml +5 -2
  5. package/.github/workflows/release.yml +5 -2
  6. package/CONTRIBUTORS.md +4 -0
  7. package/dist/components/accordion.css +1 -1
  8. package/dist/components/accordion.js +1 -1
  9. package/dist/components/accordion.min.css +1 -1
  10. package/dist/components/accordion.min.js +1 -1
  11. package/dist/components/ad.css +1 -1
  12. package/dist/components/ad.min.css +1 -1
  13. package/dist/components/api.js +2 -2
  14. package/dist/components/api.min.js +2 -2
  15. package/dist/components/breadcrumb.css +1 -1
  16. package/dist/components/breadcrumb.min.css +1 -1
  17. package/dist/components/button.css +1 -1
  18. package/dist/components/button.min.css +1 -1
  19. package/dist/components/calendar.css +1 -1
  20. package/dist/components/calendar.js +1 -1
  21. package/dist/components/calendar.min.css +1 -1
  22. package/dist/components/calendar.min.js +1 -1
  23. package/dist/components/card.css +1 -1
  24. package/dist/components/card.min.css +1 -1
  25. package/dist/components/checkbox.css +1 -1
  26. package/dist/components/checkbox.js +1 -1
  27. package/dist/components/checkbox.min.css +1 -1
  28. package/dist/components/checkbox.min.js +1 -1
  29. package/dist/components/comment.css +1 -1
  30. package/dist/components/comment.min.css +1 -1
  31. package/dist/components/container.css +1 -1
  32. package/dist/components/container.min.css +1 -1
  33. package/dist/components/dimmer.css +1 -1
  34. package/dist/components/dimmer.js +1 -1
  35. package/dist/components/dimmer.min.css +1 -1
  36. package/dist/components/dimmer.min.js +1 -1
  37. package/dist/components/divider.css +1 -1
  38. package/dist/components/divider.min.css +1 -1
  39. package/dist/components/dropdown.css +1 -1
  40. package/dist/components/dropdown.js +2 -2
  41. package/dist/components/dropdown.min.css +1 -1
  42. package/dist/components/dropdown.min.js +2 -2
  43. package/dist/components/embed.css +1 -1
  44. package/dist/components/embed.js +1 -1
  45. package/dist/components/embed.min.css +1 -1
  46. package/dist/components/embed.min.js +1 -1
  47. package/dist/components/emoji.css +8 -10
  48. package/dist/components/feed.css +1 -1
  49. package/dist/components/feed.min.css +1 -1
  50. package/dist/components/flag.css +8 -8
  51. package/dist/components/flag.min.css +1 -1
  52. package/dist/components/form.css +1 -1
  53. package/dist/components/form.js +1 -1
  54. package/dist/components/form.min.css +1 -1
  55. package/dist/components/form.min.js +1 -1
  56. package/dist/components/grid.css +1 -1
  57. package/dist/components/grid.min.css +1 -1
  58. package/dist/components/header.css +1 -1
  59. package/dist/components/header.min.css +1 -1
  60. package/dist/components/icon.css +1 -1
  61. package/dist/components/icon.min.css +1 -1
  62. package/dist/components/image.css +1 -1
  63. package/dist/components/image.min.css +1 -1
  64. package/dist/components/input.css +1 -1
  65. package/dist/components/input.min.css +1 -1
  66. package/dist/components/item.css +1 -1
  67. package/dist/components/item.min.css +1 -1
  68. package/dist/components/label.css +9 -5
  69. package/dist/components/label.min.css +2 -2
  70. package/dist/components/list.css +1 -1
  71. package/dist/components/list.min.css +1 -1
  72. package/dist/components/loader.css +1 -1
  73. package/dist/components/loader.min.css +1 -1
  74. package/dist/components/message.css +1 -1
  75. package/dist/components/message.min.css +1 -1
  76. package/dist/components/modal.css +1 -1
  77. package/dist/components/modal.js +1 -1
  78. package/dist/components/modal.min.css +1 -1
  79. package/dist/components/modal.min.js +1 -1
  80. package/dist/components/nag.css +1 -1
  81. package/dist/components/nag.js +1 -1
  82. package/dist/components/nag.min.css +1 -1
  83. package/dist/components/nag.min.js +1 -1
  84. package/dist/components/placeholder.css +1 -1
  85. package/dist/components/placeholder.min.css +1 -1
  86. package/dist/components/popup.css +1 -1
  87. package/dist/components/popup.js +1 -1
  88. package/dist/components/popup.min.css +1 -1
  89. package/dist/components/popup.min.js +1 -1
  90. package/dist/components/progress.css +1 -1
  91. package/dist/components/progress.js +1 -1
  92. package/dist/components/progress.min.css +1 -1
  93. package/dist/components/progress.min.js +1 -1
  94. package/dist/components/rail.css +1 -1
  95. package/dist/components/rail.min.css +1 -1
  96. package/dist/components/rating.css +1 -1
  97. package/dist/components/rating.js +1 -1
  98. package/dist/components/rating.min.css +1 -1
  99. package/dist/components/rating.min.js +1 -1
  100. package/dist/components/reset.css +1 -1
  101. package/dist/components/reset.min.css +1 -1
  102. package/dist/components/reveal.css +1 -1
  103. package/dist/components/reveal.min.css +1 -1
  104. package/dist/components/search.css +1 -1
  105. package/dist/components/search.js +1 -1
  106. package/dist/components/search.min.css +1 -1
  107. package/dist/components/search.min.js +1 -1
  108. package/dist/components/segment.css +1 -1
  109. package/dist/components/segment.min.css +1 -1
  110. package/dist/components/shape.css +1 -1
  111. package/dist/components/shape.js +1 -1
  112. package/dist/components/shape.min.css +1 -1
  113. package/dist/components/shape.min.js +1 -1
  114. package/dist/components/sidebar.css +1 -1
  115. package/dist/components/sidebar.js +1 -1
  116. package/dist/components/sidebar.min.css +1 -1
  117. package/dist/components/sidebar.min.js +1 -1
  118. package/dist/components/site.css +1 -1
  119. package/dist/components/site.js +1 -1
  120. package/dist/components/site.min.css +1 -1
  121. package/dist/components/site.min.js +1 -1
  122. package/dist/components/slider.js +1 -1
  123. package/dist/components/slider.min.js +1 -1
  124. package/dist/components/state.js +1 -1
  125. package/dist/components/state.min.js +1 -1
  126. package/dist/components/statistic.css +1 -1
  127. package/dist/components/statistic.min.css +1 -1
  128. package/dist/components/step.css +1 -1
  129. package/dist/components/step.min.css +1 -1
  130. package/dist/components/sticky.css +1 -1
  131. package/dist/components/sticky.js +1 -1
  132. package/dist/components/sticky.min.css +1 -1
  133. package/dist/components/sticky.min.js +1 -1
  134. package/dist/components/tab.css +1 -1
  135. package/dist/components/tab.js +1 -1
  136. package/dist/components/tab.min.css +1 -1
  137. package/dist/components/tab.min.js +1 -1
  138. package/dist/components/table.css +1 -1
  139. package/dist/components/table.min.css +1 -1
  140. package/dist/components/text.css +1 -1
  141. package/dist/components/text.min.css +1 -1
  142. package/dist/components/toast.css +4 -1
  143. package/dist/components/toast.js +9 -5
  144. package/dist/components/toast.min.css +2 -2
  145. package/dist/components/toast.min.js +2 -2
  146. package/dist/components/transition.css +1 -1
  147. package/dist/components/transition.js +1 -1
  148. package/dist/components/transition.min.css +1 -1
  149. package/dist/components/transition.min.js +1 -1
  150. package/dist/components/visibility.js +1 -1
  151. package/dist/components/visibility.min.js +1 -1
  152. package/dist/semantic.css +75 -67
  153. package/dist/semantic.js +35 -31
  154. package/dist/semantic.min.css +2 -2
  155. package/dist/semantic.min.js +2 -2
  156. package/dist/themes/{default → famfamfam}/assets/images/flags.png +0 -0
  157. package/package.json +1 -1
  158. package/src/definitions/behaviors/api.js +1 -1
  159. package/src/definitions/elements/emoji.less +23 -0
  160. package/src/definitions/elements/flag.less +45 -0
  161. package/src/definitions/elements/label.less +7 -4
  162. package/src/definitions/modules/dropdown.js +1 -1
  163. package/src/definitions/modules/toast.js +8 -4
  164. package/src/definitions/modules/toast.less +3 -0
  165. package/src/themes/default/elements/emoji.overrides +0 -3592
  166. package/src/themes/default/elements/emoji.variables +3574 -0
  167. package/src/themes/default/elements/flag.overrides +0 -1646
  168. package/src/themes/default/elements/flag.variables +1602 -0
  169. package/src/themes/{default → famfamfam}/assets/images/flags.png +0 -0
  170. package/src/themes/famfamfam/elements/flag.variables +8 -1
  171. package/src/themes/joypixels/elements/emoji.overrides +0 -3591
  172. package/src/themes/joypixels/elements/emoji.variables +3573 -4
  173. package/src/themes/twitter/elements/emoji.overrides +0 -3593
  174. package/src/themes/twitter/elements/emoji.variables +3570 -6
@@ -600,6 +600,24 @@
600
600
  "contributions": [
601
601
  "code"
602
602
  ]
603
+ },
604
+ {
605
+ "login": "naveensrinivasan",
606
+ "name": "Naveen",
607
+ "avatar_url": "https://avatars.githubusercontent.com/u/172697?v=4",
608
+ "profile": "https://naveensrinivasan.dev",
609
+ "contributions": [
610
+ "security"
611
+ ]
612
+ },
613
+ {
614
+ "login": "mvorisek",
615
+ "name": "Michael Voříšek",
616
+ "avatar_url": "https://avatars.githubusercontent.com/u/2228672?v=4",
617
+ "profile": "https://www.mvorisek.com/",
618
+ "contributions": [
619
+ "code"
620
+ ]
603
621
  }
604
622
  ],
605
623
  "contributorsPerLine": 4,
@@ -15,3 +15,13 @@ updates:
15
15
  - dependency-name: gulp-replace
16
16
  versions:
17
17
  - 1.1.0
18
+ - package-ecosystem: github-actions
19
+ directory: "/"
20
+ schedule:
21
+ interval: daily
22
+ time: "06:00"
23
+ open-pull-requests-limit: 99
24
+ target-branch: develop
25
+ labels:
26
+ - type/dependencies
27
+ - state/awaiting-reviews
@@ -1,5 +1,8 @@
1
1
  name: CI
2
2
  on: [pull_request]
3
+ permissions:
4
+ contents: read
5
+
3
6
  jobs:
4
7
  test:
5
8
  name: Test build process on node ${{ matrix.node-version }}
@@ -9,9 +12,9 @@ jobs:
9
12
  matrix:
10
13
  node-version: [12, 14, 16]
11
14
  steps:
12
- - uses: actions/checkout@v2
15
+ - uses: actions/checkout@v3
13
16
  - name: Use Node.js ${{ matrix.node-version }}
14
- uses: actions/setup-node@v2
17
+ uses: actions/setup-node@v3
15
18
  with:
16
19
  node-version: ${{ matrix.node-version }}
17
20
  - name: pre-install
@@ -2,6 +2,9 @@ name: Nightly
2
2
  on:
3
3
  schedule:
4
4
  - cron: 00 23 * * *
5
+ permissions:
6
+ contents: read
7
+
5
8
  jobs:
6
9
  publish:
7
10
  name: Build nightly distribution
@@ -10,10 +13,10 @@ jobs:
10
13
  outputs:
11
14
  shouldPublish: ${{ steps.nightly-version.outputs.shouldPublish }}
12
15
  steps:
13
- - uses: actions/checkout@v2
16
+ - uses: actions/checkout@v3
14
17
  with:
15
18
  ref: develop
16
- - uses: actions/setup-node@v2
19
+ - uses: actions/setup-node@v3
17
20
  with:
18
21
  node-version: 16
19
22
  registry-url: https://registry.npmjs.org/
@@ -2,16 +2,19 @@ name: Release
2
2
  on:
3
3
  release:
4
4
  types: [released]
5
+ permissions:
6
+ contents: read
7
+
5
8
  jobs:
6
9
  publish:
7
10
  name: Build new Release
8
11
  runs-on: ubuntu-latest
9
12
  if: github.repository == 'fomantic/Fomantic-UI'
10
13
  steps:
11
- - uses: actions/checkout@v2
14
+ - uses: actions/checkout@v3
12
15
  with:
13
16
  ref: master
14
- - uses: actions/setup-node@v2
17
+ - uses: actions/setup-node@v3
15
18
  with:
16
19
  node-version: 14
17
20
  registry-url: https://registry.npmjs.org/
package/CONTRIBUTORS.md CHANGED
@@ -96,6 +96,10 @@ This is a list of all project contributors powered by [All Contributors](https:/
96
96
  <td align="center"><a href="https://github.com/grandeljay"><img src="https://avatars.githubusercontent.com/u/45571053?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Jay</b></sub></a><br /><a href="https://github.com/fomantic/Fomantic-UI/commits?author=grandeljay" title="Code">💻</a></td>
97
97
  <td align="center"><a href="https://www.mhthies.de"><img src="https://avatars.githubusercontent.com/u/8234059?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Michael Thies</b></sub></a><br /><a href="https://github.com/fomantic/Fomantic-UI/commits?author=mhthies" title="Code">💻</a></td>
98
98
  </tr>
99
+ <tr>
100
+ <td align="center"><a href="https://naveensrinivasan.dev"><img src="https://avatars.githubusercontent.com/u/172697?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Naveen</b></sub></a><br /><a href="#security-naveensrinivasan" title="Security">🛡️</a></td>
101
+ <td align="center"><a href="https://www.mvorisek.com/"><img src="https://avatars.githubusercontent.com/u/2228672?v=4?s=60" width="60px;" alt=""/><br /><sub><b>Michael Voříšek</b></sub></a><br /><a href="https://github.com/fomantic/Fomantic-UI/commits?author=mvorisek" title="Code">💻</a></td>
102
+ </tr>
99
103
  </table>
100
104
 
101
105
  <!-- markdownlint-restore -->
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Accordion
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Accordion
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Accordion
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Accordion
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Accordion
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Accordion
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.0-beta.282+54be6de
2
+ * # Fomantic UI - 2.9.0-beta.285+da049ae
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * http://fomantic-ui.com/
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Ad
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Ad
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Ad
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Ad
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - API
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - API
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1208,7 +1208,7 @@ $.api.settings = {
1208
1208
  regExp : {
1209
1209
  required : /\{\$*[A-z0-9]+\}/g,
1210
1210
  optional : /\{\/\$*[A-z0-9]+\}/g,
1211
- validate: /^[a-z_][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_-]+)\])*$/i,
1211
+ validate: /^[a-z_][a-z0-9_-]*(?:\[[a-z0-9_-]*\])*$/i,
1212
1212
  key: /[a-z0-9_-]+|(?=\[\])/gi,
1213
1213
  push: /^$/,
1214
1214
  fixed: /^\d+$/,
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.0-beta.282+54be6de
2
+ * # Fomantic UI - 2.9.0-beta.285+da049ae
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * http://fomantic-ui.com/
5
5
  *
@@ -8,4 +8,4 @@
8
8
  * http://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
- !function(P,O,j){"use strict";P.isWindow=P.isWindow||function(e){return null!=e&&e===e.window},O=void 0!==O&&O.Math==Math?O:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),P.api=P.fn.api=function(q){var x,e=P.isFunction(this)?P(O):P(this),A=e.selector||"",k=(new Date).getTime(),S=[],T=q,w="string"==typeof T,D=[].slice.call(arguments,1);return e.each(function(){var s,n,r,e,a,o,f=P.isPlainObject(q)?P.extend(!0,{},P.fn.api.settings,q):P.extend({},P.fn.api.settings),t=f.namespace,i=f.metadata,u=f.selector,c=f.error,d=f.className,l="."+t,g="module-"+t,p=P(this),m=p.closest(u.form),b=f.stateContext?P(f.stateContext):p,v=this,h=b[0],y=p.data(g),R={initialize:function(){w||(o=f.data,R.bind.events()),R.instantiate()},instantiate:function(){R.verbose("Storing instance of module",R),y=R,p.data(g,y)},destroy:function(){R.verbose("Destroying previous module for",v),p.removeData(g).off(l)},bind:{events:function(){var e=R.get.event();e?(R.verbose("Attaching API events to element",e),p.on(e+l,R.event.trigger)):"now"==f.on&&(R.debug("Querying API endpoint immediately"),R.query())}},decode:{json:function(e){if(e!==j&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(O.Storage!==j)return t=sessionStorage.getItem(e+R.get.normalizedData()),R.debug("Using cached response",e,f.data,t),R.decode.json(t);R.error(c.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?R.debug("Response empty, not caching",t):O.Storage===j?R.error(c.noStorage):(P.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+R.get.normalizedData(),t),R.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(R.is.disabled())R.debug("Element is disabled API request aborted");else{if(R.is.loading()){if(!f.interruptRequests)return void R.debug("Cancelling request, previous request is still pending");R.debug("Interrupting previous request"),R.abort()}if(f.defaultData&&P.extend(!0,f.urlData,R.get.defaultData()),f.serializeForm&&(f.data=R.add.formData(o||f.data)),!1===(n=R.get.settings()))return R.cancelled=!0,void R.error(c.beforeSend);if(R.cancelled=!1,(r=R.get.templatedURL())||R.is.mocked()){if((r=R.add.urlData(r))||R.is.mocked()){if(n.url=f.base+r,s=P.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+r,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),R.debug("Querying URL",s.url),R.verbose("Using AJAX settings",s),"local"===f.cache&&R.read.cachedResponse(r))return R.debug("Response returned from local cache"),R.request=R.create.request(),void R.request.resolveWith(h,[R.read.cachedResponse(r)]);f.throttle?f.throttleFirstRequest||R.timer?(R.debug("Throttling request",f.throttle),clearTimeout(R.timer),R.timer=setTimeout(function(){R.timer&&delete R.timer,R.debug("Sending throttled request",e,s.method),R.send.request()},f.throttle)):(R.debug("Sending request",e,s.method),R.send.request(),R.timer=setTimeout(function(){},f.throttle)):(R.debug("Sending request",e,s.method),R.send.request())}}else R.error(c.missingURL)}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!R.is.form()}},is:{disabled:function(){return 0<p.filter(u.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return p.is("form")||b.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return p.is("input")},loading:function(){return!!R.request&&"pending"==R.request.state()},abortedRequest:function(e){return e&&e.readyState!==j&&0===e.readyState?(R.verbose("XHR request determined to be aborted"),!0):(R.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return R.is.expectingJSON()&&P.isFunction(f.successTest)?(R.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(R.debug("Response passed success test",e),!0):(R.debug("Response failed success test",e),!1)):(R.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return R.cancelled||!1},successful:function(){return R.request&&"resolved"==R.request.state()},failure:function(){return R.request&&"rejected"==R.request.state()},complete:function(){return R.request&&("resolved"==R.request.state()||"rejected"==R.request.state())}},add:{urlData:function(o,s){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),s=s||f.urlData,e&&(R.debug("Looking for required URL variables",e),P.each(e,function(e,t){var r=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),n=P.isPlainObject(s)&&s[r]!==j?s[r]:p.data(r)!==j?p.data(r):b.data(r)!==j?b.data(r):s[r];if(n===j)return R.error(c.requiredParameter,r,o),o=!1;R.verbose("Found required variable",r,n),n=f.encodeParameters?R.get.urlEncodedValue(n):n,o=o.replace(t,n)})),t&&(R.debug("Looking for optional URL variables",e),P.each(t,function(e,t){var r=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),n=P.isPlainObject(s)&&s[r]!==j?s[r]:p.data(r)!==j?p.data(r):b.data(r)!==j?b.data(r):s[r];o=n!==j?(R.verbose("Optional variable Found",r,n),o.replace(t,n)):(R.verbose("Optional variable not found",r),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(r){var e,n,u,c,d,l={},t="formdata"===f.serializeForm;return r=r||o||f.data,e=P.isPlainObject(r),t?(l=new FormData(m[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(n=m.serializeArray(),u={},c={},d=function(e,t,r){return e[t]=r,e},P.each(P('input[type="file"]',m),function(e,r){P.each(P(r)[0].files,function(e,t){n.push({name:r.name,value:t})})}),P.each(n,function(e,t){if(f.regExp.validate.test(t.name)){var r,n="checkbox"===P('[name="'+t.name+'"]',m).attr("type"),o=parseFloat(t.value),s=n&&"on"===t.value||"true"===t.value||(String(o)===t.value?o:"false"!==t.value&&t.value),a=t.name.match(f.regExp.key)||[],i=t.name.replace(/\[\]$/,"");i in u?Array.isArray(c[i])?c[i].push(s):c[i]=[c[i],s]:(u[i]=0,c[i]=s),s=c[i];for(;(r=a.pop())!==j;)""!=r||Array.isArray(s)?f.regExp.fixed.test(r)?s=d([],r,s):f.regExp.named.test(r)&&(s=d({},r,s)):s=d([],u[i]++,s);l=P.extend(!0,l,s)}})),r=e?(R.debug("Extending existing data with form data",r,l),t?(P.each(Object.keys(r),function(e,t){l.append(t,r[t])}),l):P.extend(!0,{},r,l)):(R.debug("Adding form data",l),l)}},send:{request:function(){R.set.loading(),R.request=R.create.request(),R.is.mocked()?R.mockedXHR=R.create.mockedXHR():R.xhr=R.create.xhr(),f.onRequest.call(h,R.request,R.xhr)}},event:{trigger:function(e){R.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,r){var n=this,o=(new Date).getTime()-a,o=f.loadingDuration-o,s=!!P.isFunction(f.onResponse)&&(R.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(n,P.extend(!0,{},e)):f.onResponse.call(n,e)),o=0<o?o:0;s&&(R.debug("Modified API response in onResponse callback",f.onResponse,s,e),e=s),0<o&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.validResponse(e)?R.request.resolveWith(n,[e,r]):R.request.rejectWith(n,[r,"invalid"])},o)},fail:function(e,t,r){var n=this,o=(new Date).getTime()-a,o=f.loadingDuration-o;0<(o=0<o?o:0)&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.abortedRequest(e)?R.request.rejectWith(n,[e,"aborted",r]):R.request.rejectWith(n,[e,"error",t,r])},o)}},request:{done:function(e,t){R.debug("Successful API Response",e),"local"===f.cache&&r&&(R.write.cachedResponse(r,e),R.debug("Saving server response locally",R.cache)),f.onSuccess.call(h,e,p,t)},complete:function(e,t){var r,n;R.was.successful()?(n=e,r=t):n=R.get.responseFromXHR(r=e),R.remove.loading(),f.onComplete.call(h,n,p,r)},fail:function(e,t,r){var n=R.get.responseFromXHR(e),o=R.get.errorFromRequest(n,t,r);if("aborted"==t)return R.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),f.onAbort.call(h,t,p,e),!0;"invalid"==t?R.debug("JSON did not pass success test. A server-side error has most likely occurred",n):"error"==t&&e!==j&&(R.debug("XHR produced a server error",t,r),(e.status<200||300<=e.status)&&r!==j&&""!==r&&R.error(c.statusMessage+r,s.url),f.onError.call(h,o,p,e)),f.errorDuration&&"aborted"!==t&&(R.debug("Adding error state"),R.set.error(),R.should.removeError()&&setTimeout(R.remove.error,f.errorDuration)),R.debug("API Request failed",o,e),f.onFailure.call(h,n,p,e)}}},create:{request:function(){return P.Deferred().always(R.event.request.complete).done(R.event.request.done).fail(R.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,r=P.Deferred().always(R.event.xhr.complete).done(R.event.xhr.done).fail(R.event.xhr.fail);return e?(e=P.isFunction(e)?(R.debug("Using specified synchronous callback",e),e.call(h,n)):(R.debug("Using settings specified response",e),e),r.resolveWith(h,[e,!1,{responseText:e}])):P.isFunction(t)&&(e=function(e){R.debug("Async callback returned response",e),e?r.resolveWith(h,[e,!1,{responseText:e}]):r.rejectWith(h,[{responseText:e},!1,!1])},R.debug("Using specified async response callback",t),t.call(h,n,e)),r},xhr:function(){var e=P.ajax(s).always(R.event.xhr.always).done(R.event.xhr.done).fail(R.event.xhr.fail);return R.verbose("Created server request",e,s),e}},set:{error:function(){R.verbose("Adding error state to element",b),b.addClass(d.error)},loading:function(){R.verbose("Adding loading state to element",b),b.addClass(d.loading),a=(new Date).getTime()}},remove:{error:function(){R.verbose("Removing error state from element",b),b.removeClass(d.error)},loading:function(){R.verbose("Removing loading state from element",b),b.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!P.isPlainObject(e)&&(R.is.expectingJSON()?R.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,r){return P.isPlainObject(e)&&e.error!==j?e.error:f.error[t]!==j?f.error[t]:r},request:function(){return R.request||!1},xhr:function(){return R.xhr||!1},settings:function(){var e=f.beforeSend.call(p,f);return e&&(e.success!==j&&(R.debug("Legacy success callback detected",e),R.error(c.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==j&&(R.debug("Legacy failure callback detected",e),R.error(c.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==j&&(R.debug("Legacy complete callback detected",e),R.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),e===j&&R.error(c.noReturnedValue),!1===e?e:e!==j?P.extend(!0,{},e):P.extend(!0,{},f)},urlEncodedValue:function(e){var t=O.decodeURIComponent(e),r=O.encodeURIComponent(e);return t!==e?(R.debug("URL value is already encoded, avoiding double encoding",e),e):(R.verbose("Encoding value using encodeURIComponent",e,r),r)},defaultData:function(){var e={};return P.isWindow(v)||(R.is.input()?e.value=p.val():R.is.form()||(e.text=p.text())),e},event:function(){return P.isWindow(v)||"now"==f.on?(R.debug("API called without element, no events attached"),!1):"auto"==f.on?p.is("input")?v.oninput!==j?"input":v.onpropertychange!==j?"propertychange":"keyup":p.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||p.data(i.action)||f.action||!1,r=p.data(i.url)||f.url||!1)return R.debug("Using specified url",r),r;if(e){if(R.debug("Looking up url for action",e,f.api),f.api[e]===j&&!R.is.mocked())return void R.error(c.missingAction,f.action,f.api);r=f.api[e]}else R.is.form()&&(r=p.attr("action")||b.attr("action")||!1,R.debug("No url or action specified, defaulting to form action",r));return r}},abort:function(){var e=R.get.xhr();e&&"resolved"!==e.state()&&(R.debug("Cancelling API request"),e.abort())},reset:function(){R.remove.error(),R.remove.loading()},setting:function(e,t){if(R.debug("Changing setting",e,t),P.isPlainObject(e))P.extend(!0,f,e);else{if(t===j)return f[e];P.isPlainObject(f[e])?P.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(P.isPlainObject(e))P.extend(!0,R,e);else{if(t===j)return R[e];R[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,f.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),R.verbose.apply(console,arguments)))},error:function(){f.silent||(R.error=Function.prototype.bind.call(console.error,console,f.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,r;f.performance&&(r=(t=(new Date).getTime())-(k||t),k=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout(R.performance.display,500)},display:function(){var e=f.name+":",r=0;k=!1,clearTimeout(R.performance.timer),P.each(S,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",A&&(e+=" '"+A+"'"),(console.group!==j||console.table!==j)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):P.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var o,s,r,a=y;return e=e||D,t=v||t,"string"==typeof n&&a!==j&&(n=n.split(/[\. ]/),o=n.length-1,P.each(n,function(e,t){var r=e!=o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(P.isPlainObject(a[r])&&e!=o)a=a[r];else{if(a[r]!==j)return s=a[r],!1;{if(!P.isPlainObject(a[t])||e==o)return a[t]!==j?s=a[t]:R.error(c.method,n),!1;a=a[t]}}})),P.isFunction(s)?r=s.apply(t,e):s!==j&&(r=s),Array.isArray(x)?x.push(r):x!==j?x=[x,r]:r!==j&&(x=r),s}};w?(y===j&&R.initialize(),R.invoke(T)):(y!==j&&y.invoke("destroy"),R.initialize())}),x!==j?x:this},P.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g,validate:/^[a-z_][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_-]+)\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,void document);
11
+ !function(P,O,j){"use strict";P.isWindow=P.isWindow||function(e){return null!=e&&e===e.window},O=void 0!==O&&O.Math==Math?O:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),P.api=P.fn.api=function(q){var x,e=P.isFunction(this)?P(O):P(this),A=e.selector||"",k=(new Date).getTime(),S=[],T=q,w="string"==typeof T,D=[].slice.call(arguments,1);return e.each(function(){var s,n,r,e,a,o,f=P.isPlainObject(q)?P.extend(!0,{},P.fn.api.settings,q):P.extend({},P.fn.api.settings),t=f.namespace,i=f.metadata,u=f.selector,c=f.error,d=f.className,l="."+t,g="module-"+t,p=P(this),m=p.closest(u.form),b=f.stateContext?P(f.stateContext):p,v=this,h=b[0],y=p.data(g),R={initialize:function(){w||(o=f.data,R.bind.events()),R.instantiate()},instantiate:function(){R.verbose("Storing instance of module",R),y=R,p.data(g,y)},destroy:function(){R.verbose("Destroying previous module for",v),p.removeData(g).off(l)},bind:{events:function(){var e=R.get.event();e?(R.verbose("Attaching API events to element",e),p.on(e+l,R.event.trigger)):"now"==f.on&&(R.debug("Querying API endpoint immediately"),R.query())}},decode:{json:function(e){if(e!==j&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(O.Storage!==j)return t=sessionStorage.getItem(e+R.get.normalizedData()),R.debug("Using cached response",e,f.data,t),R.decode.json(t);R.error(c.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?R.debug("Response empty, not caching",t):O.Storage===j?R.error(c.noStorage):(P.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+R.get.normalizedData(),t),R.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(R.is.disabled())R.debug("Element is disabled API request aborted");else{if(R.is.loading()){if(!f.interruptRequests)return void R.debug("Cancelling request, previous request is still pending");R.debug("Interrupting previous request"),R.abort()}if(f.defaultData&&P.extend(!0,f.urlData,R.get.defaultData()),f.serializeForm&&(f.data=R.add.formData(o||f.data)),!1===(n=R.get.settings()))return R.cancelled=!0,void R.error(c.beforeSend);if(R.cancelled=!1,(r=R.get.templatedURL())||R.is.mocked()){if((r=R.add.urlData(r))||R.is.mocked()){if(n.url=f.base+r,s=P.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+r,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),R.debug("Querying URL",s.url),R.verbose("Using AJAX settings",s),"local"===f.cache&&R.read.cachedResponse(r))return R.debug("Response returned from local cache"),R.request=R.create.request(),void R.request.resolveWith(h,[R.read.cachedResponse(r)]);f.throttle?f.throttleFirstRequest||R.timer?(R.debug("Throttling request",f.throttle),clearTimeout(R.timer),R.timer=setTimeout(function(){R.timer&&delete R.timer,R.debug("Sending throttled request",e,s.method),R.send.request()},f.throttle)):(R.debug("Sending request",e,s.method),R.send.request(),R.timer=setTimeout(function(){},f.throttle)):(R.debug("Sending request",e,s.method),R.send.request())}}else R.error(c.missingURL)}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!R.is.form()}},is:{disabled:function(){return 0<p.filter(u.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return p.is("form")||b.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return p.is("input")},loading:function(){return!!R.request&&"pending"==R.request.state()},abortedRequest:function(e){return e&&e.readyState!==j&&0===e.readyState?(R.verbose("XHR request determined to be aborted"),!0):(R.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return R.is.expectingJSON()&&P.isFunction(f.successTest)?(R.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(R.debug("Response passed success test",e),!0):(R.debug("Response failed success test",e),!1)):(R.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return R.cancelled||!1},successful:function(){return R.request&&"resolved"==R.request.state()},failure:function(){return R.request&&"rejected"==R.request.state()},complete:function(){return R.request&&("resolved"==R.request.state()||"rejected"==R.request.state())}},add:{urlData:function(o,s){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),s=s||f.urlData,e&&(R.debug("Looking for required URL variables",e),P.each(e,function(e,t){var r=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),n=P.isPlainObject(s)&&s[r]!==j?s[r]:p.data(r)!==j?p.data(r):b.data(r)!==j?b.data(r):s[r];if(n===j)return R.error(c.requiredParameter,r,o),o=!1;R.verbose("Found required variable",r,n),n=f.encodeParameters?R.get.urlEncodedValue(n):n,o=o.replace(t,n)})),t&&(R.debug("Looking for optional URL variables",e),P.each(t,function(e,t){var r=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),n=P.isPlainObject(s)&&s[r]!==j?s[r]:p.data(r)!==j?p.data(r):b.data(r)!==j?b.data(r):s[r];o=n!==j?(R.verbose("Optional variable Found",r,n),o.replace(t,n)):(R.verbose("Optional variable not found",r),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(r){var e,n,u,c,d,l={},t="formdata"===f.serializeForm;return r=r||o||f.data,e=P.isPlainObject(r),t?(l=new FormData(m[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(n=m.serializeArray(),u={},c={},d=function(e,t,r){return e[t]=r,e},P.each(P('input[type="file"]',m),function(e,r){P.each(P(r)[0].files,function(e,t){n.push({name:r.name,value:t})})}),P.each(n,function(e,t){if(f.regExp.validate.test(t.name)){var r,n="checkbox"===P('[name="'+t.name+'"]',m).attr("type"),o=parseFloat(t.value),s=n&&"on"===t.value||"true"===t.value||(String(o)===t.value?o:"false"!==t.value&&t.value),a=t.name.match(f.regExp.key)||[],i=t.name.replace(/\[\]$/,"");i in u?Array.isArray(c[i])?c[i].push(s):c[i]=[c[i],s]:(u[i]=0,c[i]=s),s=c[i];for(;(r=a.pop())!==j;)""!=r||Array.isArray(s)?f.regExp.fixed.test(r)?s=d([],r,s):f.regExp.named.test(r)&&(s=d({},r,s)):s=d([],u[i]++,s);l=P.extend(!0,l,s)}})),r=e?(R.debug("Extending existing data with form data",r,l),t?(P.each(Object.keys(r),function(e,t){l.append(t,r[t])}),l):P.extend(!0,{},r,l)):(R.debug("Adding form data",l),l)}},send:{request:function(){R.set.loading(),R.request=R.create.request(),R.is.mocked()?R.mockedXHR=R.create.mockedXHR():R.xhr=R.create.xhr(),f.onRequest.call(h,R.request,R.xhr)}},event:{trigger:function(e){R.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,r){var n=this,o=(new Date).getTime()-a,o=f.loadingDuration-o,s=!!P.isFunction(f.onResponse)&&(R.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(n,P.extend(!0,{},e)):f.onResponse.call(n,e)),o=0<o?o:0;s&&(R.debug("Modified API response in onResponse callback",f.onResponse,s,e),e=s),0<o&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.validResponse(e)?R.request.resolveWith(n,[e,r]):R.request.rejectWith(n,[r,"invalid"])},o)},fail:function(e,t,r){var n=this,o=(new Date).getTime()-a,o=f.loadingDuration-o;0<(o=0<o?o:0)&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.abortedRequest(e)?R.request.rejectWith(n,[e,"aborted",r]):R.request.rejectWith(n,[e,"error",t,r])},o)}},request:{done:function(e,t){R.debug("Successful API Response",e),"local"===f.cache&&r&&(R.write.cachedResponse(r,e),R.debug("Saving server response locally",R.cache)),f.onSuccess.call(h,e,p,t)},complete:function(e,t){var r,n;R.was.successful()?(n=e,r=t):n=R.get.responseFromXHR(r=e),R.remove.loading(),f.onComplete.call(h,n,p,r)},fail:function(e,t,r){var n=R.get.responseFromXHR(e),o=R.get.errorFromRequest(n,t,r);if("aborted"==t)return R.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),f.onAbort.call(h,t,p,e),!0;"invalid"==t?R.debug("JSON did not pass success test. A server-side error has most likely occurred",n):"error"==t&&e!==j&&(R.debug("XHR produced a server error",t,r),(e.status<200||300<=e.status)&&r!==j&&""!==r&&R.error(c.statusMessage+r,s.url),f.onError.call(h,o,p,e)),f.errorDuration&&"aborted"!==t&&(R.debug("Adding error state"),R.set.error(),R.should.removeError()&&setTimeout(R.remove.error,f.errorDuration)),R.debug("API Request failed",o,e),f.onFailure.call(h,n,p,e)}}},create:{request:function(){return P.Deferred().always(R.event.request.complete).done(R.event.request.done).fail(R.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,r=P.Deferred().always(R.event.xhr.complete).done(R.event.xhr.done).fail(R.event.xhr.fail);return e?(e=P.isFunction(e)?(R.debug("Using specified synchronous callback",e),e.call(h,n)):(R.debug("Using settings specified response",e),e),r.resolveWith(h,[e,!1,{responseText:e}])):P.isFunction(t)&&(e=function(e){R.debug("Async callback returned response",e),e?r.resolveWith(h,[e,!1,{responseText:e}]):r.rejectWith(h,[{responseText:e},!1,!1])},R.debug("Using specified async response callback",t),t.call(h,n,e)),r},xhr:function(){var e=P.ajax(s).always(R.event.xhr.always).done(R.event.xhr.done).fail(R.event.xhr.fail);return R.verbose("Created server request",e,s),e}},set:{error:function(){R.verbose("Adding error state to element",b),b.addClass(d.error)},loading:function(){R.verbose("Adding loading state to element",b),b.addClass(d.loading),a=(new Date).getTime()}},remove:{error:function(){R.verbose("Removing error state from element",b),b.removeClass(d.error)},loading:function(){R.verbose("Removing loading state from element",b),b.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!P.isPlainObject(e)&&(R.is.expectingJSON()?R.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,r){return P.isPlainObject(e)&&e.error!==j?e.error:f.error[t]!==j?f.error[t]:r},request:function(){return R.request||!1},xhr:function(){return R.xhr||!1},settings:function(){var e=f.beforeSend.call(p,f);return e&&(e.success!==j&&(R.debug("Legacy success callback detected",e),R.error(c.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==j&&(R.debug("Legacy failure callback detected",e),R.error(c.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==j&&(R.debug("Legacy complete callback detected",e),R.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),e===j&&R.error(c.noReturnedValue),!1===e?e:e!==j?P.extend(!0,{},e):P.extend(!0,{},f)},urlEncodedValue:function(e){var t=O.decodeURIComponent(e),r=O.encodeURIComponent(e);return t!==e?(R.debug("URL value is already encoded, avoiding double encoding",e),e):(R.verbose("Encoding value using encodeURIComponent",e,r),r)},defaultData:function(){var e={};return P.isWindow(v)||(R.is.input()?e.value=p.val():R.is.form()||(e.text=p.text())),e},event:function(){return P.isWindow(v)||"now"==f.on?(R.debug("API called without element, no events attached"),!1):"auto"==f.on?p.is("input")?v.oninput!==j?"input":v.onpropertychange!==j?"propertychange":"keyup":p.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||p.data(i.action)||f.action||!1,r=p.data(i.url)||f.url||!1)return R.debug("Using specified url",r),r;if(e){if(R.debug("Looking up url for action",e,f.api),f.api[e]===j&&!R.is.mocked())return void R.error(c.missingAction,f.action,f.api);r=f.api[e]}else R.is.form()&&(r=p.attr("action")||b.attr("action")||!1,R.debug("No url or action specified, defaulting to form action",r));return r}},abort:function(){var e=R.get.xhr();e&&"resolved"!==e.state()&&(R.debug("Cancelling API request"),e.abort())},reset:function(){R.remove.error(),R.remove.loading()},setting:function(e,t){if(R.debug("Changing setting",e,t),P.isPlainObject(e))P.extend(!0,f,e);else{if(t===j)return f[e];P.isPlainObject(f[e])?P.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(P.isPlainObject(e))P.extend(!0,R,e);else{if(t===j)return R[e];R[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,f.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),R.verbose.apply(console,arguments)))},error:function(){f.silent||(R.error=Function.prototype.bind.call(console.error,console,f.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,r;f.performance&&(r=(t=(new Date).getTime())-(k||t),k=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout(R.performance.display,500)},display:function(){var e=f.name+":",r=0;k=!1,clearTimeout(R.performance.timer),P.each(S,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",A&&(e+=" '"+A+"'"),(console.group!==j||console.table!==j)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):P.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var o,s,r,a=y;return e=e||D,t=v||t,"string"==typeof n&&a!==j&&(n=n.split(/[\. ]/),o=n.length-1,P.each(n,function(e,t){var r=e!=o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(P.isPlainObject(a[r])&&e!=o)a=a[r];else{if(a[r]!==j)return s=a[r],!1;{if(!P.isPlainObject(a[t])||e==o)return a[t]!==j?s=a[t]:R.error(c.method,n),!1;a=a[t]}}})),P.isFunction(s)?r=s.apply(t,e):s!==j&&(r=s),Array.isArray(x)?x.push(r):x!==j?x=[x,r]:r!==j&&(x=r),s}};w?(y===j&&R.initialize(),R.invoke(T)):(y!==j&&y.invoke("destroy"),R.initialize())}),x!==j?x:this},P.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g,validate:/^[a-z_][a-z0-9_-]*(?:\[[a-z0-9_-]*\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,void document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Breadcrumb
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Breadcrumb
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Breadcrumb
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Breadcrumb
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Button
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Button
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Button
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Button
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Calendar
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Calendar
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Calendar
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Calendar
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Calendar
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Calendar
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.0-beta.282+54be6de
2
+ * # Fomantic UI - 2.9.0-beta.285+da049ae
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * http://fomantic-ui.com/
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Card
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Card
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Card
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Card
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Checkbox
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Checkbox
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Checkbox
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Checkbox
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Checkbox
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Checkbox
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.0-beta.282+54be6de
2
+ * # Fomantic UI - 2.9.0-beta.285+da049ae
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * http://fomantic-ui.com/
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Comment
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Comment
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Comment
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Comment
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Container
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Container
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Container
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Container
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Dimmer
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Dimmer
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Dimmer
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Dimmer
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Dimmer
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Dimmer
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.0-beta.282+54be6de
2
+ * # Fomantic UI - 2.9.0-beta.285+da049ae
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * http://fomantic-ui.com/
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Divider
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Divider
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Divider
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Divider
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Dropdown
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Dropdown
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Dropdown
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Dropdown
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1074,7 +1074,7 @@ $.fn.dropdown = function(parameters) {
1074
1074
  settings.preserveHTML
1075
1075
  )
1076
1076
  ;
1077
- $input.append('<option value="' + value + '">' + name + '</option>');
1077
+ $input.append('<option value="' + value + '"' + (item.selected === true ? ' selected' : '') + '>' + name + '</option>');
1078
1078
  });
1079
1079
  module.observe.select();
1080
1080
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.0-beta.282+54be6de - Dropdown
2
+ * # Fomantic-UI 2.9.0-beta.285+da049ae - Dropdown
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *