LearnPress – WordPress LMS Plugin - Version 4.0.5

Version Description

~ Fixed: error "Duplicate entry" for case upgrade LP4, if user install LP4 and save setting before Upgrade Database ~ Fixed: get option 'avatar_dimensions' set default value if user not set ~ Fixed: get option 'course_thumbnail_dimensions' set default value if user not set ~ Modify template Profile ~ Fixed: tool "Reset course progress" ~ Fixed: get options "Courses per page"

Download this release

Release Info

Developer ThimPress
Plugin Icon 128x128 LearnPress – WordPress LMS Plugin
Version 4.0.5
Comparing to
See all releases

Code changes from version 4.0.3 to 4.0.5

assets/css/learnpress.css CHANGED
@@ -1573,73 +1573,15 @@
1573
  width: 100%;
1574
  }
1575
 
1576
- #learn-press-profile {
1577
- background: #fff;
1578
- }
1579
-
1580
- #learn-press-profile .wrapper-profile-header {
1581
- color: #fff;
1582
- background: var(--lp-secondary-color);
1583
  }
1584
 
1585
- #learn-press-profile .wrapper-profile-header #profile-header .lp-profile-header__inner {
1586
- width: 90%;
1587
- min-height: 252px;
1588
- margin: 0 auto;
1589
- padding: 82px 200px 30px 240px;
1590
- }
1591
-
1592
- #learn-press-profile .wrapper-profile-header #profile-header .lp-profile-header__inner .lp-profile-username {
1593
- padding-bottom: 18px;
1594
- font-size: 18px;
1595
- font-weight: 500;
1596
- text-transform: capitalize;
1597
- }
1598
-
1599
- #learn-press-profile .wrapper-profile-header #profile-header .lp-profile-header__inner .lp-profile-user-bio {
1600
- font-size: 16px;
1601
- font-weight: 300;
1602
- line-height: 26px;
1603
- }
1604
-
1605
- @media (max-width: 990px) {
1606
- #learn-press-profile .wrapper-profile-header #profile-header .lp-profile-header__inner {
1607
- width: 100%;
1608
- padding: 65px 0 30px 0;
1609
- text-align: center;
1610
- }
1611
- }
1612
-
1613
- @media (max-width: 767px) {
1614
- #learn-press-profile .wrapper-profile-header #profile-header .lp-profile-header__inner {
1615
- padding: 30px 0;
1616
- }
1617
- }
1618
-
1619
- #learn-press-profile #profile-sidebar {
1620
- float: left;
1621
- width: 270px;
1622
- margin-top: -212px;
1623
- border-radius: 4px;
1624
  background: #fff;
1625
- box-shadow: 0 15px 20px 0 rgba(0, 0, 0, 0.1);
1626
- }
1627
-
1628
- @media (max-width: 990px) {
1629
- #learn-press-profile #profile-sidebar {
1630
- width: 50%;
1631
- margin-top: 58px;
1632
- }
1633
- }
1634
-
1635
- @media (max-width: 767px) {
1636
- #learn-press-profile #profile-sidebar {
1637
- width: 100%;
1638
- }
1639
- }
1640
-
1641
- #learn-press-profile .lp-user-profile-avatar {
1642
- margin: 25px;
1643
  }
1644
 
1645
  #learn-press-profile .lp-user-profile-avatar img {
@@ -1653,8 +1595,7 @@
1653
  display: flex;
1654
  position: relative;
1655
  z-index: 1;
1656
- margin: -47px 26px 0 26px;
1657
- padding-bottom: 30px;
1658
  justify-content: center;
1659
  -webkit-flex-wrap: wrap;
1660
  -ms-flex-wrap: wrap;
@@ -1683,6 +1624,113 @@
1683
  background: var(--lp-primary-color);
1684
  }
1685
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1686
  #learn-press-profile #profile-nav .lp-profile-nav-tabs {
1687
  margin: 0;
1688
  padding: 0;
@@ -1821,6 +1869,81 @@
1821
  color: #ffb606;
1822
  }
1823
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1824
  #learn-press-profile #profile-content {
1825
  float: right;
1826
  width: calc(100% - 300px);
@@ -1836,11 +1959,22 @@
1836
 
1837
  @media (max-width: 767px) {
1838
  #learn-press-profile #profile-content .learn-press-tabs .learn-press-tabs__nav {
1839
- display: grid;
 
1840
  border: 0;
1841
  }
 
 
 
 
 
1842
  #learn-press-profile #profile-content .learn-press-tabs .learn-press-tabs__nav .learn-press-tabs__tab {
1843
  border-right: 0;
 
 
 
 
 
1844
  }
1845
  }
1846
 
@@ -8238,59 +8372,16 @@ body.admin-bar #popup-course {
8238
  margin: 0 10px 0 10px;
8239
  }
8240
 
8241
- #popup-content #learn-press-item-comments {
8242
- visibility: hidden;
8243
- overflow: auto;
8244
- position: absolute;
8245
- z-index: 99;
8246
- top: 0;
8247
- right: 0;
8248
- left: 0;
8249
- opacity: 0;
8250
- background: #fff;
8251
- transition: all 0.3s ease;
8252
- pointer-events: none;
8253
- }
8254
-
8255
- #popup-content #learn-press-item-comments .learn-press-comments {
8256
- width: 800px;
8257
- max-width: 90%;
8258
- margin: 20px auto;
8259
- padding: 50px;
8260
- }
8261
-
8262
- #popup-content.open-comments #learn-press-content-item {
8263
- display: none;
8264
- }
8265
-
8266
- #popup-content.open-comments #learn-press-item-comments {
8267
- visibility: visible;
8268
- opacity: 1;
8269
- pointer-events: visible;
8270
- }
8271
-
8272
- body.learnpress #popup-content > a.lp-lesson-comment-btn {
8273
- position: fixed;
8274
- z-index: 100;
8275
- right: 40px;
8276
- bottom: 60px;
8277
- height: 42px;
8278
- margin: 0;
8279
- padding: 0 18px;
8280
- border-radius: 4px;
8281
- color: #fff;
8282
- background-color: var(--lp-primary-color);
8283
- box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.16);
8284
- font-size: 15px;
8285
- font-weight: 400;
8286
- line-height: 42px;
8287
- cursor: pointer;
8288
  }
8289
 
8290
- body.learnpress #popup-content > a.lp-lesson-comment-btn:focus {
8291
- outline: none;
8292
- background-color: var(--lp-primary-color);
8293
- text-decoration: none;
8294
  }
8295
 
8296
  .learn-press-progress {
1573
  width: 100%;
1574
  }
1575
 
1576
+ body div.entry-content > div.learnpress {
1577
+ --responsive--aligndefault-width: 100%;
1578
+ max-width: var(--lp-content-width, 100%);
 
 
 
 
1579
  }
1580
 
1581
+ #learn-press-profile {
1582
+ overflow: hidden;
1583
+ position: relative;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1584
  background: #fff;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1585
  }
1586
 
1587
  #learn-press-profile .lp-user-profile-avatar img {
1595
  display: flex;
1596
  position: relative;
1597
  z-index: 1;
1598
+ margin-top: -17px;
 
1599
  justify-content: center;
1600
  -webkit-flex-wrap: wrap;
1601
  -ms-flex-wrap: wrap;
1624
  background: var(--lp-primary-color);
1625
  }
1626
 
1627
+ #learn-press-profile .wrapper-profile-header {
1628
+ color: #fff;
1629
+ background: var(--lp-secondary-color);
1630
+ }
1631
+
1632
+ #learn-press-profile .wrapper-profile-header .lp-profile-content-area {
1633
+ position: relative;
1634
+ min-height: 345px;
1635
+ padding-top: 50px;
1636
+ }
1637
+
1638
+ #learn-press-profile .wrapper-profile-header .lp-profile-left {
1639
+ width: 270px;
1640
+ position: absolute;
1641
+ bottom: 0;
1642
+ left: 0;
1643
+ padding: 20px;
1644
+ background: #fff;
1645
+ border: 1px solid rgba(0, 0, 0, 0.1);
1646
+ border-bottom: 0;
1647
+ }
1648
+
1649
+ #learn-press-profile .wrapper-profile-header .lp-profile-right {
1650
+ margin-left: 270px;
1651
+ padding-left: 35px;
1652
+ padding-right: 15px;
1653
+ }
1654
+
1655
+ #learn-press-profile .wrapper-profile-header .lp-profile-right .lp-profile-username {
1656
+ padding-bottom: 18px;
1657
+ font-size: 18px;
1658
+ font-weight: 500;
1659
+ text-transform: capitalize;
1660
+ }
1661
+
1662
+ #learn-press-profile .wrapper-profile-header .lp-profile-right .lp-profile-user-bio {
1663
+ font-size: 16px;
1664
+ font-weight: 300;
1665
+ line-height: 26px;
1666
+ }
1667
+
1668
+ @media (max-width: 990px) {
1669
+ #learn-press-profile .wrapper-profile-header .lp-profile-content-area {
1670
+ min-height: inherit;
1671
+ padding: 20px 15px;
1672
+ }
1673
+ #learn-press-profile .wrapper-profile-header .lp-profile-left {
1674
+ position: static;
1675
+ float: left;
1676
+ }
1677
+ #learn-press-profile .wrapper-profile-header .lp-profile-right {
1678
+ width: calc(100% - 270px);
1679
+ float: right;
1680
+ margin-left: 0;
1681
+ }
1682
+ }
1683
+
1684
+ @media (max-width: 768px) {
1685
+ #learn-press-profile .wrapper-profile-header .lp-profile-left {
1686
+ width: 220px;
1687
+ }
1688
+ #learn-press-profile .wrapper-profile-header .lp-profile-right {
1689
+ width: calc(100% - 220px);
1690
+ }
1691
+ #learn-press-profile .wrapper-profile-header .lp-user-profile-socials {
1692
+ margin-left: -5px;
1693
+ margin-right: -5px;
1694
+ }
1695
+ #learn-press-profile .wrapper-profile-header .lp-user-profile-socials a {
1696
+ width: 36px;
1697
+ height: 36px;
1698
+ margin: 0 5px;
1699
+ line-height: 36px;
1700
+ }
1701
+ }
1702
+
1703
+ @media (max-width: 500px) {
1704
+ #learn-press-profile .wrapper-profile-header .lp-profile-left {
1705
+ float: none;
1706
+ margin: 0 auto;
1707
+ }
1708
+ #learn-press-profile .wrapper-profile-header .lp-profile-right {
1709
+ width: 100%;
1710
+ text-align: center;
1711
+ padding-top: 30px;
1712
+ }
1713
+ }
1714
+
1715
+ #learn-press-profile #profile-sidebar {
1716
+ float: left;
1717
+ width: 270px;
1718
+ margin-top: 0;
1719
+ border: 1px solid rgba(0, 0, 0, 0.1);
1720
+ border-top: 0;
1721
+ background: #fff;
1722
+ }
1723
+
1724
+ @media (max-width: 990px) {
1725
+ #learn-press-profile #profile-sidebar {
1726
+ width: 100%;
1727
+ margin-top: 58px;
1728
+ }
1729
+ #learn-press-profile #profile-sidebar .lp-user-profile-avatar {
1730
+ max-width: 150px;
1731
+ }
1732
+ }
1733
+
1734
  #learn-press-profile #profile-nav .lp-profile-nav-tabs {
1735
  margin: 0;
1736
  padding: 0;
1869
  color: #ffb606;
1870
  }
1871
 
1872
+ @media (max-width: 990px) {
1873
+ #learn-press-profile #profile-nav {
1874
+ overflow-x: scroll;
1875
+ border-top: 1px solid rgba(204, 204, 204, 0.3);
1876
+ }
1877
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs {
1878
+ width: max-content;
1879
+ }
1880
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs:after {
1881
+ display: table;
1882
+ content: "";
1883
+ clear: both;
1884
+ }
1885
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li {
1886
+ border: none;
1887
+ border-right: 1px solid rgba(204, 204, 204, 0.3);
1888
+ float: left;
1889
+ }
1890
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li > a {
1891
+ height: auto;
1892
+ padding: 0 20px 0 45px;
1893
+ }
1894
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li > a:after {
1895
+ margin-left: 10px;
1896
+ }
1897
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li.has-child a:after {
1898
+ content: "\f077";
1899
+ }
1900
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li.active a {
1901
+ padding-left: 45px;
1902
+ }
1903
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li.active a:after {
1904
+ content: "\f078";
1905
+ }
1906
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li.active.has-child ul {
1907
+ display: none;
1908
+ width: max-content;
1909
+ transform: translateX(-20%);
1910
+ }
1911
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li.active.has-child ul:after {
1912
+ display: table;
1913
+ content: "";
1914
+ clear: both;
1915
+ box-shadow: 0 0 0;
1916
+ }
1917
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li.active.has-child ul li {
1918
+ float: left;
1919
+ border-right: 1px solid rgba(204, 204, 204, 0.3);
1920
+ }
1921
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li.active.has-child ul li:last-child {
1922
+ border-right: none;
1923
+ }
1924
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li.active.has-child ul li a {
1925
+ padding: 0 10px;
1926
+ }
1927
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs li:hover ul {
1928
+ display: none !important;
1929
+ }
1930
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs li:not(.has-child) > a:after {
1931
+ display: none;
1932
+ }
1933
+ }
1934
+
1935
+ @media (max-width: 560px) {
1936
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li {
1937
+ max-width: 80px;
1938
+ }
1939
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li > a {
1940
+ font-size: 0;
1941
+ }
1942
+ #learn-press-profile #profile-nav .lp-profile-nav-tabs > li > a:after {
1943
+ margin-left: 0;
1944
+ }
1945
+ }
1946
+
1947
  #learn-press-profile #profile-content {
1948
  float: right;
1949
  width: calc(100% - 300px);
1959
 
1960
  @media (max-width: 767px) {
1961
  #learn-press-profile #profile-content .learn-press-tabs .learn-press-tabs__nav {
1962
+ display: block;
1963
+ width: 100%;
1964
  border: 0;
1965
  }
1966
+ #learn-press-profile #profile-content .learn-press-tabs .learn-press-tabs__nav:after {
1967
+ content: "";
1968
+ clear: both;
1969
+ display: table;
1970
+ }
1971
  #learn-press-profile #profile-content .learn-press-tabs .learn-press-tabs__nav .learn-press-tabs__tab {
1972
  border-right: 0;
1973
+ float: left;
1974
+ }
1975
+ #learn-press-profile #profile-content .learn-press-tabs .learn-press-tabs__nav .learn-press-tabs__tab label {
1976
+ padding-right: 25px;
1977
+ padding-left: 25px;
1978
  }
1979
  }
1980
 
8372
  margin: 0 10px 0 10px;
8373
  }
8374
 
8375
+ .learn-press-comments {
8376
+ width: 792px;
8377
+ max-width: 100%;
8378
+ margin: 0 auto;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8379
  }
8380
 
8381
+ @media (max-width: 1024px) {
8382
+ .learn-press-comments {
8383
+ width: 100%;
8384
+ }
8385
  }
8386
 
8387
  .learn-press-progress {
assets/js/dist/admin/editor/course.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}({0:function(t,e,n){"use strict";function i(t){var e=window.jQuery||jQuery,n=Vue.http;t=e.extend({ns:"LPRequest",store:!1},t||{});var i=null;LP.Request=function(o){return i=e("#publishing-action"),o.id=t.store.getters.id,o.nonce=t.store.getters.nonce,o["lp-ajax"]=t.store.getters.action,o.code=t.store.getters.code,i.find("#publish").addClass("disabled"),i.find(".spinner").addClass("is-active"),i.addClass("code-"+o.code),n.post(t.store.getters.urlAjax,o,{emulateJSON:!0,params:{namespace:t.ns,code:o.code}})},n.interceptors.push((function(e,n){e.params.namespace===t.ns?(t.store.dispatch("newRequest"),n((function(n){jQuery.isPlainObject(n.body)||(n.body=LP.parseJSON(n.body)),n.body.success||!1?t.store.dispatch("requestCompleted","successful"):t.store.dispatch("requestCompleted","failed"),i.removeClass("code-"+e.params.code),i.attr("class")||(i.find("#publish").removeClass("disabled"),i.find(".spinner").removeClass("is-active"))}))):n()}))}n.d(e,"a",(function(){return i}))},1:function(t,e,n){"use strict";var i=window.jQuery||jQuery;e.a=function(t){return{namespaced:!0,state:i.extend({},t),getters:{all:function(t){return t}}}}},11:function(t,e,n){"use strict";n.r(e);var i=n(0),o={status:function(t){return t.status},pagination:function(t){return t.pagination},items:function(t,e){return t.items.map((function(t){var n=e.addedItems.find((function(e){return t.id===e.id}));return t.added=!!n,t}))},addedItems:function(t){return t.addedItems},isOpen:function(t){return t.open},types:function(t){return t.types},section:function(t){return t.sectionId}},s={TOGGLE:function(t){t.open=!t.open},SET_SECTION:function(t,e){t.sectionId=e},SET_LIST_ITEMS:function(t,e){t.items=e},ADD_ITEM:function(t,e){t.addedItems.push(e)},REMOVE_ADDED_ITEM:function(t,e){t.addedItems.forEach((function(n,i){n.id===e.id&&t.addedItems.splice(i,1)}))},RESET:function(t){t.addedItems=[],t.items=[]},UPDATE_PAGINATION:function(t,e){t.pagination=e},SEARCH_ITEMS_REQUEST:function(t){t.status="loading"},SEARCH_ITEMS_SUCCESS:function(t){t.status="successful"},SEARCH_ITEMS_FAILURE:function(t){t.status="failed"}},c={toggle:function(t){t.commit("TOGGLE")},open:function(t,e){t.commit("SET_SECTION",e),t.commit("RESET"),t.commit("TOGGLE")},searchItems:function(t,e){t.commit("SEARCH_ITEMS_REQUEST"),LP.Request({type:"search-items",query:e.query,item_type:e.type,page:e.page,exclude:JSON.stringify([])}).then((function(e){var n=e.body;if(n.success){var i=n.data;t.commit("SET_LIST_ITEMS",i.items),t.commit("UPDATE_PAGINATION",i.pagination),t.commit("SEARCH_ITEMS_SUCCESS")}}),(function(e){t.commit("SEARCH_ITEMS_FAILURE"),console.error(e)}))},addItem:function(t,e){t.commit("ADD_ITEM",e)},removeItem:function(t,e){t.commit("REMOVE_ADDED_ITEM",e)},addItemsToSection:function(t){var e=t.getters.addedItems;e.length>0&&LP.Request({type:"add-items-to-section",section_id:t.getters.section,items:JSON.stringify(e)}).then((function(e){var n=e.body;if(n.success){t.commit("TOGGLE");var i=n.data;t.commit("ss/UPDATE_SECTION_ITEMS",{section_id:t.getters.section,items:i},{root:!0})}}),(function(t){console.error(t)}))}},u=window.jQuery||jQuery,r=function(t){var e=u.extend({},t.chooseItems);return e.sectionId=!1,e.pagination="",e.status="",{namespaced:!0,state:e,getters:o,mutations:s,actions:c}},d=window.jQuery||jQuery,a={toggleAllSections:function(t){t.getters.isHiddenAllSections?t.commit("OPEN_ALL_SECTIONS"):t.commit("CLOSE_ALL_SECTIONS"),LP.Request({type:"hidden-sections",hidden:t.getters.hiddenSections})},updateSectionsOrder:function(t,e){LP.Request({type:"sort-sections",order:JSON.stringify(e)}).then((function(e){var n=e.body.data;t.commit("SORT_SECTION",n)}),(function(t){console.error(t)}))},toggleSection:function(t,e){e.open?t.commit("CLOSE_SECTION",e):t.commit("OPEN_SECTION",e),LP.Request({type:"hidden-sections",hidden:t.getters.hiddenSections})},updateSection:function(t,e){t.commit("UPDATE_SECTION_REQUEST",e.id),LP.Request({type:"update-section",section:JSON.stringify(e)}).then((function(){t.commit("UPDATE_SECTION_SUCCESS",e.id)})).catch((function(){t.commit("UPDATE_SECTION_FAILURE",e.id)}))},removeSection:function(t,e){t.commit("REMOVE_SECTION",e.index),LP.Request({type:"remove-section",section_id:e.section.id}).then((function(t){t.body}),(function(t){console.error(t)}))},newSection:function(t,e){var n={type:"new-section",section_name:e,temp_id:LP.uniqueId()};t.commit("ADD_NEW_SECTION",{id:n.temp_id,items:[],open:!1,title:n.section_name}),LP.Request(n).then((function(e){var n=e.body;if(n.success){var i=d.extend({},n.data,{open:!0});t.commit("ADD_NEW_SECTION",i)}}),(function(t){console.error(t)}))},updateSectionItem:function(t,e){t.commit("UPDATE_SECTION_ITEM_REQUEST",e.item.id),LP.Request({type:"update-section-item",section_id:e.section_id,item:JSON.stringify(e.item)}).then((function(n){t.commit("UPDATE_SECTION_ITEM_SUCCESS",e.item.id);var i=n.body;if(i.success){var o=i.data;t.commit("UPDATE_SECTION_ITEM",{section_id:e.section_id,item:o})}}),(function(n){t.commit("UPDATE_SECTION_ITEM_FAILURE",e.item.id),console.error(n)}))},removeSectionItem:function(t,e){var n=e.item.id;t.commit("REMOVE_SECTION_ITEM",e),e.item.temp_id=0,LP.Request({type:"remove-section-item",section_id:e.section_id,item_id:n}).then((function(){t.commit("REMOVE_SECTION_ITEM",e)}))},deleteSectionItem:function(t,e){var n=e.item.id;t.commit("REMOVE_SECTION_ITEM",e),e.item.temp_id=0,LP.Request({type:"delete-section-item",section_id:e.section_id,item_id:n}).then((function(){t.commit("REMOVE_SECTION_ITEM",e)}))},newSectionItem:function(t,e){t.commit("APPEND_EMPTY_ITEM_TO_SECTION",e),LP.Request({type:"new-section-item",section_id:e.section_id,item:JSON.stringify(e.item)}).then((function(n){var i=n.body;if(i.success){var o={};d.each(i.data,(function(t,e){o[e.old_id?e.old_id:e.id]=e})),t.commit("UPDATE_ITEM_SECTION_BY_ID",{section_id:e.section_id,items:o})}}),(function(t){console.error(t)}))},updateSectionItems:function(t,e){var n=t.state;LP.Request({type:"update-section-items",section_id:e.section_id,items:JSON.stringify(e.items),last_section:n.sections[n.sections.length-1]===e.section_id}).then((function(t){t.body.success}),(function(t){console.error(t)}))}},E={SORT_SECTION:function(t,e){t.sections=t.sections.map((function(t){return t.order=e[t.id],t}))},SET_SECTIONS:function(t,e){t.sections=e},ADD_NEW_SECTION:function(t,e){var n;void 0===e.open&&(e.open=!0),e.temp_id&&t.sections.map((function(t,i){if(e.temp_id==t.id)return n=i,!1})),void 0!==n?$Vue.set(t.sections,n,e):t.sections.push(e)},ADD_EMPTY_SECTION:function(t,e){e.open=!0,t.sections.push(e)},REMOVE_SECTION:function(t,e){t.sections.splice(e,1)},REMOVE_SECTION_ITEM:function(t,e){var n=t.sections.find((function(t){return t.id===e.section_id})).items||[],i=e.item,o=-1;n.forEach((function(t,e){t.id===i.id&&(o=e)})),-1!==o&&(i.temp_id?n[o].id=i.temp_id:n.splice(o,1))},UPDATE_SECTION_ITEMS:function(t,e){var n=t.sections.find((function(t){return parseInt(t.id)===parseInt(e.section_id)}));n&&(n.items=e.items)},UPDATE_SECTION_ITEM:function(t,e){},CLOSE_SECTION:function(t,e){t.sections.forEach((function(n,i){e.id===n.id&&(t.sections[i].open=!1)}))},OPEN_SECTION:function(t,e){t.sections.forEach((function(n,i){e.id===n.id&&(t.sections[i].open=!0)}))},OPEN_ALL_SECTIONS:function(t){t.sections=t.sections.map((function(t){return t.open=!0,t}))},CLOSE_ALL_SECTIONS:function(t){t.sections=t.sections.map((function(t){return t.open=!1,t}))},UPDATE_SECTION_REQUEST:function(t,e){$Vue.set(t.statusUpdateSection,e,"updating")},UPDATE_SECTION_SUCCESS:function(t,e){$Vue.set(t.statusUpdateSection,e,"successful")},UPDATE_SECTION_FAILURE:function(t,e){$Vue.set(t.statusUpdateSection,e,"failed")},UPDATE_SECTION_ITEM_REQUEST:function(t,e){$Vue.set(t.statusUpdateSectionItem,e,"updating")},UPDATE_SECTION_ITEM_SUCCESS:function(t,e){$Vue.set(t.statusUpdateSectionItem,e,"successful")},UPDATE_SECTION_ITEM_FAILURE:function(t,e){$Vue.set(t.statusUpdateSectionItem,e,"failed")},APPEND_EMPTY_ITEM_TO_SECTION:function(t,e){var n=t.sections.find((function(t){return parseInt(t.id)===parseInt(e.section_id)}));n&&n.items.push({id:e.item.id,title:e.item.title,type:"empty-item"})},UPDATE_ITEM_SECTION_BY_ID:function(t,e){var n=t.sections.find((function(t){return parseInt(t.id)===parseInt(e.section_id)}));if(n)for(var i=0;i<n.items.length;i++)try{if(!n.items[i])continue;var o=n.items[i].id;o&&e.items[o]&&$Vue.set(n.items,i,e.items[o])}catch(t){console.log(t)}}},m={sections:function(t){return t.sections||[]},urlEdit:function(t){return t.urlEdit},hiddenSections:function(t){return t.sections.filter((function(t){return!t.open})).map((function(t){return parseInt(t.id)}))},isHiddenAllSections:function(t,e){var n=e.sections;return e.hiddenSections.length===n.length},statusUpdateSection:function(t){return t.statusUpdateSection},statusUpdateSectionItem:function(t){return t.statusUpdateSectionItem}},f=window.jQuery,_=function(t){var e=f.extend({},t.sections);return e.statusUpdateSection={},e.statusUpdateSectionItem={},e.sections=e.sections.map((function(t){var n=e.hidden_sections.find((function(e){return parseInt(t.id)===parseInt(e)}));return t.open=!n,t})),{namespaced:!0,state:e,getters:m,mutations:E,actions:a}},S=n(1),T={heartbeat:function(t){return t.heartbeat},action:function(t){return t.action},id:function(t){return t.course_id},autoDraft:function(t){return t.auto_draft},disable_curriculum:function(t){return t.disable_curriculum},status:function(t){return t.status||"error"},currentRequest:function(t){return t.countCurrentRequest||0},urlAjax:function(t){return t.ajax},nonce:function(t){return t.nonce}},p={UPDATE_HEART_BEAT:function(t,e){t.heartbeat=!!e},UPDATE_AUTO_DRAFT_STATUS:function(t,e){t.auto_draft=e},UPDATE_STATUS:function(t,e){t.status=e},INCREASE_NUMBER_REQUEST:function(t){t.countCurrentRequest++},DECREASE_NUMBER_REQUEST:function(t){t.countCurrentRequest--}},I={heartbeat:function(t){LP.Request({type:"heartbeat"}).then((function(e){var n=e.body;t.commit("UPDATE_HEART_BEAT",!!n.success)}),(function(e){t.commit("UPDATE_HEART_BEAT",!1)}))},draftCourse:function(t,e){t.getters.autoDraft&&LP.Request({type:"draft-course",course:JSON.stringify(e)}).then((function(e){e.body.success&&t.commit("UPDATE_AUTO_DRAFT_STATUS",!1)}))},newRequest:function(t){t.commit("INCREASE_NUMBER_REQUEST"),t.commit("UPDATE_STATUS","loading"),window.onbeforeunload=function(){return""}},requestCompleted:function(t,e){t.commit("DECREASE_NUMBER_REQUEST"),0===t.getters.currentRequest&&(t.commit("UPDATE_STATUS",e),window.onbeforeunload=null)}},l=window.jQuery,O=function(t){var e=l.extend({},t.root);return e.status="success",e.heartbeat=!0,e.countCurrentRequest=0,{state:e,getters:T,mutations:p,actions:I,modules:{ci:r(t),i18n:Object(S.a)(t.i18n),ss:_(t)}}};window.$Vue=window.$Vue||Vue,window.$Vuex=window.$Vuex||Vuex,(0,window.jQuery)(document).ready((function(){window.LP_Curriculum_Store=new $Vuex.Store(O(lpAdminCourseEditorSettings)),Object(i.a)({ns:"LPCurriculumRequest",store:LP_Curriculum_Store}),setTimeout((function(){window.LP_Course_Editor=new $Vue({el:"#admin-editor-lp_course",template:"<lp-course-editor></lp-course-editor>"})}),100)}))}});
1
+ !function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=10)}({0:function(t,e,n){"use strict";function i(t){var e=window.jQuery||jQuery,n=Vue.http;t=e.extend({ns:"LPRequest",store:!1},t||{});var i=null;LP.Request=function(o){return i=e("#publishing-action"),o.id=t.store.getters.id,o.nonce=t.store.getters.nonce,o["lp-ajax"]=t.store.getters.action,o.code=t.store.getters.code,i.find("#publish").addClass("disabled"),i.find(".spinner").addClass("is-active"),i.addClass("code-"+o.code),n.post(t.store.getters.urlAjax,o,{emulateJSON:!0,params:{namespace:t.ns,code:o.code}})},n.interceptors.push((function(e,n){e.params.namespace===t.ns?(t.store.dispatch("newRequest"),n((function(n){jQuery.isPlainObject(n.body)||(n.body=LP.parseJSON(n.body)),n.body.success||!1?t.store.dispatch("requestCompleted","successful"):t.store.dispatch("requestCompleted","failed"),i.removeClass("code-"+e.params.code),i.attr("class")||(i.find("#publish").removeClass("disabled"),i.find(".spinner").removeClass("is-active"))}))):n()}))}n.d(e,"a",(function(){return i}))},1:function(t,e,n){"use strict";var i=window.jQuery||jQuery;e.a=function(t){return{namespaced:!0,state:i.extend({},t),getters:{all:function(t){return t}}}}},10:function(t,e,n){"use strict";n.r(e);var i=n(0),o={status:function(t){return t.status},pagination:function(t){return t.pagination},items:function(t,e){return t.items.map((function(t){var n=e.addedItems.find((function(e){return t.id===e.id}));return t.added=!!n,t}))},addedItems:function(t){return t.addedItems},isOpen:function(t){return t.open},types:function(t){return t.types},section:function(t){return t.sectionId}},s={TOGGLE:function(t){t.open=!t.open},SET_SECTION:function(t,e){t.sectionId=e},SET_LIST_ITEMS:function(t,e){t.items=e},ADD_ITEM:function(t,e){t.addedItems.push(e)},REMOVE_ADDED_ITEM:function(t,e){t.addedItems.forEach((function(n,i){n.id===e.id&&t.addedItems.splice(i,1)}))},RESET:function(t){t.addedItems=[],t.items=[]},UPDATE_PAGINATION:function(t,e){t.pagination=e},SEARCH_ITEMS_REQUEST:function(t){t.status="loading"},SEARCH_ITEMS_SUCCESS:function(t){t.status="successful"},SEARCH_ITEMS_FAILURE:function(t){t.status="failed"}},c={toggle:function(t){t.commit("TOGGLE")},open:function(t,e){t.commit("SET_SECTION",e),t.commit("RESET"),t.commit("TOGGLE")},searchItems:function(t,e){t.commit("SEARCH_ITEMS_REQUEST"),LP.Request({type:"search-items",query:e.query,item_type:e.type,page:e.page,exclude:JSON.stringify([])}).then((function(e){var n=e.body;if(n.success){var i=n.data;t.commit("SET_LIST_ITEMS",i.items),t.commit("UPDATE_PAGINATION",i.pagination),t.commit("SEARCH_ITEMS_SUCCESS")}}),(function(e){t.commit("SEARCH_ITEMS_FAILURE"),console.error(e)}))},addItem:function(t,e){t.commit("ADD_ITEM",e)},removeItem:function(t,e){t.commit("REMOVE_ADDED_ITEM",e)},addItemsToSection:function(t){var e=t.getters.addedItems;e.length>0&&LP.Request({type:"add-items-to-section",section_id:t.getters.section,items:JSON.stringify(e)}).then((function(e){var n=e.body;if(n.success){t.commit("TOGGLE");var i=n.data;t.commit("ss/UPDATE_SECTION_ITEMS",{section_id:t.getters.section,items:i},{root:!0})}}),(function(t){console.error(t)}))}},u=window.jQuery||jQuery,r=function(t){var e=u.extend({},t.chooseItems);return e.sectionId=!1,e.pagination="",e.status="",{namespaced:!0,state:e,getters:o,mutations:s,actions:c}},d=window.jQuery||jQuery,a={toggleAllSections:function(t){t.getters.isHiddenAllSections?t.commit("OPEN_ALL_SECTIONS"):t.commit("CLOSE_ALL_SECTIONS"),LP.Request({type:"hidden-sections",hidden:t.getters.hiddenSections})},updateSectionsOrder:function(t,e){LP.Request({type:"sort-sections",order:JSON.stringify(e)}).then((function(e){var n=e.body.data;t.commit("SORT_SECTION",n)}),(function(t){console.error(t)}))},toggleSection:function(t,e){e.open?t.commit("CLOSE_SECTION",e):t.commit("OPEN_SECTION",e),LP.Request({type:"hidden-sections",hidden:t.getters.hiddenSections})},updateSection:function(t,e){t.commit("UPDATE_SECTION_REQUEST",e.id),LP.Request({type:"update-section",section:JSON.stringify(e)}).then((function(){t.commit("UPDATE_SECTION_SUCCESS",e.id)})).catch((function(){t.commit("UPDATE_SECTION_FAILURE",e.id)}))},removeSection:function(t,e){t.commit("REMOVE_SECTION",e.index),LP.Request({type:"remove-section",section_id:e.section.id}).then((function(t){t.body}),(function(t){console.error(t)}))},newSection:function(t,e){var n={type:"new-section",section_name:e,temp_id:LP.uniqueId()};t.commit("ADD_NEW_SECTION",{id:n.temp_id,items:[],open:!1,title:n.section_name}),LP.Request(n).then((function(e){var n=e.body;if(n.success){var i=d.extend({},n.data,{open:!0});t.commit("ADD_NEW_SECTION",i)}}),(function(t){console.error(t)}))},updateSectionItem:function(t,e){t.commit("UPDATE_SECTION_ITEM_REQUEST",e.item.id),LP.Request({type:"update-section-item",section_id:e.section_id,item:JSON.stringify(e.item)}).then((function(n){t.commit("UPDATE_SECTION_ITEM_SUCCESS",e.item.id);var i=n.body;if(i.success){var o=i.data;t.commit("UPDATE_SECTION_ITEM",{section_id:e.section_id,item:o})}}),(function(n){t.commit("UPDATE_SECTION_ITEM_FAILURE",e.item.id),console.error(n)}))},removeSectionItem:function(t,e){var n=e.item.id;t.commit("REMOVE_SECTION_ITEM",e),e.item.temp_id=0,LP.Request({type:"remove-section-item",section_id:e.section_id,item_id:n}).then((function(){t.commit("REMOVE_SECTION_ITEM",e)}))},deleteSectionItem:function(t,e){var n=e.item.id;t.commit("REMOVE_SECTION_ITEM",e),e.item.temp_id=0,LP.Request({type:"delete-section-item",section_id:e.section_id,item_id:n}).then((function(){t.commit("REMOVE_SECTION_ITEM",e)}))},newSectionItem:function(t,e){t.commit("APPEND_EMPTY_ITEM_TO_SECTION",e),LP.Request({type:"new-section-item",section_id:e.section_id,item:JSON.stringify(e.item)}).then((function(n){var i=n.body;if(i.success){var o={};d.each(i.data,(function(t,e){o[e.old_id?e.old_id:e.id]=e})),t.commit("UPDATE_ITEM_SECTION_BY_ID",{section_id:e.section_id,items:o})}}),(function(t){console.error(t)}))},updateSectionItems:function(t,e){var n=t.state;LP.Request({type:"update-section-items",section_id:e.section_id,items:JSON.stringify(e.items),last_section:n.sections[n.sections.length-1]===e.section_id}).then((function(t){t.body.success}),(function(t){console.error(t)}))}},E={SORT_SECTION:function(t,e){t.sections=t.sections.map((function(t){return t.order=e[t.id],t}))},SET_SECTIONS:function(t,e){t.sections=e},ADD_NEW_SECTION:function(t,e){var n;void 0===e.open&&(e.open=!0),e.temp_id&&t.sections.map((function(t,i){if(e.temp_id==t.id)return n=i,!1})),void 0!==n?$Vue.set(t.sections,n,e):t.sections.push(e)},ADD_EMPTY_SECTION:function(t,e){e.open=!0,t.sections.push(e)},REMOVE_SECTION:function(t,e){t.sections.splice(e,1)},REMOVE_SECTION_ITEM:function(t,e){var n=t.sections.find((function(t){return t.id===e.section_id})).items||[],i=e.item,o=-1;n.forEach((function(t,e){t.id===i.id&&(o=e)})),-1!==o&&(i.temp_id?n[o].id=i.temp_id:n.splice(o,1))},UPDATE_SECTION_ITEMS:function(t,e){var n=t.sections.find((function(t){return parseInt(t.id)===parseInt(e.section_id)}));n&&(n.items=e.items)},UPDATE_SECTION_ITEM:function(t,e){},CLOSE_SECTION:function(t,e){t.sections.forEach((function(n,i){e.id===n.id&&(t.sections[i].open=!1)}))},OPEN_SECTION:function(t,e){t.sections.forEach((function(n,i){e.id===n.id&&(t.sections[i].open=!0)}))},OPEN_ALL_SECTIONS:function(t){t.sections=t.sections.map((function(t){return t.open=!0,t}))},CLOSE_ALL_SECTIONS:function(t){t.sections=t.sections.map((function(t){return t.open=!1,t}))},UPDATE_SECTION_REQUEST:function(t,e){$Vue.set(t.statusUpdateSection,e,"updating")},UPDATE_SECTION_SUCCESS:function(t,e){$Vue.set(t.statusUpdateSection,e,"successful")},UPDATE_SECTION_FAILURE:function(t,e){$Vue.set(t.statusUpdateSection,e,"failed")},UPDATE_SECTION_ITEM_REQUEST:function(t,e){$Vue.set(t.statusUpdateSectionItem,e,"updating")},UPDATE_SECTION_ITEM_SUCCESS:function(t,e){$Vue.set(t.statusUpdateSectionItem,e,"successful")},UPDATE_SECTION_ITEM_FAILURE:function(t,e){$Vue.set(t.statusUpdateSectionItem,e,"failed")},APPEND_EMPTY_ITEM_TO_SECTION:function(t,e){var n=t.sections.find((function(t){return parseInt(t.id)===parseInt(e.section_id)}));n&&n.items.push({id:e.item.id,title:e.item.title,type:"empty-item"})},UPDATE_ITEM_SECTION_BY_ID:function(t,e){var n=t.sections.find((function(t){return parseInt(t.id)===parseInt(e.section_id)}));if(n)for(var i=0;i<n.items.length;i++)try{if(!n.items[i])continue;var o=n.items[i].id;o&&e.items[o]&&$Vue.set(n.items,i,e.items[o])}catch(t){console.log(t)}}},m={sections:function(t){return t.sections||[]},urlEdit:function(t){return t.urlEdit},hiddenSections:function(t){return t.sections.filter((function(t){return!t.open})).map((function(t){return parseInt(t.id)}))},isHiddenAllSections:function(t,e){var n=e.sections;return e.hiddenSections.length===n.length},statusUpdateSection:function(t){return t.statusUpdateSection},statusUpdateSectionItem:function(t){return t.statusUpdateSectionItem}},f=window.jQuery,_=function(t){var e=f.extend({},t.sections);return e.statusUpdateSection={},e.statusUpdateSectionItem={},e.sections=e.sections.map((function(t){var n=e.hidden_sections.find((function(e){return parseInt(t.id)===parseInt(e)}));return t.open=!n,t})),{namespaced:!0,state:e,getters:m,mutations:E,actions:a}},S=n(1),T={heartbeat:function(t){return t.heartbeat},action:function(t){return t.action},id:function(t){return t.course_id},autoDraft:function(t){return t.auto_draft},disable_curriculum:function(t){return t.disable_curriculum},status:function(t){return t.status||"error"},currentRequest:function(t){return t.countCurrentRequest||0},urlAjax:function(t){return t.ajax},nonce:function(t){return t.nonce}},p={UPDATE_HEART_BEAT:function(t,e){t.heartbeat=!!e},UPDATE_AUTO_DRAFT_STATUS:function(t,e){t.auto_draft=e},UPDATE_STATUS:function(t,e){t.status=e},INCREASE_NUMBER_REQUEST:function(t){t.countCurrentRequest++},DECREASE_NUMBER_REQUEST:function(t){t.countCurrentRequest--}},I={heartbeat:function(t){LP.Request({type:"heartbeat"}).then((function(e){var n=e.body;t.commit("UPDATE_HEART_BEAT",!!n.success)}),(function(e){t.commit("UPDATE_HEART_BEAT",!1)}))},draftCourse:function(t,e){t.getters.autoDraft&&LP.Request({type:"draft-course",course:JSON.stringify(e)}).then((function(e){e.body.success&&t.commit("UPDATE_AUTO_DRAFT_STATUS",!1)}))},newRequest:function(t){t.commit("INCREASE_NUMBER_REQUEST"),t.commit("UPDATE_STATUS","loading"),window.onbeforeunload=function(){return""}},requestCompleted:function(t,e){t.commit("DECREASE_NUMBER_REQUEST"),0===t.getters.currentRequest&&(t.commit("UPDATE_STATUS",e),window.onbeforeunload=null)}},l=window.jQuery,O=function(t){var e=l.extend({},t.root);return e.status="success",e.heartbeat=!0,e.countCurrentRequest=0,{state:e,getters:T,mutations:p,actions:I,modules:{ci:r(t),i18n:Object(S.a)(t.i18n),ss:_(t)}}};window.$Vue=window.$Vue||Vue,window.$Vuex=window.$Vuex||Vuex,(0,window.jQuery)(document).ready((function(){window.LP_Curriculum_Store=new $Vuex.Store(O(lpAdminCourseEditorSettings)),Object(i.a)({ns:"LPCurriculumRequest",store:LP_Curriculum_Store}),setTimeout((function(){window.LP_Course_Editor=new $Vue({el:"#admin-editor-lp_course",template:"<lp-course-editor></lp-course-editor>"})}),100)}))}});
assets/js/dist/admin/editor/question.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}({0:function(e,t,n){"use strict";function o(e){var t=window.jQuery||jQuery,n=Vue.http;e=t.extend({ns:"LPRequest",store:!1},e||{});var o=null;LP.Request=function(r){return o=t("#publishing-action"),r.id=e.store.getters.id,r.nonce=e.store.getters.nonce,r["lp-ajax"]=e.store.getters.action,r.code=e.store.getters.code,o.find("#publish").addClass("disabled"),o.find(".spinner").addClass("is-active"),o.addClass("code-"+r.code),n.post(e.store.getters.urlAjax,r,{emulateJSON:!0,params:{namespace:e.ns,code:r.code}})},n.interceptors.push((function(t,n){t.params.namespace===e.ns?(e.store.dispatch("newRequest"),n((function(n){jQuery.isPlainObject(n.body)||(n.body=LP.parseJSON(n.body)),n.body.success||!1?e.store.dispatch("requestCompleted","successful"):e.store.dispatch("requestCompleted","failed"),o.removeClass("code-"+t.params.code),o.attr("class")||(o.find("#publish").removeClass("disabled"),o.find(".spinner").removeClass("is-active"))}))):n()}))}n.d(t,"a",(function(){return o}))},15:function(e,t,n){"use strict";n.r(t);var o=n(0),r={id:function(e){return e.id},type:function(e){return e.type},code:function(e){return Date.now()},autoDraft:function(e){return e.auto_draft},answers:function(e){return Object.values(e.answers)||[]},settings:function(e){return e.setting},types:function(e){return e.questionTypes||[]},numberCorrect:function(e){var t=0;return Object.keys(e.answers).forEach((function(n){"yes"===e.answers[n].is_true&&(t+=1)})),t},status:function(e){return e.status},currentRequest:function(e){return e.countCurrentRequest||0},action:function(e){return e.action},nonce:function(e){return e.nonce},externalComponent:function(e){return e.externalComponent||[]},supportAnswerOptions:function(e){return e.supportAnswerOptions||[]},state:function(e){return e},i18n:function(e){return e.i18n}},u={UPDATE_STATUS:function(e,t){e.status=t},UPDATE_AUTO_DRAFT_STATUS:function(e,t){e.auto_draft=t},CHANGE_QUESTION_TYPE:function(e,t){e.answers=t.answers,e.type=t.type},SET_ANSWERS:function(e,t){e.answers=t},DELETE_ANSWER:function(e,t){for(var n=0,o=e.answers.length;n<o;n++)if(e.answers[n].question_answer_id==t){e.answers[n].question_answer_id=LP.uniqueId();break}},ADD_NEW_ANSWER:function(e,t){e.answers.push(t)},UPDATE_ANSWERS:function(e,t){e.answers=t},INCREASE_NUMBER_REQUEST:function(e){e.countCurrentRequest++},DECREASE_NUMBER_REQUEST:function(e){e.countCurrentRequest--}},i={changeQuestionType:function(e,t){LP.Request({type:"change-question-type",question_type:t.type,draft_question:e.getters.autoDraft?JSON.stringify(t.question):""}).then((function(t){var n=t.body;n.success&&(e.commit("UPDATE_AUTO_DRAFT_STATUS",!1),e.commit("CHANGE_QUESTION_TYPE",n.data))}))},updateAnswersOrder:function(e,t){LP.Request({type:"sort-answer",order:t}).then((function(e){e.body.success}))},updateAnswerTitle:function(e,t){void 0!==t.question_answer_id&&(t=JSON.stringify(t),LP.Request({type:"update-answer-title",answer:t}))},updateCorrectAnswer:function(e,t){LP.Request({type:"change-correct",correct:JSON.stringify(t)}).then((function(t){var n=t.body;n.success&&(e.commit("UPDATE_ANSWERS",n.data),e.commit("UPDATE_AUTO_DRAFT_STATUS",!1))}))},deleteAnswer:function(e,t){e.commit("DELETE_ANSWER",t.id),LP.Request({type:"delete-answer",answer_id:t.id}).then((function(t){var n=t.body;n.success&&e.commit("SET_ANSWERS",n.data)}))},newAnswer:function(e,t){e.commit("ADD_NEW_ANSWER",t.answer),LP.Request({type:"new-answer"}).then((function(t){var n=t.body;n.success&&e.commit("UPDATE_ANSWERS",n.data)}))},newRequest:function(e){e.commit("INCREASE_NUMBER_REQUEST"),e.commit("UPDATE_STATUS","loading"),window.onbeforeunload=function(){return""}},requestCompleted:function(e,t){e.commit("DECREASE_NUMBER_REQUEST"),0===e.getters.currentRequest&&(e.commit("UPDATE_STATUS",t),window.onbeforeunload=null)}},s=window.jQuery||jQuery,c=function(e){return{state:s.extend({status:"successful",countCurrentRequest:0,i18n:s.extend({},e.i18n)},e.root),getters:r,mutations:u,actions:i}};n(2);window.$Vue=window.$Vue||Vue,window.$Vuex=window.$Vuex||Vuex;var a=window.jQuery;a(document).ready((function(){window.LP_Question_Store=new $Vuex.Store(c(lp_question_editor)),Object(o.a)({ns:"LPQuestionEditorRequest",store:LP_Question_Store}),setTimeout((function(){a("#admin-editor-lp_question").length&&(window.LP_Question_Editor=new $Vue({el:"#admin-editor-lp_question",template:"<lp-question-editor></lp-question-editor>"}))}),100)}))},2:function(e,t){var n;n=jQuery,window.FIB={getSelectedText:function(){var e="";if(void 0!==window.getSelection){var t=window.getSelection();if(t.rangeCount){for(var n=document.createElement("div"),o=0,r=t.rangeCount;o<r;++o)n.appendChild(t.getRangeAt(o).cloneContents());e=n.innerHTML}}else void 0!==document.selection&&"Text"===document.selection.type&&(e=document.selection.createRange().htmlText);return e},createTextNode:function(e){return document.createTextNode(e)},isContainHtml:function(e){var t=n(e),o="b.fib-blank";return t.is(o)||t.find(o).length||t.parent().is(o)},getSelectionRange:function(){var e="";return window.getSelection?e=window.getSelection():document.getSelection?e=document.getSelection():document.selection&&(e=document.selection.createRange().text),e},outerHTML:function(e){return n("<div>").append(n(e).clone()).html()},doUpgrade:function(e){n.ajax({url:"",data:{"lp-ajax":"fib-upgrade"},success:function(t){console.log(t),e&&e.call(t)}})}},n(document).ready((function(){n("#do-upgrade-fib").on("click",(function(){var e=n(this).prop("disabled",!0).addClass("ajaxloading");FIB.doUpgrade((function(){e.prop("disabled",!1).removeClass("ajaxloading")}))}))}))}});
1
+ !function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}({0:function(e,t,n){"use strict";function o(e){var t=window.jQuery||jQuery,n=Vue.http;e=t.extend({ns:"LPRequest",store:!1},e||{});var o=null;LP.Request=function(r){return o=t("#publishing-action"),r.id=e.store.getters.id,r.nonce=e.store.getters.nonce,r["lp-ajax"]=e.store.getters.action,r.code=e.store.getters.code,o.find("#publish").addClass("disabled"),o.find(".spinner").addClass("is-active"),o.addClass("code-"+r.code),n.post(e.store.getters.urlAjax,r,{emulateJSON:!0,params:{namespace:e.ns,code:r.code}})},n.interceptors.push((function(t,n){t.params.namespace===e.ns?(e.store.dispatch("newRequest"),n((function(n){jQuery.isPlainObject(n.body)||(n.body=LP.parseJSON(n.body)),n.body.success||!1?e.store.dispatch("requestCompleted","successful"):e.store.dispatch("requestCompleted","failed"),o.removeClass("code-"+t.params.code),o.attr("class")||(o.find("#publish").removeClass("disabled"),o.find(".spinner").removeClass("is-active"))}))):n()}))}n.d(t,"a",(function(){return o}))},14:function(e,t,n){"use strict";n.r(t);var o=n(0),r={id:function(e){return e.id},type:function(e){return e.type},code:function(e){return Date.now()},autoDraft:function(e){return e.auto_draft},answers:function(e){return Object.values(e.answers)||[]},settings:function(e){return e.setting},types:function(e){return e.questionTypes||[]},numberCorrect:function(e){var t=0;return Object.keys(e.answers).forEach((function(n){"yes"===e.answers[n].is_true&&(t+=1)})),t},status:function(e){return e.status},currentRequest:function(e){return e.countCurrentRequest||0},action:function(e){return e.action},nonce:function(e){return e.nonce},externalComponent:function(e){return e.externalComponent||[]},supportAnswerOptions:function(e){return e.supportAnswerOptions||[]},state:function(e){return e},i18n:function(e){return e.i18n}},u={UPDATE_STATUS:function(e,t){e.status=t},UPDATE_AUTO_DRAFT_STATUS:function(e,t){e.auto_draft=t},CHANGE_QUESTION_TYPE:function(e,t){e.answers=t.answers,e.type=t.type},SET_ANSWERS:function(e,t){e.answers=t},DELETE_ANSWER:function(e,t){for(var n=0,o=e.answers.length;n<o;n++)if(e.answers[n].question_answer_id==t){e.answers[n].question_answer_id=LP.uniqueId();break}},ADD_NEW_ANSWER:function(e,t){e.answers.push(t)},UPDATE_ANSWERS:function(e,t){e.answers=t},INCREASE_NUMBER_REQUEST:function(e){e.countCurrentRequest++},DECREASE_NUMBER_REQUEST:function(e){e.countCurrentRequest--}},i={changeQuestionType:function(e,t){LP.Request({type:"change-question-type",question_type:t.type,draft_question:e.getters.autoDraft?JSON.stringify(t.question):""}).then((function(t){var n=t.body;n.success&&(e.commit("UPDATE_AUTO_DRAFT_STATUS",!1),e.commit("CHANGE_QUESTION_TYPE",n.data))}))},updateAnswersOrder:function(e,t){LP.Request({type:"sort-answer",order:t}).then((function(e){e.body.success}))},updateAnswerTitle:function(e,t){void 0!==t.question_answer_id&&(t=JSON.stringify(t),LP.Request({type:"update-answer-title",answer:t}))},updateCorrectAnswer:function(e,t){LP.Request({type:"change-correct",correct:JSON.stringify(t)}).then((function(t){var n=t.body;n.success&&(e.commit("UPDATE_ANSWERS",n.data),e.commit("UPDATE_AUTO_DRAFT_STATUS",!1))}))},deleteAnswer:function(e,t){e.commit("DELETE_ANSWER",t.id),LP.Request({type:"delete-answer",answer_id:t.id}).then((function(t){var n=t.body;n.success&&e.commit("SET_ANSWERS",n.data)}))},newAnswer:function(e,t){e.commit("ADD_NEW_ANSWER",t.answer),LP.Request({type:"new-answer"}).then((function(t){var n=t.body;n.success&&e.commit("UPDATE_ANSWERS",n.data)}))},newRequest:function(e){e.commit("INCREASE_NUMBER_REQUEST"),e.commit("UPDATE_STATUS","loading"),window.onbeforeunload=function(){return""}},requestCompleted:function(e,t){e.commit("DECREASE_NUMBER_REQUEST"),0===e.getters.currentRequest&&(e.commit("UPDATE_STATUS",t),window.onbeforeunload=null)}},s=window.jQuery||jQuery,c=function(e){return{state:s.extend({status:"successful",countCurrentRequest:0,i18n:s.extend({},e.i18n)},e.root),getters:r,mutations:u,actions:i}};n(2);window.$Vue=window.$Vue||Vue,window.$Vuex=window.$Vuex||Vuex;var a=window.jQuery;a(document).ready((function(){window.LP_Question_Store=new $Vuex.Store(c(lp_question_editor)),Object(o.a)({ns:"LPQuestionEditorRequest",store:LP_Question_Store}),setTimeout((function(){a("#admin-editor-lp_question").length&&(window.LP_Question_Editor=new $Vue({el:"#admin-editor-lp_question",template:"<lp-question-editor></lp-question-editor>"}))}),100)}))},2:function(e,t){var n;n=jQuery,window.FIB={getSelectedText:function(){var e="";if(void 0!==window.getSelection){var t=window.getSelection();if(t.rangeCount){for(var n=document.createElement("div"),o=0,r=t.rangeCount;o<r;++o)n.appendChild(t.getRangeAt(o).cloneContents());e=n.innerHTML}}else void 0!==document.selection&&"Text"===document.selection.type&&(e=document.selection.createRange().htmlText);return e},createTextNode:function(e){return document.createTextNode(e)},isContainHtml:function(e){var t=n(e),o="b.fib-blank";return t.is(o)||t.find(o).length||t.parent().is(o)},getSelectionRange:function(){var e="";return window.getSelection?e=window.getSelection():document.getSelection?e=document.getSelection():document.selection&&(e=document.selection.createRange().text),e},outerHTML:function(e){return n("<div>").append(n(e).clone()).html()},doUpgrade:function(e){n.ajax({url:"",data:{"lp-ajax":"fib-upgrade"},success:function(t){console.log(t),e&&e.call(t)}})}},n(document).ready((function(){n("#do-upgrade-fib").on("click",(function(){var e=n(this).prop("disabled",!0).addClass("ajaxloading");FIB.doUpgrade((function(){e.prop("disabled",!1).removeClass("ajaxloading")}))}))}))}});
assets/js/dist/admin/editor/quiz.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=12)}({0:function(t,e,n){"use strict";function i(t){var e=window.jQuery||jQuery,n=Vue.http;t=e.extend({ns:"LPRequest",store:!1},t||{});var i=null;LP.Request=function(o){return i=e("#publishing-action"),o.id=t.store.getters.id,o.nonce=t.store.getters.nonce,o["lp-ajax"]=t.store.getters.action,o.code=t.store.getters.code,i.find("#publish").addClass("disabled"),i.find(".spinner").addClass("is-active"),i.addClass("code-"+o.code),n.post(t.store.getters.urlAjax,o,{emulateJSON:!0,params:{namespace:t.ns,code:o.code}})},n.interceptors.push((function(e,n){e.params.namespace===t.ns?(t.store.dispatch("newRequest"),n((function(n){jQuery.isPlainObject(n.body)||(n.body=LP.parseJSON(n.body)),n.body.success||!1?t.store.dispatch("requestCompleted","successful"):t.store.dispatch("requestCompleted","failed"),i.removeClass("code-"+e.params.code),i.attr("class")||(i.find("#publish").removeClass("disabled"),i.find(".spinner").removeClass("is-active"))}))):n()}))}n.d(e,"a",(function(){return i}))},1:function(t,e,n){"use strict";var i=window.jQuery||jQuery;e.a=function(t){return{namespaced:!0,state:i.extend({},t),getters:{all:function(t){return t}}}}},12:function(t,e,n){"use strict";n.r(e);var i={heartbeat:function(t){return t.heartbeat},questionTypes:function(t){return t.types},defaultNewQuestionType:function(t){return t.default_new},action:function(t){return t.action},id:function(t){return t.quiz_id},status:function(t){return t.status||"error"},currentRequest:function(t){return t.countCurrentRequest||0},nonce:function(t){return t.nonce}},o={UPDATE_HEART_BEAT:function(t,e){t.heartbeat=!!e},UPDATE_STATUS:function(t,e){t.status=e},UPDATE_NEW_QUESTION_TYPE:function(t,e){t.default_new=e},INCREASE_NUMBER_REQUEST:function(t){t.countCurrentRequest++},DECREASE_NUMBER_REQUEST:function(t){t.countCurrentRequest--}},s={heartbeat:function(t){LP.Request({type:"heartbeat"}).then((function(e){var n=e.body;t.commit("UPDATE_HEART_BEAT",!!n.success)}),(function(e){t.commit("UPDATE_HEART_BEAT",!1)}))},newRequest:function(t){t.commit("INCREASE_NUMBER_REQUEST"),t.commit("UPDATE_STATUS","loading"),window.onbeforeunload=function(){return""}},requestCompleted:function(t,e){t.commit("DECREASE_NUMBER_REQUEST"),0===t.getters.currentRequest&&(t.commit("UPDATE_STATUS",e),window.onbeforeunload=null)}},u={status:function(t){return t.status},pagination:function(t){return t.pagination},items:function(t,e){return t.items.map((function(t){var n=e.addedItems.find((function(e){return t.id===e.id}));return t.added=!!n,t}))},code:function(t){return Date.now()},addedItems:function(t){return t.addedItems},isOpen:function(t){return t.open},quiz:function(t){return t.quizId}},r={TOGGLE:function(t){t.open=!t.open},SET_QUIZ:function(t,e){t.quizId=e},SET_LIST_ITEMS:function(t,e){t.items=e},ADD_ITEM:function(t,e){t.addedItems.push(e)},REMOVE_ADDED_ITEM:function(t,e){t.addedItems.forEach((function(n,i){n.id===e.id&&t.addedItems.splice(i,1)}))},RESET:function(t){t.addedItems=[],t.items=[]},UPDATE_PAGINATION:function(t,e){t.pagination=e},SEARCH_ITEM_REQUEST:function(t){t.status="loading"},SEARCH_ITEM_SUCCESS:function(t){t.status="successful"},SEARCH_ITEM_FAIL:function(t){t.status="fail"}},c={toggle:function(t){t.commit("TOGGLE")},open:function(t,e){t.commit("SET_QUIZ",e),t.commit("RESET"),t.commit("TOGGLE")},searchItems:function(t,e){t.commit("SEARCH_ITEM_REQUEST"),LP.Request({type:"search-items",query:e.query,page:e.page,exclude:JSON.stringify([])}).then((function(e){var n=e.body;if(n.success){var i=n.data;t.commit("SET_LIST_ITEMS",i.items),t.commit("UPDATE_PAGINATION",i.pagination),t.commit("SEARCH_ITEM_SUCCESS")}}),(function(e){t.commit("SEARCH_ITEMS_FAIL"),console.log(e)}))},addItem:function(t,e){t.commit("ADD_ITEM",e)},removeItem:function(t,e){t.commit("REMOVE_ADDED_ITEM",e)},addQuestionsToQuiz:function(t,e){var n=t.getters.addedItems;n.length>0&&LP.Request({type:"add-questions-to-quiz",items:JSON.stringify(n),draft_quiz:JSON.stringify(e)}).then((function(e){var n=e.body;if(n.success){var i=n.data;t.commit("lqs/SET_QUESTIONS",i,{root:!0}),t.commit("TOGGLE")}}),(function(t){console.log(t)}))}},d=window.jQuery||jQuery,a=function(t){return{namespaced:!0,state:d.extend({quizId:!1,pagination:"",status:""},t.chooseItems),getters:u,mutations:r,actions:c}},E=n(1),_={listQuestions:function(t){return t.questions||[]},questionsOrder:function(t){return t.order||[]},externalComponent:function(t){return t.externalComponent||[]},supportAnswerOptions:function(t){return t.supportAnswerOptions||[]},hiddenQuestionsSettings:function(t){return t.hidden_questions_settings||[]},hiddenQuestions:function(t){return t.questions.filter((function(t){return!t.open})).map((function(t){return parseInt(t.id)}))},isHiddenListQuestions:function(t,e){var n=e.listQuestions,i=e.hiddenQuestions;return n.length===i.length},disableUpdateList:function(t){return t.disableUpdateList},statusUpdateQuestions:function(t){return t.statusUpdateQuestions},statusUpdateQuestionItem:function(t){return t.statusUpdateQuestionItem},statusUpdateQuestionAnswer:function(t){return t.statusUpdateQuestionAnswer}},f=window.jQuery,m={SORT_QUESTIONS:function(t,e){t.questions=t.questions.map((function(t){return t.order=e[t.id],t}))},SORT_QUESTION_ANSWERS:function(t,e){t.questions=t.questions.map((function(t){return t.answers.answer_order=e[t.answers.question_answer_id],t}))},ADD_QUESTION_ANSWER:function(t,e){t.questions=t.questions.map((function(t){if(t.id===e.question_id){var n=!1;if(e.answer.temp_id)for(var i=0,o=t.answers.length;i<o;i++)t.answers[i].question_answer_id==e.answer.temp_id&&(n=!0,$Vue.set(t.answers,i,e.answer));return!n&&t.answers.push(e.answer),t}return t}))},CHANGE_QUESTION_CORRECT_ANSWERS:function(t,e){t.questions=t.questions.map((function(t){return parseInt(t.id)===e.id&&(t.answers=e.answers),t}))},SET_QUESTIONS:function(t,e){t.questions=e},ADD_NEW_QUESTION:function(t,e){var n=!1;if(e.temp_id)for(var i=0,o=t.questions.length;i<o;i++)if(t.questions[i].id===e.temp_id){$Vue.set(t.questions,i,e),n=!0;break}if(!n){var s=f(".lp-list-questions .main > div:last-child");if(s.length){var u=s.offset().top;f("html,body").animate({scrollTop:u})}t.questions.push(e)}},CHANGE_QUESTION_TYPE:function(t,e){t.questions=t.questions.map((function(t){return parseInt(t.id)===e.id&&(t.answers=e.answers,t.type=e.type,t.open=!0),t}))},REMOVE_QUESTION:function(t,e){var n=t.questions.indexOf(e);e.temp_id?t.questions[n].id=e.temp_id:t.questions.splice(n,1)},DELETE_QUESTION_ANSWER:function(t,e){var n=e.question_id,i=e.answer_id;t.questions=t.questions.map((function(t){if(t.id===n){var e=t.answers;e.forEach((function(t){if(t.question_answer_id===i){var n=e.indexOf(t);e.splice(n,1)}}))}return t}))},REMOVE_QUESTIONS:function(){},CLOSE_QUESTION:function(t,e){t.questions.forEach((function(n,i){e.id===n.id&&(t.questions[i].open=!1)}))},OPEN_QUESTION:function(t,e){t.questions.forEach((function(n,i){e.id===n.id&&(t.questions[i].open=!0)}))},CLOSE_LIST_QUESTIONS:function(t){t.questions=t.questions.map((function(t){return t.open=!1,t}))},OPEN_LIST_QUESTIONS:function(t){t.questions=t.questions.map((function(t){return t.open=!0,t}))},UPDATE_QUESTION_REQUEST:function(t,e){$Vue.set(t.statusUpdateQuestionItem,e,"updating")},UPDATE_QUESTION_SUCCESS:function(t,e){$Vue.set(t.statusUpdateQuestionItem,e,"successful")},UPDATE_QUESTION_FAILURE:function(t,e){$Vue.set(t.statusUpdateQuestionItem,e,"failed")},UPDATE_QUESTION_ANSWER_REQUEST:function(t,e){$Vue.set(t.statusUpdateQuestionAnswer,e,"updating")},UPDATE_QUESTION_ANSWER_SUCCESS:function(t,e){$Vue.set(t.statusUpdateQuestionAnswer,e,"successful")},UPDATE_QUESTION_ANSWER_FAIL:function(t,e){$Vue.set(t.statusUpdateQuestionAnswer,e,"failed")},DELETE_ANSWER:function(t,e){t.questions.map((function(t,n){if(t.id==e.question_id){for(var i=0,o=t.answers.length;i<o;i++)if(t.answers[i].question_answer_id==e.answer_id){t.answers[i].question_answer_id=e.temp_id;break}return!1}}))}},S=window.jQuery,T={toggleAll:function(t){t.getters.isHiddenListQuestions?t.commit("OPEN_LIST_QUESTIONS"):t.commit("CLOSE_LIST_QUESTIONS"),LP.Request({type:"hidden-questions",hidden:t.getters.hiddenQuestions})},updateQuizQuestionsHidden:function(t,e){LP.Request(S.extend({},e,{type:"update-quiz-questions-hidden"}))},newQuestion:function(t,e){var n=JSON.parse(JSON.stringify(e.question));n.settings={},t.commit("ADD_NEW_QUESTION",n),LP.Request({type:"new-question",question:JSON.stringify(e.question),draft_quiz:JSON.stringify(e.quiz)}).then((function(n){var i=n.body;i.success&&(t.commit("UPDATE_NEW_QUESTION_TYPE",e.question.type,{root:!0}),t.commit("ADD_NEW_QUESTION",i.data),t.commit("CLOSE_LIST_QUESTIONS"),t.commit("OPEN_QUESTION",i.data))}),(function(t){console.log(t)}))},updateQuestionsOrder:function(t,e){LP.Request({type:"sort-questions",order:JSON.stringify(e)}).then((function(n){t.commit("SORT_QUESTIONS",e)}),(function(t){console.log(t)}))},updateQuestionTitle:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.id),LP.Request({type:"update-question-title",question:JSON.stringify(e)}).then((function(){t.commit("UPDATE_QUESTION_SUCCESS",e.id)})).catch((function(){t.commit("UPDATE_QUESTION_FAILURE",e.id)}))},changeQuestionType:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.question_id),LP.Request({type:"change-question-type",question_id:e.question_id,question_type:e.type}).then((function(n){var i=n.body;if(i.success){var o=i.data;t.commit("CHANGE_QUESTION_TYPE",o),t.commit("UPDATE_NEW_QUESTION_TYPE",o.type.key,{root:!0}),t.commit("UPDATE_QUESTION_SUCCESS",e.question_id)}})).catch((function(){t.commit("UPDATE_QUESTION_FAILURE",e.question_id)}))},isHiddenQuestionsSettings:function(t,e){},cloneQuestion:function(t,e){LP.Request({type:"clone-question",question:JSON.stringify(e)}).then((function(e){var n=e.body;if(n.success){var i=n.data;t.commit("ADD_NEW_QUESTION",n.data),t.commit("UPDATE_NEW_QUESTION_TYPE",i.type.key,{root:!0})}}),(function(t){console.log(t)}))},removeQuestion:function(t,e){var n=e.id;e.temp_id=LP.uniqueId(),t.commit("REMOVE_QUESTION",e),LP.Request({type:"remove-question",question_id:n}).then((function(n){n.body.success&&(e.id=e.temp_id,e.temp_id=0,t.commit("REMOVE_QUESTION",e))}),(function(t){console.error(t)}))},deleteQuestion:function(t,e){var n=e.id;e.temp_id=LP.uniqueId(),t.commit("REMOVE_QUESTION",e),LP.Request({type:"delete-question",question_id:n}).then((function(){e.id=e.temp_id,e.temp_id=0,t.commit("REMOVE_QUESTION",e),t.commit("UPDATE_QUESTION_SUCCESS",e.id)})).catch((function(){t.commit("UPDATE_QUESTION_FAILURE",e.id)}))},toggleQuestion:function(t,e){e.open?t.commit("CLOSE_QUESTION",e):t.commit("OPEN_QUESTION",e),LP.Request({type:"hidden-questions",hidden:t.getters.hiddenQuestions})},updateQuestionAnswersOrder:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.question_id),LP.Request({type:"sort-question-answers",question_id:e.question_id,order:JSON.stringify(e.order)}).then((function(n){var i=n.body.data;t.commit("SORT_QUESTION_ANSWERS",i),t.commit("UPDATE_QUESTION_SUCCESS",e.question_id)}),(function(n){t.commit("UPDATE_QUESTION_FAILURE",e.question_id),console.log(n)}))},updateQuestionAnswerTitle:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.question_id),LP.Request({type:"update-question-answer-title",question_id:parseInt(e.question_id),answer:JSON.stringify(e.answer)}).then((function(){t.commit("UPDATE_QUESTION_ANSWER_SUCCESS",parseInt(e.question_id)),t.commit("UPDATE_QUESTION_SUCCESS",e.question_id)})).catch((function(){t.commit("UPDATE_QUESTION_ANSWER_FAILURE",parseInt(e.question_id)),t.commit("UPDATE_QUESTION_FAILURE",e.question_id)}))},updateQuestionCorrectAnswer:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.question_id),LP.Request({type:"change-question-correct-answer",question_id:e.question_id,correct:JSON.stringify(e.correct)}).then((function(n){var i=n.body;i.success&&(t.commit("CHANGE_QUESTION_CORRECT_ANSWERS",i.data),t.commit("UPDATE_QUESTION_SUCCESS",e.question_id))}),(function(n){t.commit("UPDATE_QUESTION_FAILURE",e.question_id),console.log(n)}))},deleteQuestionAnswer:function(t,e){e.temp_id=LP.uniqueId(),t.commit("DELETE_ANSWER",e),t.commit("UPDATE_QUESTION_REQUEST",e.question_id),LP.Request({type:"delete-question-answer",question_id:e.question_id,answer_id:e.answer_id}).then((function(n){n.body.success&&(t.commit("DELETE_QUESTION_ANSWER",{question_id:e.question_id,answer_id:e.temp_id}),t.commit("UPDATE_QUESTION_SUCCESS",e.question_id))}),(function(n){t.commit("UPDATE_QUESTION_FAILURE",e.question_id),console.log(n)}))},newQuestionAnswer:function(t,e){var n=LP.uniqueId(),i=e.question_id;t.commit("UPDATE_QUESTION_REQUEST",i),t.commit("ADD_QUESTION_ANSWER",{question_id:i,answer:{text:LP_Quiz_Store.getters["i18n/all"].new_option,question_answer_id:n}}),LP.Request({type:"new-question-answer",question_id:i,question_answer_id:n}).then((function(n){var o=n.body;if(o.success){var s=o.data;t.commit("ADD_QUESTION_ANSWER",{question_id:i,answer:s}),t.commit("UPDATE_QUESTION_SUCCESS",i),e.success&&setTimeout((function(){e.success.apply(e.context,[s])}),300)}}),(function(e){t.commit("UPDATE_QUESTION_FAILURE",i),console.error(e)}))},updateQuestionContent:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.id),LP.Request({type:"update-question-content",question:JSON.stringify(e)}).then((function(){t.commit("UPDATE_QUESTION_SUCCESS",e.id)})).catch((function(){t.commit("UPDATE_QUESTION_FAILURE",e.id)}))},updateQuestionMeta:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.question.id),LP.Request({type:"update-question-meta",question:JSON.stringify(e.question),meta_key:e.meta_key}).then((function(){t.commit("UPDATE_QUESTION_SUCCESS",e.question.id)})).catch((function(){t.commit("UPDATE_QUESTION_FAILURE",e.question.id)}))}},p=window.jQuery||jQuery,U=function(t){var e=t.listQuestions;return{namespaced:!0,state:p.extend({statusUpdateQuestions:{},statusUpdateQuestionItem:{},statusUpdateQuestionAnswer:{},questions:e.questions.map((function(t){var n=e.hidden_questions.find((function(e){return parseInt(t.id)===parseInt(e)}));return t.open=!n,t}))},e),getters:_,mutations:m,actions:T}},l=window.jQuery||jQuery,q=function(t){return{state:l.extend({status:"success",heartbeat:!0,countCurrentRequest:0},t.root),getters:i,mutations:o,actions:s,modules:{cqi:a(t),i18n:Object(E.a)(t.i18n),lqs:U(t)}}},Q=n(0);n(2);window.$Vue=window.$Vue||Vue,window.$Vuex=window.$Vuex||Vuex,window.jQuery(document).ready((function(){window.LP_Quiz_Store=new $Vuex.Store(q(lp_quiz_editor)),Object(Q.a)({ns:"LPListQuizQuestionsRequest",store:LP_Quiz_Store}),setTimeout((function(){window.LP_Quiz_Editor=new $Vue({el:"#admin-editor-lp_quiz",template:"<lp-quiz-editor></lp-quiz-editor>"})}),100)}))},2:function(t,e){var n;n=jQuery,window.FIB={getSelectedText:function(){var t="";if(void 0!==window.getSelection){var e=window.getSelection();if(e.rangeCount){for(var n=document.createElement("div"),i=0,o=e.rangeCount;i<o;++i)n.appendChild(e.getRangeAt(i).cloneContents());t=n.innerHTML}}else void 0!==document.selection&&"Text"===document.selection.type&&(t=document.selection.createRange().htmlText);return t},createTextNode:function(t){return document.createTextNode(t)},isContainHtml:function(t){var e=n(t),i="b.fib-blank";return e.is(i)||e.find(i).length||e.parent().is(i)},getSelectionRange:function(){var t="";return window.getSelection?t=window.getSelection():document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text),t},outerHTML:function(t){return n("<div>").append(n(t).clone()).html()},doUpgrade:function(t){n.ajax({url:"",data:{"lp-ajax":"fib-upgrade"},success:function(e){console.log(e),t&&t.call(e)}})}},n(document).ready((function(){n("#do-upgrade-fib").on("click",(function(){var t=n(this).prop("disabled",!0).addClass("ajaxloading");FIB.doUpgrade((function(){t.prop("disabled",!1).removeClass("ajaxloading")}))}))}))}});
1
+ !function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e,n){"use strict";function i(t){var e=window.jQuery||jQuery,n=Vue.http;t=e.extend({ns:"LPRequest",store:!1},t||{});var i=null;LP.Request=function(o){return i=e("#publishing-action"),o.id=t.store.getters.id,o.nonce=t.store.getters.nonce,o["lp-ajax"]=t.store.getters.action,o.code=t.store.getters.code,i.find("#publish").addClass("disabled"),i.find(".spinner").addClass("is-active"),i.addClass("code-"+o.code),n.post(t.store.getters.urlAjax,o,{emulateJSON:!0,params:{namespace:t.ns,code:o.code}})},n.interceptors.push((function(e,n){e.params.namespace===t.ns?(t.store.dispatch("newRequest"),n((function(n){jQuery.isPlainObject(n.body)||(n.body=LP.parseJSON(n.body)),n.body.success||!1?t.store.dispatch("requestCompleted","successful"):t.store.dispatch("requestCompleted","failed"),i.removeClass("code-"+e.params.code),i.attr("class")||(i.find("#publish").removeClass("disabled"),i.find(".spinner").removeClass("is-active"))}))):n()}))}n.d(e,"a",(function(){return i}))},function(t,e,n){"use strict";var i=window.jQuery||jQuery;e.a=function(t){return{namespaced:!0,state:i.extend({},t),getters:{all:function(t){return t}}}}},function(t,e){var n;n=jQuery,window.FIB={getSelectedText:function(){var t="";if(void 0!==window.getSelection){var e=window.getSelection();if(e.rangeCount){for(var n=document.createElement("div"),i=0,o=e.rangeCount;i<o;++i)n.appendChild(e.getRangeAt(i).cloneContents());t=n.innerHTML}}else void 0!==document.selection&&"Text"===document.selection.type&&(t=document.selection.createRange().htmlText);return t},createTextNode:function(t){return document.createTextNode(t)},isContainHtml:function(t){var e=n(t),i="b.fib-blank";return e.is(i)||e.find(i).length||e.parent().is(i)},getSelectionRange:function(){var t="";return window.getSelection?t=window.getSelection():document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text),t},outerHTML:function(t){return n("<div>").append(n(t).clone()).html()},doUpgrade:function(t){n.ajax({url:"",data:{"lp-ajax":"fib-upgrade"},success:function(e){console.log(e),t&&t.call(e)}})}},n(document).ready((function(){n("#do-upgrade-fib").on("click",(function(){var t=n(this).prop("disabled",!0).addClass("ajaxloading");FIB.doUpgrade((function(){t.prop("disabled",!1).removeClass("ajaxloading")}))}))}))},,,,,,,,,function(t,e,n){"use strict";n.r(e);var i={heartbeat:function(t){return t.heartbeat},questionTypes:function(t){return t.types},defaultNewQuestionType:function(t){return t.default_new},action:function(t){return t.action},id:function(t){return t.quiz_id},status:function(t){return t.status||"error"},currentRequest:function(t){return t.countCurrentRequest||0},nonce:function(t){return t.nonce}},o={UPDATE_HEART_BEAT:function(t,e){t.heartbeat=!!e},UPDATE_STATUS:function(t,e){t.status=e},UPDATE_NEW_QUESTION_TYPE:function(t,e){t.default_new=e},INCREASE_NUMBER_REQUEST:function(t){t.countCurrentRequest++},DECREASE_NUMBER_REQUEST:function(t){t.countCurrentRequest--}},s={heartbeat:function(t){LP.Request({type:"heartbeat"}).then((function(e){var n=e.body;t.commit("UPDATE_HEART_BEAT",!!n.success)}),(function(e){t.commit("UPDATE_HEART_BEAT",!1)}))},newRequest:function(t){t.commit("INCREASE_NUMBER_REQUEST"),t.commit("UPDATE_STATUS","loading"),window.onbeforeunload=function(){return""}},requestCompleted:function(t,e){t.commit("DECREASE_NUMBER_REQUEST"),0===t.getters.currentRequest&&(t.commit("UPDATE_STATUS",e),window.onbeforeunload=null)}},u={status:function(t){return t.status},pagination:function(t){return t.pagination},items:function(t,e){return t.items.map((function(t){var n=e.addedItems.find((function(e){return t.id===e.id}));return t.added=!!n,t}))},code:function(t){return Date.now()},addedItems:function(t){return t.addedItems},isOpen:function(t){return t.open},quiz:function(t){return t.quizId}},r={TOGGLE:function(t){t.open=!t.open},SET_QUIZ:function(t,e){t.quizId=e},SET_LIST_ITEMS:function(t,e){t.items=e},ADD_ITEM:function(t,e){t.addedItems.push(e)},REMOVE_ADDED_ITEM:function(t,e){t.addedItems.forEach((function(n,i){n.id===e.id&&t.addedItems.splice(i,1)}))},RESET:function(t){t.addedItems=[],t.items=[]},UPDATE_PAGINATION:function(t,e){t.pagination=e},SEARCH_ITEM_REQUEST:function(t){t.status="loading"},SEARCH_ITEM_SUCCESS:function(t){t.status="successful"},SEARCH_ITEM_FAIL:function(t){t.status="fail"}},c={toggle:function(t){t.commit("TOGGLE")},open:function(t,e){t.commit("SET_QUIZ",e),t.commit("RESET"),t.commit("TOGGLE")},searchItems:function(t,e){t.commit("SEARCH_ITEM_REQUEST"),LP.Request({type:"search-items",query:e.query,page:e.page,exclude:JSON.stringify([])}).then((function(e){var n=e.body;if(n.success){var i=n.data;t.commit("SET_LIST_ITEMS",i.items),t.commit("UPDATE_PAGINATION",i.pagination),t.commit("SEARCH_ITEM_SUCCESS")}}),(function(e){t.commit("SEARCH_ITEMS_FAIL"),console.log(e)}))},addItem:function(t,e){t.commit("ADD_ITEM",e)},removeItem:function(t,e){t.commit("REMOVE_ADDED_ITEM",e)},addQuestionsToQuiz:function(t,e){var n=t.getters.addedItems;n.length>0&&LP.Request({type:"add-questions-to-quiz",items:JSON.stringify(n),draft_quiz:JSON.stringify(e)}).then((function(e){var n=e.body;if(n.success){var i=n.data;t.commit("lqs/SET_QUESTIONS",i,{root:!0}),t.commit("TOGGLE")}}),(function(t){console.log(t)}))}},d=window.jQuery||jQuery,a=function(t){return{namespaced:!0,state:d.extend({quizId:!1,pagination:"",status:""},t.chooseItems),getters:u,mutations:r,actions:c}},E=n(1),_={listQuestions:function(t){return t.questions||[]},questionsOrder:function(t){return t.order||[]},externalComponent:function(t){return t.externalComponent||[]},supportAnswerOptions:function(t){return t.supportAnswerOptions||[]},hiddenQuestionsSettings:function(t){return t.hidden_questions_settings||[]},hiddenQuestions:function(t){return t.questions.filter((function(t){return!t.open})).map((function(t){return parseInt(t.id)}))},isHiddenListQuestions:function(t,e){var n=e.listQuestions,i=e.hiddenQuestions;return n.length===i.length},disableUpdateList:function(t){return t.disableUpdateList},statusUpdateQuestions:function(t){return t.statusUpdateQuestions},statusUpdateQuestionItem:function(t){return t.statusUpdateQuestionItem},statusUpdateQuestionAnswer:function(t){return t.statusUpdateQuestionAnswer}},f=window.jQuery,m={SORT_QUESTIONS:function(t,e){t.questions=t.questions.map((function(t){return t.order=e[t.id],t}))},SORT_QUESTION_ANSWERS:function(t,e){t.questions=t.questions.map((function(t){return t.answers.answer_order=e[t.answers.question_answer_id],t}))},ADD_QUESTION_ANSWER:function(t,e){t.questions=t.questions.map((function(t){if(t.id===e.question_id){var n=!1;if(e.answer.temp_id)for(var i=0,o=t.answers.length;i<o;i++)t.answers[i].question_answer_id==e.answer.temp_id&&(n=!0,$Vue.set(t.answers,i,e.answer));return!n&&t.answers.push(e.answer),t}return t}))},CHANGE_QUESTION_CORRECT_ANSWERS:function(t,e){t.questions=t.questions.map((function(t){return parseInt(t.id)===e.id&&(t.answers=e.answers),t}))},SET_QUESTIONS:function(t,e){t.questions=e},ADD_NEW_QUESTION:function(t,e){var n=!1;if(e.temp_id)for(var i=0,o=t.questions.length;i<o;i++)if(t.questions[i].id===e.temp_id){$Vue.set(t.questions,i,e),n=!0;break}if(!n){var s=f(".lp-list-questions .main > div:last-child");if(s.length){var u=s.offset().top;f("html,body").animate({scrollTop:u})}t.questions.push(e)}},CHANGE_QUESTION_TYPE:function(t,e){t.questions=t.questions.map((function(t){return parseInt(t.id)===e.id&&(t.answers=e.answers,t.type=e.type,t.open=!0),t}))},REMOVE_QUESTION:function(t,e){var n=t.questions.indexOf(e);e.temp_id?t.questions[n].id=e.temp_id:t.questions.splice(n,1)},DELETE_QUESTION_ANSWER:function(t,e){var n=e.question_id,i=e.answer_id;t.questions=t.questions.map((function(t){if(t.id===n){var e=t.answers;e.forEach((function(t){if(t.question_answer_id===i){var n=e.indexOf(t);e.splice(n,1)}}))}return t}))},REMOVE_QUESTIONS:function(){},CLOSE_QUESTION:function(t,e){t.questions.forEach((function(n,i){e.id===n.id&&(t.questions[i].open=!1)}))},OPEN_QUESTION:function(t,e){t.questions.forEach((function(n,i){e.id===n.id&&(t.questions[i].open=!0)}))},CLOSE_LIST_QUESTIONS:function(t){t.questions=t.questions.map((function(t){return t.open=!1,t}))},OPEN_LIST_QUESTIONS:function(t){t.questions=t.questions.map((function(t){return t.open=!0,t}))},UPDATE_QUESTION_REQUEST:function(t,e){$Vue.set(t.statusUpdateQuestionItem,e,"updating")},UPDATE_QUESTION_SUCCESS:function(t,e){$Vue.set(t.statusUpdateQuestionItem,e,"successful")},UPDATE_QUESTION_FAILURE:function(t,e){$Vue.set(t.statusUpdateQuestionItem,e,"failed")},UPDATE_QUESTION_ANSWER_REQUEST:function(t,e){$Vue.set(t.statusUpdateQuestionAnswer,e,"updating")},UPDATE_QUESTION_ANSWER_SUCCESS:function(t,e){$Vue.set(t.statusUpdateQuestionAnswer,e,"successful")},UPDATE_QUESTION_ANSWER_FAIL:function(t,e){$Vue.set(t.statusUpdateQuestionAnswer,e,"failed")},DELETE_ANSWER:function(t,e){t.questions.map((function(t,n){if(t.id==e.question_id){for(var i=0,o=t.answers.length;i<o;i++)if(t.answers[i].question_answer_id==e.answer_id){t.answers[i].question_answer_id=e.temp_id;break}return!1}}))}},S=window.jQuery,T={toggleAll:function(t){t.getters.isHiddenListQuestions?t.commit("OPEN_LIST_QUESTIONS"):t.commit("CLOSE_LIST_QUESTIONS"),LP.Request({type:"hidden-questions",hidden:t.getters.hiddenQuestions})},updateQuizQuestionsHidden:function(t,e){LP.Request(S.extend({},e,{type:"update-quiz-questions-hidden"}))},newQuestion:function(t,e){var n=JSON.parse(JSON.stringify(e.question));n.settings={},t.commit("ADD_NEW_QUESTION",n),LP.Request({type:"new-question",question:JSON.stringify(e.question),draft_quiz:JSON.stringify(e.quiz)}).then((function(n){var i=n.body;i.success&&(t.commit("UPDATE_NEW_QUESTION_TYPE",e.question.type,{root:!0}),t.commit("ADD_NEW_QUESTION",i.data),t.commit("CLOSE_LIST_QUESTIONS"),t.commit("OPEN_QUESTION",i.data))}),(function(t){console.log(t)}))},updateQuestionsOrder:function(t,e){LP.Request({type:"sort-questions",order:JSON.stringify(e)}).then((function(n){t.commit("SORT_QUESTIONS",e)}),(function(t){console.log(t)}))},updateQuestionTitle:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.id),LP.Request({type:"update-question-title",question:JSON.stringify(e)}).then((function(){t.commit("UPDATE_QUESTION_SUCCESS",e.id)})).catch((function(){t.commit("UPDATE_QUESTION_FAILURE",e.id)}))},changeQuestionType:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.question_id),LP.Request({type:"change-question-type",question_id:e.question_id,question_type:e.type}).then((function(n){var i=n.body;if(i.success){var o=i.data;t.commit("CHANGE_QUESTION_TYPE",o),t.commit("UPDATE_NEW_QUESTION_TYPE",o.type.key,{root:!0}),t.commit("UPDATE_QUESTION_SUCCESS",e.question_id)}})).catch((function(){t.commit("UPDATE_QUESTION_FAILURE",e.question_id)}))},isHiddenQuestionsSettings:function(t,e){},cloneQuestion:function(t,e){LP.Request({type:"clone-question",question:JSON.stringify(e)}).then((function(e){var n=e.body;if(n.success){var i=n.data;t.commit("ADD_NEW_QUESTION",n.data),t.commit("UPDATE_NEW_QUESTION_TYPE",i.type.key,{root:!0})}}),(function(t){console.log(t)}))},removeQuestion:function(t,e){var n=e.id;e.temp_id=LP.uniqueId(),t.commit("REMOVE_QUESTION",e),LP.Request({type:"remove-question",question_id:n}).then((function(n){n.body.success&&(e.id=e.temp_id,e.temp_id=0,t.commit("REMOVE_QUESTION",e))}),(function(t){console.error(t)}))},deleteQuestion:function(t,e){var n=e.id;e.temp_id=LP.uniqueId(),t.commit("REMOVE_QUESTION",e),LP.Request({type:"delete-question",question_id:n}).then((function(){e.id=e.temp_id,e.temp_id=0,t.commit("REMOVE_QUESTION",e),t.commit("UPDATE_QUESTION_SUCCESS",e.id)})).catch((function(){t.commit("UPDATE_QUESTION_FAILURE",e.id)}))},toggleQuestion:function(t,e){e.open?t.commit("CLOSE_QUESTION",e):t.commit("OPEN_QUESTION",e),LP.Request({type:"hidden-questions",hidden:t.getters.hiddenQuestions})},updateQuestionAnswersOrder:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.question_id),LP.Request({type:"sort-question-answers",question_id:e.question_id,order:JSON.stringify(e.order)}).then((function(n){var i=n.body.data;t.commit("SORT_QUESTION_ANSWERS",i),t.commit("UPDATE_QUESTION_SUCCESS",e.question_id)}),(function(n){t.commit("UPDATE_QUESTION_FAILURE",e.question_id),console.log(n)}))},updateQuestionAnswerTitle:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.question_id),LP.Request({type:"update-question-answer-title",question_id:parseInt(e.question_id),answer:JSON.stringify(e.answer)}).then((function(){t.commit("UPDATE_QUESTION_ANSWER_SUCCESS",parseInt(e.question_id)),t.commit("UPDATE_QUESTION_SUCCESS",e.question_id)})).catch((function(){t.commit("UPDATE_QUESTION_ANSWER_FAILURE",parseInt(e.question_id)),t.commit("UPDATE_QUESTION_FAILURE",e.question_id)}))},updateQuestionCorrectAnswer:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.question_id),LP.Request({type:"change-question-correct-answer",question_id:e.question_id,correct:JSON.stringify(e.correct)}).then((function(n){var i=n.body;i.success&&(t.commit("CHANGE_QUESTION_CORRECT_ANSWERS",i.data),t.commit("UPDATE_QUESTION_SUCCESS",e.question_id))}),(function(n){t.commit("UPDATE_QUESTION_FAILURE",e.question_id),console.log(n)}))},deleteQuestionAnswer:function(t,e){e.temp_id=LP.uniqueId(),t.commit("DELETE_ANSWER",e),t.commit("UPDATE_QUESTION_REQUEST",e.question_id),LP.Request({type:"delete-question-answer",question_id:e.question_id,answer_id:e.answer_id}).then((function(n){n.body.success&&(t.commit("DELETE_QUESTION_ANSWER",{question_id:e.question_id,answer_id:e.temp_id}),t.commit("UPDATE_QUESTION_SUCCESS",e.question_id))}),(function(n){t.commit("UPDATE_QUESTION_FAILURE",e.question_id),console.log(n)}))},newQuestionAnswer:function(t,e){var n=LP.uniqueId(),i=e.question_id;t.commit("UPDATE_QUESTION_REQUEST",i),t.commit("ADD_QUESTION_ANSWER",{question_id:i,answer:{text:LP_Quiz_Store.getters["i18n/all"].new_option,question_answer_id:n}}),LP.Request({type:"new-question-answer",question_id:i,question_answer_id:n}).then((function(n){var o=n.body;if(o.success){var s=o.data;t.commit("ADD_QUESTION_ANSWER",{question_id:i,answer:s}),t.commit("UPDATE_QUESTION_SUCCESS",i),e.success&&setTimeout((function(){e.success.apply(e.context,[s])}),300)}}),(function(e){t.commit("UPDATE_QUESTION_FAILURE",i),console.error(e)}))},updateQuestionContent:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.id),LP.Request({type:"update-question-content",question:JSON.stringify(e)}).then((function(){t.commit("UPDATE_QUESTION_SUCCESS",e.id)})).catch((function(){t.commit("UPDATE_QUESTION_FAILURE",e.id)}))},updateQuestionMeta:function(t,e){t.commit("UPDATE_QUESTION_REQUEST",e.question.id),LP.Request({type:"update-question-meta",question:JSON.stringify(e.question),meta_key:e.meta_key}).then((function(){t.commit("UPDATE_QUESTION_SUCCESS",e.question.id)})).catch((function(){t.commit("UPDATE_QUESTION_FAILURE",e.question.id)}))}},p=window.jQuery||jQuery,U=function(t){var e=t.listQuestions;return{namespaced:!0,state:p.extend({statusUpdateQuestions:{},statusUpdateQuestionItem:{},statusUpdateQuestionAnswer:{},questions:e.questions.map((function(t){var n=e.hidden_questions.find((function(e){return parseInt(t.id)===parseInt(e)}));return t.open=!n,t}))},e),getters:_,mutations:m,actions:T}},l=window.jQuery||jQuery,q=function(t){return{state:l.extend({status:"success",heartbeat:!0,countCurrentRequest:0},t.root),getters:i,mutations:o,actions:s,modules:{cqi:a(t),i18n:Object(E.a)(t.i18n),lqs:U(t)}}},Q=n(0);n(2);window.$Vue=window.$Vue||Vue,window.$Vuex=window.$Vuex||Vuex,window.jQuery(document).ready((function(){window.LP_Quiz_Store=new $Vuex.Store(q(lp_quiz_editor)),Object(Q.a)({ns:"LPListQuizQuestionsRequest",store:LP_Quiz_Store}),setTimeout((function(){window.LP_Quiz_Editor=new $Vue({el:"#admin-editor-lp_quiz",template:"<lp-quiz-editor></lp-quiz-editor>"})}),100)}))}]);
assets/js/dist/admin/pages/search-lp-addons-themes.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=9)}({9:function(e,n){var t,r,o,i,u;t=jQuery,r=null,o=null,i=null,u=function(e){i||(i=o.clone());var n=e.toLowerCase().split(/\s+/).filter((function(e,n){return e.length>=3}));o.each((function(e){var r,o,u=t(this).html(""),l=(r=i.eq(e),o=u,r.find(".plugin-card").each((function(){var e,r=t(this),i=r.find(".item-title").text().toLowerCase(),u=r.find(".column-description, .theme-description").text();if(n.length){if(e=new RegExp(n.join("|"),"ig"),i.match(e)||u.match(e)){var l=r.clone();o.append(l)}}else o.append(r.clone())})),u.children().length);u.prev("h2").find("span").html(l)}))},t(document).on("keyup",".lp-search-addon",(function(e){r&&clearTimeout(r),r=setTimeout(u,300,e.target.value)})),jQuery((function(){o=t(".addons-browse")}))}});
1
+ !function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=8)}({8:function(e,n){var t,r,o,i,u;t=jQuery,r=null,o=null,i=null,u=function(e){i||(i=o.clone());var n=e.toLowerCase().split(/\s+/).filter((function(e,n){return e.length>=3}));o.each((function(e){var r,o,u=t(this).html(""),l=(r=i.eq(e),o=u,r.find(".plugin-card").each((function(){var e,r=t(this),i=r.find(".item-title").text().toLowerCase(),u=r.find(".column-description, .theme-description").text();if(n.length){if(e=new RegExp(n.join("|"),"ig"),i.match(e)||u.match(e)){var l=r.clone();o.append(l)}}else o.append(r.clone())})),u.children().length);u.prev("h2").find("span").html(l)}))},t(document).on("keyup",".lp-search-addon",(function(e){r&&clearTimeout(r),r=setTimeout(u,300,e.target.value)})),jQuery((function(){o=t(".addons-browse")}))}});
assets/js/dist/admin/pages/setup.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=6)}({6:function(e,t){!function(e){"use strict";var t,r,n=function(e){t.toggleClass("loading",void 0===e||e)},a=function(t){var n=(r=e("#learn-press-setup-form")).serializeJSON();return e.extend(n,t||{})},s=function(r){var n=e(r);t.replaceWith(n),t=n},c=function(n){if(n.preventDefault(),c=r.find('input[type="email"]'),o=!0,c.each((function(){var t,r=e(this);switch(r.css("border-color",""),r.attr("name")){case"settings[paypal][paypal_email]":case"settings[paypal][paypal_sandbox_email]":if(!r.closest("tr").prev().find('input[type="checkbox"]').is(":checked"))return}t=this.value,/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)||(o=!1,r.css("border-color","#FF0000"))})),o){var c,o,i=e(this).attr("href");t.addClass("loading"),e.post({url:i,data:a(),success:function(r){var n=e(r);s(n.contents().filter("#main")),LP.setUrl(i),e(".learn-press-dropdown-pages").LP("DropdownPages"),e(".learn-press-tip").LP("QuickTip"),t.removeClass("loading")}})}},o=function(){var t=e(this).children(":selected").html().match(/\((.*)\)/),r=t?t[1]:"";e("#currency-pos").children().each((function(){var t=e(this),n=t.html();switch(t.val()){case"left":n=n.replace(/\( (.*)69/,"( "+r+"69");break;case"right":n=n.replace(/9([^0-9]*) \)/,"9"+r+" )");break;case"left_with_space":n=n.replace(/\( (.*) 6/,"( "+r+" 6");break;case"right_with_space":n=n.replace(/9 (.*) \)/,"9 "+r+" )")}t.html(n)}))},i=function(){e.post({url:"",dataType:"html",data:a({"lp-ajax":"get-price-format"}),success:function(t){e("#preview-price").html(t)}})},l=function(t){t.preventDefault(),n(),e.post({url:e(this).attr("href"),dataType:"html",data:a({"lp-ajax":"setup-create-pages"}),success:function(t){s(e(t).contents().filter("#main")),e(".learn-press-dropdown-pages").LP("DropdownPages"),n(!1)}})},u=function(t){t.preventDefault();var r=e(this);n(),e.post({url:e(this).attr("href"),dataType:"html",data:{},success:function(t){n(!1),r.replaceWith(e(t).find("a:first").addClass("button button-primary"))}})};e((function(){t=e("#main"),r=e("#learn-press-setup-form"),e(".learn-press-select2").select2(),e(document).on("click",".buttons .button",c).on("change","#currency",o).on("change","input, select",i).on("click","#create-pages",l).on("click","#install-sample-course",u)}))}(jQuery)}});
1
+ !function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}({5:function(e,t){!function(e){"use strict";var t,r,n=function(e){t.toggleClass("loading",void 0===e||e)},a=function(t){var n=(r=e("#learn-press-setup-form")).serializeJSON();return e.extend(n,t||{})},s=function(r){var n=e(r);t.replaceWith(n),t=n},c=function(n){if(n.preventDefault(),c=r.find('input[type="email"]'),o=!0,c.each((function(){var t,r=e(this);switch(r.css("border-color",""),r.attr("name")){case"settings[paypal][paypal_email]":case"settings[paypal][paypal_sandbox_email]":if(!r.closest("tr").prev().find('input[type="checkbox"]').is(":checked"))return}t=this.value,/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)||(o=!1,r.css("border-color","#FF0000"))})),o){var c,o,i=e(this).attr("href");t.addClass("loading"),e.post({url:i,data:a(),success:function(r){var n=e(r);s(n.contents().filter("#main")),LP.setUrl(i),e(".learn-press-dropdown-pages").LP("DropdownPages"),e(".learn-press-tip").LP("QuickTip"),t.removeClass("loading")}})}},o=function(){var t=e(this).children(":selected").html().match(/\((.*)\)/),r=t?t[1]:"";e("#currency-pos").children().each((function(){var t=e(this),n=t.html();switch(t.val()){case"left":n=n.replace(/\( (.*)69/,"( "+r+"69");break;case"right":n=n.replace(/9([^0-9]*) \)/,"9"+r+" )");break;case"left_with_space":n=n.replace(/\( (.*) 6/,"( "+r+" 6");break;case"right_with_space":n=n.replace(/9 (.*) \)/,"9 "+r+" )")}t.html(n)}))},i=function(){e.post({url:"",dataType:"html",data:a({"lp-ajax":"get-price-format"}),success:function(t){e("#preview-price").html(t)}})},l=function(t){t.preventDefault(),n(),e.post({url:e(this).attr("href"),dataType:"html",data:a({"lp-ajax":"setup-create-pages"}),success:function(t){s(e(t).contents().filter("#main")),e(".learn-press-dropdown-pages").LP("DropdownPages"),n(!1)}})},u=function(t){t.preventDefault();var r=e(this);n(),e.post({url:e(this).attr("href"),dataType:"html",data:{},success:function(t){n(!1),r.replaceWith(e(t).find("a:first").addClass("button button-primary"))}})};e((function(){t=e("#main"),r=e("#learn-press-setup-form"),e(".learn-press-select2").select2(),e(document).on("click",".buttons .button",c).on("change","#currency",o).on("change","input, select",i).on("click","#create-pages",l).on("click","#install-sample-course",u)}))}(jQuery)}});
assets/js/dist/admin/pages/statistic.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function r(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(a,n,function(e){return t[e]}.bind(null,n));return a},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}({7:function(t,e){var r;(r=jQuery).fn.LP_Chart_Line=function(t,e){return r.each(this,(function(){var a=r(this),n=r("<canvas />");a.html(""),n.appendTo(a),new Chart(n,{type:"line",data:t,options:e})}))},r.fn.LP_Statistic_Users=function(){if(0!==parseInt(r(this).length))return r.each(this,(function(){var t=r(".chart-buttons button").on("click",(function(){var e=r(this),a=e.data("type"),n="",o="";if(t.not(this).not('[data-type="user-custom-time"]').prop("disabled",!1),"user-custom-time"==a){if(n=r('#user-custom-time input[name="from"]').val(),o=r('#user-custom-time input[name="to"]').val(),""==n||""==o)return!1}else e.prop("disabled",!0);var i=r("#learn-press-chart");return i.addClass("loading"),r.ajax({url:"admin-ajax.php",data:{action:"learnpress_load_chart",type:a,range:[n,o]},dataType:"text",success:function(t){t=LP.parseJSON(t),i.LP_Chart_Line(t,LP_Chart_Config),i.removeClass("loading")}}),!1})),e=r('.chart-buttons #user-custom-time input[type="text"]').on("change",(function(){t.filter('[data-type="user-custom-time"]').prop("disabled",e.filter((function(){return""==this.value})).get().length||!function(){if(new Date(e[0].value)<new Date(e[1].value))return!0}())}))}))},r.fn.LP_Statistic_Courses=function(){if(0!==parseInt(r(this).length))return r.each(this,(function(){var t=r(".chart-buttons button").on("click",(function(){var e=r(this),a=e.data("type"),n="",o="",i=r("#learn-press-chart");if(t.not(this).not('[data-type="course-custom-time"]').prop("disabled",!1),"course-custom-time"==a){if(n=r('#course-custom-time input[name="from"]').val(),o=r('#course-custom-time input[name="to"]').val(),""==n||""==o)return!1}else e.prop("disabled",!0);return i.addClass("loading"),r.ajax({url:"admin-ajax.php",data:{action:"learnpress_load_chart",type:a,range:[n,o]},dataType:"text",success:function(t){t=LP.parseJSON(t),i.LP_Chart_Line(t,LP_Chart_Config),i.removeClass("loading")}}),!1})),e=r('.chart-buttons #course-custom-time input[type="text"]').on("change",(function(){t.filter('[data-type="course-custom-time"]').prop("disabled",e.filter((function(){return""==this.value})).get().length||!function(){if(new Date(e[0].value)<new Date(e[1].value))return!0}())}))}))},r.fn.LP_Statistic_Orders=function(){if(0!==parseInt(r(this).length)){r(".panel_report_option").hide(),r("#panel_report_sales_by_"+r("#report_sales_by").val()).show(),r("#report_sales_by").on("change",(function(){r(".panel_report_option").hide(),r("#panel_report_sales_by_"+r(this).val()).show(),"date"==r(this).val()&&t()}));var t=function(){var t,e="",a="",n="",o=0,i=0;t=r("#report_sales_by").val(),$container=r("#learn-press-chart"),$container.addClass("loading");var s=r(".chart-buttons button:disabled").not('[data-type="order-custom-time"]');if(parseInt(s.length)>0)e=r(s[0]).data("type");else if(e="order-custom-time",a=r('#order-custom-time input[name="from"]').val(),n=r('#order-custom-time input[name="to"]').val(),""==a||""==n)return!1;"course"===t?i=r("#report-by-course-id").val():"category"===t&&(o=r("#report-by-course-category-id").val()),r.ajax({url:"admin-ajax.php",data:{action:"learnpress_load_chart",type:e,range:[a,n],report_sales_by:t,course_id:i,cat_id:o},dataType:"text",success:function(t){t=LP.parseJSON(t),$container.LP_Chart_Line(t,LP_Chart_Config),$container.removeClass("loading")}})};r("#report-by-course-id").select2({placeholder:"Select a course",minimumInputLength:1,ajax:{url:ajaxurl+"?action=learnpress_search_course",dataType:"json",quietMillis:250,data:function(t,e){return{q:t}},results:function(t,e){return{results:t.items}},cache:!0}}),r("#report-by-course-id").on("change",(function(){t()})),r("#report-by-course-category-id").select2({placeholder:"Select a course",minimumInputLength:1,ajax:{url:ajaxurl+"?action=learnpress_search_course_category",dataType:"json",quietMillis:250,data:function(t,e){return{q:t}},results:function(t,e){return{results:t.items}},cache:!0}}),r("#report-by-course-category-id").on("change",(function(){t()}));var e=r(".chart-buttons button").on("click",(function(){var a=r(this),n=a.data("type");return r("#learn-press-chart"),e.not(this).not('[data-type="order-custom-time"]').prop("disabled",!1),"order-custom-time"!==n&&(a.prop("disabled",!0),r('#order-custom-time input[name="from"]').val(""),r('#order-custom-time input[name="to"]').val("")),t(),!1})),a=r('.chart-buttons #order-custom-time input[type="text"]').on("change",(function(){e.filter('[data-type="order-custom-time"]').prop("disabled",a.filter((function(){return""==this.value})).get().length||!function(){if(new Date(a[0].value)<new Date(a[1].value))return!0}())}))}},r((function(){void 0!==r.fn.datepicker&&r(".date-picker").datepicker({dateFormat:"yy/mm/dd"}),r(".learn-press-statistic-users").LP_Statistic_Users(),r(".learn-press-statistic-courses").LP_Statistic_Courses(),r(".learn-press-statistic-orders").LP_Statistic_Orders()}))}});
1
+ !function(t){var e={};function r(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(a,n,function(e){return t[e]}.bind(null,n));return a},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}({6:function(t,e){var r;(r=jQuery).fn.LP_Chart_Line=function(t,e){return r.each(this,(function(){var a=r(this),n=r("<canvas />");a.html(""),n.appendTo(a),new Chart(n,{type:"line",data:t,options:e})}))},r.fn.LP_Statistic_Users=function(){if(0!==parseInt(r(this).length))return r.each(this,(function(){var t=r(".chart-buttons button").on("click",(function(){var e=r(this),a=e.data("type"),n="",o="";if(t.not(this).not('[data-type="user-custom-time"]').prop("disabled",!1),"user-custom-time"==a){if(n=r('#user-custom-time input[name="from"]').val(),o=r('#user-custom-time input[name="to"]').val(),""==n||""==o)return!1}else e.prop("disabled",!0);var i=r("#learn-press-chart");return i.addClass("loading"),r.ajax({url:"admin-ajax.php",data:{action:"learnpress_load_chart",type:a,range:[n,o]},dataType:"text",success:function(t){t=LP.parseJSON(t),i.LP_Chart_Line(t,LP_Chart_Config),i.removeClass("loading")}}),!1})),e=r('.chart-buttons #user-custom-time input[type="text"]').on("change",(function(){t.filter('[data-type="user-custom-time"]').prop("disabled",e.filter((function(){return""==this.value})).get().length||!function(){if(new Date(e[0].value)<new Date(e[1].value))return!0}())}))}))},r.fn.LP_Statistic_Courses=function(){if(0!==parseInt(r(this).length))return r.each(this,(function(){var t=r(".chart-buttons button").on("click",(function(){var e=r(this),a=e.data("type"),n="",o="",i=r("#learn-press-chart");if(t.not(this).not('[data-type="course-custom-time"]').prop("disabled",!1),"course-custom-time"==a){if(n=r('#course-custom-time input[name="from"]').val(),o=r('#course-custom-time input[name="to"]').val(),""==n||""==o)return!1}else e.prop("disabled",!0);return i.addClass("loading"),r.ajax({url:"admin-ajax.php",data:{action:"learnpress_load_chart",type:a,range:[n,o]},dataType:"text",success:function(t){t=LP.parseJSON(t),i.LP_Chart_Line(t,LP_Chart_Config),i.removeClass("loading")}}),!1})),e=r('.chart-buttons #course-custom-time input[type="text"]').on("change",(function(){t.filter('[data-type="course-custom-time"]').prop("disabled",e.filter((function(){return""==this.value})).get().length||!function(){if(new Date(e[0].value)<new Date(e[1].value))return!0}())}))}))},r.fn.LP_Statistic_Orders=function(){if(0!==parseInt(r(this).length)){r(".panel_report_option").hide(),r("#panel_report_sales_by_"+r("#report_sales_by").val()).show(),r("#report_sales_by").on("change",(function(){r(".panel_report_option").hide(),r("#panel_report_sales_by_"+r(this).val()).show(),"date"==r(this).val()&&t()}));var t=function(){var t,e="",a="",n="",o=0,i=0;t=r("#report_sales_by").val(),$container=r("#learn-press-chart"),$container.addClass("loading");var s=r(".chart-buttons button:disabled").not('[data-type="order-custom-time"]');if(parseInt(s.length)>0)e=r(s[0]).data("type");else if(e="order-custom-time",a=r('#order-custom-time input[name="from"]').val(),n=r('#order-custom-time input[name="to"]').val(),""==a||""==n)return!1;"course"===t?i=r("#report-by-course-id").val():"category"===t&&(o=r("#report-by-course-category-id").val()),r.ajax({url:"admin-ajax.php",data:{action:"learnpress_load_chart",type:e,range:[a,n],report_sales_by:t,course_id:i,cat_id:o},dataType:"text",success:function(t){t=LP.parseJSON(t),$container.LP_Chart_Line(t,LP_Chart_Config),$container.removeClass("loading")}})};r("#report-by-course-id").select2({placeholder:"Select a course",minimumInputLength:1,ajax:{url:ajaxurl+"?action=learnpress_search_course",dataType:"json",quietMillis:250,data:function(t,e){return{q:t}},results:function(t,e){return{results:t.items}},cache:!0}}),r("#report-by-course-id").on("change",(function(){t()})),r("#report-by-course-category-id").select2({placeholder:"Select a course",minimumInputLength:1,ajax:{url:ajaxurl+"?action=learnpress_search_course_category",dataType:"json",quietMillis:250,data:function(t,e){return{q:t}},results:function(t,e){return{results:t.items}},cache:!0}}),r("#report-by-course-category-id").on("change",(function(){t()}));var e=r(".chart-buttons button").on("click",(function(){var a=r(this),n=a.data("type");return r("#learn-press-chart"),e.not(this).not('[data-type="order-custom-time"]').prop("disabled",!1),"order-custom-time"!==n&&(a.prop("disabled",!0),r('#order-custom-time input[name="from"]').val(""),r('#order-custom-time input[name="to"]').val("")),t(),!1})),a=r('.chart-buttons #order-custom-time input[type="text"]').on("change",(function(){e.filter('[data-type="order-custom-time"]').prop("disabled",a.filter((function(){return""==this.value})).get().length||!function(){if(new Date(a[0].value)<new Date(a[1].value))return!0}())}))}},r((function(){void 0!==r.fn.datepicker&&r(".date-picker").datepicker({dateFormat:"yy/mm/dd"}),r(".learn-press-statistic-users").LP_Statistic_Users(),r(".learn-press-statistic-courses").LP_Statistic_Courses(),r(".learn-press-statistic-orders").LP_Statistic_Orders()}))}});
assets/js/dist/admin/pages/sync-data.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function s(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,s),i.l=!0,i.exports}s.m=e,s.c=t,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)s.d(n,i,function(t){return e[t]}.bind(null,i));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=8)}({8:function(e,t){var s,n,i,c,r,o,l,a;s=jQuery,n={id:"sync-base",syncing:!1,items:!1,completed:!1,callback:null,methodGetItems:"",itemsKey:"",chunkSize:50,sync:function(e){if(!this.syncing){if(this.callback=e,!1===this.items)this.get_items();else if(!this.dispatch())return this.completed=!0,void this.callToCallback();this.syncing=!0}},init:function(){this.syncing=!1,this.items=!1,this.completed=!1},is_completed:function(){return this.completed},dispatch:function(){var e=this,t=!!this.items&&this.items.splice(0,this.chunkSize);return!(!t||0===t.length||(s.ajax({url:"",data:{"lp-ajax":this.id,sync:t},method:"post",success:function(t){t=LP.parseJSON(t),e.syncing=!1,"success"!==t.result&&(e.completed=!0),e.callToCallback(),e.is_completed()||e.sync(e.callback)}}),0))},callToCallback:function(){this.callback&&this.callback.call(this)},get_items:function(){var e=this;s.ajax({url:"",data:{"lp-ajax":this.id,sync:this.methodGetItems},success:function(t){e.syncing=!1,(t=LP.parseJSON(t))[e.itemsKey]?(e.items=t[e.itemsKey],e.sync(e.callback)):(e.completed=!0,e.items=[],e.callToCallback())}})}},i=s.extend({},n,{id:"sync-course-orders",methodGetItems:"get-courses",itemsKey:"courses"}),c=s.extend({},n,{id:"sync-user-courses",methodGetItems:"get-users",itemsKey:"users",chunkSize:500}),r=s.extend({},n,{id:"sync-user-orders",methodGetItems:"get-users",itemsKey:"users",chunkSize:500}),o=s.extend({},n,{id:"sync-course-final-quiz",methodGetItems:"get-courses",itemsKey:"courses",chunkSize:500}),l=s.extend({},n,{id:"sync-remove-older-data",methodGetItems:"remove-older-data",itemsKey:"_nothing_here",chunkSize:500}),a=s.extend({},n,{id:"sync-calculate-course-results",methodGetItems:"get-users",itemsKey:"users",chunkSize:1}),window.LP_Sync_Data={syncs:[],syncing:0,options:{},start:function(e){if(this.syncs=[],this.options=s.extend({onInit:function(){},onStart:function(){},onCompleted:function(){},onCompletedAll:function(){}},e||{}),this.get_syncs()){this.reset(),this.options.onInit.call(this);var t=this,n=0,i=this.syncs.length;this.sync(n,(function e(s){if(s.is_completed()){if(n++,t.options.onCompleted.call(t,s),n>=i)return void t.options.onCompletedAll.call(t);t.sync(n,e)}}))}},reset:function(){for(var e in this.syncs)try{this[this.syncs[e]].init()}catch(e){}},sync:function(e,t){var s=this,n=this[this.syncs[e]];s.options.onStart.call(s,n),n.sync((function(){t.call(s,n)}))},get_syncs:function(){var e=s('input[name^="lp-repair"]:checked').serializeJSON()["lp-repair"];if(!e)return!1;for(var t in e)"yes"===e[t]&&this[t=t.replace(/[-]+/g,"_")]&&this.syncs.push(t);return this.syncs},get_sync:function(e){return this[e=e.replace(/[-]+/g,"_")]},sync_course_orders:i,sync_user_orders:r,sync_user_courses:c,sync_course_final_quiz:o,sync_remove_older_data:l,sync_calculate_course_results:a},s(document).ready((function(){var e,t;e=s("#learn-press-check-all-syncs"),t=s("#learn-press-syncs").find('[name^="lp-repair"]'),e.on("click",(function(){t.prop("checked",this.checked)})),t.on("click",(function(){e.prop("checked",t.filter(":checked").length===t.length)}))})).on("click",".lp-button-repair",(function(){function e(e){return s("ul#learn-press-syncs").find('input[name*="'+e+'"]')}LP_Sync_Data.start({onInit:function(){s("ul#learn-press-syncs").children().removeClass("syncing synced"),s(".lp-button-repair").prop("disabled",!0)},onStart:function(t){e(t.id).closest("li").addClass("syncing")},onCompleted:function(t){e(t.id).closest("li").removeClass("syncing").addClass("synced")},onCompletedAll:function(){s("ul#learn-press-syncs").children().removeClass("syncing synced"),s(".lp-button-repair").prop("disabled",!1)}})}))}});
1
+ !function(e){var t={};function s(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,s),i.l=!0,i.exports}s.m=e,s.c=t,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)s.d(n,i,function(t){return e[t]}.bind(null,i));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=7)}({7:function(e,t){var s,n,i,c,r,o,l,a;s=jQuery,n={id:"sync-base",syncing:!1,items:!1,completed:!1,callback:null,methodGetItems:"",itemsKey:"",chunkSize:50,sync:function(e){if(!this.syncing){if(this.callback=e,!1===this.items)this.get_items();else if(!this.dispatch())return this.completed=!0,void this.callToCallback();this.syncing=!0}},init:function(){this.syncing=!1,this.items=!1,this.completed=!1},is_completed:function(){return this.completed},dispatch:function(){var e=this,t=!!this.items&&this.items.splice(0,this.chunkSize);return!(!t||0===t.length||(s.ajax({url:"",data:{"lp-ajax":this.id,sync:t},method:"post",success:function(t){t=LP.parseJSON(t),e.syncing=!1,"success"!==t.result&&(e.completed=!0),e.callToCallback(),e.is_completed()||e.sync(e.callback)}}),0))},callToCallback:function(){this.callback&&this.callback.call(this)},get_items:function(){var e=this;s.ajax({url:"",data:{"lp-ajax":this.id,sync:this.methodGetItems},success:function(t){e.syncing=!1,(t=LP.parseJSON(t))[e.itemsKey]?(e.items=t[e.itemsKey],e.sync(e.callback)):(e.completed=!0,e.items=[],e.callToCallback())}})}},i=s.extend({},n,{id:"sync-course-orders",methodGetItems:"get-courses",itemsKey:"courses"}),c=s.extend({},n,{id:"sync-user-courses",methodGetItems:"get-users",itemsKey:"users",chunkSize:500}),r=s.extend({},n,{id:"sync-user-orders",methodGetItems:"get-users",itemsKey:"users",chunkSize:500}),o=s.extend({},n,{id:"sync-course-final-quiz",methodGetItems:"get-courses",itemsKey:"courses",chunkSize:500}),l=s.extend({},n,{id:"sync-remove-older-data",methodGetItems:"remove-older-data",itemsKey:"_nothing_here",chunkSize:500}),a=s.extend({},n,{id:"sync-calculate-course-results",methodGetItems:"get-users",itemsKey:"users",chunkSize:1}),window.LP_Sync_Data={syncs:[],syncing:0,options:{},start:function(e){if(this.syncs=[],this.options=s.extend({onInit:function(){},onStart:function(){},onCompleted:function(){},onCompletedAll:function(){}},e||{}),this.get_syncs()){this.reset(),this.options.onInit.call(this);var t=this,n=0,i=this.syncs.length;this.sync(n,(function e(s){if(s.is_completed()){if(n++,t.options.onCompleted.call(t,s),n>=i)return void t.options.onCompletedAll.call(t);t.sync(n,e)}}))}},reset:function(){for(var e in this.syncs)try{this[this.syncs[e]].init()}catch(e){}},sync:function(e,t){var s=this,n=this[this.syncs[e]];s.options.onStart.call(s,n),n.sync((function(){t.call(s,n)}))},get_syncs:function(){var e=s('input[name^="lp-repair"]:checked').serializeJSON()["lp-repair"];if(!e)return!1;for(var t in e)"yes"===e[t]&&this[t=t.replace(/[-]+/g,"_")]&&this.syncs.push(t);return this.syncs},get_sync:function(e){return this[e=e.replace(/[-]+/g,"_")]},sync_course_orders:i,sync_user_orders:r,sync_user_courses:c,sync_course_final_quiz:o,sync_remove_older_data:l,sync_calculate_course_results:a},s(document).ready((function(){var e,t;e=s("#learn-press-check-all-syncs"),t=s("#learn-press-syncs").find('[name^="lp-repair"]'),e.on("click",(function(){t.prop("checked",this.checked)})),t.on("click",(function(){e.prop("checked",t.filter(":checked").length===t.length)}))})).on("click",".lp-button-repair",(function(){function e(e){return s("ul#learn-press-syncs").find('input[name*="'+e+'"]')}LP_Sync_Data.start({onInit:function(){s("ul#learn-press-syncs").children().removeClass("syncing synced"),s(".lp-button-repair").prop("disabled",!0)},onStart:function(t){e(t.id).closest("li").addClass("syncing")},onCompleted:function(t){e(t.id).closest("li").removeClass("syncing").addClass("synced")},onCompletedAll:function(){s("ul#learn-press-syncs").children().removeClass("syncing synced"),s(".lp-button-repair").prop("disabled",!1)}})}))}});
assets/js/dist/admin/pages/tools.js CHANGED
@@ -98,6 +98,8 @@ __webpack_require__.r(__webpack_exports__);
98
  /* harmony import */ var _tools_database_upgrade__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tools/database/upgrade */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/database/upgrade.js");
99
  /* harmony import */ var _tools_database_create_indexs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tools/database/create_indexs */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/database/create_indexs.js");
100
  /* harmony import */ var _tools_database_re_upgrade_db__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tools/database/re-upgrade-db */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/database/re-upgrade-db.js");
 
 
101
 
102
 
103
 
@@ -207,6 +209,7 @@ __webpack_require__.r(__webpack_exports__);
207
  Object(_tools_database_upgrade__WEBPACK_IMPORTED_MODULE_0__["default"])();
208
  Object(_tools_database_create_indexs__WEBPACK_IMPORTED_MODULE_1__["default"])();
209
  Object(_tools_database_re_upgrade_db__WEBPACK_IMPORTED_MODULE_2__["default"])();
 
210
  $doc.on('click', '.lp-install-sample__install', installSampleCourse).on('click', '.lp-install-sample__uninstall', uninstallSampleCourse).on('click', '#learn-press-clear-cache', clearHardCache).on('click', 'input[name="enable_hard_cache"]', toggleHardCache).on('click', '.lp-install-sample__toggle-options', toggleOptions);
211
  });
212
  })(jQuery);
@@ -249,7 +252,7 @@ var createIndexes = function createIndexes() {
249
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elBtnYes[0].style.display = 'inline-block';
250
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elBtnYes[0].textContent = 'Run';
251
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elBtnNo[0].textContent = 'Close';
252
- var url = '/lp/v1/tools/list-tables-indexs';
253
  var params = {};
254
  var functions = {
255
  success: function success(res) {
@@ -295,7 +298,7 @@ var createIndexes = function createIndexes() {
295
  }
296
 
297
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].callBackYes = function () {
298
- var url = '/lp/v1/tools/create-indexs';
299
  var params = {
300
  tables: tables,
301
  table: table
@@ -701,6 +704,422 @@ var getStepsUpgradeStatus = function getStepsUpgradeStatus() {
701
 
702
  /***/ }),
703
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
704
  /***/ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/utils/handle-ajax-api.js":
705
  /*!********************************************************************************************************************************************************************!*\
706
  !*** E:/Work/Webs/WP/Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/utils/handle-ajax-api.js ***!
98
  /* harmony import */ var _tools_database_upgrade__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tools/database/upgrade */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/database/upgrade.js");
99
  /* harmony import */ var _tools_database_create_indexs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tools/database/create_indexs */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/database/create_indexs.js");
100
  /* harmony import */ var _tools_database_re_upgrade_db__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tools/database/re-upgrade-db */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/database/re-upgrade-db.js");
101
+ /* harmony import */ var _tools_reset_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tools/reset-data */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/reset-data/index.js");
102
+
103
 
104
 
105
 
209
  Object(_tools_database_upgrade__WEBPACK_IMPORTED_MODULE_0__["default"])();
210
  Object(_tools_database_create_indexs__WEBPACK_IMPORTED_MODULE_1__["default"])();
211
  Object(_tools_database_re_upgrade_db__WEBPACK_IMPORTED_MODULE_2__["default"])();
212
+ Object(_tools_reset_data__WEBPACK_IMPORTED_MODULE_3__["default"])();
213
  $doc.on('click', '.lp-install-sample__install', installSampleCourse).on('click', '.lp-install-sample__uninstall', uninstallSampleCourse).on('click', '#learn-press-clear-cache', clearHardCache).on('click', 'input[name="enable_hard_cache"]', toggleHardCache).on('click', '.lp-install-sample__toggle-options', toggleOptions);
214
  });
215
  })(jQuery);
252
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elBtnYes[0].style.display = 'inline-block';
253
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elBtnYes[0].textContent = 'Run';
254
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elBtnNo[0].textContent = 'Close';
255
+ var url = '/lp/v1/admin/tools/list-tables-indexs';
256
  var params = {};
257
  var functions = {
258
  success: function success(res) {
298
  }
299
 
300
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].callBackYes = function () {
301
+ var url = '/lp/v1/tools/admin/create-indexs';
302
  var params = {
303
  tables: tables,
304
  table: table
704
 
705
  /***/ }),
706
 
707
+ /***/ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/reset-data/course.js":
708
+ /*!**********************************************************************************************************************************************************************************!*\
709
+ !*** E:/Work/Webs/WP/Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/reset-data/course.js ***!
710
+ \**********************************************************************************************************************************************************************************/
711
+ /*! exports provided: default */
712
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
713
+
714
+ "use strict";
715
+ __webpack_require__.r(__webpack_exports__);
716
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
717
+
718
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
719
+
720
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
721
+
722
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
723
+
724
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
725
+
726
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
727
+
728
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
729
+
730
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
731
+
732
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
733
+
734
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
735
+
736
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
737
+
738
+ function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
739
+
740
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
741
+
742
+ /**
743
+ * Reset course progress.
744
+ *
745
+ * @since 4.0.5.
746
+ * @author Nhamdv - Code choi choi in Physcode.
747
+ */
748
+ var __ = wp.i18n.__;
749
+ var _wp$components = wp.components,
750
+ TextControl = _wp$components.TextControl,
751
+ Button = _wp$components.Button,
752
+ Spinner = _wp$components.Spinner,
753
+ CheckboxControl = _wp$components.CheckboxControl,
754
+ Notice = _wp$components.Notice;
755
+ var _wp$element = wp.element,
756
+ useState = _wp$element.useState,
757
+ useEffect = _wp$element.useEffect;
758
+ var addQueryArgs = wp.url.addQueryArgs;
759
+
760
+ var ResetCourse = function ResetCourse() {
761
+ var _useState = useState(false),
762
+ _useState2 = _slicedToArray(_useState, 2),
763
+ loading = _useState2[0],
764
+ setLoading = _useState2[1];
765
+
766
+ var _useState3 = useState(''),
767
+ _useState4 = _slicedToArray(_useState3, 2),
768
+ search = _useState4[0],
769
+ setSearch = _useState4[1];
770
+
771
+ var _useState5 = useState([]),
772
+ _useState6 = _slicedToArray(_useState5, 2),
773
+ data = _useState6[0],
774
+ setData = _useState6[1];
775
+
776
+ var _useState7 = useState([]),
777
+ _useState8 = _slicedToArray(_useState7, 2),
778
+ checkData = _useState8[0],
779
+ setCheckData = _useState8[1];
780
+
781
+ var _useState9 = useState([]),
782
+ _useState10 = _slicedToArray(_useState9, 2),
783
+ message = _useState10[0],
784
+ setMessage = _useState10[1];
785
+
786
+ var _useState11 = useState(false),
787
+ _useState12 = _slicedToArray(_useState11, 2),
788
+ loadingReset = _useState12[0],
789
+ setLoadingReset = _useState12[1];
790
+
791
+ useEffect(function () {
792
+ responsiveData(search);
793
+ }, [search]);
794
+
795
+ var responsiveData = /*#__PURE__*/function () {
796
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(s) {
797
+ var response, status, _data;
798
+
799
+ return regeneratorRuntime.wrap(function _callee$(_context) {
800
+ while (1) {
801
+ switch (_context.prev = _context.next) {
802
+ case 0:
803
+ _context.prev = 0;
804
+
805
+ if (!(!s || loading)) {
806
+ _context.next = 5;
807
+ break;
808
+ }
809
+
810
+ setMessage([]);
811
+ setData([]);
812
+ return _context.abrupt("return");
813
+
814
+ case 5:
815
+ if (!(s.length < 3)) {
816
+ _context.next = 9;
817
+ break;
818
+ }
819
+
820
+ setMessage([{
821
+ status: 'error',
822
+ message: 'Please enter at least 3 characters to searching course.'
823
+ }]);
824
+ setData([]);
825
+ return _context.abrupt("return");
826
+
827
+ case 9:
828
+ setLoading(true);
829
+ _context.next = 12;
830
+ return wp.apiFetch({
831
+ path: addQueryArgs('lp/v1/admin/tools/reset-data/search-courses', {
832
+ s: s
833
+ }),
834
+ method: 'GET'
835
+ });
836
+
837
+ case 12:
838
+ response = _context.sent;
839
+ status = response.status, _data = response.data;
840
+ setLoading(false);
841
+
842
+ if (status === 'success') {
843
+ setData(_data);
844
+ setMessage([]);
845
+ } else {
846
+ setMessage([{
847
+ status: 'error',
848
+ message: response.message || 'LearnPress: Search Course Fail!'
849
+ }]);
850
+ setData([]);
851
+ }
852
+
853
+ _context.next = 21;
854
+ break;
855
+
856
+ case 18:
857
+ _context.prev = 18;
858
+ _context.t0 = _context["catch"](0);
859
+ console.log(_context.t0.message);
860
+
861
+ case 21:
862
+ case "end":
863
+ return _context.stop();
864
+ }
865
+ }
866
+ }, _callee, null, [[0, 18]]);
867
+ }));
868
+
869
+ return function responsiveData(_x) {
870
+ return _ref.apply(this, arguments);
871
+ };
872
+ }();
873
+
874
+ function checkItems(id) {
875
+ var datas = _toConsumableArray(checkData);
876
+
877
+ if (datas.includes(id)) {
878
+ var index = datas.indexOf(id);
879
+
880
+ if (index > -1) {
881
+ datas.splice(index, 1);
882
+ }
883
+ } else {
884
+ datas.push(id);
885
+ }
886
+
887
+ setCheckData(datas);
888
+ }
889
+
890
+ var resetCourse = /*#__PURE__*/function () {
891
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
892
+ var notice, _iterator, _step, courseId, response, status, _data2, _message;
893
+
894
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
895
+ while (1) {
896
+ switch (_context2.prev = _context2.next) {
897
+ case 0:
898
+ if (!(checkData.length === 0)) {
899
+ _context2.next = 3;
900
+ break;
901
+ }
902
+
903
+ setMessage([{
904
+ status: 'error',
905
+ message: 'Please chooce Course for reset data!'
906
+ }]);
907
+ return _context2.abrupt("return");
908
+
909
+ case 3:
910
+ if (confirm('Are you sure to reset course progress of all users enrolled this course?')) {
911
+ _context2.next = 5;
912
+ break;
913
+ }
914
+
915
+ return _context2.abrupt("return");
916
+
917
+ case 5:
918
+ notice = [];
919
+ _context2.prev = 6;
920
+ setLoadingReset(true);
921
+ _iterator = _createForOfIteratorHelper(checkData);
922
+ _context2.prev = 9;
923
+
924
+ _iterator.s();
925
+
926
+ case 11:
927
+ if ((_step = _iterator.n()).done) {
928
+ _context2.next = 20;
929
+ break;
930
+ }
931
+
932
+ courseId = _step.value;
933
+ _context2.next = 15;
934
+ return wp.apiFetch({
935
+ path: addQueryArgs('lp/v1/admin/tools/reset-data/reset-courses', {
936
+ courseId: courseId
937
+ }),
938
+ method: 'GET'
939
+ });
940
+
941
+ case 15:
942
+ response = _context2.sent;
943
+ status = response.status, _data2 = response.data, _message = response.message;
944
+ notice.push({
945
+ status: status,
946
+ message: _message || "Course #".concat(courseId, " reset successfully!")
947
+ });
948
+
949
+ case 18:
950
+ _context2.next = 11;
951
+ break;
952
+
953
+ case 20:
954
+ _context2.next = 25;
955
+ break;
956
+
957
+ case 22:
958
+ _context2.prev = 22;
959
+ _context2.t0 = _context2["catch"](9);
960
+
961
+ _iterator.e(_context2.t0);
962
+
963
+ case 25:
964
+ _context2.prev = 25;
965
+
966
+ _iterator.f();
967
+
968
+ return _context2.finish(25);
969
+
970
+ case 28:
971
+ setLoadingReset(false);
972
+ _context2.next = 34;
973
+ break;
974
+
975
+ case 31:
976
+ _context2.prev = 31;
977
+ _context2.t1 = _context2["catch"](6);
978
+ notice.push({
979
+ status: 'error',
980
+ message: _context2.t1.message || "LearnPress Error: Reset Course Data."
981
+ });
982
+
983
+ case 34:
984
+ setMessage(notice);
985
+
986
+ case 35:
987
+ case "end":
988
+ return _context2.stop();
989
+ }
990
+ }
991
+ }, _callee2, null, [[6, 31], [9, 22, 25, 28]]);
992
+ }));
993
+
994
+ return function resetCourse() {
995
+ return _ref2.apply(this, arguments);
996
+ };
997
+ }();
998
+
999
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("h2", null, __('Reset course progress', 'learnpress')), /*#__PURE__*/React.createElement("div", {
1000
+ className: "description"
1001
+ }, /*#__PURE__*/React.createElement("p", null, __('This action will reset progress of a course for all users have enrolled.', 'learnpress')), /*#__PURE__*/React.createElement("p", null, __('Search results only show course have user data.', 'learnpress')), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(TextControl, {
1002
+ placeholder: __('Search course by name', 'learnpress'),
1003
+ value: search,
1004
+ onChange: function onChange(value) {
1005
+ return setSearch(value);
1006
+ },
1007
+ style: {
1008
+ width: 300
1009
+ }
1010
+ }))), loading && /*#__PURE__*/React.createElement(Spinner, null), data.length > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1011
+ className: "lp-reset-course_progress",
1012
+ style: {
1013
+ border: '1px solid #eee'
1014
+ }
1015
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
1016
+ style: {
1017
+ background: '#eee'
1018
+ }
1019
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CheckboxControl, {
1020
+ checked: checkData.length === data.length,
1021
+ onChange: function onChange() {
1022
+ if (checkData.length === data.length) {
1023
+ setCheckData([]);
1024
+ } else {
1025
+ setCheckData(data.map(function (dt) {
1026
+ return dt.id;
1027
+ }));
1028
+ }
1029
+ },
1030
+ style: {
1031
+ margin: 0
1032
+ }
1033
+ })), /*#__PURE__*/React.createElement("div", null, __('ID', 'learnpress')), /*#__PURE__*/React.createElement("div", null, __('Name', 'learnpress')), /*#__PURE__*/React.createElement("div", null, __('Students', 'learnpress')))), /*#__PURE__*/React.createElement("div", {
1034
+ style: {
1035
+ height: '100%',
1036
+ maxHeight: 200,
1037
+ overflow: 'auto'
1038
+ }
1039
+ }, data.map(function (dt) {
1040
+ return /*#__PURE__*/React.createElement("div", {
1041
+ style: {
1042
+ borderTop: '1px solid #eee'
1043
+ },
1044
+ key: dt.id
1045
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CheckboxControl, {
1046
+ checked: checkData.includes(dt.id),
1047
+ onChange: function onChange() {
1048
+ return checkItems(dt.id);
1049
+ }
1050
+ })), /*#__PURE__*/React.createElement("div", null, "#", dt.id), /*#__PURE__*/React.createElement("div", null, dt.title), /*#__PURE__*/React.createElement("div", null, dt.students));
1051
+ }))), loadingReset ? /*#__PURE__*/React.createElement(Spinner, null) : /*#__PURE__*/React.createElement(Button, {
1052
+ isPrimary: true,
1053
+ onClick: function onClick() {
1054
+ return resetCourse();
1055
+ },
1056
+ style: {
1057
+ marginTop: 10,
1058
+ height: 30
1059
+ }
1060
+ }, __('Reset now', 'learnpress'))), message.length > 0 && message.map(function (mess, index) {
1061
+ return /*#__PURE__*/React.createElement(Notice, {
1062
+ status: mess.status,
1063
+ key: index,
1064
+ isDismissible: false
1065
+ }, mess.message);
1066
+ }), /*#__PURE__*/React.createElement("style", null, '\
1067
+ .lp-reset-course_progress .components-base-control__field {\
1068
+ margin: 0;\
1069
+ }\
1070
+ .components-notice{\
1071
+ margin-left: 0;\
1072
+ }\
1073
+ .lp-reset-course_progress > div > div{\
1074
+ display: grid;\
1075
+ grid-template-columns: 80px 50px 1fr 80px;\
1076
+ align-items: center;\
1077
+ }\
1078
+ .lp-reset-course_progress > div > div > div{\
1079
+ maegin: 0;\
1080
+ padding: 8px 10px;\
1081
+ }\
1082
+ '));
1083
+ };
1084
+
1085
+ /* harmony default export */ __webpack_exports__["default"] = (ResetCourse);
1086
+
1087
+ /***/ }),
1088
+
1089
+ /***/ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/reset-data/index.js":
1090
+ /*!*********************************************************************************************************************************************************************************!*\
1091
+ !*** E:/Work/Webs/WP/Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/reset-data/index.js ***!
1092
+ \*********************************************************************************************************************************************************************************/
1093
+ /*! exports provided: default */
1094
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1095
+
1096
+ "use strict";
1097
+ __webpack_require__.r(__webpack_exports__);
1098
+ /* harmony import */ var _course__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./course */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/admin/pages/tools/reset-data/course.js");
1099
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
1100
+
1101
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1102
+
1103
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1104
+
1105
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1106
+
1107
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
1108
+
1109
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1110
+
1111
+
1112
+
1113
+ var resetData = function resetData() {
1114
+ if (document.querySelectorAll('#learn-press-reset-course-users').length > 0) {
1115
+ wp.element.render( /*#__PURE__*/React.createElement(_course__WEBPACK_IMPORTED_MODULE_0__["default"], null), _toConsumableArray(document.querySelectorAll('#learn-press-reset-course-users'))[0]);
1116
+ }
1117
+ };
1118
+
1119
+ /* harmony default export */ __webpack_exports__["default"] = (resetData);
1120
+
1121
+ /***/ }),
1122
+
1123
  /***/ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/utils/handle-ajax-api.js":
1124
  /*!********************************************************************************************************************************************************************!*\
1125
  !*** E:/Work/Webs/WP/Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/utils/handle-ajax-api.js ***!
assets/js/dist/admin/pages/tools.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function n(l){if(t[l])return t[l].exports;var a=t[l]={i:l,l:!1,exports:{}};return e[l].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(l,a,function(t){return e[t]}.bind(null,a));return l},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}({14:function(e,t,n){"use strict";n.r(t);var l,a,s,o,r,i,c,d,p=jQuery,u=null,f={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=p(".lp-overlay"),!!this.elLPOverlay.length&&(u=this.elLPOverlay,this.elMainContent=u.find(".main-content"),this.elTitle=u.find(".modal-title"),this.elBtnYes=u.find(".btn-yes"),this.elBtnNo=u.find(".btn-no"),this.elFooter=u.find(".lp-modal-footer"),p(document).on("click",".close, .btn-no",(function(){u.hide()})),p(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof f.callBackYes&&f.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},m=f,v=function(e,t,n){wp.apiFetch({path:e,method:"POST",data:t}).then((function(e){"function"==typeof n.success&&n.success(e)})).catch((function(e){"function"==typeof n.error&&n.error(e)})).then((function(){"function"==typeof n.completed&&n.completed()}))},h=jQuery,g=h("#lp-tool-upgrade-db"),b=function(){var e=0,t=g.find(".wrapper-terms-upgrade"),n=g.find(".wrapper-lp-status-upgrade"),l=g.find(".wrapper-lp-upgrade-message"),a=null;if(t.length){m.setContentModal(t.html());var s=m.elLPOverlay.find(".terms-upgrade"),o=s.find("input[name=lp-agree-term]"),r=s.find(".error"),i=h("input[name=message-when-upgrading]").val();a=function(){return r.hide(),r.removeClass("learn-press-message"),o.is(":checked")?(v("/lp/v1/database/agree_terms",{agree_terms:1},{}),m.elFooter.find(".learn-press-notice").remove(),m.elFooter.prepend('<span class="learn-press-notice">'+i+"</span>"),m.setContentModal(n.html()),!0):(r.show(),r.addClass("learn-press-message"),m.elMainContent.animate({scrollTop:r.offset().top}),!1)}}else m.setContentModal(n.html()),a=function(){return!0};m.setTitleModal(g.find("h2").html()),m.elBtnYes.text("Upgrade"),m.elBtnYes.show(),m.elBtnNo.text("close"),m.callBackYes=function(){if(a()){e=1,m.elBtnYes.hide(),m.elBtnNo.hide();var t=m.elLPOverlay.find(".lp-group-step"),n=g.find(".lp-item-step"),s=[];h.each(n,(function(e,t){var n=h(t);if(!n.hasClass("completed")){var l=n.find("input").val();s.push(l)}}));var o={steps:s,step:s[0]},r=null,i=function(e,n){(r=t.find("input[value="+e+"]").closest(".lp-item-step")).addClass("running"),100===n&&r.removeClass("running").addClass("completed"),r.find(".progress-bar").css("width",n+"%"),r.find(".percent").text(n+"%")};i(s[0],.1);var c={success:function(n){var a,s;i(o.step,n.percent),o.step!==n.name&&i(n.name,.1),a=o.step,s=(r=t.find("input[value="+a+"]").closest(".lp-item-step")).offset().top-m.elMainContent.offset().top+m.elMainContent.scrollTop(),m.elMainContent.stop().animate({scrollTop:s},600),"success"===n.status?(o.step=n.name,o.data=n.data,setTimeout((function(){v("/lp/v1/database/upgrade",o,c)}),800)):"finished"===n.status?(e=0,r.removeClass("running").addClass("completed"),setTimeout((function(){m.setContentModal(l.html())}),1e3),m.elFooter.find(".learn-press-notice").remove(),m.elBtnNo.show(),m.elBtnNo.on("click",(function(){window.location.reload()}))):(e=0,m.elFooter.find(".learn-press-notice").remove(),r.removeClass("running").addClass("error"),m.setContentModal(l.html(),(function(){m.elBtnYes.text("Retry").show(),m.callBackYes=function(){window.location.href="wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db"},m.elBtnNo.show(),n.message||(n.message="Upgrade not success! Please clear cache, restart sever then retry or contact to LP to help"),m.elMainContent.find(".learn-press-message").addClass("error").html(n.message)})))},error:function(t){e=0,m.setContentModal(l.html(),(function(){m.elBtnYes.text("Retry").show(),m.callBackYes=function(){window.location.location="wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db"},m.elBtnNo.show(),t.message||(t.message="Upgrade not success! Something wrong. Please clear cache, restart sever then retry or contact to LP to help"),m.elMainContent.find(".learn-press-message").addClass("error").html(t.message)}))},completed:function(){}};v("/lp/v1/database/upgrade",o,c)}},window.onbeforeunload=function(){if(e)return"LP is upgrading Database. Are you want to reload page?"},window.onclose=function(){if(e)return"LP is upgrading Database. Are you want to close page?"}},y=function(){if(g.length&&m.init()){var e=h(".wrapper-lp-status-upgrade"),t=window.location.search,n=new URLSearchParams(t).get("action");"upgrade-db"===n&&(m.elLPOverlay.show(),m.setTitleModal(g.find("h2").html()),m.setContentModal(h(".wrapper-lp-loading").html())),v("/lp/v1/database/get_steps",{},{success:function(t){var l=t.steps_completed,a=t.steps_default;if(void 0===l||void 0===a)return console.log("invalid steps_completed and steps_default"),!1;var s="";for(var o in a){var r=a[o],i=r.steps;for(var c in s='<div class="lp-group-step">',s+="<h3>"+r.label+"</h3>",i){var d=i[c],p="";void 0!==l[c]&&(p="completed"),s+='<div class="lp-item-step '+p+'">',s+='<div class="lp-item-step-left"><input type="hidden" name="lp_steps_upgrade_db[]" value="'+d.name+'" /></div>',s+='<div class="lp-item-step-right">',s+='<label for=""><strong></strong>'+d.label+"</label>",s+='<div class="description">'+d.description+"</div>",s+='<div class="percent"></div>',s+='<span class="progress-bar"></span>',s+="</div>",s+="</div>"}s+="</div>",e.append(s);var u=h(".lp-btn-upgrade-db");"upgrade-db"===n&&b(),u.on("click",(function(){m.elLPOverlay.show(),b()}))}},error:function(e){},completed:function(){}})}},C=function(){var e=document.querySelector("#lp-tool-create-indexes-tables");e&&e.querySelector(".lp-btn-create-indexes").addEventListener("click",(function(t){t.preventDefault();var n=e.querySelector(".wrapper-lp-loading");if(m.init()){m.elLPOverlay.show(),m.setContentModal(n.innerHTML),m.setTitleModal(e.querySelector("h2").textContent),m.elBtnYes[0].style.display="inline-block",m.elBtnYes[0].textContent="Run",m.elBtnNo[0].textContent="Close";var l={success:function(e){e.status,e.message;var t=e.data,n=t.tables,l=t.table,a=document.querySelector(".example-lp-group-step");m.setContentModal(a.innerHTML);var s=m.elLPOverlay[0].querySelector(".lp-group-step "),o=function(e,t){var n=s.querySelector("input[value="+e+"]").closest(".lp-item-step");n.classList.add("running"),100===t&&(n.classList.remove("running"),n.classList.add("completed")),n.querySelector(".progress-bar").style.width=t};for(var r in n){var i=m.elLPOverlay[0].querySelector(".lp-item-step").cloneNode(!0),c=i.querySelector("input");i.querySelector("label").textContent="Table: ".concat(r),c.value=r,s.append(i)}m.callBackYes=function(){var e="/lp/v1/tools/create-indexs",t={tables:n,table:l};m.elBtnNo[0].style.display="none",m.elBtnYes[0].style.display="none",o(l,.1);var a={success:function(n){var l=n.status,r=n.message,i=n.data,c=i.table,d=i.percent;o(t.table,d),void 0!==c&&(t.table!==c&&(o(c,.1),function(e){var t=s.querySelector("input[value="+e+"]").closest(".lp-item-step");console.log(t.offsetTop,m.elMainContent[0].offsetTop);var n=t.offsetTop-m.elMainContent[0].offsetTop+m.elMainContent[0].scrollTop;m.elMainContent.stop().animate({scrollTop:n},600)}(c)),t.table=c),"success"===l?v(e,t,a):"finished"===l?(console.log("finished"),m.elBtnNo[0].style.display="inline-block",m.elBtnNo[0].textContent="Finish"):console.log(r)},error:function(e){console.log(e)},completed:function(){}};v(e,t,a)}},error:function(e){},completed:function(){}};v("/lp/v1/tools/list-tables-indexs",{},l)}}))},w=function(){var e=document.querySelector("#lp-tool-re-upgrade-db");if(e){var t="lp/v1/database/check-db-valid-re-upgrade";v(t,{},{success:function(n){if(n.data.can_re_upgrade){e.style.display="block";var l=e.querySelector(".lp-btn-re-upgrade-db"),a=e.querySelector(".learn-press-message");l.addEventListener("click",(function(){confirm("Are want Re Upgrade!")&&v(t="lp/v1/database/del-tb-lp-upgrade-db",{},{success:function(e){var t=e.status,n=(e.message,e.data.url);"success"===t&&void 0!==n&&(window.location.href=n)},error:function(e){a.classList.add("error"),a.textContent=e.message,a.style.display="block"}})}))}},error:function(e){}})}};l=jQuery,a=l(document),s=!1,o=function(e){e.preventDefault();var t=l(this);s||confirm(lpGlobalSettings.i18n.confirm_install_sample_data)&&(t.addClass("disabled").html(t.data("installing-text")),l(".lp-install-sample__response").remove(),s=!0,l.ajax({url:t.attr("href"),data:l(".lp-install-sample__options").serializeJSON(),success:function(e){t.removeClass("disabled").html(t.data("text")),s=!1,l(e).insertBefore(t.parent())},error:function(){t.removeClass("disabled").html(t.data("text")),s=!1,l(response).insertBefore(t.parent())}}))},r=function(e){e.preventDefault();var t=l(this);s||confirm(lpGlobalSettings.i18n.confirm_uninstall_sample_data)&&(t.addClass("disabled").html(t.data("uninstalling-text")),s=!0,l.ajax({url:t.attr("href"),success:function(e){t.removeClass("disabled").html(t.data("text")),s=!1,l(e).insertBefore(t.parent())},error:function(){t.removeClass("disabled").html(t.data("text")),s=!1,l(response).insertBefore(t.parent())}}))},i=function(e){e.preventDefault();var t=l(this);t.hasClass("disabled")||(t.addClass("disabled").html(t.data("cleaning-text")),l.ajax({url:t.attr("href"),data:{},success:function(e){t.removeClass("disabled").html(t.data("text"))},error:function(){t.removeClass("disabled").html(t.data("text"))}}))},c=function(){l.ajax({url:"admin.php?page=lp-toggle-hard-cache-option",data:{v:this.checked?"yes":"no"},success:function(e){},error:function(){}})},d=function(e){e.preventDefault(),l(".lp-install-sample__options").toggleClass("hide-if-js")},l((function(){y(),C(),w(),a.on("click",".lp-install-sample__install",o).on("click",".lp-install-sample__uninstall",r).on("click","#learn-press-clear-cache",i).on("click",'input[name="enable_hard_cache"]',c).on("click",".lp-install-sample__toggle-options",d)}))}});
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=13)}({13:function(e,t,n){"use strict";n.r(t);var r=jQuery,a=null,l={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(a=this.elLPOverlay,this.elMainContent=a.find(".main-content"),this.elTitle=a.find(".modal-title"),this.elBtnYes=a.find(".btn-yes"),this.elBtnNo=a.find(".btn-no"),this.elFooter=a.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){a.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof l.callBackYes&&l.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},s=l,o=function(e,t,n){wp.apiFetch({path:e,method:"POST",data:t}).then((function(e){"function"==typeof n.success&&n.success(e)})).catch((function(e){"function"==typeof n.error&&n.error(e)})).then((function(){"function"==typeof n.completed&&n.completed()}))},i=jQuery,c=i("#lp-tool-upgrade-db"),u=function(){var e=0,t=c.find(".wrapper-terms-upgrade"),n=c.find(".wrapper-lp-status-upgrade"),r=c.find(".wrapper-lp-upgrade-message"),a=null;if(t.length){s.setContentModal(t.html());var l=s.elLPOverlay.find(".terms-upgrade"),u=l.find("input[name=lp-agree-term]"),d=l.find(".error"),p=i("input[name=message-when-upgrading]").val();a=function(){return d.hide(),d.removeClass("learn-press-message"),u.is(":checked")?(o("/lp/v1/database/agree_terms",{agree_terms:1},{}),s.elFooter.find(".learn-press-notice").remove(),s.elFooter.prepend('<span class="learn-press-notice">'+p+"</span>"),s.setContentModal(n.html()),!0):(d.show(),d.addClass("learn-press-message"),s.elMainContent.animate({scrollTop:d.offset().top}),!1)}}else s.setContentModal(n.html()),a=function(){return!0};s.setTitleModal(c.find("h2").html()),s.elBtnYes.text("Upgrade"),s.elBtnYes.show(),s.elBtnNo.text("close"),s.callBackYes=function(){if(a()){e=1,s.elBtnYes.hide(),s.elBtnNo.hide();var t=s.elLPOverlay.find(".lp-group-step"),n=c.find(".lp-item-step"),l=[];i.each(n,(function(e,t){var n=i(t);if(!n.hasClass("completed")){var r=n.find("input").val();l.push(r)}}));var u={steps:l,step:l[0]},d=null,p=function(e,n){(d=t.find("input[value="+e+"]").closest(".lp-item-step")).addClass("running"),100===n&&d.removeClass("running").addClass("completed"),d.find(".progress-bar").css("width",n+"%"),d.find(".percent").text(n+"%")};p(l[0],.1);var f={success:function(n){var a,l;p(u.step,n.percent),u.step!==n.name&&p(n.name,.1),a=u.step,l=(d=t.find("input[value="+a+"]").closest(".lp-item-step")).offset().top-s.elMainContent.offset().top+s.elMainContent.scrollTop(),s.elMainContent.stop().animate({scrollTop:l},600),"success"===n.status?(u.step=n.name,u.data=n.data,setTimeout((function(){o("/lp/v1/database/upgrade",u,f)}),800)):"finished"===n.status?(e=0,d.removeClass("running").addClass("completed"),setTimeout((function(){s.setContentModal(r.html())}),1e3),s.elFooter.find(".learn-press-notice").remove(),s.elBtnNo.show(),s.elBtnNo.on("click",(function(){window.location.reload()}))):(e=0,s.elFooter.find(".learn-press-notice").remove(),d.removeClass("running").addClass("error"),s.setContentModal(r.html(),(function(){s.elBtnYes.text("Retry").show(),s.callBackYes=function(){window.location.href="wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db"},s.elBtnNo.show(),n.message||(n.message="Upgrade not success! Please clear cache, restart sever then retry or contact to LP to help"),s.elMainContent.find(".learn-press-message").addClass("error").html(n.message)})))},error:function(t){e=0,s.setContentModal(r.html(),(function(){s.elBtnYes.text("Retry").show(),s.callBackYes=function(){window.location.location="wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db"},s.elBtnNo.show(),t.message||(t.message="Upgrade not success! Something wrong. Please clear cache, restart sever then retry or contact to LP to help"),s.elMainContent.find(".learn-press-message").addClass("error").html(t.message)}))},completed:function(){}};o("/lp/v1/database/upgrade",u,f)}},window.onbeforeunload=function(){if(e)return"LP is upgrading Database. Are you want to reload page?"},window.onclose=function(){if(e)return"LP is upgrading Database. Are you want to close page?"}},d=function(){if(c.length&&s.init()){var e=i(".wrapper-lp-status-upgrade"),t=window.location.search,n=new URLSearchParams(t).get("action");"upgrade-db"===n&&(s.elLPOverlay.show(),s.setTitleModal(c.find("h2").html()),s.setContentModal(i(".wrapper-lp-loading").html())),o("/lp/v1/database/get_steps",{},{success:function(t){var r=t.steps_completed,a=t.steps_default;if(void 0===r||void 0===a)return console.log("invalid steps_completed and steps_default"),!1;var l="";for(var o in a){var c=a[o],d=c.steps;for(var p in l='<div class="lp-group-step">',l+="<h3>"+c.label+"</h3>",d){var f=d[p],m="";void 0!==r[p]&&(m="completed"),l+='<div class="lp-item-step '+m+'">',l+='<div class="lp-item-step-left"><input type="hidden" name="lp_steps_upgrade_db[]" value="'+f.name+'" /></div>',l+='<div class="lp-item-step-right">',l+='<label for=""><strong></strong>'+f.label+"</label>",l+='<div class="description">'+f.description+"</div>",l+='<div class="percent"></div>',l+='<span class="progress-bar"></span>',l+="</div>",l+="</div>"}l+="</div>",e.append(l);var v=i(".lp-btn-upgrade-db");"upgrade-db"===n&&u(),v.on("click",(function(){s.elLPOverlay.show(),u()}))}},error:function(e){},completed:function(){}})}},p=function(){var e=document.querySelector("#lp-tool-create-indexes-tables");e&&e.querySelector(".lp-btn-create-indexes").addEventListener("click",(function(t){t.preventDefault();var n=e.querySelector(".wrapper-lp-loading");if(s.init()){s.elLPOverlay.show(),s.setContentModal(n.innerHTML),s.setTitleModal(e.querySelector("h2").textContent),s.elBtnYes[0].style.display="inline-block",s.elBtnYes[0].textContent="Run",s.elBtnNo[0].textContent="Close";var r={success:function(e){e.status,e.message;var t=e.data,n=t.tables,r=t.table,a=document.querySelector(".example-lp-group-step");s.setContentModal(a.innerHTML);var l=s.elLPOverlay[0].querySelector(".lp-group-step "),i=function(e,t){var n=l.querySelector("input[value="+e+"]").closest(".lp-item-step");n.classList.add("running"),100===t&&(n.classList.remove("running"),n.classList.add("completed")),n.querySelector(".progress-bar").style.width=t};for(var c in n){var u=s.elLPOverlay[0].querySelector(".lp-item-step").cloneNode(!0),d=u.querySelector("input");u.querySelector("label").textContent="Table: ".concat(c),d.value=c,l.append(u)}s.callBackYes=function(){var e="/lp/v1/tools/admin/create-indexs",t={tables:n,table:r};s.elBtnNo[0].style.display="none",s.elBtnYes[0].style.display="none",i(r,.1);var a={success:function(n){var r=n.status,c=n.message,u=n.data,d=u.table,p=u.percent;i(t.table,p),void 0!==d&&(t.table!==d&&(i(d,.1),function(e){var t=l.querySelector("input[value="+e+"]").closest(".lp-item-step");console.log(t.offsetTop,s.elMainContent[0].offsetTop);var n=t.offsetTop-s.elMainContent[0].offsetTop+s.elMainContent[0].scrollTop;s.elMainContent.stop().animate({scrollTop:n},600)}(d)),t.table=d),"success"===r?o(e,t,a):"finished"===r?(console.log("finished"),s.elBtnNo[0].style.display="inline-block",s.elBtnNo[0].textContent="Finish"):console.log(c)},error:function(e){console.log(e)},completed:function(){}};o(e,t,a)}},error:function(e){},completed:function(){}};o("/lp/v1/admin/tools/list-tables-indexs",{},r)}}))},f=function(){var e=document.querySelector("#lp-tool-re-upgrade-db");if(e){var t="lp/v1/database/check-db-valid-re-upgrade";o(t,{},{success:function(n){if(n.data.can_re_upgrade){e.style.display="block";var r=e.querySelector(".lp-btn-re-upgrade-db"),a=e.querySelector(".learn-press-message");r.addEventListener("click",(function(){confirm("Are want Re Upgrade!")&&o(t="lp/v1/database/del-tb-lp-upgrade-db",{},{success:function(e){var t=e.status,n=(e.message,e.data.url);"success"===t&&void 0!==n&&(window.location.href=n)},error:function(e){a.classList.add("error"),a.textContent=e.message,a.style.display="block"}})}))}},error:function(e){}})}};function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=b(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,l=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw l}}}}function v(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t,n,r,a,l,s){try{var o=e[l](s),i=o.value}catch(e){return void n(e)}o.done?t(i):Promise.resolve(i).then(r,a)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var l=e.apply(t,n);function s(e){h(l,r,a,s,o,"next",e)}function o(e){h(l,r,a,s,o,"throw",e)}s(void 0)}))}}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,a,l=[],s=!0,o=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);s=!0);}catch(e){o=!0,a=e}finally{try{s||null==n.return||n.return()}finally{if(o)throw a}}return l}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return w(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var C=wp.i18n.__,x=wp.components,S=x.TextControl,_=x.Button,k=x.Spinner,R=x.CheckboxControl,E=x.Notice,M=wp.element,B=M.useState,T=M.useEffect,P=wp.url.addQueryArgs,L=function(){var e=y(B(!1),2),t=e[0],n=e[1],r=y(B(""),2),a=r[0],l=r[1],s=y(B([]),2),o=s[0],i=s[1],c=y(B([]),2),u=c[0],d=c[1],p=y(B([]),2),f=p[0],h=p[1],b=y(B(!1),2),w=b[0],x=b[1];T((function(){M(a)}),[a]);var M=function(){var e=g(regeneratorRuntime.mark((function e(r){var a,l,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,r&&!t){e.next=5;break}return h([]),i([]),e.abrupt("return");case 5:if(!(r.length<3)){e.next=9;break}return h([{status:"error",message:"Please enter at least 3 characters to searching course."}]),i([]),e.abrupt("return");case 9:return n(!0),e.next=12,wp.apiFetch({path:P("lp/v1/admin/tools/reset-data/search-courses",{s:r}),method:"GET"});case 12:a=e.sent,l=a.status,s=a.data,n(!1),"success"===l?(i(s),h([])):(h([{status:"error",message:a.message||"LearnPress: Search Course Fail!"}]),i([])),e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),console.log(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(t){return e.apply(this,arguments)}}();var L=function(){var e=g(regeneratorRuntime.mark((function e(){var t,n,r,a,l,s,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==u.length){e.next=3;break}return h([{status:"error",message:"Please chooce Course for reset data!"}]),e.abrupt("return");case 3:if(confirm("Are you sure to reset course progress of all users enrolled this course?")){e.next=5;break}return e.abrupt("return");case 5:t=[],e.prev=6,x(!0),n=m(u),e.prev=9,n.s();case 11:if((r=n.n()).done){e.next=20;break}return a=r.value,e.next=15,wp.apiFetch({path:P("lp/v1/admin/tools/reset-data/reset-courses",{courseId:a}),method:"GET"});case 15:l=e.sent,s=l.status,l.data,o=l.message,t.push({status:s,message:o||"Course #".concat(a," reset successfully!")});case 18:e.next=11;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(9),n.e(e.t0);case 25:return e.prev=25,n.f(),e.finish(25);case 28:x(!1),e.next=34;break;case 31:e.prev=31,e.t1=e.catch(6),t.push({status:"error",message:e.t1.message||"LearnPress Error: Reset Course Data."});case 34:h(t);case 35:case"end":return e.stop()}}),e,null,[[6,31],[9,22,25,28]])})));return function(){return e.apply(this,arguments)}}();return React.createElement(React.Fragment,null,React.createElement("h2",null,C("Reset course progress","learnpress")),React.createElement("div",{className:"description"},React.createElement("p",null,C("This action will reset progress of a course for all users have enrolled.","learnpress")),React.createElement("p",null,C("Search results only show course have user data.","learnpress")),React.createElement("div",null,React.createElement(S,{placeholder:C("Search course by name","learnpress"),value:a,onChange:function(e){return l(e)},style:{width:300}}))),t&&React.createElement(k,null),o.length>0&&React.createElement(React.Fragment,null,React.createElement("div",{className:"lp-reset-course_progress",style:{border:"1px solid #eee"}},React.createElement("div",null,React.createElement("div",{style:{background:"#eee"}},React.createElement("div",null,React.createElement(R,{checked:u.length===o.length,onChange:function(){u.length===o.length?d([]):d(o.map((function(e){return e.id})))},style:{margin:0}})),React.createElement("div",null,C("ID","learnpress")),React.createElement("div",null,C("Name","learnpress")),React.createElement("div",null,C("Students","learnpress")))),React.createElement("div",{style:{height:"100%",maxHeight:200,overflow:"auto"}},o.map((function(e){return React.createElement("div",{style:{borderTop:"1px solid #eee"},key:e.id},React.createElement("div",null,React.createElement(R,{checked:u.includes(e.id),onChange:function(){return function(e){var t=v(u);if(t.includes(e)){var n=t.indexOf(e);n>-1&&t.splice(n,1)}else t.push(e);d(t)}(e.id)}})),React.createElement("div",null,"#",e.id),React.createElement("div",null,e.title),React.createElement("div",null,e.students))})))),w?React.createElement(k,null):React.createElement(_,{isPrimary:!0,onClick:function(){return L()},style:{marginTop:10,height:30}},C("Reset now","learnpress"))),f.length>0&&f.map((function(e,t){return React.createElement(E,{status:e.status,key:t,isDismissible:!1},e.message)})),React.createElement("style",null,"\t\t\t\t.lp-reset-course_progress .components-base-control__field {\t\t\t\t\tmargin: 0;\t\t\t\t}\t\t\t\t.components-notice{\t\t\t\t\tmargin-left: 0;\t\t\t\t}\t\t\t\t.lp-reset-course_progress > div > div{\t\t\t\t\tdisplay: grid;\t\t\t\t\tgrid-template-columns: 80px 50px 1fr 80px;\t\t\t\t\talign-items: center;\t\t\t\t}\t\t\t\t.lp-reset-course_progress > div > div > div{\t\t\t\t\tmaegin: 0;\t\t\t\t\tpadding: 8px 10px;\t\t\t\t}\t\t\t\t"))};function A(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j,N,q,Y,F,I,D,U,G=function(){document.querySelectorAll("#learn-press-reset-course-users").length>0&&wp.element.render(React.createElement(L,null),A(document.querySelectorAll("#learn-press-reset-course-users"))[0])};j=jQuery,N=j(document),q=!1,Y=function(e){e.preventDefault();var t=j(this);q||confirm(lpGlobalSettings.i18n.confirm_install_sample_data)&&(t.addClass("disabled").html(t.data("installing-text")),j(".lp-install-sample__response").remove(),q=!0,j.ajax({url:t.attr("href"),data:j(".lp-install-sample__options").serializeJSON(),success:function(e){t.removeClass("disabled").html(t.data("text")),q=!1,j(e).insertBefore(t.parent())},error:function(){t.removeClass("disabled").html(t.data("text")),q=!1,j(response).insertBefore(t.parent())}}))},F=function(e){e.preventDefault();var t=j(this);q||confirm(lpGlobalSettings.i18n.confirm_uninstall_sample_data)&&(t.addClass("disabled").html(t.data("uninstalling-text")),q=!0,j.ajax({url:t.attr("href"),success:function(e){t.removeClass("disabled").html(t.data("text")),q=!1,j(e).insertBefore(t.parent())},error:function(){t.removeClass("disabled").html(t.data("text")),q=!1,j(response).insertBefore(t.parent())}}))},I=function(e){e.preventDefault();var t=j(this);t.hasClass("disabled")||(t.addClass("disabled").html(t.data("cleaning-text")),j.ajax({url:t.attr("href"),data:{},success:function(e){t.removeClass("disabled").html(t.data("text"))},error:function(){t.removeClass("disabled").html(t.data("text"))}}))},D=function(){j.ajax({url:"admin.php?page=lp-toggle-hard-cache-option",data:{v:this.checked?"yes":"no"},success:function(e){},error:function(){}})},U=function(e){e.preventDefault(),j(".lp-install-sample__options").toggleClass("hide-if-js")},j((function(){d(),p(),f(),G(),N.on("click",".lp-install-sample__install",Y).on("click",".lp-install-sample__uninstall",F).on("click","#learn-press-clear-cache",I).on("click",'input[name="enable_hard_cache"]',D).on("click",".lp-install-sample__toggle-options",U)}))}});
assets/js/dist/frontend/modal.js CHANGED
@@ -226,7 +226,7 @@ __webpack_require__.r(__webpack_exports__);
226
  /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/modal/store/actions.js");
227
  /* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectors */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/modal/store/selectors.js");
228
  /* harmony import */ var _middlewares__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./middlewares */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/modal/store/middlewares.js");
229
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
230
 
231
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
232
 
@@ -309,7 +309,7 @@ function applyMiddlewares(store) {
309
  "use strict";
310
  __webpack_require__.r(__webpack_exports__);
311
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Modal", function() { return Modal; });
312
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
313
 
314
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
315
 
226
  /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/modal/store/actions.js");
227
  /* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectors */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/modal/store/selectors.js");
228
  /* harmony import */ var _middlewares__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./middlewares */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/modal/store/middlewares.js");
229
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
230
 
231
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
232
 
309
  "use strict";
310
  __webpack_require__.r(__webpack_exports__);
311
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Modal", function() { return Modal; });
312
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
313
 
314
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
315
 
assets/js/dist/frontend/question-types.js CHANGED
@@ -469,7 +469,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
469
 
470
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
471
 
472
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
473
 
474
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
475
 
@@ -637,7 +637,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
637
 
638
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
639
 
640
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
641
 
642
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
643
 
@@ -757,7 +757,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
757
 
758
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
759
 
760
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
761
 
762
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
763
 
@@ -852,7 +852,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
852
 
853
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
854
 
855
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
856
 
857
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
858
 
@@ -1064,7 +1064,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
1064
 
1065
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1066
 
1067
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
1068
 
1069
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
1070
 
@@ -1170,7 +1170,7 @@ __webpack_require__.r(__webpack_exports__);
1170
 
1171
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1172
 
1173
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1174
 
1175
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1176
 
469
 
470
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
471
 
472
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
473
 
474
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
475
 
637
 
638
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
639
 
640
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
641
 
642
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
643
 
757
 
758
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
759
 
760
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
761
 
762
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
763
 
852
 
853
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
854
 
855
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
856
 
857
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
858
 
1064
 
1065
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1066
 
1067
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1068
 
1069
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
1070
 
1170
 
1171
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1172
 
1173
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
1174
 
1175
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1176
 
assets/js/dist/frontend/question-types.min.js CHANGED
@@ -1 +1 @@
1
- this.LP=this.LP||{},this.LP.questionTypes=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}({0:function(e,t){e.exports=window.wp.i18n},1:function(e,t){e.exports=window.wp.data},2:function(e,t){e.exports=window.wp.element},20:function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionBase",(function(){return v})),n.d(t,"SingleChoice",(function(){return E})),n.d(t,"MultipleChoices",(function(){return U})),n.d(t,"TrueOrFalse",(function(){return Y})),n.d(t,"FillInBlanks",(function(){return le})),n.d(t,"SortingChoice",(function(){return je}));var r=n(2),o=n(3),i=n(1),c=n(0);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=lodash,d=h.isArray,v=(h.get,h.set,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(u,e);var t,n,r,o=f(u);function u(e){var t;a(this,u),m(y(t=o.apply(this,arguments)),"prepare",(function(e,t){var n=e.question;return n&&n.id!==t.questionId?{options:t.self.parseOptions(n.options)}:null})),m(y(t),"setInputRef",(function(e,n){t.inputs||(t.inputs={}),t.inputs[n]=e})),m(y(t),"maybeShowCorrectAnswer",(function(){var e=t.props,n=e.status,r=e.isCheckedAnswer,o=e.showCorrectReview,i=e.isReviewing;return"completed"===n&&o||r&&!i})),m(y(t),"maybeDisabledOption",(function(e){var n=t.props,r=(n.answered,n.status);return n.isCheckedAnswer||"started"!==r})),m(y(t),"setAnswerChecked",(function(){return function(e){var n=t.props,r=n.updateUserQuestionAnswers,o=n.question;if("started"!==n.status)return"LP Error: can not set answers";var i=t.$wrap.find(".option-check"),c=[],u="multi_choice"!==o.type;i.each((function(e,t){if(t.checked&&(c.push(t.value),u))return!1})),r(o.id,u?c[0]:c)}})),m(y(t),"maybeCheckedAnswer",(function(e){var n=t.props.answered;return d(n)?!!n.find((function(t){return t==e})):e==n})),m(y(t),"getOptionType",(function(e,t){var n="radio";switch(e){case"multi_choice":n="checkbox"}return n})),m(y(t),"isDefaultType",(function(){return t.props.supportOptions})),m(y(t),"getWarningMessage",(function(){return React.createElement(React.Fragment,null,Object(c.__)("Render function should be overwritten from base.","learnpress"))})),m(y(t),"getOptionClass",(function(e){t.props.answered;return["answer-option"]})),m(y(t),"parseOptions",(function(e){return e&&(e=d(e)?e:JSON.parse(CryptoJS.AES.decrypt(e.data,e.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),e=d(e)?e:JSON.parse(e)),e||[]})),m(y(t),"getOptions",(function(){return t.state.options||[]})),m(y(t),"isCorrect",(function(){var e,n,r,o=t.props.answered;if(!o)return!1;for(e=0,r=t.getOptions();e<r.length;e++)if("yes"===(n=r[e]).isTrue&&o==n.value)return!0;return!1})),m(y(t),"isChecked",(function(){var e=t.props.question;return Object(i.select)("learnpress/quiz").isCheckedAnswer(e.id)})),m(y(t),"getCorrectLabel",(function(){var e=t.props,n=(e.status,e.answered,e.question),r=(LP.config.isQuestionCorrect[n.type]||t.isCorrect).call(y(t));return t.maybeShowCorrectAnswer()&&React.createElement("div",{className:"question-response"+(r?" correct":" incorrect")},React.createElement("span",{className:"label"},r?Object(c.__)("Correct","learnpress"):Object(c.__)("Incorrect","learnpress")),React.createElement("span",{className:"point"},sprintf(Object(c.__)("%d/%d point","learnpress"),r?n.point:0,n.point)))}));var n=e.question;return t.state={optionClass:["answer-option"],questionId:0,options:n?t.parseOptions(n.options):[],self:y(t)},e.$wrap&&(t.$wrap=e.$wrap),t}return t=u,r=[{key:"getDerivedStateFromProps",value:function(e,t){return t.self.prepare(e,t)}}],(n=[{key:"componentDidMount",value:function(){var e=this.prepare(this.props,this.state);e&&this.setState(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.question,r=t.status;return React.createElement("div",{className:"question-answers"},this.isDefaultType()&&React.createElement("ul",{id:"answer-options-".concat(n.id),className:"answer-options"},this.getOptions().map((function(t){var o="learn-press-answer-option-".concat(t.uid);return React.createElement("li",{className:e.getOptionClass(t).join(" "),key:"answer-option-".concat(t.uid)},React.createElement("input",{type:e.getOptionType(n.type,t),className:"option-check",name:"started"===r?"learn-press-question-".concat(n.id):"",id:o,ref:function(n){e.setInputRef(n,t.value)},onChange:e.setAnswerChecked(),disabled:e.maybeDisabledOption(t),checked:e.maybeCheckedAnswer(t.value),value:"started"===r?t.value:""}),React.createElement("label",{htmlFor:o,className:"option-title",dangerouslySetInnerHTML:{__html:t.title||t.value}}))}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&s(t.prototype,n),r&&s(t,r),u}(r.Component));function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return R(this,n)}}function R(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?P(e):t}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(n,e);var t=_(n);function n(){var e;j(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return C(P(e=t.call.apply(t,[this].concat(o))),"getOptionClass",(function(t){var n=e.props.answered,r=O(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&r.push("answer-correct"),n&&("yes"===t.isTrue?n===t.value&&r.push("answered-correct"):n===t.value&&r.push("answered-wrong"))),r})),e}return n}(v);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var o=B(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?M(e):t}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var F=lodash.isBoolean,U=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I(e,t)}(n,e);var t=N(n);function n(){var e;x(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return D(M(e=t.call.apply(t,[this].concat(o))),"isCorrect",(function(){var t,n,r,o=e.props.answered;if(F(o)||!o)return!1;for(t=0,r=e.getOptions();t<r.length;t++)if("yes"===(n=r[t]).isTrue){if(-1===o.indexOf(n.value))return!1}else if(-1!==o.indexOf(n.value))return!1;return!0})),D(M(e),"getOptionClass",(function(t){var n=e.props.answered,r=k(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&r.push("answer-correct"),n&&("yes"===t.isTrue?-1!==n.indexOf(t.value)&&r.push("answered-correct"):-1!==n.indexOf(t.value)&&r.push("answered-wrong"))),r})),e}return n}(v);function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Q(e){return function(e){if(Array.isArray(e))return $(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){return(J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=K(e);if(t){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return V(this,n)}}function V(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?G(e):t}function G(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&J(e,t)}(n,e);var t=W(n);function n(){var e;z(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return X(G(e=t.call.apply(t,[this].concat(o))),"getOptionClass",(function(t){var n=e.props.answered,r=Q(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&r.push("answer-correct"),n&&("yes"===t.isTrue?n===t.value&&r.push("answered-correct"):n===t.value&&r.push("answered-wrong"))),r})),e}return n}(v);function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return te(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var o=ae(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ce(this,n)}}function ce(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?ue(e):t}function ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(i,e);var t,n,r,o=ie(i);function i(){var e;ne(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return se(ue(e=o.call.apply(o,[this].concat(n))),"updateFibAnswer",(function(){var t=document.querySelectorAll(".lp-fib-input > input"),n={};ee(t).map((function(t){t.addEventListener("input",(function(r){e.setAnswered(n,t.dataset.id,r.target.value)})),t.addEventListener("paste",(function(r){e.setAnswered(n,t.dataset.id,r.target.value)}))}))})),se(ue(e),"setAnswered",(function(t,n,r){var o=e.props,i=o.updateUserQuestionAnswers,c=o.question;if("started"!==o.status)return"LP Error: can not set answers";var u=Object.assign(t,se({},n,r));i(c.id,u)})),se(ue(e),"getCorrectLabel",(function(){var t=e.props,n=t.question,r=t.mark,o=r||0;return r&&(Number.isInteger(r)||(o=r.toFixed(2))),e.maybeShowCorrectAnswer()&&React.createElement("div",{className:"question-response correct"},React.createElement("span",{className:"label"},Object(c.__)("Points","learnpress")),React.createElement("span",{className:"point"},"".concat(o,"/").concat(n.point," ").concat(Object(c.__)("point","learnpress"))),React.createElement("span",{className:"lp-fib-note"},React.createElement("span",{style:{background:"#00adff"}}),Object(c.__)("Correct","learnpress")),React.createElement("span",{className:"lp-fib-note"},React.createElement("span",{style:{background:"#d85554"}}),Object(c.__)("Incorrect","learnpress")))})),e}return t=i,(n=[{key:"componentDidMount",value:function(){this.updateFibAnswer()}},{key:"componentDidUpdate",value:function(e){e.answered||this.updateFibAnswer()}},{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement("div",{className:"lp-fib-content"},this.getOptions().map((function(e){return React.createElement("div",{key:"blank-".concat(e.uid),dangerouslySetInnerHTML:{__html:e.title||e.value}})}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&re(t.prototype,n),r&&re(t,r),i}(v);function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pe(e){return function(e){if(Array.isArray(e))return ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ye(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function de(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Oe(e);if(t){var o=Oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ve(this,n)}}function ve(e,t){return!t||"object"!==fe(t)&&"function"!=typeof t?we(e):t}function we(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var je=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(i,e);var t,n,r,o=de(i);function i(){var e;be(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ge(we(e=o.call.apply(o,[this].concat(n))),"isCorrect",(function(){var t,n,r,o=e.props.answered;if(!o)return!1;for(t=0,r=e.getOptions();t<r.length;t++)if(o[(n=r[t]).sorting]!==n.value)return!1;return!0})),ge(we(e),"getCorrectLabel",(function(){var t=e.props.question,n=e.isCorrect.call(we(e));return e.maybeShowCorrectAnswer()&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-response"+(n?" correct":" incorrect")},React.createElement("span",{className:"label"},n?Object(c.__)("Correct","learnpress"):Object(c.__)("Incorrect","learnpress")),React.createElement("span",{className:"point"},sprintf(Object(c.__)("%d/%d point","learnpress"),n?t.point:0,t.point))))})),ge(we(e),"getAnswerSortingChoice",(function(){var t=e.props.question.options||[],n=e.isCorrect.call(we(e)),r=[];return!n&&t.length>0&&t.map((function(e){var t=e.sorting;if(void 0!==t)return r[t]=e.title})),r})),e}return t=i,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.updateUserQuestionAnswers,n=e.question,r=document.querySelector("#answer-options-".concat(n.id));return jQuery(r).sortable({items:".answer-option",cursor:"move",axis:"y",handle:".option-drag",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,update:function(e,o){var i=r.querySelectorAll(".answer-option"),c=[];pe(i).map((function(e){return c.push(e.dataset.value)})),c.length>0&&t(n.id,c)}})}},{key:"render",value:function(){var e=this,t=this.props.question,n=this.getAnswerSortingChoice();return React.createElement("div",{className:"question-answers"},this.isDefaultType()&&React.createElement("ul",{id:"answer-options-".concat(t.id),className:"answer-options lp-sorting-choice-ul"},this.getOptions().map((function(t,r){return React.createElement(React.Fragment,null,React.createElement("li",{className:e.getOptionClass(t).join(" "),key:"answer-option-".concat(t.value),"data-value":t.value},React.createElement("span",{className:"option-drag",style:{display:"flex",alignItems:"center",position:"absolute",height:"100%",left:14}},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24"},React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.createElement("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}))),React.createElement("label",{htmlFor:"learn-press-answer-option-".concat(t.value),className:"option-title",dangerouslySetInnerHTML:{__html:t.title||t.value}})),n.length>0&&void 0!==n[r]&&React.createElement("div",{className:"lp-sorting-choice__check-answer",key:"lp-checked-answer-".concat(r),style:{marginBottom:10}},n[r]))}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&me(t.prototype,n),r&&me(t,r),i}(v);function Se(e){return(Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ae(e,t){return(Ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ke(e);if(t){var o=ke(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ee(this,n)}}function Ee(e,t){return!t||"object"!==Se(t)&&"function"!=typeof t?Te(e):t}function Te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ae(e,t)}(i,e);var t,n,r,o=Ce(i);function i(){var e;Re(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qe(Te(e=o.call.apply(o,[this].concat(n))),"getQuestion",(function(){var t=e.props.question;return LP.Hook.applyFilters("question-types",{single_choice:LP.questionTypes.SingleChoice,multi_choice:LP.questionTypes.MultipleChoices,true_or_false:LP.questionTypes.TrueOrFalse,fill_in_blanks:LP.questionTypes.FillInBlanks,sorting_choice:LP.questionTypes.SortingChoice})[t.type]})),e}return t=i,(n=[{key:"render",value:function(){var e=this.props,t=e.question,n=e.supportOptions,r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){qe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.props);r.supportOptions=-1!==n.indexOf(t.type);var o=this.getQuestion()||function(){return React.createElement("div",{className:"question-types",dangerouslySetInnerHTML:{__html:Object(c.sprintf)(Object(c.__)("Question <code>%s</code> invalid!","learnpress"),t.type)}})};return React.createElement(React.Fragment,null,React.createElement(o,r))}}])&&Pe(t.prototype,n),r&&Pe(t,r),i}(r.Component),Ie=Object(o.compose)(Object(i.withSelect)((function(e,t){var n=t.question.id,r=e("learnpress/quiz"),o=r.getData,i=r.isCheckedAnswer;return{supportOptions:o("supportOptions"),isCheckedAnswer:i(n),keyPressed:o("keyPressed"),showCorrectReview:o("showCorrectReview"),isReviewing:"reviewing"===o("mode")}})),Object(i.withDispatch)((function(){return{}})))(xe);t.default=Ie},3:function(e,t){e.exports=window.wp.compose}});
1
+ this.LP=this.LP||{},this.LP.questionTypes=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=20)}({0:function(e,t){e.exports=window.wp.i18n},1:function(e,t){e.exports=window.wp.data},2:function(e,t){e.exports=window.wp.element},20:function(e,t,n){"use strict";n.r(t),n.d(t,"QuestionBase",(function(){return v})),n.d(t,"SingleChoice",(function(){return E})),n.d(t,"MultipleChoices",(function(){return U})),n.d(t,"TrueOrFalse",(function(){return Y})),n.d(t,"FillInBlanks",(function(){return le})),n.d(t,"SortingChoice",(function(){return je}));var r=n(2),o=n(3),i=n(1),c=n(0);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=lodash,d=h.isArray,v=(h.get,h.set,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(u,e);var t,n,r,o=f(u);function u(e){var t;a(this,u),m(y(t=o.apply(this,arguments)),"prepare",(function(e,t){var n=e.question;return n&&n.id!==t.questionId?{options:t.self.parseOptions(n.options)}:null})),m(y(t),"setInputRef",(function(e,n){t.inputs||(t.inputs={}),t.inputs[n]=e})),m(y(t),"maybeShowCorrectAnswer",(function(){var e=t.props,n=e.status,r=e.isCheckedAnswer,o=e.showCorrectReview,i=e.isReviewing;return"completed"===n&&o||r&&!i})),m(y(t),"maybeDisabledOption",(function(e){var n=t.props,r=(n.answered,n.status);return n.isCheckedAnswer||"started"!==r})),m(y(t),"setAnswerChecked",(function(){return function(e){var n=t.props,r=n.updateUserQuestionAnswers,o=n.question;if("started"!==n.status)return"LP Error: can not set answers";var i=t.$wrap.find(".option-check"),c=[],u="multi_choice"!==o.type;i.each((function(e,t){if(t.checked&&(c.push(t.value),u))return!1})),r(o.id,u?c[0]:c)}})),m(y(t),"maybeCheckedAnswer",(function(e){var n=t.props.answered;return d(n)?!!n.find((function(t){return t==e})):e==n})),m(y(t),"getOptionType",(function(e,t){var n="radio";switch(e){case"multi_choice":n="checkbox"}return n})),m(y(t),"isDefaultType",(function(){return t.props.supportOptions})),m(y(t),"getWarningMessage",(function(){return React.createElement(React.Fragment,null,Object(c.__)("Render function should be overwritten from base.","learnpress"))})),m(y(t),"getOptionClass",(function(e){t.props.answered;return["answer-option"]})),m(y(t),"parseOptions",(function(e){return e&&(e=d(e)?e:JSON.parse(CryptoJS.AES.decrypt(e.data,e.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),e=d(e)?e:JSON.parse(e)),e||[]})),m(y(t),"getOptions",(function(){return t.state.options||[]})),m(y(t),"isCorrect",(function(){var e,n,r,o=t.props.answered;if(!o)return!1;for(e=0,r=t.getOptions();e<r.length;e++)if("yes"===(n=r[e]).isTrue&&o==n.value)return!0;return!1})),m(y(t),"isChecked",(function(){var e=t.props.question;return Object(i.select)("learnpress/quiz").isCheckedAnswer(e.id)})),m(y(t),"getCorrectLabel",(function(){var e=t.props,n=(e.status,e.answered,e.question),r=(LP.config.isQuestionCorrect[n.type]||t.isCorrect).call(y(t));return t.maybeShowCorrectAnswer()&&React.createElement("div",{className:"question-response"+(r?" correct":" incorrect")},React.createElement("span",{className:"label"},r?Object(c.__)("Correct","learnpress"):Object(c.__)("Incorrect","learnpress")),React.createElement("span",{className:"point"},sprintf(Object(c.__)("%d/%d point","learnpress"),r?n.point:0,n.point)))}));var n=e.question;return t.state={optionClass:["answer-option"],questionId:0,options:n?t.parseOptions(n.options):[],self:y(t)},e.$wrap&&(t.$wrap=e.$wrap),t}return t=u,r=[{key:"getDerivedStateFromProps",value:function(e,t){return t.self.prepare(e,t)}}],(n=[{key:"componentDidMount",value:function(){var e=this.prepare(this.props,this.state);e&&this.setState(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.question,r=t.status;return React.createElement("div",{className:"question-answers"},this.isDefaultType()&&React.createElement("ul",{id:"answer-options-".concat(n.id),className:"answer-options"},this.getOptions().map((function(t){var o="learn-press-answer-option-".concat(t.uid);return React.createElement("li",{className:e.getOptionClass(t).join(" "),key:"answer-option-".concat(t.uid)},React.createElement("input",{type:e.getOptionType(n.type,t),className:"option-check",name:"started"===r?"learn-press-question-".concat(n.id):"",id:o,ref:function(n){e.setInputRef(n,t.value)},onChange:e.setAnswerChecked(),disabled:e.maybeDisabledOption(t),checked:e.maybeCheckedAnswer(t.value),value:"started"===r?t.value:""}),React.createElement("label",{htmlFor:o,className:"option-title",dangerouslySetInnerHTML:{__html:t.title||t.value}}))}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&s(t.prototype,n),r&&s(t,r),u}(r.Component));function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function g(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=A(e);if(t){var o=A(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return R(this,n)}}function R(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?P(e):t}function P(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(n,e);var t=_(n);function n(){var e;j(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return C(P(e=t.call.apply(t,[this].concat(o))),"getOptionClass",(function(t){var n=e.props.answered,r=g(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&r.push("answer-correct"),n&&("yes"===t.isTrue?n===t.value&&r.push("answered-correct"):n===t.value&&r.push("answered-wrong"))),r})),e}return n}(v);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var o=B(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?M(e):t}function M(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var F=lodash.isBoolean,U=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I(e,t)}(n,e);var t=N(n);function n(){var e;x(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return D(M(e=t.call.apply(t,[this].concat(o))),"isCorrect",(function(){var t,n,r,o=e.props.answered;if(F(o)||!o)return!1;for(t=0,r=e.getOptions();t<r.length;t++)if("yes"===(n=r[t]).isTrue){if(-1===o.indexOf(n.value))return!1}else if(-1!==o.indexOf(n.value))return!1;return!0})),D(M(e),"getOptionClass",(function(t){var n=e.props.answered,r=k(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&r.push("answer-correct"),n&&("yes"===t.isTrue?-1!==n.indexOf(t.value)&&r.push("answered-correct"):-1!==n.indexOf(t.value)&&r.push("answered-wrong"))),r})),e}return n}(v);function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Q(e){return function(e){if(Array.isArray(e))return $(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){return(J=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=K(e);if(t){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return V(this,n)}}function V(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?G(e):t}function G(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&J(e,t)}(n,e);var t=W(n);function n(){var e;z(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return X(G(e=t.call.apply(t,[this].concat(o))),"getOptionClass",(function(t){var n=e.props.answered,r=Q(e.state.optionClass);return e.maybeShowCorrectAnswer()&&("yes"===t.isTrue&&r.push("answer-correct"),n&&("yes"===t.isTrue?n===t.value&&r.push("answered-correct"):n===t.value&&r.push("answered-wrong"))),r})),e}return n}(v);function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return te(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ae(e);if(t){var o=ae(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ce(this,n)}}function ce(e,t){return!t||"object"!==Z(t)&&"function"!=typeof t?ue(e):t}function ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(i,e);var t,n,r,o=ie(i);function i(){var e;ne(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return se(ue(e=o.call.apply(o,[this].concat(n))),"updateFibAnswer",(function(){var t=document.querySelectorAll(".lp-fib-input > input"),n={};ee(t).map((function(t){t.addEventListener("input",(function(r){e.setAnswered(n,t.dataset.id,r.target.value)})),t.addEventListener("paste",(function(r){e.setAnswered(n,t.dataset.id,r.target.value)}))}))})),se(ue(e),"setAnswered",(function(t,n,r){var o=e.props,i=o.updateUserQuestionAnswers,c=o.question;if("started"!==o.status)return"LP Error: can not set answers";var u=Object.assign(t,se({},n,r));i(c.id,u)})),se(ue(e),"getCorrectLabel",(function(){var t=e.props,n=t.question,r=t.mark,o=r||0;return r&&(Number.isInteger(r)||(o=r.toFixed(2))),e.maybeShowCorrectAnswer()&&React.createElement("div",{className:"question-response correct"},React.createElement("span",{className:"label"},Object(c.__)("Points","learnpress")),React.createElement("span",{className:"point"},"".concat(o,"/").concat(n.point," ").concat(Object(c.__)("point","learnpress"))),React.createElement("span",{className:"lp-fib-note"},React.createElement("span",{style:{background:"#00adff"}}),Object(c.__)("Correct","learnpress")),React.createElement("span",{className:"lp-fib-note"},React.createElement("span",{style:{background:"#d85554"}}),Object(c.__)("Incorrect","learnpress")))})),e}return t=i,(n=[{key:"componentDidMount",value:function(){this.updateFibAnswer()}},{key:"componentDidUpdate",value:function(e){e.answered||this.updateFibAnswer()}},{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement("div",{className:"lp-fib-content"},this.getOptions().map((function(e){return React.createElement("div",{key:"blank-".concat(e.uid),dangerouslySetInnerHTML:{__html:e.title||e.value}})}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&re(t.prototype,n),r&&re(t,r),i}(v);function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pe(e){return function(e){if(Array.isArray(e))return ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ye(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function de(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ge(e);if(t){var o=ge(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ve(this,n)}}function ve(e,t){return!t||"object"!==fe(t)&&"function"!=typeof t?we(e):t}function we(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ge(e){return(ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var je=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(i,e);var t,n,r,o=de(i);function i(){var e;be(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Oe(we(e=o.call.apply(o,[this].concat(n))),"isCorrect",(function(){var t,n,r,o=e.props.answered;if(!o)return!1;for(t=0,r=e.getOptions();t<r.length;t++)if(o[(n=r[t]).sorting]!==n.value)return!1;return!0})),Oe(we(e),"getCorrectLabel",(function(){var t=e.props.question,n=e.isCorrect.call(we(e));return e.maybeShowCorrectAnswer()&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-response"+(n?" correct":" incorrect")},React.createElement("span",{className:"label"},n?Object(c.__)("Correct","learnpress"):Object(c.__)("Incorrect","learnpress")),React.createElement("span",{className:"point"},sprintf(Object(c.__)("%d/%d point","learnpress"),n?t.point:0,t.point))))})),Oe(we(e),"getAnswerSortingChoice",(function(){var t=e.props.question.options||[],n=e.isCorrect.call(we(e)),r=[];return!n&&t.length>0&&t.map((function(e){var t=e.sorting;if(void 0!==t)return r[t]=e.title})),r})),e}return t=i,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.updateUserQuestionAnswers,n=e.question,r=document.querySelector("#answer-options-".concat(n.id));return jQuery(r).sortable({items:".answer-option",cursor:"move",axis:"y",handle:".option-drag",scrollSensitivity:40,forcePlaceholderSize:!0,helper:"clone",opacity:.65,update:function(e,o){var i=r.querySelectorAll(".answer-option"),c=[];pe(i).map((function(e){return c.push(e.dataset.value)})),c.length>0&&t(n.id,c)}})}},{key:"render",value:function(){var e=this,t=this.props.question,n=this.getAnswerSortingChoice();return React.createElement("div",{className:"question-answers"},this.isDefaultType()&&React.createElement("ul",{id:"answer-options-".concat(t.id),className:"answer-options lp-sorting-choice-ul"},this.getOptions().map((function(t,r){return React.createElement(React.Fragment,null,React.createElement("li",{className:e.getOptionClass(t).join(" "),key:"answer-option-".concat(t.value),"data-value":t.value},React.createElement("span",{className:"option-drag",style:{display:"flex",alignItems:"center",position:"absolute",height:"100%",left:14}},React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24"},React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.createElement("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}))),React.createElement("label",{htmlFor:"learn-press-answer-option-".concat(t.value),className:"option-title",dangerouslySetInnerHTML:{__html:t.title||t.value}})),n.length>0&&void 0!==n[r]&&React.createElement("div",{className:"lp-sorting-choice__check-answer",key:"lp-checked-answer-".concat(r),style:{marginBottom:10}},n[r]))}))),!this.isDefaultType()&&this.getWarningMessage(),this.getCorrectLabel())}}])&&me(t.prototype,n),r&&me(t,r),i}(v);function Se(e){return(Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ae(e,t){return(Ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ke(e);if(t){var o=ke(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ee(this,n)}}function Ee(e,t){return!t||"object"!==Se(t)&&"function"!=typeof t?Te(e):t}function Te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ke(e){return(ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ae(e,t)}(i,e);var t,n,r,o=Ce(i);function i(){var e;Re(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qe(Te(e=o.call.apply(o,[this].concat(n))),"getQuestion",(function(){var t=e.props.question;return LP.Hook.applyFilters("question-types",{single_choice:LP.questionTypes.SingleChoice,multi_choice:LP.questionTypes.MultipleChoices,true_or_false:LP.questionTypes.TrueOrFalse,fill_in_blanks:LP.questionTypes.FillInBlanks,sorting_choice:LP.questionTypes.SortingChoice})[t.type]})),e}return t=i,(n=[{key:"render",value:function(){var e=this.props,t=e.question,n=e.supportOptions,r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){qe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.props);r.supportOptions=-1!==n.indexOf(t.type);var o=this.getQuestion()||function(){return React.createElement("div",{className:"question-types",dangerouslySetInnerHTML:{__html:Object(c.sprintf)(Object(c.__)("Question <code>%s</code> invalid!","learnpress"),t.type)}})};return React.createElement(React.Fragment,null,React.createElement(o,r))}}])&&Pe(t.prototype,n),r&&Pe(t,r),i}(r.Component),Ie=Object(o.compose)(Object(i.withSelect)((function(e,t){var n=t.question.id,r=e("learnpress/quiz"),o=r.getData,i=r.isCheckedAnswer;return{supportOptions:o("supportOptions"),isCheckedAnswer:i(n),keyPressed:o("keyPressed"),showCorrectReview:o("showCorrectReview"),isReviewing:"reviewing"===o("mode")}})),Object(i.withDispatch)((function(){return{}})))(xe);t.default=Ie},3:function(e,t){e.exports=window.wp.compose}});
assets/js/dist/frontend/quiz.js CHANGED
@@ -106,7 +106,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
106
 
107
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
108
 
109
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
110
 
111
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
112
 
@@ -442,13 +442,13 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
442
 
443
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
444
 
445
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
446
 
447
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
448
 
449
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
450
 
451
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
452
 
453
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
454
 
@@ -1359,7 +1359,7 @@ __webpack_require__.r(__webpack_exports__);
1359
  /* harmony import */ var _buttons_button_hint__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../buttons/button-hint */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/quiz/components/buttons/button-hint.js");
1360
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1361
 
1362
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1363
 
1364
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1365
 
@@ -1644,7 +1644,7 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
1644
 
1645
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1646
 
1647
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
1648
 
1649
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
1650
 
@@ -1656,7 +1656,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
1656
 
1657
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1658
 
1659
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
1660
 
1661
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1662
 
@@ -1732,7 +1732,7 @@ var Result = function Result() {
1732
  var updateItemsProgress = function updateItemsProgress() {
1733
  var elements = document.querySelectorAll('.popup-header__inner');
1734
 
1735
- if (elements[0].querySelectorAll('form.form-button-finish-course').length === 0) {
1736
  Object(_single_curriculum_components_items_progress__WEBPACK_IMPORTED_MODULE_3__["getResponse"])(elements[0]);
1737
  }
1738
  };
@@ -2036,7 +2036,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
2036
 
2037
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2038
 
2039
- function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2040
 
2041
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2042
 
@@ -2293,7 +2293,7 @@ __webpack_require__.r(__webpack_exports__);
2293
  /* harmony import */ var _learnpress_data_controls__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_learnpress_data_controls__WEBPACK_IMPORTED_MODULE_0__);
2294
  /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
2295
  /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
2296
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2297
 
2298
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2299
 
@@ -2309,7 +2309,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
2309
 
2310
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2311
 
2312
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
2313
 
2314
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2315
 
@@ -2599,7 +2599,7 @@ __webpack_require__.r(__webpack_exports__);
2599
  /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/quiz/store/actions.js");
2600
  /* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectors */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/quiz/store/selectors.js");
2601
  /* harmony import */ var _middlewares__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./middlewares */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/quiz/store/middlewares.js");
2602
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2603
 
2604
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2605
 
@@ -2697,13 +2697,13 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
2697
 
2698
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2699
 
2700
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
2701
 
2702
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2703
 
2704
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2705
 
2706
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
2707
 
2708
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2709
 
@@ -3291,7 +3291,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
3291
 
3292
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3293
 
3294
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
3295
 
3296
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
3297
 
@@ -3394,7 +3394,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
3394
 
3395
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3396
 
3397
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
3398
 
3399
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
3400
 
106
 
107
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
108
 
109
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
110
 
111
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
112
 
442
 
443
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
444
 
445
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
446
 
447
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
448
 
449
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
450
 
451
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
452
 
453
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
454
 
1359
  /* harmony import */ var _buttons_button_hint__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../buttons/button-hint */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/quiz/components/buttons/button-hint.js");
1360
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
1361
 
1362
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
1363
 
1364
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1365
 
1644
 
1645
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1646
 
1647
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1648
 
1649
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
1650
 
1656
 
1657
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
1658
 
1659
+ function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
1660
 
1661
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
1662
 
1732
  var updateItemsProgress = function updateItemsProgress() {
1733
  var elements = document.querySelectorAll('.popup-header__inner');
1734
 
1735
+ if (elements.length > 0 && elements[0].querySelectorAll('form.form-button-finish-course').length === 0) {
1736
  Object(_single_curriculum_components_items_progress__WEBPACK_IMPORTED_MODULE_3__["getResponse"])(elements[0]);
1737
  }
1738
  };
2036
 
2037
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2038
 
2039
+ function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
2040
 
2041
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2042
 
2293
  /* harmony import */ var _learnpress_data_controls__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_learnpress_data_controls__WEBPACK_IMPORTED_MODULE_0__);
2294
  /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data");
2295
  /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__);
2296
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
2297
 
2298
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2299
 
2309
 
2310
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2311
 
2312
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
2313
 
2314
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2315
 
2599
  /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/quiz/store/actions.js");
2600
  /* harmony import */ var _selectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./selectors */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/quiz/store/selectors.js");
2601
  /* harmony import */ var _middlewares__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./middlewares */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/apps/js/frontend/quiz/store/middlewares.js");
2602
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
2603
 
2604
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2605
 
2697
 
2698
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2699
 
2700
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
2701
 
2702
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2703
 
2704
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
2705
 
2706
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
2707
 
2708
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
2709
 
3291
 
3292
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3293
 
3294
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
3295
 
3296
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
3297
 
3394
 
3395
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3396
 
3397
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
3398
 
3399
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
3400
 
assets/js/dist/frontend/quiz.min.js CHANGED
@@ -1,6 +1,6 @@
1
- this.LP=this.LP||{},this.LP.quiz=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=19)}([function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.compose},function(e,t,n){"use strict";var r=jQuery,o=null,i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(o=this.elLPOverlay,this.elMainContent=o.find(".main-content"),this.elTitle=o.find(".modal-title"),this.elBtnYes=o.find(".btn-yes"),this.elBtnNo=o.find(".btn-no"),this.elFooter=o.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){o.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},a=i,u=(jQuery,{elBtnFinishCourse:null,elBtnCompleteItem:null,init:function(){a.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title),a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),a.callBackYes=function(){t.submit()}})),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach((function(e){return e.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title),a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),a.callBackYes=function(){t.submit()}}))})))}});t.a=u},function(e,t){e.exports=window.wp.url},function(e,t,n){"use strict";e.exports=function(e){var t,n={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(n,e),(t=function(e){return function(t){return function(r){var o,i,a=n[r.type],u=t(r);if(a)for(o=0;o<a.length;o++)(i=a[o](r,e))&&e.dispatch(i);return u}}}).effects=n,t}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(5),o=n(4);function i(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=function(){var e=document.querySelectorAll(".popup-header__inner");if(e.length&&null===document.querySelector("#learn-press-quiz-app div.quiz-result")&&"IntersectionObserver"in window){var t=new IntersectionObserver((function(e,n){e.forEach((function(e){if(e.isIntersecting){var n=e.target;c(n),t.unobserve(n)}}))}));a(e).map((function(e){return t.observe(e)}))}},c=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiFetch({path:Object(r.addQueryArgs)("lp/v1/lazy-load/items-progress",{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}),method:"GET"});case 2:n=e.sent,i=n.data,t.innerHTML+=i,o.a.init();case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function u(e){i(a,r,o,u,s,"next",e)}function s(e){i(a,r,o,u,s,"throw",e)}u(void 0)}))});return function(e){return t.apply(this,arguments)}}()},function(e,t){!function(){e.exports=this.LP.dataControls}()},function(e,t){function n(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}LP.Hook.addAction("lp-compatible-builder",(function(){LP.Hook.removeAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){Waypoint.refreshAll(),window.dispatchEvent(new Event("resize"))})),"undefined"!=typeof vc_js&&"undefined"!=typeof VcWaypoint&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){VcWaypoint.refreshAll()}))})),LP.Hook.addAction("lp-quiz-compatible-builder",(function(){return LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0})),LP.Hook.addAction("lp-question-compatible-builder",(function(){return LP.Hook.removeAction("lp-question-compatible-builder"),LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0}))},,function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2018 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&e.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var u in r)n.call(r,u)&&r[u]&&e.push(u);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return Sn}));var r={};n.r(r),n.d(r,"setQuizData",(function(){return Ot})),n.d(r,"setCurrentQuestion",(function(){return wt})),n.d(r,"setCurrentPage",(function(){return _t})),n.d(r,"__requestBeforeStartQuiz",(function(){return jt})),n.d(r,"__requestStartQuizSuccess",(function(){return Rt})),n.d(r,"startQuiz",(function(){return qt})),n.d(r,"__requestSubmitQuiz",(function(){return St})),n.d(r,"__requestSubmitQuizSuccess",(function(){return Pt})),n.d(r,"submitQuiz",(function(){return Et})),n.d(r,"updateUserQuestionAnswers",(function(){return kt})),n.d(r,"__requestShowHintSuccess",(function(){return zt})),n.d(r,"showHint",(function(){return Qt})),n.d(r,"__requestCheckAnswerSuccess",(function(){return At})),n.d(r,"checkAnswer",(function(){return It})),n.d(r,"markQuestionRendered",(function(){return Ct})),n.d(r,"setQuizMode",(function(){return Nt})),n.d(r,"sendKey",(function(){return Tt}));var o={};n.r(o),n.d(o,"getQuestionOptions",(function(){return Lt})),n.d(o,"getItemStatus",(function(){return Ut})),n.d(o,"getProp",(function(){return Ft})),n.d(o,"getQuizAttempts",(function(){return Ht})),n.d(o,"getQuizAnswered",(function(){return Bt})),n.d(o,"getQuestions",(function(){return Gt})),n.d(o,"getData",(function(){return Kt})),n.d(o,"getDefaultRestArgs",(function(){return Wt})),n.d(o,"getQuestionAnswered",(function(){return $t})),n.d(o,"getQuestionMark",(function(){return Jt})),n.d(o,"getCurrentQuestion",(function(){return Zt})),n.d(o,"getQuestion",(function(){return Yt})),n.d(o,"isCheckedAnswer",(function(){return Vt})),n.d(o,"isCorrect",(function(){return Xt})),n.d(o,"getQuestionsSelectedAnswers",(function(){return en})),n.d(o,"getUserMark",(function(){return tn}));var i=n(2),a=n(3),u=n(1),s=function(){var e=Object(u.select)("learnpress/quiz").getData("content");return React.createElement("div",{className:"quiz-content",dangerouslySetInnerHTML:{__html:e}})},c=n(0),l=function(e){var t;if(e>86400)t=(e-e%86400)/86400,e%=86400;else if(86400==e)return"24:00";var n=new Date(1e3*e).toUTCString().match(/\d{2}:\d{2}:\d{2}/)[0].split(":");return t&&(n[0]=parseInt(n[0])+24*t),n.join(":")},f=LP.Hook,p=function(){var e=function(e){return Object(u.select)("learnpress/quiz").getData(e)},t=f.applyFilters("quiz-meta-fields",{duration:{title:Object(c.__)("Duration:","learnpress"),name:"duration",content:l(e("duration"))||"--"},passingGrade:{title:Object(c.__)("Passing grade:","learnpress"),name:"passing-grade",content:e("passingGrade")||"--"},questionsCount:{title:Object(c.__)("Questions:","learnpress"),name:"questions-count",content:e("questionIds")?e("questionIds").length:0}});return t&&React.createElement(React.Fragment,null,React.createElement("ul",{className:"quiz-intro"},Object.values(t).map((function(e,t){var n=e.name||t;return React.createElement("li",{key:"quiz-intro-field-".concat(t),className:"quiz-intro-item quiz-intro-item--".concat(n)},React.createElement("div",{className:"quiz-intro-item__title",dangerouslySetInnerHTML:{__html:e.title}}),React.createElement("span",{className:"quiz-intro-item__content",dangerouslySetInnerHTML:{__html:e.content}}))}))))};function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?_(e):t}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(i,e);var t,n,r,o=O(i);function i(){var e;h(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return R(_(e=o.call.apply(o,[this].concat(n))),"startQuiz",(function(t){t&&t.preventDefault();var n=document.querySelector(".lp-button.start");n&&n.setAttribute("disabled","disabled");var r=e.props,o=r.startQuiz;if("completed"===r.status){var i=Object(u.select)("learnpress/modal"),a=i.confirm,s=i.isOpen;if("no"===a("Are you sure you want to retry quiz?",e.startQuiz))return void(!s()&&n&&n.removeAttribute("disabled"))}o()})),R(_(e),"nav",(function(t){return function(n){var r=e.props,o=r.questionNav,i=r.currentPage,a=r.numPages,u=r.setCurrentPage;switch(t){case"prev":i>1?i-=1:i="infinity"===o?a:1;break;default:i<a?i+=1:i="infinity"===o?1:a}u(i)}})),R(_(e),"moveTo",(function(t){return function(n){n.preventDefault();var r=e.props,o=r.numPages,i=r.setCurrentPage;t<1||t>o||i(t)}})),R(_(e),"isLast",(function(){var t=e.props;return t.currentPage===t.numPages})),R(_(e),"isFirst",(function(){return 1===e.props.currentPage})),R(_(e),"submit",(function(){var t=e.props.submitQuiz;"no"!==(0,Object(u.select)("learnpress/modal").confirm)(Object(c.__)("Are you sure to submit quiz?","learnpress"),e.submit)&&t()})),R(_(e),"setQuizMode",(function(t){return function(){(0,e.props.setQuizMode)(t)}})),R(_(e),"isReviewing",(function(){return e.props.isReviewing})),e}return t=i,(n=[{key:"pageNumbers",value:function(e){var t=this,n=this.props,r=n.numPages,o=n.currentPage;if(r<2)return"";(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({numPages:r,currentPage:o,midSize:1,endSize:1,prevNext:!0},e||{})).endSize<1&&(e.endSize=1),e.midSize<0&&(e.midSize=1);var i=m(Array(r).keys()),a=!1;return React.createElement("div",{className:"nav-links"},e.prevNext&&!this.isFirst()&&React.createElement("button",{className:"page-numbers prev","data-type":"question-navx",onClick:this.nav("prev")},Object(c.__)("Prev","learnpress")),i.map((function(n){return(n+=1)===e.currentPage?(a=!0,React.createElement("span",{key:"page-number-".concat(n),className:"page-numbers current"},n)):n<=e.endSize||e.currentPage&&n>=e.currentPage-e.midSize&&n<=e.currentPage+e.midSize||n>e.numPages-e.endSize?(a=!0,React.createElement("button",{key:"page-number-".concat(n),className:"page-numbers",onClick:t.moveTo(n)},n)):a?(a=!1,React.createElement("span",{key:"page-number-".concat(n),className:"page-numbers dots"},"…")):""})),e.prevNext&&!this.isLast()&&React.createElement("button",{className:"page-numbers next","data-type":"question-navx",onClick:this.nav("next")},Object(c.__)("Next","learnpress")))}},{key:"render",value:function(){var e=this.props,t=e.status,n=e.questionNav,r=e.isReviewing,o=e.showReview,i=e.numPages,a=(e.question,e.questionsPerPage,e.canRetry),u=e.retakeNumber,s=["quiz-buttons"];("started"===t||r)&&s.push("align-center"),"questionNav"===n&&s.push("infinity"),this.isFirst()&&s.push("is-first"),this.isLast()&&s.push("is-last");var l=document.querySelector("#popup-sidebar"),f=document.querySelector("#learn-press-quiz-app"),p="";return p="started"===t||r?{marginLeft:l&&l.offsetWidth/2,width:f&&f.offsetWidth}:null,React.createElement(React.Fragment,null,React.createElement("div",{className:s.join(" ")},React.createElement("div",{className:"button-left"+("started"===t||r?" fixed":""),style:p},("completed"===t&&a||-1!==["","viewed"].indexOf(t))&&!r&&React.createElement("button",{className:"lp-button start",onClick:this.startQuiz},"completed"===t?"".concat(Object(c._x)("Retake","label button retry quiz","learnpress")).concat(u?" (".concat(u,")"):""):Object(c._x)("Start","label button start quiz","learnpress")),("started"===t||r)&&i>1&&React.createElement(React.Fragment,null,React.createElement("div",{className:"questions-pagination"},this.pageNumbers()))),React.createElement("div",{className:"button-right"},"started"===t&&React.createElement(React.Fragment,null,("infinity"===n||this.isLast())&&!r&&React.createElement("button",{className:"lp-button submit-quiz",onClick:this.submit},Object(c.__)("Finish Quiz","learnpress"))),r&&o&&React.createElement("button",{className:"lp-button back-quiz",onClick:this.setQuizMode("")},Object(c.__)("Result","learnpress")),"completed"===t&&o&&!r&&React.createElement("button",{className:"lp-button review-quiz",onClick:this.setQuizMode("reviewing")},Object(c.__)("Review","learnpress")))),this.props.message&&!0!==this.props.success&&React.createElement("div",{className:"learn-press-message error"},this.props.message))}}])&&v(t.prototype,n),r&&v(t,r),i}(i.Component),S=Object(a.compose)(Object(u.withSelect)((function(e){var t=e("learnpress/quiz").getData;return{status:t("status"),showCheck:t("instantCheck"),checkedQuestions:t("checkedQuestions"),hintedQuestions:t("hintedQuestions"),questionsPerPage:t("questionsPerPage")}})))((function(e){var t=e.showCheck,n=e.checkedQuestions,r=e.hintedQuestions,o=e.question,i=e.status,a=e.type,u=e.Button;if("started"!==i)return!1;var s=React.createElement(u,{question:o});switch(a){case"hint":return r?!!o.hasHint&&(-1===r.indexOf(o.id)&&s):s;case"check":return!!t&&(n?-1===n.indexOf(o.id)&&s:s)}})),P=Object(a.compose)([Object(u.withSelect)((function(e){var t=e("learnpress/quiz"),n=t.getData,r=t.getCurrentQuestion,o={id:n("id"),status:n("status"),questionIds:n("questionIds"),questionNav:n("questionNav"),isReviewing:n("reviewQuestions")&&"reviewing"===n("mode"),showReview:n("reviewQuestions"),showCheck:n("instantCheck"),checkedQuestions:n("checkedQuestions"),hintedQuestions:n("hintedQuestions"),numPages:n("numPages"),pages:n("pages"),currentPage:n("currentPage"),questionsPerPage:n("questionsPerPage"),pageNumbers:n("pageNumbers"),keyPressed:n("keyPressed"),canRetry:n("retakeCount")>0&&n("retaken")<n("retakeCount"),retakeNumber:n("retakeCount")>0&&n("retaken")<n("retakeCount")?n("retakeCount")-n("retaken"):null,message:n("messageResponse")||!1,success:void 0===n("successResponse")||n("successResponse")};return 1===o.questionsPerPage&&(o.question=r("object")),o})),Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz"),r=n.startQuiz,o=n.setCurrentQuestion,i=n.submitQuiz,a=n.setQuizMode,u=n.showHint,s=n.checkAnswer;return{startQuiz:r,setCurrentQuestion:o,setQuizMode:a,setCurrentPage:n.setCurrentPage,submitQuiz:function(e){i(e)},showHint:function(e){u(e)},checkAnswer:function(e){s(e)}}}))])(q);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=N(e);if(t){var o=N(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?C(e):t}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}(i,e);var t,n,r,o=A(i);function i(){var e;k(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return T(C(e=o.call.apply(o,[this].concat(n))),"showHint",(function(){var t=e.props,n=t.showHint,r=t.question;n(r.id,!r.showHint)})),e}return t=i,(n=[{key:"render",value:function(){return this.props.question.hint?React.createElement("button",{className:"btn-show-hint",onClick:this.showHint},React.createElement("span",null,Object(c.__)("Hint","learnpress"))):""}}])&&z(t.prototype,n),r&&z(t,r),i}(i.Component),D=Object(a.compose)(Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz").showHint;return{showHint:function(e,t){n(e,t)}}})))(x),M=n(12),L=n.n(M);function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$(e);if(t){var o=$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?W(e):t}function W(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return($=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(i,e);var t,n,r,o=G(i);function i(){var e;return F(this,i),J(W(e=o.apply(this,arguments)),"checkAnswer",(function(){var t=e.props,n=t.checkAnswer,r=t.question;t.answered&&(n(r.id),e.setState({loading:!0}))})),e.state={loading:!1},e}return t=i,(n=[{key:"render",value:function(){var e=this.props.answered;return React.createElement(React.Fragment,null,React.createElement("button",{className:L()("lp-button","instant-check",{loading:this.state.loading,disable:!e}),onClick:this.checkAnswer},React.createElement("span",{className:"instant-check__icon"}),Object(c._x)("Check answer","label of button check answer","learnpress"),!e&&React.createElement("div",{className:"instant-check__info",dangerouslySetInnerHTML:{__html:Object(c.__)("You need to answer the question before check answer.","learnpress")}})))}}])&&H(t.prototype,n),r&&H(t,r),i}(i.Component),Y=Object(a.compose)(Object(u.withSelect)((function(e,t){var n=t.question.id;return{answered:(0,e("learnpress/quiz").getQuestionAnswered)(n)}})),Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz").checkAnswer;return{checkAnswer:function(e){n(e)}}})))(Z),V=function(e){var t=e.question,n={"instant-check":function(){return React.createElement(S,{type:"check",Button:Y,question:t})},hint:function(){return React.createElement(S,{type:"hint",Button:D,question:t})}};return React.createElement(React.Fragment,null,LP.config.questionFooterButtons().map((function(e){return React.createElement(i.Fragment,{key:"button-".concat(e)},n[e]&&n[e]())})))};function X(e){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=se(e);if(t){var o=se(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ae(this,n)}}function ae(e,t){return!t||"object"!==X(t)&&"function"!=typeof t?ue(e):t}function ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=window.jQuery,fe=lodash,pe=(fe.uniqueId,fe.isArray),de=(fe.isNumber,fe.bind,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(a,e);var t,n,r,o=ie(a);function a(){var e;return ne(this,a),ce(ue(e=o.apply(this,arguments)),"setRef",(function(t){e.$wrap=le(t)})),ce(ue(e),"parseOptions",(function(e){return e&&(e=pe(e)?e:JSON.parse(CryptoJS.AES.decrypt(e.data,e.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),e=pe(e)?e:JSON.parse(e)),e||[]})),ce(ue(e),"getWrapperClass",(function(){var t=e.props,n=t.question,r=(t.answered,["question","question-"+n.type]),o=e.parseOptions(n.options);return o.length&&void 0!==o[0].isTrue&&r.push("question-answered"),r})),ce(ue(e),"getEditLink",(function(){var t=e.props,n=t.question,r=t.editPermalink;return r?r.replace(/post=([0-9]{3,4})/,"post=".concat(n.id)):""})),ce(ue(e),"editPermalink",(function(e){return Object(c.sprintf)('<a href="%s">%s</a>',e,Object(c.__)("Edit","learnpress"))})),e.state={time:null,showHint:!1},e.$wrap=null,e}return t=a,(n=[{key:"componentDidMount",value:function(e){var t=this.props,n=t.question,r=t.isCurrent,o=t.markQuestionRendered;return r&&o(n.id),this.state.time||this.setState({time:new Date}),LP.Hook.doAction("lp-question-compatible-builder"),e}},{key:"render",value:function(){var e=this,t=this.props,n=t.question,r=t.isShow,o=t.isShowIndex,a=(t.isShowHint,t.status),u=LP.questionTypes.default,s=this.getEditLink();s&&jQuery("#wp-admin-bar-edit-lp_question").find(".ab-item").attr("href",s);var l={index:function(){return o?React.createElement("span",{className:"question-index"},o,"."):""},title:function(){return n.title},hint:function(){return React.createElement(D,{question:n})},"edit-permalink":function(){return s&&React.createElement("span",{dangerouslySetInnerHTML:{__html:e.editPermalink(s)},className:"edit-link"})}},f={title:function(){return React.createElement("h4",{className:"question-title"},LP.config.questionTitleParts().map((function(e){return React.createElement(i.Fragment,{key:"title-part-".concat(e)},l[e]&&l[e]())})))},content:function(){return React.createElement("div",{className:"question-content",dangerouslySetInnerHTML:{__html:n.content}})},"answer-options":function(){return e.$wrap&&React.createElement(u,te(te({},e.props),{},{$wrap:e.$wrap}))},explanation:function(){return n.explanation&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-explanation-content"},React.createElement("strong",{className:"explanation-title"},Object(c.__)("Explanation:","learnpress")),React.createElement("div",{dangerouslySetInnerHTML:{__html:n.explanation}})))},hint:function(){return n.hint&&!n.explanation&&n.showHint&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-hint-content"},React.createElement("strong",{className:"hint-title"},Object(c.__)("Hint:","learnpress")),React.createElement("div",{dangerouslySetInnerHTML:{__html:n.hint}})))},buttons:function(){return"started"===a&&React.createElement(V,{question:n})}},p=LP.config.questionBlocks();return React.createElement(React.Fragment,null,React.createElement("div",{className:this.getWrapperClass().join(" "),style:{display:r?"":"none"},"data-id":n.id,ref:this.setRef},p.map((function(e){return React.createElement(i.Fragment,{key:"block-".concat(e)},f[e]?f[e]():"")}))))}}])&&re(t.prototype,n),r&&re(t,r),a}(i.Component)),me=Object(a.compose)([Object(u.withSelect)((function(e,t){var n=t.question.id,r=e("learnpress/quiz"),o=r.getData,i=r.getQuestionAnswered,a=r.getQuestionMark;return{status:o("status"),questions:o("question"),answered:i(n),questionsRendered:o("questionsRendered"),editPermalink:o("editPermalink"),numPages:o("numPages"),mark:a(n)||""}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz"),n=t.updateUserQuestionAnswers;return{markQuestionRendered:t.markQuestionRendered,updateUserQuestionAnswers:n}}))])(de);function be(e){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_e(e);if(t){var o=_e(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Oe(this,n)}}function Oe(e,t){return!t||"object"!==be(t)&&"function"!=typeof t?we(e):t}function we(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _e(e){return(_e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}(i,e);var t,n,r,o=ge(i);function i(e){var t;return ye(this,i),je(we(t=o.apply(this,arguments)),"startQuiz",(function(e){e.preventDefault(),(0,t.props.startQuiz)()})),je(we(t),"isInVisibleRange",(function(e,n){var r=t.props,o=r.currentPage,i=r.questionsPerPage;return o===Math.ceil(n/i)})),je(we(t),"nav",(function(e){var n=t.props.sendKey;switch(e.keyCode){case 37:return n("left");case 38:return;case 39:return n("right");case 40:return;default:e.keyCode>=49&&e.keyCode<=57&&n(e.keyCode-48)}})),t.needToTop=!1,t.state={isReviewing:null,currentPage:0,self:we(t)},t}return t=i,r=[{key:"getDerivedStateFromProps",value:function(e,t){for(var n=["isReviewing","currentPage"],r={},o=0;o<n.length;o++)e[n[o]]!==t[n[o]]&&(r[n[o]]=e[n[o]]);return Object.values(r).length?(t.self.needToTop=!0,r):null}}],(n=[{key:"componentDidUpdate",value:function(){this.needToTop&&(jQuery("#popup-content").animate({scrollTop:0}).find(".content-item-scrollable:last").animate({scrollTop:0}),this.needToTop=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.status,r=t.currentQuestion,o=t.questions,i=t.questionsRendered,a=t.isReviewing,u=t.questionsPerPage,s=!0;return"completed"!==n||a||(s=!1),React.createElement(React.Fragment,null,React.createElement("div",{tabIndex:100,onKeyUp:this.nav},React.createElement("div",{className:"quiz-questions",style:{display:s?"":"none"}},o.map((function(t,n){var o=!u&&r===t.id,a=i&&-1!==i.indexOf(t.id),s=e.isInVisibleRange(t.id,n+1);return a||!a||s?React.createElement(me,{key:"loop-question-".concat(t.id),isCurrent:o,isShow:s,isShowIndex:!!u&&n+1,questionsPerPage:u,question:t}):""})))))}}])&&he(t.prototype,n),r&&he(t,r),i}(i.Component),qe=Object(a.compose)(Object(u.withSelect)((function(e,t,n){var r=e("learnpress/quiz"),o=r.getData,i=r.getQuestions;return{status:o("status"),currentQuestion:o("currentQuestion"),questions:i(),questionsRendered:o("questionsRendered"),isReviewing:"reviewing"===o("mode"),numPages:o("numPages"),currentPage:o("currentPage"),questionsPerPage:o("questionsPerPage")||1}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz");return{startQuiz:t.startQuiz,sendKey:t.sendKey}})))(Re),Se=function(){var e=Object(u.select)("learnpress/quiz").getData("attempts")||[],t=e&&!!e.length;return!!t&&React.createElement(React.Fragment,null,React.createElement("div",{className:"quiz-attempts"},React.createElement("h4",{className:"attempts-heading"},Object(c.__)("Last Attempted","learnpress")),t&&React.createElement("table",null,React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",{className:"quiz-attempts__questions"},Object(c.__)("Questions","learnpress")),React.createElement("th",{className:"quiz-attempts__spend"},Object(c.__)("Time spend","learnpress")),React.createElement("th",{className:"quiz-attempts__marks"},Object(c.__)("Marks","learnpress")),React.createElement("th",{className:"quiz-attempts__grade"},Object(c.__)("Passing grade","learnpress")),React.createElement("th",{className:"quiz-attempts__result"},Object(c.__)("Result","learnpress")))),React.createElement("tbody",null,e.map((function(e,t){return React.createElement("tr",{key:"attempt-".concat(t)},React.createElement("td",{className:"quiz-attempts__questions"},"".concat(e.questionCorrect," / ").concat(e.questionCount)),React.createElement("td",{className:"quiz-attempts__spend"},e.timeSpend||"--"),React.createElement("td",{className:"quiz-attempts__marks"},"".concat(e.userMark," / ").concat(e.mark)),React.createElement("td",{className:"quiz-attempts__grade"},e.passingGrade||Object(c._x)("-","unknown passing grade value","learnpress")),React.createElement("td",{className:"quiz-attempts__result"},"".concat(parseFloat(e.result).toFixed(2),"%")," ",React.createElement("span",null,e.graduationText)))}))))))};function Pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ke=function(){var e=Object(u.select)("learnpress/quiz").getData,t=Object(u.dispatch)("learnpress/quiz").submitQuiz,n=e("totalTime")?e("totalTime"):e("duration"),r=e("endTime"),o=new Date(r.replace(/-/g,"/")),a=new Date,s=(new Date).getTimezoneOffset(),c=parseInt(o.getTime()/1e3-(a.getTime()/1e3+60*s)),l=Pe(Object(i.useState)(c>0?c:0),2),f=l[0],p=l[1];Object(i.useEffect)((function(){var e=setInterval((function(){var n=f;(n-=1)>0?p(n):(clearInterval(e),t())}),1e3);return function(){return clearInterval(e)}}),[f]);return React.createElement("div",{className:"countdown"},React.createElement("i",{className:"fas fa-stopwatch"}),React.createElement("span",null,function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":",r=[];return n<3600?(r.push((f-f%60)/60),r.push(f%60)):n&&(r.push((f-f%3600)/3600),e=f%3600,r.push((e-e%60)/60),r.push(e%60)),r.map((function(e){return e<10?"0".concat(e):e})).join(t)}()))},ze=n(8);function Qe(e){return function(e){if(Array.isArray(e))return Ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ie(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||Ie(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(e,t){if(e){if("string"==typeof e)return Ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ce(e,t):void 0}}function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ne=lodash.debounce,Te=function(){var e=Ae(Object(i.useState)(0),2),t=e[0],n=e[1],r=Ae(Object(i.useState)(!1),2),o=r[0],a=r[1],s=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("results")}),[]),l=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("passingGrade")}),[]),f=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("id")}),[]);Object(i.useEffect)((function(){d();var e="";if(e=s.graduation?s.graduation:s.result>=v.replace(/[^0-9\.]+/g,"")?"passed":"failed"){var t=document.querySelector(".course-curriculum .course-item.course-item-".concat(f));t&&(t.classList.remove("failed","passed"),t.classList.add("has-status","status-completed",e))}var n=Qe(document.querySelectorAll("#popup-header .items-progress"))[0];if(n){var r=n.querySelector(".items-completed");if(r){parseInt(r.textContent);var o=document.querySelectorAll("#popup-sidebar .course-curriculum .course-item.status-completed");r.textContent=parseInt(o.length)}}p()}),[s]);var p=function(){var e=document.querySelectorAll(".popup-header__inner");0===e[0].querySelectorAll("form.form-button-finish-course").length&&Object(ze.a)(e[0])},d=function(){n(0),a(!1),jQuery.easing._customEasing=function(e,t,n,r,o){return r*Math.sqrt(1-(t=t/o-1)*t)+n},Ne((function(){var e=jQuery("<span />").css({width:1,height:1}).appendTo(document.body);e.css("left",0).animate({left:s.result},{duration:1500,step:function(e,t){n(e)},done:function(){a(!0),e.remove(),jQuery("#quizResultGrade").css({transform:"scale(1.3)",transition:"all 0.25s"}),Ne((function(){jQuery("#quizResultGrade").css({transform:"scale(1)"})}),500)()},easing:"_customEasing"})}),s.result>0?1e3:10)()},m=t;Number.isInteger(t)||(m=parseFloat(t).toFixed(2));var b=190*Math.PI,y=b-m/100*b,h={strokeDasharray:"".concat(b," ").concat(b),strokeDashoffset:y},v=s.passingGrade||l,g="";g=s.graduation?s.graduation:m>=v.replace(/[^0-9\.]+/g,"")?"passed":"failed";var O="";O=s.graduationText?s.graduationText:"passed"===g?Object(c.__)("Passed","learnpress"):Object(c.__)("Failed","learnpress");var w=["quiz-result",g];return React.createElement("div",{className:w.join(" ")},React.createElement("h3",{className:"result-heading"},Object(c.__)("Your Result","learnpress")),React.createElement("div",{id:"quizResultGrade",className:"result-grade"},React.createElement("svg",{className:"circle-progress-bar",width:200,height:200},React.createElement("circle",{className:"circle-progress-bar__circle",stroke:"",strokeWidth:10,style:h,fill:"transparent",r:95,cx:100,cy:100})),React.createElement("span",{className:"result-achieved"},"".concat(m,"%")),React.createElement("span",{className:"result-require"},v||Object(c._x)("-","unknown passing grade value","learnpress"))),o&&React.createElement("p",{className:"result-message"},O),React.createElement("ul",{className:"result-statistic"},React.createElement("li",{className:"result-statistic-field result-time-spend"},React.createElement("span",null,Object(c.__)("Time spend","learnpress")),React.createElement("p",null,s.timeSpend)),React.createElement("li",{className:"result-statistic-field result-point"},React.createElement("span",null,Object(c.__)("Point","learnpress")),React.createElement("p",null,s.userMark," / ",s.mark)),React.createElement("li",{className:"result-statistic-field result-questions"},React.createElement("span",null,Object(c.__)("Questions","learnpress")),React.createElement("p",null,s.questionCount)),React.createElement("li",{className:"result-statistic-field result-questions-correct"},React.createElement("span",null,Object(c.__)("Correct","learnpress")),React.createElement("p",null,s.questionCorrect)),React.createElement("li",{className:"result-statistic-field result-questions-wrong"},React.createElement("span",null,Object(c.__)("Wrong","learnpress")),React.createElement("p",null,s.questionWrong)),React.createElement("li",{className:"result-statistic-field result-questions-skipped"},React.createElement("span",null,Object(c.__)("Skipped","learnpress")),React.createElement("p",null,s.questionEmpty))))},xe=jQuery,De=lodash.debounce,Me=function(){var e=Object(u.dispatch)("learnpress/quiz").submitQuiz;Object(i.useEffect)((function(){var e=xe("#popup-content");if(e.length){var t=e.find(".content-item-scrollable:eq(1)"),n=e.find(".content-item-wrap"),r=e.find(".quiz-status"),o=r.offset().top-92,i=!1,a="-"+n.css("margin-left");xe(window).on("resize.refresh-quiz-stauts-bar",De((function(){a="-"+n.css("margin-left"),r.css({"margin-left":a,"margin-right":a})}),100)).trigger("resize.refresh-quiz-stauts-bar"),t.on("scroll",(function(){if(t.scrollTop()>=o){if(i)return;i=!0}else{if(!i)return;i=!1}i?e.addClass("fixed-quiz-status"):e.removeClass("fixed-quiz-status")}))}}),[]);var t=Object(u.select)("learnpress/quiz"),n=t.getData,r=t.getUserMark,o=n("currentPage"),a=n("questionsPerPage"),s=n("questionIds").length,l=n("submitting"),f=n("totalTime"),p=n("duration"),d=r(),m=["quiz-status"],b=(o-1)*a+1,y=b+a-1,h="";return y=Math.min(y,s),l&&m.push("submitting"),h=y<s?a>1?Object(c.sprintf)(Object(c.__)("Question <span>%d to %d of %d</span>","learnpress"),b,y,s):Object(c.sprintf)(Object(c.__)("Question <span>%d of %d</span>","learnpress"),b,s):Object(c.sprintf)(Object(c.__)("Question <span>%d to %d</span>","learnpress"),b,y),React.createElement("div",{className:m.join(" ")},React.createElement("div",null,React.createElement("div",{className:"questions-index",dangerouslySetInnerHTML:{__html:h}}),React.createElement("div",{className:"current-point"},Object(c.sprintf)(Object(c.__)("Earned Point: %s","learnpress"),d)),React.createElement("div",null,React.createElement("div",{className:"submit-quiz"},React.createElement("button",{className:"lp-button",id:"button-submit-quiz",onClick:function t(){"no"!==(0,Object(u.select)("learnpress/modal").confirm)(Object(c.__)("Are you sure to submit quiz?","learnpress"),t)&&e()}},l?Object(c.__)("Submitting...","learnpress"):Object(c.__)("Finish Quiz","learnpress"))),f&&p&&React.createElement(ke,null))))};function Le(e){return function(e){if(Array.isArray(e))return Ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ue(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){Be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ge=lodash,Ke=(Ge.omit,Ge.flow),We=Ge.isArray,$e=Ge.chunk,Je=(LP.camelCaseDashObjectKeys,LP.localStorage),Ze=Je.get,Ye=Je.set,Ve={},Xe=function(e,t){var n=He(He({},e.answered[t.questionId]||{}),{},{answered:t.answers,temp:!0});return He(He({},e),{},{answered:He(He({},e.answered),{},Be({},t.questionId,n))})},et=function(e,t){var n=e.questionsRendered;return We(n)?(n.push(t.questionId),He(He({},e),{},{questionsRendered:Le(n)})):He(He({},e),{},{questionsRendered:[t.questionId]})},tt=function(e,t){return t.currentPage&&Ye("Q".concat(e.id,".currentPage"),t.currentPage),He(He({},e),t)},nt=function(e,t){var n=e.questions.map((function(e){return e.id==t.questionId?He(He({},e),{},{showHint:t.showHint}):e}));return He(He({},e),{},{questions:Le(n)})},rt=function(e,t){var n=e.questions.map((function(e){if(e.id!==t.questionId)return e;var n={explanation:t.explanation};return t.options&&(n.options=t.options),He(He({},e),n)}));return He(He({},e),{},{questions:Le(n),answered:He(He({},e.answered),{},Be({},t.questionId,t.result)),checkedQuestions:[].concat(Le(e.checkedQuestions),[t.questionId])})},ot=function(e,t){var n=e.questions.map((function(n){var r={};return e.reviewQuestions&&(t.results.questions[n.id].explanation&&(r.explanation=t.results.questions[n.id].explanation),t.results.questions[n.id].options&&(r.options=t.results.questions[n.id].options)),He(He({},n),r)}));return tt(e,He(He({submitting:!1,currentPage:1},t.results),{},{questions:Le(n)}))},it=function(e,t){var n=void 0!==t.results.success&&t.results.success,r=t.results.message||!1;return tt(e,He(He({checkedQuestions:[],hintedQuestions:[],mode:"",currentPage:1},t.results.results),{},{successResponse:n,messageResponse:r}))},at=Ke(u.combineReducers,(function(e){return function(t,n){return e(t,n)}}),(function(e){return function(t,n){return e(t,n)}}),(function(e){return function(t,n){return e(t,n)}}))({a:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{a:1};return e},b:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{b:2};return e}}),ut=Object(u.combineReducers)({blocks:at,userQuiz:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ve,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_QUIZ_DATA":1>t.data.questionsPerPage&&(t.data.questionsPerPage=1);var n=$e(e.questionIds||t.data.questionIds,t.data.questionsPerPage);return t.data.numPages=n.length,t.data.pages=n,He(He(He({},e),t.data),{},{currentPage:Ze("Q".concat(t.data.id,".currentPage"))||t.data.currentPage});case"SUBMIT_QUIZ":return He(He({},e),{},{submitting:!0});case"START_QUIZ":case"START_QUIZ_SUCCESS":return it(e,t);case"SET_CURRENT_QUESTION":return Ye("Q".concat(e.id,".currentQuestion"),t.questionId),He(He({},e),{},{currentQuestion:t.questionId});case"SET_CURRENT_PAGE":return Ye("Q".concat(e.id,".currentPage"),t.currentPage),He(He({},e),{},{currentPage:t.currentPage});case"SUBMIT_QUIZ_SUCCESS":return ot(e,t);case"UPDATE_USER_QUESTION_ANSWERS":return"started"===e.status?Xe(e,t):e;case"MARK_QUESTION_RENDERED":return et(e,t);case"SET_QUIZ_MODE":return"reviewing"==t.mode?tt(e,{mode:t.mode}):He(He({},e),{},{mode:t.mode});case"SET_QUESTION_HINT":return nt(e,t);case"CHECK_ANSWER":return rt(e,t);case"SEND_KEY":return He(He({},e),{},{keyPressed:t.keyPressed})}return e}}),st=n(9);function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var lt=regeneratorRuntime.mark(Et),ft=regeneratorRuntime.mark(Qt),pt=regeneratorRuntime.mark(It);function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mt(e){return function(e){if(Array.isArray(e))return bt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return bt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yt(){var e=[].slice.call(arguments,2),t=Object(u.dispatch)(arguments[0]),n=arguments[1];t[n].apply(t,mt(e))}var ht=LP,vt=ht.camelCaseDashObjectKeys,gt=ht.Hook;function Ot(e,t){return t="string"==typeof e?dt({},e,t):e,{type:"SET_QUIZ_DATA",data:vt(t)}}function wt(e){return{type:"SET_CURRENT_QUESTION",questionId:e}}function _t(e){return{type:"SET_CURRENT_PAGE",currentPage:e}}function jt(e,t,n){return{type:"BEFORE_START_QUIZ"}}function Rt(e,t,n,r){return gt.doAction("quiz-started",e,t,n,r),{type:"START_QUIZ_SUCCESS",quizId:t,courseId:n,userId:r,results:e}}var qt=regeneratorRuntime.mark((function e(){var t,n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Object(u.select)("learnpress/quiz").getDefaultRestArgs(),n=t.itemId,r=t.courseId,!0===gt.applyFilters("before-start-quiz",!0,n,r)){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,Object(st.apiFetch)({path:"lp/v1/users/start-quiz",method:"POST",data:{item_id:n,course_id:r}});case 6:return o=e.sent,o=gt.applyFilters("request-start-quiz-response",o,n,r),e.next=10,yt("learnpress/quiz","__requestStartQuizSuccess",vt(o),n,r);case 10:case"end":return e.stop()}}),e)}));function St(){return{type:"SUBMIT_QUIZ"}}function Pt(e,t,n){return gt.doAction("quiz-submitted",e,t,n),{type:"SUBMIT_QUIZ_SUCCESS",results:e}}function Et(){var e,t,n,r,o,i,a,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(e=Object(u.select)("learnpress/quiz"),t=e.getDefaultRestArgs,n=e.getQuestionsSelectedAnswers,r=t(),o=r.itemId,i=r.courseId,!0===gt.applyFilters("before-submit-quiz",!0)){c.next=5;break}return c.abrupt("return");case 5:return a=n(),c.next=8,Object(st.apiFetch)({path:"lp/v1/users/submit-quiz",method:"POST",data:{item_id:o,course_id:i,answered:a}});case 8:if(s=c.sent,!(s=gt.applyFilters("request-submit-quiz-response",s,o,i)).success){c.next=13;break}return c.next=13,yt("learnpress/quiz","__requestSubmitQuizSuccess",vt(s.results),o,i);case 13:case"end":return c.stop()}}),lt)}function kt(e,t,n){return{type:"UPDATE_USER_QUESTION_ANSWERS",questionId:e,answers:t}}function zt(e,t){return{type:"SET_QUESTION_HINT",questionId:e,showHint:t}}function Qt(e,t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,yt("learnpress/quiz","__requestShowHintSuccess",e,t);case 2:case"end":return n.stop()}}),ft)}function At(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:"CHECK_ANSWER",questionId:e},t)}function It(e){var t,n,r,o,i,a,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=Object(u.select)("learnpress/quiz"),n=t.getDefaultRestArgs,r=t.getQuestionAnswered,o=n(),i=o.itemId,a=o.courseId,c.next=4,Object(st.apiFetch)({path:"lp/v1/users/check-answer",method:"POST",data:{item_id:i,course_id:a,question_id:e,answered:r(e)||""}});case 4:return s=c.sent,c.next=7,yt("learnpress/quiz","__requestCheckAnswerSuccess",e,vt(s));case 7:case"end":return c.stop()}}),pt)}function Ct(e){return{type:"MARK_QUESTION_RENDERED",questionId:e}}function Nt(e){return{type:"SET_QUIZ_MODE",mode:e}}function Tt(e){return setTimeout((function(){yt("learnpress/quiz","sendKey","")}),300),{type:"SEND_KEY",keyPressed:e}}var xt=lodash,Dt=xt.get,Mt=xt.isArray,Lt=function(e,t){console.time("parseOptions");var n=Yt(e,t).options;return n=Mt(n)?n:JSON.parse(CryptoJS.AES.decrypt(n.data,n.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),n=Mt(n)?n:JSON.parse(n),console.timeEnd("parseOptions"),n};function Ut(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.status"):""}function Ft(e,t,n){return e[t]||n}function Ht(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.attempts"):[]}function Bt(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.answered",{}):{}}function Gt(e){var t=e.userQuiz,n=Dt(t,"questions");return n?Object.values(n):[]}function Kt(e,t){var n=e.userQuiz;return t?Dt(n,t):n}function Wt(e){var t=e.userQuiz;return{itemId:t.id,courseId:t.courseId}}function $t(e,t){var n=e.userQuiz;return Dt(n,"answered.".concat(t,".answered"))||void 0}function Jt(e,t){var n=e.userQuiz;return Dt(n,"answered.".concat(t,".mark"))||void 0}function Zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Dt(e,"userQuiz.questionsPerPage")||1;if(n>1)return!1;var r=Dt(e,"userQuiz.currentPage")||1;return Dt(e,"object"===t?"userQuiz.questions[".concat(r-1,"]"):"userQuiz.questionIds[".concat(r-1,"]"))}var Yt=function(e,t){e.userQuiz;return Object(u.select)("learnpress/quiz").getQuestions().find((function(e){return e.id==t}))};function Vt(e,t){return-1!==(Dt(e,"userQuiz.checkedQuestions")||[]).indexOf(t)}function Xt(e,t){}var en=function(e,t){var n=Dt(e,"userQuiz.answered"),r={};for(var o in n)if(n.hasOwnProperty(o)&&(n[o].temp||n[o].blanks)){if(t&&o===t)return n[o].answered;r[o]=n[o].answered}return r};function tn(e){var t=e.userQuiz||{},n=t.answered,r=t.negativeMarking,o=t.questions,i=t.checkedQuestions,a=0,u=function(e){if(!n.hasOwnProperty(e))return s=e,"continue";e=parseInt(e);var t,u=n[e],c=u.questionMark?u.questionMark:(t=o.find((function(t){return s=e,t.id===e})),s=e,t?t.point:0);i.indexOf(e);if(u.temp)return s=e,"continue";r?u.answered&&(a=u.correct?a+u.mark:a-c):u.answered&&u.correct&&(a+=u.mark),s=e};for(var s in n)u(s);return a>0?a:0}var nn=n(6),rn=n.n(nn),on={ENROLL_COURSE_X:function(e,t){}};var an=function(e){var t=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},n={getState:e.getState,dispatch:function(){return t.apply(void 0,arguments)}};return t=rn()(on)(n)(e.dispatch),e.dispatch=t,e};function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cn=LP.dataControls.controls,ln=Object(u.registerStore)("learnpress/quiz",{reducer:ut,selectors:o,actions:r,controls:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?un(Object(n),!0).forEach((function(t){sn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},cn)});an(ln);function fn(e){return(fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mn(e,t){return(mn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vn(e);if(t){var o=vn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return yn(this,n)}}function yn(e,t){return!t||"object"!==fn(t)&&"function"!=typeof t?hn(e):t}function hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vn(e){return(vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var On=lodash.chunk,wn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mn(e,t)}(i,e);var t,n,r,o=bn(i);function i(e){var t;return pn(this,i),gn(hn(t=o.apply(this,arguments)),"startQuiz",(function(e){t.props.startQuiz()})),t.state={currentPage:1,numPages:0,pages:[]},t}return t=i,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.settings,n=e.setQuizData,r=t.question_ids,o=t.questions_per_page,i=On(r,o);t.currentPage=1,t.numPages=i.length,t.pages=i,n(t)}},{key:"render",value:function(){var e=this.props,t=e.status,n=e.isReviewing,r=-1!==["","completed","viewed"].indexOf(t)||!t,o=-1!==["","viewed",void 0].indexOf(t)||!t;return void 0!==t&&React.createElement(React.Fragment,null,React.createElement("div",null,!n&&"completed"===t&&React.createElement(Te,null),!n&&o&&React.createElement(p,null),!n&&o&&React.createElement(s,null),"started"===t&&React.createElement(Me,null),(-1!==["completed","started"].indexOf(t)||n)&&React.createElement(qe,null),React.createElement(P,null),r&&!n&&React.createElement(Se,null)))}}])&&dn(t.prototype,n),r&&dn(t,r),i}(i.Component),_n=Object(a.compose)([Object(u.withSelect)((function(e){var t=e("learnpress/quiz"),n=t.getQuestions,r=t.getData;return{questions:n(),status:r("status"),store:r(),answered:r("answered"),isReviewing:"reviewing"===r("mode"),questionIds:r("questionIds"),checkCount:r("instantCheck"),questionsPerPage:r("questionsPerPage")||1}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz");return{setQuizData:t.setQuizData,startQuiz:t.startQuiz}}))])(wn);n(10);function jn(e){return function(e){if(Array.isArray(e))return Rn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Rn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var qn=LP.modal.default,Sn=(t.default=_n,function(e,t){wp.element.render(React.createElement(qn,null,React.createElement(_n,{settings:t})),jn(document.querySelectorAll(e))[0]),LP.Hook.doAction("lp-quiz-compatible-builder")})}]);
1
+ this.LP=this.LP||{},this.LP.quiz=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=19)}([function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.compose},function(e,t,n){"use strict";var r=jQuery,o=null,i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(o=this.elLPOverlay,this.elMainContent=o.find(".main-content"),this.elTitle=o.find(".modal-title"),this.elBtnYes=o.find(".btn-yes"),this.elBtnNo=o.find(".btn-no"),this.elFooter=o.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){o.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},a=i,u=(jQuery,{elBtnFinishCourse:null,elBtnCompleteItem:null,init:function(){a.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title),a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),a.callBackYes=function(){t.submit()}})),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach((function(e){return e.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title),a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),a.callBackYes=function(){t.submit()}}))})))}});t.a=u},function(e,t){e.exports=window.wp.url},function(e,t,n){"use strict";e.exports=function(e){var t,n={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(n,e),(t=function(e){return function(t){return function(r){var o,i,a=n[r.type],u=t(r);if(a)for(o=0;o<a.length;o++)(i=a[o](r,e))&&e.dispatch(i);return u}}}).effects=n,t}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return c}));var r=n(5),o=n(4);function i(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=function(){var e=document.querySelectorAll(".popup-header__inner");if(e.length&&null===document.querySelector("#learn-press-quiz-app div.quiz-result")&&"IntersectionObserver"in window){var t=new IntersectionObserver((function(e,n){e.forEach((function(e){if(e.isIntersecting){var n=e.target;c(n),t.unobserve(n)}}))}));a(e).map((function(e){return t.observe(e)}))}},c=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiFetch({path:Object(r.addQueryArgs)("lp/v1/lazy-load/items-progress",{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}),method:"GET"});case 2:n=e.sent,i=n.data,t.innerHTML+=i,o.a.init();case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function u(e){i(a,r,o,u,s,"next",e)}function s(e){i(a,r,o,u,s,"throw",e)}u(void 0)}))});return function(e){return t.apply(this,arguments)}}()},function(e,t){!function(){e.exports=this.LP.dataControls}()},function(e,t){function n(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}LP.Hook.addAction("lp-compatible-builder",(function(){LP.Hook.removeAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){Waypoint.refreshAll(),window.dispatchEvent(new Event("resize"))})),"undefined"!=typeof vc_js&&"undefined"!=typeof VcWaypoint&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){VcWaypoint.refreshAll()}))})),LP.Hook.addAction("lp-quiz-compatible-builder",(function(){return LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0})),LP.Hook.addAction("lp-question-compatible-builder",(function(){return LP.Hook.removeAction("lp-question-compatible-builder"),LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0}))},,function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2018 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&e.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var u in r)n.call(r,u)&&r[u]&&e.push(u);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return Sn}));var r={};n.r(r),n.d(r,"setQuizData",(function(){return Ot})),n.d(r,"setCurrentQuestion",(function(){return wt})),n.d(r,"setCurrentPage",(function(){return _t})),n.d(r,"__requestBeforeStartQuiz",(function(){return jt})),n.d(r,"__requestStartQuizSuccess",(function(){return Rt})),n.d(r,"startQuiz",(function(){return qt})),n.d(r,"__requestSubmitQuiz",(function(){return St})),n.d(r,"__requestSubmitQuizSuccess",(function(){return Pt})),n.d(r,"submitQuiz",(function(){return Et})),n.d(r,"updateUserQuestionAnswers",(function(){return kt})),n.d(r,"__requestShowHintSuccess",(function(){return zt})),n.d(r,"showHint",(function(){return Qt})),n.d(r,"__requestCheckAnswerSuccess",(function(){return At})),n.d(r,"checkAnswer",(function(){return It})),n.d(r,"markQuestionRendered",(function(){return Ct})),n.d(r,"setQuizMode",(function(){return Nt})),n.d(r,"sendKey",(function(){return Tt}));var o={};n.r(o),n.d(o,"getQuestionOptions",(function(){return Lt})),n.d(o,"getItemStatus",(function(){return Ut})),n.d(o,"getProp",(function(){return Ft})),n.d(o,"getQuizAttempts",(function(){return Ht})),n.d(o,"getQuizAnswered",(function(){return Bt})),n.d(o,"getQuestions",(function(){return Gt})),n.d(o,"getData",(function(){return Kt})),n.d(o,"getDefaultRestArgs",(function(){return Wt})),n.d(o,"getQuestionAnswered",(function(){return $t})),n.d(o,"getQuestionMark",(function(){return Jt})),n.d(o,"getCurrentQuestion",(function(){return Zt})),n.d(o,"getQuestion",(function(){return Yt})),n.d(o,"isCheckedAnswer",(function(){return Vt})),n.d(o,"isCorrect",(function(){return Xt})),n.d(o,"getQuestionsSelectedAnswers",(function(){return en})),n.d(o,"getUserMark",(function(){return tn}));var i=n(2),a=n(3),u=n(1),s=function(){var e=Object(u.select)("learnpress/quiz").getData("content");return React.createElement("div",{className:"quiz-content",dangerouslySetInnerHTML:{__html:e}})},c=n(0),l=function(e){var t;if(e>86400)t=(e-e%86400)/86400,e%=86400;else if(86400==e)return"24:00";var n=new Date(1e3*e).toUTCString().match(/\d{2}:\d{2}:\d{2}/)[0].split(":");return t&&(n[0]=parseInt(n[0])+24*t),n.join(":")},f=LP.Hook,p=function(){var e=function(e){return Object(u.select)("learnpress/quiz").getData(e)},t=f.applyFilters("quiz-meta-fields",{duration:{title:Object(c.__)("Duration:","learnpress"),name:"duration",content:l(e("duration"))||"--"},passingGrade:{title:Object(c.__)("Passing grade:","learnpress"),name:"passing-grade",content:e("passingGrade")||"--"},questionsCount:{title:Object(c.__)("Questions:","learnpress"),name:"questions-count",content:e("questionIds")?e("questionIds").length:0}});return t&&React.createElement(React.Fragment,null,React.createElement("ul",{className:"quiz-intro"},Object.values(t).map((function(e,t){var n=e.name||t;return React.createElement("li",{key:"quiz-intro-field-".concat(t),className:"quiz-intro-item quiz-intro-item--".concat(n)},React.createElement("div",{className:"quiz-intro-item__title",dangerouslySetInnerHTML:{__html:e.title}}),React.createElement("span",{className:"quiz-intro-item__content",dangerouslySetInnerHTML:{__html:e.content}}))}))))};function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?_(e):t}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(i,e);var t,n,r,o=O(i);function i(){var e;h(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return R(_(e=o.call.apply(o,[this].concat(n))),"startQuiz",(function(t){t&&t.preventDefault();var n=document.querySelector(".lp-button.start");n&&n.setAttribute("disabled","disabled");var r=e.props,o=r.startQuiz;if("completed"===r.status){var i=Object(u.select)("learnpress/modal"),a=i.confirm,s=i.isOpen;if("no"===a("Are you sure you want to retry quiz?",e.startQuiz))return void(!s()&&n&&n.removeAttribute("disabled"))}o()})),R(_(e),"nav",(function(t){return function(n){var r=e.props,o=r.questionNav,i=r.currentPage,a=r.numPages,u=r.setCurrentPage;switch(t){case"prev":i>1?i-=1:i="infinity"===o?a:1;break;default:i<a?i+=1:i="infinity"===o?1:a}u(i)}})),R(_(e),"moveTo",(function(t){return function(n){n.preventDefault();var r=e.props,o=r.numPages,i=r.setCurrentPage;t<1||t>o||i(t)}})),R(_(e),"isLast",(function(){var t=e.props;return t.currentPage===t.numPages})),R(_(e),"isFirst",(function(){return 1===e.props.currentPage})),R(_(e),"submit",(function(){var t=e.props.submitQuiz;"no"!==(0,Object(u.select)("learnpress/modal").confirm)(Object(c.__)("Are you sure to submit quiz?","learnpress"),e.submit)&&t()})),R(_(e),"setQuizMode",(function(t){return function(){(0,e.props.setQuizMode)(t)}})),R(_(e),"isReviewing",(function(){return e.props.isReviewing})),e}return t=i,(n=[{key:"pageNumbers",value:function(e){var t=this,n=this.props,r=n.numPages,o=n.currentPage;if(r<2)return"";(e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({numPages:r,currentPage:o,midSize:1,endSize:1,prevNext:!0},e||{})).endSize<1&&(e.endSize=1),e.midSize<0&&(e.midSize=1);var i=m(Array(r).keys()),a=!1;return React.createElement("div",{className:"nav-links"},e.prevNext&&!this.isFirst()&&React.createElement("button",{className:"page-numbers prev","data-type":"question-navx",onClick:this.nav("prev")},Object(c.__)("Prev","learnpress")),i.map((function(n){return(n+=1)===e.currentPage?(a=!0,React.createElement("span",{key:"page-number-".concat(n),className:"page-numbers current"},n)):n<=e.endSize||e.currentPage&&n>=e.currentPage-e.midSize&&n<=e.currentPage+e.midSize||n>e.numPages-e.endSize?(a=!0,React.createElement("button",{key:"page-number-".concat(n),className:"page-numbers",onClick:t.moveTo(n)},n)):a?(a=!1,React.createElement("span",{key:"page-number-".concat(n),className:"page-numbers dots"},"…")):""})),e.prevNext&&!this.isLast()&&React.createElement("button",{className:"page-numbers next","data-type":"question-navx",onClick:this.nav("next")},Object(c.__)("Next","learnpress")))}},{key:"render",value:function(){var e=this.props,t=e.status,n=e.questionNav,r=e.isReviewing,o=e.showReview,i=e.numPages,a=(e.question,e.questionsPerPage,e.canRetry),u=e.retakeNumber,s=["quiz-buttons"];("started"===t||r)&&s.push("align-center"),"questionNav"===n&&s.push("infinity"),this.isFirst()&&s.push("is-first"),this.isLast()&&s.push("is-last");var l=document.querySelector("#popup-sidebar"),f=document.querySelector("#learn-press-quiz-app"),p="";return p="started"===t||r?{marginLeft:l&&l.offsetWidth/2,width:f&&f.offsetWidth}:null,React.createElement(React.Fragment,null,React.createElement("div",{className:s.join(" ")},React.createElement("div",{className:"button-left"+("started"===t||r?" fixed":""),style:p},("completed"===t&&a||-1!==["","viewed"].indexOf(t))&&!r&&React.createElement("button",{className:"lp-button start",onClick:this.startQuiz},"completed"===t?"".concat(Object(c._x)("Retake","label button retry quiz","learnpress")).concat(u?" (".concat(u,")"):""):Object(c._x)("Start","label button start quiz","learnpress")),("started"===t||r)&&i>1&&React.createElement(React.Fragment,null,React.createElement("div",{className:"questions-pagination"},this.pageNumbers()))),React.createElement("div",{className:"button-right"},"started"===t&&React.createElement(React.Fragment,null,("infinity"===n||this.isLast())&&!r&&React.createElement("button",{className:"lp-button submit-quiz",onClick:this.submit},Object(c.__)("Finish Quiz","learnpress"))),r&&o&&React.createElement("button",{className:"lp-button back-quiz",onClick:this.setQuizMode("")},Object(c.__)("Result","learnpress")),"completed"===t&&o&&!r&&React.createElement("button",{className:"lp-button review-quiz",onClick:this.setQuizMode("reviewing")},Object(c.__)("Review","learnpress")))),this.props.message&&!0!==this.props.success&&React.createElement("div",{className:"learn-press-message error"},this.props.message))}}])&&v(t.prototype,n),r&&v(t,r),i}(i.Component),S=Object(a.compose)(Object(u.withSelect)((function(e){var t=e("learnpress/quiz").getData;return{status:t("status"),showCheck:t("instantCheck"),checkedQuestions:t("checkedQuestions"),hintedQuestions:t("hintedQuestions"),questionsPerPage:t("questionsPerPage")}})))((function(e){var t=e.showCheck,n=e.checkedQuestions,r=e.hintedQuestions,o=e.question,i=e.status,a=e.type,u=e.Button;if("started"!==i)return!1;var s=React.createElement(u,{question:o});switch(a){case"hint":return r?!!o.hasHint&&(-1===r.indexOf(o.id)&&s):s;case"check":return!!t&&(n?-1===n.indexOf(o.id)&&s:s)}})),P=Object(a.compose)([Object(u.withSelect)((function(e){var t=e("learnpress/quiz"),n=t.getData,r=t.getCurrentQuestion,o={id:n("id"),status:n("status"),questionIds:n("questionIds"),questionNav:n("questionNav"),isReviewing:n("reviewQuestions")&&"reviewing"===n("mode"),showReview:n("reviewQuestions"),showCheck:n("instantCheck"),checkedQuestions:n("checkedQuestions"),hintedQuestions:n("hintedQuestions"),numPages:n("numPages"),pages:n("pages"),currentPage:n("currentPage"),questionsPerPage:n("questionsPerPage"),pageNumbers:n("pageNumbers"),keyPressed:n("keyPressed"),canRetry:n("retakeCount")>0&&n("retaken")<n("retakeCount"),retakeNumber:n("retakeCount")>0&&n("retaken")<n("retakeCount")?n("retakeCount")-n("retaken"):null,message:n("messageResponse")||!1,success:void 0===n("successResponse")||n("successResponse")};return 1===o.questionsPerPage&&(o.question=r("object")),o})),Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz"),r=n.startQuiz,o=n.setCurrentQuestion,i=n.submitQuiz,a=n.setQuizMode,u=n.showHint,s=n.checkAnswer;return{startQuiz:r,setCurrentQuestion:o,setQuizMode:a,setCurrentPage:n.setCurrentPage,submitQuiz:function(e){i(e)},showHint:function(e){u(e)},checkAnswer:function(e){s(e)}}}))])(q);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=N(e);if(t){var o=N(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?C(e):t}function C(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}(i,e);var t,n,r,o=A(i);function i(){var e;k(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return T(C(e=o.call.apply(o,[this].concat(n))),"showHint",(function(){var t=e.props,n=t.showHint,r=t.question;n(r.id,!r.showHint)})),e}return t=i,(n=[{key:"render",value:function(){return this.props.question.hint?React.createElement("button",{className:"btn-show-hint",onClick:this.showHint},React.createElement("span",null,Object(c.__)("Hint","learnpress"))):""}}])&&z(t.prototype,n),r&&z(t,r),i}(i.Component),D=Object(a.compose)(Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz").showHint;return{showHint:function(e,t){n(e,t)}}})))(x),M=n(12),L=n.n(M);function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$(e);if(t){var o=$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?W(e):t}function W(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e){return($=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(i,e);var t,n,r,o=G(i);function i(){var e;return F(this,i),J(W(e=o.apply(this,arguments)),"checkAnswer",(function(){var t=e.props,n=t.checkAnswer,r=t.question;t.answered&&(n(r.id),e.setState({loading:!0}))})),e.state={loading:!1},e}return t=i,(n=[{key:"render",value:function(){var e=this.props.answered;return React.createElement(React.Fragment,null,React.createElement("button",{className:L()("lp-button","instant-check",{loading:this.state.loading,disable:!e}),onClick:this.checkAnswer},React.createElement("span",{className:"instant-check__icon"}),Object(c._x)("Check answer","label of button check answer","learnpress"),!e&&React.createElement("div",{className:"instant-check__info",dangerouslySetInnerHTML:{__html:Object(c.__)("You need to answer the question before check answer.","learnpress")}})))}}])&&H(t.prototype,n),r&&H(t,r),i}(i.Component),Y=Object(a.compose)(Object(u.withSelect)((function(e,t){var n=t.question.id;return{answered:(0,e("learnpress/quiz").getQuestionAnswered)(n)}})),Object(u.withDispatch)((function(e,t){t.id;var n=e("learnpress/quiz").checkAnswer;return{checkAnswer:function(e){n(e)}}})))(Z),V=function(e){var t=e.question,n={"instant-check":function(){return React.createElement(S,{type:"check",Button:Y,question:t})},hint:function(){return React.createElement(S,{type:"hint",Button:D,question:t})}};return React.createElement(React.Fragment,null,LP.config.questionFooterButtons().map((function(e){return React.createElement(i.Fragment,{key:"button-".concat(e)},n[e]&&n[e]())})))};function X(e){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=se(e);if(t){var o=se(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ae(this,n)}}function ae(e,t){return!t||"object"!==X(t)&&"function"!=typeof t?ue(e):t}function ue(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=window.jQuery,fe=lodash,pe=(fe.uniqueId,fe.isArray),de=(fe.isNumber,fe.bind,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oe(e,t)}(a,e);var t,n,r,o=ie(a);function a(){var e;return ne(this,a),ce(ue(e=o.apply(this,arguments)),"setRef",(function(t){e.$wrap=le(t)})),ce(ue(e),"parseOptions",(function(e){return e&&(e=pe(e)?e:JSON.parse(CryptoJS.AES.decrypt(e.data,e.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),e=pe(e)?e:JSON.parse(e)),e||[]})),ce(ue(e),"getWrapperClass",(function(){var t=e.props,n=t.question,r=(t.answered,["question","question-"+n.type]),o=e.parseOptions(n.options);return o.length&&void 0!==o[0].isTrue&&r.push("question-answered"),r})),ce(ue(e),"getEditLink",(function(){var t=e.props,n=t.question,r=t.editPermalink;return r?r.replace(/post=([0-9]{3,4})/,"post=".concat(n.id)):""})),ce(ue(e),"editPermalink",(function(e){return Object(c.sprintf)('<a href="%s">%s</a>',e,Object(c.__)("Edit","learnpress"))})),e.state={time:null,showHint:!1},e.$wrap=null,e}return t=a,(n=[{key:"componentDidMount",value:function(e){var t=this.props,n=t.question,r=t.isCurrent,o=t.markQuestionRendered;return r&&o(n.id),this.state.time||this.setState({time:new Date}),LP.Hook.doAction("lp-question-compatible-builder"),e}},{key:"render",value:function(){var e=this,t=this.props,n=t.question,r=t.isShow,o=t.isShowIndex,a=(t.isShowHint,t.status),u=LP.questionTypes.default,s=this.getEditLink();s&&jQuery("#wp-admin-bar-edit-lp_question").find(".ab-item").attr("href",s);var l={index:function(){return o?React.createElement("span",{className:"question-index"},o,"."):""},title:function(){return n.title},hint:function(){return React.createElement(D,{question:n})},"edit-permalink":function(){return s&&React.createElement("span",{dangerouslySetInnerHTML:{__html:e.editPermalink(s)},className:"edit-link"})}},f={title:function(){return React.createElement("h4",{className:"question-title"},LP.config.questionTitleParts().map((function(e){return React.createElement(i.Fragment,{key:"title-part-".concat(e)},l[e]&&l[e]())})))},content:function(){return React.createElement("div",{className:"question-content",dangerouslySetInnerHTML:{__html:n.content}})},"answer-options":function(){return e.$wrap&&React.createElement(u,te(te({},e.props),{},{$wrap:e.$wrap}))},explanation:function(){return n.explanation&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-explanation-content"},React.createElement("strong",{className:"explanation-title"},Object(c.__)("Explanation:","learnpress")),React.createElement("div",{dangerouslySetInnerHTML:{__html:n.explanation}})))},hint:function(){return n.hint&&!n.explanation&&n.showHint&&React.createElement(React.Fragment,null,React.createElement("div",{className:"question-hint-content"},React.createElement("strong",{className:"hint-title"},Object(c.__)("Hint:","learnpress")),React.createElement("div",{dangerouslySetInnerHTML:{__html:n.hint}})))},buttons:function(){return"started"===a&&React.createElement(V,{question:n})}},p=LP.config.questionBlocks();return React.createElement(React.Fragment,null,React.createElement("div",{className:this.getWrapperClass().join(" "),style:{display:r?"":"none"},"data-id":n.id,ref:this.setRef},p.map((function(e){return React.createElement(i.Fragment,{key:"block-".concat(e)},f[e]?f[e]():"")}))))}}])&&re(t.prototype,n),r&&re(t,r),a}(i.Component)),me=Object(a.compose)([Object(u.withSelect)((function(e,t){var n=t.question.id,r=e("learnpress/quiz"),o=r.getData,i=r.getQuestionAnswered,a=r.getQuestionMark;return{status:o("status"),questions:o("question"),answered:i(n),questionsRendered:o("questionsRendered"),editPermalink:o("editPermalink"),numPages:o("numPages"),mark:a(n)||""}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz"),n=t.updateUserQuestionAnswers;return{markQuestionRendered:t.markQuestionRendered,updateUserQuestionAnswers:n}}))])(de);function be(e){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function he(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t){return(ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_e(e);if(t){var o=_e(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Oe(this,n)}}function Oe(e,t){return!t||"object"!==be(t)&&"function"!=typeof t?we(e):t}function we(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _e(e){return(_e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function je(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ve(e,t)}(i,e);var t,n,r,o=ge(i);function i(e){var t;return ye(this,i),je(we(t=o.apply(this,arguments)),"startQuiz",(function(e){e.preventDefault(),(0,t.props.startQuiz)()})),je(we(t),"isInVisibleRange",(function(e,n){var r=t.props,o=r.currentPage,i=r.questionsPerPage;return o===Math.ceil(n/i)})),je(we(t),"nav",(function(e){var n=t.props.sendKey;switch(e.keyCode){case 37:return n("left");case 38:return;case 39:return n("right");case 40:return;default:e.keyCode>=49&&e.keyCode<=57&&n(e.keyCode-48)}})),t.needToTop=!1,t.state={isReviewing:null,currentPage:0,self:we(t)},t}return t=i,r=[{key:"getDerivedStateFromProps",value:function(e,t){for(var n=["isReviewing","currentPage"],r={},o=0;o<n.length;o++)e[n[o]]!==t[n[o]]&&(r[n[o]]=e[n[o]]);return Object.values(r).length?(t.self.needToTop=!0,r):null}}],(n=[{key:"componentDidUpdate",value:function(){this.needToTop&&(jQuery("#popup-content").animate({scrollTop:0}).find(".content-item-scrollable:last").animate({scrollTop:0}),this.needToTop=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.status,r=t.currentQuestion,o=t.questions,i=t.questionsRendered,a=t.isReviewing,u=t.questionsPerPage,s=!0;return"completed"!==n||a||(s=!1),React.createElement(React.Fragment,null,React.createElement("div",{tabIndex:100,onKeyUp:this.nav},React.createElement("div",{className:"quiz-questions",style:{display:s?"":"none"}},o.map((function(t,n){var o=!u&&r===t.id,a=i&&-1!==i.indexOf(t.id),s=e.isInVisibleRange(t.id,n+1);return a||!a||s?React.createElement(me,{key:"loop-question-".concat(t.id),isCurrent:o,isShow:s,isShowIndex:!!u&&n+1,questionsPerPage:u,question:t}):""})))))}}])&&he(t.prototype,n),r&&he(t,r),i}(i.Component),qe=Object(a.compose)(Object(u.withSelect)((function(e,t,n){var r=e("learnpress/quiz"),o=r.getData,i=r.getQuestions;return{status:o("status"),currentQuestion:o("currentQuestion"),questions:i(),questionsRendered:o("questionsRendered"),isReviewing:"reviewing"===o("mode"),numPages:o("numPages"),currentPage:o("currentPage"),questionsPerPage:o("questionsPerPage")||1}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz");return{startQuiz:t.startQuiz,sendKey:t.sendKey}})))(Re),Se=function(){var e=Object(u.select)("learnpress/quiz").getData("attempts")||[],t=e&&!!e.length;return!!t&&React.createElement(React.Fragment,null,React.createElement("div",{className:"quiz-attempts"},React.createElement("h4",{className:"attempts-heading"},Object(c.__)("Last Attempted","learnpress")),t&&React.createElement("table",null,React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",{className:"quiz-attempts__questions"},Object(c.__)("Questions","learnpress")),React.createElement("th",{className:"quiz-attempts__spend"},Object(c.__)("Time spend","learnpress")),React.createElement("th",{className:"quiz-attempts__marks"},Object(c.__)("Marks","learnpress")),React.createElement("th",{className:"quiz-attempts__grade"},Object(c.__)("Passing grade","learnpress")),React.createElement("th",{className:"quiz-attempts__result"},Object(c.__)("Result","learnpress")))),React.createElement("tbody",null,e.map((function(e,t){return React.createElement("tr",{key:"attempt-".concat(t)},React.createElement("td",{className:"quiz-attempts__questions"},"".concat(e.questionCorrect," / ").concat(e.questionCount)),React.createElement("td",{className:"quiz-attempts__spend"},e.timeSpend||"--"),React.createElement("td",{className:"quiz-attempts__marks"},"".concat(e.userMark," / ").concat(e.mark)),React.createElement("td",{className:"quiz-attempts__grade"},e.passingGrade||Object(c._x)("-","unknown passing grade value","learnpress")),React.createElement("td",{className:"quiz-attempts__result"},"".concat(parseFloat(e.result).toFixed(2),"%")," ",React.createElement("span",null,e.graduationText)))}))))))};function Pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ee(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ke=function(){var e=Object(u.select)("learnpress/quiz").getData,t=Object(u.dispatch)("learnpress/quiz").submitQuiz,n=e("totalTime")?e("totalTime"):e("duration"),r=e("endTime"),o=new Date(r.replace(/-/g,"/")),a=new Date,s=(new Date).getTimezoneOffset(),c=parseInt(o.getTime()/1e3-(a.getTime()/1e3+60*s)),l=Pe(Object(i.useState)(c>0?c:0),2),f=l[0],p=l[1];Object(i.useEffect)((function(){var e=setInterval((function(){var n=f;(n-=1)>0?p(n):(clearInterval(e),t())}),1e3);return function(){return clearInterval(e)}}),[f]);return React.createElement("div",{className:"countdown"},React.createElement("i",{className:"fas fa-stopwatch"}),React.createElement("span",null,function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":",r=[];return n<3600?(r.push((f-f%60)/60),r.push(f%60)):n&&(r.push((f-f%3600)/3600),e=f%3600,r.push((e-e%60)/60),r.push(e%60)),r.map((function(e){return e<10?"0".concat(e):e})).join(t)}()))},ze=n(8);function Qe(e){return function(e){if(Array.isArray(e))return Ce(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ie(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ae(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}(e,t)||Ie(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ie(e,t){if(e){if("string"==typeof e)return Ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ce(e,t):void 0}}function Ce(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ne=lodash.debounce,Te=function(){var e=Ae(Object(i.useState)(0),2),t=e[0],n=e[1],r=Ae(Object(i.useState)(!1),2),o=r[0],a=r[1],s=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("results")}),[]),l=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("passingGrade")}),[]),f=Object(u.useSelect)((function(e){return e("learnpress/quiz").getData("id")}),[]);Object(i.useEffect)((function(){d();var e="";if(e=s.graduation?s.graduation:s.result>=v.replace(/[^0-9\.]+/g,"")?"passed":"failed"){var t=document.querySelector(".course-curriculum .course-item.course-item-".concat(f));t&&(t.classList.remove("failed","passed"),t.classList.add("has-status","status-completed",e))}var n=Qe(document.querySelectorAll("#popup-header .items-progress"))[0];if(n){var r=n.querySelector(".items-completed");if(r){parseInt(r.textContent);var o=document.querySelectorAll("#popup-sidebar .course-curriculum .course-item.status-completed");r.textContent=parseInt(o.length)}}p()}),[s]);var p=function(){var e=document.querySelectorAll(".popup-header__inner");e.length>0&&0===e[0].querySelectorAll("form.form-button-finish-course").length&&Object(ze.a)(e[0])},d=function(){n(0),a(!1),jQuery.easing._customEasing=function(e,t,n,r,o){return r*Math.sqrt(1-(t=t/o-1)*t)+n},Ne((function(){var e=jQuery("<span />").css({width:1,height:1}).appendTo(document.body);e.css("left",0).animate({left:s.result},{duration:1500,step:function(e,t){n(e)},done:function(){a(!0),e.remove(),jQuery("#quizResultGrade").css({transform:"scale(1.3)",transition:"all 0.25s"}),Ne((function(){jQuery("#quizResultGrade").css({transform:"scale(1)"})}),500)()},easing:"_customEasing"})}),s.result>0?1e3:10)()},m=t;Number.isInteger(t)||(m=parseFloat(t).toFixed(2));var b=190*Math.PI,y=b-m/100*b,h={strokeDasharray:"".concat(b," ").concat(b),strokeDashoffset:y},v=s.passingGrade||l,g="";g=s.graduation?s.graduation:m>=v.replace(/[^0-9\.]+/g,"")?"passed":"failed";var O="";O=s.graduationText?s.graduationText:"passed"===g?Object(c.__)("Passed","learnpress"):Object(c.__)("Failed","learnpress");var w=["quiz-result",g];return React.createElement("div",{className:w.join(" ")},React.createElement("h3",{className:"result-heading"},Object(c.__)("Your Result","learnpress")),React.createElement("div",{id:"quizResultGrade",className:"result-grade"},React.createElement("svg",{className:"circle-progress-bar",width:200,height:200},React.createElement("circle",{className:"circle-progress-bar__circle",stroke:"",strokeWidth:10,style:h,fill:"transparent",r:95,cx:100,cy:100})),React.createElement("span",{className:"result-achieved"},"".concat(m,"%")),React.createElement("span",{className:"result-require"},v||Object(c._x)("-","unknown passing grade value","learnpress"))),o&&React.createElement("p",{className:"result-message"},O),React.createElement("ul",{className:"result-statistic"},React.createElement("li",{className:"result-statistic-field result-time-spend"},React.createElement("span",null,Object(c.__)("Time spend","learnpress")),React.createElement("p",null,s.timeSpend)),React.createElement("li",{className:"result-statistic-field result-point"},React.createElement("span",null,Object(c.__)("Point","learnpress")),React.createElement("p",null,s.userMark," / ",s.mark)),React.createElement("li",{className:"result-statistic-field result-questions"},React.createElement("span",null,Object(c.__)("Questions","learnpress")),React.createElement("p",null,s.questionCount)),React.createElement("li",{className:"result-statistic-field result-questions-correct"},React.createElement("span",null,Object(c.__)("Correct","learnpress")),React.createElement("p",null,s.questionCorrect)),React.createElement("li",{className:"result-statistic-field result-questions-wrong"},React.createElement("span",null,Object(c.__)("Wrong","learnpress")),React.createElement("p",null,s.questionWrong)),React.createElement("li",{className:"result-statistic-field result-questions-skipped"},React.createElement("span",null,Object(c.__)("Skipped","learnpress")),React.createElement("p",null,s.questionEmpty))))},xe=jQuery,De=lodash.debounce,Me=function(){var e=Object(u.dispatch)("learnpress/quiz").submitQuiz;Object(i.useEffect)((function(){var e=xe("#popup-content");if(e.length){var t=e.find(".content-item-scrollable:eq(1)"),n=e.find(".content-item-wrap"),r=e.find(".quiz-status"),o=r.offset().top-92,i=!1,a="-"+n.css("margin-left");xe(window).on("resize.refresh-quiz-stauts-bar",De((function(){a="-"+n.css("margin-left"),r.css({"margin-left":a,"margin-right":a})}),100)).trigger("resize.refresh-quiz-stauts-bar"),t.on("scroll",(function(){if(t.scrollTop()>=o){if(i)return;i=!0}else{if(!i)return;i=!1}i?e.addClass("fixed-quiz-status"):e.removeClass("fixed-quiz-status")}))}}),[]);var t=Object(u.select)("learnpress/quiz"),n=t.getData,r=t.getUserMark,o=n("currentPage"),a=n("questionsPerPage"),s=n("questionIds").length,l=n("submitting"),f=n("totalTime"),p=n("duration"),d=r(),m=["quiz-status"],b=(o-1)*a+1,y=b+a-1,h="";return y=Math.min(y,s),l&&m.push("submitting"),h=y<s?a>1?Object(c.sprintf)(Object(c.__)("Question <span>%d to %d of %d</span>","learnpress"),b,y,s):Object(c.sprintf)(Object(c.__)("Question <span>%d of %d</span>","learnpress"),b,s):Object(c.sprintf)(Object(c.__)("Question <span>%d to %d</span>","learnpress"),b,y),React.createElement("div",{className:m.join(" ")},React.createElement("div",null,React.createElement("div",{className:"questions-index",dangerouslySetInnerHTML:{__html:h}}),React.createElement("div",{className:"current-point"},Object(c.sprintf)(Object(c.__)("Earned Point: %s","learnpress"),d)),React.createElement("div",null,React.createElement("div",{className:"submit-quiz"},React.createElement("button",{className:"lp-button",id:"button-submit-quiz",onClick:function t(){"no"!==(0,Object(u.select)("learnpress/modal").confirm)(Object(c.__)("Are you sure to submit quiz?","learnpress"),t)&&e()}},l?Object(c.__)("Submitting...","learnpress"):Object(c.__)("Finish Quiz","learnpress"))),f&&p&&React.createElement(ke,null))))};function Le(e){return function(e){if(Array.isArray(e))return Ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ue(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){Be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ge=lodash,Ke=(Ge.omit,Ge.flow),We=Ge.isArray,$e=Ge.chunk,Je=(LP.camelCaseDashObjectKeys,LP.localStorage),Ze=Je.get,Ye=Je.set,Ve={},Xe=function(e,t){var n=He(He({},e.answered[t.questionId]||{}),{},{answered:t.answers,temp:!0});return He(He({},e),{},{answered:He(He({},e.answered),{},Be({},t.questionId,n))})},et=function(e,t){var n=e.questionsRendered;return We(n)?(n.push(t.questionId),He(He({},e),{},{questionsRendered:Le(n)})):He(He({},e),{},{questionsRendered:[t.questionId]})},tt=function(e,t){return t.currentPage&&Ye("Q".concat(e.id,".currentPage"),t.currentPage),He(He({},e),t)},nt=function(e,t){var n=e.questions.map((function(e){return e.id==t.questionId?He(He({},e),{},{showHint:t.showHint}):e}));return He(He({},e),{},{questions:Le(n)})},rt=function(e,t){var n=e.questions.map((function(e){if(e.id!==t.questionId)return e;var n={explanation:t.explanation};return t.options&&(n.options=t.options),He(He({},e),n)}));return He(He({},e),{},{questions:Le(n),answered:He(He({},e.answered),{},Be({},t.questionId,t.result)),checkedQuestions:[].concat(Le(e.checkedQuestions),[t.questionId])})},ot=function(e,t){var n=e.questions.map((function(n){var r={};return e.reviewQuestions&&(t.results.questions[n.id].explanation&&(r.explanation=t.results.questions[n.id].explanation),t.results.questions[n.id].options&&(r.options=t.results.questions[n.id].options)),He(He({},n),r)}));return tt(e,He(He({submitting:!1,currentPage:1},t.results),{},{questions:Le(n)}))},it=function(e,t){var n=void 0!==t.results.success&&t.results.success,r=t.results.message||!1;return tt(e,He(He({checkedQuestions:[],hintedQuestions:[],mode:"",currentPage:1},t.results.results),{},{successResponse:n,messageResponse:r}))},at=Ke(u.combineReducers,(function(e){return function(t,n){return e(t,n)}}),(function(e){return function(t,n){return e(t,n)}}),(function(e){return function(t,n){return e(t,n)}}))({a:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{a:1};return e},b:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{b:2};return e}}),ut=Object(u.combineReducers)({blocks:at,userQuiz:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ve,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_QUIZ_DATA":1>t.data.questionsPerPage&&(t.data.questionsPerPage=1);var n=$e(e.questionIds||t.data.questionIds,t.data.questionsPerPage);return t.data.numPages=n.length,t.data.pages=n,He(He(He({},e),t.data),{},{currentPage:Ze("Q".concat(t.data.id,".currentPage"))||t.data.currentPage});case"SUBMIT_QUIZ":return He(He({},e),{},{submitting:!0});case"START_QUIZ":case"START_QUIZ_SUCCESS":return it(e,t);case"SET_CURRENT_QUESTION":return Ye("Q".concat(e.id,".currentQuestion"),t.questionId),He(He({},e),{},{currentQuestion:t.questionId});case"SET_CURRENT_PAGE":return Ye("Q".concat(e.id,".currentPage"),t.currentPage),He(He({},e),{},{currentPage:t.currentPage});case"SUBMIT_QUIZ_SUCCESS":return ot(e,t);case"UPDATE_USER_QUESTION_ANSWERS":return"started"===e.status?Xe(e,t):e;case"MARK_QUESTION_RENDERED":return et(e,t);case"SET_QUIZ_MODE":return"reviewing"==t.mode?tt(e,{mode:t.mode}):He(He({},e),{},{mode:t.mode});case"SET_QUESTION_HINT":return nt(e,t);case"CHECK_ANSWER":return rt(e,t);case"SEND_KEY":return He(He({},e),{},{keyPressed:t.keyPressed})}return e}}),st=n(9);function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var lt=regeneratorRuntime.mark(Et),ft=regeneratorRuntime.mark(Qt),pt=regeneratorRuntime.mark(It);function dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mt(e){return function(e){if(Array.isArray(e))return bt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return bt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yt(){var e=[].slice.call(arguments,2),t=Object(u.dispatch)(arguments[0]),n=arguments[1];t[n].apply(t,mt(e))}var ht=LP,vt=ht.camelCaseDashObjectKeys,gt=ht.Hook;function Ot(e,t){return t="string"==typeof e?dt({},e,t):e,{type:"SET_QUIZ_DATA",data:vt(t)}}function wt(e){return{type:"SET_CURRENT_QUESTION",questionId:e}}function _t(e){return{type:"SET_CURRENT_PAGE",currentPage:e}}function jt(e,t,n){return{type:"BEFORE_START_QUIZ"}}function Rt(e,t,n,r){return gt.doAction("quiz-started",e,t,n,r),{type:"START_QUIZ_SUCCESS",quizId:t,courseId:n,userId:r,results:e}}var qt=regeneratorRuntime.mark((function e(){var t,n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Object(u.select)("learnpress/quiz").getDefaultRestArgs(),n=t.itemId,r=t.courseId,!0===gt.applyFilters("before-start-quiz",!0,n,r)){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,Object(st.apiFetch)({path:"lp/v1/users/start-quiz",method:"POST",data:{item_id:n,course_id:r}});case 6:return o=e.sent,o=gt.applyFilters("request-start-quiz-response",o,n,r),e.next=10,yt("learnpress/quiz","__requestStartQuizSuccess",vt(o),n,r);case 10:case"end":return e.stop()}}),e)}));function St(){return{type:"SUBMIT_QUIZ"}}function Pt(e,t,n){return gt.doAction("quiz-submitted",e,t,n),{type:"SUBMIT_QUIZ_SUCCESS",results:e}}function Et(){var e,t,n,r,o,i,a,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(e=Object(u.select)("learnpress/quiz"),t=e.getDefaultRestArgs,n=e.getQuestionsSelectedAnswers,r=t(),o=r.itemId,i=r.courseId,!0===gt.applyFilters("before-submit-quiz",!0)){c.next=5;break}return c.abrupt("return");case 5:return a=n(),c.next=8,Object(st.apiFetch)({path:"lp/v1/users/submit-quiz",method:"POST",data:{item_id:o,course_id:i,answered:a}});case 8:if(s=c.sent,!(s=gt.applyFilters("request-submit-quiz-response",s,o,i)).success){c.next=13;break}return c.next=13,yt("learnpress/quiz","__requestSubmitQuizSuccess",vt(s.results),o,i);case 13:case"end":return c.stop()}}),lt)}function kt(e,t,n){return{type:"UPDATE_USER_QUESTION_ANSWERS",questionId:e,answers:t}}function zt(e,t){return{type:"SET_QUESTION_HINT",questionId:e,showHint:t}}function Qt(e,t){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,yt("learnpress/quiz","__requestShowHintSuccess",e,t);case 2:case"end":return n.stop()}}),ft)}function At(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){dt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:"CHECK_ANSWER",questionId:e},t)}function It(e){var t,n,r,o,i,a,s;return regeneratorRuntime.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return t=Object(u.select)("learnpress/quiz"),n=t.getDefaultRestArgs,r=t.getQuestionAnswered,o=n(),i=o.itemId,a=o.courseId,c.next=4,Object(st.apiFetch)({path:"lp/v1/users/check-answer",method:"POST",data:{item_id:i,course_id:a,question_id:e,answered:r(e)||""}});case 4:return s=c.sent,c.next=7,yt("learnpress/quiz","__requestCheckAnswerSuccess",e,vt(s));case 7:case"end":return c.stop()}}),pt)}function Ct(e){return{type:"MARK_QUESTION_RENDERED",questionId:e}}function Nt(e){return{type:"SET_QUIZ_MODE",mode:e}}function Tt(e){return setTimeout((function(){yt("learnpress/quiz","sendKey","")}),300),{type:"SEND_KEY",keyPressed:e}}var xt=lodash,Dt=xt.get,Mt=xt.isArray,Lt=function(e,t){console.time("parseOptions");var n=Yt(e,t).options;return n=Mt(n)?n:JSON.parse(CryptoJS.AES.decrypt(n.data,n.key,{format:CryptoJSAesJson}).toString(CryptoJS.enc.Utf8)),n=Mt(n)?n:JSON.parse(n),console.timeEnd("parseOptions"),n};function Ut(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.status"):""}function Ft(e,t,n){return e[t]||n}function Ht(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.attempts"):[]}function Bt(e,t){var n=Object(u.select)("course-learner/user").getItemById(t);return n?Dt(n,"userSettings.answered",{}):{}}function Gt(e){var t=e.userQuiz,n=Dt(t,"questions");return n?Object.values(n):[]}function Kt(e,t){var n=e.userQuiz;return t?Dt(n,t):n}function Wt(e){var t=e.userQuiz;return{itemId:t.id,courseId:t.courseId}}function $t(e,t){var n=e.userQuiz;return Dt(n,"answered.".concat(t,".answered"))||void 0}function Jt(e,t){var n=e.userQuiz;return Dt(n,"answered.".concat(t,".mark"))||void 0}function Zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Dt(e,"userQuiz.questionsPerPage")||1;if(n>1)return!1;var r=Dt(e,"userQuiz.currentPage")||1;return Dt(e,"object"===t?"userQuiz.questions[".concat(r-1,"]"):"userQuiz.questionIds[".concat(r-1,"]"))}var Yt=function(e,t){e.userQuiz;return Object(u.select)("learnpress/quiz").getQuestions().find((function(e){return e.id==t}))};function Vt(e,t){return-1!==(Dt(e,"userQuiz.checkedQuestions")||[]).indexOf(t)}function Xt(e,t){}var en=function(e,t){var n=Dt(e,"userQuiz.answered"),r={};for(var o in n)if(n.hasOwnProperty(o)&&(n[o].temp||n[o].blanks)){if(t&&o===t)return n[o].answered;r[o]=n[o].answered}return r};function tn(e){var t=e.userQuiz||{},n=t.answered,r=t.negativeMarking,o=t.questions,i=t.checkedQuestions,a=0,u=function(e){if(!n.hasOwnProperty(e))return s=e,"continue";e=parseInt(e);var t,u=n[e],c=u.questionMark?u.questionMark:(t=o.find((function(t){return s=e,t.id===e})),s=e,t?t.point:0);i.indexOf(e);if(u.temp)return s=e,"continue";r?u.answered&&(a=u.correct?a+u.mark:a-c):u.answered&&u.correct&&(a+=u.mark),s=e};for(var s in n)u(s);return a>0?a:0}var nn=n(6),rn=n.n(nn),on={ENROLL_COURSE_X:function(e,t){}};var an=function(e){var t=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},n={getState:e.getState,dispatch:function(){return t.apply(void 0,arguments)}};return t=rn()(on)(n)(e.dispatch),e.dispatch=t,e};function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cn=LP.dataControls.controls,ln=Object(u.registerStore)("learnpress/quiz",{reducer:ut,selectors:o,actions:r,controls:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?un(Object(n),!0).forEach((function(t){sn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},cn)});an(ln);function fn(e){return(fn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mn(e,t){return(mn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vn(e);if(t){var o=vn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return yn(this,n)}}function yn(e,t){return!t||"object"!==fn(t)&&"function"!=typeof t?hn(e):t}function hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vn(e){return(vn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var On=lodash.chunk,wn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mn(e,t)}(i,e);var t,n,r,o=bn(i);function i(e){var t;return pn(this,i),gn(hn(t=o.apply(this,arguments)),"startQuiz",(function(e){t.props.startQuiz()})),t.state={currentPage:1,numPages:0,pages:[]},t}return t=i,(n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.settings,n=e.setQuizData,r=t.question_ids,o=t.questions_per_page,i=On(r,o);t.currentPage=1,t.numPages=i.length,t.pages=i,n(t)}},{key:"render",value:function(){var e=this.props,t=e.status,n=e.isReviewing,r=-1!==["","completed","viewed"].indexOf(t)||!t,o=-1!==["","viewed",void 0].indexOf(t)||!t;return void 0!==t&&React.createElement(React.Fragment,null,React.createElement("div",null,!n&&"completed"===t&&React.createElement(Te,null),!n&&o&&React.createElement(p,null),!n&&o&&React.createElement(s,null),"started"===t&&React.createElement(Me,null),(-1!==["completed","started"].indexOf(t)||n)&&React.createElement(qe,null),React.createElement(P,null),r&&!n&&React.createElement(Se,null)))}}])&&dn(t.prototype,n),r&&dn(t,r),i}(i.Component),_n=Object(a.compose)([Object(u.withSelect)((function(e){var t=e("learnpress/quiz"),n=t.getQuestions,r=t.getData;return{questions:n(),status:r("status"),store:r(),answered:r("answered"),isReviewing:"reviewing"===r("mode"),questionIds:r("questionIds"),checkCount:r("instantCheck"),questionsPerPage:r("questionsPerPage")||1}})),Object(u.withDispatch)((function(e){var t=e("learnpress/quiz");return{setQuizData:t.setQuizData,startQuiz:t.startQuiz}}))])(wn);n(10);function jn(e){return function(e){if(Array.isArray(e))return Rn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Rn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var qn=LP.modal.default,Sn=(t.default=_n,function(e,t){wp.element.render(React.createElement(qn,null,React.createElement(_n,{settings:t})),jn(document.querySelectorAll(e))[0]),LP.Hook.doAction("lp-quiz-compatible-builder")})}]);
assets/js/dist/frontend/single-course.js CHANGED
@@ -172,7 +172,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
172
 
173
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
174
 
175
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
176
 
177
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
178
 
@@ -391,56 +391,56 @@ var purchaseCourse = function purchaseCourse() {
391
  };
392
 
393
  var retakeCourse = function retakeCourse() {
394
- var elFormRetakeCourse = document.querySelector('.lp-form-retake-course');
395
 
396
- if (!elFormRetakeCourse) {
397
  return;
398
  }
399
 
400
- var elButtonRetakeCourses = elFormRetakeCourse.querySelectorAll('.button-retake-course');
401
- var elCourseId = elFormRetakeCourse.querySelector('[name=retake-course]').value;
402
- var elAjaxMessage = elFormRetakeCourse.querySelector('.lp-ajax-message');
403
-
404
- var submit = function submit(elButtonRetakeCourse) {
405
- wp.apiFetch({
406
- path: '/lp/v1/courses/retake-course',
407
- method: 'POST',
408
- data: {
409
- id: elCourseId
410
- }
411
- }).then(function (res) {
412
- var status = res.status,
413
- message = res.message,
414
- data = res.data;
415
- elAjaxMessage.innerHTML = message;
416
-
417
- if (undefined != status && status === 'success') {
418
- elButtonRetakeCourse.style.display = 'none';
419
- setTimeout(function () {
420
- window.location.replace(data.url_redirect);
421
- }, 1000);
422
- } else {
 
 
 
 
423
  elAjaxMessage.classList.add('error');
424
- }
425
- })["catch"](function (err) {
426
- elAjaxMessage.classList.add('error');
427
- elAjaxMessage.innerHTML = 'error: ' + err.message;
428
- }).then(function () {
429
- elButtonRetakeCourse.classList.remove('loading');
430
- elButtonRetakeCourse.disabled = false;
431
- elAjaxMessage.style.display = 'block';
432
- });
433
- };
434
 
435
- elFormRetakeCourse.addEventListener('submit', function (e) {
436
- e.preventDefault();
437
- });
438
- elButtonRetakeCourses.forEach(function (element) {
439
- return element.addEventListener('click', function (e) {
440
  e.preventDefault();
441
- element.classList.add('loading');
442
- element.disabled = true;
443
- submit(element);
444
  });
445
  });
446
  }; // Rest API load content course progress - Nhamdv.
@@ -715,7 +715,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
715
 
716
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
717
 
718
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
719
 
720
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
721
 
@@ -728,7 +728,7 @@ var Sidebar = function Sidebar() {
728
  var $popup = $('#popup-course');
729
  var $curriculum = $('#learn-press-course-curriculum');
730
  var timerClearScroll;
731
- $('#sidebar-toggle').on('change', function (event) {
732
  LP.Cookies.set('sidebar-toggle', event.target.checked);
733
  toggleSidebar(event.target.checked);
734
  });
172
 
173
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
174
 
175
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
176
 
177
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
178
 
391
  };
392
 
393
  var retakeCourse = function retakeCourse() {
394
+ var elFormRetakeCourses = document.querySelectorAll('.lp-form-retake-course');
395
 
396
+ if (!elFormRetakeCourses.length) {
397
  return;
398
  }
399
 
400
+ elFormRetakeCourses.forEach(function (elFormRetakeCourse) {
401
+ var elButtonRetakeCourses = elFormRetakeCourse.querySelector('.button-retake-course');
402
+ var elCourseId = elFormRetakeCourse.querySelector('[name=retake-course]').value;
403
+ var elAjaxMessage = elFormRetakeCourse.querySelector('.lp-ajax-message');
404
+
405
+ var submit = function submit(elButtonRetakeCourse) {
406
+ wp.apiFetch({
407
+ path: '/lp/v1/courses/retake-course',
408
+ method: 'POST',
409
+ data: {
410
+ id: elCourseId
411
+ }
412
+ }).then(function (res) {
413
+ var status = res.status,
414
+ message = res.message,
415
+ data = res.data;
416
+ elAjaxMessage.innerHTML = message;
417
+
418
+ if (undefined != status && status === 'success') {
419
+ elButtonRetakeCourse.style.display = 'none';
420
+ setTimeout(function () {
421
+ window.location.replace(data.url_redirect);
422
+ }, 1000);
423
+ } else {
424
+ elAjaxMessage.classList.add('error');
425
+ }
426
+ })["catch"](function (err) {
427
  elAjaxMessage.classList.add('error');
428
+ elAjaxMessage.innerHTML = 'error: ' + err.message;
429
+ }).then(function () {
430
+ elButtonRetakeCourse.classList.remove('loading');
431
+ elButtonRetakeCourse.disabled = false;
432
+ elAjaxMessage.style.display = 'block';
433
+ });
434
+ };
 
 
 
435
 
436
+ elFormRetakeCourse.addEventListener('submit', function (e) {
437
+ e.preventDefault();
438
+ });
439
+ elButtonRetakeCourses.addEventListener('click', function (e) {
 
440
  e.preventDefault();
441
+ elButtonRetakeCourses.classList.add('loading');
442
+ elButtonRetakeCourses.disabled = true;
443
+ submit(elButtonRetakeCourses);
444
  });
445
  });
446
  }; // Rest API load content course progress - Nhamdv.
715
 
716
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
717
 
718
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
719
 
720
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
721
 
728
  var $popup = $('#popup-course');
729
  var $curriculum = $('#learn-press-course-curriculum');
730
  var timerClearScroll;
731
+ $(document).on('change', '#sidebar-toggle', function (event) {
732
  LP.Cookies.set('sidebar-toggle', event.target.checked);
733
  toggleSidebar(event.target.checked);
734
  });
assets/js/dist/frontend/single-course.min.js CHANGED
@@ -1 +1 @@
1
- this.LP=this.LP||{},this.LP.singleCourse=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=23)}({14:function(e,t){!function(){e.exports=this.LP.quiz}()},15:function(e,t){},2:function(e,t){e.exports=window.wp.element},23:function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return b})),n.d(t,"initCourseTabs",(function(){return w})),n.d(t,"initCourseSidebar",(function(){return S})),n.d(t,"enrollCourse",(function(){return C}));var r=n(2),o=(n(14),n(15),n(7));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(i,e);var t,n,r,o=c(i);function i(){return a(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){return React.createElement(React.Fragment,null)}}])&&s(t.prototype,n),r&&s(t,r),i}(r.Component);window.addEventListener("DOMContentLoaded",(function(){Object(o.a)()}));n(5);var p=n(4);function v(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)}))}}t.default=f;var b=function(){wp.element.render(React.createElement(f,null))},g=jQuery,w=function(){g("#learn-press-course-tabs").on("change",'input[name="learn-press-course-tab-radio"]',(function(e){var t=g('input[name="learn-press-course-tab-radio"]:checked').val();LP.Cookies.set("course-tab",t),g('label[for="'+g(e.target).attr("id")+'"]').closest("li").addClass("active").siblings().removeClass("active")}))},S=function(){var e=g(".course-summary-sidebar");if(e.length){var t=g(window),n=e.children(),r=e.offset(),o=e.height(),i=n.height(),a=32;t.on("scroll.fixed-course-sidebar",(function(){var s=t.scrollTop()-r.top+a;if(s<0)return e.removeClass("slide-top slide-down"),void n.css("top","");s>o-i?(e.removeClass("slide-down").addClass("slide-top"),n.css("top",o-i)):(e.removeClass("slide-top").addClass("slide-down"),n.css("top",a))})).trigger("scroll.fixed-course-sidebar")}},C=function(){var e=document.querySelectorAll("form.enroll-course");e.length>0&&e.forEach((function(e){var t=function(){var t=h(regeneratorRuntime.mark((function t(n,r){var o,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,wp.apiFetch({path:"lp/v1/courses/enroll-course",method:"POST",data:{id:n}});case 3:o=t.sent,r.classList.remove("loading"),r.disabled=!1,i=o.status,a=o.data.redirect,(s=o.message)&&i&&(r.style.display="none",e.innerHTML+='<div class="lp-enroll-notice '.concat(i,'">').concat(s,"</div>"),a&&(window.location.href=a)),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),form.innerHTML+='<div class="lp-enroll-notice error">'.concat(t.t0.message&&t.t0.message,"</div>");case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}();e.addEventListener("submit",(function(n){n.preventDefault();var r=e.querySelector("input[name=enroll-course]").value,o=e.querySelector("button.button-enroll-course");o.classList.add("loading"),o.disabled=!0,t(r,o)}))})),null!==document.querySelector(".course-detail-info")&&window.addEventListener("pageshow",(function(e){(e.persisted||void 0!==window.performance&&"back_forward"==String(window.performance.getEntriesByType("navigation")[0].type))&&location.reload()}))},L=function(){var e=document.querySelector(".lp-form-retake-course");if(e){var t=e.querySelectorAll(".button-retake-course"),n=e.querySelector("[name=retake-course]").value,r=e.querySelector(".lp-ajax-message");e.addEventListener("submit",(function(e){e.preventDefault()})),t.forEach((function(e){return e.addEventListener("click",(function(t){var o;t.preventDefault(),e.classList.add("loading"),e.disabled=!0,o=e,wp.apiFetch({path:"/lp/v1/courses/retake-course",method:"POST",data:{id:n}}).then((function(e){var t=e.status,n=e.message,i=e.data;r.innerHTML=n,null!=t&&"success"===t?(o.style.display="none",setTimeout((function(){window.location.replace(i.url_redirect)}),1e3)):r.classList.add("error")})).catch((function(e){r.classList.add("error"),r.innerHTML="error: "+e.message})).then((function(){o.classList.remove("loading"),o.disabled=!1,r.style.display="block"}))}))}))}};g(window).on("load",(function(){var e;g("#popup-course"),g("#learn-press-course-curriculum");v(document.querySelectorAll(".course-extra-box")).map((function(e){var t=e.querySelector(".course-extra-box__title");t.addEventListener("click",(function(){var n=t.nextElementSibling,r=document.querySelector(".course-extra-box.active");r&&!e.classList.contains("active")&&(r.classList.remove("active"),r.querySelector(".course-extra-box__content").style.display="none"),e.classList.contains("active")?(e.classList.remove("active"),n.style.display="none"):(e.classList.add("active"),n.style.display="block")}))})),w(),S(),C(),(e=document.querySelectorAll("form.purchase-course")).length>0&&e.forEach((function(e){var t=function(){var t=h(regeneratorRuntime.mark((function t(n,r){var o,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,wp.apiFetch({path:"lp/v1/courses/purchase-course",method:"POST",data:{id:n}});case 3:o=t.sent,r.classList.remove("loading"),r.disabled=!1,i=o.status,a=o.data.redirect,(s=o.message)&&i&&(e.innerHTML+='<div class="lp-enroll-notice '.concat(i,'">').concat(s,"</div>"),"success"===i&&a&&(window.location.href=a)),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),e.innerHTML+='<div class="lp-enroll-notice error">'.concat(t.t0.message&&t.t0.message,"</div>");case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}();e.addEventListener("submit",(function(n){n.preventDefault();var r=e.querySelector("input[name=purchase-course]").value,o=e.querySelector("button.button-purchase-course");o.classList.add("loading"),o.disabled=!0,t(r,o)}))})),L(),function(){var e=document.querySelectorAll(".lp-course-progress-wrapper");if(e.length){if("IntersectionObserver"in window){var t=new IntersectionObserver((function(e,r){e.forEach((function(e){if(e.isIntersecting){var r=e.target;setTimeout((function(){n(r)}),600),t.unobserve(r)}}))}));v(e).map((function(e){return t.observe(e)}))}var n=function(){var e=h(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiFetch({path:"lp/v1/lazy-load/course-progress",method:"POST",data:{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}});case 2:n=e.sent,r=n.data,t.innerHTML=r;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}(),p.a.init()}))},4:function(e,t,n){"use strict";var r=jQuery,o=null,i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(o=this.elLPOverlay,this.elMainContent=o.find(".main-content"),this.elTitle=o.find(".modal-title"),this.elBtnYes=o.find(".btn-yes"),this.elBtnNo=o.find(".btn-no"),this.elFooter=o.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){o.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},a=i,s=(jQuery,{elBtnFinishCourse:null,elBtnCompleteItem:null,init:function(){a.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title),a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),a.callBackYes=function(){t.submit()}})),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach((function(e){return e.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title),a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),a.callBackYes=function(){t.submit()}}))})))}});t.a=s},5:function(e,t){e.exports=window.wp.url},7:function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return s}));var i=jQuery,a=lodash.throttle,s=function(){var e,t=i("#popup-course"),n=i("#learn-press-course-curriculum");i("#sidebar-toggle").on("change",(function(e){LP.Cookies.set("sidebar-toggle",e.target.checked),o(e.target.checked)}));var o=function(e){i("body").removeClass("lp-sidebar-toggle__open"),i("body").removeClass("lp-sidebar-toggle__close"),e?i("body").addClass("lp-sidebar-toggle__close"):i("body").addClass("lp-sidebar-toggle__open")};o(LP.Cookies.get("sidebar-toggle")),n.find(".section-desc").each((function(e,t){var n=i('<span class="show-desc"></span>').on("click",(function(){r.toggleClass("c")})),r=i(t).siblings(".section-title").append(n)})),i(".section").each((function(){var e=i(this);e.find(".section-left").on("click",(function(){var t=e.toggleClass("closed").hasClass("closed"),n=LP.Cookies.get("closed-section-"+lpGlobalSettings.post_id)||[],o=parseInt(e.data("section-id")),i=n.findIndex((function(e){return e==o}));t?n.push(parseInt(e.data("section-id"))):n.splice(i,1),LP.Cookies.remove("closed-section-(.*)"),LP.Cookies.set("closed-section-"+lpGlobalSettings.post_id,r(new Set(n)))}))})),t.length&&(n.on("scroll",a((function(){var t=i(this);t.addClass("scrolling"),e&&clearTimeout(e),e=setTimeout((function(){t.removeClass("scrolling")}),1e3)}),500)),LP.toElement(".course-item.current",{container:".curriculum-scrollable:eq(1)",offset:100,duration:1}))}}});
1
+ this.LP=this.LP||{},this.LP.singleCourse=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=23)}({14:function(e,t){!function(){e.exports=this.LP.quiz}()},15:function(e,t){},2:function(e,t){e.exports=window.wp.element},23:function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return b})),n.d(t,"initCourseTabs",(function(){return w})),n.d(t,"initCourseSidebar",(function(){return S})),n.d(t,"enrollCourse",(function(){return C}));var r=n(2),o=(n(14),n(15),n(7));function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(i,e);var t,n,r,o=c(i);function i(){return a(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){return React.createElement(React.Fragment,null)}}])&&s(t.prototype,n),r&&s(t,r),i}(r.Component);window.addEventListener("DOMContentLoaded",(function(){Object(o.a)()}));n(5);var p=n(4);function v(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return m(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function h(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){y(i,r,o,a,s,"next",e)}function s(e){y(i,r,o,a,s,"throw",e)}a(void 0)}))}}t.default=f;var b=function(){wp.element.render(React.createElement(f,null))},g=jQuery,w=function(){g("#learn-press-course-tabs").on("change",'input[name="learn-press-course-tab-radio"]',(function(e){var t=g('input[name="learn-press-course-tab-radio"]:checked').val();LP.Cookies.set("course-tab",t),g('label[for="'+g(e.target).attr("id")+'"]').closest("li").addClass("active").siblings().removeClass("active")}))},S=function(){var e=g(".course-summary-sidebar");if(e.length){var t=g(window),n=e.children(),r=e.offset(),o=e.height(),i=n.height(),a=32;t.on("scroll.fixed-course-sidebar",(function(){var s=t.scrollTop()-r.top+a;if(s<0)return e.removeClass("slide-top slide-down"),void n.css("top","");s>o-i?(e.removeClass("slide-down").addClass("slide-top"),n.css("top",o-i)):(e.removeClass("slide-top").addClass("slide-down"),n.css("top",a))})).trigger("scroll.fixed-course-sidebar")}},C=function(){var e=document.querySelectorAll("form.enroll-course");e.length>0&&e.forEach((function(e){var t=function(){var t=h(regeneratorRuntime.mark((function t(n,r){var o,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,wp.apiFetch({path:"lp/v1/courses/enroll-course",method:"POST",data:{id:n}});case 3:o=t.sent,r.classList.remove("loading"),r.disabled=!1,i=o.status,a=o.data.redirect,(s=o.message)&&i&&(r.style.display="none",e.innerHTML+='<div class="lp-enroll-notice '.concat(i,'">').concat(s,"</div>"),a&&(window.location.href=a)),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),form.innerHTML+='<div class="lp-enroll-notice error">'.concat(t.t0.message&&t.t0.message,"</div>");case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}();e.addEventListener("submit",(function(n){n.preventDefault();var r=e.querySelector("input[name=enroll-course]").value,o=e.querySelector("button.button-enroll-course");o.classList.add("loading"),o.disabled=!0,t(r,o)}))})),null!==document.querySelector(".course-detail-info")&&window.addEventListener("pageshow",(function(e){(e.persisted||void 0!==window.performance&&"back_forward"==String(window.performance.getEntriesByType("navigation")[0].type))&&location.reload()}))},L=function(){var e=document.querySelectorAll(".lp-form-retake-course");e.length&&e.forEach((function(e){var t=e.querySelector(".button-retake-course"),n=e.querySelector("[name=retake-course]").value,r=e.querySelector(".lp-ajax-message");e.addEventListener("submit",(function(e){e.preventDefault()})),t.addEventListener("click",(function(e){var o;e.preventDefault(),t.classList.add("loading"),t.disabled=!0,o=t,wp.apiFetch({path:"/lp/v1/courses/retake-course",method:"POST",data:{id:n}}).then((function(e){var t=e.status,n=e.message,i=e.data;r.innerHTML=n,null!=t&&"success"===t?(o.style.display="none",setTimeout((function(){window.location.replace(i.url_redirect)}),1e3)):r.classList.add("error")})).catch((function(e){r.classList.add("error"),r.innerHTML="error: "+e.message})).then((function(){o.classList.remove("loading"),o.disabled=!1,r.style.display="block"}))}))}))};g(window).on("load",(function(){var e;g("#popup-course"),g("#learn-press-course-curriculum");v(document.querySelectorAll(".course-extra-box")).map((function(e){var t=e.querySelector(".course-extra-box__title");t.addEventListener("click",(function(){var n=t.nextElementSibling,r=document.querySelector(".course-extra-box.active");r&&!e.classList.contains("active")&&(r.classList.remove("active"),r.querySelector(".course-extra-box__content").style.display="none"),e.classList.contains("active")?(e.classList.remove("active"),n.style.display="none"):(e.classList.add("active"),n.style.display="block")}))})),w(),S(),C(),(e=document.querySelectorAll("form.purchase-course")).length>0&&e.forEach((function(e){var t=function(){var t=h(regeneratorRuntime.mark((function t(n,r){var o,i,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,wp.apiFetch({path:"lp/v1/courses/purchase-course",method:"POST",data:{id:n}});case 3:o=t.sent,r.classList.remove("loading"),r.disabled=!1,i=o.status,a=o.data.redirect,(s=o.message)&&i&&(e.innerHTML+='<div class="lp-enroll-notice '.concat(i,'">').concat(s,"</div>"),"success"===i&&a&&(window.location.href=a)),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),e.innerHTML+='<div class="lp-enroll-notice error">'.concat(t.t0.message&&t.t0.message,"</div>");case 13:case"end":return t.stop()}}),t,null,[[0,10]])})));return function(e,n){return t.apply(this,arguments)}}();e.addEventListener("submit",(function(n){n.preventDefault();var r=e.querySelector("input[name=purchase-course]").value,o=e.querySelector("button.button-purchase-course");o.classList.add("loading"),o.disabled=!0,t(r,o)}))})),L(),function(){var e=document.querySelectorAll(".lp-course-progress-wrapper");if(e.length){if("IntersectionObserver"in window){var t=new IntersectionObserver((function(e,r){e.forEach((function(e){if(e.isIntersecting){var r=e.target;setTimeout((function(){n(r)}),600),t.unobserve(r)}}))}));v(e).map((function(e){return t.observe(e)}))}var n=function(){var e=h(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiFetch({path:"lp/v1/lazy-load/course-progress",method:"POST",data:{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}});case 2:n=e.sent,r=n.data,t.innerHTML=r;case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}}(),p.a.init()}))},4:function(e,t,n){"use strict";var r=jQuery,o=null,i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(o=this.elLPOverlay,this.elMainContent=o.find(".main-content"),this.elTitle=o.find(".modal-title"),this.elBtnYes=o.find(".btn-yes"),this.elBtnNo=o.find(".btn-no"),this.elFooter=o.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){o.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},a=i,s=(jQuery,{elBtnFinishCourse:null,elBtnCompleteItem:null,init:function(){a.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title),a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),a.callBackYes=function(){t.submit()}})),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach((function(e){return e.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");a.elLPOverlay.show(),a.setTitleModal(t.dataset.title),a.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),a.callBackYes=function(){t.submit()}}))})))}});t.a=s},5:function(e,t){e.exports=window.wp.url},7:function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return s}));var i=jQuery,a=lodash.throttle,s=function(){var e,t=i("#popup-course"),n=i("#learn-press-course-curriculum");i(document).on("change","#sidebar-toggle",(function(e){LP.Cookies.set("sidebar-toggle",e.target.checked),o(e.target.checked)}));var o=function(e){i("body").removeClass("lp-sidebar-toggle__open"),i("body").removeClass("lp-sidebar-toggle__close"),e?i("body").addClass("lp-sidebar-toggle__close"):i("body").addClass("lp-sidebar-toggle__open")};o(LP.Cookies.get("sidebar-toggle")),n.find(".section-desc").each((function(e,t){var n=i('<span class="show-desc"></span>').on("click",(function(){r.toggleClass("c")})),r=i(t).siblings(".section-title").append(n)})),i(".section").each((function(){var e=i(this);e.find(".section-left").on("click",(function(){var t=e.toggleClass("closed").hasClass("closed"),n=LP.Cookies.get("closed-section-"+lpGlobalSettings.post_id)||[],o=parseInt(e.data("section-id")),i=n.findIndex((function(e){return e==o}));t?n.push(parseInt(e.data("section-id"))):n.splice(i,1),LP.Cookies.remove("closed-section-(.*)"),LP.Cookies.set("closed-section-"+lpGlobalSettings.post_id,r(new Set(n)))}))})),t.length&&(n.on("scroll",a((function(){var t=i(this);t.addClass("scrolling"),e&&clearTimeout(e),e=setTimeout((function(){t.removeClass("scrolling")}),1e3)}),500)),LP.toElement(".course-item.current",{container:".curriculum-scrollable:eq(1)",offset:100,duration:1}))}}});
assets/js/dist/frontend/single-curriculum.js CHANGED
@@ -249,7 +249,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
249
 
250
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
251
 
252
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
253
 
254
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
255
 
@@ -352,7 +352,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
352
 
353
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
354
 
355
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
356
 
357
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
358
 
@@ -559,7 +559,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
559
 
560
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
561
 
562
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
563
 
564
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
565
 
@@ -572,7 +572,7 @@ var Sidebar = function Sidebar() {
572
  var $popup = $('#popup-course');
573
  var $curriculum = $('#learn-press-course-curriculum');
574
  var timerClearScroll;
575
- $('#sidebar-toggle').on('change', function (event) {
576
  LP.Cookies.set('sidebar-toggle', event.target.checked);
577
  toggleSidebar(event.target.checked);
578
  });
@@ -728,8 +728,8 @@ window.addEventListener('DOMContentLoaded', function () {
728
  LP.Hook.doAction('lp-compatible-builder');
729
  Object(_components_search__WEBPACK_IMPORTED_MODULE_1__["searchCourseContent"])();
730
  Object(_components_sidebar__WEBPACK_IMPORTED_MODULE_2__["Sidebar"])();
731
- Object(_components_progress__WEBPACK_IMPORTED_MODULE_3__["progressBar"])();
732
- Object(_components_comment__WEBPACK_IMPORTED_MODULE_4__["commentForm"])();
733
  Object(_components_items_progress__WEBPACK_IMPORTED_MODULE_5__["itemsProgress"])(); // Check duration expire of course
734
 
735
  var singleCurriculums = new SingleCurriculums();
249
 
250
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
251
 
252
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
253
 
254
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
255
 
352
 
353
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
354
 
355
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
356
 
357
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
358
 
559
 
560
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
561
 
562
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
563
 
564
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
565
 
572
  var $popup = $('#popup-course');
573
  var $curriculum = $('#learn-press-course-curriculum');
574
  var timerClearScroll;
575
+ $(document).on('change', '#sidebar-toggle', function (event) {
576
  LP.Cookies.set('sidebar-toggle', event.target.checked);
577
  toggleSidebar(event.target.checked);
578
  });
728
  LP.Hook.doAction('lp-compatible-builder');
729
  Object(_components_search__WEBPACK_IMPORTED_MODULE_1__["searchCourseContent"])();
730
  Object(_components_sidebar__WEBPACK_IMPORTED_MODULE_2__["Sidebar"])();
731
+ Object(_components_progress__WEBPACK_IMPORTED_MODULE_3__["progressBar"])(); //commentForm();
732
+
733
  Object(_components_items_progress__WEBPACK_IMPORTED_MODULE_5__["itemsProgress"])(); // Check duration expire of course
734
 
735
  var singleCurriculums = new SingleCurriculums();
assets/js/dist/frontend/single-curriculum.min.js CHANGED
@@ -1 +1 @@
1
- this.LP=this.LP||{},this.LP.singleCurriculum=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=22)}({10:function(e,t){function n(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}LP.Hook.addAction("lp-compatible-builder",(function(){LP.Hook.removeAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){Waypoint.refreshAll(),window.dispatchEvent(new Event("resize"))})),"undefined"!=typeof vc_js&&"undefined"!=typeof VcWaypoint&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){VcWaypoint.refreshAll()}))})),LP.Hook.addAction("lp-quiz-compatible-builder",(function(){return LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0})),LP.Hook.addAction("lp-question-compatible-builder",(function(){return LP.Hook.removeAction("lp-question-compatible-builder"),LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0}))},2:function(e,t){e.exports=window.wp.element},22:function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return g}));var r=n(2),o=n(7),i=jQuery,c=n(8);n(10);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}jQuery;var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(i,e);var t,n,r,o=f(i);function i(){return u(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"checkCourseDurationExpire",value:function(){var e=document.getElementsByName("lp-course-timestamp-remaining");if(e.length){var t=e[0].value;t<86400&&setTimeout((function(){window.location.reload(!0)}),1e3*t)}}},{key:"render",value:function(){return React.createElement("div",null)}}])&&a(t.prototype,n),r&&a(t,r),i}(r.Component),y=m;window.addEventListener("DOMContentLoaded",(function(){LP.Hook.doAction("lp-compatible-builder"),function(){var e=document.querySelector("#popup-course"),t=document.querySelector("#learn-press-course-curriculum");if(e&&t){var n=t.querySelector(".curriculum-sections"),r=e.querySelector(".search-course"),o=e.querySelector('.search-course input[type="text"]');if(!o||!n||!r)return;var i=n.querySelectorAll("li.section"),c=n.querySelectorAll("li.course-item"),l=[];c.forEach((function(e){var t=e.dataset.id,n=e.querySelector(".item-name");l.push({id:t,name:n?n.textContent.toLowerCase():""})}));var u=function(e){e.preventDefault();var t=o.value;r.classList.add("searching"),t||r.classList.remove("searching");var n=[];l.forEach((function(e){t&&!e.name.match(t.toLowerCase())||(n.push(e.id),c.forEach((function(e){-1!==n.indexOf(e.dataset.id)?e.classList.remove("hide-if-js"):e.classList.add("hide-if-js")})))})),i.forEach((function(e){var t=e.querySelectorAll(".course-item"),r=[];t.forEach((function(e){n.includes(e.dataset.id)&&r.push(e.dataset.id)})),0===r.length?e.classList.add("hide-if-js"):e.classList.remove("hide-if-js")}))},a=r.querySelector(".clear");a&&a.addEventListener("click",(function(e){e.preventDefault(),o.value="",u(e)})),r.addEventListener("submit",u),o.addEventListener("keyup",u)}}(),Object(o.a)(),i(".learn-press-progress").each((function(){var e=i(this).find(".learn-press-progress__active"),t=e.data("value");void 0!==t&&e.css("left",-(100-parseInt(t))+"%")})),function(){var e=document.querySelector(".lp-lesson-comment-btn");if(e){var t=e.textContent,n=e.dataset.close;window.location.hash.includes("comment")&&e.parentNode.classList.add("open-comments");var r=function(e,r){r.classList.contains("open-comments")?e.textContent=n:e.textContent=t};r(e,e.parentNode),e.addEventListener("click",(function(t){t.preventDefault(),e.parentNode.classList.toggle("open-comments"),r(e,e.parentNode)}))}}(),Object(c.b)(),(new m).checkCourseDurationExpire()}));var v=n(4),h=jQuery,b={init:function(){this.scrollToItemViewing=function(){var e=h(".viewing-course-item");if(e.length){var t=h("#popup-sidebar").outerHeight(),n=h(".section-title").outerHeight(),r=h(".section-header").outerHeight(),o=new RegExp("^viewing-course-item-([0-9].*)"),i=e.attr("class").split(/\s+/),c=0;if(h.each(i,(function(e,t){var n=o.exec(t);if(n)return c=n[1],!1})),0===c)return;var l=h(".course-item-"+c).offset().top-t;void 0===n?l=l-r+20:l-=n,h("#learn-press-course-curriculum").animate({scrollTop:l+300},800)}},this.scrollToItemViewing()}},g=(jQuery,t.default=y,function(){wp.element.render(React.createElement(y,null),document.getElementById("learn-press-course-curriculum"))});document.addEventListener("DOMContentLoaded",(function(e){LP.Hook.doAction("course-ready"),v.a.init(),b.init()}))},4:function(e,t,n){"use strict";var r=jQuery,o=null,i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(o=this.elLPOverlay,this.elMainContent=o.find(".main-content"),this.elTitle=o.find(".modal-title"),this.elBtnYes=o.find(".btn-yes"),this.elBtnNo=o.find(".btn-no"),this.elFooter=o.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){o.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},c=i,l=(jQuery,{elBtnFinishCourse:null,elBtnCompleteItem:null,init:function(){c.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");c.elLPOverlay.show(),c.setTitleModal(t.dataset.title),c.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),c.callBackYes=function(){t.submit()}})),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach((function(e){return e.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");c.elLPOverlay.show(),c.setTitleModal(t.dataset.title),c.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),c.callBackYes=function(){t.submit()}}))})))}});t.a=l},5:function(e,t){e.exports=window.wp.url},7:function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return l}));var i=jQuery,c=lodash.throttle,l=function(){var e,t=i("#popup-course"),n=i("#learn-press-course-curriculum");i("#sidebar-toggle").on("change",(function(e){LP.Cookies.set("sidebar-toggle",e.target.checked),o(e.target.checked)}));var o=function(e){i("body").removeClass("lp-sidebar-toggle__open"),i("body").removeClass("lp-sidebar-toggle__close"),e?i("body").addClass("lp-sidebar-toggle__close"):i("body").addClass("lp-sidebar-toggle__open")};o(LP.Cookies.get("sidebar-toggle")),n.find(".section-desc").each((function(e,t){var n=i('<span class="show-desc"></span>').on("click",(function(){r.toggleClass("c")})),r=i(t).siblings(".section-title").append(n)})),i(".section").each((function(){var e=i(this);e.find(".section-left").on("click",(function(){var t=e.toggleClass("closed").hasClass("closed"),n=LP.Cookies.get("closed-section-"+lpGlobalSettings.post_id)||[],o=parseInt(e.data("section-id")),i=n.findIndex((function(e){return e==o}));t?n.push(parseInt(e.data("section-id"))):n.splice(i,1),LP.Cookies.remove("closed-section-(.*)"),LP.Cookies.set("closed-section-"+lpGlobalSettings.post_id,r(new Set(n)))}))})),t.length&&(n.on("scroll",c((function(){var t=i(this);t.addClass("scrolling"),e&&clearTimeout(e),e=setTimeout((function(){t.removeClass("scrolling")}),1e3)}),500)),LP.toElement(".course-item.current",{container:".curriculum-scrollable:eq(1)",offset:100,duration:1}))}},8:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return a}));var r=n(5),o=n(4);function i(e,t,n,r,o,i,c){try{var l=e[i](c),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,o)}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var u=function(){var e=document.querySelectorAll(".popup-header__inner");if(e.length&&null===document.querySelector("#learn-press-quiz-app div.quiz-result")&&"IntersectionObserver"in window){var t=new IntersectionObserver((function(e,n){e.forEach((function(e){if(e.isIntersecting){var n=e.target;a(n),t.unobserve(n)}}))}));c(e).map((function(e){return t.observe(e)}))}},a=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiFetch({path:Object(r.addQueryArgs)("lp/v1/lazy-load/items-progress",{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}),method:"GET"});case 2:n=e.sent,i=n.data,t.innerHTML+=i,o.a.init();case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function l(e){i(c,r,o,l,u,"next",e)}function u(e){i(c,r,o,l,u,"throw",e)}l(void 0)}))});return function(e){return t.apply(this,arguments)}}()}});
1
+ this.LP=this.LP||{},this.LP.singleCurriculum=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=22)}({10:function(e,t){function n(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}LP.Hook.addAction("lp-compatible-builder",(function(){LP.Hook.removeAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){Waypoint.refreshAll(),window.dispatchEvent(new Event("resize"))})),"undefined"!=typeof vc_js&&"undefined"!=typeof VcWaypoint&&n(document.querySelectorAll("#popup-content"))[0].addEventListener("scroll",(function(){VcWaypoint.refreshAll()}))})),LP.Hook.addAction("lp-quiz-compatible-builder",(function(){return LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0})),LP.Hook.addAction("lp-question-compatible-builder",(function(){return LP.Hook.removeAction("lp-question-compatible-builder"),LP.Hook.removeAction("lp-quiz-compatible-builder"),LP.Hook.doAction("lp-compatible-builder"),"undefined"!=typeof elementorFrontend?window.elementorFrontend.init():"undefined"!=typeof vc_js?("undefined"!=typeof vc_round_charts&&vc_round_charts(),"undefined"!=typeof vc_pieChart&&vc_pieChart(),"undefined"!=typeof vc_line_charts&&vc_line_charts(),window.vc_js()):void 0}))},2:function(e,t){e.exports=window.wp.element},22:function(e,t,n){"use strict";n.r(t),n.d(t,"init",(function(){return g}));var r=n(2),o=n(7),i=jQuery,l=n(8);n(10);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}jQuery;var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(i,e);var t,n,r,o=f(i);function i(){return u(this,i),o.apply(this,arguments)}return t=i,(n=[{key:"checkCourseDurationExpire",value:function(){var e=document.getElementsByName("lp-course-timestamp-remaining");if(e.length){var t=e[0].value;t<86400&&setTimeout((function(){window.location.reload(!0)}),1e3*t)}}},{key:"render",value:function(){return React.createElement("div",null)}}])&&a(t.prototype,n),r&&a(t,r),i}(r.Component),y=m;window.addEventListener("DOMContentLoaded",(function(){LP.Hook.doAction("lp-compatible-builder"),function(){var e=document.querySelector("#popup-course"),t=document.querySelector("#learn-press-course-curriculum");if(e&&t){var n=t.querySelector(".curriculum-sections"),r=e.querySelector(".search-course"),o=e.querySelector('.search-course input[type="text"]');if(!o||!n||!r)return;var i=n.querySelectorAll("li.section"),l=n.querySelectorAll("li.course-item"),c=[];l.forEach((function(e){var t=e.dataset.id,n=e.querySelector(".item-name");c.push({id:t,name:n?n.textContent.toLowerCase():""})}));var u=function(e){e.preventDefault();var t=o.value;r.classList.add("searching"),t||r.classList.remove("searching");var n=[];c.forEach((function(e){t&&!e.name.match(t.toLowerCase())||(n.push(e.id),l.forEach((function(e){-1!==n.indexOf(e.dataset.id)?e.classList.remove("hide-if-js"):e.classList.add("hide-if-js")})))})),i.forEach((function(e){var t=e.querySelectorAll(".course-item"),r=[];t.forEach((function(e){n.includes(e.dataset.id)&&r.push(e.dataset.id)})),0===r.length?e.classList.add("hide-if-js"):e.classList.remove("hide-if-js")}))},a=r.querySelector(".clear");a&&a.addEventListener("click",(function(e){e.preventDefault(),o.value="",u(e)})),r.addEventListener("submit",u),o.addEventListener("keyup",u)}}(),Object(o.a)(),i(".learn-press-progress").each((function(){var e=i(this).find(".learn-press-progress__active"),t=e.data("value");void 0!==t&&e.css("left",-(100-parseInt(t))+"%")})),Object(l.b)(),(new m).checkCourseDurationExpire()}));var v=n(4),h=jQuery,b={init:function(){this.scrollToItemViewing=function(){var e=h(".viewing-course-item");if(e.length){var t=h("#popup-sidebar").outerHeight(),n=h(".section-title").outerHeight(),r=h(".section-header").outerHeight(),o=new RegExp("^viewing-course-item-([0-9].*)"),i=e.attr("class").split(/\s+/),l=0;if(h.each(i,(function(e,t){var n=o.exec(t);if(n)return l=n[1],!1})),0===l)return;var c=h(".course-item-"+l).offset().top-t;void 0===n?c=c-r+20:c-=n,h("#learn-press-course-curriculum").animate({scrollTop:c+300},800)}},this.scrollToItemViewing()}},g=(jQuery,t.default=y,function(){wp.element.render(React.createElement(y,null),document.getElementById("learn-press-course-curriculum"))});document.addEventListener("DOMContentLoaded",(function(e){LP.Hook.doAction("course-ready"),v.a.init(),b.init()}))},4:function(e,t,n){"use strict";var r=jQuery,o=null,i={elLPOverlay:null,elMainContent:null,elTitle:null,elBtnYes:null,elBtnNo:null,elFooter:null,elCalledModal:null,callBackYes:null,instance:null,init:function(){return!!this.instance||(this.elLPOverlay=r(".lp-overlay"),!!this.elLPOverlay.length&&(o=this.elLPOverlay,this.elMainContent=o.find(".main-content"),this.elTitle=o.find(".modal-title"),this.elBtnYes=o.find(".btn-yes"),this.elBtnNo=o.find(".btn-no"),this.elFooter=o.find(".lp-modal-footer"),r(document).on("click",".close, .btn-no",(function(){o.hide()})),r(document).on("click",".btn-yes",(function(e){e.preventDefault(),e.stopPropagation(),"function"==typeof i.callBackYes&&i.callBackYes()})),this.instance=this,!0))},setElCalledModal:function(e){this.elCalledModal=e},setContentModal:function(e,t){this.elMainContent.html(e),"function"==typeof t&&t()},setTitleModal:function(e){this.elTitle.html(e)}},l=i,c=(jQuery,{elBtnFinishCourse:null,elBtnCompleteItem:null,init:function(){l.init()&&void 0!==lpGlobalSettings&&"yes"===lpGlobalSettings.option_enable_popup_confirm_finish&&(this.elBtnFinishCourse=document.querySelectorAll(".lp-btn-finish-course"),this.elBtnCompleteItem=document.querySelector(".lp-btn-complete-item"),this.elBtnCompleteItem&&this.elBtnCompleteItem.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");l.elLPOverlay.show(),l.setTitleModal(t.dataset.title),l.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),l.callBackYes=function(){t.submit()}})),this.elBtnFinishCourse&&this.elBtnFinishCourse.forEach((function(e){return e.addEventListener("click",(function(e){e.preventDefault();var t=e.target.closest("form");l.elLPOverlay.show(),l.setTitleModal(t.dataset.title),l.setContentModal('<div class="pd-2em">'+t.dataset.confirm+"</div>"),l.callBackYes=function(){t.submit()}}))})))}});t.a=c},5:function(e,t){e.exports=window.wp.url},7:function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return c}));var i=jQuery,l=lodash.throttle,c=function(){var e,t=i("#popup-course"),n=i("#learn-press-course-curriculum");i(document).on("change","#sidebar-toggle",(function(e){LP.Cookies.set("sidebar-toggle",e.target.checked),o(e.target.checked)}));var o=function(e){i("body").removeClass("lp-sidebar-toggle__open"),i("body").removeClass("lp-sidebar-toggle__close"),e?i("body").addClass("lp-sidebar-toggle__close"):i("body").addClass("lp-sidebar-toggle__open")};o(LP.Cookies.get("sidebar-toggle")),n.find(".section-desc").each((function(e,t){var n=i('<span class="show-desc"></span>').on("click",(function(){r.toggleClass("c")})),r=i(t).siblings(".section-title").append(n)})),i(".section").each((function(){var e=i(this);e.find(".section-left").on("click",(function(){var t=e.toggleClass("closed").hasClass("closed"),n=LP.Cookies.get("closed-section-"+lpGlobalSettings.post_id)||[],o=parseInt(e.data("section-id")),i=n.findIndex((function(e){return e==o}));t?n.push(parseInt(e.data("section-id"))):n.splice(i,1),LP.Cookies.remove("closed-section-(.*)"),LP.Cookies.set("closed-section-"+lpGlobalSettings.post_id,r(new Set(n)))}))})),t.length&&(n.on("scroll",l((function(){var t=i(this);t.addClass("scrolling"),e&&clearTimeout(e),e=setTimeout((function(){t.removeClass("scrolling")}),1e3)}),500)),LP.toElement(".course-item.current",{container:".curriculum-scrollable:eq(1)",offset:100,duration:1}))}},8:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return a}));var r=n(5),o=n(4);function i(e,t,n,r,o,i,l){try{var c=e[i](l),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var u=function(){var e=document.querySelectorAll(".popup-header__inner");if(e.length&&null===document.querySelector("#learn-press-quiz-app div.quiz-result")&&"IntersectionObserver"in window){var t=new IntersectionObserver((function(e,n){e.forEach((function(e){if(e.isIntersecting){var n=e.target;a(n),t.unobserve(n)}}))}));l(e).map((function(e){return t.observe(e)}))}},a=function(){var e,t=(e=regeneratorRuntime.mark((function e(t){var n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,wp.apiFetch({path:Object(r.addQueryArgs)("lp/v1/lazy-load/items-progress",{courseId:lpGlobalSettings.post_id||"",userId:lpGlobalSettings.user_id||""}),method:"GET"});case 2:n=e.sent,i=n.data,t.innerHTML+=i,o.a.init();case 6:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var l=e.apply(t,n);function c(e){i(l,r,o,c,u,"next",e)}function u(e){i(l,r,o,c,u,"throw",e)}c(void 0)}))});return function(e){return t.apply(this,arguments)}}()}});
assets/js/dist/js/data-controls.js CHANGED
@@ -108,7 +108,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
108
 
109
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
110
 
111
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
112
 
113
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
114
 
108
 
109
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
110
 
111
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
112
 
113
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
114
 
assets/js/dist/js/data-controls.min.js CHANGED
@@ -1 +1 @@
1
- this.LP=this.LP||{},this.LP.dataControls=function(r){var t={};function e(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=r,e.c=t,e.d=function(r,t,n){e.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:n})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,t){if(1&t&&(r=e(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)e.d(n,o,function(t){return r[t]}.bind(null,o));return n},e.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,"a",t),t},e.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},e.p="",e(e.s=13)}({11:function(r,t){r.exports=window.wp.apiFetch},13:function(r,t,e){"use strict";e.r(t),e.d(t,"apiFetch",(function(){return c})),e.d(t,"select",(function(){return f})),e.d(t,"dispatch",(function(){return s})),e.d(t,"controls",(function(){return l}));var n=e(11),o=e.n(n);function u(r){return function(r){if(Array.isArray(r))return i(r)}(r)||function(r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r))return Array.from(r)}(r)||function(r,t){if(!r)return;if("string"==typeof r)return i(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(r);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(r,t)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var a=function(r){return r.isRegistryControl=!0,r},c=function(r){return{type:"API_FETCH",request:r}};function f(r,t){for(var e=arguments.length,n=new Array(e>2?e-2:0),o=2;o<e;o++)n[o-2]=arguments[o];return{type:"SELECT",storeKey:r,selectorName:t,args:n}}function s(r,t){for(var e=arguments.length,n=new Array(e>2?e-2:0),o=2;o<e;o++)n[o-2]=arguments[o];return{type:"DISPATCH",storeKey:r,actionName:t,args:n}}var l={API_FETCH:function(r){var t=r.request;return o()(t)},SELECT:a((function(r){return function(t){var e,n=t.storeKey,o=t.selectorName,i=t.args;return r.select(n)[o].hasResolver?function(r,t){var e=t.storeKey,n=t.selectorName,o=t.args;return new Promise((function(t){var u=function(){return r.select("").hasFinishedResolution(e,n,o)},i=function(){return r.select(e)[n].apply(null,o)},a=i();if(u())return t(a);var c=r.subscribe((function(){u()&&(c(),t(i()))}))}))}(r,{storeKey:n,selectorName:o,args:i}):(e=r.select(n))[o].apply(e,u(i))}})),DISPATCH:a((function(r){return function(t){var e,n=t.storeKey,o=t.actionName,i=t.args;return(e=r.dispatch(n))[o].apply(e,u(i))}}))}}});
1
+ this.LP=this.LP||{},this.LP.dataControls=function(r){var t={};function e(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=r,e.c=t,e.d=function(r,t,n){e.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:n})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,t){if(1&t&&(r=e(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)e.d(n,o,function(t){return r[t]}.bind(null,o));return n},e.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,"a",t),t},e.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},e.p="",e(e.s=13)}({11:function(r,t){r.exports=window.wp.apiFetch},13:function(r,t,e){"use strict";e.r(t),e.d(t,"apiFetch",(function(){return c})),e.d(t,"select",(function(){return f})),e.d(t,"dispatch",(function(){return s})),e.d(t,"controls",(function(){return l}));var n=e(11),o=e.n(n);function u(r){return function(r){if(Array.isArray(r))return i(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,t){if(!r)return;if("string"==typeof r)return i(r,t);var e=Object.prototype.toString.call(r).slice(8,-1);"Object"===e&&r.constructor&&(e=r.constructor.name);if("Map"===e||"Set"===e)return Array.from(r);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(r,t)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(r,t){(null==t||t>r.length)&&(t=r.length);for(var e=0,n=new Array(t);e<t;e++)n[e]=r[e];return n}var a=function(r){return r.isRegistryControl=!0,r},c=function(r){return{type:"API_FETCH",request:r}};function f(r,t){for(var e=arguments.length,n=new Array(e>2?e-2:0),o=2;o<e;o++)n[o-2]=arguments[o];return{type:"SELECT",storeKey:r,selectorName:t,args:n}}function s(r,t){for(var e=arguments.length,n=new Array(e>2?e-2:0),o=2;o<e;o++)n[o-2]=arguments[o];return{type:"DISPATCH",storeKey:r,actionName:t,args:n}}var l={API_FETCH:function(r){var t=r.request;return o()(t)},SELECT:a((function(r){return function(t){var e,n=t.storeKey,o=t.selectorName,i=t.args;return r.select(n)[o].hasResolver?function(r,t){var e=t.storeKey,n=t.selectorName,o=t.args;return new Promise((function(t){var u=function(){return r.select("").hasFinishedResolution(e,n,o)},i=function(){return r.select(e)[n].apply(null,o)},a=i();if(u())return t(a);var c=r.subscribe((function(){u()&&(c(),t(i()))}))}))}(r,{storeKey:n,selectorName:o,args:i}):(e=r.select(n))[o].apply(e,u(i))}})),DISPATCH:a((function(r){return function(t){var e,n=t.storeKey,o=t.actionName,i=t.args;return(e=r.dispatch(n))[o].apply(e,u(i))}}))}}});
assets/js/dist/utils.js CHANGED
@@ -507,7 +507,7 @@ __webpack_require__.r(__webpack_exports__);
507
  /* harmony import */ var _iframe_submit__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./iframe-submit */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/js/utils/iframe-submit.js");
508
  /* harmony import */ var _show_password__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./show-password */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/js/utils/show-password.js");
509
  /* harmony import */ var _show_password__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_show_password__WEBPACK_IMPORTED_MODULE_10__);
510
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
511
 
512
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
513
 
507
  /* harmony import */ var _iframe_submit__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./iframe-submit */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/js/utils/iframe-submit.js");
508
  /* harmony import */ var _show_password__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./show-password */ "../../../Clouds/Thimpress/Plugins/github.com/learnpress_v4_modify_step_install_after_activated/learnpress/assets/src/js/utils/show-password.js");
509
  /* harmony import */ var _show_password__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_show_password__WEBPACK_IMPORTED_MODULE_10__);
510
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
511
 
512
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
513
 
assets/js/dist/utils.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=13)}({10:function(module,__webpack_exports__,__webpack_require__){"use strict";var _this=void 0;function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var $=window.jQuery||jQuery,serializeJSON=function serializeJSON(path){var isInput=$(this).is("input")||$(this).is("select")||$(this).is("textarea"),unIndexed=isInput?$(this).serializeArray():$(this).find("input, select, textarea").serializeArray(),indexed={},validate=/(\[([a-zA-Z0-9_-]+)?\]?)/g,arrayKeys={},end=!1;if($.each(unIndexed,(function(){var that=this,match=this.name.match(/^([0-9a-zA-Z_-]+)/);if(match){var keys=this.name.match(validate),objPath="indexed['"+match[0]+"']";keys?("object"!=_typeof(indexed[match[0]])&&(indexed[match[0]]={}),$.each(keys,(function(i,prop){prop=prop.replace(/\]|\[/g,"");var rawPath=objPath.replace(/'|\[|\]/g,""),objExp="",preObjPath=objPath;""==prop?(null==arrayKeys[rawPath]?arrayKeys[rawPath]=0:arrayKeys[rawPath]++,objPath+="['"+arrayKeys[rawPath]+"']"):(isNaN(prop)||(arrayKeys[rawPath]=prop),objPath+="['"+prop+"']");try{i==keys.length-1?(objExp=objPath+"=that.value;",end=!0):(objExp=objPath+"={}",end=!1);var evalString="if( typeof "+objPath+" == 'undefined'){"+objExp+";}else{if(end){if(typeof "+preObjPath+"!='object'){"+preObjPath+"={};}"+objExp+"}}";eval(evalString)}catch(t){console.log("Error:"+t+"\n"+objExp)}}))):indexed[match[0]]=this.value}})),path){path="['"+path.replace(".","']['")+"']";var c="try{indexed = indexed"+path+"}catch(ex){console.log(c, ex);}";eval(c)}return indexed},LP_Tooltip=function(t){return t=$.extend({},{offset:[0,0]},t||{}),$.each(_this,(function(){var e=$(this),n=e.data("content");if(n&&void 0===e.data("LP_Tooltip")){var o=null;e.on("mouseenter",(function(i){o=$('<div class="learn-press-tooltip-bubble"/>').html(n).appendTo($("body")).hide();var r=e.offset();if(Array.isArray(t.offset)){var a=t.offset[1],s=t.offset[0];$.isNumeric(s)&&(r.left+=s),$.isNumeric(a)&&(r.top+=a)}o.css({top:r.top,left:r.left}),o.fadeIn()})),e.on("mouseleave",(function(t){o&&o.remove()})),e.data("tooltip",!0)}}))},hasEvent=function(t){var e=$(this).data("events");if(void 0===e.LP)return!1;for(i=0;i<e.LP.length;i++)if(e.LP[i].namespace==t)return!0;return!1},dataToJSON=function(){var t={};return $.each(this[0].attributes,(function(){var e=this.name.match(/^data-(.*)/);e&&(t[e[1]]=this.value)})),t},rows=function(){var t=$(this).height(),e=$(this).css("line-height").replace("px","");return $(this).attr({height:t,"line-height":e}),Math.floor(t/parseInt(e))},checkLines=function(t){return this.each((function(){var e=$(this).rows();t.call(this,e)}))},findNext=function(t){var e=$(t),n=this.first(),o=e.index(n),i=e.eq(o+1);return!!i.length&&i},findPrev=function(t){var e=$(t),n=this.first(),o=e.index(n),i=e.eq(o-1);return!!i.length&&i},progress=function(t){return this.each((function(){var e=parseInt(t/100*360),n=$(this);e<180?n.find(".progress-circle").removeClass("gt-50"):n.find(".progress-circle").addClass("gt-50"),n.find(".fill").css({transform:"rotate("+e+"deg)"})}))};$.fn.serializeJSON=serializeJSON,$.fn.LP_Tooltip=LP_Tooltip,$.fn.hasEvent=hasEvent,$.fn.dataToJSON=dataToJSON,$.fn.rows=rows,$.fn.checkLines=checkLines,$.fn.findNext=findNext,$.fn.findPrev=findPrev,$.fn.progress=progress;var _unused_webpack_default_export={serializeJSON:serializeJSON,LP_Tooltip:LP_Tooltip,hasEvent:hasEvent,dataToJSON:dataToJSON,rows:rows,checkLines:checkLines,findNext:findNext,findPrev:findPrev,progress:progress}},13:function(t,e,n){"use strict";n.r(e);var o,i=window.jQuery;void 0!==i&&(i.fn.LP=o=function(t,e){if("function"==typeof e)i.fn["LP_"+t]=e;else if(t){var n=[];if(arguments.length>1)for(var o=1;o<arguments.length;o++)n.push(arguments[o]);return"function"==typeof i(this)["LP_"+t]?i(this)["LP_"+t].apply(this,n):this}return this});var r=o,a=n(3),s=n.n(a),c=window.jQuery,l={$block:null,$window:null,events:{},instances:[],instance:null,quickConfirm:function(t,e){var n=c(t);c("[learn-press-quick-confirm]").each((function(){var t;(t=c(this).data("quick-confirm"))&&(console.log(t),t.destroy())})),!n.attr("learn-press-quick-confirm")&&n.attr("learn-press-quick-confirm","true").data("quick-confirm",new function(t,e){var n=c(t),o=c('<span class="learn-press-quick-confirm"></span>').insertAfter(n),i=c(t).position()||{left:0,top:0},r=null,a=null,s=3,l=function(){o.fadeOut("fast",(function(){c(this).remove(),o.parent().css("position","")})),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),u()},u=function(){a&&clearInterval(a),r&&clearInterval(r)},f=function(){r=setInterval((function(){0==--s&&(l.call(o[0]),"function"==typeof e.onCancel&&e.onCancel(e.data),u()),o.find("span").html(" ("+s+")")}),1e3),a=setInterval((function(){n.is(":visible")&&"hidden"!=n.css("visibility")||(u(),o.remove(),o.parent().css("position",""),"function"==typeof e.onCancel&&e.onCancel(e.data))}),350)};e=c.extend({message:"",data:null,onOk:null,onCancel:null,offset:{top:0,left:0}},e||{}),o.html(e.message||n.attr("data-confirm-remove")||"Are you sure?").append("<span> ("+s+")</span>").css({}),o.click((function(){"function"==typeof e.onOk&&e.onOk(e.data),l()})).hover((function(){u()}),(function(){f()})),o.css({left:i.left+n.outerWidth()-o.outerWidth()+e.offset.left,top:i.top+n.outerHeight()+e.offset.top+5}).hide().fadeIn("fast"),f(),this.destroy=function(){o.remove(),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),u()}}(t,e))},show:function(t,e){c.proxy((function(){e=c.extend({title:"",buttons:"",events:!1,autohide:!1,message:t,data:!1,id:LP.uniqueId(),onHide:null},e||{}),this.instances.push(e),this.instance=e;c(document);var n=c(document.body);this.$block||(this.$block=c('<div id="learn-press-message-box-block"></div>').appendTo(n)),this.$window||(this.$window=c('<div id="learn-press-message-box-window"><div id="message-box-wrap"></div> </div>').insertAfter(this.$block),this.$window.click((function(){}))),this._createWindow(t,e.title,e.buttons),this.$block.show(),this.$window.show().attr("instance",e.id),c(window).bind("resize.message-box",c.proxy(this.update,this)).bind("scroll.message-box",c.proxy(this.update,this)),this.update(!0),e.autohide&&setTimeout((function(){LP.MessageBox.hide(),"function"==typeof e.onHide&&e.onHide.call(LP.MessageBox,e)}),e.autohide)}),this)()},blockUI:function(t){t=(!1!==t?t||"Wait a moment":"")+'<div class="message-box-animation"></div>',this.show(t)},hide:function(t,e){e?this._removeInstance(e.id):this.instance&&this._removeInstance(this.instance.id),0===this.instances.length?(this.$block&&this.$block.hide(),this.$window&&this.$window.hide(),c(window).unbind("resize.message-box",this.update).unbind("scroll.message-box",this.update)):this.instance&&this._createWindow(this.instance.message,this.instance.title,this.instance.buttons)},update:function(t){var e=this,n=this.$window.find("#message-box-wrap"),o=n.data("timer"),i=function(){LP.Hook.doAction("learn_press_message_box_before_resize",e);var t=n.find(".message-box-content").css("height","").css("overflow","hidden"),o=(n.outerWidth(),n.outerHeight()),i=t.height(),r=c(window).height();n.offset().top;i>r-50?(t.css({height:r-25}),o=n.outerHeight()):t.css("height","").css("overflow",""),n.css({marginTop:(c(window).height()-o)/2}),LP.Hook.doAction("learn_press_message_box_resize",o,e)};t&&i(),o&&clearTimeout(o),o=setTimeout(i,250)},_removeInstance:function(t){for(var e=0;e<this.instances.length;e++)if(this.instances[e].id===t){this.instances.splice(e,1);var n=this.instances.length;n?(this.instance=this.instances[n-1],this.$window.attr("instance",this.instance.id)):(this.instance=!1,this.$window.removeAttr("instance"));break}},_getInstance:function(t){for(var e=0;e<this.instances.length;e++)if(this.instances[e].id===t)return this.instances[e]},_createWindow:function(t,e,n){var o=this.$window.find("#message-box-wrap").html("");if(e&&o.append('<h3 class="message-box-title">'+e+"</h3>"),o.append(c('<div class="message-box-content"></div>').html(t)),n){var i=c('<div class="message-box-buttons"></div>');switch(n){case"yesNo":i.append(this._createButton(LP_Settings.localize.button_yes,"yes")),i.append(this._createButton(LP_Settings.localize.button_no,"no"));break;case"okCancel":i.append(this._createButton(LP_Settings.localize.button_ok,"ok")),i.append(this._createButton(LP_Settings.localize.button_cancel,"cancel"));break;default:i.append(this._createButton(LP_Settings.localize.button_ok,"ok"))}o.append(i)}},_createButton:function(t,e){var n=c('<button type="button" class="button message-box-button message-box-button-'+e+'">'+t+"</button>"),o="on"+(e.substr(0,1).toUpperCase()+e.substr(1));return n.data("callback",o).click((function(){var t=c(this).data("instance"),e=t.events[c(this).data("callback")];"function"===c.type(e)&&!1===e.apply(LP.MessageBox,[t])||LP.MessageBox.hide(null,t)})).data("instance",this.instance),n}},u=function(t){var e={};window.jQuery;this.on=function(n,o){var i=n.split("."),r="";return i.length>1&&(n=i[0],r=i[1]),e[n]||(e[n]=[[],{}]),r?(e[n][1][r]||(e[n][1][r]=[]),e[n][1][r].push(o)):e[n][0].push(o),t},this.off=function(n,o){var i=n.split("."),r="";if(i.length>1&&(n=i[0],r=i[1]),!e[n])return t;var a=-1;if(r){if(!e[n][1][r])return t;if("function"==typeof o){if((a=e[n][1][r].indexOf(o))<0)return t;e[n][1][r].splice(a,1)}else e[n][1][r]=[]}else if("function"==typeof o){if((a=e[n][0].indexOf(o))<0)return t;e[n][0].splice(a,1)}else e[n][0]=[];return t},this.callEvent=function(n,o){if(e[n]){if(e[n][0])for(var i=0;i<e[n][0].length;i++)"function"==typeof e[n][0][i]&&e[n][i][0].apply(t,o);if(e[n][1])for(var i in e[n][1])for(var r=0;r<e[n][1][i].length;r++)"function"==typeof e[n][1][i][r]&&e[n][1][i][r].apply(t,o)}}},f={hooks:{action:{},filter:{}},addAction:function(t,e,n,o){return this.addHook("action",t,e,n,o),this},addFilter:function(t,e,n,o){return this.addHook("filter",t,e,n,o),this},doAction:function(t){return this.doHook("action",t,arguments)},applyFilters:function(t){return this.doHook("filter",t,arguments)},removeAction:function(t,e){return this.removeHook("action",t,e),this},removeFilter:function(t,e,n){return this.removeHook("filter",t,e,n),this},addHook:function(t,e,n,o,i){void 0===this.hooks[t][e]&&(this.hooks[t][e]=[]);var r=this.hooks[t][e];return void 0===i&&(i=e+"_"+r.length),this.hooks[t][e].push({tag:i,callable:n,priority:o}),this},doHook:function(t,e,n){if(n=Array.prototype.slice.call(n,1),void 0!==this.hooks[t][e]){var o,i=this.hooks[t][e];i.sort((function(t,e){return t.priority-e.priority}));for(var r=0;r<i.length;r++)"function"!=typeof(o=i[r].callable)&&(o=window[o]),"action"===t?n[r]=o.apply(null,n):n[0]=o.apply(null,n)}return"filter"===t?n[0]:n},removeHook:function(t,e,n,o){if(void 0!==this.hooks[t][e])for(var i=this.hooks[t][e],r=i.length-1;r>=0;r--)void 0!==o&&o!==i[r].tag||void 0!==n&&n!==i[r].priority||i.splice(r,1);return this}},p={get:function(t,e,n){var o;if(n)o=wpCookies.get(t);else{var i=wpCookies.get("LP");i&&(i=JSON.parse(i),o=t?i[t]:i)}return o||o===e||(o=e),o},set:function(t,e,n,o,i,r){if(arguments.length>2)wpCookies.set(t,e,n,o,i,r);else if(2==arguments.length){var a=wpCookies.get("LP");(a=a?JSON.parse(a):{})[t]=e,wpCookies.set("LP",JSON.stringify(a),"","/")}else wpCookies.set("LP",JSON.stringify(t),"","/")},remove:function(t){var e=p.get(),n=new RegExp(t,"g"),o={},i=t.match(/\*/);for(var r in e)i?r.match(n)||(o[r]=e[r]):t!=r&&(o[r]=e[r]);p.set(o)}},d=p,h={__key:"LP",set:function(t,e){var n=h.get(),o=lodash.set;o(n,t,e),localStorage.setItem(h.__key,JSON.stringify(n))},get:function(t,e){var n=JSON.parse(localStorage.getItem(h.__key)||"{}"),o=lodash.get,i=o(n,t);return t?void 0!==i?i:e:n},exists:function(t){return t in h.get()},remove:function(t){var e=h.get(),n=lodash.omit(e,t);h.__set(n)},__get:function(){return localStorage.getItem(h.__key)},__set:function(t){localStorage.setItem(h.__key,JSON.stringify(t||"{}"))}},v=h,g=(n(10),1),y=window.jQuery||jQuery,m=function(t){var e="ajax-iframe-"+g,n=y('form[name="'+e+'"]');n.length||(n=y("<iframe />").appendTo(document.body).attr({name:e,src:"#"})),y(t).on("submit",(function(){var n=y(t).clone().appendTo(document.body);return n.attr("target",e),n.find("#submit").remove(),!1})),g++},b=n(4),w=n.n(b);function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var P=jQuery;String.prototype.getQueryVar=function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(this);return null===e?"":decodeURIComponent(e[1].replace(/\+/g," "))},String.prototype.addQueryVar=function(t,e){var n=this,o=n.split("#");return n=o[0],t.match(/\[/)?(n+=n.match(/\?/)?"&":"?",n+=t+"="+e):-1!=n.indexOf("&"+t+"=")||-1!=n.indexOf("?"+t+"=")?n=n.replace(new RegExp(t+"=([^&#]*)","g"),t+"="+e):(n+=n.match(/\?/)?"&":"?",n+=t+"="+e),n+(o[1]?"#"+o[1]:"")},String.prototype.removeQueryVar=function(t){var e=this,n=e.split("#");e=n[0],t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var o=new RegExp("[\\?&]"+t+"([[][^=]*)?=([^&#]*)","g");return(e=e.replace(o,""))+(n[1]?"#"+n[1]:"")};var S={Hook:f,setUrl:function(t,e,n){t&&(history.pushState({},n,t),LP.Hook.doAction("learn_press_set_location_url",t))},toggleGroupSection:function(t,e){var n=P(t);n.hasClass("hide-if-js")&&n.hide().removeClass("hide-if-js"),n.removeClass("hide-if-js").slideToggle((function(){P(this).is(":visible")?P(e).addClass("toggle-on").removeClass("toggle-off"):P(e).addClass("toggle-off").removeClass("toggle-on")}))},overflow:function(t,e){var n=P(t),o=n.css("overflow");e?n.css("overflow",e).data("overflow",o):n.css("overflow",n.data("overflow"))},getUrl:function(){return window.location.href},addQueryVar:function(t,e,n){return(void 0===n?window.location.href:n).addQueryVar(t,e)},removeQueryVar:function(t,e){return(void 0===e?window.location.href:e).removeQueryVar(t)},reload:function(t){t||(t=window.location.href),window.location.href=t},parseResponse:function(t,e){var n=t.match(/<\x2D\x2D LP_AJAX_START \x2D\x2D>([\s\S]*)<\x2D\x2D LP_AJAX_END \x2D\x2D>/);return n&&(t=n[1]),"json"===(e||"json")?this.parseJSON(t):t},parseJSON:function(t){if("string"!=typeof t)return t;var e=String.raw({raw:t}).match(/<\x2D\x2D LP_AJAX_START \x2D\x2D>([\s\S]*)<\x2D\x2D LP_AJAX_END \x2D\x2D>/);try{t=e?JSON.parse(e[1].replace(/(?:\r\n|\r|\n)/g,"")):JSON.parse(t)}catch(e){t={}}return t},ajax:function(t){var e=t.type||"post",n=t.dataType||"json",o=t.action?P.extend(t.data,{"lp-ajax":t.action}):t.data,i=t.beforeSend||function(){},r=t.url||window.location.href;P.ajax({data:o,url:r,type:e,dataType:"html",beforeSend:i.apply(null,t),success:function(e){var o=LP.parseResponse(e,n);"function"==typeof t.success&&t.success(o,e)},error:function(){"function"==typeof t.error&&t.error.apply(null,LP.funcArgs2Array())}})},doAjax:function(t){var e=t.type||"post",n=t.dataType||"json",o=(void 0===t.prefix||"learnpress_")+t.action,i=t.action?P.extend(t.data,{action:o}):t.data;P.ajax({data:i,url:t.url||window.location.href,type:e,dataType:"html",success:function(e){var o=LP.parseResponse(e,n);"function"==typeof t.success&&t.success(o,e)},error:function(){"function"==typeof t.error&&t.error.apply(null,LP.funcArgs2Array())}})},funcArgs2Array:function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e},addFilter:function(t,e){var n=P(document),o="LP."+t;return n.on(o,e),LP.log(n.data("events")),this},applyFilters:function(){var t=P(document),e=arguments[0],n=this.funcArgs2Array(arguments);return t.hasEvent(e)?(n[0]="LP."+e,t.triggerHandler.apply(t,n)):n[1]},addAction:function(t,e){return this.addFilter(t,e)},doAction:function(){var t=P(document),e=arguments[0],n=this.funcArgs2Array(arguments);t.hasEvent(e)&&(n[0]="LP."+e,t.trigger.apply(t,n))},toElement:function(t,e){if(0!==P(t).length){e=P.extend({delay:300,duration:"slow",offset:50,container:null,callback:null,invisible:!1},e||{});var n,o=P(e.container);0===o.length&&(o=P("body, html")),n=o.offset().top;var i=P(t).offset().top+o.scrollTop()-n-e.offset;e.invisible&&function(t,e){var n=o.scrollTop(),i=n+o.height(),r=P(t).offset().top-o.offset().top,a=r+P(t).height();return!0===e?n<r&&i>a:r<=i&&a>=n}(t,!0)||o.fadeIn(10).delay(e.delay).animate({scrollTop:i},e.duration,e.callback)}},uniqueId:function(t,e){var n;void 0===t&&(t="");var o=function(t,e){return e<(t=parseInt(t,10).toString(16)).length?t.slice(t.length-e):e>t.length?new Array(e-t.length+1).join("0")+t:t};return this.php_js||(this.php_js={}),this.php_js.uniqidSeed||(this.php_js.uniqidSeed=Math.floor(123456789*Math.random())),this.php_js.uniqidSeed++,n=t,n+=o(parseInt((new Date).getTime()/1e3,10),8),n+=o(this.php_js.uniqidSeed,5),e&&(n+=(10*Math.random()).toFixed(8).toString()),n},log:function(){for(var t=0,e=arguments.length;t<e;t++)console.log(arguments[t])},blockContent:function(){0===P("#learn-press-block-content").length&&P(LP.template("learn-press-template-block-content",{})).appendTo(P("body")),LP.hideMainScrollbar().addClass("block-content"),P(document).trigger("learn_press_block_content")},unblockContent:function(){setTimeout((function(){LP.showMainScrollbar().removeClass("block-content"),P(document).trigger("learn_press_unblock_content")}),350)},hideMainScrollbar:function(t){t||(t="html, body");var e=P(t);return e.each((function(){var t=P(this),e=t.css("overflow");t.css("overflow","hidden").attr("overflow",e)})),e},showMainScrollbar:function(t){t||(t="html, body");var e=P(t);return e.each((function(){var t=P(this),e=t.attr("overflow");t.css("overflow",e).removeAttr("overflow")})),e},template:"undefined"!=typeof _?_.memoize((function(t,e){var n,o={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"},i=function(e){return(n=n||_.template(P("#"+t).html(),null,o))(e)};return e?i(e):i}),(function(t,e){return t+"-"+JSON.stringify(e)})):function(){return""},alert:function(t,e){var n="",o="";"string"==typeof t?o=t:(void 0!==t.title&&(n=t.title),void 0!==t.message&&(o=t.message)),P.alerts.alert(o,n,(function(t){LP._on_alert_hide(),e&&e(t)})),this._on_alert_show()},confirm:function(t,e){var n="",o="";"string"==typeof t?o=t:(void 0!==t.title&&(n=t.title),void 0!==t.message&&(o=t.message)),P.alerts.confirm(o,n,(function(t){LP._on_alert_hide(),e&&e(t)})),this._on_alert_show()},_on_alert_show:function(){var t=P("#popup_container");P('<span id="popup_container_placeholder" />').insertAfter(t).data("xxx",t);t.stop().css("top","-=50").css("opacity","0").animate({top:"+=50",opacity:1},250)},_on_alert_hide:function(){var t=P("#popup_container_placeholder"),e=t.data("xxx");e&&e.replaceWith(t),e.appendTo(P(document.body)),e.stop().animate({top:"+=50",opacity:0},250,(function(){P(this).remove()}))},sendMessage:function(t,e,n,o){P.isPlainObject(t)&&(t=JSON.stringify(t)),n=n||"*",(e=e||window).postMessage(t,n,o)},receiveMessage:function(t,e){var n=t.origin||t.originalEvent.origin,o=t.data||t.originalEvent.data||"";("string"==typeof o||o instanceof String)&&0===o.indexOf("{")&&(o=LP.parseJSON(o)),LP.Hook.doAction("learn_press_receive_message",o,n)},camelCaseDashObjectKeys:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=LP,o=function(t){return Array.isArray(t)},i=function(t){return t===Object(t)&&!o(t)&&"function"!=typeof t},r=function(t){return t.replace(/([-_][a-z])/gi,(function(t){return t.toUpperCase().replace("-","").replace("_","")}))};if(i(t)){var a={};return Object.keys(t).forEach((function(o){a[r(o)]=e?n.camelCaseDashObjectKeys(t[o]):t[o]})),a}return o(t)?t.map((function(t){return n.camelCaseDashObjectKeys(t)})):t},IframeSubmit:m};P(document).ready((function(){var t,e;void 0!==P.alerts&&(P.alerts.overlayColor="#000",P.alerts.overlayOpacity=.5,P.alerts.okButton=lpGlobalSettings.localize.button_ok,P.alerts.cancelButton=lpGlobalSettings.localize.button_cancel),P(".learn-press-message.fixed").each((function(){var t=P(this),e=t.data();!function(t,e){e.delayIn&&setTimeout((function(){t.show().hide().fadeIn()}),e.delayIn),e.delayOut&&setTimeout((function(){t.fadeOut()}),e.delayOut+(e.delayIn||0))}(t,e)})),setTimeout((function(){P(".learn-press-nav-tabs li.active:not(.default) a").trigger("click")}),300),P("body.course-item-popup").parent().css("overflow","hidden"),t=null,e=function(){P(".auto-check-lines").checkLines((function(t){t>1?P(this).removeClass("single-lines"):P(this).addClass("single-lines"),P(this).attr("rows",t)}))},P(window).on("resize.check-lines",(function(){t?(t&&clearTimeout(t),t=setTimeout(e,300)):e()})),P(".learn-press-tooltip, .lp-passing-conditional").LP_Tooltip({offset:[24,24]}),P(".learn-press-icon").LP_Tooltip({offset:[30,30]}),P(".learn-press-message[data-autoclose]").each((function(){var t=P(this),e=parseInt(t.data("autoclose"));e&&setTimeout((function(t){t.fadeOut()}),e,t)})),P(document).on("click",(function(){P(document).trigger("learn-press/close-all-quick-tip")}))})),function(){window.LP=window.LP||{},"string"==typeof arguments[0]?(LP[arguments[0]]=LP[arguments[0]]||{},LP[arguments[0]]=jQuery.extend(LP[arguments[0]],arguments[1])):LP=jQuery.extend(LP,arguments[0])}(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({Event_Callback:u,MessageBox:l,Cookies:d,localStorage:v},S));e.default={fn:r,QuickTip:s.a,Cookies:d,localStorage:v,showPass:w.a}},3:function(t,e){!function(t){function e(e,n){var o=t(e),i=o.attr("data-id")||LP.uniqueId();n=t.extend({event:"hover",autoClose:!0,single:!0,closeInterval:1e3,arrowOffset:null,tipClass:""},n,o.data()),o.attr("data-id",i);var r=o.attr("data-content-tip")||o.html(),a=t('<div class="learn-press-tip-floating">'+r+"</div>"),s=null,c=0,l=!1,u="el"===n.arrowOffset?o.outerWidth()/2:8,f=t("#__"+i);function p(){if(s)clearTimeout(s);else{n.single&&t(".learn-press-tip").not(o).LP("QuickTip","close"),a.appendTo(document.body);var e=o.offset();a.css({top:e.top-a.outerHeight()-8,left:e.left-a.outerWidth()/2+u})}}function d(){s&&clearTimeout(s),s=setTimeout((function(){a.detach(),s=null}),c)}function h(){c=0,d(),c=n.closeInterval}return 0===f.length&&t(document.body).append(t("<div />").attr("id","__"+i).html(r).css("display","none")),r=f.html(),a.addClass(n.tipClass),o.data("content-tip",r),o.attr("data-content-tip")&&(l=!0),c=n.closeInterval,!1===n.autoClose&&(a.append('<a class="close"></a>'),a.on("click",".close",(function(){h()}))),l||o.html(""),"click"===n.event&&o.on("click",(function(t){t.stopPropagation(),p()})),t(document).on("learn-press/close-all-quick-tip",(function(){h()})),o.hover((function(t){t.stopPropagation(),"click"!==n.event&&p()}),(function(t){t.stopPropagation(),n.autoClose&&d()})).addClass("ready"),{close:h,open:function(){p()}}}t.fn.LP("QuickTip",(function(n){return t.each(this,(function(){var o=t(this).data("quick-tip");o||(o=new e(this,n),t(this).data("quick-tip",o)),"string"==typeof n&&o[n]&&o[n].apply(o)}))}))}(jQuery)},4:function(t,e){var n=jQuery;n((function(){n('.form-field input[type="password"]').wrap('<span class="lp-password-input"></span>'),n(".lp-password-input").append('<span class="lp-show-password-input"></span>'),n(".lp-show-password-input").on("click",(function(){n(this).toggleClass("display-password"),n(this).hasClass("display-password")?n(this).siblings(['input[type="password"]']).prop("type","text"):n(this).siblings('input[type="text"]').prop("type","password")}))}))}});
1
+ !function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=12)}({12:function(t,e,n){"use strict";n.r(e);var o,i=window.jQuery;void 0!==i&&(i.fn.LP=o=function(t,e){if("function"==typeof e)i.fn["LP_"+t]=e;else if(t){var n=[];if(arguments.length>1)for(var o=1;o<arguments.length;o++)n.push(arguments[o]);return"function"==typeof i(this)["LP_"+t]?i(this)["LP_"+t].apply(this,n):this}return this});var r=o,a=n(3),s=n.n(a),c=window.jQuery,l={$block:null,$window:null,events:{},instances:[],instance:null,quickConfirm:function(t,e){var n=c(t);c("[learn-press-quick-confirm]").each((function(){var t;(t=c(this).data("quick-confirm"))&&(console.log(t),t.destroy())})),!n.attr("learn-press-quick-confirm")&&n.attr("learn-press-quick-confirm","true").data("quick-confirm",new function(t,e){var n=c(t),o=c('<span class="learn-press-quick-confirm"></span>').insertAfter(n),i=c(t).position()||{left:0,top:0},r=null,a=null,s=3,l=function(){o.fadeOut("fast",(function(){c(this).remove(),o.parent().css("position","")})),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),u()},u=function(){a&&clearInterval(a),r&&clearInterval(r)},f=function(){r=setInterval((function(){0==--s&&(l.call(o[0]),"function"==typeof e.onCancel&&e.onCancel(e.data),u()),o.find("span").html(" ("+s+")")}),1e3),a=setInterval((function(){n.is(":visible")&&"hidden"!=n.css("visibility")||(u(),o.remove(),o.parent().css("position",""),"function"==typeof e.onCancel&&e.onCancel(e.data))}),350)};e=c.extend({message:"",data:null,onOk:null,onCancel:null,offset:{top:0,left:0}},e||{}),o.html(e.message||n.attr("data-confirm-remove")||"Are you sure?").append("<span> ("+s+")</span>").css({}),o.click((function(){"function"==typeof e.onOk&&e.onOk(e.data),l()})).hover((function(){u()}),(function(){f()})),o.css({left:i.left+n.outerWidth()-o.outerWidth()+e.offset.left,top:i.top+n.outerHeight()+e.offset.top+5}).hide().fadeIn("fast"),f(),this.destroy=function(){o.remove(),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),u()}}(t,e))},show:function(t,e){c.proxy((function(){e=c.extend({title:"",buttons:"",events:!1,autohide:!1,message:t,data:!1,id:LP.uniqueId(),onHide:null},e||{}),this.instances.push(e),this.instance=e;c(document);var n=c(document.body);this.$block||(this.$block=c('<div id="learn-press-message-box-block"></div>').appendTo(n)),this.$window||(this.$window=c('<div id="learn-press-message-box-window"><div id="message-box-wrap"></div> </div>').insertAfter(this.$block),this.$window.click((function(){}))),this._createWindow(t,e.title,e.buttons),this.$block.show(),this.$window.show().attr("instance",e.id),c(window).bind("resize.message-box",c.proxy(this.update,this)).bind("scroll.message-box",c.proxy(this.update,this)),this.update(!0),e.autohide&&setTimeout((function(){LP.MessageBox.hide(),"function"==typeof e.onHide&&e.onHide.call(LP.MessageBox,e)}),e.autohide)}),this)()},blockUI:function(t){t=(!1!==t?t||"Wait a moment":"")+'<div class="message-box-animation"></div>',this.show(t)},hide:function(t,e){e?this._removeInstance(e.id):this.instance&&this._removeInstance(this.instance.id),0===this.instances.length?(this.$block&&this.$block.hide(),this.$window&&this.$window.hide(),c(window).unbind("resize.message-box",this.update).unbind("scroll.message-box",this.update)):this.instance&&this._createWindow(this.instance.message,this.instance.title,this.instance.buttons)},update:function(t){var e=this,n=this.$window.find("#message-box-wrap"),o=n.data("timer"),i=function(){LP.Hook.doAction("learn_press_message_box_before_resize",e);var t=n.find(".message-box-content").css("height","").css("overflow","hidden"),o=(n.outerWidth(),n.outerHeight()),i=t.height(),r=c(window).height();n.offset().top;i>r-50?(t.css({height:r-25}),o=n.outerHeight()):t.css("height","").css("overflow",""),n.css({marginTop:(c(window).height()-o)/2}),LP.Hook.doAction("learn_press_message_box_resize",o,e)};t&&i(),o&&clearTimeout(o),o=setTimeout(i,250)},_removeInstance:function(t){for(var e=0;e<this.instances.length;e++)if(this.instances[e].id===t){this.instances.splice(e,1);var n=this.instances.length;n?(this.instance=this.instances[n-1],this.$window.attr("instance",this.instance.id)):(this.instance=!1,this.$window.removeAttr("instance"));break}},_getInstance:function(t){for(var e=0;e<this.instances.length;e++)if(this.instances[e].id===t)return this.instances[e]},_createWindow:function(t,e,n){var o=this.$window.find("#message-box-wrap").html("");if(e&&o.append('<h3 class="message-box-title">'+e+"</h3>"),o.append(c('<div class="message-box-content"></div>').html(t)),n){var i=c('<div class="message-box-buttons"></div>');switch(n){case"yesNo":i.append(this._createButton(LP_Settings.localize.button_yes,"yes")),i.append(this._createButton(LP_Settings.localize.button_no,"no"));break;case"okCancel":i.append(this._createButton(LP_Settings.localize.button_ok,"ok")),i.append(this._createButton(LP_Settings.localize.button_cancel,"cancel"));break;default:i.append(this._createButton(LP_Settings.localize.button_ok,"ok"))}o.append(i)}},_createButton:function(t,e){var n=c('<button type="button" class="button message-box-button message-box-button-'+e+'">'+t+"</button>"),o="on"+(e.substr(0,1).toUpperCase()+e.substr(1));return n.data("callback",o).click((function(){var t=c(this).data("instance"),e=t.events[c(this).data("callback")];"function"===c.type(e)&&!1===e.apply(LP.MessageBox,[t])||LP.MessageBox.hide(null,t)})).data("instance",this.instance),n}},u=function(t){var e={};window.jQuery;this.on=function(n,o){var i=n.split("."),r="";return i.length>1&&(n=i[0],r=i[1]),e[n]||(e[n]=[[],{}]),r?(e[n][1][r]||(e[n][1][r]=[]),e[n][1][r].push(o)):e[n][0].push(o),t},this.off=function(n,o){var i=n.split("."),r="";if(i.length>1&&(n=i[0],r=i[1]),!e[n])return t;var a=-1;if(r){if(!e[n][1][r])return t;if("function"==typeof o){if((a=e[n][1][r].indexOf(o))<0)return t;e[n][1][r].splice(a,1)}else e[n][1][r]=[]}else if("function"==typeof o){if((a=e[n][0].indexOf(o))<0)return t;e[n][0].splice(a,1)}else e[n][0]=[];return t},this.callEvent=function(n,o){if(e[n]){if(e[n][0])for(var i=0;i<e[n][0].length;i++)"function"==typeof e[n][0][i]&&e[n][i][0].apply(t,o);if(e[n][1])for(var i in e[n][1])for(var r=0;r<e[n][1][i].length;r++)"function"==typeof e[n][1][i][r]&&e[n][1][i][r].apply(t,o)}}},f={hooks:{action:{},filter:{}},addAction:function(t,e,n,o){return this.addHook("action",t,e,n,o),this},addFilter:function(t,e,n,o){return this.addHook("filter",t,e,n,o),this},doAction:function(t){return this.doHook("action",t,arguments)},applyFilters:function(t){return this.doHook("filter",t,arguments)},removeAction:function(t,e){return this.removeHook("action",t,e),this},removeFilter:function(t,e,n){return this.removeHook("filter",t,e,n),this},addHook:function(t,e,n,o,i){void 0===this.hooks[t][e]&&(this.hooks[t][e]=[]);var r=this.hooks[t][e];return void 0===i&&(i=e+"_"+r.length),this.hooks[t][e].push({tag:i,callable:n,priority:o}),this},doHook:function(t,e,n){if(n=Array.prototype.slice.call(n,1),void 0!==this.hooks[t][e]){var o,i=this.hooks[t][e];i.sort((function(t,e){return t.priority-e.priority}));for(var r=0;r<i.length;r++)"function"!=typeof(o=i[r].callable)&&(o=window[o]),"action"===t?n[r]=o.apply(null,n):n[0]=o.apply(null,n)}return"filter"===t?n[0]:n},removeHook:function(t,e,n,o){if(void 0!==this.hooks[t][e])for(var i=this.hooks[t][e],r=i.length-1;r>=0;r--)void 0!==o&&o!==i[r].tag||void 0!==n&&n!==i[r].priority||i.splice(r,1);return this}},p={get:function(t,e,n){var o;if(n)o=wpCookies.get(t);else{var i=wpCookies.get("LP");i&&(i=JSON.parse(i),o=t?i[t]:i)}return o||o===e||(o=e),o},set:function(t,e,n,o,i,r){if(arguments.length>2)wpCookies.set(t,e,n,o,i,r);else if(2==arguments.length){var a=wpCookies.get("LP");(a=a?JSON.parse(a):{})[t]=e,wpCookies.set("LP",JSON.stringify(a),"","/")}else wpCookies.set("LP",JSON.stringify(t),"","/")},remove:function(t){var e=p.get(),n=new RegExp(t,"g"),o={},i=t.match(/\*/);for(var r in e)i?r.match(n)||(o[r]=e[r]):t!=r&&(o[r]=e[r]);p.set(o)}},d=p,h={__key:"LP",set:function(t,e){var n=h.get(),o=lodash.set;o(n,t,e),localStorage.setItem(h.__key,JSON.stringify(n))},get:function(t,e){var n=JSON.parse(localStorage.getItem(h.__key)||"{}"),o=lodash.get,i=o(n,t);return t?void 0!==i?i:e:n},exists:function(t){return t in h.get()},remove:function(t){var e=h.get(),n=lodash.omit(e,t);h.__set(n)},__get:function(){return localStorage.getItem(h.__key)},__set:function(t){localStorage.setItem(h.__key,JSON.stringify(t||"{}"))}},v=h,g=(n(9),1),y=window.jQuery||jQuery,m=function(t){var e="ajax-iframe-"+g,n=y('form[name="'+e+'"]');n.length||(n=y("<iframe />").appendTo(document.body).attr({name:e,src:"#"})),y(t).on("submit",(function(){var n=y(t).clone().appendTo(document.body);return n.attr("target",e),n.find("#submit").remove(),!1})),g++},b=n(4),w=n.n(b);function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var P=jQuery;String.prototype.getQueryVar=function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(this);return null===e?"":decodeURIComponent(e[1].replace(/\+/g," "))},String.prototype.addQueryVar=function(t,e){var n=this,o=n.split("#");return n=o[0],t.match(/\[/)?(n+=n.match(/\?/)?"&":"?",n+=t+"="+e):-1!=n.indexOf("&"+t+"=")||-1!=n.indexOf("?"+t+"=")?n=n.replace(new RegExp(t+"=([^&#]*)","g"),t+"="+e):(n+=n.match(/\?/)?"&":"?",n+=t+"="+e),n+(o[1]?"#"+o[1]:"")},String.prototype.removeQueryVar=function(t){var e=this,n=e.split("#");e=n[0],t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var o=new RegExp("[\\?&]"+t+"([[][^=]*)?=([^&#]*)","g");return(e=e.replace(o,""))+(n[1]?"#"+n[1]:"")};var S={Hook:f,setUrl:function(t,e,n){t&&(history.pushState({},n,t),LP.Hook.doAction("learn_press_set_location_url",t))},toggleGroupSection:function(t,e){var n=P(t);n.hasClass("hide-if-js")&&n.hide().removeClass("hide-if-js"),n.removeClass("hide-if-js").slideToggle((function(){P(this).is(":visible")?P(e).addClass("toggle-on").removeClass("toggle-off"):P(e).addClass("toggle-off").removeClass("toggle-on")}))},overflow:function(t,e){var n=P(t),o=n.css("overflow");e?n.css("overflow",e).data("overflow",o):n.css("overflow",n.data("overflow"))},getUrl:function(){return window.location.href},addQueryVar:function(t,e,n){return(void 0===n?window.location.href:n).addQueryVar(t,e)},removeQueryVar:function(t,e){return(void 0===e?window.location.href:e).removeQueryVar(t)},reload:function(t){t||(t=window.location.href),window.location.href=t},parseResponse:function(t,e){var n=t.match(/<\x2D\x2D LP_AJAX_START \x2D\x2D>([\s\S]*)<\x2D\x2D LP_AJAX_END \x2D\x2D>/);return n&&(t=n[1]),"json"===(e||"json")?this.parseJSON(t):t},parseJSON:function(t){if("string"!=typeof t)return t;var e=String.raw({raw:t}).match(/<\x2D\x2D LP_AJAX_START \x2D\x2D>([\s\S]*)<\x2D\x2D LP_AJAX_END \x2D\x2D>/);try{t=e?JSON.parse(e[1].replace(/(?:\r\n|\r|\n)/g,"")):JSON.parse(t)}catch(e){t={}}return t},ajax:function(t){var e=t.type||"post",n=t.dataType||"json",o=t.action?P.extend(t.data,{"lp-ajax":t.action}):t.data,i=t.beforeSend||function(){},r=t.url||window.location.href;P.ajax({data:o,url:r,type:e,dataType:"html",beforeSend:i.apply(null,t),success:function(e){var o=LP.parseResponse(e,n);"function"==typeof t.success&&t.success(o,e)},error:function(){"function"==typeof t.error&&t.error.apply(null,LP.funcArgs2Array())}})},doAjax:function(t){var e=t.type||"post",n=t.dataType||"json",o=(void 0===t.prefix||"learnpress_")+t.action,i=t.action?P.extend(t.data,{action:o}):t.data;P.ajax({data:i,url:t.url||window.location.href,type:e,dataType:"html",success:function(e){var o=LP.parseResponse(e,n);"function"==typeof t.success&&t.success(o,e)},error:function(){"function"==typeof t.error&&t.error.apply(null,LP.funcArgs2Array())}})},funcArgs2Array:function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e},addFilter:function(t,e){var n=P(document),o="LP."+t;return n.on(o,e),LP.log(n.data("events")),this},applyFilters:function(){var t=P(document),e=arguments[0],n=this.funcArgs2Array(arguments);return t.hasEvent(e)?(n[0]="LP."+e,t.triggerHandler.apply(t,n)):n[1]},addAction:function(t,e){return this.addFilter(t,e)},doAction:function(){var t=P(document),e=arguments[0],n=this.funcArgs2Array(arguments);t.hasEvent(e)&&(n[0]="LP."+e,t.trigger.apply(t,n))},toElement:function(t,e){if(0!==P(t).length){e=P.extend({delay:300,duration:"slow",offset:50,container:null,callback:null,invisible:!1},e||{});var n,o=P(e.container);0===o.length&&(o=P("body, html")),n=o.offset().top;var i=P(t).offset().top+o.scrollTop()-n-e.offset;e.invisible&&function(t,e){var n=o.scrollTop(),i=n+o.height(),r=P(t).offset().top-o.offset().top,a=r+P(t).height();return!0===e?n<r&&i>a:r<=i&&a>=n}(t,!0)||o.fadeIn(10).delay(e.delay).animate({scrollTop:i},e.duration,e.callback)}},uniqueId:function(t,e){var n;void 0===t&&(t="");var o=function(t,e){return e<(t=parseInt(t,10).toString(16)).length?t.slice(t.length-e):e>t.length?new Array(e-t.length+1).join("0")+t:t};return this.php_js||(this.php_js={}),this.php_js.uniqidSeed||(this.php_js.uniqidSeed=Math.floor(123456789*Math.random())),this.php_js.uniqidSeed++,n=t,n+=o(parseInt((new Date).getTime()/1e3,10),8),n+=o(this.php_js.uniqidSeed,5),e&&(n+=(10*Math.random()).toFixed(8).toString()),n},log:function(){for(var t=0,e=arguments.length;t<e;t++)console.log(arguments[t])},blockContent:function(){0===P("#learn-press-block-content").length&&P(LP.template("learn-press-template-block-content",{})).appendTo(P("body")),LP.hideMainScrollbar().addClass("block-content"),P(document).trigger("learn_press_block_content")},unblockContent:function(){setTimeout((function(){LP.showMainScrollbar().removeClass("block-content"),P(document).trigger("learn_press_unblock_content")}),350)},hideMainScrollbar:function(t){t||(t="html, body");var e=P(t);return e.each((function(){var t=P(this),e=t.css("overflow");t.css("overflow","hidden").attr("overflow",e)})),e},showMainScrollbar:function(t){t||(t="html, body");var e=P(t);return e.each((function(){var t=P(this),e=t.attr("overflow");t.css("overflow",e).removeAttr("overflow")})),e},template:"undefined"!=typeof _?_.memoize((function(t,e){var n,o={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"},i=function(e){return(n=n||_.template(P("#"+t).html(),null,o))(e)};return e?i(e):i}),(function(t,e){return t+"-"+JSON.stringify(e)})):function(){return""},alert:function(t,e){var n="",o="";"string"==typeof t?o=t:(void 0!==t.title&&(n=t.title),void 0!==t.message&&(o=t.message)),P.alerts.alert(o,n,(function(t){LP._on_alert_hide(),e&&e(t)})),this._on_alert_show()},confirm:function(t,e){var n="",o="";"string"==typeof t?o=t:(void 0!==t.title&&(n=t.title),void 0!==t.message&&(o=t.message)),P.alerts.confirm(o,n,(function(t){LP._on_alert_hide(),e&&e(t)})),this._on_alert_show()},_on_alert_show:function(){var t=P("#popup_container");P('<span id="popup_container_placeholder" />').insertAfter(t).data("xxx",t);t.stop().css("top","-=50").css("opacity","0").animate({top:"+=50",opacity:1},250)},_on_alert_hide:function(){var t=P("#popup_container_placeholder"),e=t.data("xxx");e&&e.replaceWith(t),e.appendTo(P(document.body)),e.stop().animate({top:"+=50",opacity:0},250,(function(){P(this).remove()}))},sendMessage:function(t,e,n,o){P.isPlainObject(t)&&(t=JSON.stringify(t)),n=n||"*",(e=e||window).postMessage(t,n,o)},receiveMessage:function(t,e){var n=t.origin||t.originalEvent.origin,o=t.data||t.originalEvent.data||"";("string"==typeof o||o instanceof String)&&0===o.indexOf("{")&&(o=LP.parseJSON(o)),LP.Hook.doAction("learn_press_receive_message",o,n)},camelCaseDashObjectKeys:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=LP,o=function(t){return Array.isArray(t)},i=function(t){return t===Object(t)&&!o(t)&&"function"!=typeof t},r=function(t){return t.replace(/([-_][a-z])/gi,(function(t){return t.toUpperCase().replace("-","").replace("_","")}))};if(i(t)){var a={};return Object.keys(t).forEach((function(o){a[r(o)]=e?n.camelCaseDashObjectKeys(t[o]):t[o]})),a}return o(t)?t.map((function(t){return n.camelCaseDashObjectKeys(t)})):t},IframeSubmit:m};P(document).ready((function(){var t,e;void 0!==P.alerts&&(P.alerts.overlayColor="#000",P.alerts.overlayOpacity=.5,P.alerts.okButton=lpGlobalSettings.localize.button_ok,P.alerts.cancelButton=lpGlobalSettings.localize.button_cancel),P(".learn-press-message.fixed").each((function(){var t=P(this),e=t.data();!function(t,e){e.delayIn&&setTimeout((function(){t.show().hide().fadeIn()}),e.delayIn),e.delayOut&&setTimeout((function(){t.fadeOut()}),e.delayOut+(e.delayIn||0))}(t,e)})),setTimeout((function(){P(".learn-press-nav-tabs li.active:not(.default) a").trigger("click")}),300),P("body.course-item-popup").parent().css("overflow","hidden"),t=null,e=function(){P(".auto-check-lines").checkLines((function(t){t>1?P(this).removeClass("single-lines"):P(this).addClass("single-lines"),P(this).attr("rows",t)}))},P(window).on("resize.check-lines",(function(){t?(t&&clearTimeout(t),t=setTimeout(e,300)):e()})),P(".learn-press-tooltip, .lp-passing-conditional").LP_Tooltip({offset:[24,24]}),P(".learn-press-icon").LP_Tooltip({offset:[30,30]}),P(".learn-press-message[data-autoclose]").each((function(){var t=P(this),e=parseInt(t.data("autoclose"));e&&setTimeout((function(t){t.fadeOut()}),e,t)})),P(document).on("click",(function(){P(document).trigger("learn-press/close-all-quick-tip")}))})),function(){window.LP=window.LP||{},"string"==typeof arguments[0]?(LP[arguments[0]]=LP[arguments[0]]||{},LP[arguments[0]]=jQuery.extend(LP[arguments[0]],arguments[1])):LP=jQuery.extend(LP,arguments[0])}(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?k(Object(n),!0).forEach((function(e){x(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({Event_Callback:u,MessageBox:l,Cookies:d,localStorage:v},S));e.default={fn:r,QuickTip:s.a,Cookies:d,localStorage:v,showPass:w.a}},3:function(t,e){!function(t){function e(e,n){var o=t(e),i=o.attr("data-id")||LP.uniqueId();n=t.extend({event:"hover",autoClose:!0,single:!0,closeInterval:1e3,arrowOffset:null,tipClass:""},n,o.data()),o.attr("data-id",i);var r=o.attr("data-content-tip")||o.html(),a=t('<div class="learn-press-tip-floating">'+r+"</div>"),s=null,c=0,l=!1,u="el"===n.arrowOffset?o.outerWidth()/2:8,f=t("#__"+i);function p(){if(s)clearTimeout(s);else{n.single&&t(".learn-press-tip").not(o).LP("QuickTip","close"),a.appendTo(document.body);var e=o.offset();a.css({top:e.top-a.outerHeight()-8,left:e.left-a.outerWidth()/2+u})}}function d(){s&&clearTimeout(s),s=setTimeout((function(){a.detach(),s=null}),c)}function h(){c=0,d(),c=n.closeInterval}return 0===f.length&&t(document.body).append(t("<div />").attr("id","__"+i).html(r).css("display","none")),r=f.html(),a.addClass(n.tipClass),o.data("content-tip",r),o.attr("data-content-tip")&&(l=!0),c=n.closeInterval,!1===n.autoClose&&(a.append('<a class="close"></a>'),a.on("click",".close",(function(){h()}))),l||o.html(""),"click"===n.event&&o.on("click",(function(t){t.stopPropagation(),p()})),t(document).on("learn-press/close-all-quick-tip",(function(){h()})),o.hover((function(t){t.stopPropagation(),"click"!==n.event&&p()}),(function(t){t.stopPropagation(),n.autoClose&&d()})).addClass("ready"),{close:h,open:function(){p()}}}t.fn.LP("QuickTip",(function(n){return t.each(this,(function(){var o=t(this).data("quick-tip");o||(o=new e(this,n),t(this).data("quick-tip",o)),"string"==typeof n&&o[n]&&o[n].apply(o)}))}))}(jQuery)},4:function(t,e){var n=jQuery;n((function(){n('.form-field input[type="password"]').wrap('<span class="lp-password-input"></span>'),n(".lp-password-input").append('<span class="lp-show-password-input"></span>'),n(".lp-show-password-input").on("click",(function(){n(this).toggleClass("display-password"),n(this).hasClass("display-password")?n(this).siblings(['input[type="password"]']).prop("type","text"):n(this).siblings('input[type="text"]').prop("type","password")}))}))},9:function(module,__webpack_exports__,__webpack_require__){"use strict";var _this=void 0;function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var $=window.jQuery||jQuery,serializeJSON=function serializeJSON(path){var isInput=$(this).is("input")||$(this).is("select")||$(this).is("textarea"),unIndexed=isInput?$(this).serializeArray():$(this).find("input, select, textarea").serializeArray(),indexed={},validate=/(\[([a-zA-Z0-9_-]+)?\]?)/g,arrayKeys={},end=!1;if($.each(unIndexed,(function(){var that=this,match=this.name.match(/^([0-9a-zA-Z_-]+)/);if(match){var keys=this.name.match(validate),objPath="indexed['"+match[0]+"']";keys?("object"!=_typeof(indexed[match[0]])&&(indexed[match[0]]={}),$.each(keys,(function(i,prop){prop=prop.replace(/\]|\[/g,"");var rawPath=objPath.replace(/'|\[|\]/g,""),objExp="",preObjPath=objPath;""==prop?(null==arrayKeys[rawPath]?arrayKeys[rawPath]=0:arrayKeys[rawPath]++,objPath+="['"+arrayKeys[rawPath]+"']"):(isNaN(prop)||(arrayKeys[rawPath]=prop),objPath+="['"+prop+"']");try{i==keys.length-1?(objExp=objPath+"=that.value;",end=!0):(objExp=objPath+"={}",end=!1);var evalString="if( typeof "+objPath+" == 'undefined'){"+objExp+";}else{if(end){if(typeof "+preObjPath+"!='object'){"+preObjPath+"={};}"+objExp+"}}";eval(evalString)}catch(t){console.log("Error:"+t+"\n"+objExp)}}))):indexed[match[0]]=this.value}})),path){path="['"+path.replace(".","']['")+"']";var c="try{indexed = indexed"+path+"}catch(ex){console.log(c, ex);}";eval(c)}return indexed},LP_Tooltip=function(t){return t=$.extend({},{offset:[0,0]},t||{}),$.each(_this,(function(){var e=$(this),n=e.data("content");if(n&&void 0===e.data("LP_Tooltip")){var o=null;e.on("mouseenter",(function(i){o=$('<div class="learn-press-tooltip-bubble"/>').html(n).appendTo($("body")).hide();var r=e.offset();if(Array.isArray(t.offset)){var a=t.offset[1],s=t.offset[0];$.isNumeric(s)&&(r.left+=s),$.isNumeric(a)&&(r.top+=a)}o.css({top:r.top,left:r.left}),o.fadeIn()})),e.on("mouseleave",(function(t){o&&o.remove()})),e.data("tooltip",!0)}}))},hasEvent=function(t){var e=$(this).data("events");if(void 0===e.LP)return!1;for(i=0;i<e.LP.length;i++)if(e.LP[i].namespace==t)return!0;return!1},dataToJSON=function(){var t={};return $.each(this[0].attributes,(function(){var e=this.name.match(/^data-(.*)/);e&&(t[e[1]]=this.value)})),t},rows=function(){var t=$(this).height(),e=$(this).css("line-height").replace("px","");return $(this).attr({height:t,"line-height":e}),Math.floor(t/parseInt(e))},checkLines=function(t){return this.each((function(){var e=$(this).rows();t.call(this,e)}))},findNext=function(t){var e=$(t),n=this.first(),o=e.index(n),i=e.eq(o+1);return!!i.length&&i},findPrev=function(t){var e=$(t),n=this.first(),o=e.index(n),i=e.eq(o-1);return!!i.length&&i},progress=function(t){return this.each((function(){var e=parseInt(t/100*360),n=$(this);e<180?n.find(".progress-circle").removeClass("gt-50"):n.find(".progress-circle").addClass("gt-50"),n.find(".fill").css({transform:"rotate("+e+"deg)"})}))};$.fn.serializeJSON=serializeJSON,$.fn.LP_Tooltip=LP_Tooltip,$.fn.hasEvent=hasEvent,$.fn.dataToJSON=dataToJSON,$.fn.rows=rows,$.fn.checkLines=checkLines,$.fn.findNext=findNext,$.fn.findPrev=findPrev,$.fn.progress=progress;var _unused_webpack_default_export={serializeJSON:serializeJSON,LP_Tooltip:LP_Tooltip,hasEvent:hasEvent,dataToJSON:dataToJSON,rows:rows,checkLines:checkLines,findNext:findNext,findPrev:findPrev,progress:progress}}});
assets/js/vendor/chart.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,function(){"use strict";const r="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function l(e,i,t){const a=t||(t=>Array.prototype.slice.call(t));let n=!1,o;return function(...t){o=a(t),n||(n=!0,r.call(window,()=>{n=!1,e.apply(i,o)}))}}function s(t,e){let i;return function(){return e?(clearTimeout(i),i=setTimeout(t,e)):t(),e}}const f=t=>"start"===t?"left":"end"===t?"right":"center",T=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,R=(t,e,i)=>"right"===t?i:"center"===t?(e+i)/2:e;var h=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,i,a,t){const n=i.listeners[t],o=i.duration;n.forEach(t=>t({chart:e,initial:i.initial,numSteps:o,currentStep:Math.min(a-i.start,o)}))}_refresh(){const t=this;t._request||(t._running=!0,t._request=r.call(window,()=>{t._update(),t._request=null,t._running&&t._refresh()}))}_update(r=Date.now()){const s=this;let l=0;s._charts.forEach((a,n)=>{if(a.running&&a.items.length){const o=a.items;let t,e=o.length-1,i=!1;for(;0<=e;--e)t=o[e],t._active?(t._total>a.duration&&(a.duration=t._total),t.tick(r),i=!0):(o[e]=o[o.length-1],o.pop());i&&(n.draw(),s._notify(n,a,r,"progress")),o.length||(a.running=!1,s._notify(n,a,r,"complete"),a.initial=!1),l+=o.length}}),s._lastDate=r,0===l&&(s._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return 0<this._getAnims(t).items.length}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;t=this._charts.get(t);return!!(t&&t.running&&t.items.length)}stop(e){const i=this._charts.get(e);if(i&&i.items.length){const a=i.items;let t=a.length-1;for(;0<=t;--t)a[t].cancel();i.items=[],this._notify(e,i,Date.now(),"complete")}}remove(t){return this._charts.delete(t)}};const o={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},e="0123456789ABCDEF",i=t=>e[15&t],a=t=>e[(240&t)>>4]+e[15&t],n=t=>(240&t)>>4==(15&t);function c(t){return t+.5|0}const d=(t,e,i)=>Math.max(Math.min(t,i),e);function u(t){return d(c(2.55*t),0,255)}function g(t){return d(c(255*t),0,255)}function p(t){return d(c(t/2.55)/100,0,1)}function m(t){return d(c(100*t),0,100)}const x=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,b=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function v(i,t,a){const n=t*Math.min(a,1-a),e=(t,e=(t+i/30)%12)=>a-n*Math.max(Math.min(e-3,9-e,1),-1);return[e(0),e(8),e(4)]}function _(i,a,n){i=(t,e=(t+i/60)%6)=>n-n*a*Math.max(Math.min(e,4-e,1),0);return[i(5),i(3),i(1)]}function y(t,e,i){const a=v(t,1,.5);let n;for(1<e+i&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)a[n]*=1-e-i,a[n]+=e;return a}function w(t){var e=t.r/255,i=t.g/255,a=t.b/255,n=Math.max(e,i,a),o=Math.min(e,i,a),t=(n+o)/2;let r,s,l;return n!==o&&(l=n-o,s=.5<t?l/(2-n-o):l/(n+o),r=n===e?(i-a)/l+(i<a?6:0):n===i?(a-e)/l+2:(e-i)/l+4,r=60*r+.5),[0|r,s||0,t]}function M(t,e,i,a){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,a)).map(g)}function k(t,e,i){return M(v,t,e,i)}function S(t){return(t%360+360)%360}const P={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},D={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let C;function O(e,i,a){if(e){let t=w(e);t[i]=Math.max(0,Math.min(t[i]+t[i]*a,0===i?360:1)),t=k(t),e.r=t[0],e.g=t[1],e.b=t[2]}}function A(t,e){return t&&Object.assign(e||{},t)}function L(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?3<=t.length&&(e={r:t[0],g:t[1],b:t[2],a:255},3<t.length&&(e.a=g(t[3]))):(e=A(t,{r:0,g:0,b:0,a:1})).a=g(e.a),e}function E(t){return("r"===t.charAt(0)?function(t){t=x.exec(t);let e,i,a,n=255;if(t){if(t[7]!==e){const o=+t[7];n=255&(t[8]?u(o):255*o)}return e=+t[1],i=+t[3],a=+t[5],e=255&(t[2]?u(e):e),i=255&(t[4]?u(i):i),a=255&(t[6]?u(a):a),{r:e,g:i,b:a,a:n}}}:function(t){var e=b.exec(t);let i,a=255;if(e){void 0!==e[5]&&(a=(e[6]?u:g)(+e[5]));var n=S(+e[2]),o=+e[3]/100,t=+e[4]/100;return{r:(i="hwb"===e[1]?M(y,n,o,t):"hsv"===e[1]?M(_,n,o,t):k(n,o,t))[0],g:i[1],b:i[2],a:a}}})(t)}class I{constructor(t){if(t instanceof I)return t;var e,i,a=typeof t;let n;"object"==a?n=L(t):"string"==a&&(a=(e=t).length,"#"===e[0]&&(4===a||5===a?i={r:255&17*o[e[1]],g:255&17*o[e[2]],b:255&17*o[e[3]],a:5===a?17*o[e[4]]:255}:7!==a&&9!==a||(i={r:o[e[1]]<<4|o[e[2]],g:o[e[3]]<<4|o[e[4]],b:o[e[5]]<<4|o[e[6]],a:9===a?o[e[7]]<<4|o[e[8]]:255})),n=i||(i=t,C||(C=function(){const t={},e=Object.keys(D),i=Object.keys(P);let a,n,o,r,s;for(a=0;a<e.length;a++){for(r=s=e[a],n=0;n<i.length;n++)o=i[n],s=s.replace(o,P[o]);o=parseInt(D[r],16),t[s]=[o>>16&255,o>>8&255,255&o]}return t}(),C.transparent=[0,0,0,0]),(i=C[i.toLowerCase()])&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255})||E(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=A(this._rgb);return t&&(t.a=p(t.a)),t}set rgb(t){this._rgb=L(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${p(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?(t=this._rgb,e=t,e=n(e.r)&&n(e.g)&&n(e.b)&&n(e.a)?i:a,t&&"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):"")):this._rgb;var t,e}hslString(){return this._valid?function(t){if(t){var e=w(t),i=e[0],a=m(e[1]),e=m(e[2]);return t.a<255?`hsla(${i}, ${a}%, ${e}%, ${p(t.a)})`:`hsl(${i}, ${a}%, ${e}%)`}}(this._rgb):this._rgb}mix(t,e){if(t){const a=this.rgb,n=t.rgb;var i=void 0===e?.5:e,t=2*i-1,e=a.a-n.a,t=(1+(t*e==-1?t:(t+e)/(1+t*e)))/2,e=1-t;a.r=255&t*a.r+e*n.r+.5,a.g=255&t*a.g+e*n.g+.5,a.b=255&t*a.b+e*n.b+.5,a.a=i*a.a+(1-i)*n.a,this.rgb=a}return this}clone(){return new I(this.rgb)}alpha(t){return this._rgb.a=g(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=c(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return O(this._rgb,2,t),this}darken(t){return O(this._rgb,2,-t),this}saturate(t){return O(this._rgb,1,t),this}desaturate(t){return O(this._rgb,1,-t),this}rotate(t){return e=this._rgb,i=t,(t=w(e))[0]=S(t[0]+i),t=k(t),e.r=t[0],e.g=t[1],e.b=t[2],this;var e,i}}function z(t){return new I(t)}const F=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function V(t){return F(t)?t:z(t)}function B(t){return F(t)?t:z(t).saturate(.5).darken(.1).hexString()}function t(){}const W=function(){let t=0;return function(){return t++}}();function H(t){return null==t}function N(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function j(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const $=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function Y(t,e){return $(t)?t:e}function U(t,e){return void 0===t?e:t}const X=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,q=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function K(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function G(t,e,i,a){let n,o,r;if(N(t))if(o=t.length,a)for(n=o-1;0<=n;n--)e.call(i,t[n],n);else for(n=0;n<o;n++)e.call(i,t[n],n);else if(j(t))for(r=Object.keys(t),o=r.length,n=0;n<o;n++)e.call(i,t[r[n]],r[n])}function Z(t,e){let i,a,n,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,a=t.length;i<a;++i)if(n=t[i],o=e[i],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function Q(e){if(N(e))return e.map(Q);if(j(e)){const i=Object.create(null),a=Object.keys(e),n=a.length;let t=0;for(;t<n;++t)i[a[t]]=Q(e[a[t]]);return i}return e}function J(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function tt(t,e,i,a){var n;J(t)&&(n=e[t],i=i[t],j(n)&&j(i)?et(n,i,a):e[t]=Q(i))}function et(i,a,n){const e=N(a)?a:[a],o=e.length;if(!j(i))return i;const r=(n=n||{}).merger||tt;for(let t=0;t<o;++t)if(j(a=e[t])){const o=Object.keys(a);for(let t=0,e=o.length;t<e;++t)r(o[t],i,a,n)}return i}function it(t,e){return et(t,e,{merger:at})}function at(t,e,i){var a;J(t)&&(a=e[t],i=i[t],j(a)&&j(i)?it(a,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Q(i)))}function nt(t,e){e=t.indexOf(".",e);return-1===e?t.length:e}function ot(t,e){if(""===e)return t;let i=0,a=nt(e,i);for(;t&&a>i;)t=t[e.substr(i,a-i)],i=a+1,a=nt(e,i);return t}function rt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const st=t=>void 0!==t,lt=t=>"function"==typeof t,ht=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},ct=Object.create(null),dt=Object.create(null);function ut(i,t){if(!t)return i;var a=t.split(".");for(let t=0,e=a.length;t<e;++t){var n=a[t];i=i[n]||(i[n]=Object.create(null))}return i}function gt(t,e,i){return"string"==typeof e?et(ut(t,e),i):et(ut(t,""),e)}var ft=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>B(e.backgroundColor),this.hoverBorderColor=(t,e)=>B(e.borderColor),this.hoverColor=(t,e)=>B(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return gt(this,t,e)}get(t){return ut(this,t)}describe(t,e){return gt(dt,t,e)}override(t,e){return gt(ct,t,e)}route(t,e,i,a){const n=ut(this,t),o=ut(this,i),r="_"+e;Object.defineProperties(n,{[r]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){var t=this[r],e=o[a];return j(t)?Object.assign({},e,t):U(t,e)},set(t){this[r]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const pt=Math.PI,mt=2*pt,xt=mt+pt,bt=Number.POSITIVE_INFINITY,vt=pt/180,_t=pt/2,yt=pt/4,wt=2*pt/3,Mt=Math.log10,kt=Math.sign;function St(t){var e=Math.pow(10,Math.floor(Mt(t))),t=t/e;return(t<=1?1:t<=2?2:t<=5?5:10)*e}function Pt(t){const e=[],i=Math.sqrt(t);let a;for(a=1;a<i;a++)t%a==0&&(e.push(a),e.push(t/a));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}function Dt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Ct(t,e,i){return Math.abs(t-e)<i}function Ot(t,e){var i=Math.round(t);return i-e<=t&&t<=i+e}function At(t,e,i){let a,n,o;for(a=0,n=t.length;a<n;a++)o=t[a][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Tt(t){return t*(pt/180)}function Rt(t){return t*(180/pt)}function Lt(i){if($(i)){let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}}function Et(t,e){var i=e.x-t.x,e=e.y-t.y,t=Math.sqrt(i*i+e*e);let a=Math.atan2(e,i);return a<-.5*pt&&(a+=mt),{angle:a,distance:t}}function It(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function zt(t,e){return(t-e+xt)%mt-pt}function Ft(t){return(t%mt+mt)%mt}function Vt(t,e,i){var a=Ft(t),n=Ft(e),o=Ft(i),r=Ft(n-a),t=Ft(o-a),e=Ft(a-n),i=Ft(a-o);return a===n||a===o||t<r&&e<i}function Bt(t,e,i){return Math.max(e,Math.min(i,t))}function Wt(t){return Bt(t,-32768,32767)}function Ht(t){return!t||H(t.size)||H(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Nt(t,e,i,a,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),a=o>a?o:a}function jt(t,e,i,a){let n=(a=a||{}).data=a.data||{},o=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(n=a.data={},o=a.garbageCollect=[],a.font=e),t.save(),t.font=e;let r=0;var s=i.length;let l,h,c,d,u;for(l=0;l<s;l++)if(null!=(d=i[l])&&!0!==N(d))r=Nt(t,n,o,r,d);else if(N(d))for(h=0,c=d.length;h<c;h++)null==(u=d[h])||N(u)||(r=Nt(t,n,o,r,u));t.restore();var g=o.length/2;if(g>i.length){for(l=0;l<g;l++)delete n[o[l]];o.splice(0,g)}return r}function $t(t,e,i){t=t.currentDevicePixelRatio,i=0!==i?Math.max(i/2,.5):0;return Math.round((e-i)*t)/t+i}function Yt(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Ut(t,e,i,a){let n,o,r,s,l;const h=e.pointStyle,c=e.rotation,d=e.radius;let u=(c||0)*vt;if(h&&"object"==typeof h&&("[object HTMLImageElement]"===(n=h.toString())||"[object HTMLCanvasElement]"===n))return t.save(),t.translate(i,a),t.rotate(u),t.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),h){default:t.arc(i,a,d,0,mt),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,a-Math.cos(u)*d),u+=wt,t.lineTo(i+Math.sin(u)*d,a-Math.cos(u)*d),u+=wt,t.lineTo(i+Math.sin(u)*d,a-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,s=d-l,o=Math.cos(u+yt)*s,r=Math.sin(u+yt)*s,t.arc(i-o,a-r,l,u-pt,u-_t),t.arc(i+r,a-o,l,u-_t,u),t.arc(i+o,a+r,l,u,u+_t),t.arc(i-r,a+o,l,u+_t,u+pt),t.closePath();break;case"rect":if(!c){s=Math.SQRT1_2*d,t.rect(i-s,a-s,2*s,2*s);break}u+=yt;case"rectRot":o=Math.cos(u)*d,r=Math.sin(u)*d,t.moveTo(i-o,a-r),t.lineTo(i+r,a-o),t.lineTo(i+o,a+r),t.lineTo(i-r,a+o),t.closePath();break;case"crossRot":u+=yt;case"cross":o=Math.cos(u)*d,r=Math.sin(u)*d,t.moveTo(i-o,a-r),t.lineTo(i+o,a+r),t.moveTo(i+r,a-o),t.lineTo(i-r,a+o);break;case"star":o=Math.cos(u)*d,r=Math.sin(u)*d,t.moveTo(i-o,a-r),t.lineTo(i+o,a+r),t.moveTo(i+r,a-o),t.lineTo(i-r,a+o),u+=yt,o=Math.cos(u)*d,r=Math.sin(u)*d,t.moveTo(i-o,a-r),t.lineTo(i+o,a+r),t.moveTo(i+r,a-o),t.lineTo(i-r,a+o);break;case"line":o=Math.cos(u)*d,r=Math.sin(u)*d,t.moveTo(i-o,a-r),t.lineTo(i+o,a+r);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(u)*d,a+Math.sin(u)*d)}t.fill(),0<e.borderWidth&&t.stroke()}}function Xt(t,e,i){return i=i||.5,t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function qt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Kt(t){t.restore()}function Gt(t,e,i,a,n){if(!e)return t.lineTo(i.x,i.y);if("middle"===n){const a=(e.x+i.x)/2;t.lineTo(a,e.y),t.lineTo(a,i.y)}else"after"===n!=!!a?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Zt(t,e,i,a){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(a?e.cp1x:e.cp2x,a?e.cp1y:e.cp2y,a?i.cp2x:i.cp1x,a?i.cp2y:i.cp1y,i.x,i.y)}function Qt(t,e,i,a,n,o={}){const r=N(e)?e:[e],s=0<o.strokeWidth&&""!==o.strokeColor;let l,h;for(t.save(),o.translation&&t.translate(o.translation[0],o.translation[1]),H(o.rotation)||t.rotate(o.rotation),t.font=n.string,o.color&&(t.fillStyle=o.color),o.textAlign&&(t.textAlign=o.textAlign),o.textBaseline&&(t.textBaseline=o.textBaseline),l=0;l<r.length;++l){if(h=r[l],s&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),H(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(h,i,a,o.maxWidth)),t.fillText(h,i,a,o.maxWidth),o.strikethrough||o.underline){const e=t.measureText(h),n=i-e.actualBoundingBoxLeft,r=i+e.actualBoundingBoxRight,s=a-e.actualBoundingBoxAscent,l=a+e.actualBoundingBoxDescent,c=o.strikethrough?(s+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(n,c),t.lineTo(r,c),t.stroke()}a+=n.lineHeight}t.restore()}function Jt(t,e){var{x:i,y:a,w:n,h:o,radius:e}=e;t.arc(i+e.topLeft,a+e.topLeft,e.topLeft,-_t,pt,!0),t.lineTo(i,a+o-e.bottomLeft),t.arc(i+e.bottomLeft,a+o-e.bottomLeft,e.bottomLeft,pt,_t,!0),t.lineTo(i+n-e.bottomRight,a+o),t.arc(i+n-e.bottomRight,a+o-e.bottomRight,e.bottomRight,_t,0,!0),t.lineTo(i+n,a+e.topRight),t.arc(i+n-e.topRight,a+e.topRight,e.topRight,0,-_t,!0),t.lineTo(i+e.topLeft,a)}function te(e,i,t){t=t||(t=>e[t]<i);let a,n=e.length-1,o=0;for(;1<n-o;)t(a=o+n>>1)?o=a:n=a;return{lo:o,hi:n}}const ee=(e,i,a)=>te(e,a,t=>e[t][i]<a),ie=(e,i,a)=>te(e,a,t=>e[t][i]>=a);function ae(t,e,i){let a=0,n=t.length;for(;a<n&&t[a]<e;)a++;for(;n>a&&t[n-1]>i;)n--;return 0<a||n<t.length?t.slice(a,n):t}const ne=["push","pop","shift","splice","unshift"];function oe(n,t){n._chartjs?n._chartjs.listeners.push(t):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ne.forEach(t=>{const i="_onData"+rt(t),a=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...e){var t=a.apply(this,e);return n._chartjs.listeners.forEach(t=>{"function"==typeof t[i]&&t[i](...e)}),t}})}))}function re(e,t){var i=e._chartjs;if(i){const a=i.listeners,n=a.indexOf(t);-1!==n&&a.splice(n,1),0<a.length||(ne.forEach(t=>{delete e[t]}),delete e._chartjs)}}function se(t){const e=new Set;let i,a;for(i=0,a=t.length;i<a;++i)e.add(t[i]);if(e.size===a)return t;const n=[];return e.forEach(t=>{n.push(t)}),n}function le(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function he(t,e,i){let a;return"string"==typeof t?(a=parseInt(t,10),-1!==t.indexOf("%")&&(a=a/100*e.parentNode[i])):a=t,a}const ce=t=>window.getComputedStyle(t,null);function de(t,e){return ce(t).getPropertyValue(e)}const ue=["top","right","bottom","left"];function ge(e,i,a){const n={};a=a?"-"+a:"";for(let t=0;t<4;t++){var o=ue[t];n[o]=parseFloat(e[i+"-"+o+a])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function fe(t,e){var{canvas:l,currentDevicePixelRatio:i}=e,a=ce(l),n="border-box"===a.boxSizing,o=ge(a,"padding"),r=ge(a,"border","width"),{x:s,y:h,box:a}=function(t){var e=t.native||t,i=e.touches,a=i&&i.length?i[0]:e,{offsetX:t,offsetY:i}=a;let n,o,r=!1;if(e=e.target,!(0<t||0<i)||e&&e.shadowRoot){const s=l.getBoundingClientRect();n=a.clientX-s.left,o=a.clientY-s.top,r=!0}else n=t,o=i;return{x:n,y:o,box:r}}(t),t=o.left+(a&&r.left),a=o.top+(a&&r.top);let{width:c,height:d}=e;return n&&(c-=o.width+r.width,d-=o.height+r.height),{x:Math.round((s-t)/c*l.width/i),y:Math.round((h-a)/d*l.height/i)}}const pe=t=>Math.round(10*t)/10;function me(t,e,i,a){var n=ce(t),o=ge(n,"margin"),r=he(n.maxWidth,t,"clientWidth")||bt,s=he(n.maxHeight,t,"clientHeight")||bt,i=function(t,e,i){let a,n;if(void 0===e||void 0===i){const o=le(t);if(o){const t=o.getBoundingClientRect(),r=ce(o),s=ge(r,"border","width"),l=ge(r,"padding");e=t.width-l.width-s.width,i=t.height-l.height-s.height,a=he(r.maxWidth,o,"clientWidth"),n=he(r.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:a||bt,maxHeight:n||bt}}(t,e,i);let{width:l,height:h}=i;if("content-box"===n.boxSizing){const t=ge(n,"border","width"),e=ge(n,"padding");l-=e.width+t.width,h-=e.height+t.height}return l=Math.max(0,l-o.width),h=Math.max(0,a?Math.floor(l/a):h-o.height),l=pe(Math.min(l,r,i.maxWidth)),h=pe(Math.min(h,s,i.maxHeight)),l&&!h&&(h=pe(l/2)),{width:l,height:h}}function xe(t,e,i){const a=t.currentDevicePixelRatio=e||1,{canvas:n,width:o,height:r}=t;n.height=r*a,n.width=o*a,t.ctx.setTransform(a,0,0,a,0,0),n.style&&(i||!n.style.height&&!n.style.width)&&(n.style.height=r+"px",n.style.width=o+"px")}var be=function(){let t=!1;try{var e={get passive(){return!(t=!0)}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ve(t,e){const i=de(t,e),a=i&&i.match(/^(\d+)(\.\d+)?px$/);return a?+a[1]:void 0}function _e(t,e){return"native"in t?{x:t.x,y:t.y}:fe(t,e)}function ye(t,i,a,n,o){var r=t.getSortedVisibleDatasetMetas(),s=a[i];for(let t=0,e=r.length;t<e;++t){const{index:a,data:l}=r[t],{lo:h,hi:c}=function(t,e,i,a){const{controller:n,data:o,_sorted:r}=t,s=n._cachedMeta.iScale;if(s&&e===s.axis&&r&&o.length){const t=s._reversePixels?ie:ee;if(!a)return t(o,e,i);if(n._sharedOptions){const a=o[0],n="function"==typeof a.getRange&&a.getRange(e);if(n){const a=t(o,e,i-n),r=t(o,e,i+n);return{lo:a.lo,hi:r.hi}}}}return{lo:0,hi:o.length-1}}(r[t],i,s,o);for(let t=h;t<=c;++t){const i=l[t];i.skip||n(i,a,t)}}}function we(t,a,e,n){const o=[];return Xt(a,t.chartArea,t._minPadding)&&ye(t,e,a,function(t,e,i){t.inRange(a.x,a.y,n)&&o.push({element:t,datasetIndex:e,index:i})},!0),o}function Me(t,n,e,o,r){const s=function(t){const a=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,e){var i=a?Math.abs(t.x-e.x):0,e=n?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(e,2))}}(e);let l=Number.POSITIVE_INFINITY,h=[];return Xt(n,t.chartArea,t._minPadding)&&ye(t,e,n,function(t,e,i){var a;o&&!t.inRange(n.x,n.y,r)||(a=t.getCenterPoint(r),(a=s(n,a))<l?(h=[{element:t,datasetIndex:e,index:i}],l=a):a===l&&h.push({element:t,datasetIndex:e,index:i}))}),h}function ke(t,e,i,l){const h=_e(e,t),c=[],d=i.axis,u="x"===d?"inXRange":"inYRange";let g=!1;return function(){var i,a,n,o,r,s=t.getSortedVisibleDatasetMetas();for(let t=0,e=s.length;t<e;++t){({index:i,data:a}=s[t]);for(let t=0,e=a.length;t<e;++t)(r=a[t]).skip||(n=r,o=i,r=t,n[u](h[d],l)&&c.push({element:n,datasetIndex:o,index:r}),n.inRange(h.x,h.y,l)&&(g=!0))}}(),i.intersect&&!g?[]:c}var Se={modes:{index(t,e,i,a){const n=_e(e,t),o=i.axis||"x",r=i.intersect?we(t,n,o,a):Me(t,n,o,!1,a),s=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{var e=r[0].index,i=t.data[e];i&&!i.skip&&s.push({element:i,datasetIndex:t.index,index:e})}),s):[]},dataset(t,e,i,a){var n=_e(e,t),e=i.axis||"xy";let o=i.intersect?we(t,n,e,a):Me(t,n,e,!1,a);if(0<o.length){const r=o[0].datasetIndex,i=t.getDatasetMeta(r).data;o=[];for(let t=0;t<i.length;++t)o.push({element:i[t],datasetIndex:r,index:t})}return o},point:(t,e,i,a)=>we(t,_e(e,t),i.axis||"xy",a),nearest:(t,e,i,a)=>Me(t,_e(e,t),i.axis||"xy",i.intersect,a),x:(t,e,i,a)=>(i.axis="x",ke(t,e,i,a)),y:(t,e,i,a)=>(i.axis="y",ke(t,e,i,a))}};const Pe=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),De=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Ce(t,e){var i=(""+t).match(Pe);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Oe(e,i){const t={},a=j(i),n=a?Object.keys(i):i,o=j(e)?a?t=>U(e[t],e[i[t]]):t=>e[t]:()=>e;for(const e of n)t[e]=+o(e)||0;return t}function Ae(t){return Oe(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Te(t){return Oe(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Re(t){const e=Ae(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Le(t,e){e=e||ft.font;let i=U((t=t||{}).size,e.size);"string"==typeof i&&(i=parseInt(i,10));let a=U(t.style,e.style);a&&!(""+a).match(De)&&(console.warn('Invalid font style specified: "'+a+'"'),a="");const n={family:U(t.family,e.family),lineHeight:Ce(U(t.lineHeight,e.lineHeight),i),size:i,style:a,weight:U(t.weight,e.weight),string:""};return n.string=Ht(n),n}function Ee(t,e,i,a){let n,o,r,s=!0;for(n=0,o=t.length;n<o;++n)if(r=t[n],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),s=!1),void 0!==i&&N(r)&&(r=r[i%r.length],s=!1),void 0!==r))return a&&!s&&(a.cacheable=!1),r}function Ie(t,e){var{min:i,max:t}=t;return{min:i-Math.abs(q(e,i)),max:t+q(e,t)}}const ze=["left","top","right","bottom"];function Fe(t,e){return t.filter(t=>t.pos===e)}function Ve(t,e){return t.filter(t=>-1===ze.indexOf(t.pos)&&t.box.axis===e)}function Be(t,a){return t.sort((t,e)=>{var i=a?e:t,e=a?t:e;return i.weight===e.weight?i.index-e.index:i.weight-e.weight})}function We(t,e,i,a){return Math.max(t[i],e[i])+Math.max(t[a],e[a])}function He(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ne(t,i){const a=i.maxPadding;return function(t){const e={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{e[t]=Math.max(i[t],a[t])}),e}(t?["left","right"]:["top","bottom"])}function je(t,e,i){const a=[];let n,o,r,s,l,h;for(n=0,o=t.length,l=0;n<o;++n){r=t[n],s=r.box,s.update(r.width||e.w,r.height||e.h,Ne(r.horizontal,e));const{same:o,other:c}=function(t,e,i){const a=i.box,n=t.maxPadding;j(i.pos)||(i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?a.height:a.width,t[i.pos]+=i.size),a.getPadding&&He(n,a.getPadding());var o=Math.max(0,e.outerWidth-We(n,t,"left","right")),r=Math.max(0,e.outerHeight-We(n,t,"top","bottom")),s=o!==t.w,e=r!==t.h;return t.w=o,t.h=r,i.horizontal?{same:s,other:e}:{same:e,other:s}}(e,i,r);l|=o&&a.length,h=h||c,s.fullSize||a.push(r)}return l&&je(a,e,i)||h}function $e(t,e,i){var a=i.padding;let n,o,r,s,l=e.x,h=e.y;for(n=0,o=t.length;n<o;++n)r=t[n],s=r.box,r.horizontal?(s.left=(s.fullSize?a:e).left,s.right=s.fullSize?i.outerWidth-a.right:e.left+e.w,s.top=h,s.bottom=h+s.height,s.width=s.right-s.left,h=s.bottom):(s.left=l,s.right=l+s.width,s.top=(s.fullSize?a:e).top,s.bottom=s.fullSize?i.outerHeight-a.right:e.top+e.h,s.height=s.bottom-s.top,l=s.right);e.x=l,e.y=h}ft.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var Ye={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){e=t.boxes?t.boxes.indexOf(e):-1;-1!==e&&t.boxes.splice(e,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(l,t,e,i){if(l){const n=Re(l.options.layout.padding),o=t-n.width,r=e-n.height,s=function(){const t=function(t){const e=[];let i,a,n;for(i=0,a=(t||[]).length;i<a;++i)n=t[i],e.push({index:i,box:n,pos:n.position,horizontal:n.isHorizontal(),weight:n.weight});return e}(l.boxes),e=Be(t.filter(t=>t.box.fullSize),!0),i=Be(Fe(t,"left"),!0),a=Be(Fe(t,"right")),n=Be(Fe(t,"top"),!0),o=Be(Fe(t,"bottom")),r=Ve(t,"x"),s=Ve(t,"y");return{fullSize:e,leftAndTop:i.concat(n),rightAndBottom:a.concat(s).concat(o).concat(r),chartArea:Fe(t,"chartArea"),vertical:i.concat(a).concat(s),horizontal:n.concat(o).concat(r)}}(),h=s.vertical,c=s.horizontal;G(l.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});var a=h.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,e=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/a,hBoxMaxHeight:r/2}),a=Object.assign({},n);He(a,Re(i));const d=Object.assign({maxPadding:a,w:o,h:r,x:n.left,y:n.top},n);!function(t,e){let i,a,n;for(i=0,a=t.length;i<a;++i)n=t[i],n.horizontal?(n.width=n.box.fullSize&&e.availableWidth,n.height=e.hBoxMaxHeight):(n.width=e.vBoxMaxWidth,n.height=n.box.fullSize&&e.availableHeight)}(h.concat(c),e),je(s.fullSize,d,e),je(h,d,e),je(c,d,e)&&je(h,d,e),function(i){const a=i.maxPadding;function t(t){var e=Math.max(a[t]-i[t],0);return i[t]+=e,e}i.y+=t("top"),i.x+=t("left"),t("right"),t("bottom")}(d),$e(s.leftAndTop,d,e),d.x+=d.w,d.y+=d.h,$e(s.rightAndBottom,d,e),l.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},G(s.chartArea,t=>{const e=t.box;Object.assign(e,l.chartArea),e.update(d.w,d.h)})}}};class Ue{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,a){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,a?Math.floor(e/a):i)}}isAttached(t){return!0}}class Xe extends Ue{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const qe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ke=t=>null===t||""===t,Ge=!!be&&{passive:!0};function Ze(t,e,n){const i=t.canvas,o=i&&le(i)||i,a=new MutationObserver(t=>{const a=le(o);t.forEach(e=>{for(let t=0;t<e.addedNodes.length;t++){var i=e.addedNodes[t];i!==o&&i!==a||n(e.target)}})});return a.observe(document,{childList:!0,subtree:!0}),a}function Qe(t,e,i){const a=t.canvas,n=a&&le(a);if(n){const o=new MutationObserver(t=>{t.forEach(e=>{for(let t=0;t<e.removedNodes.length;t++)if(e.removedNodes[t]===a){i();break}})});return o.observe(n,{childList:!0}),o}}const Je=new Map;let ti=0;function ei(){const i=window.devicePixelRatio;i!==ti&&(ti=i,Je.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function ii(t,e,a){const i=t.canvas,n=i&&le(i);if(n){const r=l((t,e)=>{var i=n.clientWidth;a(t,e),i<n.clientWidth&&a()},window),s=new ResizeObserver(t=>{var e=t[0],t=e.contentRect.width,e=e.contentRect.height;0===t&&0===e||r(t,e)});return s.observe(n),o=t,t=r,Je.size||window.addEventListener("resize",ei),Je.set(o,t),s;var o}}function ai(t,e,i){i&&i.disconnect(),"resize"===e&&(t=t,Je.delete(t),Je.size||window.removeEventListener("resize",ei))}function ni(e,t,i){var a=e.canvas,n=l(t=>{null!==e.ctx&&i(function(t,e){var i=qe[t.type]||t.type,{x:a,y:n}=fe(t,e);return{type:i,chart:e,native:t,x:void 0!==a?a:null,y:void 0!==n?n:null}}(t,e))},e,t=>{t=t[0];return[t,t.offsetX,t.offsetY]});return a.addEventListener(t,n,Ge),n}class oi extends Ue{acquireContext(t,e){var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,a=t.getAttribute("height"),n=t.getAttribute("width");if(t.$chartjs={initial:{height:a,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Ke(n)){const e=ve(t,"width");void 0!==e&&(t.width=e)}if(Ke(a))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ve(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const i=t.canvas;if(!i.$chartjs)return!1;const a=i.$chartjs.initial;["height","width"].forEach(t=>{var e=a[t];H(e)?i.removeAttribute(t):i.setAttribute(t,e)});const e=a.style||{};return Object.keys(e).forEach(t=>{i.style[t]=e[t]}),i.width=i.width,delete i.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const a=t.$proxies||(t.$proxies={}),n={attach:Ze,detach:Qe,resize:ii}[e]||ni;a[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),a=i[e];a&&(({attach:ai,detach:ai,resize:ai}[e]||function(t,e,i){t.canvas.removeEventListener(e,i,Ge)})(t,e,a),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,a){return me(t,e,i,a)}isAttached(t){t=le(t);return!(!t||!le(t))}}var ri=Object.freeze({__proto__:null,BasePlatform:Ue,BasicPlatform:Xe,DomPlatform:oi});const si=t=>0===t||1===t,li=(t,e,i)=>-Math.pow(2,10*--t)*Math.sin((t-e)*mt/i),hi=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*mt/i)+1,ci={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-(--t*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>--t*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*_t),easeOutSine:t=>Math.sin(t*_t),easeInOutSine:t=>-.5*(Math.cos(pt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>si(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>1<=t?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1- --t*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>si(t)?t:li(t,.075,.3),easeOutElastic:t=>si(t)?t:hi(t,.075,.3),easeInOutElastic(t){return si(t)?t:t<.5?.5*li(2*t,.1125,.45):.5+.5*hi(2*t-1,.1125,.45)},easeInBack(t){return t*t*(2.70158*t-1.70158)},easeOutBack(t){return--t*t*(2.70158*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ci.easeOutBounce(1-t),easeOutBounce(t){var e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ci.easeInBounce(2*t):.5*ci.easeOutBounce(2*t-1)+.5},di="transparent",ui={boolean:(t,e,i)=>.5<i?e:t,color(t,e,i){const a=V(t||di),n=a.valid&&V(e||di);return n&&n.valid?n.mix(a,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class gi{constructor(t,e,i,a){var n=e[i];a=Ee([t.to,a,n,t.from]);n=Ee([t.from,n,a]);this._active=!0,this._fn=t.fn||ui[t.type||typeof n],this._easing=ci[t.easing]||ci.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=n,this._to=a,this._promises=void 0}active(){return this._active}update(t,e,i){var a,n,o,r=this;r._active&&(r._notify(!1),a=r._target[r._prop],n=i-r._start,o=r._duration-n,r._start=i,r._duration=Math.floor(Math.max(o,t.duration)),r._total+=n,r._loop=!!t.loop,r._to=Ee([t.to,e,a,t.from]),r._from=Ee([t.from,a,e]))}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){var e=this,i=t-e._start,a=e._duration,n=e._prop,o=e._from,r=e._loop,t=e._to;let s;if(e._active=o!==t&&(r||i<a),!e._active)return e._target[n]=t,void e._notify(!0);i<0?e._target[n]=o:(s=i/a%2,s=r&&1<s?2-s:s,s=e._easing(Math.min(1,Math.max(0,s))),e._target[n]=e._fn(o,t,s))}wait(){const i=this._promises||(this._promises=[]);return new Promise((t,e)=>{i.push({res:t,rej:e})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}ft.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const fi=Object.keys(ft.animation);ft.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),ft.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),ft.describe("animations",{_fallback:"animation"}),ft.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class pi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(a){if(j(a)){const n=this._properties;Object.getOwnPropertyNames(a).forEach(e=>{const t=a[e];if(j(t)){const i={};for(const a of fi)i[a]=t[a];(N(t.properties)&&t.properties||[e]).forEach(t=>{t!==e&&n.has(t)||n.set(t,i)})}})}}_animateOptions(t,e){const i=e.options,a=function(e,i){if(i){let t=e.options;if(t)return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;e.options=i}}(t,i);if(!a)return[];e=this._createAnimations(a,i);return i.$shared&&function(e,t){const i=[],a=Object.keys(t);for(let t=0;t<a.length;t++){const n=e[a[t]];n&&n.active()&&i.push(n.wait())}return Promise.all(i)}(t.options.$animations,i).then(()=>{t.options=i},()=>{}),e}_createAnimations(e,i){const a=this._properties,n=[],o=e.$animations||(e.$animations={}),t=Object.keys(i),r=Date.now();let s;for(s=t.length-1;0<=s;--s){const c=t[s];if("$"!==c.charAt(0))if("options"!==c){var l=i[c];let t=o[c];var h=a.get(c);if(t){if(h&&t.active()){t.update(h,l,r);continue}t.cancel()}h&&h.duration?(o[c]=t=new gi(h,e,c,l),n.push(t)):e[c]=l}else n.push(...this._animateOptions(e,i))}return n}update(t,e){if(0!==this._properties.size){var i=this._createAnimations(t,e);return i.length?(h.add(this._chart,i),!0):void 0}Object.assign(t,e)}}function mi(t,e){var i=t&&t.options||{},a=i.reverse,t=void 0===i.min?e:0,e=void 0===i.max?e:0;return{start:a?e:t,end:a?t:e}}function xi(t,e){const i=[],a=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=a.length;n<o;++n)i.push(a[n].index);return i}function bi(t,e,i,a){var n=t.keys,o="single"===a.mode;let r,s,l,h;if(null!==e){for(r=0,s=n.length;r<s;++r){if((l=+n[r])===i){if(a.all)continue;break}h=t.values[l],$(h)&&(o||0===e||kt(e)===kt(h))&&(e+=h)}return e}}function vi(t,e){t=t&&t.options.stacked;return t||void 0===t&&void 0!==e.stack}function _i(t,e,i){for(const a of e.getMatchingVisibleMetas("bar").reverse()){const e=t[a.index];if(i&&0<e||!i&&e<0)return a.index}return null}function yi(t,e){const{chart:i,_cachedMeta:a}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:r,index:s}=a,l=o.axis,h=r.axis,c=(u=o,g=r,t=a,`${u.id}.${g.id}.${t.stack||t.type}`),d=e.length;var u,g;let f;for(let t=0;t<d;++t){const i=e[t],{[l]:a,[h]:o}=i;f=(i._stacks||(i._stacks={}))[h]=function(t,e,i){const a=t[e]||(t[e]={});return a[i]||(a[i]={})}(n,c,a),f[s]=o,f._top=_i(f,r,!0),f._bottom=_i(f,r,!1)}}function wi(t,e){const i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function Mi(t,e){for(const i of e=e||t._parsed){const e=i._stacks;if(!e||void 0===e[t.vScale.id]||void 0===e[t.vScale.id][t.index])return;delete e[t.vScale.id][t.index]}}const ki=t=>"reset"===t||"none"===t,Si=(t,e)=>e?t:Object.assign({},t);class Pi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=vi(t.vScale,t),this.addElements()}updateIndex(t){this.index=t}linkScales(){const t=this,e=t.chart,i=t._cachedMeta,a=t.getDataset(),n=(t,e,i,a)=>"x"===t?e:"r"===t?a:i,o=i.xAxisID=U(a.xAxisID,wi(e,"x")),r=i.yAxisID=U(a.yAxisID,wi(e,"y")),s=i.rAxisID=U(a.rAxisID,wi(e,"r")),l=i.indexAxis,h=i.iAxisID=n(l,o,r,s),c=i.vAxisID=n(l,r,o,s);i.xScale=t.getScaleForId(o),i.yScale=t.getScaleForId(r),i.rScale=t.getScaleForId(s),i.iScale=t.getScaleForId(h),i.vScale=t.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){var e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){var t=this._cachedMeta;this._data&&re(this._data,this),t._stacked&&Mi(t)}_dataCheck(){const t=this,e=t.getDataset(),i=e.data||(e.data=[]);j(i)?t._data=function(t){const e=Object.keys(t),i=new Array(e.length);let a,n,o;for(a=0,n=e.length;a<n;++a)o=e[a],i[a]={x:o,y:t[o]};return i}(i):t._data!==i&&(t._data&&(re(t._data,t),Mi(t._cachedMeta)),i&&Object.isExtensible(i)&&oe(i,t),t._data=i)}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this,i=e._cachedMeta,a=e.getDataset();let n=!1;e._dataCheck(),i._stacked=vi(i.vScale,i),i.stack!==a.stack&&(n=!0,Mi(i),i.stack=a.stack),e._resyncElements(t),n&&yi(e,i._parsed)}configure(){const t=this,e=t.chart.config,i=e.datasetScopeKeys(t._type),a=e.getOptionScopes(t.getDataset(),i,!0);t.options=e.createResolver(a,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const i=this,{_cachedMeta:a,_data:n}=i,{iScale:o,_stacked:r}=a,s=o.axis;let l,h,c,d=0===t&&e===n.length||a._sorted,u=0<t&&a._parsed[t-1];if(!1===i._parsing)a._parsed=n,a._sorted=!0,c=n;else{c=N(n[t])?i.parseArrayData(a,n,t,e):j(n[t])?i.parseObjectData(a,n,t,e):i.parsePrimitiveData(a,n,t,e);const o=()=>null===h[s]||u&&h[s]<u[s];for(l=0;l<e;++l)a._parsed[l+t]=h=c[l],d&&(o()&&(d=!1),u=h);a._sorted=d}r&&yi(i,c)}parsePrimitiveData(t,e,i,a){const{iScale:n,vScale:o}=t,r=n.axis,s=o.axis,l=n.getLabels(),h=n===o,c=new Array(a);let d,u,g;for(d=0,u=a;d<u;++d)g=d+i,c[d]={[r]:h||n.parse(l[g],g),[s]:o.parse(e[g],g)};return c}parseArrayData(t,e,i,a){const{xScale:n,yScale:o}=t,r=new Array(a);let s,l,h,c;for(s=0,l=a;s<l;++s)c=e[h=s+i],r[s]={x:n.parse(c[0],h),y:o.parse(c[1],h)};return r}parseObjectData(t,e,i,a){const{xScale:n,yScale:o}=t,{xAxisKey:r="x",yAxisKey:s="y"}=this._parsing,l=new Array(a);let h,c,d,u;for(h=0,c=a;h<c;++h)u=e[d=h+i],l[h]={x:n.parse(ot(u,r),d),y:o.parse(ot(u,s),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){var a=this.chart,n=this._cachedMeta,o=e[t.axis];return bi({keys:xi(a,!0),values:e._stacks[t.axis]},o,n.index,{mode:i})}updateRangeFromParsed(t,e,i,a){var n=i[e.axis];let o=null===n?NaN:n;e=a&&i._stacks[e.axis];a&&e&&(a.values=e,t.min=Math.min(t.min,o),t.max=Math.max(t.max,o),o=bi(a,n,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this,a=i._cachedMeta,n=a._parsed,o=a._sorted&&t===a.iScale,r=n.length,s=i._getOtherScale(t),l=e&&a._stacked&&{keys:xi(i.chart,!0),values:null},h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(){var{min:t,max:e,minDefined:i,maxDefined:a}=s.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:a?e:Number.POSITIVE_INFINITY}}();let u,g,f,p;function m(){return f=n[u],g=f[t.axis],p=f[s.axis],!$(g)||c>p||d<p}for(u=0;u<r&&(m()||(i.updateRangeFromParsed(h,t,f,l),!o));++u);if(o)for(u=r-1;0<=u;--u)if(!m()){i.updateRangeFromParsed(h,t,f,l);break}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let a,n,o;for(a=0,n=e.length;a<n;++a)o=e[a][t.axis],$(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,a=e.vScale,n=this.getParsed(t);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:a?""+a.getLabelForValue(n[a.axis]):""}}_update(t){const e=this,i=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),i._clip=function(t){let e,i,a,n;return j(t)?(e=t.top,i=t.right,a=t.bottom,n=t.left):e=i=a=n=t,{top:e,right:i,bottom:a,left:n}}(U(e.options.clip,function(t,e,i){if(!1===i)return!1;t=mi(t,i),i=mi(e,i);return{top:i.end,right:t.end,bottom:i.start,left:t.start}}(i.xScale,i.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,i=t.chart,a=t._cachedMeta,n=a.data||[],o=i.chartArea,r=[],s=t._drawStart||0,l=t._drawCount||n.length-s;let h;for(a.dataset&&a.dataset.draw(e,o,s,l),h=s;h<s+l;++h){const t=n[h];t.active?r.push(t):t.draw(e,o)}for(h=0;h<r.length;++h)r[h].draw(e,o)}getStyle(t,e){e=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(e):this.resolveDataElementOptions(t||0,e)}getContext(t,e,i){var a,n,o,r=this,s=r.getDataset();let l;if(0<=t&&t<r._cachedMeta.data.length){const e=r._cachedMeta.data[t];l=e.$context||(e.$context=(a=r.getContext(),n=t,o=e,Object.assign(Object.create(a),{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:o,index:n,mode:"default",type:"data"}))),l.parsed=r.getParsed(t),l.raw=s.data[t]}else l=r.$context||(r.$context=(t=r.chart.getContext(),r=r.index,Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:r,index:r,mode:"default",type:"dataset"}))),l.dataset=s;return l.active=!!e,l.mode=i,l}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const a=this,n="active"===e,o=a._cachedDataOpts,r=t+"-"+e,s=o[r],l=a.enableOptionSharing&&st(i);if(s)return Si(s,l);const h=a.chart.config,c=h.datasetElementScopeKeys(a._type,t),d=n?[t+"Hover","hover",t,""]:[t,""],u=h.getOptionScopes(a.getDataset(),c),g=Object.keys(ft.elements[t]),f=h.resolveNamedOptions(u,g,()=>a.getContext(i,n),d);return f.$shared&&(f.$shared=l,o[r]=Object.freeze(Si(f,l))),f}_resolveAnimations(t,e,i){const a=this,n=a.chart,o=a._cachedDataOpts,r="animation-"+e,s=o[r];if(s)return s;let l;if(!1!==n.options.animation){const n=a.chart.config,o=n.datasetAnimationScopeKeys(a._type,e),r=n.getOptionScopes(a.getDataset(),o);l=n.createResolver(r,a.getContext(t,i,e))}e=new pi(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(e)),e}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ki(t)||this.chart._animationsDisabled}updateElement(t,e,i,a){ki(a)?Object.assign(t,i):this._resolveAnimations(e,a).update(t,i)}updateSharedOptions(t,e,i){t&&!ki(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,a){t.active=a;var n=this.getStyle(e,a);this._resolveAnimations(e,i,a).update(t,{options:!a&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){var e=this,i=e._cachedMeta.data.length,a=e._data.length;i<a?e._insertElements(i,a-i,t):a<i&&e._removeElements(a,i-a);i=Math.min(a,i);i&&e.parse(0,i)}_insertElements(t,e,i=!0){const a=this,n=a._cachedMeta,o=n.data,r=t+e;let s;var l=t=>{for(t.length+=e,s=t.length-1;s>=r;s--)t[s]=t[s-e]};for(l(o),s=t;s<r;++s)o[s]=new a.dataElementType;a._parsing&&l(n._parsed),a.parse(t,e),i&&a.updateElements(o,t,e,"reset")}updateElements(t,e,i,a){}_removeElements(t,e){const i=this._cachedMeta;var a;this._parsing&&(a=i._parsed.splice(t,e),i._stacked&&Mi(i,a)),i.data.splice(t,e)}_onDataPush(){var t=arguments.length;this._insertElements(this.getDataset().data.length-t,t)}_onDataPop(){this._removeElements(this._cachedMeta.data.length-1,1)}_onDataShift(){this._removeElements(0,1)}_onDataSplice(t,e){this._removeElements(t,e),this._insertElements(t,arguments.length-2)}_onDataUnshift(){this._insertElements(0,arguments.length)}}Pi.defaults={},Pi.prototype.datasetElementType=null,Pi.prototype.dataElementType=null;class Di{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){var{x:e,y:t}=this.getProps(["x","y"],t);return{x:e,y:t}}hasValue(){return Dt(this.x)&&Dt(this.y)}getProps(t,e){const i=this,a=this.$animations;if(!e||!a)return i;const n={};return t.forEach(t=>{n[t]=a[t]&&a[t].active()?a[t]._to:i[t]}),n}}Di.defaults={},Di.defaultRoutes=void 0;const Ci=new Map;function Oi(t,e,i){return function(t,e){e=e||{};var i=t+JSON.stringify(e);let a=Ci.get(i);return a||(a=new Intl.NumberFormat(t,e),Ci.set(i,a)),a}(e,i).format(t)}const Ai={values:t=>N(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";var a=this.chart.options.locale;let n,o=t;if(1<i.length){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||1e15<e)&&(n="scientific"),o=function(t){let e=3<i.length?i[2].value-i[1].value:i[1].value-i[0].value;return 1<Math.abs(e)&&t!==Math.floor(t)&&(e=t-Math.floor(t)),e}(t)}var r=Mt(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(r),20),0),r={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(r,this.options.ticks.format),Oi(t,a,r)},logarithmic(t,e,i){if(0===t)return"0";var a=t/Math.pow(10,Math.floor(Mt(t)));return 1==a||2==a||5==a?Ai.numeric.call(this,t,e,i):""}};var Ti={formatters:Ai};function Ri(t,i){const e=t.options.ticks,a=e.maxTicksLimit||(c=(h=t).options.offset,t=h._tickSize(),c=h._length/t+(c?0:1),t=h._maxLength/t,Math.floor(Math.min(c,t))),n=e.major.enabled?function(t){const e=[];let i,a;for(i=0,a=t.length;i<a;i++)t[i].major&&e.push(i);return e}(i):[],o=n.length,r=n[0],s=n[o-1],l=[];var h,c;if(o>a)return function(t,e,i,a){let n,o=0,r=i[0];for(a=Math.ceil(a),n=0;n<t.length;n++)n===r&&(e.push(t[n]),o++,r=i[o*a])}(i,l,n,o/a),l;var d=function(t,i,e){var t=function(t){var e=t.length;let i,a;if(e<2)return!1;for(a=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==a)return!1;return a}(t),a=i.length/e;if(!t)return Math.max(a,1);var n=Pt(t);for(let t=0,e=n.length-1;t<e;t++){const i=n[t];if(i>a)return i}return Math.max(a,1)}(n,i,a);if(0<o){let t,e;const a=1<o?Math.round((s-r)/(o-1)):null;for(Li(i,l,d,H(a)?0:r-a,r),t=0,e=o-1;t<e;t++)Li(i,l,d,n[t],n[t+1]);return Li(i,l,d,s,H(a)?i.length:s+a),l}return Li(i,l,d),l}function Li(t,e,i,a,n){var o=U(a,0),r=Math.min(U(n,t.length),t.length);let s,l,h,c=0;for(i=Math.ceil(i),n&&(i=(s=n-a)/Math.floor(s/i)),h=o;h<0;)c++,h=Math.round(o+c*i);for(l=Math.max(o,0);l<r;l++)l===h&&(e.push(t[l]),c++,h=Math.round(o+c*i))}ft.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ti.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),ft.route("scale.ticks","color","","color"),ft.route("scale.grid","color","","borderColor"),ft.route("scale.grid","borderColor","","borderColor"),ft.route("scale.title","color","","color"),ft.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),ft.describe("scales",{_fallback:"scale"});const Ei=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Ii(t,e){const i=[],a=t.length/e,n=t.length;let o=0;for(;o<n;o+=a)i.push(t[Math.floor(o)]);return i}function zi(t){return t.drawTicks?t.tickLength:0}function Fi(t,e){if(!t.display)return 0;var i=Le(t.font,e),e=Re(t.padding);return(N(t.text)?t.text.length:1)*i.lineHeight+e.height}class Vi extends Di{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){var e=this;e.options=t.setContext(e.getContext()),e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){var{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:a}=this,t=Y(t,Number.POSITIVE_INFINITY),e=Y(e,Number.NEGATIVE_INFINITY),i=Y(i,Number.POSITIVE_INFINITY),a=Y(a,Number.NEGATIVE_INFINITY);return{min:Y(t,i),max:Y(e,a),minDefined:$(t),maxDefined:$(e)}}getMinMax(i){let a,{min:n,max:o,minDefined:r,maxDefined:s}=this.getUserBounds();if(r&&s)return{min:n,max:o};const l=this.getMatchingVisibleMetas();for(let t=0,e=l.length;t<e;++t)a=l[t].controller.getMinMax(this,i),r||(n=Math.min(n,a.min)),s||(o=Math.max(o,a.max));return{min:Y(n,Y(o,n)),max:Y(o,Y(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){K(this.options.beforeUpdate,[this])}update(t,e,i){var a=this,n=a.options.ticks,o=n.sampleSize;a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),a.ticks=null,a._labelSizes=null,a._gridLineItems=null,a._labelItems=null,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a._maxLength=a.isHorizontal()?a.width+i.left+i.right:a.height+i.top+i.bottom,a._dataLimitsCached||(a.beforeDataLimits(),a.determineDataLimits(),a.afterDataLimits(),a._range=Ie(a,a.options.grace),a._dataLimitsCached=!0),a.beforeBuildTicks(),a.ticks=a.buildTicks()||[],a.afterBuildTicks();i=o<a.ticks.length;a._convertTicksToLabels(i?Ii(a.ticks,o):a.ticks),a.configure(),a.beforeCalculateLabelRotation(),a.calculateLabelRotation(),a.afterCalculateLabelRotation(),n.display&&(n.autoSkip||"auto"===n.source)&&(a.ticks=Ri(a,a.ticks),a._labelSizes=null),i&&a._convertTicksToLabels(a.ticks),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate()}configure(){var t=this;let e,i,a=t.options.reverse;t.isHorizontal()?(e=t.left,i=t.right):(e=t.top,i=t.bottom,a=!a),t._startPixel=e,t._endPixel=i,t._reversePixels=a,t._length=i-e,t._alignToPixels=t.options.alignToPixels}afterUpdate(){K(this.options.afterUpdate,[this])}beforeSetDimensions(){K(this.options.beforeSetDimensions,[this])}setDimensions(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0}afterSetDimensions(){K(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),K(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){K(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){var e=this.options.ticks;let i,a,n;for(i=0,a=t.length;i<a;i++)n=t[i],n.label=K(e.callback,[n.value,i,t],this);for(i=0;i<a;i++)H(t[i].label)&&(t.splice(i,1),a--,i--)}afterTickToLabelConversion(){K(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){K(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){var t,e,i,a,n=this,o=n.options,r=o.ticks,s=n.ticks.length,l=r.minRotation||0,h=r.maxRotation;let c,d,u,g=l;!n._isVisible()||!r.display||h<=l||s<=1||!n.isHorizontal()?n.labelRotation=l:(e=(t=n._getLabelSizes()).widest.width,i=t.highest.height,a=Bt(n.chart.width-e,0,n.maxWidth),(o.offset?n.maxWidth/s:a/(s-1))<e+6&&(c=a/(s-(o.offset?.5:1)),d=n.maxHeight-zi(o.grid)-r.padding-Fi(o.title,n.chart.options.font),u=Math.sqrt(e*e+i*i),g=Rt(Math.min(Math.asin(Math.min((t.highest.height+6)/c,1)),Math.asin(Math.min(d/u,1))-Math.asin(i/u))),g=Math.max(l,Math.min(h,g))),n.labelRotation=g)}afterCalculateLabelRotation(){K(this.options.afterCalculateLabelRotation,[this])}beforeFit(){K(this.options.beforeFit,[this])}fit(){const t=this,e={width:0,height:0},{chart:i,options:{ticks:a,title:n,grid:o}}=t,r=t._isVisible(),s=t.isHorizontal();if(r){const r=Fi(n,i.options.font);if(s?(e.width=t.maxWidth,e.height=zi(o)+r):(e.height=t.maxHeight,e.width=zi(o)+r),a.display&&t.ticks.length){const{first:i,last:n,widest:o,highest:r}=t._getLabelSizes(),l=2*a.padding,h=Tt(t.labelRotation),c=Math.cos(h),d=Math.sin(h);if(s){const i=a.mirror?0:d*o.width+c*r.height;e.height=Math.min(t.maxHeight,e.height+i+l)}else{const i=a.mirror?0:c*o.width+d*r.height;e.width=Math.min(t.maxWidth,e.width+i+l)}t._calculatePadding(i,n,d,c)}}t._handleMargins(),s?(t.width=t._length=i.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t._margins.top-t._margins.bottom)}_calculatePadding(i,a,n,o){const r=this,{ticks:{align:s,padding:l},position:h}=r.options,c=0!==r.labelRotation,d="top"!==h&&"x"===r.axis;if(r.isHorizontal()){const h=r.getPixelForTick(0)-r.left,u=r.right-r.getPixelForTick(r.ticks.length-1);let t=0,e=0;c?e=d?(t=o*i.width,n*a.height):(t=n*i.height,o*a.width):"start"===s?e=a.width:"end"===s?t=i.width:(t=i.width/2,e=a.width/2),r.paddingLeft=Math.max((t-h+l)*r.width/(r.width-h),0),r.paddingRight=Math.max((e-u+l)*r.width/(r.width-u),0)}else{let t=a.height/2,e=i.height/2;"start"===s?(t=0,e=i.height):"end"===s&&(t=a.height,e=0),r.paddingTop=t+l,r.paddingBottom=e+l}}_handleMargins(){var t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){K(this.options.afterFit,[this])}isHorizontal(){var{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t),this.afterTickToLabelConversion()}_getLabelSizes(){var e=this;let i=e._labelSizes;if(!i){var a=e.options.ticks.sampleSize;let t=e.ticks;a<t.length&&(t=Ii(t,a)),e._labelSizes=i=e._computeLabelSizes(t,t.length)}return i}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:a}=this,n=[],o=[];let r,s,l,h,c,d,u,g,f,p,m,x=0,b=0;for(r=0;r<e;++r){if(h=t[r].label,c=this._resolveTickFontOptions(r),i.font=d=c.string,u=a[d]=a[d]||{data:{},gc:[]},g=c.lineHeight,f=p=0,H(h)||N(h)){if(N(h))for(s=0,l=h.length;s<l;++s)H(m=h[s])||N(m)||(f=Nt(i,u.data,u.gc,f,m),p+=g)}else f=Nt(i,u.data,u.gc,f,h),p=g;n.push(f),o.push(p),x=Math.max(f,x),b=Math.max(p,b)}var v;w=a,v=e,G(w,t=>{const e=t.gc,i=e.length/2;let a;if(v<i){for(a=0;a<i;++a)delete t.data[e[a]];e.splice(0,i)}});var _=n.indexOf(x),y=o.indexOf(b),w=t=>({width:n[t]||0,height:o[t]||0});return{first:w(0),last:w(e-1),widest:w(_),highest:w(y),widths:n,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){var e=this;e._reversePixels&&(t=1-t);t=e._startPixel+t*e._length;return Wt(e._alignToPixels?$t(e.chart,t,0):t)}getDecimalForPixel(t){t=(t-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){var{min:t,max:e}=this;return t<0&&e<0?e:0<t&&0<e?t:0}getContext(t){var e,i,a=this,n=a.ticks||[];if(0<=t&&t<n.length){const i=n[t];return i.$context||(i.$context=(e=a.getContext(),n=t,t=i,Object.assign(Object.create(e),{tick:t,index:n,type:"tick"})))}return a.$context||(a.$context=(i=a.chart.getContext(),a=a,Object.assign(Object.create(i),{scale:a,type:"scale"})))}_tickSize(){var t=this.options.ticks,e=Tt(this.labelRotation),i=Math.abs(Math.cos(e)),a=Math.abs(Math.sin(e)),n=this._getLabelSizes(),e=t.autoSkipPadding||0,t=n?n.widest.width+e:0,e=n?n.highest.height+e:0;return this.isHorizontal()?t*a<e*i?t/i:e/a:e*a<t*i?e/i:t/a}_isVisible(){var t=this.options.display;return"auto"!==t?!!t:0<this.getMatchingVisibleMetas().length}_computeGridLineItems(t){const e=this,i=e.axis,a=e.chart,n=e.options,{grid:o,position:r}=n,s=o.offset,l=e.isHorizontal(),h=e.ticks.length+(s?1:0),c=zi(o),d=[],u=o.setContext(e.getContext()),g=u.drawBorder?u.borderWidth:0,f=g/2,p=function(t){return $t(a,t,g)};let m,x,b,v,_,y,w,M,k,S,P,D;if("top"===r)m=p(e.bottom),y=e.bottom-c,M=m-f,S=p(t.top)+f,D=t.bottom;else if("bottom"===r)m=p(e.top),S=t.top,D=p(t.bottom)-f,y=m+f,M=e.top+c;else if("left"===r)m=p(e.right),_=e.right-c,w=m-f,k=p(t.left)+f,P=t.right;else if("right"===r)m=p(e.left),k=t.left,P=p(t.right)-f,_=m+f,w=e.left+c;else if("x"===i){if("center"===r)m=p((t.top+t.bottom)/2+.5);else if(j(r)){const t=Object.keys(r)[0],i=r[t];m=p(e.chart.scales[t].getPixelForValue(i))}S=t.top,D=t.bottom,y=m+f,M=y+c}else if("y"===i){if("center"===r)m=p((t.left+t.right)/2);else if(j(r)){const t=Object.keys(r)[0],i=r[t];m=p(e.chart.scales[t].getPixelForValue(i))}_=m-f,w=_-c,k=t.left,P=t.right}for(x=0;x<h;++x){const t=o.setContext(e.getContext(x)),i=t.lineWidth,n=t.color,r=o.borderDash||[],h=t.borderDashOffset,c=t.tickWidth,u=t.tickColor,g=t.tickBorderDash||[],f=t.tickBorderDashOffset;void 0!==(b=function(t,e,i){var a=t.ticks.length,n=Math.min(e,a-1),o=t._startPixel,r=t._endPixel;let s,l=t.getPixelForTick(n);if(!(i&&(s=1===a?Math.max(l-o,r-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(n-1))/2,l+=n<e?s:-s,l<o-1e-6||l>r+1e-6)))return l}(e,x,s))&&(v=$t(a,b,i),l?_=w=k=P=v:y=M=S=D=v,d.push({tx1:_,ty1:y,tx2:w,ty2:M,x1:k,y1:S,x2:P,y2:D,width:i,color:n,borderDash:r,borderDashOffset:h,tickWidth:c,tickColor:u,tickBorderDash:g,tickBorderDashOffset:f}))}return e._ticksLength=h,e._borderValue=m,d}_computeLabelItems(a){const n=this,o=n.axis,r=n.options,{position:t,ticks:e}=r,s=n.isHorizontal(),l=n.ticks,{align:h,crossAlign:c,padding:d,mirror:u}=e,i=zi(r.grid),g=i+d,f=u?-d:g,p=-Tt(n.labelRotation),m=[];let x,b,v,_,y,w,M,k,S,P,D,C="middle";if("top"===t)y=n.bottom-f,w=n._getXAxisLabelAlignment();else if("bottom"===t)y=n.top+f,w=n._getXAxisLabelAlignment();else if("left"===t){const a=n._getYAxisLabelAlignment(i);w=a.textAlign,_=a.x}else if("right"===t){const a=n._getYAxisLabelAlignment(i);w=a.textAlign,_=a.x}else if("x"===o){if("center"===t)y=(a.top+a.bottom)/2+g;else if(j(t)){const a=Object.keys(t)[0],o=t[a];y=n.chart.scales[a].getPixelForValue(o)+g}w=n._getXAxisLabelAlignment()}else if("y"===o){if("center"===t)_=(a.left+a.right)/2-g;else if(j(t)){const a=Object.keys(t)[0],o=t[a];_=n.chart.scales[a].getPixelForValue(o)}w=n._getYAxisLabelAlignment(i).textAlign}"y"===o&&("start"===h?C="top":"end"===h&&(C="bottom"));var O=n._getLabelSizes();for(x=0,b=l.length;x<b;++x){v=l[x].label;const a=e.setContext(n.getContext(x));M=n.getPixelForTick(x)+e.labelOffset,S=(k=n._resolveTickFontOptions(x)).lineHeight;const o=(P=N(v)?v.length:1)/2,r=a.color,h=a.textStrokeColor,d=a.textStrokeWidth;let i;if(s?(_=M,D="top"===t?"near"===c||0!=p?-P*S+S/2:"center"===c?-O.highest.height/2-o*S+S:-O.highest.height+S/2:"near"===c||0!=p?S/2:"center"===c?O.highest.height/2-o*S:O.highest.height-P*S,u&&(D*=-1)):(y=M,D=(1-P)*S/2),a.showLabelBackdrop){const n=Re(a.backdropPadding),o=O.heights[x],r=O.widths[x];let t=y+D-n.top,e=_-n.left;switch(C){case"middle":t-=o/2;break;case"bottom":t-=o}switch(w){case"center":e-=r/2;break;case"right":e-=r}i={left:e,top:t,width:r+n.width,height:o+n.height,color:a.backdropColor}}m.push({rotation:p,label:v,font:k,color:r,strokeColor:h,strokeWidth:d,textOffset:D,textAlign:w,textBaseline:C,translation:[_,y],backdrop:i})}return m}_getXAxisLabelAlignment(){var{position:t,ticks:e}=this.options;if(-Tt(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align&&(i="right"),i}_getYAxisLabelAlignment(t){var e=this,{position:i,ticks:{crossAlign:a,mirror:n,padding:o}}=e.options,r=t+o,t=e._getLabelSizes().widest.width;let s,l;return"left"===i?n?(s="left",l=e.right+o):(l=e.right-r,"near"===a?s="right":"center"===a?(s="center",l-=t/2):(s="left",l=e.left)):"right"===i?n?(s="right",l=e.left+o):(l=e.left+r,"near"===a?s="left":"center"===a?(s="center",l+=t/2):(s="right",l=e.right)):s="right",{textAlign:s,x:l}}_computeLabelArea(){var t=this;if(!t.options.ticks.mirror){var e=t.chart,i=t.options.position;return"left"===i||"right"===i?{top:0,left:t.left,bottom:e.height,right:t.right}:"top"===i||"bottom"===i?{top:t.top,left:0,bottom:t.bottom,right:e.width}:void 0}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:a,width:n,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,a,n,o),t.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;var i=this.ticks.findIndex(t=>t.value===e);return 0<=i?t.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this,i=e.options.grid,a=e.ctx,n=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));let o,r;var s=(t,e,i)=>{i.width&&i.color&&(a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset,a.beginPath(),a.moveTo(t.x,t.y),a.lineTo(e.x,e.y),a.stroke(),a.restore())};if(i.display)for(o=0,r=n.length;o<r;++o){const t=n[o];i.drawOnChartArea&&s({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),i.drawTicks&&s({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const n=this,{chart:o,ctx:r,options:{grid:s}}=n,l=s.setContext(n.getContext()),h=s.drawBorder?l.borderWidth:0;if(h){var c=s.setContext(n.getContext(0)).lineWidth,d=n._borderValue;let t,e,i,a;n.isHorizontal()?(t=$t(o,n.left,h)-h/2,e=$t(o,n.right,c)+c/2,i=a=d):(i=$t(o,n.top,h)-h/2,a=$t(o,n.bottom,c)+c/2,t=e=d),r.save(),r.lineWidth=l.borderWidth,r.strokeStyle=l.borderColor,r.beginPath(),r.moveTo(t,i),r.lineTo(e,a),r.stroke(),r.restore()}}drawLabels(i){const a=this;if(a.options.ticks.display){const o=a.ctx,r=a._computeLabelArea();r&&qt(o,r);var n=a._labelItems||(a._labelItems=a._computeLabelItems(i));let t,e;for(t=0,e=n.length;t<e;++t){const i=n[t],a=i.font,r=i.label;i.backdrop&&(o.fillStyle=i.backdrop.color,o.fillRect(i.backdrop.left,i.backdrop.top,i.backdrop.width,i.backdrop.height)),Qt(o,r,0,i.textOffset,a,i)}r&&Kt(o)}}drawTitle(){var{ctx:e,options:{position:i,title:a,reverse:n}}=this;if(a.display){var o=Le(a.font),r=Re(a.padding),s=a.align;let t=o.lineHeight/2;"bottom"===i?(t+=r.bottom,N(a.text)&&(t+=o.lineHeight*(a.text.length-1))):t+=r.top;var{titleX:l,titleY:h,maxWidth:c,rotation:r}=function(t,e,i,a){var{top:n,left:o,bottom:r,right:s}=t;let l,h,c,d=0;return t.isHorizontal()?(h=T(a,o,s),c=Ei(t,i,e),l=s-o):(h=Ei(t,i,e),c=T(a,r,n),d="left"===i?-_t:_t),{titleX:h,titleY:c,maxWidth:l,rotation:d}}(this,t,i,s);Qt(e,a.text,0,0,o,{color:a.color,maxWidth:c,rotation:r,textAlign:function(t,e,i){let a=f(t);return(i&&"right"!==e||!i&&"right"===e)&&(a="left"===(e=a)?"right":"right"===e?"left":e),a}(s,i,n),textBaseline:"middle",translation:[l,h]})}}draw(t){var e=this;e._isVisible()&&(e.drawBackground(),e.drawGrid(t),e.drawBorder(),e.drawTitle(),e.drawLabels(t))}_layers(){const e=this,t=e.options,i=t.ticks&&t.ticks.z||0,a=t.grid&&t.grid.z||0;return e._isVisible()&&e.draw===Vi.prototype.draw?[{z:a,draw(t){e.drawBackground(),e.drawGrid(t),e.drawTitle()}},{z:a+1,draw(){e.drawBorder()}},{z:i,draw(t){e.drawLabels(t)}}]:[{z:i,draw(t){e.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",a=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];o[i]!==this.id||t&&o.type!==t||a.push(o)}return a}_resolveTickFontOptions(t){return Le(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){var t=this._resolveTickFontOptions(0).lineHeight;return this.isHorizontal()?this.width/t/.7:this.height/t}}function Bi(i,o=[""],e=i,a,n=()=>i[0]){st(a)||(a=Ki("_fallback",i));var t={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:e,_fallback:a,_getTarget:n,override:t=>Bi([t,...i],o,e,a)};return new Proxy(t,{deleteProperty:(t,e)=>(delete t[e],delete t._keys,delete i[0][e],!0),get:(t,e)=>$i(t,e,()=>function(t,e,i){var a;for(const n of o)if(a=Ki(Ni(n,t),e),st(a))return ji(t,a)?Xi(e,i,t,a):a}(e,i,t)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(i[0]),has:(t,e)=>Gi(t).includes(e),ownKeys:t=>Gi(t),set:(t,e,i)=>((t._storage||(t._storage=n()))[e]=i,delete t[e],delete t._keys,!0)})}function Wi(a,e,i,n){var t={_cacheable:!1,_proxy:a,_context:e,_subProxy:i,_stack:new Set,_descriptors:Hi(a,n),setContext:t=>Wi(a,t,i,n),override:t=>Wi(a.override(t),e,i,n)};return new Proxy(t,{deleteProperty:(t,e)=>(delete t[e],delete a[e],!0),get:(t,e,i)=>$i(t,e,()=>function(s,t,e){const{_proxy:i,_context:a,_subProxy:n,_descriptors:o}=s;let r=i[t];return lt(r)&&o.isScriptable(t)&&(r=function(t,e,i){const{_proxy:a,_context:n,_subProxy:o,_stack:r}=s;if(r.has(t))throw new Error("Recursion detected: "+[...r].join("->")+"->"+t);return r.add(t),e=e(n,o||i),r.delete(t),e=j(e)?Xi(a._scopes,a,t,e):e}(t,r,e)),N(r)&&r.length&&(r=function(t,e,i,a){const{_proxy:n,_context:o,_subProxy:r,_descriptors:s}=i;if(st(o.index)&&a(t))e=e[o.index%e.length];else if(j(e[0])){const i=e,a=n._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=Xi(a,n,t,l);e.push(Wi(i,o,r&&r[t],s))}}return e}(t,r,s,o.isIndexable)),ji(t,r)&&(r=Wi(r,a,n&&n[t],o)),r}(t,e,i)),getOwnPropertyDescriptor:(t,e)=>t._descriptors.allKeys?Reflect.has(a,e)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(a,e),getPrototypeOf:()=>Reflect.getPrototypeOf(a),has:(t,e)=>Reflect.has(a,e),ownKeys:()=>Reflect.ownKeys(a),set:(t,e,i)=>(a[e]=i,delete t[e],!0)})}function Hi(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:a=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:a,isScriptable:lt(i)?i:()=>i,isIndexable:lt(a)?a:()=>a}}const Ni=(t,e)=>t?t+rt(e):e,ji=(t,e)=>j(e)&&"adapters"!==t;function $i(t,e,i){let a=t[e];return st(a)||(a=i(),st(a)&&(t[e]=a)),a}function Yi(t,e,i){return lt(t)?t(e,i):t}const Ui=(t,e)=>!0===t?e:"string"==typeof t?ot(e,t):void 0;function Xi(t,e,i,a){const n=e._rootScopes,o=Yi(e._fallback,i,a),r=[...t,...n],s=new Set;s.add(a);a=qi(s,r,i,o||i);return null!==a&&(!st(o)||o===i||null!==(a=qi(s,r,o,a)))&&Bi([...s],[""],n,o,()=>{const t=e._getTarget();return i in t||(t[i]={}),t[i]})}function qi(t,e,i,a){for(;i;)i=function(t,e,i,a){for(const o of e){const e=Ui(i,o);if(e){t.add(e);var n=Yi(e._fallback,i,e);if(st(n)&&n!==i&&n!==a)return n}else if(!1===e&&st(a)&&i!==a)return null}return!1}(t,e,i,a);return i}function Ki(t,e){for(const i of e)if(i){const e=i[t];if(st(e))return e}}function Gi(t){let e=t._keys;return e=e||(t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return[...e]}(t._scopes)),e}const Zi=Number.EPSILON||1e-14,Qi=(t,e)=>e<t.length&&!t[e].skip&&t[e];function Ji(t,e,i,a){var n=t.skip?e:t,o=e,t=i.skip?e:i,e=It(o,n),i=It(t,o);let r=e/(e+i),s=i/(e+i);r=isNaN(r)?0:r,s=isNaN(s)?0:s;i=a*r,a*=s;return{previous:{x:o.x-i*(t.x-n.x),y:o.y-i*(t.y-n.y)},next:{x:o.x+a*(t.x-n.x),y:o.y+a*(t.y-n.y)}}}function ta(t){const e=t.length,i=Array(e).fill(0),a=Array(e);let n,o,r,s=Qi(t,0);for(n=0;n<e;++n)if(o=r,r=s,s=Qi(t,n+1),r){if(s){const t=s.x-r.x;i[n]=0!=t?(s.y-r.y)/t:0}a[n]=o?s?kt(i[n-1])!==kt(i[n])?0:(i[n-1]+i[n])/2:i[n-1]:i[n]}!function(e,i,a){var n=e.length;let o,r,s,l,h,c=Qi(e,0);for(let t=0;t<n-1;++t)h=c,c=Qi(e,t+1),h&&c&&(Ct(i[t],0,Zi)?a[t]=a[t+1]=0:(o=a[t]/i[t],r=a[t+1]/i[t],(l=Math.pow(o,2)+Math.pow(r,2))<=9||(s=3/Math.sqrt(l),a[t]=o*s*i[t],a[t+1]=r*s*i[t])))}(t,i,a),function(e,i){const a=e.length;let n,o,r,s=Qi(e,0);for(let t=0;t<a;++t)if(o=r,r=s,s=Qi(e,t+1),r){const{x:a,y:l}=r;o&&(n=(a-o.x)/3,r.cp1x=a-n,r.cp1y=l-n*i[t]),s&&(n=(s.x-a)/3,r.cp2x=a+n,r.cp2y=l+n*i[t])}}(t,a)}function ea(t,e,i){return Math.max(Math.min(t,i),e)}function ia(e,i,t,a){let n,o,r,s;if(i.spanGaps&&(e=e.filter(t=>!t.skip)),"monotone"===i.cubicInterpolationMode)ta(e);else{let t=a?e[e.length-1]:e[0];for(n=0,o=e.length;n<o;++n)r=e[n],s=Ji(t,r,e[Math.min(n+1,o-(a?0:1))%o],i.tension),r.cp1x=s.previous.x,r.cp1y=s.previous.y,r.cp2x=s.next.x,r.cp2y=s.next.y,t=r}i.capBezierPoints&&function(t,e){let i,a,n,o,r,s=Xt(t[0],e);for(i=0,a=t.length;i<a;++i)r=o,o=s,s=i<a-1&&Xt(t[i+1],e),o&&(n=t[i],r&&(n.cp1x=ea(n.cp1x,e.left,e.right),n.cp1y=ea(n.cp1y,e.top,e.bottom)),s&&(n.cp2x=ea(n.cp2x,e.left,e.right),n.cp2y=ea(n.cp2y,e.top,e.bottom)))}(e,t)}function aa(t,e,i,a){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function na(t,e,i,a){return{x:t.x+i*(e.x-t.x),y:("middle"===a?i<.5?t:e:"after"===a?i<1?t:e:0<i?e:t).y}}function oa(t,e,i,a){var n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},t=aa(t,n,i),n=aa(n,o,i),e=aa(o,e,i),t=aa(t,n,i),e=aa(n,e,i);return aa(t,e,i)}function ra(t,e,i){return t?(a=e,n=i,{x:t=>a+a+n-t,setWidth(t){n=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t};var a,n}function sa(t,e){let i,a;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,a=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=a)}function la(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function ha(t){return"angle"===t?{between:Vt,compare:zt,normalize:Ft}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function ca({start:t,end:e,count:i,loop:a,style:n}){return{start:t%i,end:e%i,loop:a&&(e-t+1)%i==0,style:n}}function da(t,i,g){if(!g)return[t];const{property:a,start:n,end:o}=g,r=i.length,{compare:s,between:l,normalize:h}=ha(a),{start:c,end:d,loop:u,style:f}=function(t,e){const{property:i,start:a,end:n}=g,{between:o,normalize:r}=ha(i),s=e.length;let l,h,{start:c,end:d,loop:u}=t;if(u){for(c+=s,d+=s,l=0,h=s;l<h&&o(r(e[c%s][i]),a,n);++l)c--,d--;c%=s,d%=s}return d<c&&(d+=s),{start:c,end:d,loop:u,style:t.style}}(t,i),p=[];let m,x,b,v=!1,_=null;for(let t=c,e=c;t<=d;++t)(x=i[t%r]).skip||(m=h(x[a]),v=l(m,n,o),null===_&&(v||l(n,b,m)&&0!==s(n,b))&&(_=0===s(m,n)?t:e),null===_||v&&0!==s(o,m)&&!l(o,b,m)||(p.push(ca({start:_,end:t,loop:u,count:r,style:f})),_=null),e=t,b=m);return null!==_&&p.push(ca({start:_,end:d,loop:u,count:r,style:f})),p}function ua(e,i){const a=[],n=e.segments;for(let t=0;t<n.length;t++){var o=da(n[t],e.points,i);o.length&&a.push(...o)}return a}function ga(t,e){var i=t.points,o=t.options.spanGaps,a=i.length;if(!a)return[];var n=!!t._loop,{start:r,end:s}=function(t,e,i){let a=0,n=e-1;if(i&&!o)for(;a<e&&!t[a].skip;)a++;for(;a<e&&t[a].skip;)a++;for(a%=e,i&&(n+=a);n>a&&t[n%e].skip;)n--;return n%=e,{start:a,end:n}}(i,a,n);return fa(!0===o?[{start:r,end:s,loop:n}]:function(t,e,i,a){const n=t.length,o=[];let r,s=e,l=t[e];for(r=e+1;r<=i;++r){const i=t[r%n];i.skip||i.stop?l.skip||(a=!1,o.push({start:e%n,end:(r-1)%n,loop:a}),e=s=i.stop?r:null):(s=r,l.skip&&(e=r)),l=i}return null!==s&&o.push({start:e%n,end:s%n,loop:a}),o}(i,r,s<r?s+a:s,!!t._fullLoop&&0===r&&s===a-1),i,e)}function fa(t,e,i){return i&&i.setContext&&e?function(a,n){const o=a.length,r=[];let s=t[0].start,l=s;for(const u of t){let t,e,i=a[s%o];for(l=s+1;l<=u.end;l++){var h=a[l%o];e={backgroundColor:(d=n.setContext({type:"segment",p0:i,p1:h})).backgroundColor,borderCapStyle:d.borderCapStyle,borderDash:d.borderDash,borderDashOffset:d.borderDashOffset,borderJoinStyle:d.borderJoinStyle,borderWidth:d.borderWidth,borderColor:d.borderColor},c=e,(d=t)&&JSON.stringify(c)!==JSON.stringify(d)&&(r.push({start:s,end:l-1,loop:u.loop,style:t}),t=e,s=l-1),i=h,t=e}s<l-1&&(r.push({start:s,end:l-1,loop:u.loop,style:e}),s=l-1)}var c,d;return r}(e,i):t}var pa=Object.freeze({__proto__:null,easingEffects:ci,color:V,getHoverColor:B,noop:t,uid:W,isNullOrUndef:H,isArray:N,isObject:j,isFinite:$,finiteOrDefault:Y,valueOrDefault:U,toPercentage:X,toDimension:q,callback:K,each:G,_elementsEqual:Z,clone:Q,_merger:tt,merge:et,mergeIf:it,_mergerIf:at,_deprecated:function(t,e,i,a){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+a+'" instead')},resolveObjectKey:ot,_capitalize:rt,defined:st,isFunction:lt,setsEqual:ht,toFontString:Ht,_measureText:Nt,_longestText:jt,_alignPixel:$t,clearCanvas:Yt,drawPoint:Ut,_isPointInArea:Xt,clipArea:qt,unclipArea:Kt,_steppedLineTo:Gt,_bezierCurveTo:Zt,renderText:Qt,addRoundedRectPath:Jt,_lookup:te,_lookupByKey:ee,_rlookupByKey:ie,_filterBetween:ae,listenArrayEvents:oe,unlistenArrayEvents:re,_arrayUnique:se,_createResolver:Bi,_attachContext:Wi,_descriptors:Hi,splineCurve:Ji,splineCurveMonotone:ta,_updateBezierControlPoints:ia,_getParentNode:le,getStyle:de,getRelativePosition:fe,getMaximumSize:me,retinaScale:xe,supportsEventListenerOptions:be,readUsedSize:ve,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:r,throttled:l,debounce:s,_toLeftRightCenter:f,_alignStartEnd:T,_textX:R,_pointInLine:aa,_steppedInterpolation:na,_bezierInterpolation:oa,formatNumber:Oi,toLineHeight:Ce,_readValueToProps:Oe,toTRBL:Ae,toTRBLCorners:Te,toPadding:Re,toFont:Le,resolve:Ee,_addGrace:Ie,PI:pt,TAU:mt,PITAU:xt,INFINITY:bt,RAD_PER_DEG:vt,HALF_PI:_t,QUARTER_PI:yt,TWO_THIRDS_PI:wt,log10:Mt,sign:kt,niceNum:St,_factorize:Pt,isNumber:Dt,almostEquals:Ct,almostWhole:Ot,_setMinAndMaxByKey:At,toRadians:Tt,toDegrees:Rt,_decimalPlaces:Lt,getAngleFromPoint:Et,distanceBetweenPoints:It,_angleDiff:zt,_normalizeAngle:Ft,_angleBetween:Vt,_limitValue:Bt,_int16Range:Wt,getRtlAdapter:ra,overrideTextDirection:sa,restoreTextDirection:la,_boundSegment:da,_boundSegments:ua,_computeSegments:ga});class ma{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){var e,i,s,l,a=Object.getPrototypeOf(t);let n;"id"in(i=a)&&"defaults"in i&&(n=this.register(a));const o=this.items,r=t.id,h=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in o||(o[r]=t,e=t,i=h,a=n,a=et(Object.create(null),[a?ft.get(a):{},ft.get(i),e.defaults]),ft.set(i,a),e.defaultRoutes&&(s=i,l=e.defaultRoutes,Object.keys(l).forEach(t=>{const e=t.split("."),i=e.pop(),a=[s].concat(e).join("."),n=l[t].split("."),o=n.pop(),r=n.join(".");ft.route(a,i,r,o)})),e.descriptors&&ft.describe(i,e.descriptors),this.override&&ft.override(t.id,t.overrides)),h}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,a=this.scope;i in e&&delete e[i],a&&i in ft[a]&&(delete ft[a][i],this.override&&delete ct[i])}}var xa=new class{constructor(){this.controllers=new ma(Pi,"datasets",!0),this.elements=new ma(Di,"elements"),this.plugins=new ma(Object,"plugins"),this.scales=new ma(Vi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(i,t,a){const n=this;[...t].forEach(t=>{const e=a||n._getRegistryForType(t);a||e.isForType(t)||e===n.plugins&&t.id?n._exec(i,e,t):G(t,t=>{var e=a||n._getRegistryForType(t);n._exec(i,e,t)})})}_exec(t,e,i){var a=rt(t);K(i["before"+a],[],i),e[t](i),K(i["after"+a],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(t,e,i){e=e.get(t);if(void 0===e)throw new Error('"'+t+'" is not a registered '+i+".");return e}};class ba{constructor(){this._init=[]}notify(t,e,i,a){var n=this;"beforeInit"===e&&(n._init=n._createDescriptors(t,!0),n._notify(n._init,t,"install"));a=a?n._descriptors(t).filter(a):n._descriptors(t),i=n._notify(a,t,e,i);return"destroy"===e&&(n._notify(a,t,"stop"),n._notify(n._init,t,"uninstall")),i}_notify(t,e,i,a){a=a||{};for(const n of t){const t=n.plugin;if(!1===K(t[i],[e,a,n.options],t)&&a.cancelable)return!1}return!0}invalidate(){H(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;var e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){var i=t&&t.config,a=U(i.options&&i.options.plugins,{}),i=function(t){const e=[],i=Object.keys(xa.plugins.items);for(let t=0;t<i.length;t++)e.push(xa.getPlugin(i[t]));var a=t.plugins||[];for(let t=0;t<a.length;t++){const i=a[t];-1===e.indexOf(i)&&e.push(i)}return e}(i);return!1!==a||e?function(e,i,a,n){const o=[],r=e.getContext();for(let t=0;t<i.length;t++){var s=i[t],l=(l=a[s.id],n||!1!==l?!0===l?{}:l:null);null!==l&&o.push({plugin:s,options:function(t,e,i,a){e=t.pluginScopeKeys(e),e=t.getOptionScopes(i,e);return t.createResolver(e,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}(e.config,s,l,r)})}var l;return o}(t,i,a,e):[]}_notifyStateChanges(t){var e=this._oldCache||[],i=this._cache,a=(t,i)=>t.filter(e=>!i.some(t=>e.plugin.id===t.plugin.id));this._notify(a(e,i),t,"stop"),this._notify(a(i,e),t,"start")}}function va(t,e){var i=ft.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function _a(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(e=e.position)||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0)||t.charAt(0).toLowerCase()}function ya(t){const e=t.options||(t.options={});e.plugins=U(e.plugins,{}),e.scales=function(e,i){const o=ct[e.type]||{scales:{}},r=i.scales||{},s=va(e.type,i),l=Object.create(null),h=Object.create(null);return Object.keys(r).forEach(t=>{var e=r[t],i=_a(t,e),a=i===s?"_index_":"_value_",n=o.scales||{};l[i]=l[i]||t,h[t]=it(Object.create(null),[{axis:i},e,n[i],n[a]])}),e.data.datasets.forEach(a=>{const t=a.type||e.type,n=a.indexAxis||va(t,i),o=(ct[t]||{}).scales||{};Object.keys(o).forEach(t=>{var e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,n),i=a[e+"AxisID"]||l[e]||e;h[i]=h[i]||Object.create(null),it(h[i],[{axis:e},r[i],o[t]])})}),Object.keys(h).forEach(t=>{t=h[t];it(t,[ft.scales[t.type],ft.scale])}),h}(t,e)}function wa(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Ma=new Map,ka=new Set;function Sa(t,e){let i=Ma.get(t);return i||(i=e(),Ma.set(t,i),ka.add(i)),i}const Pa=(t,e,i)=>{i=ot(e,i);void 0!==i&&t.add(i)};class Da{constructor(t){this._config=((t=(t=t)||{}).data=wa(t.data),ya(t),t),this._scopeCache=new Map,this._resolverCache=new Map}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=wa(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){var t=this._config;this.clearCache(),ya(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Sa(t,()=>[["datasets."+t,""]])}datasetAnimationScopeKeys(t,e){return Sa(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,"transitions."+e],["datasets."+t,""]])}datasetElementScopeKeys(t,e){return Sa(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,"datasets."+t,"elements."+e,""]])}pluginScopeKeys(t){const e=t.id;return Sa(`${this.type}-plugin-${e}`,()=>[["plugins."+e,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let a=i.get(t);return a&&!e||(a=new Map,i.set(t,a)),a}getOptionScopes(e,t,i){const{options:a,type:n}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const s=new Set;t.forEach(t=>{e&&(s.add(e),t.forEach(t=>Pa(s,e,t))),t.forEach(t=>Pa(s,a,t)),t.forEach(t=>Pa(s,ct[n]||{},t)),t.forEach(t=>Pa(s,ft,t)),t.forEach(t=>Pa(s,dt,t))});i=[...s];return ka.has(t)&&o.set(t,i),i}chartOptionScopes(){var{options:t,type:e}=this;return[t,ct[e]||{},ft.datasets[e]||{},{type:e},ft,dt]}resolveNamedOptions(t,e,i,a=[""]){const n={$shared:!0},{resolver:o,subPrefixes:r}=Ca(this._resolverCache,t,a);let s=o;!function(t,e){const{isScriptable:i,isIndexable:a}=Hi(t);for(const n of e)if(i(n)&&lt(t[n])||a(n)&&N(t[n]))return 1}(o,e)||(n.$shared=!1,s=Wi(o,i=lt(i)?i():i,this.createResolver(t,i,r)));for(const t of e)n[t]=s[t];return n}createResolver(t,e,i=[""],a){var{resolver:i}=Ca(this._resolverCache,t,i);return j(e)?Wi(i,e,void 0,a):i}}function Ca(t,e,i){let a=t.get(e);a||(a=new Map,t.set(e,a));t=i.join();let n=a.get(t);return n||(n={resolver:Bi(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},a.set(t,n)),n}const Oa=["top","bottom","left","right","chartArea"];function Aa(t,e){return"top"===t||"bottom"===t||-1===Oa.indexOf(t)&&"x"===e}function Ta(i,a){return function(t,e){return t[i]===e[i]?t[a]-e[a]:t[i]-e[i]}}function Ra(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),K(i&&i.onComplete,[t],e)}function La(t){var e=t.chart,i=e.options.animation;K(i&&i.onProgress,[t],e)}function Ea(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Ia(t){return Ea()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t=t&&t.canvas?t.canvas:t}const za={},Fa=t=>{const e=Ia(t);return Object.values(za).filter(t=>t.canvas===e).pop()};class Va{constructor(t,e){var i=this;this.config=e=new Da(e);var a=Ia(t),n=Fa(a);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas can be reused.");var o=e.createResolver(e.chartOptionScopes(),i.getContext());this.platform=i._initializePlatform(a,e);t=i.platform.acquireContext(a,o.aspectRatio),n=t&&t.canvas,e=n&&n.height,a=n&&n.width;this.id=W(),this.ctx=t,this.canvas=n,this.width=a,this.height=e,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._sortedMetasets=[],this.scales={},this.scale=void 0,this._plugins=new ba,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=s(()=>this.update("resize"),o.resizeDelay||0),za[i.id]=i,t&&n?(h.listen(i,"complete",Ra),h.listen(i,"progress",La),i._initialize(),i.attached&&i.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){var{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:a,_aspectRatio:n}=this;return H(t)?e&&n?n:a?i/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){var t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():xe(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}_initializePlatform(t,e){return new(e.platform||(!Ea()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Xe:oi))}clear(){return Yt(this.canvas,this.ctx),this}stop(){return h.stop(this),this}resize(t,e){h.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){var i=this,a=i.options,n=i.canvas,o=a.maintainAspectRatio&&i.aspectRatio,t=i.platform.getMaximumSize(n,t,e,o),e=i.currentDevicePixelRatio,o=a.devicePixelRatio||i.platform.getDevicePixelRatio();i.width===t.width&&i.height===t.height&&e===o||(i.width=t.width,i.height=t.height,i._aspectRatio=i.aspectRatio,xe(i,o,!0),i.notifyPlugins("resize",{size:t}),K(a.onResize,[i,t],i),i.attached&&i._doResize()&&i.render())}ensureScalesHaveIDs(){G(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const r=this,s=r.options,a=s.scales,l=r.scales,h=Object.keys(l).reduce((t,e)=>(t[e]=!1,t),{});let t=[];a&&(t=t.concat(Object.keys(a).map(t=>{var e=a[t],i=_a(t,e),t="r"===i,i="x"===i;return{options:e,dposition:t?"chartArea":i?"bottom":"left",dtype:t?"radialLinear":i?"category":"linear"}}))),G(t,t=>{const e=t.options,i=e.id,a=_a(i,e),n=U(e.type,t.dtype);void 0!==e.position&&Aa(e.position,a)===Aa(t.dposition)||(e.position=t.dposition),h[i]=!0;let o=null;i in l&&l[i].type===n?o=l[i]:(o=new(xa.getScale(n))({id:i,type:n,ctx:r.ctx,chart:r}),l[o.id]=o),o.init(e,s)}),G(h,(t,e)=>{t||delete l[e]}),G(l,t=>{Ye.configure(r,t,t.options),Ye.addBox(r,t)})}_updateMetasetIndex(t,e){const i=this._metasets,a=t.index;a!==e&&(i[a]=i[e],(i[e]=t).index=e)}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(e<i){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Ta("order","index"))}_removeUnreferencedMetasets(){const i=this,{_metasets:t,data:{datasets:a}}=i;t.length>a.length&&delete i._stacks,t.forEach((e,t)=>{0===a.filter(t=>t===e._dataset).length&&i._destroyDatasetMeta(t)})}buildOrUpdateControllers(){const e=this,i=[],a=e.data.datasets;let n,o;for(e._removeUnreferencedMetasets(),n=0,o=a.length;n<o;n++){const o=a[n];let t=e.getDatasetMeta(n);var r=o.type||e.config.type;if(t.type&&t.type!==r&&(e._destroyDatasetMeta(n),t=e.getDatasetMeta(n)),t.type=r,t.indexAxis=o.indexAxis||va(r,e.options),t.order=o.order||0,e._updateMetasetIndex(t,n),t.label=""+o.label,t.visible=e.isDatasetVisible(n),t.controller)t.controller.updateIndex(n),t.controller.linkScales();else{const a=xa.getController(r),{datasetElementType:o,dataElementType:s}=ft.datasets[r];Object.assign(a.prototype,{dataElementType:xa.getElement(s),datasetElementType:o&&xa.getElement(o)}),t.controller=new a(e,n),i.push(t.controller)}}return e._updateMetasets(),i}_resetElements(){const i=this;G(i.data.datasets,(t,e)=>{i.getDatasetMeta(e).controller.reset()},i)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const a=this,n=a.config;n.update(),a._options=n.createResolver(n.chartOptionScopes(),a.getContext()),G(a.scales,t=>{Ye.removeBox(a,t)});var o=a._animationsDisabled=!a.options.animation;a.ensureScalesHaveIDs(),a.buildOrUpdateScales();const r=new Set(Object.keys(a._listeners)),e=new Set(a.options.events);if(ht(r,e)||(a.unbindEvents(),a.bindEvents()),a._plugins.invalidate(),!1!==a.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})){const s=a.buildOrUpdateControllers();a.notifyPlugins("beforeElementsUpdate");let i=0;for(let t=0,e=a.data.datasets.length;t<e;t++){const{controller:n}=a.getDatasetMeta(t),r=!o&&-1===s.indexOf(n);n.buildOrUpdateElements(r),i=Math.max(+n.getMaxOverflow(),i)}a._minPadding=i,a._updateLayout(i),o||G(s,t=>{t.reset()}),a._updateDatasets(t),a.notifyPlugins("afterUpdate",{mode:t}),a._layers.sort(Ta("z","_idx")),a._lastEvent&&a._eventHandler(a._lastEvent,!0),a.render()}}_updateLayout(t){const e=this;if(!1!==e.notifyPlugins("beforeLayout",{cancelable:!0})){Ye.update(e,e.width,e.height,t);const i=e.chartArea,a=i.width<=0||i.height<=0;e._layers=[],G(e.boxes,t=>{a&&"chartArea"===t.position||(t.configure&&t.configure(),e._layers.push(...t._layers()))},e),e._layers.forEach((t,e)=>{t._idx=e}),e.notifyPlugins("afterLayout")}}_updateDatasets(i){var a="function"==typeof i;if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:i,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this._updateDataset(t,a?i({datasetIndex:t}):i);this.notifyPlugins("afterDatasetsUpdate",{mode:i})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),a={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",a)&&(i.controller._update(e),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){var t=this;!1!==t.notifyPlugins("beforeRender",{cancelable:!0})&&(h.has(t)?t.attached&&!h.running(t)&&h.start(t):(t.draw(),Ra({chart:t})))}draw(){var t=this;let e;if(t._resizeBeforeDraw){const{width:e,height:i}=t._resizeBeforeDraw;t._resize(e,i),t._resizeBeforeDraw=null}if(t.clear(),!(t.width<=0||t.height<=0)&&!1!==t.notifyPlugins("beforeDraw",{cancelable:!0})){const i=t._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(t.chartArea);for(t._drawDatasets();e<i.length;++e)i[e].draw(t.chartArea);t.notifyPlugins("afterDraw")}}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let a,n;for(a=0,n=e.length;a<n;++a){const n=e[a];t&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1!==this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})){var e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;0<=t;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}}_drawDataset(t){const e=this,i=e.ctx,a=t._clip,n=e.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",o)&&(qt(i,{left:!1===a.left?0:n.left-a.left,right:!1===a.right?e.width:n.right+a.right,top:!1===a.top?0:n.top-a.top,bottom:!1===a.bottom?e.height:n.bottom+a.bottom}),t.controller.draw(),Kt(i),o.cancelable=!1,e.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,a){const n=Se.modes[e];return"function"==typeof n?n(this,t,i,a):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let a=i.filter(t=>t&&t._dataset===e).pop();return a=a||(i[t]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1}),a}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){var e=this.data.datasets[t];if(!e)return!1;t=this.getDatasetMeta(t);return"boolean"==typeof t.hidden?!t.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateDatasetVisibility(e,t){const i=t?"show":"hide",a=this.getDatasetMeta(e),n=a.controller._resolveAnimations(void 0,i);this.setDatasetVisibility(e,t),n.update(a,{visible:t}),this.update(t=>t.datasetIndex===e?i:void 0)}hide(t){this._updateDatasetVisibility(t,!1)}show(t){this._updateDatasetVisibility(t,!0)}_destroyDatasetMeta(t){const e=this._metasets&&this._metasets[t];e&&e.controller&&(e.controller._destroy(),delete this._metasets[t])}destroy(){var t=this,{canvas:e,ctx:i}=t;let a,n;for(t.stop(),h.remove(t),a=0,n=t.data.datasets.length;a<n;++a)t._destroyDatasetMeta(a);t.config.clearCache(),e&&(t.unbindEvents(),Yt(e,i),t.platform.releaseContext(i),t.canvas=null,t.ctx=null),t.notifyPlugins("destroy"),delete za[t.id]}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){const a=this,i=a._listeners,n=a.platform,e=(t,e)=>{n.addEventListener(a,t,e),i[t]=e},o=(t,e)=>{i[t]&&(n.removeEventListener(a,t,e),delete i[t])};let r=function(t,e,i){t.offsetX=e,t.offsetY=i,a._eventHandler(t)};if(G(a.options.events,t=>e(t,r)),a.options.responsive){let t;r=(t,e)=>{a.canvas&&a.resize(t,e)};const s=()=>{o("attach",s),a.attached=!0,a.resize(),e("resize",r),e("detach",t)};t=()=>{a.attached=!1,o("resize",r),e("attach",s)},(n.isAttached(a.canvas)?s:t)()}else a.attached=!0}unbindEvents(){const i=this,t=i._listeners;t&&(i._listeners={},G(t,(t,e)=>{i.platform.removeEventListener(i,e,t)}))}updateHoverStyle(t,e,i){var a=i?"set":"remove";let n,o,r,s;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+a+"DatasetHoverStyle"]()),r=0,s=t.length;r<s;++r){const e=(o=t[r])&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[a+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const a=this,e=a._active||[],i=t.map(({datasetIndex:t,index:e})=>{var i=a.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});Z(i,e)||(a._active=i,a._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){var a=this.options.hover,n=(t,i)=>t.filter(e=>!i.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),o=n(e,t),e=i?t:n(t,e);o.length&&this.updateHoverStyle(o,a.mode,!1),e.length&&a.mode&&this.updateHoverStyle(e,a.mode,!0)}_eventHandler(e,t){const i=this,a={event:e,replay:t,cancelable:!0},n=t=>(t.options.events||this.options.events).includes(e.type);if(!1!==i.notifyPlugins("beforeEvent",a,n)){t=i._handleEvent(e,t);return a.cancelable=!1,i.notifyPlugins("afterEvent",a,n),(t||a.changed)&&i.render(),i}}_handleEvent(t,e){var i=this,{_active:a=[],options:n}=i,o=n.hover;let r=[],s,l=null;return"mouseout"!==t.type&&(r=i.getElementsAtEventForMode(t,o.mode,o,e),l="click"===t.type?i._lastEvent:t),i._lastEvent=null,Xt(t,i.chartArea,i._minPadding)&&(K(n.onHover,[t,r,i],i),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||K(n.onClick,[t,r,i],i)),((s=!Z(r,a))||e)&&(i._active=r,i._updateHoverStyles(r,a,e)),i._lastEvent=l,s}}const Ba=()=>G(Va.instances,t=>t._plugins.invalidate());function Wa(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}Object.defineProperties(Va,{defaults:{enumerable:!0,value:ft},instances:{enumerable:!0,value:za},overrides:{enumerable:!0,value:ct},registry:{enumerable:!0,value:xa},version:{enumerable:!0,value:"3.2.1"},getChart:{enumerable:!0,value:Fa},register:{enumerable:!0,value:(...t)=>{xa.add(...t),Ba()}},unregister:{enumerable:!0,value:(...t)=>{xa.remove(...t),Ba()}}});class Ha{constructor(t){this.options=t||{}}formats(){return Wa()}parse(t,e){return Wa()}format(t,e){return Wa()}add(t,e,i){return Wa()}diff(t,e,i){return Wa()}startOf(t,e,i){return Wa()}endOf(t,e){return Wa()}}Ha.override=function(t){Object.assign(Ha.prototype,t)};var Na={_date:Ha};function ja(t,e,i,a){return N(t)?function(t,e,i,a){var n=i.parse(t[0],a),o=i.parse(t[1],a),t=Math.min(n,o),a=Math.max(n,o);let r=t,s=a;Math.abs(t)>Math.abs(a)&&(r=a,s=t),e[i.axis]=s,e._custom={barStart:r,barEnd:s,start:n,end:o,min:t,max:a}}(t,e,i,a):e[i.axis]=i.parse(t,a),e}function $a(t,e,i,a){const n=t.iScale,o=t.vScale,r=n.getLabels(),s=n===o,l=[];let h,c,d,u;for(c=(h=i)+a;h<c;++h)u=e[h],d={},d[n.axis]=s||n.parse(r[h],h),l.push(ja(u,d,o,h));return l}function Ya(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}class Ua extends Pi{parsePrimitiveData(t,e,i,a){return $a(t,e,i,a)}parseArrayData(t,e,i,a){return $a(t,e,i,a)}parseObjectData(t,e,i,a){const{iScale:n,vScale:o}=t,{xAxisKey:r="x",yAxisKey:s="y"}=this._parsing,l="x"===n.axis?r:s,h="x"===o.axis?r:s,c=[];let d,u,g,f;for(u=(d=i)+a;d<u;++d)f=e[d],g={},g[n.axis]=n.parse(ot(f,l),d),c.push(ja(ot(f,h),g,o,d));return c}updateRangeFromParsed(t,e,i,a){super.updateRangeFromParsed(t,e,i,a);i=i._custom;i&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:a}=e,n=this.getParsed(t),o=n._custom,r=Ya(o)?"["+o.start+", "+o.end+"]":""+a.getLabelForValue(n[a.axis]);return{label:""+i.getLabelForValue(n[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){var e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(e,i,a,n){const o=this,r="reset"===n,s=o._cachedMeta.vScale,l=s.getBasePixel(),h=s.isHorizontal(),c=o._getRuler(),t=o.resolveDataElementOptions(i,n),d=o.getSharedOptions(t),u=o.includeOptions(n,d);o.updateSharedOptions(d,n,t);for(let t=i;t<i+a;t++){const i=o.getParsed(t),a=r||H(i[s.axis])?{base:l,head:l}:o._calculateBarValuePixels(t),g=o._calculateBarIndexPixels(t,c),f=(i._stacks||{})[s.axis],p={horizontal:h,base:a.base,enableBorderRadius:!f||Ya(i._custom)||o.index===f._top||o.index===f._bottom,x:h?a.head:g.center,y:h?g.center:a.head,height:h?g.size:void 0,width:h?void 0:g.size};u&&(p.options=d||o.resolveDataElementOptions(t,n)),o.updateElement(e[t],t,p,n)}}_getStacks(t,e){const i=this._cachedMeta.iScale,a=i.getMatchingVisibleMetas(this._type),n=i.options.stacked,o=a.length,r=[];let s,l;for(s=0;s<o;++s){if(l=a[s],void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if(H(t)||isNaN(t))continue}if((!1===n||-1===r.indexOf(l.stack)||void 0===n&&void 0===l.stack)&&r.push(l.stack),l.index===t)break}return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const a=this._getStacks(t,i),n=void 0!==e?a.indexOf(e):-1;return-1===n?a.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,a=[];let n,o;for(n=0,o=e.data.length;n<o;++n)a.push(i.getPixelForValue(this.getParsed(n)[i.axis],n));var r=t.barThickness;return{min:r||function(t){var e=function(a){if(!a._cache.$bar){const n=a.getMatchingVisibleMetas("bar");let i=[];for(let t=0,e=n.length;t<e;t++)i=i.concat(n[t].controller.getAllParsedValues(a));a._cache.$bar=se(i.sort((t,e)=>t-e))}return a._cache.$bar}(t);let i,a,n,o,r=t._length;var s=()=>{32767!==n&&-32768!==n&&(st(o)&&(r=Math.min(r,Math.abs(n-o)||r)),o=n)};for(i=0,a=e.length;i<a;++i)n=t.getPixelForValue(e[i]),s();for(o=void 0,i=0,a=t.ticks.length;i<a;++i)n=t.getPixelForTick(i),s();return r}(i),pixels:a,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{vScale:e,_stacked:i}=this._cachedMeta,{base:a,minBarLength:n}=this.options,o=this.getParsed(t),r=o._custom,s=Ya(r);let l,h,c=o[e.axis],d=0,u=i?this.applyStack(e,o,i):c;u!==c&&(d=u-c,u=c),s&&(c=r.barStart,u=r.barEnd-r.barStart,0!==c&&kt(c)!==kt(r.barEnd)&&(d=0),d+=c);var g=H(a)||s?d:a;let f=e.getPixelForValue(g);l=this.chart.getDataVisibility(t)?e.getPixelForValue(d+u):f,h=l-f,void 0!==n&&Math.abs(h)<n&&(h=h<0?-n:n,0===c&&(f-=h/2),l=f+h);t=a||0;if(f===e.getPixelForValue(t)){const p=e.getLineWidthForValue(t)/2;0<h?(f+=p,h-=p):h<0&&(f-=p,h+=p)}return{size:h,base:f,head:l,center:l+h/2}}_calculateBarIndexPixels(t,e){const i=this,a=e.scale,n=i.options,o=n.skipNull,r=U(n.maxBarThickness,1/0);let s,l;if(e.grouped){const a=o?i._getStackCount(t):e.stackCount,h=("flex"===n.barThickness?function(t,e,i,a){var n=e.pixels,o=n[t];let r=0<t?n[t-1]:null,s=t<n.length-1?n[t+1]:null;t=i.categoryPercentage;null===r&&(r=o-(null===s?e.end-e.start:s-o)),null===s&&(s=o+o-r);o-=(o-Math.min(r,s))/2*t;return{chunk:Math.abs(s-r)/2*t/a,ratio:i.barPercentage,start:o}}:function(t,e,i,a){var n=i.barThickness;let o,r;return r=H(n)?(o=e.min*i.categoryPercentage,i.barPercentage):(o=n*a,1),{chunk:o/a,ratio:r,start:e.pixels[t]-o/2}})(t,e,n,a),c=i._getStackIndex(i.index,i._cachedMeta.stack,o?t:void 0);s=h.start+h.chunk*c+h.chunk/2,l=Math.min(r,h.chunk*h.ratio)}else s=a.getPixelForValue(i.getParsed(t)[a.axis],t),l=Math.min(r,e.min*e.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this.chart,e=this._cachedMeta,i=e.vScale,a=e.data,n=a.length;let o=0;for(qt(t.ctx,t.chartArea);o<n;++o)null!==this.getParsed(o)[i.axis]&&a[o].draw(this._ctx);Kt(t.ctx)}}Ua.id="bar",Ua.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Ua.overrides={interaction:{mode:"index"},scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Xa extends Pi{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(t,e,i,a){const{xScale:n,yScale:o}=t,{xAxisKey:r="x",yAxisKey:s="y"}=this._parsing,l=[];let h,c,d;for(c=(h=i)+a;h<c;++h)d=e[h],l.push({x:n.parse(ot(d,r),h),y:o.parse(ot(d,s),h),_custom:d&&d.r&&+d.r});return l}getMaxOverflow(){const{data:e,_parsed:i}=this._cachedMeta;let a=0;for(let t=e.length-1;0<=t;--t)a=Math.max(a,e[t].size()/2,i[t]._custom);return 0<a&&a}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:a}=e,n=this.getParsed(t),o=i.getLabelForValue(n.x),r=a.getLabelForValue(n.y),s=n._custom;return{label:e.label,value:"("+o+", "+r+(s?", "+s:"")+")"}}update(t){var e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(e,i,a,n){const o=this,r="reset"===n,{xScale:s,yScale:l}=o._cachedMeta,t=o.resolveDataElementOptions(i,n),h=o.getSharedOptions(t),c=o.includeOptions(n,h);for(let t=i;t<i+a;t++){const i=e[t],a=!r&&o.getParsed(t),h=r?s.getPixelForDecimal(.5):s.getPixelForValue(a.x),d=r?l.getBasePixel():l.getPixelForValue(a.y),u={x:h,y:d,skip:isNaN(h)||isNaN(d)};c&&(u.options=o.resolveDataElementOptions(t,n),r&&(u.options.radius=0)),o.updateElement(i,t,u,n)}o.updateSharedOptions(h,n,t)}resolveDataElementOptions(t,e){var i=this.getParsed(t);let a=super.resolveDataElementOptions(t,e);a.$shared&&(a=Object.assign({},a,{$shared:!1}));t=a.radius;return"active"!==e&&(a.radius=0),a.radius+=U(i&&i._custom,t),a}}Xa.id="bubble",Xa.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Xa.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class qa extends Pi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,a=this._cachedMeta;let n,o;for(o=(n=t)+e;n<o;++n)a._parsed[n]=+i[n]}_getRotation(){return Tt(this.options.rotation-90)}_getCircumference(){return Tt(this.options.circumference)}_getRotationExtents(){let e=mt,i=-mt;for(let t=0;t<this.chart.data.datasets.length;++t)if(this.chart.isDatasetVisible(t)){const a=this.chart.getDatasetMeta(t).controller,n=a._getRotation(),o=a._getCircumference();e=Math.min(e,n),i=Math.max(i,n+o)}return{rotation:e,circumference:i-e}}update(t){const e=this,i=e.chart,{chartArea:a}=i,n=e._cachedMeta,o=n.data,r=e.getMaxBorderWidth()+e.getMaxOffset(o),s=Math.max((Math.min(a.width,a.height)-r)/2,0),l=Math.min(X(e.options.cutout,s),1),h=e._getRingWeight(e.index),{circumference:c,rotation:d}=e._getRotationExtents(),{ratioX:u,ratioY:g,offsetX:f,offsetY:p}=function(t,e,a){let i=1,n=1,o=0,r=0;if(e<mt){const s=t,l=s+e,h=Math.cos(s),c=Math.sin(s),d=Math.cos(l),u=Math.sin(l),g=(t,e,i)=>Vt(t,s,l)?1:Math.max(e,e*a,i,i*a),f=(t,e,i)=>Vt(t,s,l)?-1:Math.min(e,e*a,i,i*a),p=g(0,h,d),m=g(_t,c,u),x=f(pt,h,d),b=f(pt+_t,c,u);i=(p-x)/2,n=(m-b)/2,o=-(p+x)/2,r=-(m+b)/2}return{ratioX:i,ratioY:n,offsetX:o,offsetY:r}}(d,c,l),m=(a.width-r)/u,x=(a.height-r)/g,b=Math.max(Math.min(m,x)/2,0),v=q(e.options.radius,b),_=(v-Math.max(v*l,0))/e._getVisibleDatasetWeightTotal();e.offsetX=f*v,e.offsetY=p*v,n.total=e.calculateTotal(),e.outerRadius=v-_*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-_*h,0),e.updateElements(o,0,o.length,t)}_circumference(t,e){var i=this.options,a=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===a._parsed[t]?0:this.calculateCircumference(a._parsed[t]*n/mt)}updateElements(t,e,i,a){const n=this,o="reset"===a,r=n.chart,s=r.chartArea,l=r.options.animation,h=(s.left+s.right)/2,c=(s.top+s.bottom)/2,d=o&&l.animateScale,u=d?0:n.innerRadius,g=d?0:n.outerRadius,f=n.resolveDataElementOptions(e,a),p=n.getSharedOptions(f),m=n.includeOptions(a,p);let x,b=n._getRotation();for(x=0;x<e;++x)b+=n._circumference(x,o);for(x=e;x<e+i;++x){const e=n._circumference(x,o),i=t[x],r={x:h+n.offsetX,y:c+n.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:g,innerRadius:u};m&&(r.options=p||n.resolveDataElementOptions(x,a)),b+=e,n.updateElement(i,x,r,a)}n.updateSharedOptions(p,a,f)}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,a=0;for(i=0;i<e.length;i++){const e=t._parsed[i];null!==e&&!isNaN(e)&&this.chart.getDataVisibility(i)&&(a+=Math.abs(e))}return a}calculateCircumference(t){var e=this._cachedMeta.total;return 0<e&&!isNaN(t)?mt*(Math.abs(t)/e):0}getLabelAndValue(t){var e=this._cachedMeta,i=this.chart,a=i.data.labels||[],i=Oi(e._parsed[t],i.options.locale);return{label:a[t]||"",value:i}}getMaxBorderWidth(t){let e=0;const i=this.chart;let a,n,o,r,s;if(!t)for(a=0,n=i.data.datasets.length;a<n;++a)if(i.isDatasetVisible(a)){t=(o=i.getDatasetMeta(a)).data,r=o.controller,r!==this&&r.configure();break}if(!t)return 0;for(a=0,n=t.length;a<n;++a)"inner"!==(s=r.resolveDataElementOptions(a)).borderAlign&&(e=Math.max(e,s.borderWidth||0,s.hoverBorderWidth||0));return e}getMaxOffset(i){let a=0;for(let t=0,e=i.length;t<e;++t){const i=this.resolveDataElementOptions(t);a=Math.max(a,i.offset||0,i.hoverOffset||0)}return a}_getRingWeightOffset(e){let i=0;for(let t=0;t<e;++t)this.chart.isDatasetVisible(t)&&(i+=this._getRingWeight(t));return i}_getRingWeight(t){return Math.max(U(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}qa.id="doughnut",qa.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",indexAxis:"r"},qa.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(a){const t=a.data;return t.labels.length&&t.datasets.length?t.labels.map((t,e)=>{var i=a.getDatasetMeta(0).controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:!a.getDataVisibility(e),index:e}}):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;t=": "+t.formattedValue;return N(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Ka extends Pi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this,n=e._cachedMeta,{dataset:i,data:a=[],_dataset:o}=n,r=e.chart._animationsDisabled;let{start:s,count:l}=function(t,e,i){var a=e.length;let n=0,o=a;if(t._sorted){const{iScale:r,_parsed:s}=t,l=r.axis,{min:h,max:c,minDefined:d,maxDefined:u}=r.getUserBounds();d&&(n=Bt(Math.min(ee(s,r.axis,h).lo,i?a:ee(e,l,r.getPixelForValue(h)).lo),0,a-1)),o=u?Bt(Math.max(ee(s,r.axis,c).hi+1,i?0:ee(e,l,r.getPixelForValue(c)).hi+1),n,a)-n:a-n}return{start:n,count:o}}(n,a,r);e._drawStart=s,e._drawCount=l,function(){var{xScale:t,yScale:e,_scaleRanges:i}=n,a={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=a,1;e=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,a),e}()&&(s=0,l=a.length),i._decimated=!!o._decimated,i.points=a;const h=e.resolveDatasetElementOptions(t);e.options.showLine||(h.borderWidth=0),h.segment=e.options.segment,e.updateElement(i,void 0,{animated:!r,options:h},t),e.updateElements(a,s,l,t)}updateElements(e,i,a,n){const o=this,r="reset"===n,{xScale:s,yScale:l,_stacked:h}=o._cachedMeta,t=o.resolveDataElementOptions(i,n),c=o.getSharedOptions(t),d=o.includeOptions(n,c),u=o.options.spanGaps,g=Dt(u)?u:Number.POSITIVE_INFINITY,f=o.chart._animationsDisabled||r||"none"===n;let p=0<i&&o.getParsed(i-1);for(let t=i;t<i+a;++t){const i=e[t],a=o.getParsed(t),u=f?i:{},m=H(a.y),x=u.x=s.getPixelForValue(a.x,t),b=u.y=r||m?l.getBasePixel():l.getPixelForValue(h?o.applyStack(l,a,h):a.y,t);u.skip=isNaN(x)||isNaN(b)||m,u.stop=0<t&&a.x-p.x>g,u.parsed=a,d&&(u.options=c||o.resolveDataElementOptions(t,n)),f||o.updateElement(i,t,u,n),p=a}o.updateSharedOptions(c,n,t)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,a=t.data||[];if(!a.length)return i;var n=a[0].size(this.resolveDataElementOptions(0)),o=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(i,n,o)/2}draw(){this._cachedMeta.dataset.updateControlPoints(this.chart.chartArea),super.draw()}}Ka.id="line",Ka.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Ka.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Ga extends Pi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}update(t){var e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this,e=t.chart,i=e.chartArea,a=e.options,n=Math.min(i.right-i.left,i.bottom-i.top),o=Math.max(n/2,0),r=(o-Math.max(a.cutoutPercentage?o/100*a.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=o-r*t.index,t.innerRadius=t.outerRadius-r}updateElements(a,n,t,o){const r=this,s="reset"===o,l=r.chart,h=r.getDataset(),c=l.options.animation,d=r._cachedMeta.rScale,u=d.xCenter,g=d.yCenter,f=d.getIndexAngle(0)-.5*pt;let p,m=f;var x=360/r.countVisibleElements();for(p=0;p<n;++p)m+=r._computeAngle(p,o,x);for(p=n;p<n+t;p++){const n=a[p];let t=m,e=m+r._computeAngle(p,o,x),i=l.getDataVisibility(p)?d.getDistanceFromCenterForValue(h.data[p]):0;m=e,s&&(c.animateScale&&(i=0),c.animateRotate&&(t=e=f));var b={x:u,y:g,innerRadius:0,outerRadius:i,startAngle:t,endAngle:e,options:r.resolveDataElementOptions(p,o)};r.updateElement(n,p,b,o)}}countVisibleElements(){const i=this.getDataset(),t=this._cachedMeta;let a=0;return t.data.forEach((t,e)=>{!isNaN(i.data[e])&&this.chart.getDataVisibility(e)&&a++}),a}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Tt(this.resolveDataElementOptions(t,e).angle||i):0}}Ga.id="polarArea",Ga.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Ga.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(a){const t=a.data;return t.labels.length&&t.datasets.length?t.labels.map((t,e)=>{var i=a.getDatasetMeta(0).controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:!a.getDataVisibility(e),index:e}}):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Za extends qa{}Za.id="pie",Za.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Qa extends Pi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this,i=e._cachedMeta,a=i.dataset,n=i.data||[],o=i.iScale.getLabels();if(a.points=n,"resize"!==t){const i=e.resolveDatasetElementOptions(t);e.options.showLine||(i.borderWidth=0);var r={_loop:!0,_fullLoop:o.length===n.length,options:i};e.updateElement(a,void 0,r,t)}e.updateElements(n,0,n.length,t)}updateElements(e,i,a,n){const o=this.getDataset(),r=this._cachedMeta.rScale,s="reset"===n;for(let t=i;t<i+a;t++){const i=e[t],a=this.resolveDataElementOptions(t,n),l=r.getPointPositionForValue(t,o.data[t]),h=s?r.xCenter:l.x,c=s?r.yCenter:l.y,d={x:h,y:c,angle:l.angle,skip:isNaN(h)||isNaN(c),options:a};this.updateElement(i,t,d,n)}}}Qa.id="radar",Qa.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Qa.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class Ja extends Ka{}Ja.id="scatter",Ja.defaults={showLine:!1,fill:!1},Ja.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var tn=Object.freeze({__proto__:null,BarController:Ua,BubbleController:Xa,DoughnutController:qa,LineController:Ka,PolarAreaController:Ga,PieController:Za,RadarController:Qa,ScatterController:Ja});function en(t,e){var{startAngle:i,endAngle:a,pixelMargin:n,x:o,y:r,outerRadius:s,innerRadius:l}=e,e=n/s;t.beginPath(),t.arc(o,r,s,i-e,a+e),n<l?t.arc(o,r,l,a+(e=n/l),i-e,!0):t.arc(o,r,n,a+_t,i-_t),t.closePath(),t.clip()}function an(t,e,i,a){return{x:i+t*Math.cos(e),y:a+t*Math.sin(e)}}function nn(t,e){var{x:i,y:a,startAngle:n,endAngle:o,pixelMargin:r}=e,s=Math.max(e.outerRadius-r,0),l=e.innerRadius+r,{outerStart:h,outerEnd:c,innerStart:d,innerEnd:u}=function(t,e,i,a){t=Oe(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const n=(i-e)/2,o=Math.min(n,a*e/2),r=t=>{var e=(i-Math.min(n,t))*a/2;return Bt(t,0,Math.min(n,e))};return{outerStart:r(t.outerStart),outerEnd:r(t.outerEnd),innerStart:Bt(t.innerStart,0,o),innerEnd:Bt(t.innerEnd,0,o)}}(e,l,s,o-n),g=s-h,f=s-c,p=n+h/g,m=o-c/f,x=l+d,b=l+u,r=n+d/x,e=o-u/b;if(t.beginPath(),t.arc(i,a,s,p,m),0<c){const v=an(f,m,i,a);t.arc(v.x,v.y,c,m,o+_t)}m=an(b,o,i,a);if(t.lineTo(m.x,m.y),0<u){const v=an(b,e,i,a);t.arc(v.x,v.y,u,o+_t,e+Math.PI)}if(t.arc(i,a,l,o-u/l,n+d/l,!0),0<d){const v=an(x,r,i,a);t.arc(v.x,v.y,d,r+Math.PI,n-_t)}r=an(g,n,i,a);if(t.lineTo(r.x,r.y),0<h){const v=an(g,p,i,a);t.arc(v.x,v.y,h,n-_t,p)}t.closePath()}function on(t,e){var{options:i}=e,a="inner"===i.borderAlign;i.borderWidth&&(a?(t.lineWidth=2*i.borderWidth,t.lineJoin="round"):(t.lineWidth=i.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){var{x:a,y:n,startAngle:o,endAngle:r,pixelMargin:s}=e,l=Math.max(e.outerRadius-s,0),s=e.innerRadius+s;let h;for(i&&(e.endAngle=e.startAngle+mt,en(t,e),e.endAngle=r,e.endAngle===e.startAngle&&(e.endAngle+=mt,e.fullCircles--)),t.beginPath(),t.arc(a,n,s,o+mt,o,!0),h=0;h<e.fullCircles;++h)t.stroke();for(t.beginPath(),t.arc(a,n,l,o,o+mt),h=0;h<e.fullCircles;++h)t.stroke()}(t,e,a),a&&en(t,e),nn(t,e),t.stroke())}class rn extends Di{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){var{angle:a,distance:n}=Et(this.getProps(["x","y"],i),{x:t,y:e}),{startAngle:o,endAngle:r,innerRadius:t,outerRadius:e,circumference:i}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i);return(i>=mt||Vt(a,o,r))&&t<=n&&n<=e}getCenterPoint(t){var{x:e,y:i,startAngle:a,endAngle:n,innerRadius:o,outerRadius:t}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),n=(a+n)/2,t=(o+t)/2;return{x:e+Math.cos(n)*t,y:i+Math.sin(n)*t}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const e=this,i=e.options,a=i.offset||0;if(e.pixelMargin="inner"===i.borderAlign?.33:0,e.fullCircles=Math.floor(e.circumference/mt),!(0===e.circumference||e.innerRadius<0||e.outerRadius<0)){if(t.save(),a&&e.circumference<mt){const i=(e.startAngle+e.endAngle)/2;t.translate(Math.cos(i)*a,Math.sin(i)*a)}t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor,function(e,i){if(i.fullCircles){i.endAngle=i.startAngle+mt,nn(e,i);for(let t=0;t<i.fullCircles;++t)e.fill()}isNaN(i.circumference)||(i.endAngle=i.startAngle+i.circumference%mt),nn(e,i),e.fill()}(t,e),on(t,e),t.restore()}}}function sn(t,e,i=e){t.lineCap=U(i.borderCapStyle,e.borderCapStyle),t.setLineDash(U(i.borderDash,e.borderDash)),t.lineDashOffset=U(i.borderDashOffset,e.borderDashOffset),t.lineJoin=U(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=U(i.borderWidth,e.borderWidth),t.strokeStyle=U(i.borderColor,e.borderColor)}function ln(t,e,i){t.lineTo(i.x,i.y)}function hn(t,e,i={}){var a=t.length,{start:n=0,end:o=a-1}=i,{start:r,end:s}=e,t=Math.max(n,r),i=Math.min(o,s);return{count:a,start:t,loop:e.loop,ilen:i<t&&!(n<r&&o<r||s<n&&s<o)?a+i-t:i-t}}function cn(t,e,i,a){const{points:n,options:o}=e,{count:r,start:s,loop:l,ilen:h}=hn(n,i,a),c=o.stepped?Gt:o.tension||"monotone"===o.cubicInterpolationMode?Zt:ln;let d,u,g,{move:f=!0,reverse:p}=a||{};for(d=0;d<=h;++d)u=n[(s+(p?h-d:d))%r],u.skip||(f?(t.moveTo(u.x,u.y),f=!1):c(t,g,u,p,o.stepped),g=u);return l&&(u=n[(s+(p?h:0))%r],c(t,g,u,p,o.stepped)),!!l}function dn(t,e,i,a){const n=e.points,{count:o,start:r,ilen:s}=hn(n,i,a),{move:l=!0,reverse:h}=a||{};let c,d,u,g,f,p,m=0,x=0;var b=t=>(r+(h?s-t:t))%o,v=()=>{g!==f&&(t.lineTo(m,f),t.lineTo(m,g),t.lineTo(m,p))};for(l&&(d=n[b(0)],t.moveTo(d.x,d.y)),c=0;c<=s;++c)if(d=n[b(c)],!d.skip){const e=d.x,i=d.y,a=0|e;a===u?(i<g?g=i:i>f&&(f=i),m=(x*m+e)/++x):(v(),t.lineTo(e,i),u=a,x=0,g=f=i),p=i}v()}function un(t){var e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?cn:dn}rn.id="arc",rn.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,angle:void 0},rn.defaultRoutes={backgroundColor:"backgroundColor"};const gn="function"==typeof Path2D;class fn extends Di{constructor(t){super(),this.animated=!0,this.options=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,t&&Object.assign(this,t)}updateControlPoints(t){var e,i=this.options;!i.tension&&"monotone"!==i.cubicInterpolationMode||i.stepped||this._pointsUpdated||(e=i.spanGaps?this._loop:this._fullLoop,ia(this._points,i,t,e),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=ga(this,this.options.segment))}first(){var t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){var t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(i,a){const n=this,o=n.options,r=i[a],s=n.points,l=ua(n,{property:a,start:r,end:r});if(l.length){const h=[],c=o.stepped?na:o.tension||"monotone"===o.cubicInterpolationMode?oa:aa;let e,t;for(e=0,t=l.length;e<t;++e){const{start:n,end:t}=l[e],d=s[n],u=s[t];if(d!==u){const g=c(d,u,Math.abs((r-d[a])/(u[a]-d[a])),o.stepped);g[a]=i[a],h.push(g)}else h.push(d)}return 1===h.length?h[0]:h}}pathSegment(t,e,i){return un(this)(t,this,e,i)}path(t,e,i){const a=this.segments,n=un(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const r of a)o&=n(t,this,r,{start:e,end:e+i-1});return!!o}draw(t,e,i,a){var n,o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),n=t,o=this,i=i,a=a,(gn&&1===o.segments.length?function(t,e,i,a){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,a)&&n.closePath()),sn(t,e.options),t.stroke(n)}:function(t,e,i,a){const{segments:n,options:o}=e,r=un(e);for(const s of n)sn(t,o,s.style),t.beginPath(),r(t,e,s,{start:i,end:i+a-1})&&t.closePath(),t.stroke()})(n,o,i,a),t.restore(),this.animated&&(this._pointsUpdated=!1,this._path=void 0))}}function pn(t,e,i,a){var n=t.options,{[i]:i}=t.getProps([i],a);return Math.abs(e-i)<n.radius+n.hitRadius}fn.id="line",fn.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},fn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},fn.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class mn extends Di{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){var a=this.options,{x:n,y:i}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-i,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(t,e){return pn(this,t,"x",e)}inYRange(t,e){return pn(this,t,"y",e)}getCenterPoint(t){var{x:e,y:t}=this.getProps(["x","y"],t);return{x:e,y:t}}size(t){var e=(t=t||this.options||{}).radius||0;return 2*((e=Math.max(e,e&&t.hoverRadius||0))+(e&&t.borderWidth||0))}draw(t){var e=this.options;this.skip||e.radius<.1||(t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,Ut(t,e,this.x,this.y))}getRange(){var t=this.options||{};return t.radius+t.hitRadius}}function xn(t,e){var{x:i,y:a,base:n,width:o,height:e}=t.getProps(["x","y","base","width","height"],e);let r,s,l,h,c;return h=t.horizontal?(c=e/2,r=Math.min(i,n),s=Math.max(i,n),l=a-c,a+c):(c=o/2,r=i-c,s=i+c,l=Math.min(a,n),Math.max(a,n)),{left:r,top:l,right:s,bottom:h}}function bn(t){let e=t.options.borderSkipped;const i={};return e&&(e=t.horizontal?vn(e,"left","right",t.base>t.x):vn(e,"bottom","top",t.base<t.y),i[e]=!0),i}function vn(t,e,i,a){return t=a?_n(t=t===e?i:t===i?e:t,i,e):_n(t,e,i)}function _n(t,e,i){return"start"===t?e:"end"===t?i:t}function yn(t,e,i,a){return t?0:Math.max(Math.min(e,a),i)}function wn(t,e,i,a){var n=null===e,o=null===i,a=t&&!(n&&o)&&xn(t,a);return a&&(n||e>=a.left&&e<=a.right)&&(o||i>=a.top&&i<=a.bottom)}function Mn(t,e){t.rect(e.x,e.y,e.w,e.h)}mn.id="point",mn.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},mn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class kn extends Di{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const e=this.options,{inner:i,outer:a}=(h=xn(o=this),c=h.right-h.left,d=h.bottom-h.top,u=c/2,s=d/2,l=(r=o).options.borderWidth,r=bn(r),l=Ae(l),u={t:yn(r.top,l.top,0,s),r:yn(r.right,l.right,0,u),b:yn(r.bottom,l.bottom,0,s),l:yn(r.left,l.left,0,u)},o=function(t,e,i){var{enableBorderRadius:a}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,o=Te(n),i=Math.min(e,i),t=bn(t),n=a||j(n);return{topLeft:yn(!n||t.top||t.left,o.topLeft,0,i),topRight:yn(!n||t.top||t.right,o.topRight,0,i),bottomLeft:yn(!n||t.bottom||t.left,o.bottomLeft,0,i),bottomRight:yn(!n||t.bottom||t.right,o.bottomRight,0,i)}}(o,c/2,d/2),{outer:{x:h.left,y:h.top,w:c,h:d,radius:o},inner:{x:h.left+u.l,y:h.top+u.t,w:c-u.l-u.r,h:d-u.t-u.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(u.t,u.l)),topRight:Math.max(0,o.topRight-Math.max(u.t,u.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(u.b,u.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(u.b,u.r))}}}),n=(u=a.radius).topLeft||u.topRight||u.bottomLeft||u.bottomRight?Jt:Mn;var o,r,s,l,h,c,d,u;t.save(),a.w===i.w&&a.h===i.h||(t.beginPath(),n(t,a),t.clip(),n(t,i),t.fillStyle=e.borderColor,t.fill("evenodd")),t.beginPath(),n(t,i),t.fillStyle=e.backgroundColor,t.fill(),t.restore()}inRange(t,e,i){return wn(this,t,e,i)}inXRange(t,e){return wn(this,t,null,e)}inYRange(t,e){return wn(this,null,t,e)}getCenterPoint(t){var{x:e,y:i,base:a,horizontal:t}=this.getProps(["x","y","base","horizontal"],t);return{x:t?(e+a)/2:e,y:t?i:(i+a)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}kn.id="bar",kn.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},kn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Sn=Object.freeze({__proto__:null,ArcElement:rn,LineElement:fn,PointElement:mn,BarElement:kn});function Pn(t){var e;t._decimated&&(e=t._data,delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e}))}function Dn(t){t.data.datasets.forEach(t=>{Pn(t)})}var Cn={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,w)=>{if(w.enabled){const r=i.width;i.data.datasets.forEach((a,t)=>{var{_data:n,indexAxis:e}=a,h=i.getDatasetMeta(t),o=n||a.data;if("y"!==Ee([e,i.options.indexAxis])&&"line"===h.type){e=i.scales[h.xAxisID];if(("linear"===e.type||"time"===e.type)&&!i.options.parsing){let t,{start:e,count:i}=function(t){var e=t.length;let i,a=0;const{iScale:n}=h,{min:o,max:r,minDefined:s,maxDefined:l}=n.getUserBounds();return s&&(a=Bt(ee(t,n.axis,o).lo,0,e-1)),i=l?Bt(ee(t,n.axis,r).hi+1,a,e)-a:e-a,{start:a,count:i}}(o);if(i<=4*r)Pn(a);else{switch(H(n)&&(a._data=o,delete a.data,Object.defineProperty(a,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),w.algorithm){case"lttb":t=function(a,n,o,t){var e=w.samples||t;if(o<=e)return a.slice(n,n+o);const r=[],s=(o-2)/(e-2);let l=0;const h=n+o-1;let c,d,u,g,f,p=n;for(r[l++]=a[p],c=0;c<e-2;c++){let t,e=0,i=0;const h=Math.floor((c+1)*s)+1+n,_=Math.min(Math.floor((c+2)*s)+1,o)+n,y=_-h;for(t=h;t<_;t++)e+=a[t].x,i+=a[t].y;e/=y,i/=y;var m=Math.floor(c*s)+1+n,x=Math.floor((c+1)*s)+1+n,{x:b,y:v}=a[p];for(u=-1,t=m;t<x;t++)(g=.5*Math.abs((b-e)*(a[t].y-v)-(b-a[t].x)*(i-v)))>u&&(u=g,d=a[t],f=t);r[l++]=d,p=f}return r[l++]=a[h],r}(o,e,i,r);break;case"min-max":t=function(t,e,i,a){let n,o,r,s,l,h,c,d,u,g,f=0,p=0;const m=[],x=e+i-1,b=t[e].x,v=t[x].x-b;for(n=e;n<e+i;++n){r=((o=t[n]).x-b)/v*a,s=o.y;const e=0|r;if(e===l)s<u?(u=s,h=n):s>g&&(g=s,c=n),f=(p*f+o.x)/++p;else{const i=n-1;if(!H(h)&&!H(c)){const e=Math.min(h,c),a=Math.max(h,c);e!==d&&e!==i&&m.push({...t[e],x:f}),a!==d&&a!==i&&m.push({...t[a],x:f})}0<n&&i!==d&&m.push(t[i]),m.push(o),l=e,p=0,u=g=s,h=c=d=n}}return m}(o,e,i,r);break;default:throw new Error(`Unsupported decimation algorithm '${w.algorithm}'`)}a._decimated=t}}}})}else Dn(i)},destroy(t){Dn(t)}};class On{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){var{x:a,y:n,radius:o}=this;return e=e||{start:0,end:mt},t.arc(a,n,o,e.end,e.start,!0),!i.bounds}interpolate(t){var{x:e,y:i,radius:a}=this,t=t.angle;return{x:e+Math.cos(t)*a,y:i+Math.sin(t)*a,angle:t}}}function An(t){const{chart:e,scale:i,index:a,line:n}=t,o=[],r=n.segments,s=n.points,l=function(t,e){const i=[],a=t.getSortedVisibleDatasetMetas();for(let t=0;t<a.length;t++){var n=a[t];if(n.index===e)break;Tn(n)&&i.unshift(n.dataset)}return i}(e,a);l.push(Rn({x:null,y:i.bottom},n));for(let t=0;t<r.length;t++){const e=r[t];for(let t=e.start;t<=e.end;t++)!function(e,i,a){const n=[];for(let t=0;t<a.length;t++){var{first:o,last:r,point:s}=function(t,e,i){const a=t.interpolate(e,i);if(!a)return{};var n=a[i],o=t.segments,r=t.points;let s=!1,l=!1;for(let t=0;t<o.length;t++){const e=o[t],a=r[e.start][i],h=r[e.end][i];if(n>=a&&n<=h){s=n===a,l=n===h;break}}return{first:s,last:l,point:a}}(a[t],i,"x");if(!(!s||o&&r))if(o)n.unshift(s);else if(e.push(s),!r)break}e.push(...n)}(o,s[t],l)}return new fn({points:o,options:{}})}const Tn=t=>"line"===t.type&&!t.hidden;function Rn(t,e){let i=[],a=!1;return i=N(t)?(a=!0,t):function(){const{x:i=null,y:a=null}=t||{},n=e.points,o=[];return e.segments.forEach(t=>{var e=n[t.start],t=n[t.end];null!==a?(o.push({x:e.x,y:a}),o.push({x:t.x,y:a})):null!==i&&(o.push({x:i,y:e.y}),o.push({x:i,y:t.y}))}),o}(),i.length?new fn({points:i,options:{tension:0},_loop:a,_fullLoop:a}):null}function Ln(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function En(i,a,n,t){if(!t){let t=a[i],e=n[i];return"angle"===i&&(t=Ft(t),e=Ft(e)),{property:i,start:t,end:e}}}function In(t,e,i,a){return t&&e?a(t[i],e[i]):t?t[i]:e?e[i]:0}function zn(t,e,i,a){a=e.interpolate(i,a);a&&t.lineTo(a.x,a.y)}function Fn(t,e){const{line:i,target:a,property:n,color:o,scale:r}=e,s=function(t,e,i){const a=t.segments,n=t.points,o=e.points,r=[];for(const t of a){const a=En(i,n[t.start],n[t.end],t.loop);if(e.segments){var s=ua(e,a);for(const e of s){var l=En(i,o[e.start],o[e.end],e.loop),h=da(t,n,l);for(const t of h)r.push({source:t,target:e,start:{[i]:In(a,l,"start",Math.max)},end:{[i]:In(a,l,"end",Math.min)}})}}else r.push({source:t,target:a,start:n[t.start],end:n[t.end]})}return r}(i,a,n);for(const{source:e,target:c,start:d,end:u}of s){const{style:{backgroundColor:s=o}={}}=e;t.save(),t.fillStyle=s,function(t,e,i){var{top:a,bottom:n}=e.chart.chartArea,{property:o,start:e,end:i}=i||{};"x"===o&&(t.beginPath(),t.rect(e,a,i-e,n-a),t.clip())}(t,r,En(n,d,u)),t.beginPath();var l=!!i.pathSegment(t,e);l?t.closePath():zn(t,a,u,n);var h=!!a.pathSegment(t,c,{move:l,reverse:!0}),h=l&&h;h||zn(t,a,d,n),t.closePath(),t.fill(h?"evenodd":"nonzero"),t.restore()}}function Vn(t,e,i){var a=function(t){var e,i,{chart:a,fill:n,line:o}=t;if($(n))return i=n,(a=(e=a).getDatasetMeta(i))&&e.isDatasetVisible(i)?a.dataset:null;if("stack"===n)return An(t);var c,t=(((c=t).scale||{}).getPointPositionForValue?function(){const{scale:t,fill:e}=c,i=t.options,a=t.getLabels().length,n=[],o=i.reverse?t.max:t.min,r=i.reverse?t.min:t.max;let s,l,h;if(h="start"===e?o:"end"===e?r:j(e)?e.value:t.getBaseValue(),i.grid.circular)return l=t.getPointPositionForValue(0,o),new On({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(h)});for(s=0;s<a;++s)n.push(t.getPointPositionForValue(s,h));return n}:function(){const{scale:t={},fill:e}=c;let i,a=null;return"start"===e?a=t.bottom:"end"===e?a=t.top:j(e)?a=t.getPixelForValue(e.value):t.getBasePixel&&(a=t.getBasePixel()),$(a)?{x:(i=t.isHorizontal())?a:null,y:i?null:a}:null})();return t instanceof On?t:Rn(t,o)}(e),{line:n,scale:o,axis:r}=e,s=n.options,e=s.fill,s=s.backgroundColor,{above:e=s,below:s=s}=e||{};a&&n.points.length&&(qt(t,i),function(t,e){var{line:i,target:a,above:n,below:o,area:r,scale:s}=e,e=i._loop?"angle":e.axis;t.save(),"x"===e&&o!==n&&(Ln(t,a,r.top),Fn(t,{line:i,target:a,color:n,scale:s,property:e}),t.restore(),t.save(),Ln(t,a,r.bottom)),Fn(t,{line:i,target:a,color:o,scale:s,property:e}),t.restore()}(t,{line:n,target:a,above:e,below:s,area:i,scale:o,axis:r}),Kt(t))}var Bn={id:"filler",afterDatasetsUpdate(t,e,i){const a=(t.data.datasets||[]).length,n=[];let o,r,s,l;for(r=0;r<a;++r)o=t.getDatasetMeta(r),s=o.dataset,l=null,s&&s.options&&s instanceof fn&&(l={visible:t.isDatasetVisible(r),index:r,fill:function(a,t,e){var i=function(){var t=a.options,e=t.fill;let i=U(e&&e.target,e);return void 0===i&&(i=!!t.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}();if(j(i))return!isNaN(i.value)&&i;let n=parseFloat(i);return $(n)&&Math.floor(n)===n?("-"!==i[0]&&"+"!==i[0]||(n=t+n),!(n===t||n<0||n>=e)&&n):0<=["origin","start","end","stack"].indexOf(i)&&i}(s,r,a),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:s}),o.$filler=l,n.push(l);for(r=0;r<a;++r)l=n[r],l&&!1!==l.fill&&(l.fill=function(t,e,i){let a=t[e].fill;const n=[e];var o;if(!i)return a;for(;!1!==a&&-1===n.indexOf(a);){if(!$(a))return a;if(!(o=t[a]))return!1;if(o.visible)return a;n.push(a),a=o.fill}return!1}(n,r,i.propagate))},beforeDraw(e,t,i){var a="beforeDraw"===i.drawTime,n=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let t=n.length-1;0<=t;--t){const i=n[t].$filler;i&&(i.line.updateControlPoints(o),a&&Vn(e.ctx,i,o))}},beforeDatasetsDraw(e,t,i){if("beforeDatasetsDraw"===i.drawTime){var a=e.getSortedVisibleDatasetMetas();for(let t=a.length-1;0<=t;--t){const i=a[t].$filler;i&&Vn(e.ctx,i,e.chartArea)}}},beforeDatasetDraw(t,e,i){e=e.meta.$filler;e&&!1!==e.fill&&"beforeDatasetDraw"===i.drawTime&&Vn(t.ctx,e,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Wn=(t,e)=>{let{boxHeight:i=e,boxWidth:a=e}=t;return t.usePointStyle&&(i=Math.min(i,e),a=Math.min(a,e)),{boxWidth:a,boxHeight:i,itemHeight:Math.max(e,i)}};class Hn extends Di{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height)}buildLabels(){const i=this,a=i.options.labels||{};let t=K(a.generateLabels,[i.chart],i)||[];a.filter&&(t=t.filter(t=>a.filter(t,i.chart.data))),a.sort&&(t=t.sort((t,e)=>a.sort(t,e,i.chart.data))),i.options.reverse&&t.reverse(),i.legendItems=t}fit(){const i=this,{options:a,ctx:n}=i;if(a.display){var o=a.labels,r=Le(o.font),s=r.size,l=i._computeTitleHeight(),{boxWidth:h,itemHeight:o}=Wn(o,s);let t,e;n.font=r.string,i.isHorizontal()?(t=i.maxWidth,e=i._fitRows(l,s,h,o)+10):(e=i.maxHeight,t=i._fitCols(l,s,h,o)+10),i.width=Math.min(t,a.maxWidth||i.maxWidth),i.height=Math.min(e,a.maxHeight||i.maxHeight)}else i.width=i.height=0}_fitRows(t,i,a,n){const{ctx:o,maxWidth:r,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],h=this.lineWidths=[0],c=n+s;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,g=-c;return this.legendItems.forEach((t,e)=>{t=a+i/2+o.measureText(t.text).width;(0===e||h[h.length-1]+t+2*s>r)&&(d+=c,h[h.length-(0<e?0:1)]=0,g+=c,u++),l[e]={left:0,top:g,row:u,width:t,height:n},h[h.length-1]+=t+s}),d}_fitCols(t,i,a,n){const{ctx:o,maxHeight:e,options:{labels:{padding:r}}}=this,s=this.legendHitBoxes=[],l=this.columnSizes=[],h=e-t;let c=r,d=0,u=0,g=0,f=0,p=0;return this.legendItems.forEach((t,e)=>{t=a+i/2+o.measureText(t.text).width;0<e&&u+i+2*r>h&&(c+=d+r,l.push({width:d,height:u}),g+=d+r,p++,f=0,d=u=0),d=Math.max(d,t),u+=i+r,s[e]={left:g,top:f,col:p,width:t,height:n},f+=n+r}),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){var i=this;if(i.options.display){var a=i._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:r}}}=i;if(this.isHorizontal()){let t=0,e=T(o,i.left+r,i.right-i.lineWidths[t]);for(const s of n)t!==s.row&&(t=s.row,e=T(o,i.left+r,i.right-i.lineWidths[t])),s.top+=i.top+a+r,s.left=e,e+=s.width+r}else{let t=0,e=T(o,i.top+a+r,i.bottom-i.columnSizes[t].height);for(const l of n)l.col!==t&&(t=l.col,e=T(o,i.top+a+r,i.bottom-i.columnSizes[t].height)),l.top=e,l.left+=i.left+r,e+=l.height+r}}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){var t;this.options.display&&(qt(t=this.ctx,this),this._draw(),Kt(t))}_draw(){const d=this,{options:t,columnSizes:u,lineWidths:g,ctx:f}=d,{align:p,labels:m}=t,x=ft.color,b=ra(t.rtl,d.left,d.width),v=Le(m.font),{color:_,padding:y}=m,w=v.size,M=w/2;let k;d.drawTitle(),f.textAlign=b.textAlign("left"),f.textBaseline="middle",f.lineWidth=.5,f.font=v.string;const{boxWidth:S,boxHeight:P,itemHeight:D}=Wn(m,w),C=d.isHorizontal(),O=this._computeTitleHeight();k=C?{x:T(p,d.left+y,d.right-g[0]),y:d.top+y+O,line:0}:{x:d.left+y,y:T(p,d.top+O+y,d.bottom-u[0].height),line:0},sa(d.ctx,t.textDirection);const A=D+y;d.legendItems.forEach((t,e)=>{f.strokeStyle=t.fontColor||_,f.fillStyle=t.fontColor||_;var i,a,n,o,r=f.measureText(t.text).width,s=b.textAlign(t.textAlign||(t.textAlign=m.textAlign)),l=S+w/2+r;let h=k.x,c=k.y;b.setWidth(d.width),C?0<e&&h+l+y>d.right&&(c=k.y+=A,k.line++,h=k.x=T(p,d.left+y,d.right-g[k.line])):0<e&&c+A>d.bottom&&(h=k.x=h+u[k.line].width+y,k.line++,c=k.y=T(p,d.top+O+y,d.bottom-u[k.line].height)),i=b.x(h),a=c,n=t,isNaN(S)||S<=0||isNaN(P)||P<0||(f.save(),o=U(n.lineWidth,1),f.fillStyle=U(n.fillStyle,x),f.lineCap=U(n.lineCap,"butt"),f.lineDashOffset=U(n.lineDashOffset,0),f.lineJoin=U(n.lineJoin,"miter"),f.lineWidth=o,f.strokeStyle=U(n.strokeStyle,x),f.setLineDash(U(n.lineDash,[])),m.usePointStyle?(r={radius:S*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:o},e=b.xPlus(i,S/2),Ut(f,r,e,a+M)):(a=a+Math.max((w-P)/2,0),i=b.leftForLtr(i,S),n=Te(n.borderRadius),f.beginPath(),Object.values(n).some(t=>0!==t)?Jt(f,{x:i,y:a,w:S,h:P,radius:n}):f.rect(i,a,S,P),f.fill(),0!==o&&f.stroke()),f.restore()),h=R(s,h+S+M,d.right),o=b.x(h),s=c,t=t,Qt(f,t.text,o,s+D/2,v,{strikethrough:t.hidden,textAlign:t.textAlign}),C?k.x+=l+y:k.y+=A}),la(d.ctx,t.textDirection)}drawTitle(){const a=this,n=a.options,o=n.title,r=Le(o.font),s=Re(o.padding);if(o.display){const h=ra(n.rtl,a.left,a.width),c=a.ctx,d=o.position,u=r.size/2,g=s.top+u;let t,e=a.left,i=a.width;if(this.isHorizontal())i=Math.max(...a.lineWidths),t=a.top+g,e=T(n.align,e,a.right-i);else{const o=a.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);t=g+T(n.align,a.top,a.bottom-o-n.labels.padding-a._computeTitleHeight())}var l=T(d,e,e+i);c.textAlign=h.textAlign(f(d)),c.textBaseline="middle",c.strokeStyle=o.color,c.fillStyle=o.color,c.font=r.string,Qt(c,o.text,l,t,r)}}_computeTitleHeight(){var t=this.options.title,e=Le(t.font),i=Re(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,a,n;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(n=this.legendHitBoxes,i=0;i<n.length;++i)if(t>=(a=n[i]).left&&t<=a.left+a.width&&e>=a.top&&e<=a.top+a.height)return this.legendItems[i];return null}handleEvent(t){var e,i,a,n=this,o=n.options;("mousemove"===(a=t.type)&&(o.onHover||o.onLeave)||o.onClick&&("click"===a||"mouseup"===a))&&(e=n._getLegendItemAt(t.x,t.y),"mousemove"===t.type?(a=null!==(i=n._hoveredItem)&&null!==e&&i.datasetIndex===e.datasetIndex&&i.index===e.index,i&&!a&&K(o.onLeave,[t,i,n],n),(n._hoveredItem=e)&&!a&&K(o.onHover,[t,e,n],n)):e&&K(o.onClick,[t,e,n],n))}}var Nn={id:"legend",_element:Hn,start(t,e,i){var a=t.legend=new Hn({ctx:t.ctx,options:i,chart:t});Ye.configure(t,a,i),Ye.addBox(t,a)},stop(t){Ye.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const a=t.legend;Ye.configure(t,a,i),a.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const a=e.datasetIndex,n=i.chart;n.isDatasetVisible(a)?(n.hide(a),e.hidden=!0):(n.show(a),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const a=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:r,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{var e=t.controller.getStyle(n?0:void 0),i=Re(e.borderWidth);return{text:a[t.index].label,fillStyle:e.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:(i.width+i.height)/4,strokeStyle:e.borderColor,pointStyle:o||e.pointStyle,rotation:e.rotation,textAlign:r||e.textAlign,borderRadius:0,datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class jn extends Di{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){var i=this,a=i.options;i.left=0,i.top=0,a.display?(i.width=i.right=t,i.height=i.bottom=e,e=N(a.text)?a.text.length:1,i._padding=Re(a.padding),a=e*Le(a.font).lineHeight+i._padding.height,i.isHorizontal()?i.height=a:i.width=a):i.width=i.height=i.right=i.bottom=0}isHorizontal(){var t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){var{top:e,left:i,bottom:a,right:n,options:o}=this,r=o.align;let s,l,h,c=0;return s=this.isHorizontal()?(l=T(r,i,n),h=e+t,n-i):(c="left"===o.position?(l=i+t,h=T(r,a,e),-.5*pt):(l=n-t,h=T(r,e,a),.5*pt),a-e),{titleX:l,titleY:h,maxWidth:s,rotation:c}}draw(){var t,e,i,a,n,o=this.ctx,r=this.options;r.display&&(n=(t=Le(r.font)).lineHeight/2+this._padding.top,{titleX:e,titleY:i,maxWidth:a,rotation:n}=this._drawArgs(n),Qt(o,r.text,0,0,t,{color:r.color,maxWidth:a,rotation:n,textAlign:f(r.align),textBaseline:"middle",translation:[e,i]}))}}var $n={id:"title",_element:jn,start(t,e,i){var a;a=t,t=i,i=new jn({ctx:a.ctx,options:t,chart:a}),Ye.configure(a,i,t),Ye.addBox(a,i),a.titleBlock=i},stop(t){var e=t.titleBlock;Ye.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const a=t.titleBlock;Ye.configure(t,a,i),a.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Yn={average(t){if(!t.length)return!1;let e,i,a=0,n=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();a+=t.x,n+=t.y,++o}}return{x:a/o,y:n/o}},nearest(t,e){if(!t.length)return!1;let i,a,n,o=e.x,r=e.y,s=Number.POSITIVE_INFINITY;for(i=0,a=t.length;i<a;++i){const a=t[i].element;if(a&&a.hasValue()){const t=It(e,a.getCenterPoint());t<s&&(s=t,n=a)}}if(n){const t=n.tooltipPosition();o=t.x,r=t.y}return{x:o,y:r}}};function Un(t,e){return e&&(N(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Xn(t){return("string"==typeof t||t instanceof String)&&-1<t.indexOf("\n")?t.split("\n"):t}function qn(t,e){const i=t._chart.ctx,{body:a,footer:n,title:o}=t,{boxWidth:r,boxHeight:s}=e,l=Le(e.bodyFont),h=Le(e.titleFont),c=Le(e.footerFont),d=o.length,u=n.length,g=a.length,f=Re(e.padding);let p=f.height,m=0,x=a.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x&&(p+=g*(e.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(x-g)*l.lineHeight+(x-1)*e.bodySpacing),u&&(p+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let b=0;const v=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=h.string,G(t.title,v),i.font=l.string,G(t.beforeBody.concat(t.afterBody),v),b=e.displayColors?r+2:0,G(a,t=>{G(t.before,v),G(t.lines,v),G(t.after,v)}),b=0,i.font=c.string,G(t.footer,v),i.restore(),m+=f.width,{width:m,height:p}}function Kn(i,t,a){var e=t.yAlign||function(){var{y:t,height:e}=a;return t<e/2?"top":t>i.height-e/2?"bottom":"center"}();return{xAlign:t.xAlign||function(n,o,r,t){var{x:e,width:i}=r,{width:a,chartArea:{left:s,right:l}}=n;let h="center";return"center"===t?h=e<=(s+l)/2?"left":"right":e<=i/2?h="left":a-i/2<=e&&(h="right"),function(t){var{x:e,width:i}=r,a=o.caretSize+o.caretPadding;return"left"===t&&e+i+a>n.width||"right"===t&&e-i-a<0}(h)&&(h="center"),h}(i,t,a,e),yAlign:e}}function Gn(t,i,e,a){var{caretSize:n,caretPadding:o,cornerRadius:t}=t,{xAlign:r,yAlign:s}=e,l=n+o,t=t+o;let h=function(){let{x:t,width:e}=i;return"right"===r?t-=e:"center"===r&&(t-=e/2),t}();o=function(){let{y:t,height:e}=i;return"top"===s?t+=l:t-="bottom"===s?e+l:e/2,t}();return"center"===s?"left"===r?h+=l:"right"===r&&(h-=l):"left"===r?h-=t:"right"===r&&(h+=t),{x:Bt(h,0,a.width-i.width),y:Bt(o,0,a.height-i.height)}}function Zn(t,e,i){i=Re(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function Qn(t){return Un([],Xn(t))}function Jn(t,e){e=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return e?t.override(e):t}class to extends Di{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){var t=this._cachedAnimations;if(t)return t;var e=this._chart,t=this.options.setContext(this.getContext()),e=t.enabled&&e.options.animation&&t.animations,t=new pi(this._chart,e);return e._cacheable&&(this._cachedAnimations=Object.freeze(t)),t}getContext(){var t,e;return this.$context||(this.$context=(t=this._chart.getContext(),e=this._tooltipItems,Object.assign(Object.create(t),{tooltip:this,tooltipItems:e,type:"tooltip"})))}getTitle(t,e){const{callbacks:i}=e,a=i.beforeTitle.apply(this,[t]),n=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);t=Un(t=[],Xn(a));return t=Un(t,Xn(n)),t=Un(t,Xn(o))}getBeforeBody(t,e){return Qn(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const a=this,{callbacks:n}=e,o=[];return G(t,t=>{const e={before:[],lines:[],after:[]},i=Jn(n,t);Un(e.before,Xn(i.beforeLabel.call(a,t))),Un(e.lines,i.label.call(a,t)),Un(e.after,Xn(i.afterLabel.call(a,t))),o.push(e)}),o}getAfterBody(t,e){return Qn(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,a=i.beforeFooter.apply(this,[t]),n=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);t=Un(t=[],Xn(a));return t=Un(t,Xn(n)),t=Un(t,Xn(o))}_createItems(a){const i=this,t=i._active,n=i._chart.data,o=[],r=[],s=[];let e,l,h=[];for(e=0,l=t.length;e<l;++e)h.push(function(t,e){const{element:i,datasetIndex:a,index:n}=e,o=t.getDatasetMeta(a).controller,{label:r,value:s}=o.getLabelAndValue(n);return{chart:t,label:r,parsed:o.getParsed(n),raw:t.data.datasets[a].data[n],formattedValue:s,dataset:o.getDataset(),dataIndex:n,datasetIndex:a,element:i}}(i._chart,t[e]));return a.filter&&(h=h.filter((t,e,i)=>a.filter(t,e,i,n))),a.itemSort&&(h=h.sort((t,e)=>a.itemSort(t,e,n))),G(h,t=>{const e=Jn(a.callbacks,t);o.push(e.labelColor.call(i,t)),r.push(e.labelPointStyle.call(i,t)),s.push(e.labelTextColor.call(i,t))}),i.labelColors=o,i.labelPointStyles=r,i.labelTextColors=s,i.dataPoints=h,h}update(t,e){const i=this,a=i.options.setContext(i.getContext()),n=i._active;let o,r=[];if(n.length){const t=Yn[a.position].call(i,n,i._eventPosition);r=i._createItems(a),i.title=i.getTitle(r,a),i.beforeBody=i.getBeforeBody(r,a),i.body=i.getBody(r,a),i.afterBody=i.getAfterBody(r,a),i.footer=i.getFooter(r,a);const e=i._size=qn(i,a),s=Object.assign({},t,e),l=Kn(i._chart,a,s),h=Gn(a,s,l,i._chart);i.xAlign=l.xAlign,i.yAlign=l.yAlign,o={opacity:1,x:h.x,y:h.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==i.opacity&&(o={opacity:0});i._tooltipItems=r,i.$context=void 0,o&&i._resolveAnimations().update(i,o),t&&a.external&&a.external.call(i,{chart:i._chart,tooltip:i,replay:e})}drawCaret(t,e,i,a){a=this.getCaretPosition(t,i,a);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){var{xAlign:a,yAlign:n}=this,{cornerRadius:o,caretSize:r}=i,{x:s,y:i}=t,{width:t,height:e}=e;let l,h,c,d,u,g;return"center"===n?(u=i+e/2,g="left"===a?(l=s,h=l-r,d=u+r,u-r):(l=s+t,h=l+r,d=u-r,u+r),c=l):(h="left"===a?s+o+r:"right"===a?s+t-o-r:this.caretX,c="top"===n?(d=i,u=d-r,l=h-r,h+r):(d=i+e,u=d+r,l=h+r,h-r),g=d),{x1:l,x2:h,x3:c,y1:d,y2:u,y3:g}}drawTitle(t,e,i){var a=this.title,n=a.length;let o,r,s;if(n){const l=ra(i.rtl,this.x,this.width);for(t.x=Zn(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=Le(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,s=0;s<n;++s)e.fillText(a[s],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r,s+1===n&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,a,n){const o=this,r=o.labelColors[i],s=o.labelPointStyles[i],{boxHeight:l,boxWidth:h}=n,c=Le(n.bodyFont),d=Zn(o,"left",n),u=a.x(d),g=l<c.lineHeight?(c.lineHeight-l)/2:0,f=e.y+g;if(n.usePointStyle){const e={radius:Math.min(h,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},i=a.leftForLtr(u,h)+h/2,o=f+l/2;t.strokeStyle=n.multiKeyBackground,t.fillStyle=n.multiKeyBackground,Ut(t,e,i,o),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Ut(t,e,i,o)}else{t.lineWidth=r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const e=a.leftForLtr(u,h),i=a.leftForLtr(a.xPlus(u,1),h-2),o=Te(r.borderRadius);Object.values(o).some(t=>0!==t)?(t.beginPath(),t.fillStyle=n.multiKeyBackground,Jt(t,{x:e,y:f,w:h,h:l,radius:o}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Jt(t,{x:i,y:f+1,w:h-2,h:l-2,radius:o}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,f,h,l),t.strokeRect(e,f,h,l),t.fillStyle=r.backgroundColor,t.fillRect(i,f+1,h-2,l-2))}t.fillStyle=o.labelTextColors[i]}drawBody(e,i,t){const{body:a}=this,{bodySpacing:n,bodyAlign:o,displayColors:r,boxHeight:s,boxWidth:l}=t,h=Le(t.bodyFont);let c=h.lineHeight,d=0;const u=ra(t.rtl,this.x,this.width),g=function(t){i.fillText(t,u.x(e.x+d),e.y+c/2),e.y+=c+n},f=u.textAlign(o);let p,m,x,b,v,_,y;for(i.textAlign=o,i.textBaseline="middle",i.font=h.string,e.x=Zn(this,f,t),i.fillStyle=t.bodyColor,G(this.beforeBody,g),d=r&&"right"!==f?"center"===o?l/2+1:l+2:0,b=0,_=a.length;b<_;++b){for(p=a[b],m=this.labelTextColors[b],i.fillStyle=m,G(p.before,g),x=p.lines,r&&x.length&&(this._drawColorBox(i,e,b,u,t),c=Math.max(h.lineHeight,s)),v=0,y=x.length;v<y;++v)g(x[v]),c=h.lineHeight;G(p.after,g)}d=0,c=h.lineHeight,G(this.afterBody,g),e.y-=n}drawFooter(t,e,i){var a=this.footer,n=a.length;let o,r;if(n){const s=ra(i.rtl,this.x,this.width);for(t.x=Zn(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=s.textAlign(i.footerAlign),e.textBaseline="middle",o=Le(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,r=0;r<n;++r)e.fillText(a[r],s.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,a){var{xAlign:n,yAlign:o}=this,{x:r,y:s}=t,{width:l,height:h}=i,c=a.cornerRadius;e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.beginPath(),e.moveTo(r+c,s),"top"===o&&this.drawCaret(t,e,i,a),e.lineTo(r+l-c,s),e.quadraticCurveTo(r+l,s,r+l,s+c),"center"===o&&"right"===n&&this.drawCaret(t,e,i,a),e.lineTo(r+l,s+h-c),e.quadraticCurveTo(r+l,s+h,r+l-c,s+h),"bottom"===o&&this.drawCaret(t,e,i,a),e.lineTo(r+c,s+h),e.quadraticCurveTo(r,s+h,r,s+h-c),"center"===o&&"left"===n&&this.drawCaret(t,e,i,a),e.lineTo(r,s+c),e.quadraticCurveTo(r,s,r+c,s),e.closePath(),e.fill(),0<a.borderWidth&&e.stroke()}_updateAnimationTarget(t){const e=this,i=e._chart,a=e.$animations,n=a&&a.x,o=a&&a.y;if(n||o){const a=Yn[t.position].call(e,e._active,e._eventPosition);var r,s;a&&(r=e._size=qn(e,t),s=Gn(t,s=Object.assign({},a,e._size),t=Kn(i,t,s),i),n._to===s.x&&o._to===s.y||(e.xAlign=t.xAlign,e.yAlign=t.yAlign,e.width=r.width,e.height=r.height,e.caretX=a.x,e.caretY=a.y,e._resolveAnimations().update(e,s)))}}draw(t){var e=this,i=e.options.setContext(e.getContext());let a=e.opacity;if(a){e._updateAnimationTarget(i);const r={width:e.width,height:e.height},s={x:e.x,y:e.y};a=Math.abs(a)<.001?0:a;var n=Re(i.padding),o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;i.enabled&&o&&(t.save(),t.globalAlpha=a,e.drawBackground(s,t,r,i),sa(t,i.textDirection),s.y+=n.top,e.drawTitle(s,t,i),e.drawBody(s,t,i),e.drawFooter(s,t,i),la(t,i.textDirection),t.restore())}}getActiveElements(){return this._active||[]}setActiveElements(t,e){const a=this,i=a._active,n=t.map(({datasetIndex:t,index:e})=>{var i=a._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),o=!Z(i,n),r=a._positionChanged(n,e);(o||r)&&(a._active=n,a._eventPosition=e,a.update(!0))}handleEvent(t,e){var i=this.options,a=this._active||[];let n,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());var r=this._positionChanged(o,t);return(n=e||!Z(o,a)||r)&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),n}_positionChanged(t,e){var{caretX:i,caretY:a,options:n}=this,e=Yn[n.position].call(this,t,e);return!1!==e&&(i!==e.x||a!==e.y)}}to.positioners=Yn;be={id:"tooltip",_element:to,positioners:Yn,afterInit(t,e,i){i&&(t.tooltip=new to({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){var i;t.tooltip&&(i=e.replay,t.tooltip.handleEvent(e.event,i)&&(e.changed=!0))},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:t,title(t){if(0<t.length){var e=t[0],i=e.chart.data.labels,t=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(0<t&&e.dataIndex<t)return i[e.dataIndex]}return""},afterTitle:t,beforeBody:t,beforeLabel:t,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");t=t.formattedValue;return H(t)||(e+=t),e},labelColor(t){t=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){t=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:t,afterBody:t,beforeFooter:t,footer:t,afterFooter:t}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},$n=Object.freeze({__proto__:null,Decimation:Cn,Filler:Bn,Legend:Nn,Title:$n,Tooltip:be});class eo extends Vi{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(H(t))return null;var i,a,n,o,r,s=this.getLabels();return e=e=isFinite(e)&&s[e]===t?e:(n=U(e,a=t),-1===(r=(i=s).indexOf(a))?(o=n,"string"==typeof(t=a)?i.push(t)-1:isNaN(t)?null:o):r!==i.lastIndexOf(a)?n:r),s=s.length-1,null===e?null:Bt(Math.round(e),0,s)}determineDataLimits(){var{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:a}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(a=this.getLabels().length-1)),this.min=i,this.max=a}buildTicks(){const e=this.min,i=this.max,t=this.options.offset,a=[];let n=this.getLabels();n=0===e&&i===n.length-1?n:n.slice(e,i+1),this._valueRange=Math.max(n.length-(t?0:1),1),this._startValue=this.min-(t?.5:0);for(let t=e;t<=i;t++)a.push({value:t});return a}getLabelForValue(t){var e=this.getLabels();return 0<=t&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return null===(t="number"!=typeof t?this.parse(t):t)?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}eo.id="category",eo.defaults={ticks:{callback:eo.prototype.getLabelForValue}};class io extends Vi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return H(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:e,stacked:i}=t.options,{minDefined:a,maxDefined:n}=t.getUserBounds();let{min:o,max:r}=t;var s=t=>o=a?o:t,l=t=>r=n?r:t;if(e||i){const t=kt(o),e=kt(r);t<0&&e<0?l(0):0<t&&0<e&&s(0)}o===r&&(l(r+1),e||s(o-1)),t.min=o,t.max=r}getTickLimit(){let t,{maxTicksLimit:e,stepSize:i}=this.options.ticks;return i?t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1:(t=this.computeTickLimit(),e=e||11),e&&(t=Math.min(e,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){var M=this,k=M.options,S=k.ticks,P=M.getTickLimit(),P=Math.max(2,P);const t=function(){const t=[],{step:e,min:i,max:a,precision:n,count:o,maxTicks:r,maxDigits:s,horizontal:l}={maxTicks:P,min:k.min,max:k.max,precision:S.precision,step:S.stepSize,count:S.count,maxDigits:M._maxDigits(),horizontal:M.isHorizontal()},h=e||1,c=r-1,{min:d,max:u}=M._range||M,g=!H(i),f=!H(a),p=!H(o),m=(u-d)/s;let x,b,v,_,y=St((u-d)/c/h)*h;if(y<1e-14&&!g&&!f)return[{value:d},{value:u}];_=Math.ceil(u/y)-Math.floor(d/y),_>c&&(y=St(_*y/c/h)*h),H(n)||(x=Math.pow(10,n),y=Math.ceil(y*x)/x),b=Math.floor(d/y)*y,v=Math.ceil(u/y)*y,g&&f&&e&&Ot((a-i)/e,y/1e3)?(_=Math.min((a-i)/y,r),y=(a-i)/_,b=i,v=a):p?(b=g?i:b,v=f?a:v,_=o-1,y=(v-b)/_):(_=(v-b)/y,_=Ct(_,Math.round(_),y/1e3)?Math.round(_):Math.ceil(_)),x=Math.pow(10,H(n)?Lt(y):n),b=Math.round(b*x)/x,v=Math.round(v*x)/x;let w=0;for(g&&(t.push({value:i}),b<=i&&w++,Ct(Math.round((b+w*y)*x)/x,i,m*(l?(""+i).length:1))&&w++);w<_;++w)t.push({value:Math.round((b+w*y)*x)/x});return f?Ct(t[t.length-1].value,a,m*(l?(""+a).length:1))?t[t.length-1].value=a:t.push({value:a}):t.push({value:v}),t}();return"ticks"===k.bounds&&At(t,M,"value"),k.reverse?(t.reverse(),M.start=M.max,M.end=M.min):(M.start=M.min,M.end=M.max),t}configure(){const t=this,e=t.ticks;let i=t.min,a=t.max;if(super.configure(),t.options.offset&&e.length){const t=(a-i)/Math.max(e.length-1,1)/2;i-=t,a+=t}t._startValue=i,t._endValue=a,t._valueRange=a-i}getLabelForValue(t){return Oi(t,this.chart.options.locale)}}class ao extends io{determineDataLimits(){var{min:t,max:e}=this.getMinMax(!0);this.min=$(t)?t:0,this.max=$(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){if(this.isHorizontal())return Math.ceil(this.width/40);var t=this._resolveTickFontOptions(0);return Math.ceil(this.height/t.lineHeight)}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function no(t){return 1==t/Math.pow(10,Math.floor(Mt(t)))}ao.id="linear",ao.defaults={ticks:{callback:Ti.formatters.numeric}};class oo extends Vi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){e=io.prototype.parse.apply(this,[t,e]);if(0!==e)return $(e)&&0<e?e:null;this._zero=!0}determineDataLimits(){var{min:t,max:e}=this.getMinMax(!0);this.min=$(t)?Math.max(0,t):null,this.max=$(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:i}=this.getUserBounds();let a=this.min,n=this.max;var t=t=>a=e?a:t,o=t=>n=i?n:t,r=(t,e)=>Math.pow(10,Math.floor(Mt(t))+e);a===n&&(a<=0?(t(1),o(10)):(t(r(a,-1)),o(r(n,1)))),a<=0&&t(r(n,-1)),n<=0&&o(r(a,1)),this._zero&&this.min!==this._suggestedMin&&a===r(this.min,0)&&t(r(a,-1)),this.min=a,this.max=n}buildTicks(){const t=this,e=t.options,i=function(t,e){const i=Math.floor(Mt(e.max)),a=Math.ceil(e.max/Math.pow(10,i)),n=[];let o=Y(t.min,Math.pow(10,Math.floor(Mt(e.min)))),r=Math.floor(Mt(o)),s=Math.floor(o/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;for(;n.push({value:o,major:no(o)}),++s,10===s&&(s=1,++r,l=0<=r?1:l),o=Math.round(s*Math.pow(10,r)*l)/l,r<i||r===i&&s<a;);t=Y(t.max,o);return n.push({value:t,major:no(o)}),n}({min:t._userMin,max:t._userMax},t);return"ticks"===e.bounds&&At(i,t,"value"),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i}getLabelForValue(t){return void 0===t?"0":Oi(t,this.chart.options.locale)}configure(){var t=this.min;super.configure(),this._startValue=Mt(t),this._valueRange=Mt(this.max)-Mt(t)}getPixelForValue(t){return null===(t=void 0===t||0===t?this.min:t)||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Mt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){t=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+t*this._valueRange)}}function ro(t){var e=t.ticks;if(e.display&&t.display){const t=Re(e.backdropPadding);return U(e.font&&e.font.size,ft.font.size)+t.height}return 0}function so(t,e,i,a,n){return t===a||t===n?{start:e-i/2,end:e+i/2}:t<a||n<t?{start:e-i,end:e}:{start:e,end:e+i}}function lo(e,i,t,a){const{ctx:n}=e;if(t)n.arc(e.xCenter,e.yCenter,i,0,mt);else{var o=e.getPointPosition(0,i);n.moveTo(o.x,o.y);for(let t=1;t<a;t++)o=e.getPointPosition(t,i),n.lineTo(o.x,o.y)}}function ho(t){return Dt(t)?t:0}oo.id="logarithmic",oo.defaults={ticks:{callback:Ti.formatters.logarithmic,major:{enabled:!0}}};class co extends io{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=ro(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}determineDataLimits(){var{min:t,max:e}=this.getMinMax(!1);this.min=$(t)&&!isNaN(t)?t:0,this.max=$(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ro(this.options))}generateTickLabels(t){const i=this;io.prototype.generateTickLabels.call(i,t),i._pointLabels=i.getLabels().map((t,e)=>{e=K(i.options.pointLabels.callback,[t,e],i);return e||0===e?e:""})}fit(){var t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={};let a,n,o;const r=[],s=[],l=t.getLabels().length;for(a=0;a<l;a++){const l=t.options.pointLabels.setContext(t.getContext(a));s[a]=l.padding,o=t.getPointPosition(a,t.drawingArea+s[a]);const f=Le(l.font);t.ctx.font=f.string,h=t.ctx,c=f.lineHeight,n=N(d=t._pointLabels[a])?{w:jt(h,h.font,d),h:d.length*c}:{w:h.measureText(d).width,h:c},r[a]=n;const p=t.getIndexAngle(a),m=Rt(p),b=so(m,o.x,n.w,0,180),v=so(m,o.y,n.h,90,270);b.start<e.l&&(e.l=b.start,i.l=p),b.end>e.r&&(e.r=b.end,i.r=p),v.start<e.t&&(e.t=v.start,i.t=p),v.end>e.b&&(e.b=v.end,i.b=p)}var h,c,d,u,g;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=[];const f=t.options,p=ro(f),m=t.getDistanceFromCenterForValue(f.ticks.reverse?t.min:t.max);for(a=0;a<l;a++){const e=0===a?p/2:0,i=t.getPointPosition(a,m+e+s[a]),n=Rt(t.getIndexAngle(a)),o=r[a];u=n,x=o,g=i,90===u||270===u?g.y-=x.h/2:(270<u||u<90)&&(g.y-=x.h);const l=0===(x=n)||180===x?"center":x<180?"left":"right";var x="left"==l?i.x:"center"==l?i.x-o.w/2:i.x-o.w;const c=x+o.w;t._pointLabelItems[a]={x:i.x,y:i.y,textAlign:l,left:x,top:i.y,right:c,bottom:i.y+o.h}}}(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){var a=e.l/Math.sin(i.l),n=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),i=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b),a=ho(a),n=ho(n),o=ho(o),i=ho(i);this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(a+n)/2),Math.floor(t-(o+i)/2))),this.setCenterPoint(a,n,o,i)}setCenterPoint(t,e,i,a){var n=this,e=n.width-e-n.drawingArea,t=t+n.drawingArea,i=i+n.drawingArea,a=n.height-n.paddingTop-a-n.drawingArea;n.xCenter=Math.floor((t+e)/2+n.left),n.yCenter=Math.floor((i+a)/2+n.top+n.paddingTop)}getIndexAngle(t){return Ft(t*(mt/this.getLabels().length)+Tt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(H(t))return NaN;var e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(H(t))return NaN;t/=this.drawingArea/(this.max-this.min);return this.options.reverse?this.max-t:this.min+t}getPointPosition(t,e){t=this.getIndexAngle(t)-_t;return{x:Math.cos(t)*e+this.xCenter,y:Math.sin(t)*e+this.yCenter,angle:t}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){var{left:e,top:i,right:a,bottom:t}=this._pointLabelItems[t];return{left:e,top:i,right:a,bottom:t}}drawBackground(){var{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),lo(this,this.getDistanceFromCenterForValue(this._endValue),e,this.getLabels().length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const i=this,t=i.ctx,e=i.options,{angleLines:a,grid:n}=e,o=i.getLabels().length;let r,s,l;if(e.pointLabels.display&&function(e,i){const{ctx:a,options:{pointLabels:n}}=e;for(let t=i-1;0<=t;t--){const i=n.setContext(e.getContext(t)),o=Le(i.font),{x:r,y:s,textAlign:l,left:h,top:c,right:d,bottom:u}=e._pointLabelItems[t],{backdropColor:g}=i;if(!H(g)){const e=Re(i.backdropPadding);a.fillStyle=g,a.fillRect(h-e.left,c-e.top,d-h+e.width,u-c+e.height)}Qt(a,e._pointLabels[t],r,s+o.lineHeight/2,o,{color:i.color,textAlign:l,textBaseline:"middle"})}}(i,o),n.display&&i.ticks.forEach((t,e)=>{0!==e&&(s=i.getDistanceFromCenterForValue(t.value),e=n.setContext(i.getContext(e-1)),function(t,e,i,a){const n=t.ctx,o=e.circular,{color:r,lineWidth:s}=e;!o&&!a||!r||!s||i<0||(n.save(),n.strokeStyle=r,n.lineWidth=s,n.setLineDash(e.borderDash),n.lineDashOffset=e.borderDashOffset,n.beginPath(),lo(t,i,o,a),n.closePath(),n.stroke(),n.restore())}(i,e,s,o))}),a.display){for(t.save(),r=i.getLabels().length-1;0<=r;r--){const n=a.setContext(i.getContext(r)),{color:o,lineWidth:h}=n;h&&o&&(t.lineWidth=h,t.strokeStyle=o,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=i.getDistanceFromCenterForValue(e.ticks.reverse?i.min:i.max),l=i.getPointPosition(r,s),t.beginPath(),t.moveTo(i.xCenter,i.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const r=this,s=r.ctx,l=r.options,h=l.ticks;if(h.display){var t=r.getIndexAngle(0);let n,o;s.save(),s.translate(r.xCenter,r.yCenter),s.rotate(t),s.textAlign="center",s.textBaseline="middle",r.ticks.forEach((t,e)=>{if(0!==e||l.reverse){var i=h.setContext(r.getContext(e)),a=Le(i.font);if(n=r.getDistanceFromCenterForValue(r.ticks[e].value),i.showLabelBackdrop){o=s.measureText(t.label).width,s.fillStyle=i.backdropColor;const r=Re(i.backdropPadding);s.fillRect(-o/2-r.left,-n-a.size/2-r.top,o+r.width,a.size+r.height)}Qt(s,t.label,0,-n,a,{color:i.color})}}),s.restore()}}drawTitle(){}}co.id="radialLinear",co.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ti.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},co.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};const uo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!(co.descriptors={angleLines:{_fallback:"grid"}}),size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},go=Object.keys(uo);function fo(t,e){return t-e}function po(t,e){if(H(e))return null;const i=t._adapter,{parser:a,round:n,isoWeekday:o}=t._parseOpts;let r=e;return"function"==typeof a&&(r=a(r)),$(r)||(r="string"==typeof a?i.parse(r,a):i.parse(r)),null===r?null:(n&&(r="week"!==n||!Dt(o)&&!0!==o?i.startOf(r,n):i.startOf(r,"isoWeek",o)),+r)}function mo(e,i,a,n){const o=go.length;for(let t=go.indexOf(e);t<o-1;++t){const e=uo[go[t]],o=e.steps||Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((a-i)/(o*e.size))<=n)return go[t]}return go[o-1]}function xo(t,e,i){var a,n;i?i.length&&({lo:a,hi:n}=te(i,e),t[i[a]>=e?i[a]:i[n]]=!0):t[e]=!0}function bo(t,e,i){const a=[],n={},o=e.length;let r,s;for(r=0;r<o;++r)s=e[r],n[s]=r,a.push({value:s,major:!1});return 0!==o&&i?function(t,e,i,a){const n=t._adapter,o=+n.startOf(e[0].value,a),r=e[e.length-1].value;let s,l;for(s=o;s<=r;s=+n.add(s,1,a))0<=(l=i[s])&&(e[l].major=!0);return e}(t,a,n,i):a}class vo extends Vi{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),a=this._adapter=new Na._date(t.adapters.date);it(i.displayFormats,a.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:po(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:a,max:n,minDefined:o,maxDefined:r}=this.getUserBounds();function s(t){o||isNaN(t.min)||(a=Math.min(a,t.min)),r||isNaN(t.max)||(n=Math.max(n,t.max))}o&&r||(s(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||s(this.getMinMax(!1))),a=$(a)&&!isNaN(a)?a:+e.startOf(Date.now(),i),n=$(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(a,n-1),this.max=Math.max(a+1,n)}_getLabelBounds(){var t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){var t=this,e=t.options,i=e.time,a=e.ticks,n="labels"===a.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&n.length&&(t.min=t._userMin||n[0],t.max=t._userMax||n[n.length-1]);const o=t.min,r=ae(n,o,t.max);return t._unit=i.unit||(a.autoSkip?mo(i.minUnit,t.min,t.max,t._getLabelCapacity(o)):function(e,i,a,n,o){for(let t=go.length-1;t>=go.indexOf(a);t--){const a=go[t];if(uo[a].common&&e._adapter.diff(o,n,a)>=i-1)return a}return go[a?go.indexOf(a):0]}(t,r.length,i.minUnit,t.min,t.max)),t._majorUnit=a.major.enabled&&"year"!==t._unit?function(i){for(let t=go.indexOf(i)+1,e=go.length;t<e;++t)if(uo[go[t]].common)return go[t]}(t._unit):void 0,t.initOffsets(n),e.reverse&&r.reverse(),bo(t,r,t._majorUnit)}initOffsets(t){let e,i,a=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),a=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);t=t.length<3?.5:.25;a=Bt(a,0,t),n=Bt(n,0,t),this._offsets={start:a,end:n,factor:1/(a+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,a=this.options,n=a.time,o=n.unit||mo(n.minUnit,e,i,this._getLabelCapacity(e)),r=U(n.stepSize,1),s="week"===o&&n.isoWeekday,l=Dt(s)||!0===s,h={};let c,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",s)),u=+t.startOf(u,l?"day":o),t.diff(i,e,o)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+o);var g="data"===a.ticks.source&&this.getDataTimestamps();for(c=u,d=0;c<i;c=+t.add(c,r,o),d++)xo(h,c,g);return c!==i&&"ticks"!==a.bounds&&1!==d||xo(h,c,g),Object.keys(h).sort((t,e)=>t-e).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,a){var n=this.options,o=n.time.displayFormats,r=this._unit,s=this._majorUnit,l=r&&o[r],r=s&&o[s],o=i[e],o=s&&r&&o&&o.major,l=this._adapter.format(t,a||(o?r:l)),n=n.ticks.callback;return n?K(n,[l,e,i],this):l}generateTickLabels(t){let e,i,a;for(e=0,i=t.length;e<i;++e)a=t[e],a.label=this._tickFormatFunction(a.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){var e=this._offsets,t=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+t)*e.factor)}getValueForPixel(t){var e=this._offsets,e=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+e*(this.max-this.min)}_getLabelSize(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,a=Tt(this.isHorizontal()?e.maxRotation:e.minRotation),t=Math.cos(a),e=Math.sin(a),a=this._resolveTickFontOptions(0).size;return{w:i*t+a*e,h:i*e+a*t}}_getLabelCapacity(t){var e=this.options.time,i=e.displayFormats,i=i[e.unit]||i.millisecond,i=this._tickFormatFunction(t,0,bo(this,[t],this._majorUnit),i),i=this._getLabelSize(i),i=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return 0<i?i:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(t=0,e=a.length;t<e;++t)i=i.concat(a[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;var a=this.getLabels();for(e=0,i=a.length;e<i;++e)t.push(po(this,a[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return se(t.sort(fo))}}function _o(t,e,i){let a,n,o,r;if(i)a=Math.floor(e),n=Math.ceil(e),o=t[a],r=t[n];else{const i=te(t,e);o=i.lo,r=i.hi,a=t[o],n=t[r]}t=n-a;return t?o+(r-o)*(e-a)/t:o}vo.id="time",vo.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class yo extends vo{constructor(t){super(t),this._table=[],this._maxIndex=void 0}initOffsets(){var t=this._getTimestampsForTable();this._table=this.buildLookupTable(t),this._maxIndex=this._table.length-1,super.initOffsets(t)}buildLookupTable(t){var{min:e,max:i}=this;if(!t.length)return[{time:e,pos:0},{time:i,pos:1}];const a=[e];let n,o,r;for(n=0,o=t.length;n<o;++n)e<(r=t[n])&&r<i&&a.push(r);return a.push(i),a}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getPixelForValue(t,e){var i=this._offsets,t=this._normalized&&0<this._maxIndex&&!H(e)?e/this._maxIndex:this.getDecimalForValue(t);return this.getPixelForDecimal((i.start+t)*i.factor)}getDecimalForValue(t){return _o(this._table,t)/this._maxIndex}getValueForPixel(t){var e=this._offsets,e=this.getDecimalForPixel(t)/e.factor-e.end;return _o(this._table,e*this._maxIndex,!0)}}yo.id="timeseries",yo.defaults=vo.defaults;be=Object.freeze({__proto__:null,CategoryScale:eo,LinearScale:ao,LogarithmicScale:oo,RadialLinearScale:co,TimeScale:vo,TimeSeriesScale:yo});return Va.register(tn,be,Sn,$n),Va.helpers={...pa},Va._adapters=Na,Va.Animation=gi,Va.Animations=pi,Va.animator=h,Va.controllers=xa.controllers.items,Va.DatasetController=Pi,Va.Element=Di,Va.elements=Sn,Va.Interaction=Se,Va.layouts=Ye,Va.platforms=ri,Va.Scale=Vi,Va.Ticks=Ti,Object.assign(Va,tn,be,Sn,$n,ri),Va.Chart=Va,"undefined"!=typeof window&&(window.Chart=Va),Va});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,function(){"use strict";const r="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function l(e,i,t){const a=t||(t=>Array.prototype.slice.call(t));let n=!1,o;return function(...t){o=a(t),n||(n=!0,r.call(window,()=>{n=!1,e.apply(i,o)}))}}function s(t,e){let i;return function(){return e?(clearTimeout(i),i=setTimeout(t,e)):t(),e}}const f=t=>"start"===t?"left":"end"===t?"right":"center",T=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,R=(t,e,i)=>"right"===t?i:"center"===t?(e+i)/2:e;var h=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,i,a,t){const n=i.listeners[t],o=i.duration;n.forEach(t=>t({chart:e,initial:i.initial,numSteps:o,currentStep:Math.min(a-i.start,o)}))}_refresh(){const t=this;t._request||(t._running=!0,t._request=r.call(window,()=>{t._update(),t._request=null,t._running&&t._refresh()}))}_update(r=Date.now()){const s=this;let l=0;s._charts.forEach((a,n)=>{if(a.running&&a.items.length){const o=a.items;let t,e=o.length-1,i=!1;for(;0<=e;--e)t=o[e],t._active?(t._total>a.duration&&(a.duration=t._total),t.tick(r),i=!0):(o[e]=o[o.length-1],o.pop());i&&(n.draw(),s._notify(n,a,r,"progress")),o.length||(a.running=!1,s._notify(n,a,r,"complete"),a.initial=!1),l+=o.length}}),s._lastDate=r,0===l&&(s._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return 0<this._getAnims(t).items.length}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;t=this._charts.get(t);return!!(t&&t.running&&t.items.length)}stop(e){const i=this._charts.get(e);if(i&&i.items.length){const a=i.items;let t=a.length-1;for(;0<=t;--t)a[t].cancel();i.items=[],this._notify(e,i,Date.now(),"complete")}}remove(t){return this._charts.delete(t)}};const o={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},e="0123456789ABCDEF",i=t=>e[15&t],a=t=>e[(240&t)>>4]+e[15&t],n=t=>(240&t)>>4==(15&t);function c(t){return t+.5|0}const d=(t,e,i)=>Math.max(Math.min(t,i),e);function u(t){return d(c(2.55*t),0,255)}function g(t){return d(c(255*t),0,255)}function p(t){return d(c(t/2.55)/100,0,1)}function m(t){return d(c(100*t),0,100)}const x=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,b=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function v(i,t,a){const n=t*Math.min(a,1-a),e=(t,e=(t+i/30)%12)=>a-n*Math.max(Math.min(e-3,9-e,1),-1);return[e(0),e(8),e(4)]}function _(i,a,n){i=(t,e=(t+i/60)%6)=>n-n*a*Math.max(Math.min(e,4-e,1),0);return[i(5),i(3),i(1)]}function y(t,e,i){const a=v(t,1,.5);let n;for(1<e+i&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)a[n]*=1-e-i,a[n]+=e;return a}function w(t){var e=t.r/255,i=t.g/255,a=t.b/255,n=Math.max(e,i,a),o=Math.min(e,i,a),t=(n+o)/2;let r,s,l;return n!==o&&(l=n-o,s=.5<t?l/(2-n-o):l/(n+o),r=n===e?(i-a)/l+(i<a?6:0):n===i?(a-e)/l+2:(e-i)/l+4,r=60*r+.5),[0|r,s||0,t]}function M(t,e,i,a){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,a)).map(g)}function k(t,e,i){return M(v,t,e,i)}function S(t){return(t%360+360)%360}const P={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},D={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let C;function O(e,i,a){if(e){let t=w(e);t[i]=Math.max(0,Math.min(t[i]+t[i]*a,0===i?360:1)),t=k(t),e.r=t[0],e.g=t[1],e.b=t[2]}}function A(t,e){return t&&Object.assign(e||{},t)}function L(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?3<=t.length&&(e={r:t[0],g:t[1],b:t[2],a:255},3<t.length&&(e.a=g(t[3]))):(e=A(t,{r:0,g:0,b:0,a:1})).a=g(e.a),e}function E(t){return("r"===t.charAt(0)?function(t){t=x.exec(t);let e,i,a,n=255;if(t){if(t[7]!==e){const o=+t[7];n=255&(t[8]?u(o):255*o)}return e=+t[1],i=+t[3],a=+t[5],e=255&(t[2]?u(e):e),i=255&(t[4]?u(i):i),a=255&(t[6]?u(a):a),{r:e,g:i,b:a,a:n}}}:function(t){var e=b.exec(t);let i,a=255;if(e){void 0!==e[5]&&(a=(e[6]?u:g)(+e[5]));var n=S(+e[2]),o=+e[3]/100,t=+e[4]/100;return{r:(i="hwb"===e[1]?M(y,n,o,t):"hsv"===e[1]?M(_,n,o,t):k(n,o,t))[0],g:i[1],b:i[2],a:a}}})(t)}class I{constructor(t){if(t instanceof I)return t;var e,i,a=typeof t;let n;"object"==a?n=L(t):"string"==a&&(a=(e=t).length,"#"===e[0]&&(4===a||5===a?i={r:255&17*o[e[1]],g:255&17*o[e[2]],b:255&17*o[e[3]],a:5===a?17*o[e[4]]:255}:7!==a&&9!==a||(i={r:o[e[1]]<<4|o[e[2]],g:o[e[3]]<<4|o[e[4]],b:o[e[5]]<<4|o[e[6]],a:9===a?o[e[7]]<<4|o[e[8]]:255})),n=i||(i=t,C||(C=function(){const t={},e=Object.keys(D),i=Object.keys(P);let a,n,o,r,s;for(a=0;a<e.length;a++){for(r=s=e[a],n=0;n<i.length;n++)o=i[n],s=s.replace(o,P[o]);o=parseInt(D[r],16),t[s]=[o>>16&255,o>>8&255,255&o]}return t}(),C.transparent=[0,0,0,0]),(i=C[i.toLowerCase()])&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255})||E(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=A(this._rgb);return t&&(t.a=p(t.a)),t}set rgb(t){this._rgb=L(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${p(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):this._rgb;var t}hexString(){return this._valid?(t=this._rgb,e=t,e=n(e.r)&&n(e.g)&&n(e.b)&&n(e.a)?i:a,t&&"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):"")):this._rgb;var t,e}hslString(){return this._valid?function(t){if(t){var e=w(t),i=e[0],a=m(e[1]),e=m(e[2]);return t.a<255?`hsla(${i}, ${a}%, ${e}%, ${p(t.a)})`:`hsl(${i}, ${a}%, ${e}%)`}}(this._rgb):this._rgb}mix(t,e){if(t){const a=this.rgb,n=t.rgb;var i=void 0===e?.5:e,t=2*i-1,e=a.a-n.a,t=(1+(t*e==-1?t:(t+e)/(1+t*e)))/2,e=1-t;a.r=255&t*a.r+e*n.r+.5,a.g=255&t*a.g+e*n.g+.5,a.b=255&t*a.b+e*n.b+.5,a.a=i*a.a+(1-i)*n.a,this.rgb=a}return this}clone(){return new I(this.rgb)}alpha(t){return this._rgb.a=g(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=c(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return O(this._rgb,2,t),this}darken(t){return O(this._rgb,2,-t),this}saturate(t){return O(this._rgb,1,t),this}desaturate(t){return O(this._rgb,1,-t),this}rotate(t){return e=this._rgb,i=t,(t=w(e))[0]=S(t[0]+i),t=k(t),e.r=t[0],e.g=t[1],e.b=t[2],this;var e,i}}function z(t){return new I(t)}const F=t=>t instanceof CanvasGradient||t instanceof CanvasPattern;function V(t){return F(t)?t:z(t)}function B(t){return F(t)?t:z(t).saturate(.5).darken(.1).hexString()}function t(){}const W=function(){let t=0;return function(){return t++}}();function H(t){return null==t}function N(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function j(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const $=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function Y(t,e){return $(t)?t:e}function U(t,e){return void 0===t?e:t}const X=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,q=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function K(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function G(t,e,i,a){let n,o,r;if(N(t))if(o=t.length,a)for(n=o-1;0<=n;n--)e.call(i,t[n],n);else for(n=0;n<o;n++)e.call(i,t[n],n);else if(j(t))for(r=Object.keys(t),o=r.length,n=0;n<o;n++)e.call(i,t[r[n]],r[n])}function Z(t,e){let i,a,n,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,a=t.length;i<a;++i)if(n=t[i],o=e[i],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function Q(e){if(N(e))return e.map(Q);if(j(e)){const i=Object.create(null),a=Object.keys(e),n=a.length;let t=0;for(;t<n;++t)i[a[t]]=Q(e[a[t]]);return i}return e}function J(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function tt(t,e,i,a){var n;J(t)&&(n=e[t],i=i[t],j(n)&&j(i)?et(n,i,a):e[t]=Q(i))}function et(i,a,n){const e=N(a)?a:[a],o=e.length;if(!j(i))return i;const r=(n=n||{}).merger||tt;for(let t=0;t<o;++t)if(j(a=e[t])){const o=Object.keys(a);for(let t=0,e=o.length;t<e;++t)r(o[t],i,a,n)}return i}function it(t,e){return et(t,e,{merger:at})}function at(t,e,i){var a;J(t)&&(a=e[t],i=i[t],j(a)&&j(i)?it(a,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Q(i)))}function nt(t,e){e=t.indexOf(".",e);return-1===e?t.length:e}function ot(t,e){if(""===e)return t;let i=0,a=nt(e,i);for(;t&&a>i;)t=t[e.substr(i,a-i)],i=a+1,a=nt(e,i);return t}function rt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const st=t=>void 0!==t,lt=t=>"function"==typeof t,ht=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},ct=Object.create(null),dt=Object.create(null);function ut(i,t){if(!t)return i;var a=t.split(".");for(let t=0,e=a.length;t<e;++t){var n=a[t];i=i[n]||(i[n]=Object.create(null))}return i}function gt(t,e,i){return"string"==typeof e?et(ut(t,e),i):et(ut(t,""),e)}var ft=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>B(e.backgroundColor),this.hoverBorderColor=(t,e)=>B(e.borderColor),this.hoverColor=(t,e)=>B(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.describe(t)}set(t,e){return gt(this,t,e)}get(t){return ut(this,t)}describe(t,e){return gt(dt,t,e)}override(t,e){return gt(ct,t,e)}route(t,e,i,a){const n=ut(this,t),o=ut(this,i),r="_"+e;Object.defineProperties(n,{[r]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){var t=this[r],e=o[a];return j(t)?Object.assign({},e,t):U(t,e)},set(t){this[r]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});const pt=Math.PI,mt=2*pt,xt=mt+pt,bt=Number.POSITIVE_INFINITY,vt=pt/180,_t=pt/2,yt=pt/4,wt=2*pt/3,Mt=Math.log10,kt=Math.sign;function St(t){var e=Math.pow(10,Math.floor(Mt(t))),t=t/e;return(t<=1?1:t<=2?2:t<=5?5:10)*e}function Pt(t){const e=[],i=Math.sqrt(t);let a;for(a=1;a<i;a++)t%a==0&&(e.push(a),e.push(t/a));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}function Dt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Ct(t,e,i){return Math.abs(t-e)<i}function Ot(t,e){var i=Math.round(t);return i-e<=t&&t<=i+e}function At(t,e,i){let a,n,o;for(a=0,n=t.length;a<n;a++)o=t[a][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Tt(t){return t*(pt/180)}function Rt(t){return t*(180/pt)}function Lt(i){if($(i)){let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}}function Et(t,e){var i=e.x-t.x,e=e.y-t.y,t=Math.sqrt(i*i+e*e);let a=Math.atan2(e,i);return a<-.5*pt&&(a+=mt),{angle:a,distance:t}}function It(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function zt(t,e){return(t-e+xt)%mt-pt}function Ft(t){return(t%mt+mt)%mt}function Vt(t,e,i){var a=Ft(t),n=Ft(e),o=Ft(i),r=Ft(n-a),t=Ft(o-a),e=Ft(a-n),i=Ft(a-o);return a===n||a===o||t<r&&e<i}function Bt(t,e,i){return Math.max(e,Math.min(i,t))}function Wt(t){return Bt(t,-32768,32767)}function Ht(t){return!t||H(t.size)||H(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Nt(t,e,i,a,n){let o=e[n];return o||(o=e[n]=t.measureText(n).width,i.push(n)),a=o>a?o:a}function jt(t,e,i,a){let n=(a=a||{}).data=a.data||{},o=a.garbageCollect=a.garbageCollect||[];a.font!==e&&(n=a.data={},o=a.garbageCollect=[],a.font=e),t.save(),t.font=e;let r=0;var s=i.length;let l,h,c,d,u;for(l=0;l<s;l++)if(null!=(d=i[l])&&!0!==N(d))r=Nt(t,n,o,r,d);else if(N(d))for(h=0,c=d.length;h<c;h++)null==(u=d[h])||N(u)||(r=Nt(t,n,o,r,u));t.restore();var g=o.length/2;if(g>i.length){for(l=0;l<g;l++)delete n[o[l]];o.splice(0,g)}return r}function $t(t,e,i){t=t.currentDevicePixelRatio,i=0!==i?Math.max(i/2,.5):0;return Math.round((e-i)*t)/t+i}function Yt(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Ut(t,e,i,a){let n,o,r,s,l;const h=e.pointStyle,c=e.rotation,d=e.radius;let u=(c||0)*vt;if(h&&"object"==typeof h&&("[object HTMLImageElement]"===(n=h.toString())||"[object HTMLCanvasElement]"===n))return t.save(),t.translate(i,a),t.rotate(u),t.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),void t.restore();if(!(isNaN(d)||d<=0)){switch(t.beginPath(),h){default:t.arc(i,a,d,0,mt),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(u)*d,a-Math.cos(u)*d),u+=wt,t.lineTo(i+Math.sin(u)*d,a-Math.cos(u)*d),u+=wt,t.lineTo(i+Math.sin(u)*d,a-Math.cos(u)*d),t.closePath();break;case"rectRounded":l=.516*d,s=d-l,o=Math.cos(u+yt)*s,r=Math.sin(u+yt)*s,t.arc(i-o,a-r,l,u-pt,u-_t),t.arc(i+r,a-o,l,u-_t,u),t.arc(i+o,a+r,l,u,u+_t),t.arc(i-r,a+o,l,u+_t,u+pt),t.closePath();break;case"rect":if(!c){s=Math.SQRT1_2*d,t.rect(i-s,a-s,2*s,2*s);break}u+=yt;case"rectRot":o=Math.cos(u)*d,r=Math.sin(u)*d,t.moveTo(i-o,a-r),t.lineTo(i+r,a-o),t.lineTo(i+o,a+r),t.lineTo(i-r,a+o),t.closePath();break;case"crossRot":u+=yt;case"cross":o=Math.cos(u)*d,r=Math.sin(u)*d,t.moveTo(i-o,a-r),t.lineTo(i+o,a+r),t.moveTo(i+r,a-o),t.lineTo(i-r,a+o);break;case"star":o=Math.cos(u)*d,r=Math.sin(u)*d,t.moveTo(i-o,a-r),t.lineTo(i+o,a+r),t.moveTo(i+r,a-o),t.lineTo(i-r,a+o),u+=yt,o=Math.cos(u)*d,r=Math.sin(u)*d,t.moveTo(i-o,a-r),t.lineTo(i+o,a+r),t.moveTo(i+r,a-o),t.lineTo(i-r,a+o);break;case"line":o=Math.cos(u)*d,r=Math.sin(u)*d,t.moveTo(i-o,a-r),t.lineTo(i+o,a+r);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(u)*d,a+Math.sin(u)*d)}t.fill(),0<e.borderWidth&&t.stroke()}}function Xt(t,e,i){return i=i||.5,t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function qt(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Kt(t){t.restore()}function Gt(t,e,i,a,n){if(!e)return t.lineTo(i.x,i.y);if("middle"===n){const a=(e.x+i.x)/2;t.lineTo(a,e.y),t.lineTo(a,i.y)}else"after"===n!=!!a?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Zt(t,e,i,a){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(a?e.cp1x:e.cp2x,a?e.cp1y:e.cp2y,a?i.cp2x:i.cp1x,a?i.cp2y:i.cp1y,i.x,i.y)}function Qt(t,e,i,a,n,o={}){const r=N(e)?e:[e],s=0<o.strokeWidth&&""!==o.strokeColor;let l,h;for(t.save(),o.translation&&t.translate(o.translation[0],o.translation[1]),H(o.rotation)||t.rotate(o.rotation),t.font=n.string,o.color&&(t.fillStyle=o.color),o.textAlign&&(t.textAlign=o.textAlign),o.textBaseline&&(t.textBaseline=o.textBaseline),l=0;l<r.length;++l){if(h=r[l],s&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),H(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(h,i,a,o.maxWidth)),t.fillText(h,i,a,o.maxWidth),o.strikethrough||o.underline){const e=t.measureText(h),n=i-e.actualBoundingBoxLeft,r=i+e.actualBoundingBoxRight,s=a-e.actualBoundingBoxAscent,l=a+e.actualBoundingBoxDescent,c=o.strikethrough?(s+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=o.decorationWidth||2,t.moveTo(n,c),t.lineTo(r,c),t.stroke()}a+=n.lineHeight}t.restore()}function Jt(t,e){var{x:i,y:a,w:n,h:o,radius:e}=e;t.arc(i+e.topLeft,a+e.topLeft,e.topLeft,-_t,pt,!0),t.lineTo(i,a+o-e.bottomLeft),t.arc(i+e.bottomLeft,a+o-e.bottomLeft,e.bottomLeft,pt,_t,!0),t.lineTo(i+n-e.bottomRight,a+o),t.arc(i+n-e.bottomRight,a+o-e.bottomRight,e.bottomRight,_t,0,!0),t.lineTo(i+n,a+e.topRight),t.arc(i+n-e.topRight,a+e.topRight,e.topRight,0,-_t,!0),t.lineTo(i+e.topLeft,a)}function te(e,i,t){t=t||(t=>e[t]<i);let a,n=e.length-1,o=0;for(;1<n-o;)t(a=o+n>>1)?o=a:n=a;return{lo:o,hi:n}}const ee=(e,i,a)=>te(e,a,t=>e[t][i]<a),ie=(e,i,a)=>te(e,a,t=>e[t][i]>=a);function ae(t,e,i){let a=0,n=t.length;for(;a<n&&t[a]<e;)a++;for(;n>a&&t[n-1]>i;)n--;return 0<a||n<t.length?t.slice(a,n):t}const ne=["push","pop","shift","splice","unshift"];function oe(n,t){n._chartjs?n._chartjs.listeners.push(t):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ne.forEach(t=>{const i="_onData"+rt(t),a=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...e){var t=a.apply(this,e);return n._chartjs.listeners.forEach(t=>{"function"==typeof t[i]&&t[i](...e)}),t}})}))}function re(e,t){var i=e._chartjs;if(i){const a=i.listeners,n=a.indexOf(t);-1!==n&&a.splice(n,1),0<a.length||(ne.forEach(t=>{delete e[t]}),delete e._chartjs)}}function se(t){const e=new Set;let i,a;for(i=0,a=t.length;i<a;++i)e.add(t[i]);if(e.size===a)return t;const n=[];return e.forEach(t=>{n.push(t)}),n}function le(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function he(t,e,i){let a;return"string"==typeof t?(a=parseInt(t,10),-1!==t.indexOf("%")&&(a=a/100*e.parentNode[i])):a=t,a}const ce=t=>window.getComputedStyle(t,null);function de(t,e){return ce(t).getPropertyValue(e)}const ue=["top","right","bottom","left"];function ge(e,i,a){const n={};a=a?"-"+a:"";for(let t=0;t<4;t++){var o=ue[t];n[o]=parseFloat(e[i+"-"+o+a])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function fe(t,e){var{canvas:l,currentDevicePixelRatio:i}=e,a=ce(l),n="border-box"===a.boxSizing,o=ge(a,"padding"),r=ge(a,"border","width"),{x:s,y:h,box:a}=function(t){var e=t.native||t,i=e.touches,a=i&&i.length?i[0]:e,{offsetX:t,offsetY:i}=a;let n,o,r=!1;if(e=e.target,!(0<t||0<i)||e&&e.shadowRoot){const s=l.getBoundingClientRect();n=a.clientX-s.left,o=a.clientY-s.top,r=!0}else n=t,o=i;return{x:n,y:o,box:r}}(t),t=o.left+(a&&r.left),a=o.top+(a&&r.top);let{width:c,height:d}=e;return n&&(c-=o.width+r.width,d-=o.height+r.height),{x:Math.round((s-t)/c*l.width/i),y:Math.round((h-a)/d*l.height/i)}}const pe=t=>Math.round(10*t)/10;function me(t,e,i,a){var n=ce(t),o=ge(n,"margin"),r=he(n.maxWidth,t,"clientWidth")||bt,s=he(n.maxHeight,t,"clientHeight")||bt,i=function(t,e,i){let a,n;if(void 0===e||void 0===i){const o=le(t);if(o){const t=o.getBoundingClientRect(),r=ce(o),s=ge(r,"border","width"),l=ge(r,"padding");e=t.width-l.width-s.width,i=t.height-l.height-s.height,a=he(r.maxWidth,o,"clientWidth"),n=he(r.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:a||bt,maxHeight:n||bt}}(t,e,i);let{width:l,height:h}=i;if("content-box"===n.boxSizing){const t=ge(n,"border","width"),e=ge(n,"padding");l-=e.width+t.width,h-=e.height+t.height}return l=Math.max(0,l-o.width),h=Math.max(0,a?Math.floor(l/a):h-o.height),l=pe(Math.min(l,r,i.maxWidth)),h=pe(Math.min(h,s,i.maxHeight)),l&&!h&&(h=pe(l/2)),{width:l,height:h}}function xe(t,e,i){const a=t.currentDevicePixelRatio=e||1,{canvas:n,width:o,height:r}=t;n.height=r*a,n.width=o*a,t.ctx.setTransform(a,0,0,a,0,0),n.style&&(i||!n.style.height&&!n.style.width)&&(n.style.height=r+"px",n.style.width=o+"px")}var be=function(){let t=!1;try{var e={get passive(){return!(t=!0)}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function ve(t,e){const i=de(t,e),a=i&&i.match(/^(\d+)(\.\d+)?px$/);return a?+a[1]:void 0}function _e(t,e){return"native"in t?{x:t.x,y:t.y}:fe(t,e)}function ye(t,i,a,n,o){var r=t.getSortedVisibleDatasetMetas(),s=a[i];for(let t=0,e=r.length;t<e;++t){const{index:a,data:l}=r[t],{lo:h,hi:c}=function(t,e,i,a){const{controller:n,data:o,_sorted:r}=t,s=n._cachedMeta.iScale;if(s&&e===s.axis&&r&&o.length){const t=s._reversePixels?ie:ee;if(!a)return t(o,e,i);if(n._sharedOptions){const a=o[0],n="function"==typeof a.getRange&&a.getRange(e);if(n){const a=t(o,e,i-n),r=t(o,e,i+n);return{lo:a.lo,hi:r.hi}}}}return{lo:0,hi:o.length-1}}(r[t],i,s,o);for(let t=h;t<=c;++t){const i=l[t];i.skip||n(i,a,t)}}}function we(t,a,e,n){const o=[];return Xt(a,t.chartArea,t._minPadding)&&ye(t,e,a,function(t,e,i){t.inRange(a.x,a.y,n)&&o.push({element:t,datasetIndex:e,index:i})},!0),o}function Me(t,n,e,o,r){const s=function(t){const a=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,e){var i=a?Math.abs(t.x-e.x):0,e=n?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(e,2))}}(e);let l=Number.POSITIVE_INFINITY,h=[];return Xt(n,t.chartArea,t._minPadding)&&ye(t,e,n,function(t,e,i){var a;o&&!t.inRange(n.x,n.y,r)||(a=t.getCenterPoint(r),(a=s(n,a))<l?(h=[{element:t,datasetIndex:e,index:i}],l=a):a===l&&h.push({element:t,datasetIndex:e,index:i}))}),h}function ke(t,e,i,l){const h=_e(e,t),c=[],d=i.axis,u="x"===d?"inXRange":"inYRange";let g=!1;return function(){var i,a,n,o,r,s=t.getSortedVisibleDatasetMetas();for(let t=0,e=s.length;t<e;++t){({index:i,data:a}=s[t]);for(let t=0,e=a.length;t<e;++t)(r=a[t]).skip||(n=r,o=i,r=t,n[u](h[d],l)&&c.push({element:n,datasetIndex:o,index:r}),n.inRange(h.x,h.y,l)&&(g=!0))}}(),i.intersect&&!g?[]:c}var Se={modes:{index(t,e,i,a){const n=_e(e,t),o=i.axis||"x",r=i.intersect?we(t,n,o,a):Me(t,n,o,!1,a),s=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{var e=r[0].index,i=t.data[e];i&&!i.skip&&s.push({element:i,datasetIndex:t.index,index:e})}),s):[]},dataset(t,e,i,a){var n=_e(e,t),e=i.axis||"xy";let o=i.intersect?we(t,n,e,a):Me(t,n,e,!1,a);if(0<o.length){const r=o[0].datasetIndex,i=t.getDatasetMeta(r).data;o=[];for(let t=0;t<i.length;++t)o.push({element:i[t],datasetIndex:r,index:t})}return o},point:(t,e,i,a)=>we(t,_e(e,t),i.axis||"xy",a),nearest:(t,e,i,a)=>Me(t,_e(e,t),i.axis||"xy",i.intersect,a),x:(t,e,i,a)=>(i.axis="x",ke(t,e,i,a)),y:(t,e,i,a)=>(i.axis="y",ke(t,e,i,a))}};const Pe=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),De=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function Ce(t,e){var i=(""+t).match(Pe);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function Oe(e,i){const t={},a=j(i),n=a?Object.keys(i):i,o=j(e)?a?t=>U(e[t],e[i[t]]):t=>e[t]:()=>e;for(const e of n)t[e]=+o(e)||0;return t}function Ae(t){return Oe(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Te(t){return Oe(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Re(t){const e=Ae(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Le(t,e){e=e||ft.font;let i=U((t=t||{}).size,e.size);"string"==typeof i&&(i=parseInt(i,10));let a=U(t.style,e.style);a&&!(""+a).match(De)&&(console.warn('Invalid font style specified: "'+a+'"'),a="");const n={family:U(t.family,e.family),lineHeight:Ce(U(t.lineHeight,e.lineHeight),i),size:i,style:a,weight:U(t.weight,e.weight),string:""};return n.string=Ht(n),n}function Ee(t,e,i,a){let n,o,r,s=!0;for(n=0,o=t.length;n<o;++n)if(r=t[n],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),s=!1),void 0!==i&&N(r)&&(r=r[i%r.length],s=!1),void 0!==r))return a&&!s&&(a.cacheable=!1),r}function Ie(t,e){var{min:i,max:t}=t;return{min:i-Math.abs(q(e,i)),max:t+q(e,t)}}const ze=["left","top","right","bottom"];function Fe(t,e){return t.filter(t=>t.pos===e)}function Ve(t,e){return t.filter(t=>-1===ze.indexOf(t.pos)&&t.box.axis===e)}function Be(t,a){return t.sort((t,e)=>{var i=a?e:t,e=a?t:e;return i.weight===e.weight?i.index-e.index:i.weight-e.weight})}function We(t,e,i,a){return Math.max(t[i],e[i])+Math.max(t[a],e[a])}function He(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ne(t,i){const a=i.maxPadding;return function(t){const e={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{e[t]=Math.max(i[t],a[t])}),e}(t?["left","right"]:["top","bottom"])}function je(t,e,i){const a=[];let n,o,r,s,l,h;for(n=0,o=t.length,l=0;n<o;++n){r=t[n],s=r.box,s.update(r.width||e.w,r.height||e.h,Ne(r.horizontal,e));const{same:o,other:c}=function(t,e,i){const a=i.box,n=t.maxPadding;j(i.pos)||(i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?a.height:a.width,t[i.pos]+=i.size),a.getPadding&&He(n,a.getPadding());var o=Math.max(0,e.outerWidth-We(n,t,"left","right")),r=Math.max(0,e.outerHeight-We(n,t,"top","bottom")),s=o!==t.w,e=r!==t.h;return t.w=o,t.h=r,i.horizontal?{same:s,other:e}:{same:e,other:s}}(e,i,r);l|=o&&a.length,h=h||c,s.fullSize||a.push(r)}return l&&je(a,e,i)||h}function $e(t,e,i){var a=i.padding;let n,o,r,s,l=e.x,h=e.y;for(n=0,o=t.length;n<o;++n)r=t[n],s=r.box,r.horizontal?(s.left=(s.fullSize?a:e).left,s.right=s.fullSize?i.outerWidth-a.right:e.left+e.w,s.top=h,s.bottom=h+s.height,s.width=s.right-s.left,h=s.bottom):(s.left=l,s.right=l+s.width,s.top=(s.fullSize?a:e).top,s.bottom=s.fullSize?i.outerHeight-a.right:e.top+e.h,s.height=s.bottom-s.top,l=s.right);e.x=l,e.y=h}ft.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var Ye={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){e=t.boxes?t.boxes.indexOf(e):-1;-1!==e&&t.boxes.splice(e,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(l,t,e,i){if(l){const n=Re(l.options.layout.padding),o=t-n.width,r=e-n.height,s=function(){const t=function(t){const e=[];let i,a,n;for(i=0,a=(t||[]).length;i<a;++i)n=t[i],e.push({index:i,box:n,pos:n.position,horizontal:n.isHorizontal(),weight:n.weight});return e}(l.boxes),e=Be(t.filter(t=>t.box.fullSize),!0),i=Be(Fe(t,"left"),!0),a=Be(Fe(t,"right")),n=Be(Fe(t,"top"),!0),o=Be(Fe(t,"bottom")),r=Ve(t,"x"),s=Ve(t,"y");return{fullSize:e,leftAndTop:i.concat(n),rightAndBottom:a.concat(s).concat(o).concat(r),chartArea:Fe(t,"chartArea"),vertical:i.concat(a).concat(s),horizontal:n.concat(o).concat(r)}}(),h=s.vertical,c=s.horizontal;G(l.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});var a=h.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,e=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/a,hBoxMaxHeight:r/2}),a=Object.assign({},n);He(a,Re(i));const d=Object.assign({maxPadding:a,w:o,h:r,x:n.left,y:n.top},n);!function(t,e){let i,a,n;for(i=0,a=t.length;i<a;++i)n=t[i],n.horizontal?(n.width=n.box.fullSize&&e.availableWidth,n.height=e.hBoxMaxHeight):(n.width=e.vBoxMaxWidth,n.height=n.box.fullSize&&e.availableHeight)}(h.concat(c),e),je(s.fullSize,d,e),je(h,d,e),je(c,d,e)&&je(h,d,e),function(i){const a=i.maxPadding;function t(t){var e=Math.max(a[t]-i[t],0);return i[t]+=e,e}i.y+=t("top"),i.x+=t("left"),t("right"),t("bottom")}(d),$e(s.leftAndTop,d,e),d.x+=d.w,d.y+=d.h,$e(s.rightAndBottom,d,e),l.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},G(s.chartArea,t=>{const e=t.box;Object.assign(e,l.chartArea),e.update(d.w,d.h)})}}};class Ue{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,a){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,a?Math.floor(e/a):i)}}isAttached(t){return!0}}class Xe extends Ue{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}}const qe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ke=t=>null===t||""===t,Ge=!!be&&{passive:!0};function Ze(t,e,n){const i=t.canvas,o=i&&le(i)||i,a=new MutationObserver(t=>{const a=le(o);t.forEach(e=>{for(let t=0;t<e.addedNodes.length;t++){var i=e.addedNodes[t];i!==o&&i!==a||n(e.target)}})});return a.observe(document,{childList:!0,subtree:!0}),a}function Qe(t,e,i){const a=t.canvas,n=a&&le(a);if(n){const o=new MutationObserver(t=>{t.forEach(e=>{for(let t=0;t<e.removedNodes.length;t++)if(e.removedNodes[t]===a){i();break}})});return o.observe(n,{childList:!0}),o}}const Je=new Map;let ti=0;function ei(){const i=window.devicePixelRatio;i!==ti&&(ti=i,Je.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function ii(t,e,a){const i=t.canvas,n=i&&le(i);if(n){const r=l((t,e)=>{var i=n.clientWidth;a(t,e),i<n.clientWidth&&a()},window),s=new ResizeObserver(t=>{var e=t[0],t=e.contentRect.width,e=e.contentRect.height;0===t&&0===e||r(t,e)});return s.observe(n),o=t,t=r,Je.size||window.addEventListener("resize",ei),Je.set(o,t),s;var o}}function ai(t,e,i){i&&i.disconnect(),"resize"===e&&(t=t,Je.delete(t),Je.size||window.removeEventListener("resize",ei))}function ni(e,t,i){var a=e.canvas,n=l(t=>{null!==e.ctx&&i(function(t,e){var i=qe[t.type]||t.type,{x:a,y:n}=fe(t,e);return{type:i,chart:e,native:t,x:void 0!==a?a:null,y:void 0!==n?n:null}}(t,e))},e,t=>{t=t[0];return[t,t.offsetX,t.offsetY]});return a.addEventListener(t,n,Ge),n}class oi extends Ue{acquireContext(t,e){var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,a=t.getAttribute("height"),n=t.getAttribute("width");if(t.$chartjs={initial:{height:a,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Ke(n)){const e=ve(t,"width");void 0!==e&&(t.width=e)}if(Ke(a))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ve(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const i=t.canvas;if(!i.$chartjs)return!1;const a=i.$chartjs.initial;["height","width"].forEach(t=>{var e=a[t];H(e)?i.removeAttribute(t):i.setAttribute(t,e)});const e=a.style||{};return Object.keys(e).forEach(t=>{i.style[t]=e[t]}),i.width=i.width,delete i.$chartjs,!0}addEventListener(t,e,i){this.removeEventListener(t,e);const a=t.$proxies||(t.$proxies={}),n={attach:Ze,detach:Qe,resize:ii}[e]||ni;a[e]=n(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),a=i[e];a&&(({attach:ai,detach:ai,resize:ai}[e]||function(t,e,i){t.canvas.removeEventListener(e,i,Ge)})(t,e,a),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,a){return me(t,e,i,a)}isAttached(t){t=le(t);return!(!t||!le(t))}}var ri=Object.freeze({__proto__:null,BasePlatform:Ue,BasicPlatform:Xe,DomPlatform:oi});const si=t=>0===t||1===t,li=(t,e,i)=>-Math.pow(2,10*--t)*Math.sin((t-e)*mt/i),hi=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*mt/i)+1,ci={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-(--t*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>--t*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*_t),easeOutSine:t=>Math.sin(t*_t),easeInOutSine:t=>-.5*(Math.cos(pt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>si(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>1<=t?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1- --t*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>si(t)?t:li(t,.075,.3),easeOutElastic:t=>si(t)?t:hi(t,.075,.3),easeInOutElastic(t){return si(t)?t:t<.5?.5*li(2*t,.1125,.45):.5+.5*hi(2*t-1,.1125,.45)},easeInBack(t){return t*t*(2.70158*t-1.70158)},easeOutBack(t){return--t*t*(2.70158*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-ci.easeOutBounce(1-t),easeOutBounce(t){var e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*ci.easeInBounce(2*t):.5*ci.easeOutBounce(2*t-1)+.5},di="transparent",ui={boolean:(t,e,i)=>.5<i?e:t,color(t,e,i){const a=V(t||di),n=a.valid&&V(e||di);return n&&n.valid?n.mix(a,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class gi{constructor(t,e,i,a){var n=e[i];a=Ee([t.to,a,n,t.from]);n=Ee([t.from,n,a]);this._active=!0,this._fn=t.fn||ui[t.type||typeof n],this._easing=ci[t.easing]||ci.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=n,this._to=a,this._promises=void 0}active(){return this._active}update(t,e,i){var a,n,o,r=this;r._active&&(r._notify(!1),a=r._target[r._prop],n=i-r._start,o=r._duration-n,r._start=i,r._duration=Math.floor(Math.max(o,t.duration)),r._total+=n,r._loop=!!t.loop,r._to=Ee([t.to,e,a,t.from]),r._from=Ee([t.from,a,e]))}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){var e=this,i=t-e._start,a=e._duration,n=e._prop,o=e._from,r=e._loop,t=e._to;let s;if(e._active=o!==t&&(r||i<a),!e._active)return e._target[n]=t,void e._notify(!0);i<0?e._target[n]=o:(s=i/a%2,s=r&&1<s?2-s:s,s=e._easing(Math.min(1,Math.max(0,s))),e._target[n]=e._fn(o,t,s))}wait(){const i=this._promises||(this._promises=[]);return new Promise((t,e)=>{i.push({res:t,rej:e})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}ft.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const fi=Object.keys(ft.animation);ft.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),ft.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),ft.describe("animations",{_fallback:"animation"}),ft.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class pi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(a){if(j(a)){const n=this._properties;Object.getOwnPropertyNames(a).forEach(e=>{const t=a[e];if(j(t)){const i={};for(const a of fi)i[a]=t[a];(N(t.properties)&&t.properties||[e]).forEach(t=>{t!==e&&n.has(t)||n.set(t,i)})}})}}_animateOptions(t,e){const i=e.options,a=function(e,i){if(i){let t=e.options;if(t)return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;e.options=i}}(t,i);if(!a)return[];e=this._createAnimations(a,i);return i.$shared&&function(e,t){const i=[],a=Object.keys(t);for(let t=0;t<a.length;t++){const n=e[a[t]];n&&n.active()&&i.push(n.wait())}return Promise.all(i)}(t.options.$animations,i).then(()=>{t.options=i},()=>{}),e}_createAnimations(e,i){const a=this._properties,n=[],o=e.$animations||(e.$animations={}),t=Object.keys(i),r=Date.now();let s;for(s=t.length-1;0<=s;--s){const c=t[s];if("$"!==c.charAt(0))if("options"!==c){var l=i[c];let t=o[c];var h=a.get(c);if(t){if(h&&t.active()){t.update(h,l,r);continue}t.cancel()}h&&h.duration?(o[c]=t=new gi(h,e,c,l),n.push(t)):e[c]=l}else n.push(...this._animateOptions(e,i))}return n}update(t,e){if(0!==this._properties.size){var i=this._createAnimations(t,e);return i.length?(h.add(this._chart,i),!0):void 0}Object.assign(t,e)}}function mi(t,e){var i=t&&t.options||{},a=i.reverse,t=void 0===i.min?e:0,e=void 0===i.max?e:0;return{start:a?e:t,end:a?t:e}}function xi(t,e){const i=[],a=t._getSortedDatasetMetas(e);let n,o;for(n=0,o=a.length;n<o;++n)i.push(a[n].index);return i}function bi(t,e,i,a){var n=t.keys,o="single"===a.mode;let r,s,l,h;if(null!==e){for(r=0,s=n.length;r<s;++r){if((l=+n[r])===i){if(a.all)continue;break}h=t.values[l],$(h)&&(o||0===e||kt(e)===kt(h))&&(e+=h)}return e}}function vi(t,e){t=t&&t.options.stacked;return t||void 0===t&&void 0!==e.stack}function _i(t,e,i){for(const a of e.getMatchingVisibleMetas("bar").reverse()){const e=t[a.index];if(i&&0<e||!i&&e<0)return a.index}return null}function yi(t,e){const{chart:i,_cachedMeta:a}=t,n=i._stacks||(i._stacks={}),{iScale:o,vScale:r,index:s}=a,l=o.axis,h=r.axis,c=(u=o,t=a,`${u.id}.${r.id}.${t.stack||t.type}`),d=e.length;var u;let g;for(let t=0;t<d;++t){const i=e[t],{[l]:a,[h]:o}=i;g=(i._stacks||(i._stacks={}))[h]=function(t,e,i){const a=t[e]||(t[e]={});return a[i]||(a[i]={})}(n,c,a),g[s]=o,g._top=_i(g,r,!0),g._bottom=_i(g,r,!1)}}function wi(t,e){const i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function Mi(t,e){for(const i of e=e||t._parsed){const e=i._stacks;if(!e||void 0===e[t.vScale.id]||void 0===e[t.vScale.id][t.index])return;delete e[t.vScale.id][t.index]}}const ki=t=>"reset"===t||"none"===t,Si=(t,e)=>e?t:Object.assign({},t);class Pi{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.$context=void 0,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=vi(t.vScale,t),this.addElements()}updateIndex(t){this.index=t}linkScales(){const t=this,e=t.chart,i=t._cachedMeta,a=t.getDataset(),n=(t,e,i,a)=>"x"===t?e:"r"===t?a:i,o=i.xAxisID=U(a.xAxisID,wi(e,"x")),r=i.yAxisID=U(a.yAxisID,wi(e,"y")),s=i.rAxisID=U(a.rAxisID,wi(e,"r")),l=i.indexAxis,h=i.iAxisID=n(l,o,r,s),c=i.vAxisID=n(l,r,o,s);i.xScale=t.getScaleForId(o),i.yScale=t.getScaleForId(r),i.rScale=t.getScaleForId(s),i.iScale=t.getScaleForId(h),i.vScale=t.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){var e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){var t=this._cachedMeta;this._data&&re(this._data,this),t._stacked&&Mi(t)}_dataCheck(){const t=this,e=t.getDataset(),i=e.data||(e.data=[]);j(i)?t._data=function(t){const e=Object.keys(t),i=new Array(e.length);let a,n,o;for(a=0,n=e.length;a<n;++a)o=e[a],i[a]={x:o,y:t[o]};return i}(i):t._data!==i&&(t._data&&(re(t._data,t),Mi(t._cachedMeta)),i&&Object.isExtensible(i)&&oe(i,t),t._data=i)}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this,i=e._cachedMeta,a=e.getDataset();let n=!1;e._dataCheck(),i._stacked=vi(i.vScale,i),i.stack!==a.stack&&(n=!0,Mi(i),i.stack=a.stack),e._resyncElements(t),n&&yi(e,i._parsed)}configure(){const t=this,e=t.chart.config,i=e.datasetScopeKeys(t._type),a=e.getOptionScopes(t.getDataset(),i,!0);t.options=e.createResolver(a,t.getContext()),t._parsing=t.options.parsing}parse(t,e){const i=this,{_cachedMeta:a,_data:n}=i,{iScale:o,_stacked:r}=a,s=o.axis;let l,h,c,d=0===t&&e===n.length||a._sorted,u=0<t&&a._parsed[t-1];if(!1===i._parsing)a._parsed=n,a._sorted=!0,c=n;else{c=N(n[t])?i.parseArrayData(a,n,t,e):j(n[t])?i.parseObjectData(a,n,t,e):i.parsePrimitiveData(a,n,t,e);const o=()=>null===h[s]||u&&h[s]<u[s];for(l=0;l<e;++l)a._parsed[l+t]=h=c[l],d&&(o()&&(d=!1),u=h);a._sorted=d}r&&yi(i,c)}parsePrimitiveData(t,e,i,a){const{iScale:n,vScale:o}=t,r=n.axis,s=o.axis,l=n.getLabels(),h=n===o,c=new Array(a);let d,u,g;for(d=0,u=a;d<u;++d)g=d+i,c[d]={[r]:h||n.parse(l[g],g),[s]:o.parse(e[g],g)};return c}parseArrayData(t,e,i,a){const{xScale:n,yScale:o}=t,r=new Array(a);let s,l,h,c;for(s=0,l=a;s<l;++s)c=e[h=s+i],r[s]={x:n.parse(c[0],h),y:o.parse(c[1],h)};return r}parseObjectData(t,e,i,a){const{xScale:n,yScale:o}=t,{xAxisKey:r="x",yAxisKey:s="y"}=this._parsing,l=new Array(a);let h,c,d,u;for(h=0,c=a;h<c;++h)u=e[d=h+i],l[h]={x:n.parse(ot(u,r),d),y:o.parse(ot(u,s),d)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){var a=this.chart,n=this._cachedMeta,o=e[t.axis];return bi({keys:xi(a,!0),values:e._stacks[t.axis]},o,n.index,{mode:i})}updateRangeFromParsed(t,e,i,a){var n=i[e.axis];let o=null===n?NaN:n;e=a&&i._stacks[e.axis];a&&e&&(a.values=e,t.min=Math.min(t.min,o),t.max=Math.max(t.max,o),o=bi(a,n,this._cachedMeta.index,{all:!0})),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this,a=i._cachedMeta,n=a._parsed,o=a._sorted&&t===a.iScale,r=n.length,s=i._getOtherScale(t),l=e&&a._stacked&&{keys:xi(i.chart,!0),values:null},h={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=function(){var{min:t,max:e,minDefined:i,maxDefined:a}=s.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:a?e:Number.POSITIVE_INFINITY}}();let u,g,f,p;function m(){return f=n[u],g=f[t.axis],p=f[s.axis],!$(g)||c>p||d<p}for(u=0;u<r&&(m()||(i.updateRangeFromParsed(h,t,f,l),!o));++u);if(o)for(u=r-1;0<=u;--u)if(!m()){i.updateRangeFromParsed(h,t,f,l);break}return h}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let a,n,o;for(a=0,n=e.length;a<n;++a)o=e[a][t.axis],$(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,a=e.vScale,n=this.getParsed(t);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:a?""+a.getLabelForValue(n[a.axis]):""}}_update(t){const e=this,i=e._cachedMeta;e.configure(),e._cachedDataOpts={},e.update(t||"default"),i._clip=function(t){let e,i,a,n;return j(t)?(e=t.top,i=t.right,a=t.bottom,n=t.left):e=i=a=n=t,{top:e,right:i,bottom:a,left:n}}(U(e.options.clip,function(t,e,i){if(!1===i)return!1;t=mi(t,i),i=mi(e,i);return{top:i.end,right:t.end,bottom:i.start,left:t.start}}(i.xScale,i.yScale,e.getMaxOverflow())))}update(t){}draw(){const t=this,e=t._ctx,i=t.chart,a=t._cachedMeta,n=a.data||[],o=i.chartArea,r=[],s=t._drawStart||0,l=t._drawCount||n.length-s;let h;for(a.dataset&&a.dataset.draw(e,o,s,l),h=s;h<s+l;++h){const t=n[h];t.active?r.push(t):t.draw(e,o)}for(h=0;h<r.length;++h)r[h].draw(e,o)}getStyle(t,e){e=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(e):this.resolveDataElementOptions(t||0,e)}getContext(t,e,i){var a,n,o,r=this,s=r.getDataset();let l;if(0<=t&&t<r._cachedMeta.data.length){const e=r._cachedMeta.data[t];l=e.$context||(e.$context=(a=r.getContext(),n=t,o=e,Object.assign(Object.create(a),{active:!1,dataIndex:n,parsed:void 0,raw:void 0,element:o,index:n,mode:"default",type:"data"}))),l.parsed=r.getParsed(t),l.raw=s.data[t]}else l=r.$context||(r.$context=(t=r.chart.getContext(),r=r.index,Object.assign(Object.create(t),{active:!1,dataset:void 0,datasetIndex:r,index:r,mode:"default",type:"dataset"}))),l.dataset=s;return l.active=!!e,l.mode=i,l}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const a=this,n="active"===e,o=a._cachedDataOpts,r=t+"-"+e,s=o[r],l=a.enableOptionSharing&&st(i);if(s)return Si(s,l);const h=a.chart.config,c=h.datasetElementScopeKeys(a._type,t),d=n?[t+"Hover","hover",t,""]:[t,""],u=h.getOptionScopes(a.getDataset(),c),g=Object.keys(ft.elements[t]),f=h.resolveNamedOptions(u,g,()=>a.getContext(i,n),d);return f.$shared&&(f.$shared=l,o[r]=Object.freeze(Si(f,l))),f}_resolveAnimations(t,e,i){const a=this,n=a.chart,o=a._cachedDataOpts,r="animation-"+e,s=o[r];if(s)return s;let l;if(!1!==n.options.animation){const n=a.chart.config,o=n.datasetAnimationScopeKeys(a._type,e),r=n.getOptionScopes(a.getDataset(),o);l=n.createResolver(r,a.getContext(t,i,e))}e=new pi(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(e)),e}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ki(t)||this.chart._animationsDisabled}updateElement(t,e,i,a){ki(a)?Object.assign(t,i):this._resolveAnimations(e,a).update(t,i)}updateSharedOptions(t,e,i){t&&!ki(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,a){t.active=a;var n=this.getStyle(e,a);this._resolveAnimations(e,i,a).update(t,{options:!a&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){var e=this,i=e._cachedMeta.data.length,a=e._data.length;i<a?e._insertElements(i,a-i,t):a<i&&e._removeElements(a,i-a);i=Math.min(a,i);i&&e.parse(0,i)}_insertElements(t,e,i=!0){const a=this,n=a._cachedMeta,o=n.data,r=t+e;let s;var l=t=>{for(t.length+=e,s=t.length-1;s>=r;s--)t[s]=t[s-e]};for(l(o),s=t;s<r;++s)o[s]=new a.dataElementType;a._parsing&&l(n._parsed),a.parse(t,e),i&&a.updateElements(o,t,e,"reset")}updateElements(t,e,i,a){}_removeElements(t,e){const i=this._cachedMeta;var a;this._parsing&&(a=i._parsed.splice(t,e),i._stacked&&Mi(i,a)),i.data.splice(t,e)}_onDataPush(){var t=arguments.length;this._insertElements(this.getDataset().data.length-t,t)}_onDataPop(){this._removeElements(this._cachedMeta.data.length-1,1)}_onDataShift(){this._removeElements(0,1)}_onDataSplice(t,e){this._removeElements(t,e),this._insertElements(t,arguments.length-2)}_onDataUnshift(){this._insertElements(0,arguments.length)}}Pi.defaults={},Pi.prototype.datasetElementType=null,Pi.prototype.dataElementType=null;class Di{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){var{x:e,y:t}=this.getProps(["x","y"],t);return{x:e,y:t}}hasValue(){return Dt(this.x)&&Dt(this.y)}getProps(t,e){const i=this,a=this.$animations;if(!e||!a)return i;const n={};return t.forEach(t=>{n[t]=a[t]&&a[t].active()?a[t]._to:i[t]}),n}}Di.defaults={},Di.defaultRoutes=void 0;const Ci=new Map;function Oi(t,e,n){return function(t,e){e=n||{};var i=t+JSON.stringify(e);let a=Ci.get(i);return a||(a=new Intl.NumberFormat(t,e),Ci.set(i,a)),a}(e).format(t)}const Ai={values:t=>N(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";var a=this.chart.options.locale;let n,o=t;if(1<i.length){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||1e15<e)&&(n="scientific"),o=function(t){let e=3<i.length?i[2].value-i[1].value:i[1].value-i[0].value;return 1<Math.abs(e)&&t!==Math.floor(t)&&(e=t-Math.floor(t)),e}(t)}var r=Mt(Math.abs(o)),r=Math.max(Math.min(-1*Math.floor(r),20),0),r={notation:n,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(r,this.options.ticks.format),Oi(t,a,r)},logarithmic(t,e,i){if(0===t)return"0";var a=t/Math.pow(10,Math.floor(Mt(t)));return 1==a||2==a||5==a?Ai.numeric.call(this,t,e,i):""}};var Ti={formatters:Ai};function Ri(t,i){const e=t.options.ticks,a=e.maxTicksLimit||(c=(h=t).options.offset,t=h._tickSize(),c=h._length/t+(c?0:1),t=h._maxLength/t,Math.floor(Math.min(c,t))),n=e.major.enabled?function(t){const e=[];let i,a;for(i=0,a=t.length;i<a;i++)t[i].major&&e.push(i);return e}(i):[],o=n.length,r=n[0],s=n[o-1],l=[];var h,c;if(o>a)return function(t,e,i,a){let n,o=0,r=i[0];for(a=Math.ceil(a),n=0;n<t.length;n++)n===r&&(e.push(t[n]),o++,r=i[o*a])}(i,l,n,o/a),l;var d=function(t,i,e){var t=function(t){var e=t.length;let i,a;if(e<2)return!1;for(a=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==a)return!1;return a}(t),a=i.length/e;if(!t)return Math.max(a,1);var n=Pt(t);for(let t=0,e=n.length-1;t<e;t++){const i=n[t];if(i>a)return i}return Math.max(a,1)}(n,i,a);if(0<o){let t,e;const a=1<o?Math.round((s-r)/(o-1)):null;for(Li(i,l,d,H(a)?0:r-a,r),t=0,e=o-1;t<e;t++)Li(i,l,d,n[t],n[t+1]);return Li(i,l,d,s,H(a)?i.length:s+a),l}return Li(i,l,d),l}function Li(t,e,i,a,n){var o=U(a,0),r=Math.min(U(n,t.length),t.length);let s,l,h,c=0;for(i=Math.ceil(i),n&&(i=(s=n-a)/Math.floor(s/i)),h=o;h<0;)c++,h=Math.round(o+c*i);for(l=Math.max(o,0);l<r;l++)l===h&&(e.push(t[l]),c++,h=Math.round(o+c*i))}ft.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Ti.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),ft.route("scale.ticks","color","","color"),ft.route("scale.grid","color","","borderColor"),ft.route("scale.grid","borderColor","","borderColor"),ft.route("scale.title","color","","color"),ft.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),ft.describe("scales",{_fallback:"scale"});const Ei=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Ii(t,e){const i=[],a=t.length/e,n=t.length;let o=0;for(;o<n;o+=a)i.push(t[Math.floor(o)]);return i}function zi(t){return t.drawTicks?t.tickLength:0}function Fi(t,e){if(!t.display)return 0;var i=Le(t.font,e),e=Re(t.padding);return(N(t.text)?t.text.length:1)*i.lineHeight+e.height}class Vi extends Di{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){var e=this;e.options=t.setContext(e.getContext()),e.axis=t.axis,e._userMin=e.parse(t.min),e._userMax=e.parse(t.max),e._suggestedMin=e.parse(t.suggestedMin),e._suggestedMax=e.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){var{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:a}=this,t=Y(t,Number.POSITIVE_INFINITY),e=Y(e,Number.NEGATIVE_INFINITY),i=Y(i,Number.POSITIVE_INFINITY),a=Y(a,Number.NEGATIVE_INFINITY);return{min:Y(t,i),max:Y(e,a),minDefined:$(t),maxDefined:$(e)}}getMinMax(i){let a,{min:n,max:o,minDefined:r,maxDefined:s}=this.getUserBounds();if(r&&s)return{min:n,max:o};const l=this.getMatchingVisibleMetas();for(let t=0,e=l.length;t<e;++t)a=l[t].controller.getMinMax(this,i),r||(n=Math.min(n,a.min)),s||(o=Math.max(o,a.max));return{min:Y(n,Y(o,n)),max:Y(o,Y(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){K(this.options.beforeUpdate,[this])}update(t,e,i){var a=this,n=a.options.ticks,o=n.sampleSize;a.beforeUpdate(),a.maxWidth=t,a.maxHeight=e,a._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),a.ticks=null,a._labelSizes=null,a._gridLineItems=null,a._labelItems=null,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a._maxLength=a.isHorizontal()?a.width+i.left+i.right:a.height+i.top+i.bottom,a._dataLimitsCached||(a.beforeDataLimits(),a.determineDataLimits(),a.afterDataLimits(),a._range=Ie(a,a.options.grace),a._dataLimitsCached=!0),a.beforeBuildTicks(),a.ticks=a.buildTicks()||[],a.afterBuildTicks();i=o<a.ticks.length;a._convertTicksToLabels(i?Ii(a.ticks,o):a.ticks),a.configure(),a.beforeCalculateLabelRotation(),a.calculateLabelRotation(),a.afterCalculateLabelRotation(),n.display&&(n.autoSkip||"auto"===n.source)&&(a.ticks=Ri(a,a.ticks),a._labelSizes=null),i&&a._convertTicksToLabels(a.ticks),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate()}configure(){var t=this;let e,i,a=t.options.reverse;t.isHorizontal()?(e=t.left,i=t.right):(e=t.top,i=t.bottom,a=!a),t._startPixel=e,t._endPixel=i,t._reversePixels=a,t._length=i-e,t._alignToPixels=t.options.alignToPixels}afterUpdate(){K(this.options.afterUpdate,[this])}beforeSetDimensions(){K(this.options.beforeSetDimensions,[this])}setDimensions(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0}afterSetDimensions(){K(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),K(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){K(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){var e=this.options.ticks;let i,a,n;for(i=0,a=t.length;i<a;i++)n=t[i],n.label=K(e.callback,[n.value,i,t],this);for(i=0;i<a;i++)H(t[i].label)&&(t.splice(i,1),a--,i--)}afterTickToLabelConversion(){K(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){K(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){var t,e,i,a,n=this,o=n.options,r=o.ticks,s=n.ticks.length,l=r.minRotation||0,h=r.maxRotation;let c,d,u,g=l;!n._isVisible()||!r.display||h<=l||s<=1||!n.isHorizontal()?n.labelRotation=l:(e=(t=n._getLabelSizes()).widest.width,i=t.highest.height,a=Bt(n.chart.width-e,0,n.maxWidth),(o.offset?n.maxWidth/s:a/(s-1))<e+6&&(c=a/(s-(o.offset?.5:1)),d=n.maxHeight-zi(o.grid)-r.padding-Fi(o.title,n.chart.options.font),u=Math.sqrt(e*e+i*i),g=Rt(Math.min(Math.asin(Math.min((t.highest.height+6)/c,1)),Math.asin(Math.min(d/u,1))-Math.asin(i/u))),g=Math.max(l,Math.min(h,g))),n.labelRotation=g)}afterCalculateLabelRotation(){K(this.options.afterCalculateLabelRotation,[this])}beforeFit(){K(this.options.beforeFit,[this])}fit(){const t=this,e={width:0,height:0},{chart:i,options:{ticks:a,title:n,grid:o}}=t,r=t._isVisible(),s=t.isHorizontal();if(r){const r=Fi(n,i.options.font);if(s?(e.width=t.maxWidth,e.height=zi(o)+r):(e.height=t.maxHeight,e.width=zi(o)+r),a.display&&t.ticks.length){const{first:i,last:n,widest:o,highest:r}=t._getLabelSizes(),l=2*a.padding,h=Tt(t.labelRotation),c=Math.cos(h),d=Math.sin(h);if(s){const i=a.mirror?0:d*o.width+c*r.height;e.height=Math.min(t.maxHeight,e.height+i+l)}else{const i=a.mirror?0:c*o.width+d*r.height;e.width=Math.min(t.maxWidth,e.width+i+l)}t._calculatePadding(i,n,d,c)}}t._handleMargins(),s?(t.width=t._length=i.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t._margins.top-t._margins.bottom)}_calculatePadding(i,a,n,o){const r=this,{ticks:{align:s,padding:l},position:h}=r.options,c=0!==r.labelRotation,d="top"!==h&&"x"===r.axis;if(r.isHorizontal()){const h=r.getPixelForTick(0)-r.left,u=r.right-r.getPixelForTick(r.ticks.length-1);let t=0,e=0;c?e=d?(t=o*i.width,n*a.height):(t=n*i.height,o*a.width):"start"===s?e=a.width:"end"===s?t=i.width:(t=i.width/2,e=a.width/2),r.paddingLeft=Math.max((t-h+l)*r.width/(r.width-h),0),r.paddingRight=Math.max((e-u+l)*r.width/(r.width-u),0)}else{let t=a.height/2,e=i.height/2;"start"===s?(t=0,e=i.height):"end"===s&&(t=a.height,e=0),r.paddingTop=t+l,r.paddingBottom=e+l}}_handleMargins(){var t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))}afterFit(){K(this.options.afterFit,[this])}isHorizontal(){var{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t),this.afterTickToLabelConversion()}_getLabelSizes(){var e=this;let i=e._labelSizes;if(!i){var a=e.options.ticks.sampleSize;let t=e.ticks;a<t.length&&(t=Ii(t,a)),e._labelSizes=i=e._computeLabelSizes(t,t.length)}return i}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:a}=this,n=[],o=[];let r,s,l,h,c,d,u,g,f,p,m,x=0,b=0;for(r=0;r<e;++r){if(h=t[r].label,c=this._resolveTickFontOptions(r),i.font=d=c.string,u=a[d]=a[d]||{data:{},gc:[]},g=c.lineHeight,f=p=0,H(h)||N(h)){if(N(h))for(s=0,l=h.length;s<l;++s)H(m=h[s])||N(m)||(f=Nt(i,u.data,u.gc,f,m),p+=g)}else f=Nt(i,u.data,u.gc,f,h),p=g;n.push(f),o.push(p),x=Math.max(f,x),b=Math.max(p,b)}var v;w=a,v=e,G(w,t=>{const e=t.gc,i=e.length/2;let a;if(v<i){for(a=0;a<i;++a)delete t.data[e[a]];e.splice(0,i)}});var _=n.indexOf(x),y=o.indexOf(b),w=t=>({width:n[t]||0,height:o[t]||0});return{first:w(0),last:w(e-1),widest:w(_),highest:w(y),widths:n,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){var e=this;e._reversePixels&&(t=1-t);t=e._startPixel+t*e._length;return Wt(e._alignToPixels?$t(e.chart,t,0):t)}getDecimalForPixel(t){t=(t-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){var{min:t,max:e}=this;return t<0&&e<0?e:0<t&&0<e?t:0}getContext(t){var e,i,a=this,n=a.ticks||[];if(0<=t&&t<n.length){const i=n[t];return i.$context||(i.$context=(e=a.getContext(),n=t,t=i,Object.assign(Object.create(e),{tick:t,index:n,type:"tick"})))}return a.$context||(a.$context=(i=a.chart.getContext(),a=a,Object.assign(Object.create(i),{scale:a,type:"scale"})))}_tickSize(){var t=this.options.ticks,e=Tt(this.labelRotation),i=Math.abs(Math.cos(e)),a=Math.abs(Math.sin(e)),n=this._getLabelSizes(),e=t.autoSkipPadding||0,t=n?n.widest.width+e:0,e=n?n.highest.height+e:0;return this.isHorizontal()?t*a<e*i?t/i:e/a:e*a<t*i?e/i:t/a}_isVisible(){var t=this.options.display;return"auto"!==t?!!t:0<this.getMatchingVisibleMetas().length}_computeGridLineItems(t){const e=this,i=e.axis,a=e.chart,n=e.options,{grid:o,position:r}=n,s=o.offset,l=e.isHorizontal(),h=e.ticks.length+(s?1:0),c=zi(o),d=[],u=o.setContext(e.getContext()),g=u.drawBorder?u.borderWidth:0,f=g/2,p=function(t){return $t(a,t,g)};let m,x,b,v,_,y,w,M,k,S,P,D;if("top"===r)m=p(e.bottom),y=e.bottom-c,M=m-f,S=p(t.top)+f,D=t.bottom;else if("bottom"===r)m=p(e.top),S=t.top,D=p(t.bottom)-f,y=m+f,M=e.top+c;else if("left"===r)m=p(e.right),_=e.right-c,w=m-f,k=p(t.left)+f,P=t.right;else if("right"===r)m=p(e.left),k=t.left,P=p(t.right)-f,_=m+f,w=e.left+c;else if("x"===i){if("center"===r)m=p((t.top+t.bottom)/2+.5);else if(j(r)){const t=Object.keys(r)[0],i=r[t];m=p(e.chart.scales[t].getPixelForValue(i))}S=t.top,D=t.bottom,y=m+f,M=y+c}else if("y"===i){if("center"===r)m=p((t.left+t.right)/2);else if(j(r)){const t=Object.keys(r)[0],i=r[t];m=p(e.chart.scales[t].getPixelForValue(i))}_=m-f,w=_-c,k=t.left,P=t.right}for(x=0;x<h;++x){const t=o.setContext(e.getContext(x)),i=t.lineWidth,n=t.color,r=o.borderDash||[],h=t.borderDashOffset,c=t.tickWidth,u=t.tickColor,g=t.tickBorderDash||[],f=t.tickBorderDashOffset;void 0!==(b=function(t,e,i){var a=t.ticks.length,n=Math.min(e,a-1),o=t._startPixel,r=t._endPixel;let s,l=t.getPixelForTick(n);if(!(i&&(s=1===a?Math.max(l-o,r-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(n-1))/2,l+=n<e?s:-s,l<o-1e-6||l>r+1e-6)))return l}(e,x,s))&&(v=$t(a,b,i),l?_=w=k=P=v:y=M=S=D=v,d.push({tx1:_,ty1:y,tx2:w,ty2:M,x1:k,y1:S,x2:P,y2:D,width:i,color:n,borderDash:r,borderDashOffset:h,tickWidth:c,tickColor:u,tickBorderDash:g,tickBorderDashOffset:f}))}return e._ticksLength=h,e._borderValue=m,d}_computeLabelItems(a){const n=this,o=n.axis,r=n.options,{position:t,ticks:e}=r,s=n.isHorizontal(),l=n.ticks,{align:h,crossAlign:c,padding:d,mirror:u}=e,i=zi(r.grid),g=i+d,f=u?-d:g,p=-Tt(n.labelRotation),m=[];let x,b,v,_,y,w,M,k,S,P,D,C="middle";if("top"===t)y=n.bottom-f,w=n._getXAxisLabelAlignment();else if("bottom"===t)y=n.top+f,w=n._getXAxisLabelAlignment();else if("left"===t){const a=n._getYAxisLabelAlignment(i);w=a.textAlign,_=a.x}else if("right"===t){const a=n._getYAxisLabelAlignment(i);w=a.textAlign,_=a.x}else if("x"===o){if("center"===t)y=(a.top+a.bottom)/2+g;else if(j(t)){const a=Object.keys(t)[0],o=t[a];y=n.chart.scales[a].getPixelForValue(o)+g}w=n._getXAxisLabelAlignment()}else if("y"===o){if("center"===t)_=(a.left+a.right)/2-g;else if(j(t)){const a=Object.keys(t)[0],o=t[a];_=n.chart.scales[a].getPixelForValue(o)}w=n._getYAxisLabelAlignment(i).textAlign}"y"===o&&("start"===h?C="top":"end"===h&&(C="bottom"));var O=n._getLabelSizes();for(x=0,b=l.length;x<b;++x){v=l[x].label;const a=e.setContext(n.getContext(x));M=n.getPixelForTick(x)+e.labelOffset,S=(k=n._resolveTickFontOptions(x)).lineHeight;const o=(P=N(v)?v.length:1)/2,r=a.color,h=a.textStrokeColor,d=a.textStrokeWidth;let i;if(s?(_=M,D="top"===t?"near"===c||0!=p?-P*S+S/2:"center"===c?-O.highest.height/2-o*S+S:-O.highest.height+S/2:"near"===c||0!=p?S/2:"center"===c?O.highest.height/2-o*S:O.highest.height-P*S,u&&(D*=-1)):(y=M,D=(1-P)*S/2),a.showLabelBackdrop){const n=Re(a.backdropPadding),o=O.heights[x],r=O.widths[x];let t=y+D-n.top,e=_-n.left;switch(C){case"middle":t-=o/2;break;case"bottom":t-=o}switch(w){case"center":e-=r/2;break;case"right":e-=r}i={left:e,top:t,width:r+n.width,height:o+n.height,color:a.backdropColor}}m.push({rotation:p,label:v,font:k,color:r,strokeColor:h,strokeWidth:d,textOffset:D,textAlign:w,textBaseline:C,translation:[_,y],backdrop:i})}return m}_getXAxisLabelAlignment(){var{position:t,ticks:e}=this.options;if(-Tt(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align&&(i="right"),i}_getYAxisLabelAlignment(t){var e=this,{position:i,ticks:{crossAlign:a,mirror:n,padding:o}}=e.options,r=t+o,t=e._getLabelSizes().widest.width;let s,l;return"left"===i?n?(s="left",l=e.right+o):(l=e.right-r,"near"===a?s="right":"center"===a?(s="center",l-=t/2):(s="left",l=e.left)):"right"===i?n?(s="right",l=e.left+o):(l=e.left+r,"near"===a?s="left":"center"===a?(s="center",l+=t/2):(s="right",l=e.right)):s="right",{textAlign:s,x:l}}_computeLabelArea(){var t=this;if(!t.options.ticks.mirror){var e=t.chart,i=t.options.position;return"left"===i||"right"===i?{top:0,left:t.left,bottom:e.height,right:t.right}:"top"===i||"bottom"===i?{top:t.top,left:0,bottom:t.bottom,right:e.width}:void 0}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:a,width:n,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,a,n,o),t.restore())}getLineWidthForValue(e){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;var i=this.ticks.findIndex(t=>t.value===e);return 0<=i?t.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this,i=e.options.grid,a=e.ctx,n=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));let o,r;var s=(t,e,i)=>{i.width&&i.color&&(a.save(),a.lineWidth=i.width,a.strokeStyle=i.color,a.setLineDash(i.borderDash||[]),a.lineDashOffset=i.borderDashOffset,a.beginPath(),a.moveTo(t.x,t.y),a.lineTo(e.x,e.y),a.stroke(),a.restore())};if(i.display)for(o=0,r=n.length;o<r;++o){const t=n[o];i.drawOnChartArea&&s({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),i.drawTicks&&s({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const n=this,{chart:o,ctx:r,options:{grid:s}}=n,l=s.setContext(n.getContext()),h=s.drawBorder?l.borderWidth:0;if(h){var c=s.setContext(n.getContext(0)).lineWidth,d=n._borderValue;let t,e,i,a;n.isHorizontal()?(t=$t(o,n.left,h)-h/2,e=$t(o,n.right,c)+c/2,i=a=d):(i=$t(o,n.top,h)-h/2,a=$t(o,n.bottom,c)+c/2,t=e=d),r.save(),r.lineWidth=l.borderWidth,r.strokeStyle=l.borderColor,r.beginPath(),r.moveTo(t,i),r.lineTo(e,a),r.stroke(),r.restore()}}drawLabels(i){const a=this;if(a.options.ticks.display){const o=a.ctx,r=a._computeLabelArea();r&&qt(o,r);var n=a._labelItems||(a._labelItems=a._computeLabelItems(i));let t,e;for(t=0,e=n.length;t<e;++t){const i=n[t],a=i.font,r=i.label;i.backdrop&&(o.fillStyle=i.backdrop.color,o.fillRect(i.backdrop.left,i.backdrop.top,i.backdrop.width,i.backdrop.height)),Qt(o,r,0,i.textOffset,a,i)}r&&Kt(o)}}drawTitle(){var{ctx:e,options:{position:i,title:a,reverse:n}}=this;if(a.display){var o=Le(a.font),r=Re(a.padding),s=a.align;let t=o.lineHeight/2;"bottom"===i?(t+=r.bottom,N(a.text)&&(t+=o.lineHeight*(a.text.length-1))):t+=r.top;var{titleX:l,titleY:h,maxWidth:c,rotation:r}=function(t,e,i,a){var{top:n,left:o,bottom:r,right:s}=t;let l,h,c,d=0;return t.isHorizontal()?(h=T(a,o,s),c=Ei(t,i,e),l=s-o):(h=Ei(t,i,e),c=T(a,r,n),d="left"===i?-_t:_t),{titleX:h,titleY:c,maxWidth:l,rotation:d}}(this,t,i,s);Qt(e,a.text,0,0,o,{color:a.color,maxWidth:c,rotation:r,textAlign:function(t,e,i){let a=f(t);return(i&&"right"!==e||!i&&"right"===e)&&(a="left"===(e=a)?"right":"right"===e?"left":e),a}(s,i,n),textBaseline:"middle",translation:[l,h]})}}draw(t){var e=this;e._isVisible()&&(e.drawBackground(),e.drawGrid(t),e.drawBorder(),e.drawTitle(),e.drawLabels(t))}_layers(){const e=this,t=e.options,i=t.ticks&&t.ticks.z||0,a=t.grid&&t.grid.z||0;return e._isVisible()&&e.draw===Vi.prototype.draw?[{z:a,draw(t){e.drawBackground(),e.drawGrid(t),e.drawTitle()}},{z:a+1,draw(){e.drawBorder()}},{z:i,draw(t){e.drawLabels(t)}}]:[{z:i,draw(t){e.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",a=[];let n,o;for(n=0,o=e.length;n<o;++n){const o=e[n];o[i]!==this.id||t&&o.type!==t||a.push(o)}return a}_resolveTickFontOptions(t){return Le(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){var t=this._resolveTickFontOptions(0).lineHeight;return this.isHorizontal()?this.width/t/.7:this.height/t}}function Bi(i,o=[""],e=i,a,n=()=>i[0]){st(a)||(a=Ki("_fallback",i));var t={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:e,_fallback:a,_getTarget:n,override:t=>Bi([t,...i],o,e,a)};return new Proxy(t,{deleteProperty:(t,e)=>(delete t[e],delete t._keys,delete i[0][e],!0),get:(t,e)=>$i(t,e,()=>function(t,e,i){var a;for(const n of o)if(a=Ki(Ni(n,t),e),st(a))return ji(t,a)?Xi(e,i,t,a):a}(e,i,t)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(i[0]),has:(t,e)=>Gi(t).includes(e),ownKeys:t=>Gi(t),set:(t,e,i)=>((t._storage||(t._storage=n()))[e]=i,delete t[e],delete t._keys,!0)})}function Wi(a,e,i,n){var t={_cacheable:!1,_proxy:a,_context:e,_subProxy:i,_stack:new Set,_descriptors:Hi(a,n),setContext:t=>Wi(a,t,i,n),override:t=>Wi(a.override(t),e,i,n)};return new Proxy(t,{deleteProperty:(t,e)=>(delete t[e],delete a[e],!0),get:(t,e,i)=>$i(t,e,()=>function(s,t,e){const{_proxy:i,_context:a,_subProxy:n,_descriptors:o}=s;let r=i[t];return lt(r)&&o.isScriptable(t)&&(r=function(t,e,i){const{_proxy:a,_context:n,_subProxy:o,_stack:r}=s;if(r.has(t))throw new Error("Recursion detected: "+[...r].join("->")+"->"+t);return r.add(t),e=e(n,o||i),r.delete(t),e=j(e)?Xi(a._scopes,a,t,e):e}(t,r,e)),N(r)&&r.length&&(r=function(t,e,i,a){const{_proxy:n,_context:o,_subProxy:r,_descriptors:s}=i;if(st(o.index)&&a(t))e=e[o.index%e.length];else if(j(e[0])){const i=e,a=n._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=Xi(a,n,t,l);e.push(Wi(i,o,r&&r[t],s))}}return e}(t,r,s,o.isIndexable)),ji(t,r)&&(r=Wi(r,a,n&&n[t],o)),r}(t,e,i)),getOwnPropertyDescriptor:(t,e)=>t._descriptors.allKeys?Reflect.has(a,e)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(a,e),getPrototypeOf:()=>Reflect.getPrototypeOf(a),has:(t,e)=>Reflect.has(a,e),ownKeys:()=>Reflect.ownKeys(a),set:(t,e,i)=>(a[e]=i,delete t[e],!0)})}function Hi(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:a=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:a,isScriptable:lt(i)?i:()=>i,isIndexable:lt(a)?a:()=>a}}const Ni=(t,e)=>t?t+rt(e):e,ji=(t,e)=>j(e)&&"adapters"!==t;function $i(t,e,i){let a=t[e];return st(a)||(a=i(),st(a)&&(t[e]=a)),a}function Yi(t,e,i){return lt(t)?t(e,i):t}const Ui=(t,e)=>!0===t?e:"string"==typeof t?ot(e,t):void 0;function Xi(t,e,i,a){const n=e._rootScopes,o=Yi(e._fallback,i,a),r=[...t,...n],s=new Set;s.add(a);a=qi(s,r,i,o||i);return null!==a&&(!st(o)||o===i||null!==(a=qi(s,r,o,a)))&&Bi([...s],[""],n,o,()=>{const t=e._getTarget();return i in t||(t[i]={}),t[i]})}function qi(t,e,i,a){for(;i;)i=function(t,e,i,a){for(const o of e){const e=Ui(i,o);if(e){t.add(e);var n=Yi(e._fallback,i,e);if(st(n)&&n!==i&&n!==a)return n}else if(!1===e&&st(a)&&i!==a)return null}return!1}(t,e,i,a);return i}function Ki(t,e){for(const i of e)if(i){const e=i[t];if(st(e))return e}}function Gi(t){let e=t._keys;return e=e||(t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return[...e]}(t._scopes)),e}const Zi=Number.EPSILON||1e-14,Qi=(t,e)=>e<t.length&&!t[e].skip&&t[e];function Ji(t,e,i,a){var n=t.skip?e:t,o=e,t=i.skip?e:i,e=It(o,n),i=It(t,o);let r=e/(e+i),s=i/(e+i);r=isNaN(r)?0:r,s=isNaN(s)?0:s;i=a*r,a*=s;return{previous:{x:o.x-i*(t.x-n.x),y:o.y-i*(t.y-n.y)},next:{x:o.x+a*(t.x-n.x),y:o.y+a*(t.y-n.y)}}}function ta(t){const e=t.length,i=Array(e).fill(0),a=Array(e);let n,o,r,s=Qi(t,0);for(n=0;n<e;++n)if(o=r,r=s,s=Qi(t,n+1),r){if(s){const t=s.x-r.x;i[n]=0!=t?(s.y-r.y)/t:0}a[n]=o?s?kt(i[n-1])!==kt(i[n])?0:(i[n-1]+i[n])/2:i[n-1]:i[n]}!function(e,i,a){var n=e.length;let o,r,s,l,h,c=Qi(e,0);for(let t=0;t<n-1;++t)h=c,c=Qi(e,t+1),h&&c&&(Ct(i[t],0,Zi)?a[t]=a[t+1]=0:(o=a[t]/i[t],r=a[t+1]/i[t],(l=Math.pow(o,2)+Math.pow(r,2))<=9||(s=3/Math.sqrt(l),a[t]=o*s*i[t],a[t+1]=r*s*i[t])))}(t,i,a),function(e,i){const a=e.length;let n,o,r,s=Qi(e,0);for(let t=0;t<a;++t)if(o=r,r=s,s=Qi(e,t+1),r){const{x:a,y:l}=r;o&&(n=(a-o.x)/3,r.cp1x=a-n,r.cp1y=l-n*i[t]),s&&(n=(s.x-a)/3,r.cp2x=a+n,r.cp2y=l+n*i[t])}}(t,a)}function ea(t,e,i){return Math.max(Math.min(t,i),e)}function ia(e,i,t,a){let n,o,r,s;if(i.spanGaps&&(e=e.filter(t=>!t.skip)),"monotone"===i.cubicInterpolationMode)ta(e);else{let t=a?e[e.length-1]:e[0];for(n=0,o=e.length;n<o;++n)r=e[n],s=Ji(t,r,e[Math.min(n+1,o-(a?0:1))%o],i.tension),r.cp1x=s.previous.x,r.cp1y=s.previous.y,r.cp2x=s.next.x,r.cp2y=s.next.y,t=r}i.capBezierPoints&&function(t,e){let i,a,n,o,r,s=Xt(t[0],e);for(i=0,a=t.length;i<a;++i)r=o,o=s,s=i<a-1&&Xt(t[i+1],e),o&&(n=t[i],r&&(n.cp1x=ea(n.cp1x,e.left,e.right),n.cp1y=ea(n.cp1y,e.top,e.bottom)),s&&(n.cp2x=ea(n.cp2x,e.left,e.right),n.cp2y=ea(n.cp2y,e.top,e.bottom)))}(e,t)}function aa(t,e,i,a){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function na(t,e,i,a){return{x:t.x+i*(e.x-t.x),y:("middle"===a?i<.5?t:e:"after"===a?i<1?t:e:0<i?e:t).y}}function oa(t,e,i,a){var n={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},t=aa(t,n,i),n=aa(n,o,i),e=aa(o,e,i),t=aa(t,n,i),e=aa(n,e,i);return aa(t,e,i)}function ra(t,e,i){return t?(a=e,n=i,{x:t=>a+a+n-t,setWidth(t){n=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t};var a,n}function sa(t,e){let i,a;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,a=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=a)}function la(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function ha(t){return"angle"===t?{between:Vt,compare:zt,normalize:Ft}:{between:(t,e,i)=>t>=Math.min(e,i)&&t<=Math.max(i,e),compare:(t,e)=>t-e,normalize:t=>t}}function ca({start:t,end:e,count:i,loop:a,style:n}){return{start:t%i,end:e%i,loop:a&&(e-t+1)%i==0,style:n}}function da(t,i,g){if(!g)return[t];const{property:a,start:n,end:o}=g,r=i.length,{compare:s,between:l,normalize:h}=ha(a),{start:c,end:d,loop:u,style:f}=function(t,e){const{property:i,start:a,end:n}=g,{between:o,normalize:r}=ha(i),s=e.length;let l,h,{start:c,end:d,loop:u}=t;if(u){for(c+=s,d+=s,l=0,h=s;l<h&&o(r(e[c%s][i]),a,n);++l)c--,d--;c%=s,d%=s}return d<c&&(d+=s),{start:c,end:d,loop:u,style:t.style}}(t,i),p=[];let m,x,b,v=!1,_=null;for(let t=c,e=c;t<=d;++t)(x=i[t%r]).skip||(m=h(x[a]),v=l(m,n,o),null===_&&(v||l(n,b,m)&&0!==s(n,b))&&(_=0===s(m,n)?t:e),null===_||v&&0!==s(o,m)&&!l(o,b,m)||(p.push(ca({start:_,end:t,loop:u,count:r,style:f})),_=null),e=t,b=m);return null!==_&&p.push(ca({start:_,end:d,loop:u,count:r,style:f})),p}function ua(e,i){const a=[],n=e.segments;for(let t=0;t<n.length;t++){var o=da(n[t],e.points,i);o.length&&a.push(...o)}return a}function ga(t,e){var i=t.points,o=t.options.spanGaps,a=i.length;if(!a)return[];var n=!!t._loop,{start:r,end:s}=function(t,e,i){let a=0,n=e-1;if(i&&!o)for(;a<e&&!t[a].skip;)a++;for(;a<e&&t[a].skip;)a++;for(a%=e,i&&(n+=a);n>a&&t[n%e].skip;)n--;return n%=e,{start:a,end:n}}(i,a,n);return fa(!0===o?[{start:r,end:s,loop:n}]:function(t,e,i,a){const n=t.length,o=[];let r,s=e,l=t[e];for(r=e+1;r<=i;++r){const i=t[r%n];i.skip||i.stop?l.skip||(a=!1,o.push({start:e%n,end:(r-1)%n,loop:a}),e=s=i.stop?r:null):(s=r,l.skip&&(e=r)),l=i}return null!==s&&o.push({start:e%n,end:s%n,loop:a}),o}(i,r,s<r?s+a:s,!!t._fullLoop&&0===r&&s===a-1),i,e)}function fa(t,e,i){return i&&i.setContext&&e?function(a,n){const o=a.length,r=[];let s=t[0].start,l=s;for(const u of t){let t,e,i=a[s%o];for(l=s+1;l<=u.end;l++){var h=a[l%o];e={backgroundColor:(d=n.setContext({type:"segment",p0:i,p1:h})).backgroundColor,borderCapStyle:d.borderCapStyle,borderDash:d.borderDash,borderDashOffset:d.borderDashOffset,borderJoinStyle:d.borderJoinStyle,borderWidth:d.borderWidth,borderColor:d.borderColor},c=e,(d=t)&&JSON.stringify(c)!==JSON.stringify(d)&&(r.push({start:s,end:l-1,loop:u.loop,style:t}),t=e,s=l-1),i=h,t=e}s<l-1&&(r.push({start:s,end:l-1,loop:u.loop,style:e}),s=l-1)}var c,d;return r}(e,i):t}var pa=Object.freeze({__proto__:null,easingEffects:ci,color:V,getHoverColor:B,noop:t,uid:W,isNullOrUndef:H,isArray:N,isObject:j,isFinite:$,finiteOrDefault:Y,valueOrDefault:U,toPercentage:X,toDimension:q,callback:K,each:G,_elementsEqual:Z,clone:Q,_merger:tt,merge:et,mergeIf:it,_mergerIf:at,_deprecated:function(t,e,i,a){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+a+'" instead')},resolveObjectKey:ot,_capitalize:rt,defined:st,isFunction:lt,setsEqual:ht,toFontString:Ht,_measureText:Nt,_longestText:jt,_alignPixel:$t,clearCanvas:Yt,drawPoint:Ut,_isPointInArea:Xt,clipArea:qt,unclipArea:Kt,_steppedLineTo:Gt,_bezierCurveTo:Zt,renderText:Qt,addRoundedRectPath:Jt,_lookup:te,_lookupByKey:ee,_rlookupByKey:ie,_filterBetween:ae,listenArrayEvents:oe,unlistenArrayEvents:re,_arrayUnique:se,_createResolver:Bi,_attachContext:Wi,_descriptors:Hi,splineCurve:Ji,splineCurveMonotone:ta,_updateBezierControlPoints:ia,_getParentNode:le,getStyle:de,getRelativePosition:fe,getMaximumSize:me,retinaScale:xe,supportsEventListenerOptions:be,readUsedSize:ve,fontString:function(t,e,i){return e+" "+t+"px "+i},requestAnimFrame:r,throttled:l,debounce:s,_toLeftRightCenter:f,_alignStartEnd:T,_textX:R,_pointInLine:aa,_steppedInterpolation:na,_bezierInterpolation:oa,formatNumber:Oi,toLineHeight:Ce,_readValueToProps:Oe,toTRBL:Ae,toTRBLCorners:Te,toPadding:Re,toFont:Le,resolve:Ee,_addGrace:Ie,PI:pt,TAU:mt,PITAU:xt,INFINITY:bt,RAD_PER_DEG:vt,HALF_PI:_t,QUARTER_PI:yt,TWO_THIRDS_PI:wt,log10:Mt,sign:kt,niceNum:St,_factorize:Pt,isNumber:Dt,almostEquals:Ct,almostWhole:Ot,_setMinAndMaxByKey:At,toRadians:Tt,toDegrees:Rt,_decimalPlaces:Lt,getAngleFromPoint:Et,distanceBetweenPoints:It,_angleDiff:zt,_normalizeAngle:Ft,_angleBetween:Vt,_limitValue:Bt,_int16Range:Wt,getRtlAdapter:ra,overrideTextDirection:sa,restoreTextDirection:la,_boundSegment:da,_boundSegments:ua,_computeSegments:ga});class ma{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){var e,i,s,l,a=Object.getPrototypeOf(t);let n;"id"in(i=a)&&"defaults"in i&&(n=this.register(a));const o=this.items,r=t.id,h=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in o||(o[r]=t,e=t,i=h,a=n,a=et(Object.create(null),[a?ft.get(a):{},ft.get(i),e.defaults]),ft.set(i,a),e.defaultRoutes&&(s=i,l=e.defaultRoutes,Object.keys(l).forEach(t=>{const e=t.split("."),i=e.pop(),a=[s].concat(e).join("."),n=l[t].split("."),o=n.pop(),r=n.join(".");ft.route(a,i,r,o)})),e.descriptors&&ft.describe(i,e.descriptors),this.override&&ft.override(t.id,t.overrides)),h}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,a=this.scope;i in e&&delete e[i],a&&i in ft[a]&&(delete ft[a][i],this.override&&delete ct[i])}}var xa=new class{constructor(){this.controllers=new ma(Pi,"datasets",!0),this.elements=new ma(Di,"elements"),this.plugins=new ma(Object,"plugins"),this.scales=new ma(Vi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(i,t,a){const n=this;[...t].forEach(t=>{const e=a||n._getRegistryForType(t);a||e.isForType(t)||e===n.plugins&&t.id?n._exec(i,e,t):G(t,t=>{var e=a||n._getRegistryForType(t);n._exec(i,e,t)})})}_exec(t,e,i){var a=rt(t);K(i["before"+a],[],i),e[t](i),K(i["after"+a],[],i)}_getRegistryForType(e){for(let t=0;t<this._typedRegistries.length;t++){const i=this._typedRegistries[t];if(i.isForType(e))return i}return this.plugins}_get(t,e,i){e=e.get(t);if(void 0===e)throw new Error('"'+t+'" is not a registered '+i+".");return e}};class ba{constructor(){this._init=[]}notify(t,e,i,a){var n=this;"beforeInit"===e&&(n._init=n._createDescriptors(t,!0),n._notify(n._init,t,"install"));a=a?n._descriptors(t).filter(a):n._descriptors(t),i=n._notify(a,t,e,i);return"destroy"===e&&(n._notify(a,t,"stop"),n._notify(n._init,t,"uninstall")),i}_notify(t,e,i,a){a=a||{};for(const n of t){const t=n.plugin;if(!1===K(t[i],[e,a,n.options],t)&&a.cancelable)return!1}return!0}invalidate(){H(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;var e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){var i=t&&t.config,a=U(i.options&&i.options.plugins,{}),i=function(t){const e=[],i=Object.keys(xa.plugins.items);for(let t=0;t<i.length;t++)e.push(xa.getPlugin(i[t]));var a=t.plugins||[];for(let t=0;t<a.length;t++){const i=a[t];-1===e.indexOf(i)&&e.push(i)}return e}(i);return!1!==a||e?function(e,i,a,n){const o=[],r=e.getContext();for(let t=0;t<i.length;t++){var s=i[t],l=(l=a[s.id],n||!1!==l?!0===l?{}:l:null);null!==l&&o.push({plugin:s,options:function(t,e,i,a){e=t.pluginScopeKeys(e),e=t.getOptionScopes(i,e);return t.createResolver(e,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}(e.config,s,l,r)})}var l;return o}(t,i,a,e):[]}_notifyStateChanges(t){var e=this._oldCache||[],i=this._cache,a=(t,i)=>t.filter(e=>!i.some(t=>e.plugin.id===t.plugin.id));this._notify(a(e,i),t,"stop"),this._notify(a(i,e),t,"start")}}function va(t,e){var i=ft.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function _a(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(e=e.position)||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0)||t.charAt(0).toLowerCase()}function ya(t){const e=t.options||(t.options={});e.plugins=U(e.plugins,{}),e.scales=function(e,i){const o=ct[e.type]||{scales:{}},r=i.scales||{},s=va(e.type,i),l=Object.create(null),h=Object.create(null);return Object.keys(r).forEach(t=>{var e=r[t],i=_a(t,e),a=i===s?"_index_":"_value_",n=o.scales||{};l[i]=l[i]||t,h[t]=it(Object.create(null),[{axis:i},e,n[i],n[a]])}),e.data.datasets.forEach(a=>{const t=a.type||e.type,n=a.indexAxis||va(t,i),o=(ct[t]||{}).scales||{};Object.keys(o).forEach(t=>{var e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,n),i=a[e+"AxisID"]||l[e]||e;h[i]=h[i]||Object.create(null),it(h[i],[{axis:e},r[i],o[t]])})}),Object.keys(h).forEach(t=>{t=h[t];it(t,[ft.scales[t.type],ft.scale])}),h}(t,e)}function wa(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Ma=new Map,ka=new Set;function Sa(t,e){let i=Ma.get(t);return i||(i=e(),Ma.set(t,i),ka.add(i)),i}const Pa=(t,e,i)=>{i=ot(e,i);void 0!==i&&t.add(i)};class Da{constructor(t){this._config=((t=(t=t)||{}).data=wa(t.data),ya(t),t),this._scopeCache=new Map,this._resolverCache=new Map}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=wa(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){var t=this._config;this.clearCache(),ya(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Sa(t,()=>[["datasets."+t,""]])}datasetAnimationScopeKeys(t,e){return Sa(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,"transitions."+e],["datasets."+t,""]])}datasetElementScopeKeys(t,e){return Sa(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,"datasets."+t,"elements."+e,""]])}pluginScopeKeys(t){const e=t.id;return Sa(`${this.type}-plugin-${e}`,()=>[["plugins."+e,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let a=i.get(t);return a&&!e||(a=new Map,i.set(t,a)),a}getOptionScopes(e,t,i){const{options:a,type:n}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const s=new Set;t.forEach(t=>{e&&(s.add(e),t.forEach(t=>Pa(s,e,t))),t.forEach(t=>Pa(s,a,t)),t.forEach(t=>Pa(s,ct[n]||{},t)),t.forEach(t=>Pa(s,ft,t)),t.forEach(t=>Pa(s,dt,t))});i=[...s];return ka.has(t)&&o.set(t,i),i}chartOptionScopes(){var{options:t,type:e}=this;return[t,ct[e]||{},ft.datasets[e]||{},{type:e},ft,dt]}resolveNamedOptions(t,e,i,a=[""]){const n={$shared:!0},{resolver:o,subPrefixes:r}=Ca(this._resolverCache,t,a);let s=o;!function(t,e){const{isScriptable:i,isIndexable:a}=Hi(t);for(const n of e)if(i(n)&&lt(t[n])||a(n)&&N(t[n]))return 1}(o,e)||(n.$shared=!1,s=Wi(o,i=lt(i)?i():i,this.createResolver(t,i,r)));for(const t of e)n[t]=s[t];return n}createResolver(t,e,i=[""],a){var{resolver:i}=Ca(this._resolverCache,t,i);return j(e)?Wi(i,e,void 0,a):i}}function Ca(t,e,i){let a=t.get(e);a||(a=new Map,t.set(e,a));t=i.join();let n=a.get(t);return n||(n={resolver:Bi(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},a.set(t,n)),n}const Oa=["top","bottom","left","right","chartArea"];function Aa(t,e){return"top"===t||"bottom"===t||-1===Oa.indexOf(t)&&"x"===e}function Ta(i,a){return function(t,e){return t[i]===e[i]?t[a]-e[a]:t[i]-e[i]}}function Ra(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),K(i&&i.onComplete,[t],e)}function La(t){var e=t.chart,i=e.options.animation;K(i&&i.onProgress,[t],e)}function Ea(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Ia(t){return Ea()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t=t&&t.canvas?t.canvas:t}const za={},Fa=t=>{const e=Ia(t);return Object.values(za).filter(t=>t.canvas===e).pop()};class Va{constructor(t,e){var i=this;this.config=e=new Da(e);var a=Ia(t),n=Fa(a);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas can be reused.");var o=e.createResolver(e.chartOptionScopes(),i.getContext());this.platform=i._initializePlatform(a,e);t=i.platform.acquireContext(a,o.aspectRatio),n=t&&t.canvas,e=n&&n.height,a=n&&n.width;this.id=W(),this.ctx=t,this.canvas=n,this.width=a,this.height=e,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._sortedMetasets=[],this.scales={},this.scale=void 0,this._plugins=new ba,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=s(()=>this.update("resize"),o.resizeDelay||0),za[i.id]=i,t&&n?(h.listen(i,"complete",Ra),h.listen(i,"progress",La),i._initialize(),i.attached&&i.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){var{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:a,_aspectRatio:n}=this;return H(t)?e&&n?n:a?i/a:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){var t=this;return t.notifyPlugins("beforeInit"),t.options.responsive?t.resize():xe(t,t.options.devicePixelRatio),t.bindEvents(),t.notifyPlugins("afterInit"),t}_initializePlatform(t,e){return new(e.platform||(!Ea()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Xe:oi))}clear(){return Yt(this.canvas,this.ctx),this}stop(){return h.stop(this),this}resize(t,e){h.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){var i=this,a=i.options,n=i.canvas,o=a.maintainAspectRatio&&i.aspectRatio,t=i.platform.getMaximumSize(n,t,e,o),e=i.currentDevicePixelRatio,o=a.devicePixelRatio||i.platform.getDevicePixelRatio();i.width===t.width&&i.height===t.height&&e===o||(i.width=t.width,i.height=t.height,i._aspectRatio=i.aspectRatio,xe(i,o,!0),i.notifyPlugins("resize",{size:t}),K(a.onResize,[i,t],i),i.attached&&i._doResize()&&i.render())}ensureScalesHaveIDs(){G(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const r=this,s=r.options,a=s.scales,l=r.scales,h=Object.keys(l).reduce((t,e)=>(t[e]=!1,t),{});let t=[];a&&(t=t.concat(Object.keys(a).map(t=>{var e=a[t],i=_a(t,e),t="r"===i,i="x"===i;return{options:e,dposition:t?"chartArea":i?"bottom":"left",dtype:t?"radialLinear":i?"category":"linear"}}))),G(t,t=>{const e=t.options,i=e.id,a=_a(i,e),n=U(e.type,t.dtype);void 0!==e.position&&Aa(e.position,a)===Aa(t.dposition)||(e.position=t.dposition),h[i]=!0;let o=null;i in l&&l[i].type===n?o=l[i]:(o=new(xa.getScale(n))({id:i,type:n,ctx:r.ctx,chart:r}),l[o.id]=o),o.init(e,s)}),G(h,(t,e)=>{t||delete l[e]}),G(l,t=>{Ye.configure(r,t,t.options),Ye.addBox(r,t)})}_updateMetasetIndex(t,e){const i=this._metasets,a=t.index;a!==e&&(i[a]=i[e],(i[e]=t).index=e)}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(e<i){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Ta("order","index"))}_removeUnreferencedMetasets(){const i=this,{_metasets:t,data:{datasets:a}}=i;t.length>a.length&&delete i._stacks,t.forEach((e,t)=>{0===a.filter(t=>t===e._dataset).length&&i._destroyDatasetMeta(t)})}buildOrUpdateControllers(){const e=this,i=[],a=e.data.datasets;let n,o;for(e._removeUnreferencedMetasets(),n=0,o=a.length;n<o;n++){const o=a[n];let t=e.getDatasetMeta(n);var r=o.type||e.config.type;if(t.type&&t.type!==r&&(e._destroyDatasetMeta(n),t=e.getDatasetMeta(n)),t.type=r,t.indexAxis=o.indexAxis||va(r,e.options),t.order=o.order||0,e._updateMetasetIndex(t,n),t.label=""+o.label,t.visible=e.isDatasetVisible(n),t.controller)t.controller.updateIndex(n),t.controller.linkScales();else{const a=xa.getController(r),{datasetElementType:o,dataElementType:s}=ft.datasets[r];Object.assign(a.prototype,{dataElementType:xa.getElement(s),datasetElementType:o&&xa.getElement(o)}),t.controller=new a(e,n),i.push(t.controller)}}return e._updateMetasets(),i}_resetElements(){const i=this;G(i.data.datasets,(t,e)=>{i.getDatasetMeta(e).controller.reset()},i)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const a=this,n=a.config;n.update(),a._options=n.createResolver(n.chartOptionScopes(),a.getContext()),G(a.scales,t=>{Ye.removeBox(a,t)});var o=a._animationsDisabled=!a.options.animation;a.ensureScalesHaveIDs(),a.buildOrUpdateScales();const r=new Set(Object.keys(a._listeners)),e=new Set(a.options.events);if(ht(r,e)||(a.unbindEvents(),a.bindEvents()),a._plugins.invalidate(),!1!==a.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})){const s=a.buildOrUpdateControllers();a.notifyPlugins("beforeElementsUpdate");let i=0;for(let t=0,e=a.data.datasets.length;t<e;t++){const{controller:n}=a.getDatasetMeta(t),r=!o&&-1===s.indexOf(n);n.buildOrUpdateElements(r),i=Math.max(+n.getMaxOverflow(),i)}a._minPadding=i,a._updateLayout(i),o||G(s,t=>{t.reset()}),a._updateDatasets(t),a.notifyPlugins("afterUpdate",{mode:t}),a._layers.sort(Ta("z","_idx")),a._lastEvent&&a._eventHandler(a._lastEvent,!0),a.render()}}_updateLayout(t){const e=this;if(!1!==e.notifyPlugins("beforeLayout",{cancelable:!0})){Ye.update(e,e.width,e.height,t);const i=e.chartArea,a=i.width<=0||i.height<=0;e._layers=[],G(e.boxes,t=>{a&&"chartArea"===t.position||(t.configure&&t.configure(),e._layers.push(...t._layers()))},e),e._layers.forEach((t,e)=>{t._idx=e}),e.notifyPlugins("afterLayout")}}_updateDatasets(i){var a="function"==typeof i;if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:i,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this._updateDataset(t,a?i({datasetIndex:t}):i);this.notifyPlugins("afterDatasetsUpdate",{mode:i})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),a={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",a)&&(i.controller._update(e),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){var t=this;!1!==t.notifyPlugins("beforeRender",{cancelable:!0})&&(h.has(t)?t.attached&&!h.running(t)&&h.start(t):(t.draw(),Ra({chart:t})))}draw(){var t=this;let e;if(t._resizeBeforeDraw){const{width:e,height:i}=t._resizeBeforeDraw;t._resize(e,i),t._resizeBeforeDraw=null}if(t.clear(),!(t.width<=0||t.height<=0)&&!1!==t.notifyPlugins("beforeDraw",{cancelable:!0})){const i=t._layers;for(e=0;e<i.length&&i[e].z<=0;++e)i[e].draw(t.chartArea);for(t._drawDatasets();e<i.length;++e)i[e].draw(t.chartArea);t.notifyPlugins("afterDraw")}}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let a,n;for(a=0,n=e.length;a<n;++a){const n=e[a];t&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1!==this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})){var e=this.getSortedVisibleDatasetMetas();for(let t=e.length-1;0<=t;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}}_drawDataset(t){const e=this,i=e.ctx,a=t._clip,n=e.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==e.notifyPlugins("beforeDatasetDraw",o)&&(qt(i,{left:!1===a.left?0:n.left-a.left,right:!1===a.right?e.width:n.right+a.right,top:!1===a.top?0:n.top-a.top,bottom:!1===a.bottom?e.height:n.bottom+a.bottom}),t.controller.draw(),Kt(i),o.cancelable=!1,e.notifyPlugins("afterDatasetDraw",o))}getElementsAtEventForMode(t,e,i,a){const n=Se.modes[e];return"function"==typeof n?n(this,t,i,a):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let a=i.filter(t=>t&&t._dataset===e).pop();return a=a||(i[t]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1}),a}getContext(){return this.$context||(this.$context={chart:this,type:"chart"})}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){var e=this.data.datasets[t];if(!e)return!1;t=this.getDatasetMeta(t);return"boolean"==typeof t.hidden?!t.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateDatasetVisibility(e,t){const i=t?"show":"hide",a=this.getDatasetMeta(e),n=a.controller._resolveAnimations(void 0,i);this.setDatasetVisibility(e,t),n.update(a,{visible:t}),this.update(t=>t.datasetIndex===e?i:void 0)}hide(t){this._updateDatasetVisibility(t,!1)}show(t){this._updateDatasetVisibility(t,!0)}_destroyDatasetMeta(t){const e=this._metasets&&this._metasets[t];e&&e.controller&&(e.controller._destroy(),delete this._metasets[t])}destroy(){var t=this,{canvas:e,ctx:i}=t;let a,n;for(t.stop(),h.remove(t),a=0,n=t.data.datasets.length;a<n;++a)t._destroyDatasetMeta(a);t.config.clearCache(),e&&(t.unbindEvents(),Yt(e,i),t.platform.releaseContext(i),t.canvas=null,t.ctx=null),t.notifyPlugins("destroy"),delete za[t.id]}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){const a=this,i=a._listeners,n=a.platform,e=(t,e)=>{n.addEventListener(a,t,e),i[t]=e},o=(t,e)=>{i[t]&&(n.removeEventListener(a,t,e),delete i[t])};let r=function(t,e,i){t.offsetX=e,t.offsetY=i,a._eventHandler(t)};if(G(a.options.events,t=>e(t,r)),a.options.responsive){let t;r=(t,e)=>{a.canvas&&a.resize(t,e)};const s=()=>{o("attach",s),a.attached=!0,a.resize(),e("resize",r),e("detach",t)};t=()=>{a.attached=!1,o("resize",r),e("attach",s)},(n.isAttached(a.canvas)?s:t)()}else a.attached=!0}unbindEvents(){const i=this,t=i._listeners;t&&(i._listeners={},G(t,(t,e)=>{i.platform.removeEventListener(i,e,t)}))}updateHoverStyle(t,e,i){var a=i?"set":"remove";let n,o,r,s;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+a+"DatasetHoverStyle"]()),r=0,s=t.length;r<s;++r){const e=(o=t[r])&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[a+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const a=this,e=a._active||[],i=t.map(({datasetIndex:t,index:e})=>{var i=a.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});Z(i,e)||(a._active=i,a._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){var a=this.options.hover,n=(t,i)=>t.filter(e=>!i.some(t=>e.datasetIndex===t.datasetIndex&&e.index===t.index)),o=n(e,t),e=i?t:n(t,e);o.length&&this.updateHoverStyle(o,a.mode,!1),e.length&&a.mode&&this.updateHoverStyle(e,a.mode,!0)}_eventHandler(e,t){const i=this,a={event:e,replay:t,cancelable:!0},n=t=>(t.options.events||this.options.events).includes(e.type);if(!1!==i.notifyPlugins("beforeEvent",a,n)){t=i._handleEvent(e,t);return a.cancelable=!1,i.notifyPlugins("afterEvent",a,n),(t||a.changed)&&i.render(),i}}_handleEvent(t,e){var i=this,{_active:a=[],options:n}=i,o=n.hover;let r=[],s,l=null;return"mouseout"!==t.type&&(r=i.getElementsAtEventForMode(t,o.mode,o,e),l="click"===t.type?i._lastEvent:t),i._lastEvent=null,Xt(t,i.chartArea,i._minPadding)&&(K(n.onHover,[t,r,i],i),"mouseup"!==t.type&&"click"!==t.type&&"contextmenu"!==t.type||K(n.onClick,[t,r,i],i)),((s=!Z(r,a))||e)&&(i._active=r,i._updateHoverStyles(r,a,e)),i._lastEvent=l,s}}const Ba=()=>G(Va.instances,t=>t._plugins.invalidate());function Wa(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}Object.defineProperties(Va,{defaults:{enumerable:!0,value:ft},instances:{enumerable:!0,value:za},overrides:{enumerable:!0,value:ct},registry:{enumerable:!0,value:xa},version:{enumerable:!0,value:"3.2.1"},getChart:{enumerable:!0,value:Fa},register:{enumerable:!0,value:(...t)=>{xa.add(...t),Ba()}},unregister:{enumerable:!0,value:(...t)=>{xa.remove(...t),Ba()}}});class Ha{constructor(t){this.options=t||{}}formats(){return Wa()}parse(t,e){return Wa()}format(t,e){return Wa()}add(t,e,i){return Wa()}diff(t,e,i){return Wa()}startOf(t,e,i){return Wa()}endOf(t,e){return Wa()}}Ha.override=function(t){Object.assign(Ha.prototype,t)};var Na={_date:Ha};function ja(t,e,i,a){return N(t)?function(t,e,i,a){var n=i.parse(t[0],a),o=i.parse(t[1],a),t=Math.min(n,o),a=Math.max(n,o);let r=t,s=a;Math.abs(t)>Math.abs(a)&&(r=a,s=t),e[i.axis]=s,e._custom={barStart:r,barEnd:s,start:n,end:o,min:t,max:a}}(t,e,i,a):e[i.axis]=i.parse(t,a),e}function $a(t,e,i,a){const n=t.iScale,o=t.vScale,r=n.getLabels(),s=n===o,l=[];let h,c,d,u;for(c=(h=i)+a;h<c;++h)u=e[h],d={},d[n.axis]=s||n.parse(r[h],h),l.push(ja(u,d,o,h));return l}function Ya(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}class Ua extends Pi{parsePrimitiveData(t,e,i,a){return $a(t,e,i,a)}parseArrayData(t,e,i,a){return $a(t,e,i,a)}parseObjectData(t,e,i,a){const{iScale:n,vScale:o}=t,{xAxisKey:r="x",yAxisKey:s="y"}=this._parsing,l="x"===n.axis?r:s,h="x"===o.axis?r:s,c=[];let d,u,g,f;for(u=(d=i)+a;d<u;++d)f=e[d],g={},g[n.axis]=n.parse(ot(f,l),d),c.push(ja(ot(f,h),g,o,d));return c}updateRangeFromParsed(t,e,i,a){super.updateRangeFromParsed(t,e,i,a);i=i._custom;i&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,i.min),t.max=Math.max(t.max,i.max))}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:a}=e,n=this.getParsed(t),o=n._custom,r=Ya(o)?"["+o.start+", "+o.end+"]":""+a.getLabelForValue(n[a.axis]);return{label:""+i.getLabelForValue(n[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){var e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(e,i,a,n){const o=this,r="reset"===n,s=o._cachedMeta.vScale,l=s.getBasePixel(),h=s.isHorizontal(),c=o._getRuler(),t=o.resolveDataElementOptions(i,n),d=o.getSharedOptions(t),u=o.includeOptions(n,d);o.updateSharedOptions(d,n,t);for(let t=i;t<i+a;t++){const i=o.getParsed(t),a=r||H(i[s.axis])?{base:l,head:l}:o._calculateBarValuePixels(t),g=o._calculateBarIndexPixels(t,c),f=(i._stacks||{})[s.axis],p={horizontal:h,base:a.base,enableBorderRadius:!f||Ya(i._custom)||o.index===f._top||o.index===f._bottom,x:h?a.head:g.center,y:h?g.center:a.head,height:h?g.size:void 0,width:h?void 0:g.size};u&&(p.options=d||o.resolveDataElementOptions(t,n)),o.updateElement(e[t],t,p,n)}}_getStacks(t,e){const i=this._cachedMeta.iScale,a=i.getMatchingVisibleMetas(this._type),n=i.options.stacked,o=a.length,r=[];let s,l;for(s=0;s<o;++s){if(l=a[s],void 0!==e){const t=l.controller.getParsed(e)[l.controller._cachedMeta.vScale.axis];if(H(t)||isNaN(t))continue}if((!1===n||-1===r.indexOf(l.stack)||void 0===n&&void 0===l.stack)&&r.push(l.stack),l.index===t)break}return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const a=this._getStacks(t,i),n=void 0!==e?a.indexOf(e):-1;return-1===n?a.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,a=[];let n,o;for(n=0,o=e.data.length;n<o;++n)a.push(i.getPixelForValue(this.getParsed(n)[i.axis],n));var r=t.barThickness;return{min:r||function(t){var e=function(a){if(!a._cache.$bar){const n=a.getMatchingVisibleMetas("bar");let i=[];for(let t=0,e=n.length;t<e;t++)i=i.concat(n[t].controller.getAllParsedValues(a));a._cache.$bar=se(i.sort((t,e)=>t-e))}return a._cache.$bar}(t);let i,a,n,o,r=t._length;var s=()=>{32767!==n&&-32768!==n&&(st(o)&&(r=Math.min(r,Math.abs(n-o)||r)),o=n)};for(i=0,a=e.length;i<a;++i)n=t.getPixelForValue(e[i]),s();for(o=void 0,i=0,a=t.ticks.length;i<a;++i)n=t.getPixelForTick(i),s();return r}(i),pixels:a,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{vScale:e,_stacked:i}=this._cachedMeta,{base:a,minBarLength:n}=this.options,o=this.getParsed(t),r=o._custom,s=Ya(r);let l,h,c=o[e.axis],d=0,u=i?this.applyStack(e,o,i):c;u!==c&&(d=u-c,u=c),s&&(c=r.barStart,u=r.barEnd-r.barStart,0!==c&&kt(c)!==kt(r.barEnd)&&(d=0),d+=c);var g=H(a)||s?d:a;let f=e.getPixelForValue(g);l=this.chart.getDataVisibility(t)?e.getPixelForValue(d+u):f,h=l-f,void 0!==n&&Math.abs(h)<n&&(h=h<0?-n:n,0===c&&(f-=h/2),l=f+h);t=a||0;if(f===e.getPixelForValue(t)){const p=e.getLineWidthForValue(t)/2;0<h?(f+=p,h-=p):h<0&&(f-=p,h+=p)}return{size:h,base:f,head:l,center:l+h/2}}_calculateBarIndexPixels(t,e){const i=this,a=e.scale,n=i.options,o=n.skipNull,r=U(n.maxBarThickness,1/0);let s,l;if(e.grouped){const a=o?i._getStackCount(t):e.stackCount,h=("flex"===n.barThickness?function(t,e,i,a){var n=e.pixels,o=n[t];let r=0<t?n[t-1]:null,s=t<n.length-1?n[t+1]:null;t=i.categoryPercentage;null===r&&(r=o-(null===s?e.end-e.start:s-o)),null===s&&(s=o+o-r);o-=(o-Math.min(r,s))/2*t;return{chunk:Math.abs(s-r)/2*t/a,ratio:i.barPercentage,start:o}}:function(t,e,i,a){var n=i.barThickness;let o,r;return r=H(n)?(o=e.min*i.categoryPercentage,i.barPercentage):(o=n*a,1),{chunk:o/a,ratio:r,start:e.pixels[t]-o/2}})(t,e,n,a),c=i._getStackIndex(i.index,i._cachedMeta.stack,o?t:void 0);s=h.start+h.chunk*c+h.chunk/2,l=Math.min(r,h.chunk*h.ratio)}else s=a.getPixelForValue(i.getParsed(t)[a.axis],t),l=Math.min(r,e.min*e.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this.chart,e=this._cachedMeta,i=e.vScale,a=e.data,n=a.length;let o=0;for(qt(t.ctx,t.chartArea);o<n;++o)null!==this.getParsed(o)[i.axis]&&a[o].draw(this._ctx);Kt(t.ctx)}}Ua.id="bar",Ua.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},Ua.overrides={interaction:{mode:"index"},scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Xa extends Pi{initialize(){this.enableOptionSharing=!0,super.initialize()}parseObjectData(t,e,i,a){const{xScale:n,yScale:o}=t,{xAxisKey:r="x",yAxisKey:s="y"}=this._parsing,l=[];let h,c,d;for(c=(h=i)+a;h<c;++h)d=e[h],l.push({x:n.parse(ot(d,r),h),y:o.parse(ot(d,s),h),_custom:d&&d.r&&+d.r});return l}getMaxOverflow(){const{data:e,_parsed:i}=this._cachedMeta;let a=0;for(let t=e.length-1;0<=t;--t)a=Math.max(a,e[t].size()/2,i[t]._custom);return 0<a&&a}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:a}=e,n=this.getParsed(t),o=i.getLabelForValue(n.x),r=a.getLabelForValue(n.y),s=n._custom;return{label:e.label,value:"("+o+", "+r+(s?", "+s:"")+")"}}update(t){var e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(e,i,a,n){const o=this,r="reset"===n,{xScale:s,yScale:l}=o._cachedMeta,t=o.resolveDataElementOptions(i,n),h=o.getSharedOptions(t),c=o.includeOptions(n,h);for(let t=i;t<i+a;t++){const i=e[t],a=!r&&o.getParsed(t),h=r?s.getPixelForDecimal(.5):s.getPixelForValue(a.x),d=r?l.getBasePixel():l.getPixelForValue(a.y),u={x:h,y:d,skip:isNaN(h)||isNaN(d)};c&&(u.options=o.resolveDataElementOptions(t,n),r&&(u.options.radius=0)),o.updateElement(i,t,u,n)}o.updateSharedOptions(h,n,t)}resolveDataElementOptions(t,e){var i=this.getParsed(t);let a=super.resolveDataElementOptions(t,e);a.$shared&&(a=Object.assign({},a,{$shared:!1}));t=a.radius;return"active"!==e&&(a.radius=0),a.radius+=U(i&&i._custom,t),a}}Xa.id="bubble",Xa.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Xa.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class qa extends Pi{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,a=this._cachedMeta;let n,o;for(o=(n=t)+e;n<o;++n)a._parsed[n]=+i[n]}_getRotation(){return Tt(this.options.rotation-90)}_getCircumference(){return Tt(this.options.circumference)}_getRotationExtents(){let e=mt,i=-mt;for(let t=0;t<this.chart.data.datasets.length;++t)if(this.chart.isDatasetVisible(t)){const a=this.chart.getDatasetMeta(t).controller,n=a._getRotation(),o=a._getCircumference();e=Math.min(e,n),i=Math.max(i,n+o)}return{rotation:e,circumference:i-e}}update(t){const e=this,i=e.chart,{chartArea:a}=i,n=e._cachedMeta,o=n.data,r=e.getMaxBorderWidth()+e.getMaxOffset(o),s=Math.max((Math.min(a.width,a.height)-r)/2,0),l=Math.min(X(e.options.cutout,s),1),h=e._getRingWeight(e.index),{circumference:c,rotation:d}=e._getRotationExtents(),{ratioX:u,ratioY:g,offsetX:f,offsetY:p}=function(t,e,a){let i=1,n=1,o=0,r=0;if(e<mt){const s=t,l=s+e,h=Math.cos(s),c=Math.sin(s),d=Math.cos(l),u=Math.sin(l),g=(t,e,i)=>Vt(t,s,l)?1:Math.max(e,e*a,i,i*a),f=(t,e,i)=>Vt(t,s,l)?-1:Math.min(e,e*a,i,i*a),p=g(0,h,d),m=g(_t,c,u),x=f(pt,h,d),b=f(pt+_t,c,u);i=(p-x)/2,n=(m-b)/2,o=-(p+x)/2,r=-(m+b)/2}return{ratioX:i,ratioY:n,offsetX:o,offsetY:r}}(d,c,l),m=(a.width-r)/u,x=(a.height-r)/g,b=Math.max(Math.min(m,x)/2,0),v=q(e.options.radius,b),_=(v-Math.max(v*l,0))/e._getVisibleDatasetWeightTotal();e.offsetX=f*v,e.offsetY=p*v,n.total=e.calculateTotal(),e.outerRadius=v-_*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-_*h,0),e.updateElements(o,0,o.length,t)}_circumference(t,e){var i=this.options,a=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===a._parsed[t]?0:this.calculateCircumference(a._parsed[t]*n/mt)}updateElements(t,e,i,a){const n=this,o="reset"===a,r=n.chart,s=r.chartArea,l=r.options.animation,h=(s.left+s.right)/2,c=(s.top+s.bottom)/2,d=o&&l.animateScale,u=d?0:n.innerRadius,g=d?0:n.outerRadius,f=n.resolveDataElementOptions(e,a),p=n.getSharedOptions(f),m=n.includeOptions(a,p);let x,b=n._getRotation();for(x=0;x<e;++x)b+=n._circumference(x,o);for(x=e;x<e+i;++x){const e=n._circumference(x,o),i=t[x],r={x:h+n.offsetX,y:c+n.offsetY,startAngle:b,endAngle:b+e,circumference:e,outerRadius:g,innerRadius:u};m&&(r.options=p||n.resolveDataElementOptions(x,a)),b+=e,n.updateElement(i,x,r,a)}n.updateSharedOptions(p,a,f)}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,a=0;for(i=0;i<e.length;i++){const e=t._parsed[i];null!==e&&!isNaN(e)&&this.chart.getDataVisibility(i)&&(a+=Math.abs(e))}return a}calculateCircumference(t){var e=this._cachedMeta.total;return 0<e&&!isNaN(t)?mt*(Math.abs(t)/e):0}getLabelAndValue(t){var e=this._cachedMeta,i=this.chart,a=i.data.labels||[],i=Oi(e._parsed[t],i.options.locale);return{label:a[t]||"",value:i}}getMaxBorderWidth(t){let e=0;const i=this.chart;let a,n,o,r,s;if(!t)for(a=0,n=i.data.datasets.length;a<n;++a)if(i.isDatasetVisible(a)){t=(o=i.getDatasetMeta(a)).data,r=o.controller,r!==this&&r.configure();break}if(!t)return 0;for(a=0,n=t.length;a<n;++a)"inner"!==(s=r.resolveDataElementOptions(a)).borderAlign&&(e=Math.max(e,s.borderWidth||0,s.hoverBorderWidth||0));return e}getMaxOffset(i){let a=0;for(let t=0,e=i.length;t<e;++t){const i=this.resolveDataElementOptions(t);a=Math.max(a,i.offset||0,i.hoverOffset||0)}return a}_getRingWeightOffset(e){let i=0;for(let t=0;t<e;++t)this.chart.isDatasetVisible(t)&&(i+=this._getRingWeight(t));return i}_getRingWeight(t){return Math.max(U(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}qa.id="doughnut",qa.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",indexAxis:"r"},qa.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(a){const t=a.data;return t.labels.length&&t.datasets.length?t.labels.map((t,e)=>{var i=a.getDatasetMeta(0).controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:!a.getDataVisibility(e),index:e}}):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;t=": "+t.formattedValue;return N(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Ka extends Pi{initialize(){this.enableOptionSharing=!0,super.initialize()}update(t){const e=this,n=e._cachedMeta,{dataset:i,data:a=[],_dataset:o}=n,r=e.chart._animationsDisabled;let{start:s,count:l}=function(t,e,i){var a=e.length;let n=0,o=a;if(t._sorted){const{iScale:r,_parsed:s}=t,l=r.axis,{min:h,max:c,minDefined:d,maxDefined:u}=r.getUserBounds();d&&(n=Bt(Math.min(ee(s,r.axis,h).lo,i?a:ee(e,l,r.getPixelForValue(h)).lo),0,a-1)),o=u?Bt(Math.max(ee(s,r.axis,c).hi+1,i?0:ee(e,l,r.getPixelForValue(c)).hi+1),n,a)-n:a-n}return{start:n,count:o}}(n,a,r);e._drawStart=s,e._drawCount=l,function(){var{xScale:t,yScale:e,_scaleRanges:i}=n,a={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=a,1;e=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,a),e}()&&(s=0,l=a.length),i._decimated=!!o._decimated,i.points=a;const h=e.resolveDatasetElementOptions(t);e.options.showLine||(h.borderWidth=0),h.segment=e.options.segment,e.updateElement(i,void 0,{animated:!r,options:h},t),e.updateElements(a,s,l,t)}updateElements(e,i,a,n){const o=this,r="reset"===n,{xScale:s,yScale:l,_stacked:h}=o._cachedMeta,t=o.resolveDataElementOptions(i,n),c=o.getSharedOptions(t),d=o.includeOptions(n,c),u=o.options.spanGaps,g=Dt(u)?u:Number.POSITIVE_INFINITY,f=o.chart._animationsDisabled||r||"none"===n;let p=0<i&&o.getParsed(i-1);for(let t=i;t<i+a;++t){const i=e[t],a=o.getParsed(t),u=f?i:{},m=H(a.y),x=u.x=s.getPixelForValue(a.x,t),b=u.y=r||m?l.getBasePixel():l.getPixelForValue(h?o.applyStack(l,a,h):a.y,t);u.skip=isNaN(x)||isNaN(b)||m,u.stop=0<t&&a.x-p.x>g,u.parsed=a,d&&(u.options=c||o.resolveDataElementOptions(t,n)),f||o.updateElement(i,t,u,n),p=a}o.updateSharedOptions(c,n,t)}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,a=t.data||[];if(!a.length)return i;var n=a[0].size(this.resolveDataElementOptions(0)),o=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(i,n,o)/2}draw(){this._cachedMeta.dataset.updateControlPoints(this.chart.chartArea),super.draw()}}Ka.id="line",Ka.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Ka.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class Ga extends Pi{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}update(t){var e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}_updateRadius(){const t=this,e=t.chart,i=e.chartArea,a=e.options,n=Math.min(i.right-i.left,i.bottom-i.top),o=Math.max(n/2,0),r=(o-Math.max(a.cutoutPercentage?o/100*a.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=o-r*t.index,t.innerRadius=t.outerRadius-r}updateElements(a,n,t,o){const r=this,s="reset"===o,l=r.chart,h=r.getDataset(),c=l.options.animation,d=r._cachedMeta.rScale,u=d.xCenter,g=d.yCenter,f=d.getIndexAngle(0)-.5*pt;let p,m=f;var x=360/r.countVisibleElements();for(p=0;p<n;++p)m+=r._computeAngle(p,o,x);for(p=n;p<n+t;p++){const n=a[p];let t=m,e=m+r._computeAngle(p,o,x),i=l.getDataVisibility(p)?d.getDistanceFromCenterForValue(h.data[p]):0;m=e,s&&(c.animateScale&&(i=0),c.animateRotate&&(t=e=f));var b={x:u,y:g,innerRadius:0,outerRadius:i,startAngle:t,endAngle:e,options:r.resolveDataElementOptions(p,o)};r.updateElement(n,p,b,o)}}countVisibleElements(){const i=this.getDataset(),t=this._cachedMeta;let a=0;return t.data.forEach((t,e)=>{!isNaN(i.data[e])&&this.chart.getDataVisibility(e)&&a++}),a}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Tt(this.resolveDataElementOptions(t,e).angle||i):0}}Ga.id="polarArea",Ga.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},Ga.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(a){const t=a.data;return t.labels.length&&t.datasets.length?t.labels.map((t,e)=>{var i=a.getDatasetMeta(0).controller.getStyle(e);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:!a.getDataVisibility(e),index:e}}):[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Za extends qa{}Za.id="pie",Za.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Qa extends Pi{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}update(t){const e=this,i=e._cachedMeta,a=i.dataset,n=i.data||[],o=i.iScale.getLabels();if(a.points=n,"resize"!==t){const i=e.resolveDatasetElementOptions(t);e.options.showLine||(i.borderWidth=0);var r={_loop:!0,_fullLoop:o.length===n.length,options:i};e.updateElement(a,void 0,r,t)}e.updateElements(n,0,n.length,t)}updateElements(e,i,a,n){const o=this.getDataset(),r=this._cachedMeta.rScale,s="reset"===n;for(let t=i;t<i+a;t++){const i=e[t],a=this.resolveDataElementOptions(t,n),l=r.getPointPositionForValue(t,o.data[t]),h=s?r.xCenter:l.x,c=s?r.yCenter:l.y,d={x:h,y:c,angle:l.angle,skip:isNaN(h)||isNaN(c),options:a};this.updateElement(i,t,d,n)}}}Qa.id="radar",Qa.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Qa.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class Ja extends Ka{}Ja.id="scatter",Ja.defaults={showLine:!1,fill:!1},Ja.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var tn=Object.freeze({__proto__:null,BarController:Ua,BubbleController:Xa,DoughnutController:qa,LineController:Ka,PolarAreaController:Ga,PieController:Za,RadarController:Qa,ScatterController:Ja});function en(t,e){var{startAngle:i,endAngle:a,pixelMargin:n,x:o,y:r,outerRadius:s,innerRadius:l}=e,e=n/s;t.beginPath(),t.arc(o,r,s,i-e,a+e),n<l?t.arc(o,r,l,a+(e=n/l),i-e,!0):t.arc(o,r,n,a+_t,i-_t),t.closePath(),t.clip()}function an(t,e,i,a){return{x:i+t*Math.cos(e),y:a+t*Math.sin(e)}}function nn(t,e){var{x:i,y:a,startAngle:n,endAngle:o,pixelMargin:r}=e,s=Math.max(e.outerRadius-r,0),l=e.innerRadius+r,{outerStart:h,outerEnd:c,innerStart:d,innerEnd:u}=function(t,e,i,a){t=Oe(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const n=(i-e)/2,o=Math.min(n,a*e/2),r=t=>{var e=(i-Math.min(n,t))*a/2;return Bt(t,0,Math.min(n,e))};return{outerStart:r(t.outerStart),outerEnd:r(t.outerEnd),innerStart:Bt(t.innerStart,0,o),innerEnd:Bt(t.innerEnd,0,o)}}(e,l,s,o-n),g=s-h,f=s-c,p=n+h/g,m=o-c/f,x=l+d,b=l+u,r=n+d/x,e=o-u/b;if(t.beginPath(),t.arc(i,a,s,p,m),0<c){const v=an(f,m,i,a);t.arc(v.x,v.y,c,m,o+_t)}m=an(b,o,i,a);if(t.lineTo(m.x,m.y),0<u){const v=an(b,e,i,a);t.arc(v.x,v.y,u,o+_t,e+Math.PI)}if(t.arc(i,a,l,o-u/l,n+d/l,!0),0<d){const v=an(x,r,i,a);t.arc(v.x,v.y,d,r+Math.PI,n-_t)}r=an(g,n,i,a);if(t.lineTo(r.x,r.y),0<h){const v=an(g,p,i,a);t.arc(v.x,v.y,h,n-_t,p)}t.closePath()}function on(t,e){var{options:i}=e,a="inner"===i.borderAlign;i.borderWidth&&(a?(t.lineWidth=2*i.borderWidth,t.lineJoin="round"):(t.lineWidth=i.borderWidth,t.lineJoin="bevel"),e.fullCircles&&function(t,e,i){var{x:a,y:n,startAngle:o,endAngle:r,pixelMargin:s}=e,l=Math.max(e.outerRadius-s,0),s=e.innerRadius+s;let h;for(i&&(e.endAngle=e.startAngle+mt,en(t,e),e.endAngle=r,e.endAngle===e.startAngle&&(e.endAngle+=mt,e.fullCircles--)),t.beginPath(),t.arc(a,n,s,o+mt,o,!0),h=0;h<e.fullCircles;++h)t.stroke();for(t.beginPath(),t.arc(a,n,l,o,o+mt),h=0;h<e.fullCircles;++h)t.stroke()}(t,e,a),a&&en(t,e),nn(t,e),t.stroke())}class rn extends Di{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){var{angle:a,distance:n}=Et(this.getProps(["x","y"],i),{x:t,y:e}),{startAngle:o,endAngle:r,innerRadius:t,outerRadius:e,circumference:i}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i);return(i>=mt||Vt(a,o,r))&&t<=n&&n<=e}getCenterPoint(t){var{x:e,y:i,startAngle:a,endAngle:n,innerRadius:o,outerRadius:t}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),n=(a+n)/2,t=(o+t)/2;return{x:e+Math.cos(n)*t,y:i+Math.sin(n)*t}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const e=this,i=e.options,a=i.offset||0;if(e.pixelMargin="inner"===i.borderAlign?.33:0,e.fullCircles=Math.floor(e.circumference/mt),!(0===e.circumference||e.innerRadius<0||e.outerRadius<0)){if(t.save(),a&&e.circumference<mt){const i=(e.startAngle+e.endAngle)/2;t.translate(Math.cos(i)*a,Math.sin(i)*a)}t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor,function(e,i){if(i.fullCircles){i.endAngle=i.startAngle+mt,nn(e,i);for(let t=0;t<i.fullCircles;++t)e.fill()}isNaN(i.circumference)||(i.endAngle=i.startAngle+i.circumference%mt),nn(e,i),e.fill()}(t,e),on(t,e),t.restore()}}}function sn(t,e,i=e){t.lineCap=U(i.borderCapStyle,e.borderCapStyle),t.setLineDash(U(i.borderDash,e.borderDash)),t.lineDashOffset=U(i.borderDashOffset,e.borderDashOffset),t.lineJoin=U(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=U(i.borderWidth,e.borderWidth),t.strokeStyle=U(i.borderColor,e.borderColor)}function ln(t,e,i){t.lineTo(i.x,i.y)}function hn(t,e,i={}){var a=t.length,{start:n=0,end:o=a-1}=i,{start:r,end:s}=e,t=Math.max(n,r),i=Math.min(o,s);return{count:a,start:t,loop:e.loop,ilen:i<t&&!(n<r&&o<r||s<n&&s<o)?a+i-t:i-t}}function cn(t,e,i,a){const{points:n,options:o}=e,{count:r,start:s,loop:l,ilen:h}=hn(n,i,a),c=o.stepped?Gt:o.tension||"monotone"===o.cubicInterpolationMode?Zt:ln;let d,u,g,{move:f=!0,reverse:p}=a||{};for(d=0;d<=h;++d)u=n[(s+(p?h-d:d))%r],u.skip||(f?(t.moveTo(u.x,u.y),f=!1):c(t,g,u,p,o.stepped),g=u);return l&&(u=n[(s+(p?h:0))%r],c(t,g,u,p,o.stepped)),!!l}function dn(t,e,i,a){const n=e.points,{count:o,start:r,ilen:s}=hn(n,i,a),{move:l=!0,reverse:h}=a||{};let c,d,u,g,f,p,m=0,x=0;var b=t=>(r+(h?s-t:t))%o,v=()=>{g!==f&&(t.lineTo(m,f),t.lineTo(m,g),t.lineTo(m,p))};for(l&&(d=n[b(0)],t.moveTo(d.x,d.y)),c=0;c<=s;++c)if(d=n[b(c)],!d.skip){const e=d.x,i=d.y,a=0|e;a===u?(i<g?g=i:i>f&&(f=i),m=(x*m+e)/++x):(v(),t.lineTo(e,i),u=a,x=0,g=f=i),p=i}v()}function un(t){var e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?cn:dn}rn.id="arc",rn.defaults={borderAlign:"center",borderColor:"#fff",borderRadius:0,borderWidth:2,offset:0,angle:void 0},rn.defaultRoutes={backgroundColor:"backgroundColor"};const gn="function"==typeof Path2D;class fn extends Di{constructor(t){super(),this.animated=!0,this.options=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,t&&Object.assign(this,t)}updateControlPoints(t){var e,i=this.options;!i.tension&&"monotone"!==i.cubicInterpolationMode||i.stepped||this._pointsUpdated||(e=i.spanGaps?this._loop:this._fullLoop,ia(this._points,i,t,e),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=ga(this,this.options.segment))}first(){var t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){var t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(i,a){const n=this,o=n.options,r=i[a],s=n.points,l=ua(n,{property:a,start:r,end:r});if(l.length){const h=[],c=o.stepped?na:o.tension||"monotone"===o.cubicInterpolationMode?oa:aa;let e,t;for(e=0,t=l.length;e<t;++e){const{start:n,end:t}=l[e],d=s[n],u=s[t];if(d!==u){const g=c(d,u,Math.abs((r-d[a])/(u[a]-d[a])),o.stepped);g[a]=i[a],h.push(g)}else h.push(d)}return 1===h.length?h[0]:h}}pathSegment(t,e,i){return un(this)(t,this,e,i)}path(t,e,i){const a=this.segments,n=un(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const r of a)o&=n(t,this,r,{start:e,end:e+i-1});return!!o}draw(t,e,i,a){var n,o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),n=t,o=this,i=i,a=a,(gn&&1===o.segments.length?function(t,e,i,a){let n=e._path;n||(n=e._path=new Path2D,e.path(n,i,a)&&n.closePath()),sn(t,e.options),t.stroke(n)}:function(t,e,i,a){const{segments:n,options:o}=e,r=un(e);for(const s of n)sn(t,o,s.style),t.beginPath(),r(t,e,s,{start:i,end:i+a-1})&&t.closePath(),t.stroke()})(n,o,i,a),t.restore(),this.animated&&(this._pointsUpdated=!1,this._path=void 0))}}function pn(t,e,i,a){var n=t.options,{[i]:i}=t.getProps([i],a);return Math.abs(e-i)<n.radius+n.hitRadius}fn.id="line",fn.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},fn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},fn.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class mn extends Di{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){var a=this.options,{x:n,y:i}=this.getProps(["x","y"],i);return Math.pow(t-n,2)+Math.pow(e-i,2)<Math.pow(a.hitRadius+a.radius,2)}inXRange(t,e){return pn(this,t,"x",e)}inYRange(t,e){return pn(this,t,"y",e)}getCenterPoint(t){var{x:e,y:t}=this.getProps(["x","y"],t);return{x:e,y:t}}size(t){var e=(t=t||this.options||{}).radius||0;return 2*((e=Math.max(e,e&&t.hoverRadius||0))+(e&&t.borderWidth||0))}draw(t){var e=this.options;this.skip||e.radius<.1||(t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,Ut(t,e,this.x,this.y))}getRange(){var t=this.options||{};return t.radius+t.hitRadius}}function xn(t,e){var{x:i,y:a,base:n,width:o,height:e}=t.getProps(["x","y","base","width","height"],e);let r,s,l,h,c;return h=t.horizontal?(c=e/2,r=Math.min(i,n),s=Math.max(i,n),l=a-c,a+c):(c=o/2,r=i-c,s=i+c,l=Math.min(a,n),Math.max(a,n)),{left:r,top:l,right:s,bottom:h}}function bn(t){let e=t.options.borderSkipped;const i={};return e&&(e=t.horizontal?vn(e,"left","right",t.base>t.x):vn(e,"bottom","top",t.base<t.y),i[e]=!0),i}function vn(t,e,i,a){return t=a?_n(t=t===e?i:t===i?e:t,i,e):_n(t,e,i)}function _n(t,e,i){return"start"===t?e:"end"===t?i:t}function yn(t,e,i,a){return t?0:Math.max(Math.min(e,a),i)}function wn(t,e,i,a){var n=null===e,o=null===i,a=t&&!(n&&o)&&xn(t,a);return a&&(n||e>=a.left&&e<=a.right)&&(o||i>=a.top&&i<=a.bottom)}function Mn(t,e){t.rect(e.x,e.y,e.w,e.h)}mn.id="point",mn.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},mn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class kn extends Di{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,t&&Object.assign(this,t)}draw(t){const e=this.options,{inner:i,outer:a}=(h=xn(o=this),c=h.right-h.left,d=h.bottom-h.top,u=c/2,s=d/2,l=(r=o).options.borderWidth,r=bn(r),l=Ae(l),u={t:yn(r.top,l.top,0,s),r:yn(r.right,l.right,0,u),b:yn(r.bottom,l.bottom,0,s),l:yn(r.left,l.left,0,u)},o=function(t,e,i){var{enableBorderRadius:a}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,o=Te(n),i=Math.min(e,i),t=bn(t),n=a||j(n);return{topLeft:yn(!n||t.top||t.left,o.topLeft,0,i),topRight:yn(!n||t.top||t.right,o.topRight,0,i),bottomLeft:yn(!n||t.bottom||t.left,o.bottomLeft,0,i),bottomRight:yn(!n||t.bottom||t.right,o.bottomRight,0,i)}}(o,c/2,d/2),{outer:{x:h.left,y:h.top,w:c,h:d,radius:o},inner:{x:h.left+u.l,y:h.top+u.t,w:c-u.l-u.r,h:d-u.t-u.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(u.t,u.l)),topRight:Math.max(0,o.topRight-Math.max(u.t,u.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(u.b,u.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(u.b,u.r))}}}),n=(u=a.radius).topLeft||u.topRight||u.bottomLeft||u.bottomRight?Jt:Mn;var o,r,s,l,h,c,d,u;t.save(),a.w===i.w&&a.h===i.h||(t.beginPath(),n(t,a),t.clip(),n(t,i),t.fillStyle=e.borderColor,t.fill("evenodd")),t.beginPath(),n(t,i),t.fillStyle=e.backgroundColor,t.fill(),t.restore()}inRange(t,e,i){return wn(this,t,e,i)}inXRange(t,e){return wn(this,t,null,e)}inYRange(t,e){return wn(this,null,t,e)}getCenterPoint(t){var{x:e,y:i,base:a,horizontal:t}=this.getProps(["x","y","base","horizontal"],t);return{x:t?(e+a)/2:e,y:t?i:(i+a)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}kn.id="bar",kn.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,enableBorderRadius:!0,pointStyle:void 0},kn.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Sn=Object.freeze({__proto__:null,ArcElement:rn,LineElement:fn,PointElement:mn,BarElement:kn});function Pn(t){var e;t._decimated&&(e=t._data,delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e}))}function Dn(t){t.data.datasets.forEach(t=>{Pn(t)})}var Cn={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(i,t,w)=>{if(w.enabled){const r=i.width;i.data.datasets.forEach((a,t)=>{var{_data:n,indexAxis:e}=a,h=i.getDatasetMeta(t),o=n||a.data;if("y"!==Ee([e,i.options.indexAxis])&&"line"===h.type){e=i.scales[h.xAxisID];if(("linear"===e.type||"time"===e.type)&&!i.options.parsing){let t,{start:e,count:i}=function(t){var e=t.length;let i,a=0;const{iScale:n}=h,{min:o,max:r,minDefined:s,maxDefined:l}=n.getUserBounds();return s&&(a=Bt(ee(t,n.axis,o).lo,0,e-1)),i=l?Bt(ee(t,n.axis,r).hi+1,a,e)-a:e-a,{start:a,count:i}}(o);if(i<=4*r)Pn(a);else{switch(H(n)&&(a._data=o,delete a.data,Object.defineProperty(a,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),w.algorithm){case"lttb":t=function(a,n,o,t){var e=w.samples||t;if(o<=e)return a.slice(n,n+o);const r=[],s=(o-2)/(e-2);let l=0;const h=n+o-1;let c,d,u,g,f,p=n;for(r[l++]=a[p],c=0;c<e-2;c++){let t,e=0,i=0;const h=Math.floor((c+1)*s)+1+n,_=Math.min(Math.floor((c+2)*s)+1,o)+n,y=_-h;for(t=h;t<_;t++)e+=a[t].x,i+=a[t].y;e/=y,i/=y;var m=Math.floor(c*s)+1+n,x=Math.floor((c+1)*s)+1+n,{x:b,y:v}=a[p];for(u=-1,t=m;t<x;t++)(g=.5*Math.abs((b-e)*(a[t].y-v)-(b-a[t].x)*(i-v)))>u&&(u=g,d=a[t],f=t);r[l++]=d,p=f}return r[l++]=a[h],r}(o,e,i,r);break;case"min-max":t=function(t,e,i,a){let n,o,r,s,l,h,c,d,u,g,f=0,p=0;const m=[],x=e+i-1,b=t[e].x,v=t[x].x-b;for(n=e;n<e+i;++n){r=((o=t[n]).x-b)/v*a,s=o.y;const e=0|r;if(e===l)s<u?(u=s,h=n):s>g&&(g=s,c=n),f=(p*f+o.x)/++p;else{const i=n-1;if(!H(h)&&!H(c)){const e=Math.min(h,c),a=Math.max(h,c);e!==d&&e!==i&&m.push({...t[e],x:f}),a!==d&&a!==i&&m.push({...t[a],x:f})}0<n&&i!==d&&m.push(t[i]),m.push(o),l=e,p=0,u=g=s,h=c=d=n}}return m}(o,e,i,r);break;default:throw new Error(`Unsupported decimation algorithm '${w.algorithm}'`)}a._decimated=t}}}})}else Dn(i)},destroy(t){Dn(t)}};class On{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){var{x:a,y:n,radius:o}=this;return e=e||{start:0,end:mt},t.arc(a,n,o,e.end,e.start,!0),!i.bounds}interpolate(t){var{x:e,y:i,radius:a}=this,t=t.angle;return{x:e+Math.cos(t)*a,y:i+Math.sin(t)*a,angle:t}}}function An(t){const{chart:e,scale:i,index:a,line:n}=t,o=[],r=n.segments,s=n.points,l=function(t,e){const i=[],a=t.getSortedVisibleDatasetMetas();for(let t=0;t<a.length;t++){var n=a[t];if(n.index===e)break;Tn(n)&&i.unshift(n.dataset)}return i}(e,a);l.push(Rn({x:null,y:i.bottom},n));for(let t=0;t<r.length;t++){const e=r[t];for(let t=e.start;t<=e.end;t++)!function(e,i,a){const n=[];for(let t=0;t<a.length;t++){var{first:o,last:r,point:s}=function(t,e,i){const a=t.interpolate(e,i);if(!a)return{};var n=a[i],o=t.segments,r=t.points;let s=!1,l=!1;for(let t=0;t<o.length;t++){const e=o[t],a=r[e.start][i],h=r[e.end][i];if(n>=a&&n<=h){s=n===a,l=n===h;break}}return{first:s,last:l,point:a}}(a[t],i,"x");if(!(!s||o&&r))if(o)n.unshift(s);else if(e.push(s),!r)break}e.push(...n)}(o,s[t],l)}return new fn({points:o,options:{}})}const Tn=t=>"line"===t.type&&!t.hidden;function Rn(t,e){let i=[],a=!1;return i=N(t)?(a=!0,t):function(){const{x:i=null,y:a=null}=t||{},n=e.points,o=[];return e.segments.forEach(t=>{var e=n[t.start],t=n[t.end];null!==a?(o.push({x:e.x,y:a}),o.push({x:t.x,y:a})):null!==i&&(o.push({x:i,y:e.y}),o.push({x:i,y:t.y}))}),o}(),i.length?new fn({points:i,options:{tension:0},_loop:a,_fullLoop:a}):null}function Ln(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function En(i,a,n,t){if(!t){let t=a[i],e=n[i];return"angle"===i&&(t=Ft(t),e=Ft(e)),{property:i,start:t,end:e}}}function In(t,e,i,a){return t&&e?a(t[i],e[i]):t?t[i]:e?e[i]:0}function zn(t,e,i,a){a=e.interpolate(i,a);a&&t.lineTo(a.x,a.y)}function Fn(t,e){const{line:i,target:a,property:n,color:o,scale:r}=e,s=function(t,e,i){const a=t.segments,n=t.points,o=e.points,r=[];for(const t of a){const a=En(i,n[t.start],n[t.end],t.loop);if(e.segments){var s=ua(e,a);for(const e of s){var l=En(i,o[e.start],o[e.end],e.loop),h=da(t,n,l);for(const t of h)r.push({source:t,target:e,start:{[i]:In(a,l,"start",Math.max)},end:{[i]:In(a,l,"end",Math.min)}})}}else r.push({source:t,target:a,start:n[t.start],end:n[t.end]})}return r}(i,a,n);for(const{source:e,target:c,start:d,end:u}of s){const{style:{backgroundColor:s=o}={}}=e;t.save(),t.fillStyle=s,function(t,e,i){var{top:a,bottom:n}=e.chart.chartArea,{property:o,start:e,end:i}=i||{};"x"===o&&(t.beginPath(),t.rect(e,a,i-e,n-a),t.clip())}(t,r,En(n,d,u)),t.beginPath();var l=!!i.pathSegment(t,e);l?t.closePath():zn(t,a,u,n);var h=!!a.pathSegment(t,c,{move:l,reverse:!0}),h=l&&h;h||zn(t,a,d,n),t.closePath(),t.fill(h?"evenodd":"nonzero"),t.restore()}}function Vn(t,e,i){var a=function(t){var e,i,{chart:a,fill:n,line:o}=t;if($(n))return i=n,(a=(e=a).getDatasetMeta(i))&&e.isDatasetVisible(i)?a.dataset:null;if("stack"===n)return An(t);var c,t=(((c=t).scale||{}).getPointPositionForValue?function(){const{scale:t,fill:e}=c,i=t.options,a=t.getLabels().length,n=[],o=i.reverse?t.max:t.min,r=i.reverse?t.min:t.max;let s,l,h;if(h="start"===e?o:"end"===e?r:j(e)?e.value:t.getBaseValue(),i.grid.circular)return l=t.getPointPositionForValue(0,o),new On({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(h)});for(s=0;s<a;++s)n.push(t.getPointPositionForValue(s,h));return n}:function(){const{scale:t={},fill:e}=c;let i,a=null;return"start"===e?a=t.bottom:"end"===e?a=t.top:j(e)?a=t.getPixelForValue(e.value):t.getBasePixel&&(a=t.getBasePixel()),$(a)?{x:(i=t.isHorizontal())?a:null,y:i?null:a}:null})();return t instanceof On?t:Rn(t,o)}(e),{line:n,scale:o,axis:r}=e,s=n.options,e=s.fill,s=s.backgroundColor,{above:e=s,below:s=s}=e||{};a&&n.points.length&&(qt(t,i),function(t,e){var{line:i,target:a,above:n,below:o,area:r,scale:s}=e,e=i._loop?"angle":e.axis;t.save(),"x"===e&&o!==n&&(Ln(t,a,r.top),Fn(t,{line:i,target:a,color:n,scale:s,property:e}),t.restore(),t.save(),Ln(t,a,r.bottom)),Fn(t,{line:i,target:a,color:o,scale:s,property:e}),t.restore()}(t,{line:n,target:a,above:e,below:s,area:i,scale:o,axis:r}),Kt(t))}var Bn={id:"filler",afterDatasetsUpdate(t,e,i){const a=(t.data.datasets||[]).length,n=[];let o,r,s,l;for(r=0;r<a;++r)o=t.getDatasetMeta(r),s=o.dataset,l=null,s&&s.options&&s instanceof fn&&(l={visible:t.isDatasetVisible(r),index:r,fill:function(a,t,e){var i=function(){var t=a.options,e=t.fill;let i=U(e&&e.target,e);return void 0===i&&(i=!!t.backgroundColor),!1!==i&&null!==i&&(!0===i?"origin":i)}();if(j(i))return!isNaN(i.value)&&i;let n=parseFloat(i);return $(n)&&Math.floor(n)===n?("-"!==i[0]&&"+"!==i[0]||(n=t+n),!(n===t||n<0||n>=e)&&n):0<=["origin","start","end","stack"].indexOf(i)&&i}(s,r,a),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:s}),o.$filler=l,n.push(l);for(r=0;r<a;++r)l=n[r],l&&!1!==l.fill&&(l.fill=function(t,e,i){let a=t[e].fill;const n=[e];var o;if(!i)return a;for(;!1!==a&&-1===n.indexOf(a);){if(!$(a))return a;if(!(o=t[a]))return!1;if(o.visible)return a;n.push(a),a=o.fill}return!1}(n,r,i.propagate))},beforeDraw(e,t,i){var a="beforeDraw"===i.drawTime,n=e.getSortedVisibleDatasetMetas(),o=e.chartArea;for(let t=n.length-1;0<=t;--t){const i=n[t].$filler;i&&(i.line.updateControlPoints(o),a&&Vn(e.ctx,i,o))}},beforeDatasetsDraw(e,t,i){if("beforeDatasetsDraw"===i.drawTime){var a=e.getSortedVisibleDatasetMetas();for(let t=a.length-1;0<=t;--t){const i=a[t].$filler;i&&Vn(e.ctx,i,e.chartArea)}}},beforeDatasetDraw(t,e,i){e=e.meta.$filler;e&&!1!==e.fill&&"beforeDatasetDraw"===i.drawTime&&Vn(t.ctx,e,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Wn=(t,e)=>{let{boxHeight:i=e,boxWidth:a=e}=t;return t.usePointStyle&&(i=Math.min(i,e),a=Math.min(a,e)),{boxWidth:a,boxHeight:i,itemHeight:Math.max(e,i)}};class Hn extends Di{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height)}buildLabels(){const i=this,a=i.options.labels||{};let t=K(a.generateLabels,[i.chart],i)||[];a.filter&&(t=t.filter(t=>a.filter(t,i.chart.data))),a.sort&&(t=t.sort((t,e)=>a.sort(t,e,i.chart.data))),i.options.reverse&&t.reverse(),i.legendItems=t}fit(){const i=this,{options:a,ctx:n}=i;if(a.display){var o=a.labels,r=Le(o.font),s=r.size,l=i._computeTitleHeight(),{boxWidth:h,itemHeight:o}=Wn(o,s);let t,e;n.font=r.string,i.isHorizontal()?(t=i.maxWidth,e=i._fitRows(l,s,h,o)+10):(e=i.maxHeight,t=i._fitCols(l,s,h,o)+10),i.width=Math.min(t,a.maxWidth||i.maxWidth),i.height=Math.min(e,a.maxHeight||i.maxHeight)}else i.width=i.height=0}_fitRows(t,i,a,n){const{ctx:o,maxWidth:r,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],h=this.lineWidths=[0],c=n+s;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,g=-c;return this.legendItems.forEach((t,e)=>{t=a+i/2+o.measureText(t.text).width;(0===e||h[h.length-1]+t+2*s>r)&&(d+=c,h[h.length-(0<e?0:1)]=0,g+=c,u++),l[e]={left:0,top:g,row:u,width:t,height:n},h[h.length-1]+=t+s}),d}_fitCols(t,i,a,n){const{ctx:o,maxHeight:e,options:{labels:{padding:r}}}=this,s=this.legendHitBoxes=[],l=this.columnSizes=[],h=e-t;let c=r,d=0,u=0,g=0,f=0,p=0;return this.legendItems.forEach((t,e)=>{t=a+i/2+o.measureText(t.text).width;0<e&&u+i+2*r>h&&(c+=d+r,l.push({width:d,height:u}),g+=d+r,p++,f=0,d=u=0),d=Math.max(d,t),u+=i+r,s[e]={left:g,top:f,col:p,width:t,height:n},f+=n+r}),c+=d,l.push({width:d,height:u}),c}adjustHitBoxes(){var i=this;if(i.options.display){var a=i._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:r}}}=i;if(this.isHorizontal()){let t=0,e=T(o,i.left+r,i.right-i.lineWidths[t]);for(const s of n)t!==s.row&&(t=s.row,e=T(o,i.left+r,i.right-i.lineWidths[t])),s.top+=i.top+a+r,s.left=e,e+=s.width+r}else{let t=0,e=T(o,i.top+a+r,i.bottom-i.columnSizes[t].height);for(const l of n)l.col!==t&&(t=l.col,e=T(o,i.top+a+r,i.bottom-i.columnSizes[t].height)),l.top=e,l.left+=i.left+r,e+=l.height+r}}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){var t;this.options.display&&(qt(t=this.ctx,this),this._draw(),Kt(t))}_draw(){const d=this,{options:t,columnSizes:u,lineWidths:g,ctx:f}=d,{align:p,labels:m}=t,x=ft.color,b=ra(t.rtl,d.left,d.width),v=Le(m.font),{color:_,padding:y}=m,w=v.size,M=w/2;let k;d.drawTitle(),f.textAlign=b.textAlign("left"),f.textBaseline="middle",f.lineWidth=.5,f.font=v.string;const{boxWidth:S,boxHeight:P,itemHeight:D}=Wn(m,w),C=d.isHorizontal(),O=this._computeTitleHeight();k=C?{x:T(p,d.left+y,d.right-g[0]),y:d.top+y+O,line:0}:{x:d.left+y,y:T(p,d.top+O+y,d.bottom-u[0].height),line:0},sa(d.ctx,t.textDirection);const A=D+y;d.legendItems.forEach((t,e)=>{f.strokeStyle=t.fontColor||_,f.fillStyle=t.fontColor||_;var i,a,n,o,r=f.measureText(t.text).width,s=b.textAlign(t.textAlign||(t.textAlign=m.textAlign)),l=S+w/2+r;let h=k.x,c=k.y;b.setWidth(d.width),C?0<e&&h+l+y>d.right&&(c=k.y+=A,k.line++,h=k.x=T(p,d.left+y,d.right-g[k.line])):0<e&&c+A>d.bottom&&(h=k.x=h+u[k.line].width+y,k.line++,c=k.y=T(p,d.top+O+y,d.bottom-u[k.line].height)),i=b.x(h),a=c,n=t,isNaN(S)||S<=0||isNaN(P)||P<0||(f.save(),o=U(n.lineWidth,1),f.fillStyle=U(n.fillStyle,x),f.lineCap=U(n.lineCap,"butt"),f.lineDashOffset=U(n.lineDashOffset,0),f.lineJoin=U(n.lineJoin,"miter"),f.lineWidth=o,f.strokeStyle=U(n.strokeStyle,x),f.setLineDash(U(n.lineDash,[])),m.usePointStyle?(r={radius:S*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:o},e=b.xPlus(i,S/2),Ut(f,r,e,a+M)):(a=a+Math.max((w-P)/2,0),i=b.leftForLtr(i,S),n=Te(n.borderRadius),f.beginPath(),Object.values(n).some(t=>0!==t)?Jt(f,{x:i,y:a,w:S,h:P,radius:n}):f.rect(i,a,S,P),f.fill(),0!==o&&f.stroke()),f.restore()),h=R(s,h+S+M,d.right),o=b.x(h),s=c,t=t,Qt(f,t.text,o,s+D/2,v,{strikethrough:t.hidden,textAlign:t.textAlign}),C?k.x+=l+y:k.y+=A}),la(d.ctx,t.textDirection)}drawTitle(){const a=this,n=a.options,o=n.title,r=Le(o.font),s=Re(o.padding);if(o.display){const h=ra(n.rtl,a.left,a.width),c=a.ctx,d=o.position,u=r.size/2,g=s.top+u;let t,e=a.left,i=a.width;if(this.isHorizontal())i=Math.max(...a.lineWidths),t=a.top+g,e=T(n.align,e,a.right-i);else{const o=a.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);t=g+T(n.align,a.top,a.bottom-o-n.labels.padding-a._computeTitleHeight())}var l=T(d,e,e+i);c.textAlign=h.textAlign(f(d)),c.textBaseline="middle",c.strokeStyle=o.color,c.fillStyle=o.color,c.font=r.string,Qt(c,o.text,l,t,r)}}_computeTitleHeight(){var t=this.options.title,e=Le(t.font),i=Re(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,a,n;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(n=this.legendHitBoxes,i=0;i<n.length;++i)if(t>=(a=n[i]).left&&t<=a.left+a.width&&e>=a.top&&e<=a.top+a.height)return this.legendItems[i];return null}handleEvent(t){var e,i,a,n=this,o=n.options;("mousemove"===(a=t.type)&&(o.onHover||o.onLeave)||o.onClick&&("click"===a||"mouseup"===a))&&(e=n._getLegendItemAt(t.x,t.y),"mousemove"===t.type?(a=null!==(i=n._hoveredItem)&&null!==e&&i.datasetIndex===e.datasetIndex&&i.index===e.index,i&&!a&&K(o.onLeave,[t,i,n],n),(n._hoveredItem=e)&&!a&&K(o.onHover,[t,e,n],n)):e&&K(o.onClick,[t,e,n],n))}}var Nn={id:"legend",_element:Hn,start(t,e,i){var a=t.legend=new Hn({ctx:t.ctx,options:i,chart:t});Ye.configure(t,a,i),Ye.addBox(t,a)},stop(t){Ye.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const a=t.legend;Ye.configure(t,a,i),a.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const a=e.datasetIndex,n=i.chart;n.isDatasetVisible(a)?(n.hide(a),e.hidden=!0):(n.show(a),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const a=t.data.datasets,{labels:{usePointStyle:n,pointStyle:o,textAlign:r,color:s}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{var e=t.controller.getStyle(n?0:void 0),i=Re(e.borderWidth);return{text:a[t.index].label,fillStyle:e.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:(i.width+i.height)/4,strokeStyle:e.borderColor,pointStyle:o||e.pointStyle,rotation:e.rotation,textAlign:r||e.textAlign,borderRadius:0,datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class jn extends Di{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){var i=this,a=i.options;i.left=0,i.top=0,a.display?(i.width=i.right=t,i.height=i.bottom=e,e=N(a.text)?a.text.length:1,i._padding=Re(a.padding),a=e*Le(a.font).lineHeight+i._padding.height,i.isHorizontal()?i.height=a:i.width=a):i.width=i.height=i.right=i.bottom=0}isHorizontal(){var t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){var{top:e,left:i,bottom:a,right:n,options:o}=this,r=o.align;let s,l,h,c=0;return s=this.isHorizontal()?(l=T(r,i,n),h=e+t,n-i):(c="left"===o.position?(l=i+t,h=T(r,a,e),-.5*pt):(l=n-t,h=T(r,e,a),.5*pt),a-e),{titleX:l,titleY:h,maxWidth:s,rotation:c}}draw(){var t,e,i,a,n,o=this.ctx,r=this.options;r.display&&(n=(t=Le(r.font)).lineHeight/2+this._padding.top,{titleX:e,titleY:i,maxWidth:a,rotation:n}=this._drawArgs(n),Qt(o,r.text,0,0,t,{color:r.color,maxWidth:a,rotation:n,textAlign:f(r.align),textBaseline:"middle",translation:[e,i]}))}}var $n={id:"title",_element:jn,start(t,e,i){var a;a=t,t=i,i=new jn({ctx:a.ctx,options:t,chart:a}),Ye.configure(a,i,t),Ye.addBox(a,i),a.titleBlock=i},stop(t){var e=t.titleBlock;Ye.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const a=t.titleBlock;Ye.configure(t,a,i),a.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Yn={average(t){if(!t.length)return!1;let e,i,a=0,n=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();a+=t.x,n+=t.y,++o}}return{x:a/o,y:n/o}},nearest(t,e){if(!t.length)return!1;let i,a,n,o=e.x,r=e.y,s=Number.POSITIVE_INFINITY;for(i=0,a=t.length;i<a;++i){const a=t[i].element;if(a&&a.hasValue()){const t=It(e,a.getCenterPoint());t<s&&(s=t,n=a)}}if(n){const t=n.tooltipPosition();o=t.x,r=t.y}return{x:o,y:r}}};function Un(t,e){return e&&(N(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Xn(t){return("string"==typeof t||t instanceof String)&&-1<t.indexOf("\n")?t.split("\n"):t}function qn(t,e){const i=t._chart.ctx,{body:a,footer:n,title:o}=t,{boxWidth:r,boxHeight:s}=e,l=Le(e.bodyFont),h=Le(e.titleFont),c=Le(e.footerFont),d=o.length,u=n.length,g=a.length,f=Re(e.padding);let p=f.height,m=0,x=a.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);x+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*h.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),x&&(p+=g*(e.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(x-g)*l.lineHeight+(x-1)*e.bodySpacing),u&&(p+=e.footerMarginTop+u*c.lineHeight+(u-1)*e.footerSpacing);let b=0;const v=function(t){m=Math.max(m,i.measureText(t).width+b)};return i.save(),i.font=h.string,G(t.title,v),i.font=l.string,G(t.beforeBody.concat(t.afterBody),v),b=e.displayColors?r+2:0,G(a,t=>{G(t.before,v),G(t.lines,v),G(t.after,v)}),b=0,i.font=c.string,G(t.footer,v),i.restore(),m+=f.width,{width:m,height:p}}function Kn(i,t,a){var e=t.yAlign||function(){var{y:t,height:e}=a;return t<e/2?"top":t>i.height-e/2?"bottom":"center"}();return{xAlign:t.xAlign||function(n,o,r,t){var{x:e,width:i}=r,{width:a,chartArea:{left:s,right:l}}=n;let h="center";return"center"===t?h=e<=(s+l)/2?"left":"right":e<=i/2?h="left":a-i/2<=e&&(h="right"),function(t){var{x:e,width:i}=r,a=o.caretSize+o.caretPadding;return"left"===t&&e+i+a>n.width||"right"===t&&e-i-a<0}(h)&&(h="center"),h}(i,t,a,e),yAlign:e}}function Gn(t,i,e,a){var{caretSize:n,caretPadding:o,cornerRadius:t}=t,{xAlign:r,yAlign:s}=e,l=n+o,t=t+o;let h=function(){let{x:t,width:e}=i;return"right"===r?t-=e:"center"===r&&(t-=e/2),t}();o=function(){let{y:t,height:e}=i;return"top"===s?t+=l:t-="bottom"===s?e+l:e/2,t}();return"center"===s?"left"===r?h+=l:"right"===r&&(h-=l):"left"===r?h-=t:"right"===r&&(h+=t),{x:Bt(h,0,a.width-i.width),y:Bt(o,0,a.height-i.height)}}function Zn(t,e,i){i=Re(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.right:t.x+i.left}function Qn(t){return Un([],Xn(t))}function Jn(t,e){e=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return e?t.override(e):t}class to extends Di{constructor(t){super(),this.opacity=0,this._active=[],this._chart=t._chart,this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){var t=this._cachedAnimations;if(t)return t;var e=this._chart,t=this.options.setContext(this.getContext()),e=t.enabled&&e.options.animation&&t.animations,t=new pi(this._chart,e);return e._cacheable&&(this._cachedAnimations=Object.freeze(t)),t}getContext(){var t,e;return this.$context||(this.$context=(t=this._chart.getContext(),e=this._tooltipItems,Object.assign(Object.create(t),{tooltip:this,tooltipItems:e,type:"tooltip"})))}getTitle(t,e){const{callbacks:i}=e,a=i.beforeTitle.apply(this,[t]),n=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);t=Un(t=[],Xn(a));return t=Un(t,Xn(n)),t=Un(t,Xn(o))}getBeforeBody(t,e){return Qn(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const a=this,{callbacks:n}=e,o=[];return G(t,t=>{const e={before:[],lines:[],after:[]},i=Jn(n,t);Un(e.before,Xn(i.beforeLabel.call(a,t))),Un(e.lines,i.label.call(a,t)),Un(e.after,Xn(i.afterLabel.call(a,t))),o.push(e)}),o}getAfterBody(t,e){return Qn(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,a=i.beforeFooter.apply(this,[t]),n=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);t=Un(t=[],Xn(a));return t=Un(t,Xn(n)),t=Un(t,Xn(o))}_createItems(a){const i=this,t=i._active,n=i._chart.data,o=[],r=[],s=[];let e,l,h=[];for(e=0,l=t.length;e<l;++e)h.push(function(t,e){const{element:i,datasetIndex:a,index:n}=e,o=t.getDatasetMeta(a).controller,{label:r,value:s}=o.getLabelAndValue(n);return{chart:t,label:r,parsed:o.getParsed(n),raw:t.data.datasets[a].data[n],formattedValue:s,dataset:o.getDataset(),dataIndex:n,datasetIndex:a,element:i}}(i._chart,t[e]));return a.filter&&(h=h.filter((t,e,i)=>a.filter(t,e,i,n))),a.itemSort&&(h=h.sort((t,e)=>a.itemSort(t,e,n))),G(h,t=>{const e=Jn(a.callbacks,t);o.push(e.labelColor.call(i,t)),r.push(e.labelPointStyle.call(i,t)),s.push(e.labelTextColor.call(i,t))}),i.labelColors=o,i.labelPointStyles=r,i.labelTextColors=s,i.dataPoints=h,h}update(t,e){const i=this,a=i.options.setContext(i.getContext()),n=i._active;let o,r=[];if(n.length){const t=Yn[a.position].call(i,n,i._eventPosition);r=i._createItems(a),i.title=i.getTitle(r,a),i.beforeBody=i.getBeforeBody(r,a),i.body=i.getBody(r,a),i.afterBody=i.getAfterBody(r,a),i.footer=i.getFooter(r,a);const e=i._size=qn(i,a),s=Object.assign({},t,e),l=Kn(i._chart,a,s),h=Gn(a,s,l,i._chart);i.xAlign=l.xAlign,i.yAlign=l.yAlign,o={opacity:1,x:h.x,y:h.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==i.opacity&&(o={opacity:0});i._tooltipItems=r,i.$context=void 0,o&&i._resolveAnimations().update(i,o),t&&a.external&&a.external.call(i,{chart:i._chart,tooltip:i,replay:e})}drawCaret(t,e,i,a){a=this.getCaretPosition(t,i,a);e.lineTo(a.x1,a.y1),e.lineTo(a.x2,a.y2),e.lineTo(a.x3,a.y3)}getCaretPosition(t,e,i){var{xAlign:a,yAlign:n}=this,{cornerRadius:o,caretSize:r}=i,{x:s,y:i}=t,{width:t,height:e}=e;let l,h,c,d,u,g;return"center"===n?(u=i+e/2,g="left"===a?(l=s,h=l-r,d=u+r,u-r):(l=s+t,h=l+r,d=u-r,u+r),c=l):(h="left"===a?s+o+r:"right"===a?s+t-o-r:this.caretX,c="top"===n?(d=i,u=d-r,l=h-r,h+r):(d=i+e,u=d+r,l=h+r,h-r),g=d),{x1:l,x2:h,x3:c,y1:d,y2:u,y3:g}}drawTitle(t,e,i){var a=this.title,n=a.length;let o,r,s;if(n){const l=ra(i.rtl,this.x,this.width);for(t.x=Zn(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=Le(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,s=0;s<n;++s)e.fillText(a[s],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r,s+1===n&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,a,n){const o=this,r=o.labelColors[i],s=o.labelPointStyles[i],{boxHeight:l,boxWidth:h}=n,c=Le(n.bodyFont),d=Zn(o,"left",n),u=a.x(d),g=l<c.lineHeight?(c.lineHeight-l)/2:0,f=e.y+g;if(n.usePointStyle){const e={radius:Math.min(h,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},i=a.leftForLtr(u,h)+h/2,o=f+l/2;t.strokeStyle=n.multiKeyBackground,t.fillStyle=n.multiKeyBackground,Ut(t,e,i,o),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Ut(t,e,i,o)}else{t.lineWidth=r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const e=a.leftForLtr(u,h),i=a.leftForLtr(a.xPlus(u,1),h-2),o=Te(r.borderRadius);Object.values(o).some(t=>0!==t)?(t.beginPath(),t.fillStyle=n.multiKeyBackground,Jt(t,{x:e,y:f,w:h,h:l,radius:o}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),Jt(t,{x:i,y:f+1,w:h-2,h:l-2,radius:o}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,f,h,l),t.strokeRect(e,f,h,l),t.fillStyle=r.backgroundColor,t.fillRect(i,f+1,h-2,l-2))}t.fillStyle=o.labelTextColors[i]}drawBody(e,i,t){const{body:a}=this,{bodySpacing:n,bodyAlign:o,displayColors:r,boxHeight:s,boxWidth:l}=t,h=Le(t.bodyFont);let c=h.lineHeight,d=0;const u=ra(t.rtl,this.x,this.width),g=function(t){i.fillText(t,u.x(e.x+d),e.y+c/2),e.y+=c+n},f=u.textAlign(o);let p,m,x,b,v,_,y;for(i.textAlign=o,i.textBaseline="middle",i.font=h.string,e.x=Zn(this,f,t),i.fillStyle=t.bodyColor,G(this.beforeBody,g),d=r&&"right"!==f?"center"===o?l/2+1:l+2:0,b=0,_=a.length;b<_;++b){for(p=a[b],m=this.labelTextColors[b],i.fillStyle=m,G(p.before,g),x=p.lines,r&&x.length&&(this._drawColorBox(i,e,b,u,t),c=Math.max(h.lineHeight,s)),v=0,y=x.length;v<y;++v)g(x[v]),c=h.lineHeight;G(p.after,g)}d=0,c=h.lineHeight,G(this.afterBody,g),e.y-=n}drawFooter(t,e,i){var a=this.footer,n=a.length;let o,r;if(n){const s=ra(i.rtl,this.x,this.width);for(t.x=Zn(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=s.textAlign(i.footerAlign),e.textBaseline="middle",o=Le(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,r=0;r<n;++r)e.fillText(a[r],s.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,a){var{xAlign:n,yAlign:o}=this,{x:r,y:s}=t,{width:l,height:h}=i,c=a.cornerRadius;e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.beginPath(),e.moveTo(r+c,s),"top"===o&&this.drawCaret(t,e,i,a),e.lineTo(r+l-c,s),e.quadraticCurveTo(r+l,s,r+l,s+c),"center"===o&&"right"===n&&this.drawCaret(t,e,i,a),e.lineTo(r+l,s+h-c),e.quadraticCurveTo(r+l,s+h,r+l-c,s+h),"bottom"===o&&this.drawCaret(t,e,i,a),e.lineTo(r+c,s+h),e.quadraticCurveTo(r,s+h,r,s+h-c),"center"===o&&"left"===n&&this.drawCaret(t,e,i,a),e.lineTo(r,s+c),e.quadraticCurveTo(r,s,r+c,s),e.closePath(),e.fill(),0<a.borderWidth&&e.stroke()}_updateAnimationTarget(t){const e=this,i=e._chart,a=e.$animations,n=a&&a.x,o=a&&a.y;if(n||o){const a=Yn[t.position].call(e,e._active,e._eventPosition);var r,s;a&&(r=e._size=qn(e,t),s=Gn(t,s=Object.assign({},a,e._size),t=Kn(i,t,s),i),n._to===s.x&&o._to===s.y||(e.xAlign=t.xAlign,e.yAlign=t.yAlign,e.width=r.width,e.height=r.height,e.caretX=a.x,e.caretY=a.y,e._resolveAnimations().update(e,s)))}}draw(t){var e=this,i=e.options.setContext(e.getContext());let a=e.opacity;if(a){e._updateAnimationTarget(i);const r={width:e.width,height:e.height},s={x:e.x,y:e.y};a=Math.abs(a)<.001?0:a;var n=Re(i.padding),o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;i.enabled&&o&&(t.save(),t.globalAlpha=a,e.drawBackground(s,t,r,i),sa(t,i.textDirection),s.y+=n.top,e.drawTitle(s,t,i),e.drawBody(s,t,i),e.drawFooter(s,t,i),la(t,i.textDirection),t.restore())}}getActiveElements(){return this._active||[]}setActiveElements(t,e){const a=this,i=a._active,n=t.map(({datasetIndex:t,index:e})=>{var i=a._chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),o=!Z(i,n),r=a._positionChanged(n,e);(o||r)&&(a._active=n,a._eventPosition=e,a.update(!0))}handleEvent(t,e){var i=this.options,a=this._active||[];let n,o=[];"mouseout"!==t.type&&(o=this._chart.getElementsAtEventForMode(t,i.mode,i,e),i.reverse&&o.reverse());var r=this._positionChanged(o,t);return(n=e||!Z(o,a)||r)&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),n}_positionChanged(t,e){var{caretX:i,caretY:a,options:n}=this,e=Yn[n.position].call(this,t,e);return!1!==e&&(i!==e.x||a!==e.y)}}to.positioners=Yn;be={id:"tooltip",_element:to,positioners:Yn,afterInit(t,e,i){i&&(t.tooltip=new to({_chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip,i={tooltip:e};!1!==t.notifyPlugins("beforeTooltipDraw",i)&&(e&&e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i))},afterEvent(t,e){var i;t.tooltip&&(i=e.replay,t.tooltip.handleEvent(e.event,i)&&(e.changed=!0))},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:t,title(t){if(0<t.length){var e=t[0],i=e.chart.data.labels,t=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(0<t&&e.dataIndex<t)return i[e.dataIndex]}return""},afterTitle:t,beforeBody:t,beforeLabel:t,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");t=t.formattedValue;return H(t)||(e+=t),e},labelColor(t){t=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){t=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:t,afterBody:t,beforeFooter:t,footer:t,afterFooter:t}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},$n=Object.freeze({__proto__:null,Decimation:Cn,Filler:Bn,Legend:Nn,Title:$n,Tooltip:be});class eo extends Vi{constructor(t){super(t),this._startValue=void 0,this._valueRange=0}parse(t,e){if(H(t))return null;var i,a,n,o,r,s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:(n=U(e,a=t),-1===(r=(i=s).indexOf(a))?(o=n,"string"==typeof(t=a)?i.push(t)-1:isNaN(t)?null:o):r!==i.lastIndexOf(a)?n:r),s=s.length-1,null===e?null:Bt(Math.round(e),0,s)}determineDataLimits(){var{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:a}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(a=this.getLabels().length-1)),this.min=i,this.max=a}buildTicks(){const e=this.min,i=this.max,t=this.options.offset,a=[];let n=this.getLabels();n=0===e&&i===n.length-1?n:n.slice(e,i+1),this._valueRange=Math.max(n.length-(t?0:1),1),this._startValue=this.min-(t?.5:0);for(let t=e;t<=i;t++)a.push({value:t});return a}getLabelForValue(t){var e=this.getLabels();return 0<=t&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return null===(t="number"!=typeof t?this.parse(t):t)?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}eo.id="category",eo.defaults={ticks:{callback:eo.prototype.getLabelForValue}};class io extends Vi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return H(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const t=this,{beginAtZero:e,stacked:i}=t.options,{minDefined:a,maxDefined:n}=t.getUserBounds();let{min:o,max:r}=t;var s=t=>o=a?o:t,l=t=>r=n?r:t;if(e||i){const t=kt(o),e=kt(r);t<0&&e<0?l(0):0<t&&0<e&&s(0)}o===r&&(l(r+1),e||s(o-1)),t.min=o,t.max=r}getTickLimit(){let t,{maxTicksLimit:e,stepSize:i}=this.options.ticks;return i?t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1:(t=this.computeTickLimit(),e=e||11),e&&(t=Math.min(e,t)),t}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){var M=this,k=M.options,S=k.ticks,P=M.getTickLimit(),P=Math.max(2,P);const t=function(){const t=[],{step:e,min:i,max:a,precision:n,count:o,maxTicks:r,maxDigits:s,horizontal:l}={maxTicks:P,min:k.min,max:k.max,precision:S.precision,step:S.stepSize,count:S.count,maxDigits:M._maxDigits(),horizontal:M.isHorizontal()},h=e||1,c=r-1,{min:d,max:u}=M._range||M,g=!H(i),f=!H(a),p=!H(o),m=(u-d)/s;let x,b,v,_,y=St((u-d)/c/h)*h;if(y<1e-14&&!g&&!f)return[{value:d},{value:u}];_=Math.ceil(u/y)-Math.floor(d/y),_>c&&(y=St(_*y/c/h)*h),H(n)||(x=Math.pow(10,n),y=Math.ceil(y*x)/x),b=Math.floor(d/y)*y,v=Math.ceil(u/y)*y,g&&f&&e&&Ot((a-i)/e,y/1e3)?(_=Math.min((a-i)/y,r),y=(a-i)/_,b=i,v=a):p?(b=g?i:b,v=f?a:v,_=o-1,y=(v-b)/_):(_=(v-b)/y,_=Ct(_,Math.round(_),y/1e3)?Math.round(_):Math.ceil(_)),x=Math.pow(10,H(n)?Lt(y):n),b=Math.round(b*x)/x,v=Math.round(v*x)/x;let w=0;for(g&&(t.push({value:i}),b<=i&&w++,Ct(Math.round((b+w*y)*x)/x,i,m*(l?(""+i).length:1))&&w++);w<_;++w)t.push({value:Math.round((b+w*y)*x)/x});return f?Ct(t[t.length-1].value,a,m*(l?(""+a).length:1))?t[t.length-1].value=a:t.push({value:a}):t.push({value:v}),t}();return"ticks"===k.bounds&&At(t,M,"value"),k.reverse?(t.reverse(),M.start=M.max,M.end=M.min):(M.start=M.min,M.end=M.max),t}configure(){const t=this,e=t.ticks;let i=t.min,a=t.max;if(super.configure(),t.options.offset&&e.length){const t=(a-i)/Math.max(e.length-1,1)/2;i-=t,a+=t}t._startValue=i,t._endValue=a,t._valueRange=a-i}getLabelForValue(t){return Oi(t,this.chart.options.locale)}}class ao extends io{determineDataLimits(){var{min:t,max:e}=this.getMinMax(!0);this.min=$(t)?t:0,this.max=$(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){if(this.isHorizontal())return Math.ceil(this.width/40);var t=this._resolveTickFontOptions(0);return Math.ceil(this.height/t.lineHeight)}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function no(t){return 1==t/Math.pow(10,Math.floor(Mt(t)))}ao.id="linear",ao.defaults={ticks:{callback:Ti.formatters.numeric}};class oo extends Vi{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){e=io.prototype.parse.apply(this,[t,e]);if(0!==e)return $(e)&&0<e?e:null;this._zero=!0}determineDataLimits(){var{min:t,max:e}=this.getMinMax(!0);this.min=$(t)?Math.max(0,t):null,this.max=$(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:i}=this.getUserBounds();let a=this.min,n=this.max;var t=t=>a=e?a:t,o=t=>n=i?n:t,r=(t,e)=>Math.pow(10,Math.floor(Mt(t))+e);a===n&&(a<=0?(t(1),o(10)):(t(r(a,-1)),o(r(n,1)))),a<=0&&t(r(n,-1)),n<=0&&o(r(a,1)),this._zero&&this.min!==this._suggestedMin&&a===r(this.min,0)&&t(r(a,-1)),this.min=a,this.max=n}buildTicks(){const t=this,e=t.options,i=function(t,e){const i=Math.floor(Mt(e.max)),a=Math.ceil(e.max/Math.pow(10,i)),n=[];let o=Y(t.min,Math.pow(10,Math.floor(Mt(e.min)))),r=Math.floor(Mt(o)),s=Math.floor(o/Math.pow(10,r)),l=r<0?Math.pow(10,Math.abs(r)):1;for(;n.push({value:o,major:no(o)}),++s,10===s&&(s=1,++r,l=0<=r?1:l),o=Math.round(s*Math.pow(10,r)*l)/l,r<i||r===i&&s<a;);t=Y(t.max,o);return n.push({value:t,major:no(o)}),n}({min:t._userMin,max:t._userMax},t);return"ticks"===e.bounds&&At(i,t,"value"),e.reverse?(i.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),i}getLabelForValue(t){return void 0===t?"0":Oi(t,this.chart.options.locale)}configure(){var t=this.min;super.configure(),this._startValue=Mt(t),this._valueRange=Mt(this.max)-Mt(t)}getPixelForValue(t){return null===(t=void 0===t||0===t?this.min:t)||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Mt(t)-this._startValue)/this._valueRange)}getValueForPixel(t){t=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+t*this._valueRange)}}function ro(t){var e=t.ticks;if(e.display&&t.display){const t=Re(e.backdropPadding);return U(e.font&&e.font.size,ft.font.size)+t.height}return 0}function so(t,e,i,a,n){return t===a||t===n?{start:e-i/2,end:e+i/2}:t<a||n<t?{start:e-i,end:e}:{start:e,end:e+i}}function lo(e,i,t,a){const{ctx:n}=e;if(t)n.arc(e.xCenter,e.yCenter,i,0,mt);else{var o=e.getPointPosition(0,i);n.moveTo(o.x,o.y);for(let t=1;t<a;t++)o=e.getPointPosition(t,i),n.lineTo(o.x,o.y)}}function ho(t){return Dt(t)?t:0}oo.id="logarithmic",oo.defaults={ticks:{callback:Ti.formatters.logarithmic,major:{enabled:!0}}};class co extends io{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=ro(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2}determineDataLimits(){var{min:t,max:e}=this.getMinMax(!1);this.min=$(t)&&!isNaN(t)?t:0,this.max=$(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/ro(this.options))}generateTickLabels(t){const i=this;io.prototype.generateTickLabels.call(i,t),i._pointLabels=i.getLabels().map((t,e)=>{e=K(i.options.pointLabels.callback,[t,e],i);return e||0===e?e:""})}fit(){var t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={};let a,n,o;const r=[],s=[],l=t.getLabels().length;for(a=0;a<l;a++){const l=t.options.pointLabels.setContext(t.getContext(a));s[a]=l.padding,o=t.getPointPosition(a,t.drawingArea+s[a]);const f=Le(l.font);t.ctx.font=f.string,h=t.ctx,c=f.lineHeight,n=N(d=t._pointLabels[a])?{w:jt(h,h.font,d),h:d.length*c}:{w:h.measureText(d).width,h:c},r[a]=n;const p=t.getIndexAngle(a),m=Rt(p),b=so(m,o.x,n.w,0,180),v=so(m,o.y,n.h,90,270);b.start<e.l&&(e.l=b.start,i.l=p),b.end>e.r&&(e.r=b.end,i.r=p),v.start<e.t&&(e.t=v.start,i.t=p),v.end>e.b&&(e.b=v.end,i.b=p)}var h,c,d,u,g;t._setReductions(t.drawingArea,e,i),t._pointLabelItems=[];const f=t.options,p=ro(f),m=t.getDistanceFromCenterForValue(f.ticks.reverse?t.min:t.max);for(a=0;a<l;a++){const e=0===a?p/2:0,i=t.getPointPosition(a,m+e+s[a]),n=Rt(t.getIndexAngle(a)),o=r[a];u=n,x=o,g=i,90===u||270===u?g.y-=x.h/2:(270<u||u<90)&&(g.y-=x.h);const l=0===(x=n)||180===x?"center":x<180?"left":"right";var x="left"==l?i.x:"center"==l?i.x-o.w/2:i.x-o.w;const c=x+o.w;t._pointLabelItems[a]={x:i.x,y:i.y,textAlign:l,left:x,top:i.y,right:c,bottom:i.y+o.h}}}(this):this.setCenterPoint(0,0,0,0)}_setReductions(t,e,i){var a=e.l/Math.sin(i.l),n=Math.max(e.r-this.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),i=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b),a=ho(a),n=ho(n),o=ho(o),i=ho(i);this.drawingArea=Math.max(t/2,Math.min(Math.floor(t-(a+n)/2),Math.floor(t-(o+i)/2))),this.setCenterPoint(a,n,o,i)}setCenterPoint(t,e,i,a){var n=this,e=n.width-e-n.drawingArea,t=t+n.drawingArea,i=i+n.drawingArea,a=n.height-n.paddingTop-a-n.drawingArea;n.xCenter=Math.floor((t+e)/2+n.left),n.yCenter=Math.floor((i+a)/2+n.top+n.paddingTop)}getIndexAngle(t){return Ft(t*(mt/this.getLabels().length)+Tt(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(H(t))return NaN;var e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(H(t))return NaN;t/=this.drawingArea/(this.max-this.min);return this.options.reverse?this.max-t:this.min+t}getPointPosition(t,e){t=this.getIndexAngle(t)-_t;return{x:Math.cos(t)*e+this.xCenter,y:Math.sin(t)*e+this.yCenter,angle:t}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){var{left:e,top:i,right:a,bottom:t}=this._pointLabelItems[t];return{left:e,top:i,right:a,bottom:t}}drawBackground(){var{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),lo(this,this.getDistanceFromCenterForValue(this._endValue),e,this.getLabels().length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const i=this,t=i.ctx,e=i.options,{angleLines:a,grid:n}=e,o=i.getLabels().length;let r,s,l;if(e.pointLabels.display&&function(e,i){const{ctx:a,options:{pointLabels:n}}=e;for(let t=i-1;0<=t;t--){const i=n.setContext(e.getContext(t)),o=Le(i.font),{x:r,y:s,textAlign:l,left:h,top:c,right:d,bottom:u}=e._pointLabelItems[t],{backdropColor:g}=i;if(!H(g)){const e=Re(i.backdropPadding);a.fillStyle=g,a.fillRect(h-e.left,c-e.top,d-h+e.width,u-c+e.height)}Qt(a,e._pointLabels[t],r,s+o.lineHeight/2,o,{color:i.color,textAlign:l,textBaseline:"middle"})}}(i,o),n.display&&i.ticks.forEach((t,e)=>{0!==e&&(s=i.getDistanceFromCenterForValue(t.value),e=n.setContext(i.getContext(e-1)),function(t,e,i,a){const n=t.ctx,o=e.circular,{color:r,lineWidth:s}=e;!o&&!a||!r||!s||i<0||(n.save(),n.strokeStyle=r,n.lineWidth=s,n.setLineDash(e.borderDash),n.lineDashOffset=e.borderDashOffset,n.beginPath(),lo(t,i,o,a),n.closePath(),n.stroke(),n.restore())}(i,e,s,o))}),a.display){for(t.save(),r=i.getLabels().length-1;0<=r;r--){const n=a.setContext(i.getContext(r)),{color:o,lineWidth:h}=n;h&&o&&(t.lineWidth=h,t.strokeStyle=o,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=i.getDistanceFromCenterForValue(e.ticks.reverse?i.min:i.max),l=i.getPointPosition(r,s),t.beginPath(),t.moveTo(i.xCenter,i.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const r=this,s=r.ctx,l=r.options,h=l.ticks;if(h.display){var t=r.getIndexAngle(0);let n,o;s.save(),s.translate(r.xCenter,r.yCenter),s.rotate(t),s.textAlign="center",s.textBaseline="middle",r.ticks.forEach((t,e)=>{if(0!==e||l.reverse){var i=h.setContext(r.getContext(e)),a=Le(i.font);if(n=r.getDistanceFromCenterForValue(r.ticks[e].value),i.showLabelBackdrop){o=s.measureText(t.label).width,s.fillStyle=i.backdropColor;const r=Re(i.backdropPadding);s.fillRect(-o/2-r.left,-n-a.size/2-r.top,o+r.width,a.size+r.height)}Qt(s,t.label,0,-n,a,{color:i.color})}}),s.restore()}}drawTitle(){}}co.id="radialLinear",co.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Ti.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5}},co.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};const uo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!(co.descriptors={angleLines:{_fallback:"grid"}}),size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},go=Object.keys(uo);function fo(t,e){return t-e}function po(t,e){if(H(e))return null;const i=t._adapter,{parser:a,round:n,isoWeekday:o}=t._parseOpts;let r=e;return"function"==typeof a&&(r=a(r)),$(r)||(r="string"==typeof a?i.parse(r,a):i.parse(r)),null===r?null:(n&&(r="week"!==n||!Dt(o)&&!0!==o?i.startOf(r,n):i.startOf(r,"isoWeek",o)),+r)}function mo(e,i,a,n){const o=go.length;for(let t=go.indexOf(e);t<o-1;++t){const e=uo[go[t]],o=e.steps||Number.MAX_SAFE_INTEGER;if(e.common&&Math.ceil((a-i)/(o*e.size))<=n)return go[t]}return go[o-1]}function xo(t,e,i){var a,n;i?i.length&&({lo:a,hi:n}=te(i,e),t[i[a]>=e?i[a]:i[n]]=!0):t[e]=!0}function bo(t,e,i){const a=[],n={},o=e.length;let r,s;for(r=0;r<o;++r)s=e[r],n[s]=r,a.push({value:s,major:!1});return 0!==o&&i?function(t,e,i,a){const n=t._adapter,o=+n.startOf(e[0].value,a),r=e[e.length-1].value;let s,l;for(s=o;s<=r;s=+n.add(s,1,a))0<=(l=i[s])&&(e[l].major=!0);return e}(t,a,n,i):a}class vo extends Vi{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),a=this._adapter=new Na._date(t.adapters.date);it(i.displayFormats,a.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:po(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:a,max:n,minDefined:o,maxDefined:r}=this.getUserBounds();function s(t){o||isNaN(t.min)||(a=Math.min(a,t.min)),r||isNaN(t.max)||(n=Math.max(n,t.max))}o&&r||(s(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||s(this.getMinMax(!1))),a=$(a)&&!isNaN(a)?a:+e.startOf(Date.now(),i),n=$(n)&&!isNaN(n)?n:+e.endOf(Date.now(),i)+1,this.min=Math.min(a,n-1),this.max=Math.max(a+1,n)}_getLabelBounds(){var t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){var t=this,e=t.options,i=e.time,a=e.ticks,n="labels"===a.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&n.length&&(t.min=t._userMin||n[0],t.max=t._userMax||n[n.length-1]);const o=t.min,r=ae(n,o,t.max);return t._unit=i.unit||(a.autoSkip?mo(i.minUnit,t.min,t.max,t._getLabelCapacity(o)):function(e,i,a,n,o){for(let t=go.length-1;t>=go.indexOf(a);t--){const a=go[t];if(uo[a].common&&e._adapter.diff(o,n,a)>=i-1)return a}return go[a?go.indexOf(a):0]}(t,r.length,i.minUnit,t.min,t.max)),t._majorUnit=a.major.enabled&&"year"!==t._unit?function(i){for(let t=go.indexOf(i)+1,e=go.length;t<e;++t)if(uo[go[t]].common)return go[t]}(t._unit):void 0,t.initOffsets(n),e.reverse&&r.reverse(),bo(t,r,t._majorUnit)}initOffsets(t){let e,i,a=0,n=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),a=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),n=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);t=t.length<3?.5:.25;a=Bt(a,0,t),n=Bt(n,0,t),this._offsets={start:a,end:n,factor:1/(a+1+n)}}_generate(){const t=this._adapter,e=this.min,i=this.max,a=this.options,n=a.time,o=n.unit||mo(n.minUnit,e,i,this._getLabelCapacity(e)),r=U(n.stepSize,1),s="week"===o&&n.isoWeekday,l=Dt(s)||!0===s,h={};let c,d,u=e;if(l&&(u=+t.startOf(u,"isoWeek",s)),u=+t.startOf(u,l?"day":o),t.diff(i,e,o)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+o);var g="data"===a.ticks.source&&this.getDataTimestamps();for(c=u,d=0;c<i;c=+t.add(c,r,o),d++)xo(h,c,g);return c!==i&&"ticks"!==a.bounds&&1!==d||xo(h,c,g),Object.keys(h).sort((t,e)=>t-e).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,a){var n=this.options,o=n.time.displayFormats,r=this._unit,s=this._majorUnit,l=r&&o[r],r=s&&o[s],o=i[e],o=s&&r&&o&&o.major,l=this._adapter.format(t,a||(o?r:l)),n=n.ticks.callback;return n?K(n,[l,e,i],this):l}generateTickLabels(t){let e,i,a;for(e=0,i=t.length;e<i;++e)a=t[e],a.label=this._tickFormatFunction(a.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){var e=this._offsets,t=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+t)*e.factor)}getValueForPixel(t){var e=this._offsets,e=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+e*(this.max-this.min)}_getLabelSize(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,a=Tt(this.isHorizontal()?e.maxRotation:e.minRotation),t=Math.cos(a),e=Math.sin(a),a=this._resolveTickFontOptions(0).size;return{w:i*t+a*e,h:i*e+a*t}}_getLabelCapacity(t){var e=this.options.time,i=e.displayFormats,i=i[e.unit]||i.millisecond,i=this._tickFormatFunction(t,0,bo(this,[t],this._majorUnit),i),i=this._getLabelSize(i),i=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return 0<i?i:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(t=0,e=a.length;t<e;++t)i=i.concat(a[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;var a=this.getLabels();for(e=0,i=a.length;e<i;++e)t.push(po(this,a[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return se(t.sort(fo))}}function _o(t,e,i){let a,n,o,r;if(i)a=Math.floor(e),n=Math.ceil(e),o=t[a],r=t[n];else{const i=te(t,e);o=i.lo,r=i.hi,a=t[o],n=t[r]}t=n-a;return t?o+(r-o)*(e-a)/t:o}vo.id="time",vo.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class yo extends vo{constructor(t){super(t),this._table=[],this._maxIndex=void 0}initOffsets(){var t=this._getTimestampsForTable();this._table=this.buildLookupTable(t),this._maxIndex=this._table.length-1,super.initOffsets(t)}buildLookupTable(t){var{min:e,max:i}=this;if(!t.length)return[{time:e,pos:0},{time:i,pos:1}];const a=[e];let n,o,r;for(n=0,o=t.length;n<o;++n)e<(r=t[n])&&r<i&&a.push(r);return a.push(i),a}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getPixelForValue(t,e){var i=this._offsets,t=this._normalized&&0<this._maxIndex&&!H(e)?e/this._maxIndex:this.getDecimalForValue(t);return this.getPixelForDecimal((i.start+t)*i.factor)}getDecimalForValue(t){return _o(this._table,t)/this._maxIndex}getValueForPixel(t){var e=this._offsets,e=this.getDecimalForPixel(t)/e.factor-e.end;return _o(this._table,e*this._maxIndex,!0)}}yo.id="timeseries",yo.defaults=vo.defaults;be=Object.freeze({__proto__:null,CategoryScale:eo,LinearScale:ao,LogarithmicScale:oo,RadialLinearScale:co,TimeScale:vo,TimeSeriesScale:yo});return Va.register(tn,be,Sn,$n),Va.helpers={...pa},Va._adapters=Na,Va.Animation=gi,Va.Animations=pi,Va.animator=h,Va.controllers=xa.controllers.items,Va.DatasetController=Pi,Va.Element=Di,Va.elements=Sn,Va.Interaction=Se,Va.layouts=Ye,Va.platforms=ri,Va.Scale=Vi,Va.Ticks=Ti,Object.assign(Va,tn,be,Sn,$n,ri),Va.Chart=Va,"undefined"!=typeof window&&(window.Chart=Va),Va});
assets/js/vendor/vue/vue_libs.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vue=t()}(this,function(){"use strict";var d=Object.freeze({});function N(e){return null==e}function P(e){return null!=e}function E(e){return!0===e}function f(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function I(e){return null!==e&&"object"==typeof e}var t=Object.prototype.toString;function l(e){return t.call(e).slice(8,-1)}function p(e){return"[object Object]"===t.call(e)}function o(e){return"[object RegExp]"===t.call(e)}function i(e){var t=parseFloat(String(e));return 0<=t&&Math.floor(t)===t&&isFinite(e)}function h(e){return P(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function n(e){return null==e?"":Array.isArray(e)||p(e)&&e.toString===t?JSON.stringify(e,null,2):String(e)}function L(e){var t=parseFloat(e);return isNaN(t)?e:t}function M(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var r=M("slot,component",!0),u=M("key,ref,slot,slot-scope,is");function v(e,t){if(e.length){t=e.indexOf(t);if(-1<t)return e.splice(t,1)}}var a=Object.prototype.hasOwnProperty;function m(e,t){return a.call(e,t)}function e(t){var n=Object.create(null);return function(e){return n[e]||(n[e]=t(e))}}var s=/-(\w)/g,y=e(function(e){return e.replace(s,function(e,t){return t?t.toUpperCase():""})}),g=e(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),c=/\B([A-Z])/g,b=e(function(e){return e.replace(c,"-$1").toLowerCase()});var _=Function.prototype.bind?function(e,t){return e.bind(t)}:function(n,r){function e(e){var t=arguments.length;return t?1<t?n.apply(r,arguments):n.call(r,e):n.call(r)}return e._length=n.length,e};function w(e,t){for(var n=e.length-(t=t||0),r=new Array(n);n--;)r[n]=e[n+t];return r}function x(e,t){for(var n in t)e[n]=t[n];return e}function $(e){for(var t={},n=0;n<e.length;n++)e[n]&&x(t,e[n]);return t}function C(e,t,n){}var k=function(e,t,n){return!1},A=function(e){return e};function O(t,n){if(t===n)return!0;var e=I(t),r=I(n);if(!e||!r)return!e&&!r&&String(t)===String(n);try{var o=Array.isArray(t),i=Array.isArray(n);if(o&&i)return t.length===n.length&&t.every(function(e,t){return O(e,n[t])});if(t instanceof Date&&n instanceof Date)return t.getTime()===n.getTime();if(o||i)return!1;var a=Object.keys(t),s=Object.keys(n);return a.length===s.length&&a.every(function(e){return O(t[e],n[e])})}catch(e){return!1}}function S(e,t){for(var n=0;n<e.length;n++)if(O(e[n],t))return n;return-1}function D(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var R="data-server-rendered",T=["component","directive","filter"],j=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],F={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!0,devtools:!0,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:k,isReservedAttr:k,isUnknownElement:k,getTagNamespace:C,parsePlatformTagName:A,mustUseProp:k,async:!0,_lifecycleHooks:j},U=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function H(e){e=(e+"").charCodeAt(0);return 36===e||95===e}function V(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var B=new RegExp("[^"+U.source+".$_\\d]");var q,z="__proto__"in{},J="undefined"!=typeof window,G="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,K=G&&WXEnvironment.platform.toLowerCase(),W=J&&window.navigator.userAgent.toLowerCase(),X=W&&/msie|trident/.test(W),Z=W&&0<W.indexOf("msie 9.0"),Y=W&&0<W.indexOf("edge/"),Q=(W&&W.indexOf("android"),W&&/iphone|ipad|ipod|ios/.test(W)||"ios"===K),ee=(W&&/chrome\/\d+/.test(W),W&&/phantomjs/.test(W),W&&W.match(/firefox\/(\d+)/)),te={}.watch,ne=!1;if(J)try{var re={};Object.defineProperty(re,"passive",{get:function(){ne=!0}}),window.addEventListener("test-passive",null,re)}catch(e){}var oe=function(){return q=void 0===q?!J&&!G&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV):q},ie=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ae(e){return"function"==typeof e&&/native code/.test(e.toString())}var se="undefined"!=typeof Symbol&&ae(Symbol)&&"undefined"!=typeof Reflect&&ae(Reflect.ownKeys),ce="undefined"!=typeof Set&&ae(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}(),ue=C,le=C,fe=C,pe=C,de="undefined"!=typeof console,he=/(?:^|[-_])(\w)/g,ue=function(e,t){var n=t?fe(t):"";F.warnHandler?F.warnHandler.call(null,e,t,n):de&&!F.silent&&console.error("[Vue warn]: "+e+n)},le=function(e,t){de&&!F.silent&&console.warn("[Vue tip]: "+e+(t?fe(t):""))},pe=function(e,t){if(e.$root===e)return"<Root>";var n="function"==typeof e&&null!=e.cid?e.options:e._isVue?e.$options||e.constructor.options:e,r=n.name||n._componentTag,e=n.__file;return((r=!r&&e?(n=e.match(/([^/\\]+)\.vue$/))&&n[1]:r)?"<"+r.replace(he,function(e){return e.toUpperCase()}).replace(/[-_]/g,"")+">":"<Anonymous>")+(e&&!1!==t?" at "+e:"")},fe=function(e){if(e._isVue&&e.$parent){for(var t=[],n=0;e;){if(0<t.length){var r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}0<n&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return"\n\nfound in\n\n"+t.map(function(e,t){return""+(0===t?"---\x3e ":function(e,t){for(var n="";t;)t%2==1&&(n+=e),1<t&&(e+=e),t>>=1;return n}(" ",5+2*t))+(Array.isArray(e)?pe(e[0])+"... ("+e[1]+" recursive calls)":pe(e))}).join("\n")}return"\n\n(found in "+pe(e)+")"},ve=0,me=function(){this.id=ve++,this.subs=[]};me.prototype.addSub=function(e){this.subs.push(e)},me.prototype.removeSub=function(e){v(this.subs,e)},me.prototype.depend=function(){me.target&&me.target.addDep(this)},me.prototype.notify=function(){var e=this.subs.slice();F.async||e.sort(function(e,t){return e.id-t.id});for(var t=0,n=e.length;t<n;t++)e[t].update()},me.target=null;var ye=[];function ge(e){ye.push(e),me.target=e}function be(){ye.pop(),me.target=ye[ye.length-1]}var _e=function(e,t,n,r,o,i,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},we={child:{configurable:!0}};we.child.get=function(){return this.componentInstance},Object.defineProperties(_e.prototype,we);var xe=function(e){void 0===e&&(e="");var t=new _e;return t.text=e,t.isComment=!0,t};function $e(e){return new _e(void 0,void 0,void 0,String(e))}function Ce(e){var t=new _e(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var ke=Array.prototype,Ae=Object.create(ke);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(i){var a=ke[i];V(Ae,i,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=a.apply(this,e),o=this.__ob__;switch(i){case"push":case"unshift":n=e;break;case"splice":n=e.slice(2)}return n&&o.observeArray(n),o.dep.notify(),r})});var Oe=Object.getOwnPropertyNames(Ae),Se=!0;function Te(e){Se=e}var je=function(e){var t;this.value=e,this.dep=new me,this.vmCount=0,V(e,"__ob__",this),Array.isArray(e)?(z?(t=Ae,e.__proto__=t):function(e,t,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];V(e,i,t[i])}}(e,Ae,Oe),this.observeArray(e)):this.walk(e)};function Ee(e,t){var n;if(I(e)&&!(e instanceof _e))return m(e,"__ob__")&&e.__ob__ instanceof je?n=e.__ob__:Se&&!oe()&&(Array.isArray(e)||p(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new je(e)),t&&n&&n.vmCount++,n}function Me(n,e,r,o,i){var a,s,c,u=new me,t=Object.getOwnPropertyDescriptor(n,e);t&&!1===t.configurable||(a=t&&t.get,s=t&&t.set,a&&!s||2!==arguments.length||(r=n[e]),c=!i&&Ee(r),Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get:function(){var e=a?a.call(n):r;return me.target&&(u.depend(),c&&(c.dep.depend(),Array.isArray(e)&&function e(t){for(var n=void 0,r=0,o=t.length;r<o;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&e(n)}(e))),e},set:function(e){var t=a?a.call(n):r;e===t||e!=e&&t!=t||(o&&o(),a&&!s||(s?s.call(n,e):r=e,c=!i&&Ee(e),u.notify()))}}))}function Ne(e,t,n){if((N(e)||f(e))&&ue("Cannot set reactive property on undefined, null, or primitive value: "+e),Array.isArray(e)&&i(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n;var r=e.__ob__;return e._isVue||r&&r.vmCount?(ue("Avoid adding reactive properties to a Vue instance or its root $data at runtime - declare it upfront in the data option."),n):r?(Me(r.value,t,n),r.dep.notify(),n):e[t]=n}function Pe(e,t){var n;(N(e)||f(e))&&ue("Cannot delete reactive property on undefined, null, or primitive value: "+e),Array.isArray(e)&&i(t)?e.splice(t,1):(n=e.__ob__,e._isVue||n&&n.vmCount?ue("Avoid deleting properties on a Vue instance or its root $data - just set it to null."):m(e,t)&&(delete e[t],n&&n.dep.notify()))}je.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)Me(e,t[n])},je.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Ee(e[t])};var Ie=F.optionMergeStrategies;function Le(e,t){if(!t)return e;for(var n,r,o,i=se?Reflect.ownKeys(t):Object.keys(t),a=0;a<i.length;a++)"__ob__"!==(n=i[a])&&(r=e[n],o=t[n],m(e,n)?r!==o&&p(r)&&p(o)&&Le(r,o):Ne(e,n,o));return e}function De(n,r,o){return o?function(){var e="function"==typeof r?r.call(o,o):r,t="function"==typeof n?n.call(o,o):n;return e?Le(e,t):t}:r?n?function(){return Le("function"==typeof r?r.call(this,this):r,"function"==typeof n?n.call(this,this):n)}:r:n}function Re(e,t){e=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return e&&function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(e)}function Fe(e,t,n,r){e=Object.create(e||null);return t?(Ve(r,t,n),x(e,t)):e}Ie.el=Ie.propsData=function(e,t,n,r){return n||ue('option "'+r+'" can only be used during instance creation with the `new` keyword.'),Ue(e,t)},Ie.data=function(e,t,n){return n?De(e,t,n):t&&"function"!=typeof t?(ue('The "data" option should be a function that returns a per-instance value in component definitions.',n),e):De(e,t)},j.forEach(function(e){Ie[e]=Re}),T.forEach(function(e){Ie[e+"s"]=Fe}),Ie.watch=function(e,t,n,r){if(e===te&&(e=void 0),!(t=t===te?void 0:t))return Object.create(e||null);if(Ve(r,t,n),!e)return t;var o,i={};for(o in x(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Ie.props=Ie.methods=Ie.inject=Ie.computed=function(e,t,n,r){if(t&&Ve(r,t,n),!e)return t;n=Object.create(null);return x(n,e),t&&x(n,t),n},Ie.provide=De;var Ue=function(e,t){return void 0===t?e:t};function He(e){new RegExp("^[a-zA-Z][\\-\\.0-9_"+U.source+"]*$").test(e)||ue('Invalid component name: "'+e+'". Component names should conform to valid custom element name in html5 specification.'),(r(e)||F.isReservedTag(e))&&ue("Do not use built-in or reserved HTML elements as component id: "+e)}function Ve(e,t,n){p(t)||ue('Invalid value for option "'+e+'": expected an Object, but got '+l(t)+".",n)}function Be(n,r,o){if(!function(e){for(var t in e.components)He(t)}(r),function(e,t){var n=e.props;if(n){var r,o,i={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(o=n[r])?i[y(o)]={type:null}:ue("props must be strings when using array syntax.");else if(p(n))for(var a in n)o=n[a],i[y(a)]=p(o)?o:{type:o};else ue('Invalid value for option "props": expected an Array or an Object, but got '+l(n)+".",t);e.props=i}}(r="function"==typeof r?r.options:r,o),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var o=0;o<n.length;o++)r[n[o]]={from:n[o]};else if(p(n))for(var i in n){var a=n[i];r[i]=p(a)?x({from:i},a):{from:a}}else ue('Invalid value for option "inject": expected an Array or an Object, but got '+l(n)+".",t)}}(r,o),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(r),!r._base&&(r.extends&&(n=Be(n,r.extends,o)),r.mixins))for(var e=0,t=r.mixins.length;e<t;e++)n=Be(n,r.mixins[e],o);var i,a={};for(i in n)s(i);for(i in r)m(n,i)||s(i);function s(e){var t=Ie[e]||Ue;a[e]=t(n[e],r[e],o,e)}return a}function qe(e,t,n,r){if("string"==typeof n){var o=e[t];if(m(o,n))return o[n];var i=y(n);if(m(o,i))return o[i];var a=g(i);if(m(o,a))return o[a];a=o[n]||o[i]||o[a];return r&&!a&&ue("Failed to resolve "+t.slice(0,-1)+": "+n,e),a}}function ze(e,t,n,r){var o,i=t[e],a=!m(n,e),t=n[e],n=We(Boolean,i.type);return-1<n&&(a&&!m(i,"default")?t=!1:""!==t&&t!==b(e)||((o=We(String,i.type))<0||n<o)&&(t=!0)),void 0===t&&(t=function(e,t,n){if(!m(t,"default"))return;var r=t.default;I(r)&&ue('Invalid default value for prop "'+n+'": Props with type Object/Array must use a factory function to return the default value.',e);if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==Ge(t.type)?r.call(e):r}(r,i,e),o=Se,Te(!0),Ee(t),Te(o)),function(e,t,n,r,o){if(e.required&&o)ue('Missing required prop: "'+t+'"',r);else if(null!=n||e.required){var i=e.type,a=!i||!0===i,s=[];if(i){Array.isArray(i)||(i=[i]);for(var c=0;c<i.length&&!a;c++){var u=function(e,t){var n,r=Ge(t);{var o;Je.test(r)?(n=(o=typeof e)===r.toLowerCase())||"object"!=o||(n=e instanceof t):n="Object"===r?p(e):"Array"===r?Array.isArray(e):e instanceof t}return{valid:n,expectedType:r}}(n,i[c]);s.push(u.expectedType||""),a=u.valid}}a?(e=e.validator)&&(e(n)||ue('Invalid prop: custom validator check failed for prop "'+t+'".',r)):ue(function(e,t,n){var r='Invalid prop: type check failed for prop "'+e+'". Expected '+n.map(g).join(", "),o=n[0],i=l(t),e=Xe(t,o),t=Xe(t,i);1===n.length&&Ze(o)&&!function(){var e=[],t=arguments.length;for(;t--;)e[t]=arguments[t];return e.some(function(e){return"boolean"===e.toLowerCase()})}(o,i)&&(r+=" with value "+e);r+=", got "+i+" ",Ze(i)&&(r+="with value "+t+".");return r}(t,n,s),r)}}(i,e,t,r,a),t}var Je=/^(String|Number|Boolean|Function|Symbol)$/;function Ge(e){e=e&&e.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function Ke(e,t){return Ge(e)===Ge(t)}function We(e,t){if(!Array.isArray(t))return Ke(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Ke(t[n],e))return n;return-1}function Xe(e,t){return"String"===t?'"'+e+'"':"Number"===t?""+Number(e):""+e}function Ze(t){return["string","number","boolean"].some(function(e){return t.toLowerCase()===e})}function Ye(e,t,n){ge();try{if(t)for(var r=t;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,e,t,n))return}catch(e){et(e,r,"errorCaptured hook")}}et(e,t,n)}finally{be()}}function Qe(e,t,n,r,o){var i;try{(i=n?e.apply(t,n):e.call(t))&&!i._isVue&&h(i)&&!i._handled&&(i.catch(function(e){return Ye(e,r,o+" (Promise/async)")}),i._handled=!0)}catch(e){Ye(e,r,o)}return i}function et(t,e,n){if(F.errorHandler)try{return F.errorHandler.call(null,t,e,n)}catch(e){e!==t&&tt(e,null,"config.errorHandler")}tt(t,e,n)}function tt(e,t,n){if(ue("Error in "+n+': "'+e.toString()+'"',t),!J&&!G||"undefined"==typeof console)throw e;console.error(e)}var nt,rt,ot,it,at,st,ct=!1,ut=[],lt=!1;function ft(){lt=!1;for(var e=ut.slice(0),t=ut.length=0;t<e.length;t++)e[t]()}function pt(e,t){var n;if(ut.push(function(){if(e)try{e.call(t)}catch(e){Ye(e,t,"nextTick")}else n&&n(t)}),lt||(lt=!0,rt()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){n=e})}"undefined"!=typeof Promise&&ae(Promise)?(nt=Promise.resolve(),rt=function(){nt.then(ft),Q&&setTimeout(C)},ct=!0):X||"undefined"==typeof MutationObserver||!ae(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString()?rt="undefined"!=typeof setImmediate&&ae(setImmediate)?function(){setImmediate(ft)}:function(){setTimeout(ft,0)}:(ot=1,Rr=new MutationObserver(ft),it=document.createTextNode(String(ot)),Rr.observe(it,{characterData:!0}),rt=function(){ot=(ot+1)%2,it.data=String(ot)},ct=!0);var dt=J&&window.performance;dt&&dt.mark&&dt.measure&&dt.clearMarks&&dt.clearMeasures&&(at=function(e){return dt.mark(e)},st=function(e,t,n){dt.measure(e,t,n),dt.clearMarks(t),dt.clearMarks(n)});function ht(e,t){ue('Property or method "'+t+'" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',e)}function vt(e,t){ue('Property "'+t+'" must be accessed with "$data.'+t+'" because properties starting with "$" or "_" are not proxied in the Vue instance to prevent conflicts with Vue internalsSee: https://vuejs.org/v2/api/#data',e)}var mt,yt=M("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,require"),gt="undefined"!=typeof Proxy&&ae(Proxy);gt&&(mt=M("stop,prevent,self,ctrl,shift,alt,meta,exact"),F.keyCodes=new Proxy(F.keyCodes,{set:function(e,t,n){return mt(t)?(ue("Avoid overwriting built-in modifier in config.keyCodes: ."+t),!1):(e[t]=n,!0)}}));var bt={has:function(e,t){var n=t in e,r=yt(t)||"string"==typeof t&&"_"===t.charAt(0)&&!(t in e.$data);return n||r||(t in e.$data?vt:ht)(e,t),n||!r}},_t={get:function(e,t){return"string"!=typeof t||t in e||(t in e.$data?vt:ht)(e,t),e[t]}},wt=function(e){var t;gt?(t=(t=e.$options).render&&t.render._withStripped?_t:bt,e._renderProxy=new Proxy(e,t)):e._renderProxy=e},xt=new ce;function $t(e){!function e(t,n){var r,o;var i=Array.isArray(t);if(!i&&!I(t)||Object.isFrozen(t)||t instanceof _e)return;if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(i)for(r=t.length;r--;)e(t[r],n);else for(o=Object.keys(t),r=o.length;r--;)e(t[o[r]],n)}(e,xt),xt.clear()}var Ct=e(function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}});function kt(e,o){function i(){var e=arguments,t=i.fns;if(!Array.isArray(t))return Qe(t,null,arguments,o,"v-on handler");for(var n=t.slice(),r=0;r<n.length;r++)Qe(n[r],null,e,o,"v-on handler")}return i.fns=e,i}function At(e,t,n,r,o,i){var a,s,c,u;for(a in e)s=e[a],c=t[a],u=Ct(a),N(s)?ue('Invalid handler for event "'+u.name+'": got '+String(s),i):N(c)?(N(s.fns)&&(s=e[a]=kt(s,i)),E(u.once)&&(s=e[a]=o(u.name,s,u.capture)),n(u.name,s,u.capture,u.passive,u.params)):s!==c&&(c.fns=s,e[a]=c);for(a in t)N(e[a])&&r((u=Ct(a)).name,t[a],u.capture)}function Ot(e,t,n){var r,o=(e=e instanceof _e?e.data.hook||(e.data.hook={}):e)[t];function i(){n.apply(this,arguments),v(r.fns,i)}N(o)?r=kt([i]):P(o.fns)&&E(o.merged)?(r=o).fns.push(i):r=kt([o,i]),r.merged=!0,e[t]=r}function St(e,t,n,r,o){if(P(t)){if(m(t,n))return e[n]=t[n],o||delete t[n],1;if(m(t,r))return e[n]=t[r],o||delete t[r],1}}function Tt(e){return f(e)?[$e(e)]:Array.isArray(e)?function e(t,n){var r=[];var o,i,a,s;for(o=0;o<t.length;o++)N(i=t[o])||"boolean"==typeof i||(a=r.length-1,s=r[a],Array.isArray(i)?0<i.length&&(jt((i=e(i,(n||"")+"_"+o))[0])&&jt(s)&&(r[a]=$e(s.text+i[0].text),i.shift()),r.push.apply(r,i)):f(i)?jt(s)?r[a]=$e(s.text+i):""!==i&&r.push($e(i)):jt(i)&&jt(s)?r[a]=$e(s.text+i.text):(E(t._isVList)&&P(i.tag)&&N(i.key)&&P(n)&&(i.key="__vlist"+n+"_"+o+"__"),r.push(i)));return r}(e):void 0}function jt(e){return P(e)&&P(e.text)&&!1===e.isComment}function Et(e,t){if(e){for(var n=Object.create(null),r=se?Reflect.ownKeys(e):Object.keys(e),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){for(var a,s=e[i].from,c=t;c;){if(c._provided&&m(c._provided,s)){n[i]=c._provided[s];break}c=c.$parent}c||("default"in e[i]?(a=e[i].default,n[i]="function"==typeof a?a.call(t):a):ue('Injection "'+i+'" not found',t))}}return n}}function Mt(e,t){if(!e||!e.length)return{};for(var n,r={},o=0,i=e.length;o<i;o++){var a=e[o],s=a.data;s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,a.context!==t&&a.fnContext!==t||!s||null==s.slot?(r.default||(r.default=[])).push(a):(s=r[s=s.slot]||(r[s]=[]),"template"===a.tag?s.push.apply(s,a.children||[]):s.push(a))}for(n in r)r[n].every(Nt)&&delete r[n];return r}function Nt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function Pt(e,t,n){var r,o,i=0<Object.keys(t).length,a=e?!!e.$stable:!i,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&n&&n!==d&&s===n.$key&&!i&&!n.$hasNormal)return n;for(var c in r={},e)e[c]&&"$"!==c[0]&&(r[c]=function(e,t,n){function r(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:Tt(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e}n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0});return r}(t,c,e[c]))}else r={};for(o in t)o in r||(r[o]=function(e,t){return function(){return e[t]}}(t,o));return e&&Object.isExtensible(e)&&(e._normalized=r),V(r,"$stable",a),V(r,"$key",s),V(r,"$hasNormal",i),r}function It(e,t){var n,r,o,i;if(Array.isArray(e)||"string"==typeof e)for(a=new Array(e.length),n=0,r=e.length;n<r;n++)a[n]=t(e[n],n);else if("number"==typeof e)for(a=new Array(e),n=0;n<e;n++)a[n]=t(n+1,n);else if(I(e))if(se&&e[Symbol.iterator])for(var a=[],s=e[Symbol.iterator](),c=s.next();!c.done;)a.push(t(c.value,a.length)),c=s.next();else for(o=Object.keys(e),a=new Array(o.length),n=0,r=o.length;n<r;n++)i=o[n],a[n]=t(e[i],i,n);return(a=!P(a)?[]:a)._isVList=!0,a}function Lt(e,t,n,r){var o=this.$scopedSlots[e],t=o?(n=n||{},r&&(I(r)||ue("slot v-bind without argument expects an Object",this),n=x(x({},r),n)),o(n)||t):this.$slots[e]||t,n=n&&n.slot;return n?this.$createElement("template",{slot:n},t):t}function Dt(e){return qe(this.$options,"filters",e,!0)||A}function Rt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function Ft(e,t,n,r,o){n=F.keyCodes[t]||n;return o&&r&&!F.keyCodes[t]?Rt(o,r):n?Rt(n,e):r?b(r)!==t:void 0}function Ut(r,o,i,a,s){if(i)if(I(i)){var c,e;for(e in i=Array.isArray(i)?$(i):i)!function(t){c="class"===t||"style"===t||u(t)?r:(n=r.attrs&&r.attrs.type,a||F.mustUseProp(o,n,t)?r.domProps||(r.domProps={}):r.attrs||(r.attrs={}));var e=y(t),n=b(t);e in c||n in c||(c[t]=i[t],s&&((r.on||(r.on={}))["update:"+t]=function(e){i[t]=e}))}(e)}else ue("v-bind without argument expects an Object or Array value",this);return r}function Ht(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Bt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function Vt(e,t,n){return Bt(e,"__once__"+t+(n?"_"+n:""),!0),e}function Bt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&qt(e[r],t+"_"+r,n);else qt(e,t,n)}function qt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function zt(e,t){if(t)if(p(t)){var n,r=e.on=e.on?x({},e.on):{};for(n in t){var o=r[n],i=t[n];r[n]=o?[].concat(o,i):i}}else ue("v-on without argument expects an Object value",this);return e}function Jt(e,t,n,r){t=t||{$stable:!n};for(var o=0;o<e.length;o++){var i=e[o];Array.isArray(i)?Jt(i,t,n):i&&(i.proxy&&(i.fn.proxy=!0),t[i.key]=i.fn)}return r&&(t.$key=r),t}function Gt(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r?e[t[n]]=t[n+1]:""!==r&&null!==r&&ue("Invalid value for dynamic directive argument (expected string or null): "+r,this)}return e}function Kt(e,t){return"string"==typeof e?t+e:e}function Wt(e){e._o=Vt,e._n=L,e._s=n,e._l=It,e._t=Lt,e._q=O,e._i=S,e._m=Ht,e._f=Dt,e._k=Ft,e._b=Ut,e._v=$e,e._e=xe,e._u=Jt,e._g=zt,e._d=Gt,e._p=Kt}function Xt(e,t,n,o,r){var i,a=this,s=r.options;m(o,"_uid")?(i=Object.create(o))._original=o:o=(i=o)._original;var r=E(s._compiled),c=!r;this.data=e,this.props=t,this.children=n,this.parent=o,this.listeners=e.on||d,this.injections=Et(s.inject,o),this.slots=function(){return a.$slots||Pt(e.scopedSlots,a.$slots=Mt(n,o)),a.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return Pt(e.scopedSlots,this.slots())}}),r&&(this.$options=s,this.$slots=this.slots(),this.$scopedSlots=Pt(e.scopedSlots,this.$slots)),s._scopeId?this._c=function(e,t,n,r){r=on(i,e,t,n,r,c);return r&&!Array.isArray(r)&&(r.fnScopeId=s._scopeId,r.fnContext=o),r}:this._c=function(e,t,n,r){return on(i,e,t,n,r,c)}}function Zt(e,t,n,r,o){e=Ce(e);return e.fnContext=n,e.fnOptions=r,(e.devtoolsMeta=e.devtoolsMeta||{}).renderContext=o,t.slot&&((e.data||(e.data={})).slot=t.slot),e}function Yt(e,t){for(var n in t)e[y(n)]=t[n]}Wt(Xt.prototype);var Qt={init:function(e,t){e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive?Qt.prepatch(e,e):(e.componentInstance=function(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},t=e.data.inlineTemplate;P(t)&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns);return new e.componentOptions.Ctor(n)}(e,vn)).$mount(t?e.elm:void 0,t)},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,r,o){mn=!0;var i=r.data.scopedSlots,a=e.$scopedSlots,a=!!(i&&!i.$stable||a!==d&&!a.$stable||i&&e.$scopedSlots.$key!==i.$key),i=!!(o||e.$options._renderChildren||a);e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r);if(e.$options._renderChildren=o,e.$attrs=r.data.attrs||d,e.$listeners=n||d,t&&e.$options.props){Te(!1);for(var s=e._props,c=e.$options._propKeys||[],u=0;u<c.length;u++){var l=c[u],f=e.$options.props;s[l]=ze(l,f,t,e)}Te(!0),e.$options.propsData=t}n=n||d;a=e.$options._parentListeners;e.$options._parentListeners=n,hn(e,n,a),i&&(e.$slots=Mt(o,r.context),e.$forceUpdate());mn=!1}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t=e.context,n=e.componentInstance;n._isMounted||(n._isMounted=!0,_n(n,"mounted")),e.data.keepAlive&&(t._isMounted?((t=n)._inactive=!1,$n.push(t)):bn(n,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(n&&(t._directInactive=!0,gn(t)))return;if(!t._inactive){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);_n(t,"deactivated")}}(t,!0):t.$destroy())}},en=Object.keys(Qt);function tn(e,t,n,r,o){if(!N(e)){var i,a,s,c,u=n.$options._base;if("function"==typeof(e=I(e)?u.extend(e):e)){if(N(e.cid)&&void 0===(e=function(t,n){if(E(t.error)&&P(t.errorComp))return t.errorComp;if(P(t.resolved))return t.resolved;var e=sn;e&&P(t.owners)&&-1===t.owners.indexOf(e)&&t.owners.push(e);if(E(t.loading)&&P(t.loadingComp))return t.loadingComp;if(e&&!P(t.owners)){var r=t.owners=[e],o=!0,i=null,a=null;e.$on("hook:destroyed",function(){return v(r,e)});var s=function(e){for(var t=0,n=r.length;t<n;t++)r[t].$forceUpdate();e&&(r.length=0,null!==i&&(clearTimeout(i),i=null),null!==a&&(clearTimeout(a),a=null))},c=D(function(e){t.resolved=cn(e,n),o?r.length=0:s(!0)}),u=D(function(e){ue("Failed to resolve async component: "+String(t)+(e?"\nReason: "+e:"")),P(t.errorComp)&&(t.error=!0,s(!0))}),l=t(c,u);return I(l)&&(h(l)?N(t.resolved)&&l.then(c,u):h(l.component)&&(l.component.then(c,u),P(l.error)&&(t.errorComp=cn(l.error,n)),P(l.loading)&&(t.loadingComp=cn(l.loading,n),0===l.delay?t.loading=!0:i=setTimeout(function(){i=null,N(t.resolved)&&N(t.error)&&(t.loading=!0,s(!1))},l.delay||200)),P(l.timeout)&&(a=setTimeout(function(){a=null,N(t.resolved)&&u("timeout ("+l.timeout+"ms)")},l.timeout)))),o=!1,t.loading?t.loadingComp:t.resolved}}(i=e,u)))return a=i,s=t,c=n,u=r,l=o,(f=xe()).asyncFactory=a,f.asyncMeta={data:s,context:c,children:u,tag:l},f;t=t||{},Zn(e),P(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;e=t.on||(t.on={}),n=e[r],t=t.model.callback;P(n)?(Array.isArray(n)?-1===n.indexOf(t):n!==t)&&(e[r]=[t].concat(n)):e[r]=t}(e.options,t);var l=function(e,t,n){var r=t.options.props;if(!N(r)){var o={},i=e.attrs,a=e.props;if(P(i)||P(a))for(var s in r){var c=b(s),u=s.toLowerCase();s!==u&&i&&m(i,u)&&le('Prop "'+u+'" is passed to component '+pe(n||t)+', but the declared prop name is "'+s+'". Note that HTML attributes are case-insensitive and camelCased props need to use their kebab-case equivalents when using in-DOM templates. You should probably use "'+c+'" instead of "'+s+'".'),St(o,a,s,c,!0)||St(o,i,s,c,!1)}return o}}(t,e,o);if(E(e.options.functional))return function(e,t,n,r,o){var i=e.options,a={},s=i.props;if(P(s))for(var c in s)a[c]=ze(c,s,t||d);else P(n.attrs)&&Yt(a,n.attrs),P(n.props)&&Yt(a,n.props);var u=new Xt(n,a,o,r,e);if((e=i.render.call(null,u._c,u))instanceof _e)return Zt(e,n,u.parent,i,u);if(Array.isArray(e)){for(var l=Tt(e)||[],f=new Array(l.length),p=0;p<l.length;p++)f[p]=Zt(l[p],n,u.parent,i,u);return f}}(e,l,t,n,r);var f=t.on;t.on=t.nativeOn,E(e.options.abstract)&&(p=t.slot,t={},p&&(t.slot=p)),function(e){for(var t=e.hook||(e.hook={}),n=0;n<en.length;n++){var r=en[n],o=t[r],i=Qt[r];o===i||o&&o._merged||(t[r]=o?function(n,r){function e(e,t){n(e,t),r(e,t)}return e._merged=!0,e}(i,o):i)}}(t);var p=e.options.name||o;return new _e("vue-component-"+e.cid+(p?"-"+p:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:l,listeners:f,tag:o,children:r},i)}ue("Invalid Component definition: "+String(e),n)}}var nn=1,rn=2;function on(e,t,n,r,o,i){return(Array.isArray(n)||f(n))&&(o=r,r=n,n=void 0),function(e,t,n,r,o){if(P(n)&&P(n.__ob__))return ue("Avoid using observed data object as vnode data: "+JSON.stringify(n)+"\nAlways create fresh vnode data objects in each render!",e),xe();P(n)&&P(n.is)&&(t=n.is);if(!t)return xe();P(n)&&P(n.key)&&!f(n.key)&&ue("Avoid using non-primitive value as key, use string/number value instead.",e);Array.isArray(r)&&"function"==typeof r[0]&&((n=n||{}).scopedSlots={default:r[0]},r.length=0);o===rn?r=Tt(r):o===nn&&(r=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(r));var i,a;r="string"==typeof t?(i=e.$vnode&&e.$vnode.ns||F.getTagNamespace(t),F.isReservedTag(t)?new _e(F.parsePlatformTagName(t),n,r,void 0,void 0,e):n&&n.pre||!P(a=qe(e.$options,"components",t))?new _e(t,n,r,void 0,void 0,e):tn(a,n,e,r,t)):tn(t,n,e,r);return Array.isArray(r)?r:P(r)?(P(i)&&function e(t,n,r){t.ns=n;"foreignObject"===t.tag&&(r=!(n=void 0));if(P(t.children))for(var o=0,i=t.children.length;o<i;o++){var a=t.children[o];P(a.tag)&&(N(a.ns)||E(r)&&"svg"!==a.tag)&&e(a,n,r)}}(r,i),P(n)&&function(e){I(e.style)&&$t(e.style);I(e.class)&&$t(e.class)}(n),r):xe()}(e,t,n,r,o=E(i)?rn:o)}var an,sn=null;function cn(e,t){return I(e=e.__esModule||se&&"Module"===e[Symbol.toStringTag]?e.default:e)?t.extend(e):e}function un(e){return e.isComment&&e.asyncFactory}function ln(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(P(n)&&(P(n.componentOptions)||un(n)))return n}}function fn(e,t){an.$on(e,t)}function pn(e,t){an.$off(e,t)}function dn(t,n){var r=an;return function e(){null!==n.apply(null,arguments)&&r.$off(t,e)}}function hn(e,t,n){At(t,n||{},fn,pn,dn,an=e),an=void 0}var vn=null,mn=!1;function yn(e){var t=vn;return vn=e,function(){vn=t}}function gn(e){for(;e=e&&e.$parent;)if(e._inactive)return 1}function bn(e,t){if(t){if(e._directInactive=!1,gn(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)bn(e.$children[n]);_n(e,"activated")}}function _n(e,t){ge();var n=e.$options[t],r=t+" hook";if(n)for(var o=0,i=n.length;o<i;o++)Qe(n[o],e,null,e,r);e._hasHookEvent&&e.$emit("hook:"+t),be()}var wn=100,xn=[],$n=[],Cn={},kn={},An=!1,On=!1,Sn=0;var Tn,jn=0,En=Date.now;function Mn(){var e,t;for(jn=En(),On=!0,xn.sort(function(e,t){return e.id-t.id}),Sn=0;Sn<xn.length;Sn++)if((e=xn[Sn]).before&&e.before(),t=e.id,Cn[t]=null,e.run(),null!=Cn[t]&&(kn[t]=(kn[t]||0)+1,kn[t]>wn)){ue("You may have an infinite update loop "+(e.user?'in watcher with expression "'+e.expression+'"':"in a component render function."),e.vm);break}var n=$n.slice(),r=xn.slice();Sn=xn.length=$n.length=0,Cn={},An=On=!(kn={}),function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,bn(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&_n(r,"updated")}}(r),ie&&F.devtools&&ie.emit("flush")}!J||X||(Tn=window.performance)&&"function"==typeof Tn.now&&En()>document.createEvent("Event").timeStamp&&(En=function(){return Tn.now()});var Nn=0,Pn=function(e,t,n,r,o){this.vm=e,o&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Nn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ce,this.newDepIds=new ce,this.expression=t.toString(),"function"==typeof t?this.getter=t:(this.getter=function(e){if(!B.test(e)){var n=e.split(".");return function(e){for(var t=0;t<n.length;t++){if(!e)return;e=e[n[t]]}return e}}}(t),this.getter||(this.getter=C,ue('Failed watching path: "'+t+'" Watcher only accepts simple dot-delimited paths. For full control, use a function instead.',e))),this.value=this.lazy?void 0:this.get()};Pn.prototype.get=function(){var e;ge(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;Ye(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&$t(e),be(),this.cleanupDeps()}return e},Pn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},Pn.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},Pn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==Cn[t]){if(Cn[t]=!0,On){for(var n=xn.length-1;Sn<n&&xn[n].id>e.id;)n--;xn.splice(n+1,0,e)}else xn.push(e);An||(An=!0,F.async?pt(Mn):Mn())}}(this)},Pn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||I(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Ye(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Pn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Pn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},Pn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var In={enumerable:!0,configurable:!0,get:C,set:C};function Ln(e,t,n){In.get=function(){return this[t][n]},In.set=function(e){this[t][n]=e},Object.defineProperty(e,n,In)}function Dn(e){e._watchers=[];var t=e.$options;t.props&&function(r,o){var i=r.$options.propsData||{},a=r._props={},s=r.$options._propKeys=[],c=!r.$parent;c||Te(!1);for(var e in o)!function(e){s.push(e);var t=ze(e,o,i,r),n=b(e);(u(n)||F.isReservedAttr(n))&&ue('"'+n+'" is a reserved attribute and cannot be used as component prop.',r),Me(a,e,t,function(){c||mn||ue("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: \""+e+'"',r)}),e in r||Ln(r,"_props",e)}(e);Te(!0)}(e,t.props),t.methods&&function(e,t){var n,r=e.$options.props;for(n in t)"function"!=typeof t[n]&&ue('Method "'+n+'" has type "'+typeof t[n]+'" in the component definition. Did you reference the function correctly?',e),r&&m(r,n)&&ue('Method "'+n+'" has already been defined as a prop.',e),n in e&&H(n)&&ue('Method "'+n+'" conflicts with an existing Vue instance method. Avoid defining component methods that start with _ or $.'),e[n]="function"!=typeof t[n]?C:_(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;p(t=e._data="function"==typeof t?function(e,t){ge();try{return e.call(t,t)}catch(e){return Ye(e,t,"data()"),{}}finally{be()}}(t,e):t||{})||(t={},ue("data functions should return an object:\nhttps://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function",e));var n=Object.keys(t),r=e.$options.props,o=e.$options.methods,i=n.length;for(;i--;){var a=n[i];o&&m(o,a)&&ue('Method "'+a+'" has already been defined as a data property.',e),r&&m(r,a)?ue('The data property "'+a+'" is already declared as a prop. Use prop default value instead.',e):H(a)||Ln(e,"_data",a)}Ee(t,!0)}(e):Ee(e._data={},!0),t.computed&&function(e,t){var n,r=e._computedWatchers=Object.create(null),o=oe();for(n in t){var i=t[n],a="function"==typeof i?i:i.get;null==a&&ue('Getter is missing for computed property "'+n+'".',e),o||(r[n]=new Pn(e,a||C,C,Rn)),n in e?n in e.$data?ue('The computed property "'+n+'" is already defined in data.',e):e.$options.props&&n in e.$options.props&&ue('The computed property "'+n+'" is already defined as a prop.',e):Fn(e,n,i)}}(e,t.computed),t.watch&&t.watch!==te&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o<r.length;o++)Vn(e,n,r[o]);else Vn(e,n,r)}}(e,t.watch)}var Rn={lazy:!0};function Fn(e,t,n){var r=!oe();"function"==typeof n?(In.get=r?Un(t):Hn(n),In.set=C):(In.get=n.get?r&&!1!==n.cache?Un(t):Hn(n.get):C,In.set=n.set||C),In.set===C&&(In.set=function(){ue('Computed property "'+t+'" was assigned to but it has no setter.',this)}),Object.defineProperty(e,t,In)}function Un(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),me.target&&e.depend(),e.value}}function Hn(e){return function(){return e.call(this,this)}}function Vn(e,t,n,r){return"string"==typeof(n=p(n)?(r=n).handler:n)&&(n=e[n]),e.$watch(t,n,r)}var Bn,qn,zn,Jn,Gn,Kn,Wn,Xn=0;function Zn(e){var t,n,r=e.options;return!e.super||(t=Zn(e.super))!==e.superOptions&&(e.superOptions=t,(n=function(e){var t,n,r=e.options,o=e.sealedOptions;for(n in r)r[n]!==o[n]&&((t=t||{})[n]=r[n]);return t}(e))&&x(e.extendOptions,n),(r=e.options=Be(t,e.extendOptions)).name&&(r.components[r.name]=e)),r}function Yn(e){this instanceof Yn||ue("Vue is a constructor and should be called with the `new` keyword"),this._init(e)}function Qn(e){e.cid=0;var a=1;e.extend=function(e){var t=this,n=t.cid,r=(e=e||{})._Ctor||(e._Ctor={});if(r[n])return r[n];var o=e.name||t.options.name;o&&He(o);function i(e){this._init(e)}return((i.prototype=Object.create(t.prototype)).constructor=i).cid=a++,i.options=Be(t.options,e),i.super=t,i.options.props&&function(e){for(var t in e.options.props)Ln(e.prototype,"_props",t)}(i),i.options.computed&&function(e){var t,n=e.options.computed;for(t in n)Fn(e.prototype,t,n[t])}(i),i.extend=t.extend,i.mixin=t.mixin,i.use=t.use,T.forEach(function(e){i[e]=t[e]}),o&&(i.options.components[o]=i),i.superOptions=t.options,i.extendOptions=e,i.sealedOptions=x({},i.options),r[n]=i}}function er(e){return e&&(e.Ctor.options.name||e.tag)}function tr(e,t){return Array.isArray(e)?-1<e.indexOf(t):"string"==typeof e?-1<e.split(",").indexOf(t):!!o(e)&&e.test(t)}function nr(e,t){var n,r=e.cache,o=e.keys,i=e._vnode;for(n in r){var a=r[n];!a||(a=er(a.componentOptions))&&!t(a)&&rr(r,n,o,i)}}function rr(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,v(n,t)}Yn.prototype._init=function(e){var t,n,r,o,i,a=this;a._uid=Xn++,F.performance&&at&&(t="vue-perf-start:"+a._uid,n="vue-perf-end:"+a._uid,at(t)),a._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),e=t._parentVnode;n.parent=t.parent;e=(n._parentVnode=e).componentOptions;n.propsData=e.propsData,n._parentListeners=e.listeners,n._renderChildren=e.children,n._componentTag=e.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(a,e):a.$options=Be(Zn(a.constructor),e||{},a),wt(a),function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(a._self=a),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&hn(e,t)}(a),function(o){o._vnode=null,o._staticTrees=null;var e=o.$options,t=o.$vnode=e._parentVnode,n=t&&t.context;o.$slots=Mt(e._renderChildren,n),o.$scopedSlots=d,o._c=function(e,t,n,r){return on(o,e,t,n,r,!1)},o.$createElement=function(e,t,n,r){return on(o,e,t,n,r,!0)},t=t&&t.data,Me(o,"$attrs",t&&t.attrs||d,function(){mn||ue("$attrs is readonly.",o)},!0),Me(o,"$listeners",e._parentListeners||d,function(){mn||ue("$listeners is readonly.",o)},!0)}(a),_n(a,"beforeCreate"),(o=Et((r=a).$options.inject,r))&&(Te(!1),Object.keys(o).forEach(function(e){Me(r,e,o[e],function(){ue('Avoid mutating an injected value directly since the changes will be overwritten whenever the provided component re-renders. injection being mutated: "'+e+'"',r)})}),Te(!0)),Dn(a),(e=(i=a).$options.provide)&&(i._provided="function"==typeof e?e.call(i):e),_n(a,"created"),F.performance&&at&&(a._name=pe(a,!1),at(n),st("vue "+a._name+" init",t,n)),a.$options.el&&a.$mount(a.$options.el)},Bn=Yn,zn={get:function(){return this._props}},(qn={get:function(){return this._data}}).set=function(){ue("Avoid replacing instance root $data. Use nested data properties instead.",this)},zn.set=function(){ue("$props is readonly.",this)},Object.defineProperty(Bn.prototype,"$data",qn),Object.defineProperty(Bn.prototype,"$props",zn),Bn.prototype.$set=Ne,Bn.prototype.$delete=Pe,Bn.prototype.$watch=function(e,t,n){if(p(t))return Vn(this,e,t,n);(n=n||{}).user=!0;var r=new Pn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){Ye(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}},Gn=/^hook:/,(Jn=Yn).prototype.$on=function(e,t){var n=this;if(Array.isArray(e))for(var r=0,o=e.length;r<o;r++)n.$on(e[r],t);else(n._events[e]||(n._events[e]=[])).push(t),Gn.test(e)&&(n._hasHookEvent=!0);return n},Jn.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},Jn.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,o=e.length;r<o;r++)n.$off(e[r],t);return n}var i,a=n._events[e];if(!a)return n;if(!t)return n._events[e]=null,n;for(var s=a.length;s--;)if((i=a[s])===t||i.fn===t){a.splice(s,1);break}return n},Jn.prototype.$emit=function(e){var t=this,n=e.toLowerCase();if(n!==e&&t._events[n]&&le('Event "'+n+'" is emitted in component '+pe(t)+' but the handler is registered for "'+e+'". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "'+b(e)+'" instead of "'+e+'".'),r=t._events[e])for(var r=1<r.length?w(r):r,o=w(arguments,1),i='event handler for "'+e+'"',a=0,s=r.length;a<s;a++)Qe(r[a],t,o,t,i);return t},(Kn=Yn).prototype._update=function(e,t){var n=this,r=n.$el,o=n._vnode,i=yn(n);n._vnode=e,n.$el=o?n.__patch__(o,e):n.__patch__(n.$el,e,t,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},Kn.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},Kn.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){_n(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||v(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),_n(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}},Wt((Wn=Yn).prototype),Wn.prototype.$nextTick=function(e){return pt(e,this)},Wn.prototype._render=function(){var t,n=this,e=n.$options,r=e.render,e=e._parentVnode;e&&(n.$scopedSlots=Pt(e.data.scopedSlots,n.$slots,n.$scopedSlots)),n.$vnode=e;try{sn=n,t=r.call(n._renderProxy,n.$createElement)}catch(e){if(Ye(e,n,"render"),n.$options.renderError)try{t=n.$options.renderError.call(n._renderProxy,n.$createElement,e)}catch(e){Ye(e,n,"renderError"),t=n._vnode}else t=n._vnode}finally{sn=null}return(t=Array.isArray(t)&&1===t.length?t[0]:t)instanceof _e||(Array.isArray(t)&&ue("Multiple root nodes returned from render function. Render function should return a single root node.",n),t=xe()),t.parent=e,t};var or,ir,ar,sr=[String,RegExp,Array],cr={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:sr,exclude:sr,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)rr(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",function(t){nr(e,function(e){return tr(t,e)})}),this.$watch("exclude",function(t){nr(e,function(e){return!tr(t,e)})})},render:function(){var e=this.$slots.default,t=ln(e),n=t&&t.componentOptions;if(n){var r=er(n),o=this.include,i=this.exclude;if(o&&(!r||!tr(o,r))||i&&r&&tr(i,r))return t;i=this.cache,r=this.keys,n=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;i[n]?(t.componentInstance=i[n].componentInstance,v(r,n),r.push(n)):(i[n]=t,r.push(n),this.max&&r.length>parseInt(this.max)&&rr(i,r[0],r,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};or=Yn,ar={get:function(){return F},set:function(){ue("Do not replace the Vue.config object, set individual fields instead.")}},Object.defineProperty(or,"config",ar),or.util={warn:ue,extend:x,mergeOptions:Be,defineReactive:Me},or.set=Ne,or.delete=Pe,or.nextTick=pt,or.observable=function(e){return Ee(e),e},or.options=Object.create(null),T.forEach(function(e){or.options[e+"s"]=Object.create(null)}),x((or.options._base=or).options.components,cr),or.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(-1<t.indexOf(e))return this;var n=w(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this},or.mixin=function(e){return this.options=Be(this.options,e),this},Qn(or),ir=or,T.forEach(function(n){ir[n]=function(e,t){return t?("component"===n&&He(e),"component"===n&&p(t)&&(t.name=t.name||e,t=this.options._base.extend(t)),this.options[n+"s"][e]=t="directive"===n&&"function"==typeof t?{bind:t,update:t}:t):this.options[n+"s"][e]}}),Object.defineProperty(Yn.prototype,"$isServer",{get:oe}),Object.defineProperty(Yn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Yn,"FunctionalRenderContext",{value:Xt}),Yn.version="2.6.10";var K=M("style,class"),ur=M("input,textarea,option,select,progress"),W=function(e,t,n){return"value"===n&&ur(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},lr=M("contenteditable,draggable,spellcheck"),fr=M("events,caret,typing,plaintext-only"),pr=function(e,t){return yr(t)||"false"===t?"false":"contenteditable"===e&&fr(t)?t:"true"},dr=M("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),hr="http://www.w3.org/1999/xlink",vr=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},mr=function(e){return vr(e)?e.slice(6,e.length):""},yr=function(e){return null==e||!1===e};function gr(e){for(var t=e.data,n=e,r=e;P(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=br(r.data,t));for(;P(n=n.parent);)n&&n.data&&(t=br(t,n.data));return function(e,t){if(P(e)||P(t))return _r(e,wr(t));return""}(t.staticClass,t.class)}function br(e,t){return{staticClass:_r(e.staticClass,t.staticClass),class:P(e.class)?[e.class,t.class]:t.class}}function _r(e,t){return e?t?e+" "+t:e:t||""}function wr(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,o=e.length;r<o;r++)P(t=wr(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):I(e)?function(e){var t,n="";for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}(e):"string"==typeof e?e:""}function xr(e){return Cr(e)||kr(e)}var $r={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Cr=M("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),kr=M("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0);function Ar(e){return kr(e)?"svg":"math"===e?"math":void 0}var Or=Object.create(null);var Sr=M("text,number,password,search,email,tel,url");function Tr(e){if("string"!=typeof e)return e;var t=document.querySelector(e);return t||(ue("Cannot find element: "+e),document.createElement("div"))}re=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS($r[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),we={create:function(e,t){jr(t)},update:function(e,t){e.data.ref!==t.data.ref&&(jr(e,!0),jr(t))},destroy:function(e){jr(e,!0)}};function jr(e,t){var n,r,o=e.data.ref;P(o)&&(r=e.context,n=e.componentInstance||e.elm,r=r.$refs,t?Array.isArray(r[o])?v(r[o],n):r[o]===n&&(r[o]=void 0):e.data.refInFor?Array.isArray(r[o])?r[o].indexOf(n)<0&&r[o].push(n):r[o]=[n]:r[o]=n)}var Er=new _e("",{},[]),Mr=["create","activate","update","remove","destroy"];function Nr(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&P(e.data)===P(t.data)&&function(e,t){if("input"!==e.tag)return 1;var e=P(n=e.data)&&P(n=n.attrs)&&n.type,n=P(n=t.data)&&P(n=n.attrs)&&n.type;return e===n||Sr(e)&&Sr(n)}(e,t)||E(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&N(t.asyncFactory.error))}j={create:Pr,update:Pr,destroy:function(e){Pr(e,Er)}};function Pr(e,t){(e.data.directives||t.data.directives)&&function(t,n){var e,r,o,i=t===Er,a=n===Er,s=Lr(t.data.directives,t.context),c=Lr(n.data.directives,n.context),u=[],l=[];for(e in c)r=s[e],o=c[e],r?(o.oldValue=r.value,o.oldArg=r.arg,Dr(o,"update",n,t),o.def&&o.def.componentUpdated&&l.push(o)):(Dr(o,"bind",n,t),o.def&&o.def.inserted&&u.push(o));{var f;u.length&&(f=function(){for(var e=0;e<u.length;e++)Dr(u[e],"inserted",n,t)},i?Ot(n,"insert",f):f())}l.length&&Ot(n,"postpatch",function(){for(var e=0;e<l.length;e++)Dr(l[e],"componentUpdated",n,t)});if(!i)for(e in s)c[e]||Dr(s[e],"unbind",t,t,a)}(e,t)}var Ir=Object.create(null);function Lr(e,t){var n,r,o,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=Ir),(i[(o=r).rawName||o.name+"."+Object.keys(o.modifiers||{}).join(".")]=r).def=qe(t.$options,"directives",r.name,!0);return i}function Dr(t,n,r,e,o){var i=t.def&&t.def[n];if(i)try{i(r.elm,t,r,e,o)}catch(e){Ye(e,r.context,"directive "+t.name+" "+n+" hook")}}var Rr=[we,j];function Fr(e,t){var n=t.componentOptions;if(!(P(n)&&!1===n.Ctor.options.inheritAttrs||N(e.data.attrs)&&N(t.data.attrs))){var r,o,i=t.elm,a=e.data.attrs||{},s=t.data.attrs||{};for(r in s=P(s.__ob__)?t.data.attrs=x({},s):s)o=s[r],a[r]!==o&&Ur(i,r,o);for(r in(X||Y)&&s.value!==a.value&&Ur(i,"value",s.value),a)N(s[r])&&(vr(r)?i.removeAttributeNS(hr,mr(r)):lr(r)||i.removeAttribute(r))}}function Ur(e,t,n){-1<e.tagName.indexOf("-")?Hr(e,t,n):dr(t)?yr(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):lr(t)?e.setAttribute(t,pr(t,n)):vr(t)?yr(n)?e.removeAttributeNS(hr,mr(t)):e.setAttributeNS(hr,t,n):Hr(e,t,n)}function Hr(t,e,n){var r;yr(n)?t.removeAttribute(e):(!X||Z||"TEXTAREA"!==t.tagName||"placeholder"!==e||""===n||t.__ieph||(r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)},t.addEventListener("input",r),t.__ieph=!0),t.setAttribute(e,n))}sr={create:Fr,update:Fr};function Vr(e,t){var n=t.elm,r=t.data,e=e.data;N(r.staticClass)&&N(r.class)&&(N(e)||N(e.staticClass)&&N(e.class))||(e=gr(t),(e=P(t=n._transitionClasses)?_r(e,wr(t)):e)!==n._prevClass&&(n.setAttribute("class",e),n._prevClass=e))}var Br,qr,zr,Jr,Gr,Kr,Wr,we={create:Vr,update:Vr},Xr=/[\w).+\-_$\]]/;function Zr(e){for(var t,n,r,o,i=!1,a=!1,s=!1,c=!1,u=0,l=0,f=0,p=0,d=0;d<e.length;d++)if(n=t,t=e.charCodeAt(d),i)39===t&&92!==n&&(i=!1);else if(a)34===t&&92!==n&&(a=!1);else if(s)96===t&&92!==n&&(s=!1);else if(c)47===t&&92!==n&&(c=!1);else if(124!==t||124===e.charCodeAt(d+1)||124===e.charCodeAt(d-1)||u||l||f){switch(t){case 34:a=!0;break;case 39:i=!0;break;case 96:s=!0;break;case 40:f++;break;case 41:f--;break;case 91:l++;break;case 93:l--;break;case 123:u++;break;case 125:u--}if(47===t){for(var h=d-1,v=void 0;0<=h&&" "===(v=e.charAt(h));h--);v&&Xr.test(v)||(c=!0)}}else void 0===r?(p=d+1,r=e.slice(0,d).trim()):m();function m(){(o=o||[]).push(e.slice(p,d).trim()),p=d+1}if(void 0===r?r=e.slice(0,d).trim():0!==p&&m(),o)for(d=0;d<o.length;d++)r=function(e,t){var n=t.indexOf("(");{if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),n=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==n?","+n:n)}}(r,o[d]);return r}function Yr(e,t){console.error("[Vue compiler]: "+e)}function Qr(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function eo(e,t,n,r,o){(e.props||(e.props=[])).push(uo({name:t,value:n,dynamic:o},r)),e.plain=!1}function to(e,t,n,r,o){(o?e.dynamicAttrs||(e.dynamicAttrs=[]):e.attrs||(e.attrs=[])).push(uo({name:t,value:n,dynamic:o},r)),e.plain=!1}function no(e,t,n,r){e.attrsMap[t]=n,e.attrsList.push(uo({name:t,value:n},r))}function ro(e,t,n){return n?"_p("+t+',"'+e+'")':e+t}function oo(e,t,n,r,o,i,a,s){r=r||d,i&&r.prevent&&r.passive&&i("passive and prevent can't be used together. Passive handler can't prevent default event.",a),r.right?s?t="("+t+")==='click'?'contextmenu':("+t+")":"click"===t&&(t="contextmenu",delete r.right):r.middle&&(s?t="("+t+")==='click'?'mouseup':("+t+")":"click"===t&&(t="mouseup")),r.capture&&(delete r.capture,t=ro("!",t,s)),r.once&&(delete r.once,t=ro("~",t,s)),r.passive&&(delete r.passive,t=ro("&",t,s));i=r.native?(delete r.native,e.nativeEvents||(e.nativeEvents={})):e.events||(e.events={}),a=uo({value:n.trim(),dynamic:s},a);r!==d&&(a.modifiers=r);r=i[t];Array.isArray(r)?o?r.unshift(a):r.push(a):i[t]=r?o?[a,r]:[r,a]:a,e.plain=!1}function io(e,t){return e.rawAttrsMap[":"+t]||e.rawAttrsMap["v-bind:"+t]||e.rawAttrsMap[t]}function ao(e,t,n){var r=so(e,":"+t)||so(e,"v-bind:"+t);if(null!=r)return Zr(r);if(!1!==n){t=so(e,t);if(null!=t)return JSON.stringify(t)}}function so(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var o=e.attrsList,i=0,a=o.length;i<a;i++)if(o[i].name===t){o.splice(i,1);break}return n&&delete e.attrsMap[t],r}function co(e,t){for(var n=e.attrsList,r=0,o=n.length;r<o;r++){var i=n[r];if(t.test(i.name))return n.splice(r,1),i}}function uo(e,t){return t&&(null!=t.start&&(e.start=t.start),null!=t.end&&(e.end=t.end)),e}function lo(e,t,n){var r=n||{},o=r.number,n="$$v",n=r.trim?"(typeof $$v === 'string'? $$v.trim(): $$v)":n,n=fo(t,n=o?"_n("+n+")":n);e.model={value:"("+t+")",expression:JSON.stringify(t),callback:"function ($$v) {"+n+"}"}}function fo(e,t){var n=function(e){if(e=e.trim(),Br=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<Br-1)return-1<(Jr=e.lastIndexOf("."))?{exp:e.slice(0,Jr),key:'"'+e.slice(Jr+1)+'"'}:{exp:e,key:null};qr=e,Jr=Gr=Kr=0;for(;!ho();)vo(zr=po())?mo(zr):91===zr&&function(e){var t=1;Gr=Jr;for(;!ho();)if(vo(e=po()))mo(e);else if(91===e&&t++,93===e&&t--,0===t){Kr=Jr;break}}(zr);return{exp:e.slice(0,Gr),key:e.slice(Gr+1,Kr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function po(){return qr.charCodeAt(++Jr)}function ho(){return Br<=Jr}function vo(e){return 34===e||39===e}function mo(e){for(var t=e;!ho()&&(e=po())!==t;);}var yo,go="__r",bo="__c";function _o(t,n,r){var o=yo;return function e(){null!==n.apply(null,arguments)&&$o(t,e,r,o)}}var wo=ct&&!(ee&&Number(ee[1])<=53);function xo(e,t,n,r){var o,i;wo&&(o=jn,t=(i=t)._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=o||e.timeStamp<=0||e.target.ownerDocument!==document)return i.apply(this,arguments)}),yo.addEventListener(e,t,ne?{capture:n,passive:r}:n)}function $o(e,t,n,r){(r||yo).removeEventListener(e,t._wrapper||t,n)}function Co(e,t){var n,r,o;N(e.data.on)&&N(t.data.on)||(n=t.data.on||{},r=e.data.on||{},yo=t.elm,P((o=n)[go])&&(o[e=X?"change":"input"]=[].concat(o[go],o[e]||[]),delete o[go]),P(o[bo])&&(o.change=[].concat(o[bo],o.change||[]),delete o[bo]),At(n,r,xo,$o,_o,t.context),yo=void 0)}var ko,j={create:Co,update:Co};function Ao(e,t){if(!N(e.data.domProps)||!N(t.data.domProps)){var n,r,o,i,a=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in P(c.__ob__)&&(c=t.data.domProps=x({},c)),s)n in c||(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){var u=N(a._value=r)?"":String(r);i=u,(o=a).composing||"OPTION"!==o.tagName&&!function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(o,i)&&!function(e,t){var n=e.value,e=e._vModifiers;if(P(e)){if(e.number)return L(n)!==L(t);if(e.trim)return n.trim()!==t.trim()}return n!==t}(o,i)||(a.value=u)}else if("innerHTML"===n&&kr(a.tagName)&&N(a.innerHTML)){(ko=ko||document.createElement("div")).innerHTML="<svg>"+r+"</svg>";for(var l=ko.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(r!==s[n])try{a[n]=r}catch(e){}}}}var ct={create:Ao,update:Ao},Oo=e(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){!e||1<(e=e.split(n)).length&&(t[e[0].trim()]=e[1].trim())}),t});function So(e){var t=To(e.style);return e.staticStyle?x(e.staticStyle,t):t}function To(e){return Array.isArray(e)?$(e):"string"==typeof e?Oo(e):e}function jo(e,t,n){if(Mo.test(t))e.style.setProperty(t,n);else if(No.test(n))e.style.setProperty(b(t),n.replace(No,""),"important");else{var r=Io(t);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)e.style[r]=n[o];else e.style[r]=n}}var Eo,Mo=/^--/,No=/\s*!important$/,Po=["Webkit","Moz","ms"],Io=e(function(e){if(Eo=Eo||document.createElement("div").style,"filter"!==(e=y(e))&&e in Eo)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Po.length;n++){var r=Po[n]+t;if(r in Eo)return r}});function Lo(e,t){var n=t.data,e=e.data;if(!(N(n.staticStyle)&&N(n.style)&&N(e.staticStyle)&&N(e.style))){var r,o,i=t.elm,n=e.staticStyle,e=e.normalizedStyle||e.style||{},a=n||e,e=To(t.data.style)||{};t.data.normalizedStyle=P(e.__ob__)?x({},e):e;var s=function(e,t){var n,r={};if(t)for(var o=e;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=So(o.data))&&x(r,n);(n=So(e.data))&&x(r,n);for(var i=e;i=i.parent;)i.data&&(n=So(i.data))&&x(r,n);return r}(t,!0);for(o in a)N(s[o])&&jo(i,o,"");for(o in s)(r=s[o])!==a[o]&&jo(i,o,null==r?"":r)}}var ee={create:Lo,update:Lo},Do=/\s+/;function Ro(t,e){var n;(e=e&&e.trim())&&(t.classList?-1<e.indexOf(" ")?e.split(Do).forEach(function(e){return t.classList.add(e)}):t.classList.add(e):(n=" "+(t.getAttribute("class")||"")+" ").indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim()))}function Fo(t,e){if(e=e&&e.trim())if(t.classList)-1<e.indexOf(" ")?e.split(Do).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";0<=n.indexOf(r);)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Uo(e){if(e){if("object"!=typeof e)return"string"==typeof e?Ho(e):void 0;var t={};return!1!==e.css&&x(t,Ho(e.name||"v")),x(t,e),t}}var Ho=e(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),Vo=J&&!Z,Bo="transition",qo="animation",zo="transition",Jo="transitionend",Go="animation",Ko="animationend";Vo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(zo="WebkitTransition",Jo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Go="WebkitAnimation",Ko="webkitAnimationEnd"));var Wo=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Xo(e){Wo(function(){Wo(e)})}function Zo(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Ro(e,t))}function Yo(e,t){e._transitionClasses&&v(e._transitionClasses,t),Fo(e,t)}function Qo(t,e,n){var r=ti(t,e),o=r.type,e=r.timeout,i=r.propCount;if(!o)return n();function a(){t.removeEventListener(s,u),n()}var s=o===Bo?Jo:Ko,c=0,u=function(e){e.target===t&&++c>=i&&a()};setTimeout(function(){c<i&&a()},e+1),t.addEventListener(s,u)}var ei=/\b(transform|all)(,|$)/;function ti(e,t){var n,r=window.getComputedStyle(e),o=(r[zo+"Delay"]||"").split(", "),i=(r[zo+"Duration"]||"").split(", "),a=ni(o,i),s=(r[Go+"Delay"]||"").split(", "),c=(r[Go+"Duration"]||"").split(", "),e=ni(s,c),o=0,s=0;return t===Bo?0<a&&(n=Bo,o=a,s=i.length):t===qo?0<e&&(n=qo,o=e,s=c.length):s=(n=0<(o=Math.max(a,e))?e<a?Bo:qo:null)?(n===Bo?i:c).length:0,{type:n,timeout:o,propCount:s,hasTransform:n===Bo&&ei.test(r[zo+"Property"])}}function ni(n,e){for(;n.length<e.length;)n=n.concat(n);return Math.max.apply(null,e.map(function(e,t){return ri(e)+ri(n[t])}))}function ri(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function oi(t,e){var n=t.elm;P(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=Uo(t.data.transition);if(!N(r)&&!P(n._enterCb)&&1===n.nodeType){for(var o=r.css,i=r.type,a=r.enterClass,s=r.enterToClass,c=r.enterActiveClass,u=r.appearClass,l=r.appearToClass,f=r.appearActiveClass,p=r.beforeEnter,d=r.enter,h=r.afterEnter,v=r.enterCancelled,m=r.beforeAppear,y=r.appear,g=r.afterAppear,b=r.appearCancelled,_=r.duration,w=vn,x=vn.$vnode;x&&x.parent;)w=x.context,x=x.parent;var $,C,k,A,O,S,T,j,E,M,r=!w._isMounted||!t.isRootInsert;r&&!y&&""!==y||($=r&&u?u:a,C=r&&f?f:c,k=r&&l?l:s,p=r&&m||p,A=r&&"function"==typeof y?y:d,O=r&&g||h,S=r&&b||v,null!=(T=L(I(_)?_.enter:_))&&ai(T,"enter",t),j=!1!==o&&!Z,E=ci(A),M=n._enterCb=D(function(){j&&(Yo(n,k),Yo(n,C)),M.cancelled?(j&&Yo(n,$),S&&S(n)):O&&O(n),n._enterCb=null}),t.data.show||Ot(t,"insert",function(){var e=n.parentNode,e=e&&e._pending&&e._pending[t.key];e&&e.tag===t.tag&&e.elm._leaveCb&&e.elm._leaveCb(),A&&A(n,M)}),p&&p(n),j&&(Zo(n,$),Zo(n,C),Xo(function(){Yo(n,$),M.cancelled||(Zo(n,k),E||(si(T)?setTimeout(M,T):Qo(n,i,M)))})),t.data.show&&(e&&e(),A&&A(n,M)),j||E||M())}}function ii(e,t){var n=e.elm;P(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r,o,i,a,s,c,u,l,f,p,d,h,v,m,y=Uo(e.data.transition);if(N(y)||1!==n.nodeType)return t();function g(){m.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),c&&c(n),d&&(Zo(n,i),Zo(n,s),Xo(function(){Yo(n,i),m.cancelled||(Zo(n,a),h||(si(v)?setTimeout(m,v):Qo(n,o,m)))})),u&&u(n,m),d||h||m())}P(n._leaveCb)||(r=y.css,o=y.type,i=y.leaveClass,a=y.leaveToClass,s=y.leaveActiveClass,c=y.beforeLeave,u=y.leave,l=y.afterLeave,f=y.leaveCancelled,p=y.delayLeave,y=y.duration,d=!1!==r&&!Z,h=ci(u),P(v=L(I(y)?y.leave:y))&&ai(v,"leave",e),m=n._leaveCb=D(function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),d&&(Yo(n,a),Yo(n,s)),m.cancelled?(d&&Yo(n,i),f&&f(n)):(t(),l&&l(n)),n._leaveCb=null}),p?p(g):g())}function ai(e,t,n){"number"!=typeof e?ue("<transition> explicit "+t+" duration is not a valid number - got "+JSON.stringify(e)+".",n.context):isNaN(e)&&ue("<transition> explicit "+t+" duration is NaN - the duration expression might be incorrect.",n.context)}function si(e){return"number"==typeof e&&!isNaN(e)}function ci(e){if(N(e))return!1;var t=e.fns;return P(t)?ci(Array.isArray(t)?t[0]:t):1<(e._length||e.length)}function ui(e,t){!0!==t.data.show&&oi(t)}we=function(e){for(var t,h={},n=e.modules,y=e.nodeOps,r=0;r<Mr.length;++r)for(h[Mr[r]]=[],t=0;t<n.length;++t)P(n[t][Mr[r]])&&h[Mr[r]].push(n[t][Mr[r]]);function i(e,t){function n(){0==--n.listeners&&a(e)}return n.listeners=t,n}function a(e){var t=y.parentNode(e);P(t)&&y.removeChild(t,e)}function m(t,e){return!e&&!t.ns&&(!F.ignoredElements.length||!F.ignoredElements.some(function(e){return o(e)?e.test(t.tag):e===t.tag}))&&F.isUnknownElement(t.tag)}var s=0;function g(e,t,n,r,o,i,a){(e=P(e.elm)&&P(i)?i[a]=Ce(e):e).isRootInsert=!o,function(e,t,n,r){var o=e.data;if(P(o)){var i=P(e.componentInstance)&&o.keepAlive;if(P(o=o.hook)&&P(o=o.init)&&o(e,!1),P(e.componentInstance))return b(e,t),c(n,e.elm,r),E(i)&&function(e,t,n,r){var o,i=e;for(;i.componentInstance;)if(i=i.componentInstance._vnode,P(o=i.data)&&P(o=o.transition)){for(o=0;o<h.activate.length;++o)h.activate[o](Er,i);t.push(i);break}c(n,e.elm,r)}(e,t,n,r),!0}}(e,t,n,r)||(i=e.data,a=e.children,P(o=e.tag)?(i&&i.pre&&s++,m(e,s)&&ue("Unknown custom element: <"+o+'> - did you register the component correctly? For recursive components, make sure to provide the "name" option.',e.context),e.elm=e.ns?y.createElementNS(e.ns,o):y.createElement(o,e),u(e),_(e,a,t),P(i)&&w(e,t),c(n,e.elm,r),i&&i.pre&&s--):(E(e.isComment)?e.elm=y.createComment(e.text):e.elm=y.createTextNode(e.text),c(n,e.elm,r)))}function b(e,t){P(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,v(e)?(w(e,t),u(e)):(jr(e),t.push(e))}function c(e,t,n){P(e)&&(P(n)?y.parentNode(n)===e&&y.insertBefore(e,t,n):y.appendChild(e,t))}function _(e,t,n){if(Array.isArray(t)){k(t);for(var r=0;r<t.length;++r)g(t[r],n,e.elm,null,!0,t,r)}else f(e.text)&&y.appendChild(e.elm,y.createTextNode(String(e.text)))}function v(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return P(e.tag)}function w(e,t){for(var n=0;n<h.create.length;++n)h.create[n](Er,e);P(r=e.data.hook)&&(P(r.create)&&r.create(Er,e),P(r.insert)&&t.push(e))}function u(e){var t;if(P(t=e.fnScopeId))y.setStyleScope(e.elm,t);else for(var n=e;n;)P(t=n.context)&&P(t=t.$options._scopeId)&&y.setStyleScope(e.elm,t),n=n.parent;P(t=vn)&&t!==e.context&&t!==e.fnContext&&P(t=t.$options._scopeId)&&y.setStyleScope(e.elm,t)}function x(e,t,n,r,o,i){for(;r<=o;++r)g(n[r],i,e,t,!1,n,r)}function $(e){var t,n,r=e.data;if(P(r))for(P(t=r.hook)&&P(t=t.destroy)&&t(e),t=0;t<h.destroy.length;++t)h.destroy[t](e);if(P(t=e.children))for(n=0;n<e.children.length;++n)$(e.children[n])}function C(e,t,n,r){for(;n<=r;++n){var o=t[n];P(o)&&(P(o.tag)?(function e(t,n){if(P(n)||P(t.data)){var r,o=h.remove.length+1;for(P(n)?n.listeners+=o:n=i(t.elm,o),P(r=t.componentInstance)&&P(r=r._vnode)&&P(r.data)&&e(r,n),r=0;r<h.remove.length;++r)h.remove[r](t,n);P(r=t.data.hook)&&P(r=r.remove)?r(t,n):n()}else a(t.elm)}(o),$(o)):a(o.elm))}}function l(e,t,n,r,o){var i,a,s,c=0,u=0,l=t.length-1,f=t[0],p=t[l],d=n.length-1,h=n[0],v=n[d],m=!o;for(k(n);c<=l&&u<=d;)N(f)?f=t[++c]:N(p)?p=t[--l]:Nr(f,h)?(A(f,h,r,n,u),f=t[++c],h=n[++u]):Nr(p,v)?(A(p,v,r,n,d),p=t[--l],v=n[--d]):Nr(f,v)?(A(f,v,r,n,d),m&&y.insertBefore(e,f.elm,y.nextSibling(p.elm)),f=t[++c],v=n[--d]):h=(Nr(p,h)?(A(p,h,r,n,u),m&&y.insertBefore(e,p.elm,f.elm),p=t[--l]):(N(i)&&(i=function(e,t,n){for(var r,o={},i=t;i<=n;++i)P(r=e[i].key)&&(o[r]=i);return o}(t,c,l)),!N(a=P(h.key)?i[h.key]:function(e,t,n,r){for(var o=n;o<r;o++){var i=t[o];if(P(i)&&Nr(e,i))return o}}(h,t,c,l))&&Nr(s=t[a],h)?(A(s,h,r,n,u),t[a]=void 0,m&&y.insertBefore(e,s.elm,f.elm)):g(h,r,e,f.elm,!1,n,u)),n[++u]);l<c?x(e,N(n[d+1])?null:n[d+1].elm,n,u,d,r):d<u&&C(0,t,c,l)}function k(e){for(var t={},n=0;n<e.length;n++){var r=e[n],o=r.key;P(o)&&(t[o]?ue("Duplicate keys detected: '"+o+"'. This may cause an update error.",r.context):t[o]=!0)}}function A(e,t,n,r,o,i){if(e!==t){var a=(t=P(t.elm)&&P(r)?r[o]=Ce(t):t).elm=e.elm;if(E(e.isAsyncPlaceholder))P(t.asyncFactory.resolved)?j(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(E(t.isStatic)&&E(e.isStatic)&&t.key===e.key&&(E(t.isCloned)||E(t.isOnce)))t.componentInstance=e.componentInstance;else{var s,c=t.data;P(c)&&P(s=c.hook)&&P(s=s.prepatch)&&s(e,t);r=e.children,o=t.children;if(P(c)&&v(t)){for(s=0;s<h.update.length;++s)h.update[s](e,t);P(s=c.hook)&&P(s=s.update)&&s(e,t)}N(t.text)?P(r)&&P(o)?r!==o&&l(a,r,o,n,i):P(o)?(k(o),P(e.text)&&y.setTextContent(a,""),x(a,null,o,0,o.length-1,n)):P(r)?C(0,r,0,r.length-1):P(e.text)&&y.setTextContent(a,""):e.text!==t.text&&y.setTextContent(a,t.text),P(c)&&P(s=c.hook)&&P(s=s.postpatch)&&s(e,t)}}}function O(e,t,n){if(E(n)&&P(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var S=!1,T=M("attrs,class,staticClass,staticStyle,key");function j(e,t,n,r){var o,i,a,s,c=t.tag,u=t.data,l=t.children;if(r=r||u&&u.pre,t.elm=e,E(t.isComment)&&P(t.asyncFactory))return t.isAsyncPlaceholder=!0;if(i=e,s=r,P((a=t).tag)?0===a.tag.indexOf("vue-component")||!m(a,s)&&a.tag.toLowerCase()===(i.tagName&&i.tagName.toLowerCase()):i.nodeType===(a.isComment?8:3)){if(P(u)&&(P(o=u.hook)&&P(o=o.init)&&o(t,!0),P(o=t.componentInstance)))return b(t,n),1;if(P(c)){if(P(l))if(e.hasChildNodes())if(P(o=u)&&P(o=o.domProps)&&P(o=o.innerHTML)){if(o!==e.innerHTML)return void("undefined"==typeof console||S||(S=!0,console.warn("Parent: ",e),console.warn("server innerHTML: ",o),console.warn("client innerHTML: ",e.innerHTML)))}else{for(var f=!0,p=e.firstChild,d=0;d<l.length;d++){if(!p||!j(p,l[d],n,r)){f=!1;break}p=p.nextSibling}if(!f||p)return void("undefined"==typeof console||S||(S=!0,console.warn("Parent: ",e),console.warn("Mismatching childNodes vs. VNodes: ",e.childNodes,l)))}else _(t,l,n);if(P(u)){var h,v=!1;for(h in u)if(!T(h)){v=!0,w(t,n);break}!v&&u.class&&$t(u.class)}}else e.data!==t.text&&(e.data=t.text);return 1}}return function(e,t,n,r){if(!N(t)){var o=!1,i=[];if(N(e))o=!0,g(t,i);else{var a=P(e.nodeType);if(!a&&Nr(e,t))A(e,t,i,null,null,r);else{if(a){if(1===e.nodeType&&e.hasAttribute(R)&&(e.removeAttribute(R),n=!0),E(n)){if(j(e,t,i))return O(t,i,!0),e;ue("The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.")}s=e,e=new _e(y.tagName(s).toLowerCase(),{},[],void 0,s)}var n=e.elm,s=y.parentNode(n);if(g(t,i,n._leaveCb?null:s,y.nextSibling(n)),P(t.parent))for(var c=t.parent,u=v(t);c;){for(var l=0;l<h.destroy.length;++l)h.destroy[l](c);if(c.elm=t.elm,u){for(var f=0;f<h.create.length;++f)h.create[f](Er,c);var p=c.data.hook.insert;if(p.merged)for(var d=1;d<p.fns.length;d++)p.fns[d]()}else jr(c);c=c.parent}P(s)?C(0,[e],0,0):P(e.tag)&&$(e)}}return O(t,i,o),t.elm}P(e)&&$(e)}}({nodeOps:re,modules:[sr,we,j,ct,ee,J?{create:ui,activate:ui,remove:function(e,t){!0!==e.data.show?ii(e,t):t()}}:{}].concat(Rr)});Z&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&yi(e,"input")});var li={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Ot(n,"postpatch",function(){li.componentUpdated(e,t,n)}):fi(e,t,n.context),e._vOptions=[].map.call(e.options,hi)):"textarea"!==n.tag&&!Sr(e.type)||(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",vi),e.addEventListener("compositionend",mi),e.addEventListener("change",mi),Z&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){var r,o;"select"===n.tag&&(fi(e,t,n.context),r=e._vOptions,(o=e._vOptions=[].map.call(e.options,hi)).some(function(e,t){return!O(e,r[t])})&&(e.multiple?t.value.some(function(e){return di(e,o)}):t.value!==t.oldValue&&di(t.value,o))&&yi(e,"change"))}};function fi(e,t,n){pi(e,t,n),(X||Y)&&setTimeout(function(){pi(e,t,n)},0)}function pi(e,t,n){var r=t.value,o=e.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],o)i=-1<S(r,hi(a)),a.selected!==i&&(a.selected=i);else if(O(hi(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));o||(e.selectedIndex=-1)}else ue('<select multiple v-model="'+t.expression+'"> expects an Array value for its binding, but got '+Object.prototype.toString.call(r).slice(8,-1),n)}function di(t,e){return e.every(function(e){return!O(e,t)})}function hi(e){return"_value"in e?e._value:e.value}function vi(e){e.target.composing=!0}function mi(e){e.target.composing&&(e.target.composing=!1,yi(e.target,"input"))}function yi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function gi(e){return!e.componentInstance||e.data&&e.data.transition?e:gi(e.componentInstance._vnode)}j={model:li,show:{bind:function(e,t,n){var r=t.value,t=(n=gi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&t?(n.data.show=!0,oi(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=gi(n)).data&&n.data.transition?(n.data.show=!0,r?oi(n,function(){e.style.display=e.__vOriginalDisplay}):ii(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,o){o||(e.style.display=e.__vOriginalDisplay)}}},ct={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function bi(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?bi(ln(t.children)):e}function _i(e){var t,n={},r=e.$options;for(t in r.propsData)n[t]=e[t];var o,i=r._parentListeners;for(o in i)n[y(o)]=i[o];return n}function wi(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function xi(e){return e.tag||un(e)}function $i(e){return"show"===e.name}ee={name:"transition",props:ct,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(xi)).length){1<n.length&&ue("<transition> can only be used on a single element. Use <transition-group> for lists.",this.$parent);var r=this.mode;r&&"in-out"!==r&&"out-in"!==r&&ue("invalid <transition> mode: "+r,this.$parent);var o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return 1}(this.$vnode))return o;var i=bi(o);if(!i)return o;if(this._leaving)return wi(e,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:!f(i.key)||0===String(i.key).indexOf(a)?i.key:a+i.key;var s=(i.data||(i.data={})).transition=_i(this),c=this._vnode,u=bi(c);if(i.data.directives&&i.data.directives.some($i)&&(i.data.show=!0),u&&u.data&&(n=i,(a=u).key!==n.key||a.tag!==n.tag)&&!un(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){u=u.data.transition=x({},s);if("out-in"===r)return this._leaving=!0,Ot(u,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),wi(e,o);if("in-out"===r){if(un(i))return c;var l,c=function(){l()};Ot(s,"afterEnter",c),Ot(s,"enterCancelled",c),Ot(u,"delayLeave",function(e){l=e})}}return o}}},Rr=x({tag:String,moveClass:String},ct);function Ci(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function ki(e){e.data.newPos=e.elm.getBoundingClientRect()}function Ai(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,n=t.top-n.top;(r||n)&&(e.data.moved=!0,(e=e.elm.style).transform=e.WebkitTransform="translate("+r+"px,"+n+"px)",e.transitionDuration="0s")}delete Rr.mode;ct={Transition:ee,TransitionGroup:{props:Rr,beforeMount:function(){var r=this,o=this._update;this._update=function(e,t){var n=yn(r);r.__patch__(r._vnode,r.kept,!1,!0),r._vnode=r.kept,n(),o.call(r,e,t)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=_i(this),s=0;s<o.length;s++){var c,u=o[s];u.tag&&(null!=u.key&&0!==String(u.key).indexOf("__vlist")?(i.push(u),((n[u.key]=u).data||(u.data={})).transition=a):(u=(c=u.componentOptions)?c.Ctor.options.name||c.tag||"":u.tag,ue("<transition-group> children must be keyed: <"+u+">")))}if(r){for(var l=[],f=[],p=0;p<r.length;p++){var d=r[p];d.data.transition=a,d.data.pos=d.elm.getBoundingClientRect(),(n[d.key]?l:f).push(d)}this.kept=e(t,null,l),this.removed=f}return e(t,null,i)},updated:function(){var e=this.prevChildren,r=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,r)&&(e.forEach(Ci),e.forEach(ki),e.forEach(Ai),this._reflow=document.body.offsetHeight,e.forEach(function(e){var n;e.data.moved&&(e=(n=e.elm).style,Zo(n,r),e.transform=e.WebkitTransform=e.transitionDuration="",n.addEventListener(Jo,n._moveCb=function e(t){t&&t.target!==n||t&&!/transform$/.test(t.propertyName)||(n.removeEventListener(Jo,e),n._moveCb=null,Yo(n,r))}))}))},methods:{hasMove:function(e,t){if(!Vo)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){Fo(n,e)}),Ro(n,t),n.style.display="none",this.$el.appendChild(n);t=ti(n);return this.$el.removeChild(n),this._hasMove=t.hasTransform}}}};Yn.config.mustUseProp=W,Yn.config.isReservedTag=xr,Yn.config.isReservedAttr=K,Yn.config.getTagNamespace=Ar,Yn.config.isUnknownElement=function(e){if(!J)return!0;if(xr(e))return!1;if(e=e.toLowerCase(),null!=Or[e])return Or[e];var t=document.createElement(e);return-1<e.indexOf("-")?Or[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Or[e]=/HTMLUnknownElement/.test(t.toString())},x(Yn.options.directives,j),x(Yn.options.components,ct),Yn.prototype.__patch__=J?we:C,Yn.prototype.$mount=function(e,t){return e=e&&J?Tr(e):void 0,e=e,i=t,(o=this).$el=e,o.$options.render||(o.$options.render=xe,o.$options.template&&"#"!==o.$options.template.charAt(0)||o.$options.el||e?ue("You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.",o):ue("Failed to mount component: template or render function not defined.",o)),_n(o,"beforeMount"),e=F.performance&&at?function(){var e=o._name,t=o._uid,n="vue-perf-start:"+t,r="vue-perf-end:"+t;at(n);t=o._render();at(r),st("vue "+e+" render",n,r),at(n),o._update(t,i),at(r),st("vue "+e+" patch",n,r)}:function(){o._update(o._render(),i)},new Pn(o,e,C,{before:function(){o._isMounted&&!o._isDestroyed&&_n(o,"beforeUpdate")}},!0),i=!1,null==o.$vnode&&(o._isMounted=!0,_n(o,"mounted")),o;var o,i},J&&setTimeout(function(){F.devtools&&(ie?ie.emit("init",Yn):console[console.info?"info":"log"]("Download the Vue Devtools extension for a better development experience:\nhttps://github.com/vuejs/vue-devtools")),!1!==F.productionTip&&"undefined"!=typeof console&&console[console.info?"info":"log"]("You are running Vue in development mode.\nMake sure to turn on production mode when deploying for production.\nSee more tips at https://vuejs.org/guide/deployment.html")},0);var Oi=/\{\{((?:.|\r?\n)+?)\}\}/g,Si=/[-.*+?^${}()|[\]\/\\]/g,Ti=e(function(e){var t=e[0].replace(Si,"\\$&"),e=e[1].replace(Si,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+e,"g")});function ji(e,t){var n=t?Ti(t):Oi;if(n.test(e)){for(var r,o,i,a=[],s=[],c=n.lastIndex=0;r=n.exec(e);){c<(o=r.index)&&(s.push(i=e.slice(c,o)),a.push(JSON.stringify(i)));var u=Zr(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=o+r[0].length}return c<e.length&&(s.push(i=e.slice(c)),a.push(JSON.stringify(i))),{expression:a.join("+"),tokens:s}}}ee={staticKeys:["staticClass"],transformNode:function(e,t){var n=t.warn||Yr,r=so(e,"class");r&&ji(r,t.delimiters)&&n('class="'+r+'": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div class="{{ val }}">, use <div :class="val">.',e.rawAttrsMap.class),r&&(e.staticClass=JSON.stringify(r)),(r=ao(e,"class",!1))&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var Ei,Rr={staticKeys:["staticStyle"],transformNode:function(e,t){var n=t.warn||Yr,r=so(e,"style");r&&(ji(r,t.delimiters)&&n('style="'+r+'": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div style="{{ val }}">, use <div :style="val">.',e.rawAttrsMap.style),e.staticStyle=JSON.stringify(Oo(r))),(r=ao(e,"style",!1))&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},K=function(e){return(Ei=Ei||document.createElement("div")).innerHTML=e,Ei.textContent},j=M("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ct=M("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Mi=M("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Ni=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Pi=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,we="[a-zA-Z_][\\-\\.0-9_a-zA-Z"+U.source+"]*",we="((?:"+we+"\\:)?"+we+")",Ii=new RegExp("^<"+we),Li=/^\s*(\/?)>/,Di=new RegExp("^<\\/"+we+"[^>]*>"),Ri=/^<!DOCTYPE [^>]+>/i,Fi=/^<!\--/,Ui=/^<!\[/,Hi=M("script,style,textarea",!0),Vi={},Bi={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},qi=/&(?:lt|gt|quot|amp|#39);/g,zi=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,Ji=M("pre,textarea",!0),Gi=function(e,t){return e&&Ji(e)&&"\n"===t[0]};function Ki(o,u){for(var e,l,f=[],p=u.expectHTML,d=u.isUnaryTag||k,h=u.canBeLeftOpenTag||k,a=0;o;){if(e=o,l&&Hi(l)){var r=0,i=l.toLowerCase(),t=Vi[i]||(Vi[i]=new RegExp("([\\s\\S]*?)(</"+i+"[^>]*>)","i")),t=o.replace(t,function(e,t,n){return r=n.length,Hi(i)||"noscript"===i||(t=t.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Gi(i,t)&&(t=t.slice(1)),u.chars&&u.chars(t),""});a+=o.length-t.length,o=t,g(i,a-r,a)}else{var n=o.indexOf("<");if(0===n){if(Fi.test(o)){t=o.indexOf("--\x3e");if(0<=t){u.shouldKeepComment&&u.comment(o.substring(4,t),a,a+t+3),y(t+3);continue}}if(Ui.test(o)){var s=o.indexOf("]>");if(0<=s){y(s+2);continue}}s=o.match(Ri);if(s){y(s[0].length);continue}s=o.match(Di);if(s){var c=a;y(s[0].length),g(s[1],c,a);continue}c=function(){var e,t,n=o.match(Ii);if(n){var r={tagName:n[1],attrs:[],start:a};for(y(n[0].length);!(e=o.match(Li))&&(t=o.match(Pi)||o.match(Ni));)t.start=a,y(t[0].length),t.end=a,r.attrs.push(t);if(e)return r.unarySlash=e[1],y(e[0].length),r.end=a,r}}();if(c){!function(e){var t=e.tagName,n=e.unarySlash;p&&("p"===l&&Mi(t)&&g(l),h(t)&&l===t&&g(t));for(var n=d(t)||!!n,r=e.attrs.length,o=new Array(r),i=0;i<r;i++){var a=e.attrs[i],s=a[3]||a[4]||a[5]||"",c="a"===t&&"href"===a[1]?u.shouldDecodeNewlinesForHref:u.shouldDecodeNewlines;o[i]={name:a[1],value:function(e,t){return e.replace(t?zi:qi,function(e){return Bi[e]})}(s,c)},u.outputSourceRange&&(o[i].start=a.start+a[0].match(/^\s*/).length,o[i].end=a.end)}n||(f.push({tag:t,lowerCasedTag:t.toLowerCase(),attrs:o,start:e.start,end:e.end}),l=t);u.start&&u.start(t,o,n,e.start,e.end)}(c),Gi(c.tagName,o)&&y(1);continue}}var v,c=void 0,m=void 0;if(0<=n){for(m=o.slice(n);!(Di.test(m)||Ii.test(m)||Fi.test(m)||Ui.test(m)||(v=m.indexOf("<",1))<0);)n+=v,m=o.slice(n);c=o.substring(0,n)}(c=n<0?o:c)&&y(c.length),u.chars&&c&&u.chars(c,a-c.length,a)}if(o===e){u.chars&&u.chars(o),!f.length&&u.warn&&u.warn('Mal-formatted tag at end of template: "'+o+'"',{start:a+o.length});break}}function y(e){a+=e,o=o.substring(e)}function g(e,t,n){var r,o;if(null==t&&(t=a),null==n&&(n=a),e)for(o=e.toLowerCase(),r=f.length-1;0<=r&&f[r].lowerCasedTag!==o;r--);else r=0;if(0<=r){for(var i=f.length-1;r<=i;i--)(r<i||!e&&u.warn)&&u.warn("tag <"+f[i].tag+"> has no matching end tag.",{start:f[i].start,end:f[i].end}),u.end&&u.end(f[i].tag,t,n);f.length=r,l=r&&f[r-1].tag}else"br"===o?u.start&&u.start(e,[],!0,t,n):"p"===o&&(u.start&&u.start(e,[],!1,t,n),u.end&&u.end(e,t,n))}g()}var Wi,Xi,Zi,Yi,Qi,ea,ta,na,ra,oa=/^@|^v-on:/,ia=/^v-|^@|^:/,aa=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,sa=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ca=/^\(|\)$/g,ua=/^\[.*\]$/,la=/:(.*)$/,fa=/^:|^\.|^v-bind:/,pa=/\.[^.\]]+(?=[^\]]*$)/g,da=/^v-slot(:|$)|^#/,ha=/[\r\n]/,va=/\s+/g,ma=/[\s"'<>\/=]/,ya=e(K),ga="_empty_";function ba(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:function(e){for(var t={},n=0,r=e.length;n<r;n++)!t[e[n].name]||X||Y||Wi("duplicate attribute: "+e[n].name,e[n]),t[e[n].name]=e[n].value;return t}(t),rawAttrsMap:{},parent:n,children:[]}}function _a(s,u){Wi=u.warn||Yr,ea=u.isPreTag||k,ta=u.mustUseProp||k,na=u.getTagNamespace||k;var t=u.isReservedTag||k;ra=function(e){return!!e.component||!t(e.tag)},Zi=Qr(u.modules,"transformNode"),Yi=Qr(u.modules,"preTransformNode"),Qi=Qr(u.modules,"postTransformNode"),Xi=u.delimiters;var l,f,p=[],c=!1!==u.preserveWhitespace,d=u.whitespace,h=!1,v=!1,n=!1;function m(e,t){n||(n=!0,Wi(e,t))}function y(e){var t;r(e),h||e.processed||(e=wa(e,u)),p.length||e===l||(l.if&&(e.elseif||e.else)?(g(e),$a(l,{exp:e.elseif,block:e})):m("Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.",{start:e.start})),f&&!e.forbidden&&(e.elseif||e.else?function(e,t){t=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];" "!==e[t].text&&Wi('text "'+e[t].text.trim()+'" between v-if and v-else(-if) will be ignored.',e[t]),e.pop()}}(t.children);t&&t.if?$a(t,{exp:e.elseif,block:e}):Wi("v-"+(e.elseif?'else-if="'+e.elseif+'"':"else")+" used on element <"+e.tag+"> without corresponding v-if.",e.rawAttrsMap[e.elseif?"v-else-if":"v-else"])}(e,f):(e.slotScope&&(t=e.slotTarget||'"default"',(f.scopedSlots||(f.scopedSlots={}))[t]=e),f.children.push(e),e.parent=f)),e.children=e.children.filter(function(e){return!e.slotScope}),r(e),e.pre&&(h=!1),ea(e.tag)&&(v=!1);for(var n=0;n<Qi.length;n++)Qi[n](e,u)}function r(e){if(!v)for(var t;(t=e.children[e.children.length-1])&&3===t.type&&" "===t.text;)e.children.pop()}function g(e){"slot"!==e.tag&&"template"!==e.tag||m("Cannot use <"+e.tag+"> as component root element because it may contain multiple nodes.",{start:e.start}),e.attrsMap.hasOwnProperty("v-for")&&m("Cannot use v-for on stateful component root element because it renders multiple elements.",e.rawAttrsMap["v-for"])}return Ki(s,{warn:Wi,expectHTML:u.expectHTML,isUnaryTag:u.isUnaryTag,canBeLeftOpenTag:u.canBeLeftOpenTag,shouldDecodeNewlines:u.shouldDecodeNewlines,shouldDecodeNewlinesForHref:u.shouldDecodeNewlinesForHref,shouldKeepComment:u.comments,outputSourceRange:u.outputSourceRange,start:function(e,t,n,r,o){var i=f&&f.ns||na(e),a=ba(e,t=X&&"svg"===i?function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];ka.test(r.name)||(r.name=r.name.replace(Aa,""),t.push(r))}return t}(t):t,f);i&&(a.ns=i),u.outputSourceRange&&(a.start=r,a.end=o,a.rawAttrsMap=a.attrsList.reduce(function(e,t){return e[t.name]=t,e},{})),t.forEach(function(e){ma.test(e.name)&&Wi("Invalid dynamic argument expression: attribute names cannot contain spaces, quotes, <, >, / or =.",{start:e.start+e.name.indexOf("["),end:e.start+e.name.length})}),"style"!==(t=a).tag&&("script"!==t.tag||t.attrsMap.type&&"text/javascript"!==t.attrsMap.type)||oe()||(a.forbidden=!0,Wi("Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <"+e+">, as they will not be parsed.",{start:a.start}));for(var s,c=0;c<Yi.length;c++)a=Yi[c](a,u)||a;h||(null!=so(s=a,"v-pre")&&(s.pre=!0),a.pre&&(h=!0)),ea(a.tag)&&(v=!0),h?function(e){var t=e.attrsList,n=t.length;if(n)for(var r=e.attrs=new Array(n),o=0;o<n;o++)r[o]={name:t[o].name,value:JSON.stringify(t[o].value)},null!=t[o].start&&(r[o].start=t[o].start,r[o].end=t[o].end);else e.pre||(e.plain=!0)}(a):a.processed||(xa(a),(s=so(e=a,"v-if"))?(e.if=s,$a(e,{exp:s,block:e})):(null!=so(e,"v-else")&&(e.else=!0),(s=so(e,"v-else-if"))&&(e.elseif=s)),null!=so(s=a,"v-once")&&(s.once=!0)),l||g(l=a),n?y(a):(f=a,p.push(a))},end:function(e,t,n){var r=p[p.length-1];--p.length,f=p[p.length-1],u.outputSourceRange&&(r.end=n),y(r)},chars:function(e,t,n){var r,o,i,a;f?X&&"textarea"===f.tag&&f.attrsMap.placeholder===e||(r=f.children,(e=v||e.trim()?"script"===(o=f).tag||"style"===o.tag?e:ya(e):r.length?d?"condense"===d&&ha.test(e)?"":" ":c?" ":"":"")&&(v||"condense"!==d||(e=e.replace(va," ")),!h&&" "!==e&&(i=ji(e,Xi))?a={type:2,expression:i.expression,tokens:i.tokens,text:e}:" "===e&&r.length&&" "===r[r.length-1].text||(a={type:3,text:e}),a&&(u.outputSourceRange&&(a.start=t,a.end=n),r.push(a)))):e===s?m("Component template requires a root element, rather than just text.",{start:t}):(e=e.trim())&&m('text "'+e+'" outside root element will be ignored.',{start:t})},comment:function(e,t,n){f&&(e={type:3,text:e,isComment:!0},u.outputSourceRange&&(e.start=t,e.end=n),f.children.push(e))}}),l}function wa(e,t){var n,r;!function(e){var t=ao(e,"key");{var n,r;t&&("template"===e.tag&&Wi("<template> cannot be keyed. Place the key on real elements instead.",io(e,"key")),e.for&&(n=e.iterator2||e.iterator1,r=e.parent,n&&n===t&&r&&"transition-group"===r.tag&&Wi("Do not use v-for index as key on <transition-group> children, this is the same as not using keys.",io(e,"key"),!0)),e.key=t)}}(e),e.plain=!e.key&&!e.scopedSlots&&!e.attrsList.length,(n=ao(r=e,"ref"))&&(r.ref=n,r.refInFor=function(e){var t=e;for(;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(r)),function(e){"template"===e.tag?((t=so(e,"scope"))&&Wi('the "scope" attribute for scoped slots have been deprecated and replaced by "slot-scope" since 2.5. The new "slot-scope" attribute can also be used on plain elements in addition to <template> to denote scoped slots.',e.rawAttrsMap.scope,!0),e.slotScope=t||so(e,"slot-scope")):(t=so(e,"slot-scope"))&&(e.attrsMap["v-for"]&&Wi("Ambiguous combined usage of slot-scope and v-for on <"+e.tag+"> (v-for takes higher priority). Use a wrapper <template> for the scoped slot to make it clearer.",e.rawAttrsMap["slot-scope"],!0),e.slotScope=t);var t=ao(e,"slot");t&&(e.slotTarget='""'===t?'"default"':t,e.slotTargetDynamic=!(!e.attrsMap[":slot"]&&!e.attrsMap["v-bind:slot"]),"template"===e.tag||e.slotScope||to(e,"slot",t,io(e,"slot")));{var n,r,o,i,a;"template"===e.tag?(o=co(e,da))&&((e.slotTarget||e.slotScope)&&Wi("Unexpected mixed usage of different slot syntaxes.",e),e.parent&&!ra(e.parent)&&Wi("<template v-slot> can only appear at the root level inside the receiving the component",e),n=Ca(o),r=n.name,i=n.dynamic,e.slotTarget=r,e.slotTargetDynamic=i,e.slotScope=o.value||ga):(n=co(e,da))&&(ra(e)||Wi("v-slot can only be used on components or <template>.",n),(e.slotScope||e.slotTarget)&&Wi("Unexpected mixed usage of different slot syntaxes.",e),e.scopedSlots&&Wi("To avoid scope ambiguity, the default slot should also use <template> syntax when there are other named slots.",n),r=e.scopedSlots||(e.scopedSlots={}),i=Ca(n),o=i.name,i=i.dynamic,(a=r[o]=ba("template",[],e)).slotTarget=o,a.slotTargetDynamic=i,a.children=e.children.filter(function(e){if(!e.slotScope)return e.parent=a,!0}),a.slotScope=n.value||ga,e.children=[],e.plain=!1)}}(e),"slot"===(r=e).tag&&(r.slotName=ao(r,"name"),r.key&&Wi("`key` does not work on <slot> because slots are abstract outlets and can possibly expand into multiple elements. Use the key on a wrapping element instead.",io(r,"key"))),function(e){var t;(t=ao(e,"is"))&&(e.component=t);null!=so(e,"inline-template")&&(e.inlineTemplate=!0)}(e);for(var o=0;o<Zi.length;o++)e=Zi[o](e,t)||e;return function(e){var t,n,r,o,i,a,s,c=e.attrsList;for(t=0,n=c.length;t<n;t++){var u;r=o=c[t].name,i=c[t].value,ia.test(r)?(e.hasBindings=!0,(a=function(e){e=e.match(pa);if(e){var t={};return e.forEach(function(e){t[e.slice(1)]=!0}),t}}(r.replace(ia,"")))&&(r=r.replace(pa,"")),fa.test(r)?(r=r.replace(fa,""),i=Zr(i),(s=ua.test(r))&&(r=r.slice(1,-1)),0===i.trim().length&&Wi('The value for a v-bind expression cannot be empty. Found in "v-bind:'+r+'"'),a&&(a.prop&&!s&&"innerHtml"===(r=y(r))&&(r="innerHTML"),a.camel&&!s&&(r=y(r)),a.sync&&(u=fo(i,"$event"),s?oo(e,'"update:"+('+r+")",u,null,!1,Wi,c[t],!0):(oo(e,"update:"+y(r),u,null,!1,Wi,c[t]),b(r)!==y(r)&&oo(e,"update:"+b(r),u,null,!1,Wi,c[t])))),(a&&a.prop||!e.component&&ta(e.tag,e.attrsMap.type,r)?eo:to)(e,r,i,c[t],s)):oa.test(r)?(r=r.replace(oa,""),(s=ua.test(r))&&(r=r.slice(1,-1)),oo(e,r,i,a,!1,Wi,c[t],s)):(u=(r=r.replace(ia,"")).match(la),u=u&&u[1],s=!1,u&&(r=r.slice(0,-(u.length+1)),ua.test(u)&&(u=u.slice(1,-1),s=!0)),function(e,t,n,r,o,i,a,s){(e.directives||(e.directives=[])).push(uo({name:t,rawName:n,value:r,arg:o,isDynamicArg:i,modifiers:a},s)),e.plain=!1}(e,r,o,i,u,s,a,c[t]),"model"===r&&function(e,t){var n=e;for(;n;)n.for&&n.alias===t&&Wi("<"+e.tag+' v-model="'+t+'">: You are binding v-model directly to a v-for iteration alias. This will not be able to modify the v-for source array because writing to the alias is like modifying a function local variable. Consider using an array of objects and use v-model on an object property instead.',e.rawAttrsMap["v-model"]),n=n.parent}(e,i))):(ji(i,Xi)&&Wi(r+'="'+i+'": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div id="{{ val }}">, use <div :id="val">.',c[t]),to(e,r,JSON.stringify(i),c[t]),!e.component&&"muted"===r&&ta(e.tag,e.attrsMap.type,r)&&eo(e,r,"true",c[t]))}}(e),e}function xa(e){var t,n;(t=so(e,"v-for"))&&((n=function(e){var t=e.match(aa);if(t){var n={};n.for=t[2].trim();e=t[1].trim().replace(ca,""),t=e.match(sa);return t?(n.alias=e.replace(sa,"").trim(),n.iterator1=t[1].trim(),t[2]&&(n.iterator2=t[2].trim())):n.alias=e,n}}(t))?x(e,n):Wi("Invalid v-for expression: "+t,e.rawAttrsMap["v-for"]))}function $a(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function Ca(e){var t=e.name.replace(da,"");return t||("#"!==e.name[0]?t="default":Wi("v-slot shorthand syntax requires a slot name.",e)),ua.test(t)?{name:t.slice(1,-1),dynamic:!0}:{name:'"'+t+'"',dynamic:!1}}var ka=/^xmlns:NS\d+/,Aa=/^NS\d+:/;function Oa(e){return ba(e.tag,e.attrsList.slice(),e.parent)}var Sa=[ee,Rr,{preTransformNode:function(e,t){if("input"===e.tag){var n,r=e.attrsMap;if(r["v-model"])if((r[":type"]||r["v-bind:type"])&&(n=ao(e,"type")),n=!r.type&&!n&&r["v-bind"]?"("+r["v-bind"]+").type":n){var o=so(e,"v-if",!0),i=o?"&&("+o+")":"",a=null!=so(e,"v-else",!0),s=so(e,"v-else-if",!0),c=Oa(e);xa(c),no(c,"type","checkbox"),wa(c,t),c.processed=!0,c.if="("+n+")==='checkbox'"+i,$a(c,{exp:c.if,block:c});r=Oa(e);so(r,"v-for",!0),no(r,"type","radio"),wa(r,t),$a(c,{exp:"("+n+")==='radio'"+i,block:r});e=Oa(e);return so(e,"v-for",!0),no(e,":type",n),wa(e,t),$a(c,{exp:o,block:e}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var Ta,ja,ct={expectHTML:!0,modules:Sa,directives:{model:function(e,t,n){Wr=n;var r,o,i,a,s=t.value,c=t.modifiers,u=e.tag,l=e.attrsMap.type;if("input"===u&&"file"===l&&Wr("<"+e.tag+' v-model="'+s+'" type="file">:\nFile inputs are read only. Use a v-on:change listener instead.',e.rawAttrsMap["v-model"]),e.component)return lo(e,s,c),!1;if("select"===u)!function(e,t,n){n='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"});";n=n+" "+fo(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),oo(e,"change",n,null,!0)}(e,s,c);else if("input"===u&&"checkbox"===l)r=e,o=s,i=(n=c)&&n.number,a=ao(r,"value")||"null",t=ao(r,"true-value")||"true",n=ao(r,"false-value")||"false",eo(r,"checked","Array.isArray("+o+")?_i("+o+","+a+")>-1"+("true"===t?":("+o+")":":_q("+o+","+t+")")),oo(r,"change","var $$a="+o+",$$el=$event.target,$$c=$$el.checked?("+t+"):("+n+");if(Array.isArray($$a)){var $$v="+(i?"_n("+a+")":a)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+fo(o,"$$a.concat([$$v])")+")}else{$$i>-1&&("+fo(o,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+fo(o,"$$c")+"}",null,!0);else if("input"===u&&"radio"===l)i=e,a=s,l=(o=c)&&o.number,o=ao(i,"value")||"null",eo(i,"checked","_q("+a+","+(o=l?"_n("+o+")":o)+")"),oo(i,"change",fo(a,o),null,!0);else if("input"===u||"textarea"===u)!function(e,t,n){var r=e.attrsMap.type,o=e.attrsMap["v-bind:value"]||e.attrsMap[":value"],i=e.attrsMap["v-bind:type"]||e.attrsMap[":type"];o&&!i&&(a=e.attrsMap["v-bind:value"]?"v-bind:value":":value",Wr(a+'="'+o+'" conflicts with v-model on the same element because the latter already expands to a value binding internally',e.rawAttrsMap[a]));var i=n||{},o=i.lazy,a=i.number,n=i.trim,i=!o&&"range"!==r,o=o?"change":"range"===r?go:"input",r="$event.target.value";n&&(r="$event.target.value.trim()");a&&(r="_n("+r+")");r=fo(t,r);i&&(r="if($event.target.composing)return;"+r);eo(e,"value","("+t+")"),oo(e,o,r,null,!0),(n||a)&&oo(e,"blur","$forceUpdate()")}(e,s,c);else{if(!F.isReservedTag(u))return lo(e,s,c),!1;Wr("<"+e.tag+' v-model="'+s+"\">: v-model is not supported on this element type. If you are working with contenteditable, it's recommended to wrap a library dedicated for that purpose inside a custom component.",e.rawAttrsMap["v-model"])}return!0},text:function(e,t){t.value&&eo(e,"textContent","_s("+t.value+")",t)},html:function(e,t){t.value&&eo(e,"innerHTML","_s("+t.value+")",t)}},isPreTag:function(e){return"pre"===e},isUnaryTag:j,mustUseProp:W,canBeLeftOpenTag:ct,isReservedTag:xr,getTagNamespace:Ar,staticKeys:Sa.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")},Ea=e(function(e){return M("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(e?","+e:""))});function Ma(e,t){e&&(Ta=Ea(t.staticKeys||""),ja=t.isReservedTag||k,function e(t){t.static=Na(t);if(1===t.type&&(ja(t.tag)||"slot"===t.tag||null!=t.attrsMap["inline-template"])){for(var n=0,r=t.children.length;n<r;n++){var o=t.children[n];e(o),o.static||(t.static=!1)}if(t.ifConditions)for(var i=1,a=t.ifConditions.length;i<a;i++){var s=t.ifConditions[i].block;e(s),s.static||(t.static=!1)}}}(e),function e(t,n){if(1===t.type)if((t.static||t.once)&&(t.staticInFor=n),!t.static||!t.children.length||1===t.children.length&&3===t.children[0].type){if(t.staticRoot=!1,t.children)for(var r=0,o=t.children.length;r<o;r++)e(t.children[r],n||!!t.for);if(t.ifConditions)for(var i=1,a=t.ifConditions.length;i<a;i++)e(t.ifConditions[i].block,n)}else t.staticRoot=!0}(e,!1))}function Na(e){return 2!==e.type&&(3===e.type||!(!e.pre&&(e.hasBindings||e.if||e.for||r(e.tag)||!ja(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(Ta))))}var Pa=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*(?:[\w$]+)?\s*\(/,Ia=/\([^)]*?\);*$/,La=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Da={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Ra={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Fa=function(e){return"if("+e+")return null;"},Ua={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Fa("$event.target !== $event.currentTarget"),ctrl:Fa("!$event.ctrlKey"),shift:Fa("!$event.shiftKey"),alt:Fa("!$event.altKey"),meta:Fa("!$event.metaKey"),left:Fa("'button' in $event && $event.button !== 0"),middle:Fa("'button' in $event && $event.button !== 1"),right:Fa("'button' in $event && $event.button !== 2")};function Ha(e,t){var n,t=t?"nativeOn:":"on:",r="",o="";for(n in e){var i=function t(e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return t(e)}).join(",")+"]";var n=La.test(e.value);var r=Pa.test(e.value);var o=La.test(e.value.replace(Ia,""));{if(e.modifiers){var i,a,s="",c="",u=[];for(i in e.modifiers)Ua[i]?(c+=Ua[i],Da[i]&&u.push(i)):"exact"===i?(a=e.modifiers,c+=Fa(["ctrl","shift","alt","meta"].filter(function(e){return!a[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))):u.push(i);u.length&&(s+=Va(u)),c&&(s+=c);var l=n?"return "+e.value+"($event)":r?"return ("+e.value+")($event)":o?"return "+e.value:e.value;return"function($event){"+s+l+"}"}return n||r?e.value:"function($event){"+(o?"return "+e.value:e.value)+"}"}}(e[n]);e[n]&&e[n].dynamic?o+=n+","+i+",":r+='"'+n+'":'+i+","}return r="{"+r.slice(0,-1)+"}",o?t+"_d("+r+",["+o.slice(0,-1)+"])":t+r}function Va(e){return"if(!$event.type.indexOf('key')&&"+e.map(Ba).join("&&")+")return null;"}function Ba(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Da[e],t=Ra[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(t)+")"}var qa={on:function(e,t){t.modifiers&&ue("v-on without argument does not support modifiers."),e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(t,n){t.wrapData=function(e){return"_b("+e+",'"+t.tag+"',"+n.value+","+(n.modifiers&&n.modifiers.prop?"true":"false")+(n.modifiers&&n.modifiers.sync?",true":"")+")"}},cloak:C},za=function(e){this.options=e,this.warn=e.warn||Yr,this.transforms=Qr(e.modules,"transformCode"),this.dataGenFns=Qr(e.modules,"genData"),this.directives=x(x({},qa),e.directives);var t=e.isReservedTag||k;this.maybeComponent=function(e){return!!e.component||!t(e.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function Ja(e,t){t=new za(t);return{render:"with(this){return "+(e?Ga(e,t):'_c("div")')+"}",staticRenderFns:t.staticRenderFns}}function Ga(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Ka(e,t);if(e.once&&!e.onceProcessed)return Wa(e,t);if(e.for&&!e.forProcessed)return Za(e,t);if(e.if&&!e.ifProcessed)return Xa(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=ts(e,t),t="_t("+n+(r?","+r:""),n=e.attrs||e.dynamicAttrs?os((e.attrs||[]).concat(e.dynamicAttrs||[]).map(function(e){return{name:y(e.name),value:e.value,dynamic:e.dynamic}})):null,e=e.attrsMap["v-bind"];!n&&!e||r||(t+=",null");n&&(t+=","+n);e&&(t+=(n?"":",null")+","+e);return t+")"}(e,t);var n,r;r=e.component?(i=e.component,s=t,c=(a=e).inlineTemplate?null:ts(a,s,!0),"_c("+i+","+Ya(a,s)+(c?","+c:"")+")"):((!e.plain||e.pre&&t.maybeComponent(e))&&(n=Ya(e,t)),c=e.inlineTemplate?null:ts(e,t,!0),"_c('"+e.tag+"'"+(n?","+n:"")+(c?","+c:"")+")");for(var o=0;o<t.transforms.length;o++)r=t.transforms[o](e,r);return r}return ts(e,t)||"void 0";var i,a,s,c}function Ka(e,t){e.staticProcessed=!0;var n=t.pre;return e.pre&&(t.pre=e.pre),t.staticRenderFns.push("with(this){return "+Ga(e,t)+"}"),t.pre=n,"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function Wa(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return Xa(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Ga(e,t)+","+t.onceId+++","+n+")":(t.warn("v-once can only be used inside v-for that is keyed. ",e.rawAttrsMap["v-once"]),Ga(e,t))}return Ka(e,t)}function Xa(e,t,n,r){return e.ifProcessed=!0,function e(t,n,r,o){if(!t.length)return o||"_e()";var i=t.shift();return i.exp?"("+i.exp+")?"+a(i.block)+":"+e(t,n,r,o):""+a(i.block);function a(e){return(r||(e.once?Wa:Ga))(e,n)}}(e.ifConditions.slice(),t,n,r)}function Za(e,t,n,r){var o=e.for,i=e.alias,a=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";return t.maybeComponent(e)&&"slot"!==e.tag&&"template"!==e.tag&&!e.key&&t.warn("<"+e.tag+' v-for="'+i+" in "+o+'">: component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.html#key for more info.',e.rawAttrsMap["v-for"],!0),e.forProcessed=!0,(r||"_l")+"(("+o+"),function("+i+a+s+"){return "+(n||Ga)(e,t)+"})"}function Ya(e,t){var n="{",r=function(e,t){var n=e.directives;if(n){var r,o,i,a,s="directives:[",c=!1;for(r=0,o=n.length;r<o;r++){i=n[r],a=!0;var u=t.directives[i.name];(a=u?!!u(e,i,t.warn):a)&&(c=!0,s+='{name:"'+i.name+'",rawName:"'+i.rawName+'"'+(i.value?",value:("+i.value+"),expression:"+JSON.stringify(i.value):"")+(i.arg?",arg:"+(i.isDynamicArg?i.arg:'"'+i.arg+'"'):"")+(i.modifiers?",modifiers:"+JSON.stringify(i.modifiers):"")+"},")}if(c)return s.slice(0,-1)+"]"}}(e,t);r&&(n+=r+","),e.key&&(n+="key:"+e.key+","),e.ref&&(n+="ref:"+e.ref+","),e.refInFor&&(n+="refInFor:true,"),e.pre&&(n+="pre:true,"),e.component&&(n+='tag:"'+e.tag+'",');for(var o=0;o<t.dataGenFns.length;o++)n+=t.dataGenFns[o](e);return e.attrs&&(n+="attrs:"+os(e.attrs)+","),e.props&&(n+="domProps:"+os(e.props)+","),e.events&&(n+=Ha(e.events,!1)+","),e.nativeEvents&&(n+=Ha(e.nativeEvents,!0)+","),e.slotTarget&&!e.slotScope&&(n+="slot:"+e.slotTarget+","),e.scopedSlots&&(n+=function(e,t,n){var r=e.for||Object.keys(t).some(function(e){e=t[e];return e.slotTargetDynamic||e.if||e.for||Qa(e)}),o=!!e.if;if(!r)for(var i=e.parent;i;){if(i.slotScope&&i.slotScope!==ga||i.for){r=!0;break}i.if&&(o=!0),i=i.parent}e=Object.keys(t).map(function(e){return es(t[e],n)}).join(",");return"scopedSlots:_u(["+e+"]"+(r?",null,true":"")+(!r&&o?",null,false,"+function(e){var t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return t>>>0}(e):"")+")"}(e,e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),!e.inlineTemplate||(r=function(e,t){var n=e.children[0];1===e.children.length&&1===n.type||t.warn("Inline-template components must have exactly one child element.",{start:e.start});if(n&&1===n.type){t=Ja(n,t.options);return"inlineTemplate:{render:function(){"+t.render+"},staticRenderFns:["+t.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t))&&(n+=r+","),n=n.replace(/,$/,"")+"}",e.dynamicAttrs&&(n="_b("+n+',"'+e.tag+'",'+os(e.dynamicAttrs)+")"),e.wrapData&&(n=e.wrapData(n)),n=e.wrapListeners?e.wrapListeners(n):n}function Qa(e){return 1===e.type&&("slot"===e.tag||e.children.some(Qa))}function es(e,t){var n=e.attrsMap["slot-scope"];if(e.if&&!e.ifProcessed&&!n)return Xa(e,t,es,"null");if(e.for&&!e.forProcessed)return Za(e,t,es);var r=e.slotScope===ga?"":String(e.slotScope),t="function("+r+"){return "+("template"===e.tag?e.if&&n?"("+e.if+")?"+(ts(e,t)||"undefined")+":undefined":ts(e,t)||"undefined":Ga(e,t))+"}";return"{key:"+(e.slotTarget||'"default"')+",fn:"+t+(r?"":",proxy:true")+"}"}function ts(e,t,n,r,o){var i=e.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){e=n?t.maybeComponent(a)?",1":",0":"";return(r||Ga)(a,t)+e}var n=n?function(e,t){for(var n=0,r=0;r<e.length;r++){var o=e[r];if(1===o.type){if(ns(o)||o.ifConditions&&o.ifConditions.some(function(e){return ns(e.block)})){n=2;break}(t(o)||o.ifConditions&&o.ifConditions.some(function(e){return t(e.block)}))&&(n=1)}}return n}(i,t.maybeComponent):0,s=o||rs;return"["+i.map(function(e){return s(e,t)}).join(",")+"]"+(n?","+n:"")}}function ns(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function rs(e,t){return 1===e.type?Ga(e,t):3===e.type&&e.isComment?(t=e,"_e("+JSON.stringify(t.text)+")"):"_v("+(2===(e=e).type?e.expression:is(JSON.stringify(e.text)))+")"}function os(e){for(var t="",n="",r=0;r<e.length;r++){var o=e[r],i=is(o.value);o.dynamic?n+=o.name+","+i+",":t+='"'+o.name+'":'+i+","}return t="{"+t.slice(0,-1)+"}",n?"_d("+t+",["+n.slice(0,-1)+"])":t}function is(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}var as=new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),ss=new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)"),cs=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function us(e,t){e&&!function e(t,n){if(1===t.type){for(var r in t.attrsMap){var o,i;!ia.test(r)||(o=t.attrsMap[r])&&(i=t.rawAttrsMap[r],"v-for"===r?fs(t,'v-for="'+o+'"',n,i):(oa.test(r)?ls:ds)(o,r+'="'+o+'"',n,i))}if(t.children)for(var a=0;a<t.children.length;a++)e(t.children[a],n)}else 2===t.type&&ds(t.expression,t.text,n,t)}(e,t)}function ls(e,t,n,r){var o=e.replace(cs,""),i=o.match(ss);i&&"$"!==o.charAt(i.index-1)&&n('avoid using JavaScript unary operator as property name: "'+i[0]+'" in expression '+t.trim(),r),ds(e,t,n,r)}function fs(e,t,n,r){ds(e.for||"",t,n,r),ps(e.alias,"v-for alias",t,n,r),ps(e.iterator1,"v-for iterator",t,n,r),ps(e.iterator2,"v-for iterator",t,n,r)}function ps(t,n,r,o,i){if("string"==typeof t)try{new Function("var "+t+"=_")}catch(e){o("invalid "+n+' "'+t+'" in expression: '+r.trim(),i)}}function ds(t,n,r,o){try{new Function("return "+t)}catch(e){var i=t.replace(cs,"").match(as);r(i?'avoid using JavaScript keyword as property name: "'+i[0]+'"\n Raw expression: '+n.trim():"invalid expression: "+e.message+" in\n\n "+t+"\n\n Raw expression: "+n.trim()+"\n",o)}}var hs=2;function vs(e,t){var n="";if(0<t)for(;1&t&&(n+=e),!((t>>>=1)<=0);)e+=e;return n}function ms(t,n){try{return new Function(t)}catch(e){return n.push({err:e,code:t}),C}}function ys(s){var c=Object.create(null);return function(t,e,n){var r=(e=x({},e)).warn||ue;delete e.warn;try{new Function("return 1")}catch(e){e.toString().match(/unsafe-eval|CSP/)&&r("It seems you are using the standalone build of Vue.js in an environment with Content Security Policy that prohibits unsafe-eval. The template compiler cannot work in this environment. Consider relaxing the policy to allow unsafe-eval or pre-compiling your templates into render functions.")}var o=e.delimiters?String(e.delimiters)+t:t;if(c[o])return c[o];var i=s(t,e);i.errors&&i.errors.length&&(e.outputSourceRange?i.errors.forEach(function(e){r("Error compiling template:\n\n"+e.msg+"\n\n"+function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.length);for(var r=e.split(/\r?\n/),o=0,i=[],a=0;a<r.length;a++)if(t<=(o+=r[a].length+1)){for(var s,c,u,l=a-hs;l<=a+hs||o<n;l++)l<0||l>=r.length||(i.push(""+(l+1)+vs(" ",3-String(l+1).length)+"| "+r[l]),s=r[l].length,l===a?(c=t-(o-s)+1,u=o<n?s-c:n-t,i.push(" | "+vs(" ",c)+vs("^",u))):a<l&&(o<n&&(u=Math.min(n-o,s),i.push(" | "+vs("^",u))),o+=s+1));break}return i.join("\n")}(t,e.start,e.end),n)}):r("Error compiling template:\n\n"+t+"\n\n"+i.errors.map(function(e){return"- "+e}).join("\n")+"\n",n)),i.tips&&i.tips.length&&(e.outputSourceRange?i.tips.forEach(function(e){return le(e.msg,n)}):i.tips.forEach(function(e){return le(e,n)}));var e={},a=[];return e.render=ms(i.render,a),e.staticRenderFns=i.staticRenderFns.map(function(e){return ms(e,a)}),i.errors&&i.errors.length||!a.length||r("Failed to generate render function:\n\n"+a.map(function(e){var t=e.err,e=e.code;return t.toString()+" in\n\n"+e+"\n"}).join("\n"),n),c[o]=e}}var gs,bs,ct=(gs=function(e,t){e=_a(e.trim(),t);!1!==t.optimize&&Ma(e,t);t=Ja(e,t);return{ast:e,render:t.render,staticRenderFns:t.staticRenderFns}},function(c){function e(e,t){var r,n,o=Object.create(c),i=[],a=[],s=function(e,t,n){(n?a:i).push(e)};if(t)for(n in t.outputSourceRange&&(r=e.match(/^\s*/)[0].length,s=function(e,t,n){e={msg:e};t&&(null!=t.start&&(e.start=t.start+r),null!=t.end&&(e.end=t.end+r)),(n?a:i).push(e)}),t.modules&&(o.modules=(c.modules||[]).concat(t.modules)),t.directives&&(o.directives=x(Object.create(c.directives||null),t.directives)),t)"modules"!==n&&"directives"!==n&&(o[n]=t[n]);o.warn=s;e=gs(e.trim(),o);return us(e.ast,s),e.errors=i,e.tips=a,e}return{compile:e,compileToFunctions:ys(e)}})(ct),_s=(ct.compile,ct.compileToFunctions);function ws(e){return(bs=bs||document.createElement("div")).innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',0<bs.innerHTML.indexOf("&#10;")}var xs=!!J&&ws(!1),$s=!!J&&ws(!0),Cs=e(function(e){e=Tr(e);return e&&e.innerHTML}),ks=Yn.prototype.$mount;return Yn.prototype.$mount=function(e,t){if((e=e&&Tr(e))===document.body||e===document.documentElement)return ue("Do not mount Vue to <html> or <body> - mount to normal elements instead."),this;var n=this.$options;if(!n.render){var r,o=n.template;if(o)if("string"==typeof o)"#"===o.charAt(0)&&((o=Cs(o))||ue("Template element not found or is empty: "+n.template,this));else{if(!o.nodeType)return ue("invalid template option:"+o,this),this;o=o.innerHTML}else e&&(o=function(e){{if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}}(e));o&&(F.performance&&at&&at("compile"),o=(r=_s(o,{outputSourceRange:!0,shouldDecodeNewlines:xs,shouldDecodeNewlinesForHref:$s,delimiters:n.delimiters,comments:n.comments},this)).render,r=r.staticRenderFns,n.render=o,n.staticRenderFns=r,F.performance&&at&&(at("compile end"),st("vue "+this._name+" compile","compile","compile end")))}return ks.call(this,e,t)},Yn.compile=_s,Yn}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vuex=t()}(this,function(){"use strict";var u="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function s(t,n){Object.keys(t).forEach(function(e){return n(t[e],e)})}function l(e,t){if(!e)throw new Error("[vuex] "+t)}function i(e,t){this.runtime=t,this._children=Object.create(null),e=(this._rawModule=e).state,this.state=("function"==typeof e?e():e)||{}}var e={namespaced:{configurable:!0}};e.namespaced.get=function(){return!!this._rawModule.namespaced},i.prototype.addChild=function(e,t){this._children[e]=t},i.prototype.removeChild=function(e){delete this._children[e]},i.prototype.getChild=function(e){return this._children[e]},i.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},i.prototype.forEachChild=function(e){s(this._children,e)},i.prototype.forEachGetter=function(e){this._rawModule.getters&&s(this._rawModule.getters,e)},i.prototype.forEachAction=function(e){this._rawModule.actions&&s(this._rawModule.actions,e)},i.prototype.forEachMutation=function(e){this._rawModule.mutations&&s(this._rawModule.mutations,e)},Object.defineProperties(i.prototype,e);function f(e){this.register([],e,!1)}f.prototype.get=function(e){return e.reduce(function(e,t){return e.getChild(t)},this.root)},f.prototype.getNamespace=function(e){var n=this.root;return e.reduce(function(e,t){return e+((n=n.getChild(t)).namespaced?t+"/":"")},"")},f.prototype.update=function(e){!function e(t,n,r){c(t,r);n.update(r);if(r.modules)for(var o in r.modules){if(!n.getChild(o))return void console.warn("[vuex] trying to add a new module '"+o+"' on hot reloading, manual reload is needed");e(t.concat(o),n.getChild(o),r.modules[o])}}([],this.root,e)},f.prototype.register=function(n,e,r){var o=this;void 0===r&&(r=!0),c(n,e);var t=new i(e,r);0===n.length?this.root=t:this.get(n.slice(0,-1)).addChild(n[n.length-1],t),e.modules&&s(e.modules,function(e,t){o.register(n.concat(t),e,r)})},f.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),e=e[e.length-1];t.getChild(e).runtime&&t.removeChild(e)};var h,t={assert:function(e){return"function"==typeof e},expected:"function"},a={getters:t,mutations:t,actions:{assert:function(e){return"function"==typeof e||"object"==typeof e&&"function"==typeof e.handler},expected:'function or object with "handler" function'}};function c(o,e){Object.keys(a).forEach(function(n){var r;e[n]&&(r=a[n],s(e[n],function(e,t){l(r.assert(e),function(e,t,n,r,o){n=t+" should be "+o+' but "'+t+"."+n+'"';0<e.length&&(n+=' in module "'+e.join(".")+'"');return n+=" is "+JSON.stringify(r)+"."}(o,n,t,e,r.expected))}))})}e=function e(t){var n=this;void 0===t&&(t={}),!h&&"undefined"!=typeof window&&window.Vue&&d(window.Vue),l(h,"must call Vue.use(Vuex) before creating a store instance."),l("undefined"!=typeof Promise,"vuex requires a Promise polyfill in this browser."),l(this instanceof e,"store must be called with the new operator.");var r=t.plugins;void 0===r&&(r=[]);var o=t.strict;void 0===o&&(o=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new f(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new h;var i=this,a=this.dispatch,s=this.commit;this.dispatch=function(e,t){return a.call(i,e,t)},this.commit=function(e,t,n){return s.call(i,e,t,n)},this.strict=o;var c,o=this._modules.root.state;v(this,o,[],this._modules.root),p(this,o),r.forEach(function(e){return e(n)}),(void 0!==t.devtools?t:h.config).devtools&&(c=this,u&&((c._devtoolHook=u).emit("vuex:init",c),u.on("vuex:travel-to-state",function(e){c.replaceState(e)}),c.subscribe(function(e,t){u.emit("vuex:mutation",e,t)})))},t={state:{configurable:!0}};function n(t,n){return n.indexOf(t)<0&&n.push(t),function(){var e=n.indexOf(t);-1<e&&n.splice(e,1)}}function r(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;v(e,n,[],e._modules.root,!0),p(e,n,t)}function p(n,e,t){var r=n._vm;n.getters={};var o=n._wrappedGetters,i={};s(o,function(e,t){i[t]=function(){return e(n)},Object.defineProperty(n.getters,t,{get:function(){return n._vm[t]},enumerable:!0})});var a,o=h.config.silent;h.config.silent=!0,n._vm=new h({data:{$$state:e},computed:i}),h.config.silent=o,n.strict&&(a=n)._vm.$watch(function(){return this._data.$$state},function(){l(a._committing,"do not mutate vuex store state outside mutation handlers.")},{deep:!0,sync:!0}),r&&(t&&n._withCommit(function(){r._data.$$state=null}),h.nextTick(function(){return r.$destroy()}))}function v(i,n,r,e,o){var t,a,s=!r.length,c=i._modules.getNamespace(r);e.namespaced&&(i._modulesNamespaceMap[c]=e),s||o||(t=m(n,r.slice(0,-1)),a=r[r.length-1],i._withCommit(function(){h.set(t,a,e.state)}));var u,l,f,p,d=e.context=(u=i,f=r,s={dispatch:(p=""===(l=c))?u.dispatch:function(e,t,n){var r=y(e,t,n),e=r.payload,t=r.options,n=r.type;if(t&&t.root||u._actions[n=l+n])return u.dispatch(n,e);console.error("[vuex] unknown local action type: "+r.type+", global type: "+n)},commit:p?u.commit:function(e,t,n){var r=y(e,t,n),e=r.payload,t=r.options,n=r.type;t&&t.root||u._mutations[n=l+n]?u.commit(n,e,t):console.error("[vuex] unknown local mutation type: "+r.type+", global type: "+n)}},Object.defineProperties(s,{getters:{get:p?function(){return u.getters}:function(){return n=u,o={},i=(r=l).length,Object.keys(n.getters).forEach(function(e){var t;e.slice(0,i)===r&&(t=e.slice(i),Object.defineProperty(o,t,{get:function(){return n.getters[e]},enumerable:!0}))}),o;var n,r,o,i}},state:{get:function(){return m(u.state,f)}}}),s);e.forEachMutation(function(e,t){var n,r,o;t=c+t,r=e,o=d,((n=i)._mutations[t]||(n._mutations[t]=[])).push(function(e){r.call(n,o.state,e)})}),e.forEachAction(function(e,t){var n,r,o,t=e.root?t:c+t,e=e.handler||e;t=t,r=e,o=d,((n=i)._actions[t]||(n._actions[t]=[])).push(function(e,t){e=r.call(n,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:n.getters,rootState:n.state},e,t);return(t=e)&&"function"==typeof t.then||(e=Promise.resolve(e)),n._devtoolHook?e.catch(function(e){throw n._devtoolHook.emit("vuex:error",e),e}):e})}),e.forEachGetter(function(e,t){var n,r;t=c+t,n=e,r=d,(e=i)._wrappedGetters[t]?console.error("[vuex] duplicate getter key: "+t):e._wrappedGetters[t]=function(e){return n(r.state,r.getters,e.state,e.getters)}}),e.forEachChild(function(e,t){v(i,n,r.concat(t),e,o)})}function m(e,t){return t.length?t.reduce(function(e,t){return e[t]},e):e}function y(e,t,n){var r;return null!==(r=e)&&"object"==typeof r&&e.type&&(n=t,e=(t=e).type),l("string"==typeof e,"expects string as the type, but found "+typeof e+"."),{type:e,payload:t,options:n}}function d(e){var t;function n(){var e=this.$options;e.store?this.$store="function"==typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}h&&e===h?console.error("[vuex] already installed. Vue.use(Vuex) should be called only once."):(e=h=e,2<=Number(e.version.split(".")[0])?e.mixin({beforeCreate:n}):(t=e.prototype._init,e.prototype._init=function(e){(e=void 0===e?{}:e).init=e.init?[n].concat(e.init):n,t.call(this,e)}))}t.state.get=function(){return this._vm._data.$$state},t.state.set=function(e){l(!1,"use store.replaceState() to explicit replace store state.")},e.prototype.commit=function(e,t,n){var r=this,t=y(e,t,n),n=t.type,o=t.payload,t=t.options,i={type:n,payload:o},a=this._mutations[n];a?(this._withCommit(function(){a.forEach(function(e){e(o)})}),this._subscribers.forEach(function(e){return e(i,r.state)}),t&&t.silent&&console.warn("[vuex] mutation type: "+n+". Silent option has been removed. Use the filter functionality in the vue-devtools")):console.error("[vuex] unknown mutation type: "+n)},e.prototype.dispatch=function(e,t){var n=this,e=y(e,t),t=e.type,r=e.payload,o={type:t,payload:r},e=this._actions[t];if(e){try{this._actionSubscribers.filter(function(e){return e.before}).forEach(function(e){return e.before(o,n.state)})}catch(e){console.warn("[vuex] error in before action subscribers: "),console.error(e)}return(1<e.length?Promise.all(e.map(function(e){return e(r)})):e[0](r)).then(function(e){try{n._actionSubscribers.filter(function(e){return e.after}).forEach(function(e){return e.after(o,n.state)})}catch(e){console.warn("[vuex] error in after action subscribers: "),console.error(e)}return e})}console.error("[vuex] unknown action type: "+t)},e.prototype.subscribe=function(e){return n(e,this._subscribers)},e.prototype.subscribeAction=function(e){return n("function"==typeof e?{before:e}:e,this._actionSubscribers)},e.prototype.watch=function(e,t,n){var r=this;return l("function"==typeof e,"store.watch only accepts a function."),this._watcherVM.$watch(function(){return e(r.state,r.getters)},t,n)},e.prototype.replaceState=function(e){var t=this;this._withCommit(function(){t._vm._data.$$state=e})},e.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),l(Array.isArray(e),"module path must be a string or an Array."),l(0<e.length,"cannot register the root module by using registerModule."),this._modules.register(e,t),v(this,this.state,e,this._modules.get(e),n.preserveState),p(this,this.state)},e.prototype.unregisterModule=function(t){var n=this;"string"==typeof t&&(t=[t]),l(Array.isArray(t),"module path must be a string or an Array."),this._modules.unregister(t),this._withCommit(function(){var e=m(n.state,t.slice(0,-1));h.delete(e,t[t.length-1])}),r(this)},e.prototype.hotUpdate=function(e){this._modules.update(e),r(this,!0)},e.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(e.prototype,t);var o=x(function(o,e){var n={};return w(e).forEach(function(e){var t=e.key,r=e.val;n[t]=function(){var e=this.$store.state,t=this.$store.getters;if(o){var n=$(this.$store,"mapState",o);if(!n)return;e=n.context.state,t=n.context.getters}return"function"==typeof r?r.call(this,e,t):e[r]},n[t].vuex=!0}),n}),g=x(function(i,e){var n={};return w(e).forEach(function(e){var t=e.key,o=e.val;n[t]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this.$store.commit;if(i){var r=$(this.$store,"mapMutations",i);if(!r)return;n=r.context.commit}return"function"==typeof o?o.apply(this,[n].concat(e)):n.apply(this.$store,[o].concat(e))}}),n}),b=x(function(r,e){var o={};return w(e).forEach(function(e){var t=e.key,n=e.val,n=r+n;o[t]=function(){if(!r||$(this.$store,"mapGetters",r)){if(n in this.$store.getters)return this.$store.getters[n];console.error("[vuex] unknown getter: "+n)}},o[t].vuex=!0}),o}),_=x(function(i,e){var n={};return w(e).forEach(function(e){var t=e.key,o=e.val;n[t]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this.$store.dispatch;if(i){var r=$(this.$store,"mapActions",i);if(!r)return;n=r.context.dispatch}return"function"==typeof o?o.apply(this,[n].concat(e)):n.apply(this.$store,[o].concat(e))}}),n});function w(t){return Array.isArray(t)?t.map(function(e){return{key:e,val:e}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function x(n){return function(e,t){return"string"!=typeof e?(t=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),n(e,t)}}function $(e,t,n){e=e._modulesNamespaceMap[n];return e||console.error("[vuex] module namespace not found in "+t+"(): "+n),e}return{Store:e,install:d,version:"3.1.0",mapState:o,mapMutations:g,mapGetters:b,mapActions:_,createNamespacedHelpers:function(e){return{mapState:o.bind(null,e),mapGetters:b.bind(null,e),mapMutations:g.bind(null,e),mapActions:_.bind(null,e)}}}}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VueResource=t()}(this,function(){"use strict";function a(e){this.state=2,this.value=void 0,this.deferred=[];var t=this;try{e(function(e){t.resolve(e)},function(e){t.reject(e)})}catch(e){t.reject(e)}}a.reject=function(n){return new a(function(e,t){t(n)})},a.resolve=function(n){return new a(function(e,t){e(n)})},a.all=function(i){return new a(function(n,e){var r=0,o=[];0===i.length&&n(o);for(var t=0;t<i.length;t+=1)a.resolve(i[t]).then(function(t){return function(e){o[t]=e,(r+=1)===i.length&&n(o)}}(t),e)})},a.race=function(r){return new a(function(e,t){for(var n=0;n<r.length;n+=1)a.resolve(r[n]).then(e,t)})};var e=a.prototype;function l(e,t){e instanceof Promise?this.promise=e:this.promise=new Promise(e.bind(t)),this.context=t}e.resolve=function(e){var t=this;if(2===t.state){if(e===t)throw new TypeError("Promise settled with itself.");var n=!1;try{var r=e&&e.then;if(null!==e&&"object"==typeof e&&"function"==typeof r)return void r.call(e,function(e){n||t.resolve(e),n=!0},function(e){n||t.reject(e),n=!0})}catch(e){return void(n||t.reject(e))}t.state=0,t.value=e,t.notify()}},e.reject=function(e){var t=this;if(2===t.state){if(e===t)throw new TypeError("Promise settled with itself.");t.state=1,t.value=e,t.notify()}},e.notify=function(){var o=this;n(function(){if(2!==o.state)for(;o.deferred.length;){var t=o.deferred.shift(),e=t[0],n=t[1],r=t[2],t=t[3];try{0===o.state?r("function"==typeof e?e.call(void 0,o.value):o.value):1===o.state&&("function"==typeof n?r(n.call(void 0,o.value)):t(o.value))}catch(e){t(e)}}},void 0)},e.then=function(n,r){var o=this;return new a(function(e,t){o.deferred.push([n,r,e,t]),o.notify()})},e.catch=function(e){return this.then(void 0,e)},"undefined"==typeof Promise&&(window.Promise=a),l.all=function(e,t){return new l(Promise.all(e),t)},l.resolve=function(e,t){return new l(Promise.resolve(e),t)},l.reject=function(e,t){return new l(Promise.reject(e),t)},l.race=function(e,t){return new l(Promise.race(e),t)};e=l.prototype;e.bind=function(e){return this.context=e,this},e.then=function(e,t){return e&&e.bind&&this.context&&(e=e.bind(this.context)),t&&t.bind&&this.context&&(t=t.bind(this.context)),new l(this.promise.then(e,t),this.context)},e.catch=function(e){return e&&e.bind&&this.context&&(e=e.bind(this.context)),new l(this.promise.catch(e),this.context)},e.finally=function(t){return this.then(function(e){return t.call(this),e},function(e){return t.call(this),Promise.reject(e)})};var n,o={}.hasOwnProperty,r=[].slice,f=!1,i="undefined"!=typeof window,t=function(e){var t=e.config,e=e.nextTick;n=e,f=t.debug||!t.silent};function c(e){return e?e.replace(/^\s*|\s*$/g,""):""}function s(e){return e?e.toLowerCase():""}var u=Array.isArray;function p(e){return"string"==typeof e}function d(e){return"function"==typeof e}function h(e){return null!==e&&"object"==typeof e}function v(e){return h(e)&&Object.getPrototypeOf(e)==Object.prototype}function m(e,t,n){e=l.resolve(e);return arguments.length<2?e:e.then(t,n)}function y(e,t,n){return d(n=n||{})&&(n=n.call(t)),_(e.bind({$vm:t,$options:n}),e,{$options:n})}function g(e,t){var n,r;if(u(e))for(n=0;n<e.length;n++)t.call(e[n],e[n],n);else if(h(e))for(r in e)o.call(e,r)&&t.call(e[r],e[r],r);return e}var b=Object.assign||function(t){return r.call(arguments,1).forEach(function(e){w(t,e)}),t};function _(t){return r.call(arguments,1).forEach(function(e){w(t,e,!0)}),t}function w(e,t,n){for(var r in t)n&&(v(t[r])||u(t[r]))?(v(t[r])&&!v(e[r])&&(e[r]={}),u(t[r])&&!u(e[r])&&(e[r]=[]),w(e[r],t[r],n)):void 0!==t[r]&&(e[r]=t[r])}function x(e,t,n){var r,a,s,e=(r=e,a=["+","#",".","/",";","?","&"],{vars:s=[],expand:function(i){return r.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(e,t,n){if(t){var r=null,o=[];if(-1!==a.indexOf(t.charAt(0))&&(r=t.charAt(0),t=t.substr(1)),t.split(/,/g).forEach(function(e){e=/([^:\*]*)(?::(\d+)|(\*))?/.exec(e);o.push.apply(o,function(e,t,n,r){var o=e[n],i=[];{var a;$(o)&&""!==o?"string"==typeof o||"number"==typeof o||"boolean"==typeof o?(o=o.toString(),r&&"*"!==r&&(o=o.substring(0,parseInt(r,10))),i.push(k(t,o,C(t)?n:null))):"*"===r?Array.isArray(o)?o.filter($).forEach(function(e){i.push(k(t,e,C(t)?n:null))}):Object.keys(o).forEach(function(e){$(o[e])&&i.push(k(t,o[e],e))}):(a=[],Array.isArray(o)?o.filter($).forEach(function(e){a.push(k(t,e))}):Object.keys(o).forEach(function(e){$(o[e])&&(a.push(encodeURIComponent(e)),a.push(k(t,o[e].toString())))}),C(t)?i.push(encodeURIComponent(n)+"="+a.join(",")):0!==a.length&&i.push(a.join(","))):";"===t?i.push(encodeURIComponent(n)):""!==o||"&"!==t&&"?"!==t?""===o&&i.push(""):i.push(encodeURIComponent(n)+"=")}return i}(i,r,e[1],e[2]||e[3])),s.push(e[1])}),r&&"+"!==r){t=",";return"?"===r?t="&":"#"!==r&&(t=r),(0!==o.length?r:"")+o.join(t)}return o.join(",")}return A(n)})}}),t=e.expand(t);return n&&n.push.apply(n,e.vars),t}function $(e){return null!=e}function C(e){return";"===e||"&"===e||"?"===e}function k(e,t,n){return t=("+"===e||"#"===e?A:encodeURIComponent)(t),n?encodeURIComponent(n)+"="+t:t}function A(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return e=!/%[0-9A-Fa-f]/.test(e)?encodeURI(e):e}).join("")}function O(e,t){var o,i=this||{},n=e;return p(e)&&(n={url:e,params:t}),n=_({},O.options,i.$options,n),O.transforms.forEach(function(e){var t,n,r;d(e=p(e)?O.transform[e]:e)&&(t=e,n=o,r=i.$vm,o=function(e){return t.call(r,e,n)})}),o(n)}O.options={url:"",root:null,params:{}},O.transform={template:function(t){var e=[],n=x(t.url,t.params,e);return e.forEach(function(e){delete t.params[e]}),n},query:function(e,t){var n=Object.keys(O.options.params),r={},t=t(e);return g(e.params,function(e,t){-1===n.indexOf(t)&&(r[t]=e)}),(r=O.params(r))&&(t+=(-1==t.indexOf("?")?"?":"&")+r),t},root:function(e,t){var n=t(e);return p(e.root)&&!/^(https?:)?\//.test(n)&&(t=e.root,e="/",n=(t&&void 0===e?t.replace(/\s+$/,""):t&&e?t.replace(new RegExp("["+e+"]+$"),""):t)+"/"+n),n}},O.transforms=["template","query","root"],O.params=function(e){var t=[],n=encodeURIComponent;return t.add=function(e,t){null===(t=d(t)?t():t)&&(t=""),this.push(n(e)+"="+n(t))},function n(r,e,o){var i,a=u(e),s=v(e);g(e,function(e,t){i=h(e)||u(e),o&&(t=o+"["+(s||i?t:"")+"]"),!o&&a?r.add(e.name,e.value):i?n(r,e,t):r.add(t,e)})}(t,e),t.join("&").replace(/%20/g,"+")},O.parse=function(e){var t=document.createElement("a");return document.documentMode&&(t.href=e,e=t.href),t.href=e,{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",port:t.port,host:t.host,hostname:t.hostname,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):""}};function S(o){return new l(function(n){function e(e){var t=e.type,e=0;"load"===t?e=200:"error"===t&&(e=500),n(o.respondWith(r.responseText,{status:e}))}var r=new XDomainRequest;o.abort=function(){return r.abort()},r.open(o.method,o.getUrl()),o.timeout&&(r.timeout=o.timeout),r.onload=e,r.onabort=e,r.onerror=e,r.ontimeout=e,r.onprogress=function(){},r.send(o.getBody())})}var T=i&&"withCredentials"in new XMLHttpRequest;function j(a){return new l(function(n){var r,e=a.jsonp||"callback",o=a.jsonpCallback||"_jsonp"+Math.random().toString(36).substr(2),i=null,t=function(e){var t=e.type,e=0;"load"===t&&null!==i?e=200:"error"===t&&(e=500),e&&window[o]&&(delete window[o],document.body.removeChild(r)),n(a.respondWith(i,{status:e}))};window[o]=function(e){i=JSON.stringify(e)},a.abort=function(){t({type:"abort"})},a.params[e]=o,a.timeout&&setTimeout(a.abort,a.timeout),(r=document.createElement("script")).src=a.getUrl(),r.type="text/javascript",r.async=!0,r.onload=t,r.onerror=t,document.body.appendChild(r)})}function E(o){return new l(function(n){function e(e){var t=o.respondWith("response"in r?r.response:r.responseText,{status:1223===r.status?204:r.status,statusText:1223===r.status?"No Content":c(r.statusText)});g(c(r.getAllResponseHeaders()).split("\n"),function(e){t.headers.append(e.slice(0,e.indexOf(":")),e.slice(e.indexOf(":")+1))}),n(t)}var r=new XMLHttpRequest;o.abort=function(){return r.abort()},o.progress&&("GET"===o.method?r.addEventListener("progress",o.progress):/^(POST|PUT)$/i.test(o.method)&&r.upload.addEventListener("progress",o.progress)),r.open(o.method,o.getUrl(),!0),o.timeout&&(r.timeout=o.timeout),o.responseType&&"responseType"in r&&(r.responseType=o.responseType),(o.withCredentials||o.credentials)&&(r.withCredentials=!0),o.crossOrigin||o.headers.set("X-Requested-With","XMLHttpRequest"),o.headers.forEach(function(e,t){r.setRequestHeader(t,e)}),r.onload=e,r.onabort=e,r.onerror=e,r.ontimeout=e,r.send(o.getBody())})}function M(a){var s=require("got");return new l(function(t){var n,e=a.getUrl(),r=a.getBody(),o=a.method,i={};a.headers.forEach(function(e,t){i[t]=e}),s(e,{body:r,method:o,headers:i}).then(n=function(e){var n=a.respondWith(e.body,{status:e.statusCode,statusText:c(e.statusMessage)});g(e.headers,function(e,t){n.headers.set(t,e)}),t(n)},function(e){return n(e.response)})})}var N=function(a){var s,c=[P],u=[];function e(i){return new l(function(t,n){function r(){var e;d(s=c.pop())?s.call(a,i,o):(e="Invalid interceptor of type "+typeof s+", must be a function","undefined"!=typeof console&&f&&console.warn("[VueResource warn]: "+e),o())}function o(e){if(d(e))u.unshift(e);else if(h(e))return u.forEach(function(t){e=m(e,function(e){return t.call(a,e)||e},n)}),void m(e,t,n);r()}r()},a)}return h(a)||(a=null),e.use=function(e){c.push(e)},e};function P(e,t){t((e.client||(i?E:M))(e))}function I(e){var n=this;this.map={},g(e,function(e,t){return n.append(t,e)})}function L(e,n){return Object.keys(e).reduce(function(e,t){return s(n)===s(t)?t:e},null)}I.prototype.has=function(e){return null!==L(this.map,e)},I.prototype.get=function(e){e=this.map[L(this.map,e)];return e?e.join():null},I.prototype.getAll=function(e){return this.map[L(this.map,e)]||[]},I.prototype.set=function(e,t){this.map[function(e){if(/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return c(e)}(L(this.map,e)||e)]=[c(t)]},I.prototype.append=function(e,t){var n=this.map[L(this.map,e)];n?n.push(c(t)):this.set(e,t)},I.prototype.delete=function(e){delete this.map[L(this.map,e)]},I.prototype.deleteAll=function(){this.map={}},I.prototype.forEach=function(n,r){var o=this;g(this.map,function(e,t){g(e,function(e){return n.call(r,e,t,o)})})};function D(e,t){var n,r=t.url,o=t.headers,i=t.status,t=t.statusText;this.url=r,this.ok=200<=i&&i<300,this.status=i||0,this.statusText=t||"",this.headers=new I(o),p(this.body=e)?this.bodyText=e:(o=e,"undefined"!=typeof Blob&&o instanceof Blob&&(this.bodyBlob=e,0!==(o=e).type.indexOf("text")&&-1===o.type.indexOf("json")||(this.bodyText=(n=e,new l(function(e){var t=new FileReader;t.readAsText(n),t.onload=function(){e(t.result)}})))))}D.prototype.blob=function(){return m(this.bodyBlob)},D.prototype.text=function(){return m(this.bodyText)},D.prototype.json=function(){return m(this.text(),function(e){return JSON.parse(e)})},Object.defineProperty(D.prototype,"data",{get:function(){return this.body},set:function(e){this.body=e}});var R=function(e){this.body=null,this.params={},b(this,e,{method:(e=e.method||"GET")?e.toUpperCase():""}),this.headers instanceof I||(this.headers=new I(this.headers))};R.prototype.getUrl=function(){return O(this)},R.prototype.getBody=function(){return this.body},R.prototype.respondWith=function(e,t){return new D(e,b(t||{},{url:this.getUrl()}))};e={"Content-Type":"application/json;charset=utf-8"};function F(e){var t=this||{},n=N(t.$vm);return function(n){r.call(arguments,1).forEach(function(e){for(var t in e)void 0===n[t]&&(n[t]=e[t])})}(e||{},t.$options,F.options),F.interceptors.forEach(function(e){d(e=p(e)?F.interceptor[e]:e)&&n.use(e)}),n(new R(e)).then(function(e){return e.ok?e:l.reject(e)},function(e){var t;return e instanceof Error&&(t=e,"undefined"!=typeof console&&console.error(t)),l.reject(e)})}function U(n,r,e,o){var i=this||{},a={};return g(e=b({},U.actions,e),function(e,t){e=_({url:n,params:b({},r)},o,e),a[t]=function(){return(i.$http||F)(function(e,t){var n,r=b({},e),o={};switch(t.length){case 2:o=t[0],n=t[1];break;case 1:/^(POST|PUT|PATCH)$/i.test(r.method)?n=t[0]:o=t[0];break;case 0:break;default:throw"Expected up to 2 arguments [params, body], got "+t.length+" arguments"}return r.body=n,r.params=b({},r.params,o),r}(e,arguments))}}),a}function H(n){H.installed||(t(n),n.url=O,n.http=F,n.resource=U,n.Promise=l,Object.defineProperties(n.prototype,{$url:{get:function(){return y(n.url,this,this.$options.url)}},$http:{get:function(){return y(n.http,this,this.$options.http)}},$resource:{get:function(){return n.resource.bind(this)}},$promise:{get:function(){var t=this;return function(e){return new n.Promise(e,t)}}}}))}return F.options={},F.headers={put:e,post:e,patch:e,delete:e,common:{Accept:"application/json, text/plain, */*"},custom:{}},F.interceptor={before:function(e,t){d(e.before)&&e.before.call(this,e),t()},method:function(e,t){e.emulateHTTP&&/^(PUT|PATCH|DELETE)$/i.test(e.method)&&(e.headers.set("X-HTTP-Method-Override",e.method),e.method="POST"),t()},jsonp:function(e,t){"JSONP"==e.method&&(e.client=j),t()},json:function(e,t){var o=e.headers.get("Content-Type")||"";h(e.body)&&0===o.indexOf("application/json")&&(e.body=JSON.stringify(e.body)),t(function(r){return r.bodyText?m(r.text(),function(e){if(0===(o=r.headers.get("Content-Type")||"").indexOf("application/json")||(n=(t=e).match(/^\[|^\{(?!\{)/))&&{"[":/]$/,"{":/}$/}[n[0]].test(t))try{r.body=JSON.parse(e)}catch(e){r.body=null}else r.body=e;var t,n;return r}):r})},form:function(e,t){var n;n=e.body,"undefined"!=typeof FormData&&n instanceof FormData?e.headers.delete("Content-Type"):h(e.body)&&e.emulateJSON&&(e.body=O.params(e.body),e.headers.set("Content-Type","application/x-www-form-urlencoded")),t()},header:function(n,e){g(b({},F.headers.common,n.crossOrigin?{}:F.headers.custom,F.headers[s(n.method)]),function(e,t){n.headers.has(t)||n.headers.set(t,e)}),e()},cors:function(e,t){var n,r;i&&(n=O.parse(location.href),(r=O.parse(e.getUrl())).protocol===n.protocol&&r.host===n.host||(e.crossOrigin=!0,e.emulateHTTP=!1,T||(e.client=S))),t()}},F.interceptors=["before","method","jsonp","json","form","header","cors"],["get","delete","head","jsonp"].forEach(function(n){F[n]=function(e,t){return this(b(t||{},{url:e,method:n}))}}),["post","put","patch"].forEach(function(r){F[r]=function(e,t,n){return this(b(n||{},{url:e,method:r,body:t}))}}),U.actions={get:{method:"GET"},save:{method:"POST"},query:{method:"GET"},update:{method:"PUT"},remove:{method:"DELETE"},delete:{method:"DELETE"}},"undefined"!=typeof window&&window.Vue&&window.Vue.use(H),H});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vue=t()}(this,function(){"use strict";var d=Object.freeze({});function N(e){return null==e}function P(e){return null!=e}function E(e){return!0===e}function f(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function I(e){return null!==e&&"object"==typeof e}var t=Object.prototype.toString;function l(e){return t.call(e).slice(8,-1)}function p(e){return"[object Object]"===t.call(e)}function o(e){return"[object RegExp]"===t.call(e)}function i(e){var t=parseFloat(String(e));return 0<=t&&Math.floor(t)===t&&isFinite(e)}function h(e){return P(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function n(e){return null==e?"":Array.isArray(e)||p(e)&&e.toString===t?JSON.stringify(e,null,2):String(e)}function L(e){var t=parseFloat(e);return isNaN(t)?e:t}function M(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var r=M("slot,component",!0),u=M("key,ref,slot,slot-scope,is");function v(e,t){if(e.length){t=e.indexOf(t);if(-1<t)return e.splice(t,1)}}var a=Object.prototype.hasOwnProperty;function m(e,t){return a.call(e,t)}function e(t){var n=Object.create(null);return function(e){return n[e]||(n[e]=t(e))}}var s=/-(\w)/g,y=e(function(e){return e.replace(s,function(e,t){return t?t.toUpperCase():""})}),g=e(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),c=/\B([A-Z])/g,b=e(function(e){return e.replace(c,"-$1").toLowerCase()});var _=Function.prototype.bind?function(e,t){return e.bind(t)}:function(n,r){function e(e){var t=arguments.length;return t?1<t?n.apply(r,arguments):n.call(r,e):n.call(r)}return e._length=n.length,e};function w(e,t){for(var n=e.length-(t=t||0),r=new Array(n);n--;)r[n]=e[n+t];return r}function x(e,t){for(var n in t)e[n]=t[n];return e}function $(e){for(var t={},n=0;n<e.length;n++)e[n]&&x(t,e[n]);return t}function C(e,t,n){}var k=function(e,t,n){return!1},A=function(e){return e};function O(t,n){if(t===n)return!0;var e=I(t),r=I(n);if(!e||!r)return!e&&!r&&String(t)===String(n);try{var o=Array.isArray(t),i=Array.isArray(n);if(o&&i)return t.length===n.length&&t.every(function(e,t){return O(e,n[t])});if(t instanceof Date&&n instanceof Date)return t.getTime()===n.getTime();if(o||i)return!1;var a=Object.keys(t),s=Object.keys(n);return a.length===s.length&&a.every(function(e){return O(t[e],n[e])})}catch(e){return!1}}function S(e,t){for(var n=0;n<e.length;n++)if(O(e[n],t))return n;return-1}function D(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var R="data-server-rendered",T=["component","directive","filter"],j=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],F={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!0,devtools:!0,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:k,isReservedAttr:k,isUnknownElement:k,getTagNamespace:C,parsePlatformTagName:A,mustUseProp:k,async:!0,_lifecycleHooks:j},U=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function H(e){e=(e+"").charCodeAt(0);return 36===e||95===e}function V(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var B=new RegExp("[^"+U.source+".$_\\d]");var q,z="__proto__"in{},J="undefined"!=typeof window,G="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,K=G&&WXEnvironment.platform.toLowerCase(),W=J&&window.navigator.userAgent.toLowerCase(),X=W&&/msie|trident/.test(W),Z=W&&0<W.indexOf("msie 9.0"),Y=W&&0<W.indexOf("edge/"),Q=(W&&W.indexOf("android"),W&&/iphone|ipad|ipod|ios/.test(W)||"ios"===K),ee=(W&&/chrome\/\d+/.test(W),W&&/phantomjs/.test(W),W&&W.match(/firefox\/(\d+)/)),te={}.watch,ne=!1;if(J)try{var re={};Object.defineProperty(re,"passive",{get:function(){ne=!0}}),window.addEventListener("test-passive",null,re)}catch(e){}var oe=function(){return q=void 0===q?!J&&!G&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV):q},ie=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ae(e){return"function"==typeof e&&/native code/.test(e.toString())}var se="undefined"!=typeof Symbol&&ae(Symbol)&&"undefined"!=typeof Reflect&&ae(Reflect.ownKeys),ce="undefined"!=typeof Set&&ae(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}(),ue=C,le=C,fe=C,pe=C,de="undefined"!=typeof console,he=/(?:^|[-_])(\w)/g,ue=function(e,t){var n=t?fe(t):"";F.warnHandler?F.warnHandler.call(null,e,t,n):de&&!F.silent&&console.error("[Vue warn]: "+e+n)},le=function(e,t){de&&!F.silent&&console.warn("[Vue tip]: "+e+(t?fe(t):""))},pe=function(e,t){if(e.$root===e)return"<Root>";var n="function"==typeof e&&null!=e.cid?e.options:e._isVue?e.$options||e.constructor.options:e,r=n.name||n._componentTag,e=n.__file;return((r=!r&&e?(n=e.match(/([^/\\]+)\.vue$/))&&n[1]:r)?"<"+r.replace(he,function(e){return e.toUpperCase()}).replace(/[-_]/g,"")+">":"<Anonymous>")+(e&&!1!==t?" at "+e:"")},fe=function(e){if(e._isVue&&e.$parent){for(var t=[],n=0;e;){if(0<t.length){var r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}0<n&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return"\n\nfound in\n\n"+t.map(function(e,t){return""+(0===t?"---\x3e ":function(e,t){for(var n="";t;)t%2==1&&(n+=e),1<t&&(e+=e),t>>=1;return n}(" ",5+2*t))+(Array.isArray(e)?pe(e[0])+"... ("+e[1]+" recursive calls)":pe(e))}).join("\n")}return"\n\n(found in "+pe(e)+")"},ve=0,me=function(){this.id=ve++,this.subs=[]};me.prototype.addSub=function(e){this.subs.push(e)},me.prototype.removeSub=function(e){v(this.subs,e)},me.prototype.depend=function(){me.target&&me.target.addDep(this)},me.prototype.notify=function(){var e=this.subs.slice();F.async||e.sort(function(e,t){return e.id-t.id});for(var t=0,n=e.length;t<n;t++)e[t].update()},me.target=null;var ye=[];function ge(e){ye.push(e),me.target=e}function be(){ye.pop(),me.target=ye[ye.length-1]}var _e=function(e,t,n,r,o,i,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},we={child:{configurable:!0}};we.child.get=function(){return this.componentInstance},Object.defineProperties(_e.prototype,we);var xe=function(e){void 0===e&&(e="");var t=new _e;return t.text=e,t.isComment=!0,t};function $e(e){return new _e(void 0,void 0,void 0,String(e))}function Ce(e){var t=new _e(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var ke=Array.prototype,Ae=Object.create(ke);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(i){var a=ke[i];V(Ae,i,function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,r=a.apply(this,e),o=this.__ob__;switch(i){case"push":case"unshift":n=e;break;case"splice":n=e.slice(2)}return n&&o.observeArray(n),o.dep.notify(),r})});var Oe=Object.getOwnPropertyNames(Ae),Se=!0;function Te(e){Se=e}var je=function(e){this.value=e,this.dep=new me,this.vmCount=0,V(e,"__ob__",this),Array.isArray(e)?(z?e.__proto__=Ae:function(e,t,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];V(e,i,t[i])}}(e,Ae,Oe),this.observeArray(e)):this.walk(e)};function Ee(e,t){var n;if(I(e)&&!(e instanceof _e))return m(e,"__ob__")&&e.__ob__ instanceof je?n=e.__ob__:Se&&!oe()&&(Array.isArray(e)||p(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new je(e)),t&&n&&n.vmCount++,n}function Me(n,e,r,o,i){var a,s,c,u=new me,t=Object.getOwnPropertyDescriptor(n,e);t&&!1===t.configurable||(a=t&&t.get,s=t&&t.set,a&&!s||2!==arguments.length||(r=n[e]),c=!i&&Ee(r),Object.defineProperty(n,e,{enumerable:!0,configurable:!0,get:function(){var e=a?a.call(n):r;return me.target&&(u.depend(),c&&(c.dep.depend(),Array.isArray(e)&&function e(t){for(var n=void 0,r=0,o=t.length;r<o;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&e(n)}(e))),e},set:function(e){var t=a?a.call(n):r;e===t||e!=e&&t!=t||(o&&o(),a&&!s||(s?s.call(n,e):r=e,c=!i&&Ee(e),u.notify()))}}))}function Ne(e,t,n){if((N(e)||f(e))&&ue("Cannot set reactive property on undefined, null, or primitive value: "+e),Array.isArray(e)&&i(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n;var r=e.__ob__;return e._isVue||r&&r.vmCount?(ue("Avoid adding reactive properties to a Vue instance or its root $data at runtime - declare it upfront in the data option."),n):r?(Me(r.value,t,n),r.dep.notify(),n):e[t]=n}function Pe(e,t){var n;(N(e)||f(e))&&ue("Cannot delete reactive property on undefined, null, or primitive value: "+e),Array.isArray(e)&&i(t)?e.splice(t,1):(n=e.__ob__,e._isVue||n&&n.vmCount?ue("Avoid deleting properties on a Vue instance or its root $data - just set it to null."):m(e,t)&&(delete e[t],n&&n.dep.notify()))}je.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)Me(e,t[n])},je.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Ee(e[t])};var Ie=F.optionMergeStrategies;function Le(e,t){if(!t)return e;for(var n,r,o,i=se?Reflect.ownKeys(t):Object.keys(t),a=0;a<i.length;a++)"__ob__"!==(n=i[a])&&(r=e[n],o=t[n],m(e,n)?r!==o&&p(r)&&p(o)&&Le(r,o):Ne(e,n,o));return e}function De(n,r,o){return o?function(){var e="function"==typeof r?r.call(o,o):r,t="function"==typeof n?n.call(o,o):n;return e?Le(e,t):t}:r?n?function(){return Le("function"==typeof r?r.call(this,this):r,"function"==typeof n?n.call(this,this):n)}:r:n}function Re(e,t){e=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return e&&function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(e)}function Fe(e,t,n,r){e=Object.create(e||null);return t?(Ve(r,t,n),x(e,t)):e}Ie.el=Ie.propsData=function(e,t,n,r){return n||ue('option "'+r+'" can only be used during instance creation with the `new` keyword.'),Ue(e,t)},Ie.data=function(e,t,n){return n?De(e,t,n):t&&"function"!=typeof t?(ue('The "data" option should be a function that returns a per-instance value in component definitions.',n),e):De(e,t)},j.forEach(function(e){Ie[e]=Re}),T.forEach(function(e){Ie[e+"s"]=Fe}),Ie.watch=function(e,t,n,r){if(e===te&&(e=void 0),!(t=t===te?void 0:t))return Object.create(e||null);if(Ve(r,t,n),!e)return t;var o,i={};for(o in x(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},Ie.props=Ie.methods=Ie.inject=Ie.computed=function(e,t,n,r){if(t&&Ve(r,t,n),!e)return t;n=Object.create(null);return x(n,e),t&&x(n,t),n},Ie.provide=De;var Ue=function(e,t){return void 0===t?e:t};function He(e){new RegExp("^[a-zA-Z][\\-\\.0-9_"+U.source+"]*$").test(e)||ue('Invalid component name: "'+e+'". Component names should conform to valid custom element name in html5 specification.'),(r(e)||F.isReservedTag(e))&&ue("Do not use built-in or reserved HTML elements as component id: "+e)}function Ve(e,t,n){p(t)||ue('Invalid value for option "'+e+'": expected an Object, but got '+l(t)+".",n)}function Be(n,r,o){if(!function(e){for(var t in e.components)He(t)}(r),function(e,t){var n=e.props;if(n){var r,o,i={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(o=n[r])?i[y(o)]={type:null}:ue("props must be strings when using array syntax.");else if(p(n))for(var a in n)o=n[a],i[y(a)]=p(o)?o:{type:o};else ue('Invalid value for option "props": expected an Array or an Object, but got '+l(n)+".",t);e.props=i}}(r="function"==typeof r?r.options:r,o),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var o=0;o<n.length;o++)r[n[o]]={from:n[o]};else if(p(n))for(var i in n){var a=n[i];r[i]=p(a)?x({from:i},a):{from:a}}else ue('Invalid value for option "inject": expected an Array or an Object, but got '+l(n)+".",t)}}(r,o),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(r),!r._base&&(r.extends&&(n=Be(n,r.extends,o)),r.mixins))for(var e=0,t=r.mixins.length;e<t;e++)n=Be(n,r.mixins[e],o);var i,a={};for(i in n)s(i);for(i in r)m(n,i)||s(i);function s(e){var t=Ie[e]||Ue;a[e]=t(n[e],r[e],o,e)}return a}function qe(e,t,n,r){if("string"==typeof n){var o=e[t];if(m(o,n))return o[n];var i=y(n);if(m(o,i))return o[i];var a=g(i);if(m(o,a))return o[a];a=o[n]||o[i]||o[a];return r&&!a&&ue("Failed to resolve "+t.slice(0,-1)+": "+n,e),a}}function ze(e,t,n,r){var o,i=t[e],a=!m(n,e),t=n[e],n=We(Boolean,i.type);return-1<n&&(a&&!m(i,"default")?t=!1:""!==t&&t!==b(e)||((o=We(String,i.type))<0||n<o)&&(t=!0)),void 0===t&&(t=function(e,t,n){if(!m(t,"default"))return;var r=t.default;I(r)&&ue('Invalid default value for prop "'+n+'": Props with type Object/Array must use a factory function to return the default value.',e);if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==Ge(t.type)?r.call(e):r}(r,i,e),o=Se,Te(!0),Ee(t),Te(o)),function(e,t,n,r,o){if(e.required&&o)ue('Missing required prop: "'+t+'"',r);else if(null!=n||e.required){var i=e.type,a=!i||!0===i,s=[];if(i){Array.isArray(i)||(i=[i]);for(var c=0;c<i.length&&!a;c++){var u=function(e,t){var n,r=Ge(t);{var o;Je.test(r)?(n=(o=typeof e)===r.toLowerCase())||"object"!=o||(n=e instanceof t):n="Object"===r?p(e):"Array"===r?Array.isArray(e):e instanceof t}return{valid:n,expectedType:r}}(n,i[c]);s.push(u.expectedType||""),a=u.valid}}a?(e=e.validator)&&(e(n)||ue('Invalid prop: custom validator check failed for prop "'+t+'".',r)):ue(function(e,t,n){var r='Invalid prop: type check failed for prop "'+e+'". Expected '+n.map(g).join(", "),o=n[0],i=l(t),e=Xe(t,o),t=Xe(t,i);1===n.length&&Ze(o)&&!function(){var e=[],t=arguments.length;for(;t--;)e[t]=arguments[t];return e.some(function(e){return"boolean"===e.toLowerCase()})}(o,i)&&(r+=" with value "+e);r+=", got "+i+" ",Ze(i)&&(r+="with value "+t+".");return r}(t,n,s),r)}}(i,e,t,r,a),t}var Je=/^(String|Number|Boolean|Function|Symbol)$/;function Ge(e){e=e&&e.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function Ke(e,t){return Ge(e)===Ge(t)}function We(e,t){if(!Array.isArray(t))return Ke(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Ke(t[n],e))return n;return-1}function Xe(e,t){return"String"===t?'"'+e+'"':"Number"===t?""+Number(e):""+e}function Ze(t){return["string","number","boolean"].some(function(e){return t.toLowerCase()===e})}function Ye(e,t,n){ge();try{if(t)for(var r=t;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,e,t,n))return}catch(e){et(e,r,"errorCaptured hook")}}et(e,t,n)}finally{be()}}function Qe(e,t,n,r,o){var i;try{(i=n?e.apply(t,n):e.call(t))&&!i._isVue&&h(i)&&!i._handled&&(i.catch(function(e){return Ye(e,r,o+" (Promise/async)")}),i._handled=!0)}catch(e){Ye(e,r,o)}return i}function et(t,e,n){if(F.errorHandler)try{return F.errorHandler.call(null,t,e,n)}catch(e){e!==t&&tt(e,null,"config.errorHandler")}tt(t,e,n)}function tt(e,t,n){if(ue("Error in "+n+': "'+e.toString()+'"',t),!J&&!G||"undefined"==typeof console)throw e;console.error(e)}var nt,rt,ot,it,at,st,ct=!1,ut=[],lt=!1;function ft(){lt=!1;for(var e=ut.slice(0),t=ut.length=0;t<e.length;t++)e[t]()}function pt(e,t){var n;if(ut.push(function(){if(e)try{e.call(t)}catch(e){Ye(e,t,"nextTick")}else n&&n(t)}),lt||(lt=!0,rt()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){n=e})}"undefined"!=typeof Promise&&ae(Promise)?(nt=Promise.resolve(),rt=function(){nt.then(ft),Q&&setTimeout(C)},ct=!0):X||"undefined"==typeof MutationObserver||!ae(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString()?rt="undefined"!=typeof setImmediate&&ae(setImmediate)?function(){setImmediate(ft)}:function(){setTimeout(ft,0)}:(ot=1,Rr=new MutationObserver(ft),it=document.createTextNode(String(ot)),Rr.observe(it,{characterData:!0}),rt=function(){ot=(ot+1)%2,it.data=String(ot)},ct=!0);var dt=J&&window.performance;dt&&dt.mark&&dt.measure&&dt.clearMarks&&dt.clearMeasures&&(at=function(e){return dt.mark(e)},st=function(e,t,n){dt.measure(e,t,n),dt.clearMarks(t),dt.clearMarks(n)});function ht(e,t){ue('Property or method "'+t+'" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',e)}function vt(e,t){ue('Property "'+t+'" must be accessed with "$data.'+t+'" because properties starting with "$" or "_" are not proxied in the Vue instance to prevent conflicts with Vue internalsSee: https://vuejs.org/v2/api/#data',e)}var mt,yt=M("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,require"),gt="undefined"!=typeof Proxy&&ae(Proxy);gt&&(mt=M("stop,prevent,self,ctrl,shift,alt,meta,exact"),F.keyCodes=new Proxy(F.keyCodes,{set:function(e,t,n){return mt(t)?(ue("Avoid overwriting built-in modifier in config.keyCodes: ."+t),!1):(e[t]=n,!0)}}));var bt={has:function(e,t){var n=t in e,r=yt(t)||"string"==typeof t&&"_"===t.charAt(0)&&!(t in e.$data);return n||r||(t in e.$data?vt:ht)(e,t),n||!r}},_t={get:function(e,t){return"string"!=typeof t||t in e||(t in e.$data?vt:ht)(e,t),e[t]}},wt=function(e){var t;gt?(t=(t=e.$options).render&&t.render._withStripped?_t:bt,e._renderProxy=new Proxy(e,t)):e._renderProxy=e},xt=new ce;function $t(e){!function e(t,n){var r,o;var i=Array.isArray(t);if(!i&&!I(t)||Object.isFrozen(t)||t instanceof _e)return;if(t.__ob__){var a=t.__ob__.dep.id;if(n.has(a))return;n.add(a)}if(i)for(r=t.length;r--;)e(t[r],n);else for(o=Object.keys(t),r=o.length;r--;)e(t[o[r]],n)}(e,xt),xt.clear()}var Ct=e(function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}});function kt(e,o){function i(){var e=arguments,t=i.fns;if(!Array.isArray(t))return Qe(t,null,arguments,o,"v-on handler");for(var n=t.slice(),r=0;r<n.length;r++)Qe(n[r],null,e,o,"v-on handler")}return i.fns=e,i}function At(e,t,n,r,o,i){var a,s,c,u;for(a in e)s=e[a],c=t[a],u=Ct(a),N(s)?ue('Invalid handler for event "'+u.name+'": got '+String(s),i):N(c)?(N(s.fns)&&(s=e[a]=kt(s,i)),E(u.once)&&(s=e[a]=o(u.name,s,u.capture)),n(u.name,s,u.capture,u.passive,u.params)):s!==c&&(c.fns=s,e[a]=c);for(a in t)N(e[a])&&r((u=Ct(a)).name,t[a],u.capture)}function Ot(e,t,n){var r,o=(e=e instanceof _e?e.data.hook||(e.data.hook={}):e)[t];function i(){n.apply(this,arguments),v(r.fns,i)}N(o)?r=kt([i]):P(o.fns)&&E(o.merged)?(r=o).fns.push(i):r=kt([o,i]),r.merged=!0,e[t]=r}function St(e,t,n,r,o){if(P(t)){if(m(t,n))return e[n]=t[n],o||delete t[n],1;if(m(t,r))return e[n]=t[r],o||delete t[r],1}}function Tt(e){return f(e)?[$e(e)]:Array.isArray(e)?function e(t,n){var r=[];var o,i,a,s;for(o=0;o<t.length;o++)N(i=t[o])||"boolean"==typeof i||(a=r.length-1,s=r[a],Array.isArray(i)?0<i.length&&(jt((i=e(i,(n||"")+"_"+o))[0])&&jt(s)&&(r[a]=$e(s.text+i[0].text),i.shift()),r.push.apply(r,i)):f(i)?jt(s)?r[a]=$e(s.text+i):""!==i&&r.push($e(i)):jt(i)&&jt(s)?r[a]=$e(s.text+i.text):(E(t._isVList)&&P(i.tag)&&N(i.key)&&P(n)&&(i.key="__vlist"+n+"_"+o+"__"),r.push(i)));return r}(e):void 0}function jt(e){return P(e)&&P(e.text)&&!1===e.isComment}function Et(e,t){if(e){for(var n=Object.create(null),r=se?Reflect.ownKeys(e):Object.keys(e),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){for(var a,s=e[i].from,c=t;c;){if(c._provided&&m(c._provided,s)){n[i]=c._provided[s];break}c=c.$parent}c||("default"in e[i]?(a=e[i].default,n[i]="function"==typeof a?a.call(t):a):ue('Injection "'+i+'" not found',t))}}return n}}function Mt(e,t){if(!e||!e.length)return{};for(var n,r={},o=0,i=e.length;o<i;o++){var a=e[o],s=a.data;s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,a.context!==t&&a.fnContext!==t||!s||null==s.slot?(r.default||(r.default=[])).push(a):(s=r[s=s.slot]||(r[s]=[]),"template"===a.tag?s.push.apply(s,a.children||[]):s.push(a))}for(n in r)r[n].every(Nt)&&delete r[n];return r}function Nt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function Pt(e,t,n){var r,o,i=0<Object.keys(t).length,a=e?!!e.$stable:!i,s=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(a&&n&&n!==d&&s===n.$key&&!i&&!n.$hasNormal)return n;for(var c in r={},e)e[c]&&"$"!==c[0]&&(r[c]=function(e,t,n){function r(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:Tt(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e}n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0});return r}(t,c,e[c]))}else r={};for(o in t)o in r||(r[o]=function(e,t){return function(){return e[t]}}(t,o));return e&&Object.isExtensible(e)&&(e._normalized=r),V(r,"$stable",a),V(r,"$key",s),V(r,"$hasNormal",i),r}function It(e,t){var n,r,o,i;if(Array.isArray(e)||"string"==typeof e)for(a=new Array(e.length),n=0,r=e.length;n<r;n++)a[n]=t(e[n],n);else if("number"==typeof e)for(a=new Array(e),n=0;n<e;n++)a[n]=t(n+1,n);else if(I(e))if(se&&e[Symbol.iterator])for(var a=[],s=e[Symbol.iterator](),c=s.next();!c.done;)a.push(t(c.value,a.length)),c=s.next();else for(o=Object.keys(e),a=new Array(o.length),n=0,r=o.length;n<r;n++)i=o[n],a[n]=t(e[i],i,n);return(a=!P(a)?[]:a)._isVList=!0,a}function Lt(e,t,n,r){var o=this.$scopedSlots[e],t=o?(n=n||{},r&&(I(r)||ue("slot v-bind without argument expects an Object",this),n=x(x({},r),n)),o(n)||t):this.$slots[e]||t,n=n&&n.slot;return n?this.$createElement("template",{slot:n},t):t}function Dt(e){return qe(this.$options,"filters",e,!0)||A}function Rt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function Ft(e,t,n,r,o){n=F.keyCodes[t]||n;return o&&r&&!F.keyCodes[t]?Rt(o,r):n?Rt(n,e):r?b(r)!==t:void 0}function Ut(r,o,i,a,s){if(i)if(I(i)){var c,e;for(e in i=Array.isArray(i)?$(i):i)!function(t){c="class"===t||"style"===t||u(t)?r:(n=r.attrs&&r.attrs.type,a||F.mustUseProp(o,n,t)?r.domProps||(r.domProps={}):r.attrs||(r.attrs={}));var e=y(t),n=b(t);e in c||n in c||(c[t]=i[t],s&&((r.on||(r.on={}))["update:"+t]=function(e){i[t]=e}))}(e)}else ue("v-bind without argument expects an Object or Array value",this);return r}function Ht(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Bt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function Vt(e,t,n){return Bt(e,"__once__"+t+(n?"_"+n:""),!0),e}function Bt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&qt(e[r],t+"_"+r,n);else qt(e,t,n)}function qt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function zt(e,t){if(t)if(p(t)){var n,r=e.on=e.on?x({},e.on):{};for(n in t){var o=r[n],i=t[n];r[n]=o?[].concat(o,i):i}}else ue("v-on without argument expects an Object value",this);return e}function Jt(e,t,n,r){t=t||{$stable:!n};for(var o=0;o<e.length;o++){var i=e[o];Array.isArray(i)?Jt(i,t,n):i&&(i.proxy&&(i.fn.proxy=!0),t[i.key]=i.fn)}return r&&(t.$key=r),t}function Gt(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r?e[t[n]]=t[n+1]:""!==r&&null!==r&&ue("Invalid value for dynamic directive argument (expected string or null): "+r,this)}return e}function Kt(e,t){return"string"==typeof e?t+e:e}function Wt(e){e._o=Vt,e._n=L,e._s=n,e._l=It,e._t=Lt,e._q=O,e._i=S,e._m=Ht,e._f=Dt,e._k=Ft,e._b=Ut,e._v=$e,e._e=xe,e._u=Jt,e._g=zt,e._d=Gt,e._p=Kt}function Xt(e,t,n,o,r){var i,a=this,s=r.options;m(o,"_uid")?(i=Object.create(o))._original=o:o=(i=o)._original;var r=E(s._compiled),c=!r;this.data=e,this.props=t,this.children=n,this.parent=o,this.listeners=e.on||d,this.injections=Et(s.inject,o),this.slots=function(){return a.$slots||Pt(e.scopedSlots,a.$slots=Mt(n,o)),a.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return Pt(e.scopedSlots,this.slots())}}),r&&(this.$options=s,this.$slots=this.slots(),this.$scopedSlots=Pt(e.scopedSlots,this.$slots)),s._scopeId?this._c=function(e,t,n,r){r=on(i,e,t,n,r,c);return r&&!Array.isArray(r)&&(r.fnScopeId=s._scopeId,r.fnContext=o),r}:this._c=function(e,t,n,r){return on(i,e,t,n,r,c)}}function Zt(e,t,n,r,o){e=Ce(e);return e.fnContext=n,e.fnOptions=r,(e.devtoolsMeta=e.devtoolsMeta||{}).renderContext=o,t.slot&&((e.data||(e.data={})).slot=t.slot),e}function Yt(e,t){for(var n in t)e[y(n)]=t[n]}Wt(Xt.prototype);var Qt={init:function(e,t){e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive?Qt.prepatch(e,e):(e.componentInstance=function(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},t=e.data.inlineTemplate;P(t)&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns);return new e.componentOptions.Ctor(n)}(e,vn)).$mount(t?e.elm:void 0,t)},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,r,o){mn=!0;var i=r.data.scopedSlots,a=e.$scopedSlots,a=!!(i&&!i.$stable||a!==d&&!a.$stable||i&&e.$scopedSlots.$key!==i.$key),i=!!(o||e.$options._renderChildren||a);e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r);if(e.$options._renderChildren=o,e.$attrs=r.data.attrs||d,e.$listeners=n||d,t&&e.$options.props){Te(!1);for(var s=e._props,c=e.$options._propKeys||[],u=0;u<c.length;u++){var l=c[u],f=e.$options.props;s[l]=ze(l,f,t,e)}Te(!0),e.$options.propsData=t}n=n||d;a=e.$options._parentListeners;e.$options._parentListeners=n,hn(e,n,a),i&&(e.$slots=Mt(o,r.context),e.$forceUpdate());mn=!1}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t=e.context,n=e.componentInstance;n._isMounted||(n._isMounted=!0,_n(n,"mounted")),e.data.keepAlive&&(t._isMounted?((t=n)._inactive=!1,$n.push(t)):bn(n,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(n&&(t._directInactive=!0,gn(t)))return;if(!t._inactive){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);_n(t,"deactivated")}}(t,!0):t.$destroy())}},en=Object.keys(Qt);function tn(e,t,n,r,o){if(!N(e)){var i,a,s,c,u=n.$options._base;if("function"==typeof(e=I(e)?u.extend(e):e)){if(N(e.cid)&&void 0===(e=function(t,n){if(E(t.error)&&P(t.errorComp))return t.errorComp;if(P(t.resolved))return t.resolved;var e=sn;e&&P(t.owners)&&-1===t.owners.indexOf(e)&&t.owners.push(e);if(E(t.loading)&&P(t.loadingComp))return t.loadingComp;if(e&&!P(t.owners)){var r=t.owners=[e],o=!0,i=null,a=null;e.$on("hook:destroyed",function(){return v(r,e)});var s=function(e){for(var t=0,n=r.length;t<n;t++)r[t].$forceUpdate();e&&(r.length=0,null!==i&&(clearTimeout(i),i=null),null!==a&&(clearTimeout(a),a=null))},c=D(function(e){t.resolved=cn(e,n),o?r.length=0:s(!0)}),u=D(function(e){ue("Failed to resolve async component: "+String(t)+(e?"\nReason: "+e:"")),P(t.errorComp)&&(t.error=!0,s(!0))}),l=t(c,u);return I(l)&&(h(l)?N(t.resolved)&&l.then(c,u):h(l.component)&&(l.component.then(c,u),P(l.error)&&(t.errorComp=cn(l.error,n)),P(l.loading)&&(t.loadingComp=cn(l.loading,n),0===l.delay?t.loading=!0:i=setTimeout(function(){i=null,N(t.resolved)&&N(t.error)&&(t.loading=!0,s(!1))},l.delay||200)),P(l.timeout)&&(a=setTimeout(function(){a=null,N(t.resolved)&&u("timeout ("+l.timeout+"ms)")},l.timeout)))),o=!1,t.loading?t.loadingComp:t.resolved}}(i=e,u)))return a=i,s=t,c=n,u=r,l=o,(f=xe()).asyncFactory=a,f.asyncMeta={data:s,context:c,children:u,tag:l},f;t=t||{},Zn(e),P(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;e=t.on||(t.on={}),n=e[r],t=t.model.callback;P(n)?(Array.isArray(n)?-1===n.indexOf(t):n!==t)&&(e[r]=[t].concat(n)):e[r]=t}(e.options,t);var l=function(e,t,n){var r=t.options.props;if(!N(r)){var o={},i=e.attrs,a=e.props;if(P(i)||P(a))for(var s in r){var c=b(s),u=s.toLowerCase();s!==u&&i&&m(i,u)&&le('Prop "'+u+'" is passed to component '+pe(n||t)+', but the declared prop name is "'+s+'". Note that HTML attributes are case-insensitive and camelCased props need to use their kebab-case equivalents when using in-DOM templates. You should probably use "'+c+'" instead of "'+s+'".'),St(o,a,s,c,!0)||St(o,i,s,c,!1)}return o}}(t,e,o);if(E(e.options.functional))return function(e,t,n,r,o){var i=e.options,a={},s=i.props;if(P(s))for(var c in s)a[c]=ze(c,s,t||d);else P(n.attrs)&&Yt(a,n.attrs),P(n.props)&&Yt(a,n.props);var u=new Xt(n,a,o,r,e);if((e=i.render.call(null,u._c,u))instanceof _e)return Zt(e,n,u.parent,i,u);if(Array.isArray(e)){for(var l=Tt(e)||[],f=new Array(l.length),p=0;p<l.length;p++)f[p]=Zt(l[p],n,u.parent,i,u);return f}}(e,l,t,n,r);var f=t.on;t.on=t.nativeOn,E(e.options.abstract)&&(p=t.slot,t={},p&&(t.slot=p)),function(e){for(var t=e.hook||(e.hook={}),n=0;n<en.length;n++){var r=en[n],o=t[r],i=Qt[r];o===i||o&&o._merged||(t[r]=o?function(n,r){function e(e,t){n(e,t),r(e,t)}return e._merged=!0,e}(i,o):i)}}(t);var p=e.options.name||o;return new _e("vue-component-"+e.cid+(p?"-"+p:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:l,listeners:f,tag:o,children:r},i)}ue("Invalid Component definition: "+String(e),n)}}var nn=1,rn=2;function on(e,t,n,r,o,i){return(Array.isArray(n)||f(n))&&(o=r,r=n,n=void 0),function(e,t,n,r,o){if(P(n)&&P(n.__ob__))return ue("Avoid using observed data object as vnode data: "+JSON.stringify(n)+"\nAlways create fresh vnode data objects in each render!",e),xe();P(n)&&P(n.is)&&(t=n.is);if(!t)return xe();P(n)&&P(n.key)&&!f(n.key)&&ue("Avoid using non-primitive value as key, use string/number value instead.",e);Array.isArray(r)&&"function"==typeof r[0]&&((n=n||{}).scopedSlots={default:r[0]},r.length=0);o===rn?r=Tt(r):o===nn&&(r=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(r));var i,a;r="string"==typeof t?(i=e.$vnode&&e.$vnode.ns||F.getTagNamespace(t),F.isReservedTag(t)?new _e(F.parsePlatformTagName(t),n,r,void 0,void 0,e):n&&n.pre||!P(a=qe(e.$options,"components",t))?new _e(t,n,r,void 0,void 0,e):tn(a,n,e,r,t)):tn(t,n,e,r);return Array.isArray(r)?r:P(r)?(P(i)&&function e(t,n,r){t.ns=n;"foreignObject"===t.tag&&(r=!(n=void 0));if(P(t.children))for(var o=0,i=t.children.length;o<i;o++){var a=t.children[o];P(a.tag)&&(N(a.ns)||E(r)&&"svg"!==a.tag)&&e(a,n,r)}}(r,i),P(n)&&function(e){I(e.style)&&$t(e.style);I(e.class)&&$t(e.class)}(n),r):xe()}(e,t,n,r,o=E(i)?rn:o)}var an,sn=null;function cn(e,t){return I(e=e.__esModule||se&&"Module"===e[Symbol.toStringTag]?e.default:e)?t.extend(e):e}function un(e){return e.isComment&&e.asyncFactory}function ln(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(P(n)&&(P(n.componentOptions)||un(n)))return n}}function fn(e,t){an.$on(e,t)}function pn(e,t){an.$off(e,t)}function dn(t,n){var r=an;return function e(){null!==n.apply(null,arguments)&&r.$off(t,e)}}function hn(e,t,n){At(t,n||{},fn,pn,dn,an=e),an=void 0}var vn=null,mn=!1;function yn(e){var t=vn;return vn=e,function(){vn=t}}function gn(e){for(;e=e&&e.$parent;)if(e._inactive)return 1}function bn(e,t){if(t){if(e._directInactive=!1,gn(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)bn(e.$children[n]);_n(e,"activated")}}function _n(e,t){ge();var n=e.$options[t],r=t+" hook";if(n)for(var o=0,i=n.length;o<i;o++)Qe(n[o],e,null,e,r);e._hasHookEvent&&e.$emit("hook:"+t),be()}var wn=100,xn=[],$n=[],Cn={},kn={},An=!1,On=!1,Sn=0;var Tn,jn=0,En=Date.now;function Mn(){var e,t;for(jn=En(),On=!0,xn.sort(function(e,t){return e.id-t.id}),Sn=0;Sn<xn.length;Sn++)if((e=xn[Sn]).before&&e.before(),t=e.id,Cn[t]=null,e.run(),null!=Cn[t]&&(kn[t]=(kn[t]||0)+1,kn[t]>wn)){ue("You may have an infinite update loop "+(e.user?'in watcher with expression "'+e.expression+'"':"in a component render function."),e.vm);break}var n=$n.slice(),r=xn.slice();Sn=xn.length=$n.length=0,Cn={},An=On=!(kn={}),function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,bn(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&_n(r,"updated")}}(r),ie&&F.devtools&&ie.emit("flush")}!J||X||(Tn=window.performance)&&"function"==typeof Tn.now&&En()>document.createEvent("Event").timeStamp&&(En=function(){return Tn.now()});var Nn=0,Pn=function(e,t,n,r,o){this.vm=e,o&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Nn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ce,this.newDepIds=new ce,this.expression=t.toString(),"function"==typeof t?this.getter=t:(this.getter=function(e){if(!B.test(e)){var n=e.split(".");return function(e){for(var t=0;t<n.length;t++){if(!e)return;e=e[n[t]]}return e}}}(t),this.getter||(this.getter=C,ue('Failed watching path: "'+t+'" Watcher only accepts simple dot-delimited paths. For full control, use a function instead.',e))),this.value=this.lazy?void 0:this.get()};Pn.prototype.get=function(){var e;ge(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;Ye(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&$t(e),be(),this.cleanupDeps()}return e},Pn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},Pn.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},Pn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==Cn[t]){if(Cn[t]=!0,On){for(var n=xn.length-1;Sn<n&&xn[n].id>e.id;)n--;xn.splice(n+1,0,e)}else xn.push(e);An||(An=!0,F.async?pt(Mn):Mn())}}(this)},Pn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||I(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){Ye(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Pn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Pn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},Pn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var In={enumerable:!0,configurable:!0,get:C,set:C};function Ln(e,t,n){In.get=function(){return this[t][n]},In.set=function(e){this[t][n]=e},Object.defineProperty(e,n,In)}function Dn(e){e._watchers=[];var t=e.$options;t.props&&function(r,o){var i=r.$options.propsData||{},a=r._props={},s=r.$options._propKeys=[],c=!r.$parent;c||Te(!1);for(var e in o)!function(e){s.push(e);var t=ze(e,o,i,r),n=b(e);(u(n)||F.isReservedAttr(n))&&ue('"'+n+'" is a reserved attribute and cannot be used as component prop.',r),Me(a,e,t,function(){c||mn||ue("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: \""+e+'"',r)}),e in r||Ln(r,"_props",e)}(e);Te(!0)}(e,t.props),t.methods&&function(e,t){var n,r=e.$options.props;for(n in t)"function"!=typeof t[n]&&ue('Method "'+n+'" has type "'+typeof t[n]+'" in the component definition. Did you reference the function correctly?',e),r&&m(r,n)&&ue('Method "'+n+'" has already been defined as a prop.',e),n in e&&H(n)&&ue('Method "'+n+'" conflicts with an existing Vue instance method. Avoid defining component methods that start with _ or $.'),e[n]="function"!=typeof t[n]?C:_(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;p(t=e._data="function"==typeof t?function(e,t){ge();try{return e.call(t,t)}catch(e){return Ye(e,t,"data()"),{}}finally{be()}}(t,e):t||{})||(t={},ue("data functions should return an object:\nhttps://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function",e));var n=Object.keys(t),r=e.$options.props,o=e.$options.methods,i=n.length;for(;i--;){var a=n[i];o&&m(o,a)&&ue('Method "'+a+'" has already been defined as a data property.',e),r&&m(r,a)?ue('The data property "'+a+'" is already declared as a prop. Use prop default value instead.',e):H(a)||Ln(e,"_data",a)}Ee(t,!0)}(e):Ee(e._data={},!0),t.computed&&function(e,t){var n,r=e._computedWatchers=Object.create(null),o=oe();for(n in t){var i=t[n],a="function"==typeof i?i:i.get;null==a&&ue('Getter is missing for computed property "'+n+'".',e),o||(r[n]=new Pn(e,a||C,C,Rn)),n in e?n in e.$data?ue('The computed property "'+n+'" is already defined in data.',e):e.$options.props&&n in e.$options.props&&ue('The computed property "'+n+'" is already defined as a prop.',e):Fn(e,n,i)}}(e,t.computed),t.watch&&t.watch!==te&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o<r.length;o++)Vn(e,n,r[o]);else Vn(e,n,r)}}(e,t.watch)}var Rn={lazy:!0};function Fn(e,t,n){var r=!oe();"function"==typeof n?(In.get=r?Un(t):Hn(n),In.set=C):(In.get=n.get?r&&!1!==n.cache?Un(t):Hn(n.get):C,In.set=n.set||C),In.set===C&&(In.set=function(){ue('Computed property "'+t+'" was assigned to but it has no setter.',this)}),Object.defineProperty(e,t,In)}function Un(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),me.target&&e.depend(),e.value}}function Hn(e){return function(){return e.call(this,this)}}function Vn(e,t,n,r){return"string"==typeof(n=p(n)?(r=n).handler:n)&&(n=e[n]),e.$watch(t,n,r)}var Bn,qn,zn,Jn,Gn,Kn,Wn,Xn=0;function Zn(e){var t,n,r=e.options;return!e.super||(t=Zn(e.super))!==e.superOptions&&(e.superOptions=t,(n=function(e){var t,n,r=e.options,o=e.sealedOptions;for(n in r)r[n]!==o[n]&&((t=t||{})[n]=r[n]);return t}(e))&&x(e.extendOptions,n),(r=e.options=Be(t,e.extendOptions)).name&&(r.components[r.name]=e)),r}function Yn(e){this instanceof Yn||ue("Vue is a constructor and should be called with the `new` keyword"),this._init(e)}function Qn(e){e.cid=0;var a=1;e.extend=function(e){var t=this,n=t.cid,r=(e=e||{})._Ctor||(e._Ctor={});if(r[n])return r[n];var o=e.name||t.options.name;o&&He(o);function i(e){this._init(e)}return((i.prototype=Object.create(t.prototype)).constructor=i).cid=a++,i.options=Be(t.options,e),i.super=t,i.options.props&&function(e){for(var t in e.options.props)Ln(e.prototype,"_props",t)}(i),i.options.computed&&function(e){var t,n=e.options.computed;for(t in n)Fn(e.prototype,t,n[t])}(i),i.extend=t.extend,i.mixin=t.mixin,i.use=t.use,T.forEach(function(e){i[e]=t[e]}),o&&(i.options.components[o]=i),i.superOptions=t.options,i.extendOptions=e,i.sealedOptions=x({},i.options),r[n]=i}}function er(e){return e&&(e.Ctor.options.name||e.tag)}function tr(e,t){return Array.isArray(e)?-1<e.indexOf(t):"string"==typeof e?-1<e.split(",").indexOf(t):!!o(e)&&e.test(t)}function nr(e,t){var n,r=e.cache,o=e.keys,i=e._vnode;for(n in r){var a=r[n];!a||(a=er(a.componentOptions))&&!t(a)&&rr(r,n,o,i)}}function rr(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,v(n,t)}Yn.prototype._init=function(e){var t,n,r,o,i,a=this;a._uid=Xn++,F.performance&&at&&(t="vue-perf-start:"+a._uid,n="vue-perf-end:"+a._uid,at(t)),a._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),e=t._parentVnode;n.parent=t.parent;e=(n._parentVnode=e).componentOptions;n.propsData=e.propsData,n._parentListeners=e.listeners,n._renderChildren=e.children,n._componentTag=e.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(a,e):a.$options=Be(Zn(a.constructor),e||{},a),wt(a),function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(a._self=a),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&hn(e,t)}(a),function(o){o._vnode=null,o._staticTrees=null;var e=o.$options,t=o.$vnode=e._parentVnode,n=t&&t.context;o.$slots=Mt(e._renderChildren,n),o.$scopedSlots=d,o._c=function(e,t,n,r){return on(o,e,t,n,r,!1)},o.$createElement=function(e,t,n,r){return on(o,e,t,n,r,!0)},t=t&&t.data,Me(o,"$attrs",t&&t.attrs||d,function(){mn||ue("$attrs is readonly.",o)},!0),Me(o,"$listeners",e._parentListeners||d,function(){mn||ue("$listeners is readonly.",o)},!0)}(a),_n(a,"beforeCreate"),(o=Et((r=a).$options.inject,r))&&(Te(!1),Object.keys(o).forEach(function(e){Me(r,e,o[e],function(){ue('Avoid mutating an injected value directly since the changes will be overwritten whenever the provided component re-renders. injection being mutated: "'+e+'"',r)})}),Te(!0)),Dn(a),(e=(i=a).$options.provide)&&(i._provided="function"==typeof e?e.call(i):e),_n(a,"created"),F.performance&&at&&(a._name=pe(a,!1),at(n),st("vue "+a._name+" init",t,n)),a.$options.el&&a.$mount(a.$options.el)},Bn=Yn,zn={get:function(){return this._props}},(qn={get:function(){return this._data}}).set=function(){ue("Avoid replacing instance root $data. Use nested data properties instead.",this)},zn.set=function(){ue("$props is readonly.",this)},Object.defineProperty(Bn.prototype,"$data",qn),Object.defineProperty(Bn.prototype,"$props",zn),Bn.prototype.$set=Ne,Bn.prototype.$delete=Pe,Bn.prototype.$watch=function(e,t,n){if(p(t))return Vn(this,e,t,n);(n=n||{}).user=!0;var r=new Pn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){Ye(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}},Gn=/^hook:/,(Jn=Yn).prototype.$on=function(e,t){var n=this;if(Array.isArray(e))for(var r=0,o=e.length;r<o;r++)n.$on(e[r],t);else(n._events[e]||(n._events[e]=[])).push(t),Gn.test(e)&&(n._hasHookEvent=!0);return n},Jn.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},Jn.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,o=e.length;r<o;r++)n.$off(e[r],t);return n}var i,a=n._events[e];if(!a)return n;if(!t)return n._events[e]=null,n;for(var s=a.length;s--;)if((i=a[s])===t||i.fn===t){a.splice(s,1);break}return n},Jn.prototype.$emit=function(e){var t=this,n=e.toLowerCase();if(n!==e&&t._events[n]&&le('Event "'+n+'" is emitted in component '+pe(t)+' but the handler is registered for "'+e+'". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "'+b(e)+'" instead of "'+e+'".'),r=t._events[e])for(var r=1<r.length?w(r):r,o=w(arguments,1),i='event handler for "'+e+'"',a=0,s=r.length;a<s;a++)Qe(r[a],t,o,t,i);return t},(Kn=Yn).prototype._update=function(e,t){var n=this,r=n.$el,o=n._vnode,i=yn(n);n._vnode=e,n.$el=o?n.__patch__(o,e):n.__patch__(n.$el,e,t,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},Kn.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},Kn.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){_n(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||v(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),_n(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}},Wt((Wn=Yn).prototype),Wn.prototype.$nextTick=function(e){return pt(e,this)},Wn.prototype._render=function(){var t,n=this,e=n.$options,r=e.render,e=e._parentVnode;e&&(n.$scopedSlots=Pt(e.data.scopedSlots,n.$slots,n.$scopedSlots)),n.$vnode=e;try{sn=n,t=r.call(n._renderProxy,n.$createElement)}catch(e){if(Ye(e,n,"render"),n.$options.renderError)try{t=n.$options.renderError.call(n._renderProxy,n.$createElement,e)}catch(e){Ye(e,n,"renderError"),t=n._vnode}else t=n._vnode}finally{sn=null}return(t=Array.isArray(t)&&1===t.length?t[0]:t)instanceof _e||(Array.isArray(t)&&ue("Multiple root nodes returned from render function. Render function should return a single root node.",n),t=xe()),t.parent=e,t};var or,ir,ar,sr=[String,RegExp,Array],cr={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:sr,exclude:sr,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)rr(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",function(t){nr(e,function(e){return tr(t,e)})}),this.$watch("exclude",function(t){nr(e,function(e){return!tr(t,e)})})},render:function(){var e=this.$slots.default,t=ln(e),n=t&&t.componentOptions;if(n){var r=er(n),o=this.include,i=this.exclude;if(o&&(!r||!tr(o,r))||i&&r&&tr(i,r))return t;i=this.cache,r=this.keys,n=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;i[n]?(t.componentInstance=i[n].componentInstance,v(r,n),r.push(n)):(i[n]=t,r.push(n),this.max&&r.length>parseInt(this.max)&&rr(i,r[0],r,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};or=Yn,ar={get:function(){return F},set:function(){ue("Do not replace the Vue.config object, set individual fields instead.")}},Object.defineProperty(or,"config",ar),or.util={warn:ue,extend:x,mergeOptions:Be,defineReactive:Me},or.set=Ne,or.delete=Pe,or.nextTick=pt,or.observable=function(e){return Ee(e),e},or.options=Object.create(null),T.forEach(function(e){or.options[e+"s"]=Object.create(null)}),x((or.options._base=or).options.components,cr),or.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(-1<t.indexOf(e))return this;var n=w(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this},or.mixin=function(e){return this.options=Be(this.options,e),this},Qn(or),ir=or,T.forEach(function(n){ir[n]=function(e,t){return t?("component"===n&&He(e),"component"===n&&p(t)&&(t.name=t.name||e,t=this.options._base.extend(t)),this.options[n+"s"][e]=t="directive"===n&&"function"==typeof t?{bind:t,update:t}:t):this.options[n+"s"][e]}}),Object.defineProperty(Yn.prototype,"$isServer",{get:oe}),Object.defineProperty(Yn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Yn,"FunctionalRenderContext",{value:Xt}),Yn.version="2.6.10";var K=M("style,class"),ur=M("input,textarea,option,select,progress"),W=function(e,t,n){return"value"===n&&ur(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},lr=M("contenteditable,draggable,spellcheck"),fr=M("events,caret,typing,plaintext-only"),pr=function(e,t){return yr(t)||"false"===t?"false":"contenteditable"===e&&fr(t)?t:"true"},dr=M("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),hr="http://www.w3.org/1999/xlink",vr=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},mr=function(e){return vr(e)?e.slice(6,e.length):""},yr=function(e){return null==e||!1===e};function gr(e){for(var t=e.data,n=e,r=e;P(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=br(r.data,t));for(;P(n=n.parent);)n&&n.data&&(t=br(t,n.data));return function(e,t){if(P(e)||P(t))return _r(e,wr(t));return""}(t.staticClass,t.class)}function br(e,t){return{staticClass:_r(e.staticClass,t.staticClass),class:P(e.class)?[e.class,t.class]:t.class}}function _r(e,t){return e?t?e+" "+t:e:t||""}function wr(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,o=e.length;r<o;r++)P(t=wr(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):I(e)?function(e){var t,n="";for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}(e):"string"==typeof e?e:""}function xr(e){return Cr(e)||kr(e)}var $r={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Cr=M("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),kr=M("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0);function Ar(e){return kr(e)?"svg":"math"===e?"math":void 0}var Or=Object.create(null);var Sr=M("text,number,password,search,email,tel,url");function Tr(e){if("string"!=typeof e)return e;var t=document.querySelector(e);return t||(ue("Cannot find element: "+e),document.createElement("div"))}re=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS($r[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),we={create:function(e,t){jr(t)},update:function(e,t){e.data.ref!==t.data.ref&&(jr(e,!0),jr(t))},destroy:function(e){jr(e,!0)}};function jr(e,t){var n,r,o=e.data.ref;P(o)&&(r=e.context,n=e.componentInstance||e.elm,r=r.$refs,t?Array.isArray(r[o])?v(r[o],n):r[o]===n&&(r[o]=void 0):e.data.refInFor?Array.isArray(r[o])?r[o].indexOf(n)<0&&r[o].push(n):r[o]=[n]:r[o]=n)}var Er=new _e("",{},[]),Mr=["create","activate","update","remove","destroy"];function Nr(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&P(e.data)===P(t.data)&&function(e,t){if("input"!==e.tag)return 1;var e=P(n=e.data)&&P(n=n.attrs)&&n.type,n=P(n=t.data)&&P(n=n.attrs)&&n.type;return e===n||Sr(e)&&Sr(n)}(e,t)||E(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&N(t.asyncFactory.error))}j={create:Pr,update:Pr,destroy:function(e){Pr(e,Er)}};function Pr(e,t){(e.data.directives||t.data.directives)&&function(t,n){var e,r,o,i=t===Er,a=n===Er,s=Lr(t.data.directives,t.context),c=Lr(n.data.directives,n.context),u=[],l=[];for(e in c)r=s[e],o=c[e],r?(o.oldValue=r.value,o.oldArg=r.arg,Dr(o,"update",n,t),o.def&&o.def.componentUpdated&&l.push(o)):(Dr(o,"bind",n,t),o.def&&o.def.inserted&&u.push(o));{var f;u.length&&(f=function(){for(var e=0;e<u.length;e++)Dr(u[e],"inserted",n,t)},i?Ot(n,"insert",f):f())}l.length&&Ot(n,"postpatch",function(){for(var e=0;e<l.length;e++)Dr(l[e],"componentUpdated",n,t)});if(!i)for(e in s)c[e]||Dr(s[e],"unbind",t,t,a)}(e,t)}var Ir=Object.create(null);function Lr(e,t){var n,r,o,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=Ir),(i[(o=r).rawName||o.name+"."+Object.keys(o.modifiers||{}).join(".")]=r).def=qe(t.$options,"directives",r.name,!0);return i}function Dr(t,n,r,e,o){var i=t.def&&t.def[n];if(i)try{i(r.elm,t,r,e,o)}catch(e){Ye(e,r.context,"directive "+t.name+" "+n+" hook")}}var Rr=[we,j];function Fr(e,t){var n=t.componentOptions;if(!(P(n)&&!1===n.Ctor.options.inheritAttrs||N(e.data.attrs)&&N(t.data.attrs))){var r,o,i=t.elm,a=e.data.attrs||{},s=t.data.attrs||{};for(r in s=P(s.__ob__)?t.data.attrs=x({},s):s)o=s[r],a[r]!==o&&Ur(i,r,o);for(r in(X||Y)&&s.value!==a.value&&Ur(i,"value",s.value),a)N(s[r])&&(vr(r)?i.removeAttributeNS(hr,mr(r)):lr(r)||i.removeAttribute(r))}}function Ur(e,t,n){-1<e.tagName.indexOf("-")?Hr(e,t,n):dr(t)?yr(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):lr(t)?e.setAttribute(t,pr(t,n)):vr(t)?yr(n)?e.removeAttributeNS(hr,mr(t)):e.setAttributeNS(hr,t,n):Hr(e,t,n)}function Hr(t,e,n){var r;yr(n)?t.removeAttribute(e):(!X||Z||"TEXTAREA"!==t.tagName||"placeholder"!==e||""===n||t.__ieph||(r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)},t.addEventListener("input",r),t.__ieph=!0),t.setAttribute(e,n))}sr={create:Fr,update:Fr};function Vr(e,t){var n=t.elm,r=t.data,e=e.data;N(r.staticClass)&&N(r.class)&&(N(e)||N(e.staticClass)&&N(e.class))||(e=gr(t),(e=P(t=n._transitionClasses)?_r(e,wr(t)):e)!==n._prevClass&&(n.setAttribute("class",e),n._prevClass=e))}var Br,qr,zr,Jr,Gr,Kr,Wr,we={create:Vr,update:Vr},Xr=/[\w).+\-_$\]]/;function Zr(e){for(var t,n,r,o,i=!1,a=!1,s=!1,c=!1,u=0,l=0,f=0,p=0,d=0;d<e.length;d++)if(n=t,t=e.charCodeAt(d),i)39===t&&92!==n&&(i=!1);else if(a)34===t&&92!==n&&(a=!1);else if(s)96===t&&92!==n&&(s=!1);else if(c)47===t&&92!==n&&(c=!1);else if(124!==t||124===e.charCodeAt(d+1)||124===e.charCodeAt(d-1)||u||l||f){switch(t){case 34:a=!0;break;case 39:i=!0;break;case 96:s=!0;break;case 40:f++;break;case 41:f--;break;case 91:l++;break;case 93:l--;break;case 123:u++;break;case 125:u--}if(47===t){for(var h=d-1,v=void 0;0<=h&&" "===(v=e.charAt(h));h--);v&&Xr.test(v)||(c=!0)}}else void 0===r?(p=d+1,r=e.slice(0,d).trim()):m();function m(){(o=o||[]).push(e.slice(p,d).trim()),p=d+1}if(void 0===r?r=e.slice(0,d).trim():0!==p&&m(),o)for(d=0;d<o.length;d++)r=function(e,t){var n=t.indexOf("(");{if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),n=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==n?","+n:n)}}(r,o[d]);return r}function Yr(e,t){console.error("[Vue compiler]: "+e)}function Qr(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function eo(e,t,n,r,o){(e.props||(e.props=[])).push(uo({name:t,value:n,dynamic:o},r)),e.plain=!1}function to(e,t,n,r,o){(o?e.dynamicAttrs||(e.dynamicAttrs=[]):e.attrs||(e.attrs=[])).push(uo({name:t,value:n,dynamic:o},r)),e.plain=!1}function no(e,t,n,r){e.attrsMap[t]=n,e.attrsList.push(uo({name:t,value:n},r))}function ro(e,t,n){return n?"_p("+t+',"'+e+'")':e+t}function oo(e,t,n,r,o,i,a,s){r=r||d,i&&r.prevent&&r.passive&&i("passive and prevent can't be used together. Passive handler can't prevent default event.",a),r.right?s?t="("+t+")==='click'?'contextmenu':("+t+")":"click"===t&&(t="contextmenu",delete r.right):r.middle&&(s?t="("+t+")==='click'?'mouseup':("+t+")":"click"===t&&(t="mouseup")),r.capture&&(delete r.capture,t=ro("!",t,s)),r.once&&(delete r.once,t=ro("~",t,s)),r.passive&&(delete r.passive,t=ro("&",t,s));i=r.native?(delete r.native,e.nativeEvents||(e.nativeEvents={})):e.events||(e.events={}),a=uo({value:n.trim(),dynamic:s},a);r!==d&&(a.modifiers=r);r=i[t];Array.isArray(r)?o?r.unshift(a):r.push(a):i[t]=r?o?[a,r]:[r,a]:a,e.plain=!1}function io(e,t){return e.rawAttrsMap[":"+t]||e.rawAttrsMap["v-bind:"+t]||e.rawAttrsMap[t]}function ao(e,t,n){var r=so(e,":"+t)||so(e,"v-bind:"+t);if(null!=r)return Zr(r);if(!1!==n){t=so(e,t);if(null!=t)return JSON.stringify(t)}}function so(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var o=e.attrsList,i=0,a=o.length;i<a;i++)if(o[i].name===t){o.splice(i,1);break}return n&&delete e.attrsMap[t],r}function co(e,t){for(var n=e.attrsList,r=0,o=n.length;r<o;r++){var i=n[r];if(t.test(i.name))return n.splice(r,1),i}}function uo(e,t){return t&&(null!=t.start&&(e.start=t.start),null!=t.end&&(e.end=t.end)),e}function lo(e,t,n){var r=n||{},o=r.number,n="$$v",n=r.trim?"(typeof $$v === 'string'? $$v.trim(): $$v)":n,n=fo(t,n=o?"_n("+n+")":n);e.model={value:"("+t+")",expression:JSON.stringify(t),callback:"function ($$v) {"+n+"}"}}function fo(e,t){var n=function(e){if(e=e.trim(),Br=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<Br-1)return-1<(Jr=e.lastIndexOf("."))?{exp:e.slice(0,Jr),key:'"'+e.slice(Jr+1)+'"'}:{exp:e,key:null};qr=e,Jr=Gr=Kr=0;for(;!ho();)vo(zr=po())?mo(zr):91===zr&&function(e){var t=1;Gr=Jr;for(;!ho();)if(vo(e=po()))mo(e);else if(91===e&&t++,93===e&&t--,0===t){Kr=Jr;break}}(zr);return{exp:e.slice(0,Gr),key:e.slice(Gr+1,Kr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function po(){return qr.charCodeAt(++Jr)}function ho(){return Br<=Jr}function vo(e){return 34===e||39===e}function mo(e){for(var t=e;!ho()&&(e=po())!==t;);}var yo,go="__r",bo="__c";function _o(t,n,r){var o=yo;return function e(){null!==n.apply(null,arguments)&&$o(t,e,r,o)}}var wo=ct&&!(ee&&Number(ee[1])<=53);function xo(e,t,n,r){var o,i;wo&&(o=jn,t=(i=t)._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=o||e.timeStamp<=0||e.target.ownerDocument!==document)return i.apply(this,arguments)}),yo.addEventListener(e,t,ne?{capture:n,passive:r}:n)}function $o(e,t,n,r){(r||yo).removeEventListener(e,t._wrapper||t,n)}function Co(e,t){var n,r,o;N(e.data.on)&&N(t.data.on)||(n=t.data.on||{},r=e.data.on||{},yo=t.elm,P((o=n)[go])&&(o[e=X?"change":"input"]=[].concat(o[go],o[e]||[]),delete o[go]),P(o[bo])&&(o.change=[].concat(o[bo],o.change||[]),delete o[bo]),At(n,r,xo,$o,_o,t.context),yo=void 0)}var ko,j={create:Co,update:Co};function Ao(e,t){if(!N(e.data.domProps)||!N(t.data.domProps)){var n,r,o,i,a=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};for(n in P(c.__ob__)&&(c=t.data.domProps=x({},c)),s)n in c||(a[n]="");for(n in c){if(r=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n&&"PROGRESS"!==a.tagName){var u=N(a._value=r)?"":String(r);i=u,(o=a).composing||"OPTION"!==o.tagName&&!function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(o,i)&&!function(e,t){var n=e.value,e=e._vModifiers;if(P(e)){if(e.number)return L(n)!==L(t);if(e.trim)return n.trim()!==t.trim()}return n!==t}(o,i)||(a.value=u)}else if("innerHTML"===n&&kr(a.tagName)&&N(a.innerHTML)){(ko=ko||document.createElement("div")).innerHTML="<svg>"+r+"</svg>";for(var l=ko.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(r!==s[n])try{a[n]=r}catch(e){}}}}var ct={create:Ao,update:Ao},Oo=e(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){!e||1<(e=e.split(n)).length&&(t[e[0].trim()]=e[1].trim())}),t});function So(e){var t=To(e.style);return e.staticStyle?x(e.staticStyle,t):t}function To(e){return Array.isArray(e)?$(e):"string"==typeof e?Oo(e):e}function jo(e,t,n){if(Mo.test(t))e.style.setProperty(t,n);else if(No.test(n))e.style.setProperty(b(t),n.replace(No,""),"important");else{var r=Io(t);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)e.style[r]=n[o];else e.style[r]=n}}var Eo,Mo=/^--/,No=/\s*!important$/,Po=["Webkit","Moz","ms"],Io=e(function(e){if(Eo=Eo||document.createElement("div").style,"filter"!==(e=y(e))&&e in Eo)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Po.length;n++){var r=Po[n]+t;if(r in Eo)return r}});function Lo(e,t){var n=t.data,e=e.data;if(!(N(n.staticStyle)&&N(n.style)&&N(e.staticStyle)&&N(e.style))){var r,o,i=t.elm,n=e.staticStyle,e=e.normalizedStyle||e.style||{},a=n||e,e=To(t.data.style)||{};t.data.normalizedStyle=P(e.__ob__)?x({},e):e;var s=function(e,t){var n,r={};if(t)for(var o=e;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=So(o.data))&&x(r,n);(n=So(e.data))&&x(r,n);for(var i=e;i=i.parent;)i.data&&(n=So(i.data))&&x(r,n);return r}(t,!0);for(o in a)N(s[o])&&jo(i,o,"");for(o in s)(r=s[o])!==a[o]&&jo(i,o,null==r?"":r)}}var ee={create:Lo,update:Lo},Do=/\s+/;function Ro(t,e){var n;(e=e&&e.trim())&&(t.classList?-1<e.indexOf(" ")?e.split(Do).forEach(function(e){return t.classList.add(e)}):t.classList.add(e):(n=" "+(t.getAttribute("class")||"")+" ").indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim()))}function Fo(t,e){if(e=e&&e.trim())if(t.classList)-1<e.indexOf(" ")?e.split(Do).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";0<=n.indexOf(r);)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Uo(e){if(e){if("object"!=typeof e)return"string"==typeof e?Ho(e):void 0;var t={};return!1!==e.css&&x(t,Ho(e.name||"v")),x(t,e),t}}var Ho=e(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),Vo=J&&!Z,Bo="transition",qo="animation",zo="transition",Jo="transitionend",Go="animation",Ko="animationend";Vo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(zo="WebkitTransition",Jo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Go="WebkitAnimation",Ko="webkitAnimationEnd"));var Wo=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Xo(e){Wo(function(){Wo(e)})}function Zo(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Ro(e,t))}function Yo(e,t){e._transitionClasses&&v(e._transitionClasses,t),Fo(e,t)}function Qo(t,e,n){var r=ti(t,e),o=r.type,e=r.timeout,i=r.propCount;if(!o)return n();function a(){t.removeEventListener(s,u),n()}var s=o===Bo?Jo:Ko,c=0,u=function(e){e.target===t&&++c>=i&&a()};setTimeout(function(){c<i&&a()},e+1),t.addEventListener(s,u)}var ei=/\b(transform|all)(,|$)/;function ti(e,t){var n,r=window.getComputedStyle(e),o=(r[zo+"Delay"]||"").split(", "),i=(r[zo+"Duration"]||"").split(", "),a=ni(o,i),s=(r[Go+"Delay"]||"").split(", "),c=(r[Go+"Duration"]||"").split(", "),e=ni(s,c),o=0,s=0;return t===Bo?0<a&&(n=Bo,o=a,s=i.length):t===qo?0<e&&(n=qo,o=e,s=c.length):s=(n=0<(o=Math.max(a,e))?e<a?Bo:qo:null)?(n===Bo?i:c).length:0,{type:n,timeout:o,propCount:s,hasTransform:n===Bo&&ei.test(r[zo+"Property"])}}function ni(n,e){for(;n.length<e.length;)n=n.concat(n);return Math.max.apply(null,e.map(function(e,t){return ri(e)+ri(n[t])}))}function ri(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function oi(t,e){var n=t.elm;P(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=Uo(t.data.transition);if(!N(r)&&!P(n._enterCb)&&1===n.nodeType){for(var o=r.css,i=r.type,a=r.enterClass,s=r.enterToClass,c=r.enterActiveClass,u=r.appearClass,l=r.appearToClass,f=r.appearActiveClass,p=r.beforeEnter,d=r.enter,h=r.afterEnter,v=r.enterCancelled,m=r.beforeAppear,y=r.appear,g=r.afterAppear,b=r.appearCancelled,_=r.duration,w=vn,x=vn.$vnode;x&&x.parent;)w=x.context,x=x.parent;var $,C,k,A,O,S,T,j,E,M,r=!w._isMounted||!t.isRootInsert;r&&!y&&""!==y||($=r&&u?u:a,C=r&&f?f:c,k=r&&l?l:s,p=r&&m||p,A=r&&"function"==typeof y?y:d,O=r&&g||h,S=r&&b||v,null!=(T=L(I(_)?_.enter:_))&&ai(T,"enter",t),j=!1!==o&&!Z,E=ci(A),M=n._enterCb=D(function(){j&&(Yo(n,k),Yo(n,C)),M.cancelled?(j&&Yo(n,$),S&&S(n)):O&&O(n),n._enterCb=null}),t.data.show||Ot(t,"insert",function(){var e=n.parentNode,e=e&&e._pending&&e._pending[t.key];e&&e.tag===t.tag&&e.elm._leaveCb&&e.elm._leaveCb(),A&&A(n,M)}),p&&p(n),j&&(Zo(n,$),Zo(n,C),Xo(function(){Yo(n,$),M.cancelled||(Zo(n,k),E||(si(T)?setTimeout(M,T):Qo(n,i,M)))})),t.data.show&&(e&&e(),A&&A(n,M)),j||E||M())}}function ii(e,t){var n=e.elm;P(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r,o,i,a,s,c,u,l,f,p,d,h,v,m,y=Uo(e.data.transition);if(N(y)||1!==n.nodeType)return t();function g(){m.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),c&&c(n),d&&(Zo(n,i),Zo(n,s),Xo(function(){Yo(n,i),m.cancelled||(Zo(n,a),h||(si(v)?setTimeout(m,v):Qo(n,o,m)))})),u&&u(n,m),d||h||m())}P(n._leaveCb)||(r=y.css,o=y.type,i=y.leaveClass,a=y.leaveToClass,s=y.leaveActiveClass,c=y.beforeLeave,u=y.leave,l=y.afterLeave,f=y.leaveCancelled,p=y.delayLeave,y=y.duration,d=!1!==r&&!Z,h=ci(u),P(v=L(I(y)?y.leave:y))&&ai(v,"leave",e),m=n._leaveCb=D(function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),d&&(Yo(n,a),Yo(n,s)),m.cancelled?(d&&Yo(n,i),f&&f(n)):(t(),l&&l(n)),n._leaveCb=null}),p?p(g):g())}function ai(e,t,n){"number"!=typeof e?ue("<transition> explicit "+t+" duration is not a valid number - got "+JSON.stringify(e)+".",n.context):isNaN(e)&&ue("<transition> explicit "+t+" duration is NaN - the duration expression might be incorrect.",n.context)}function si(e){return"number"==typeof e&&!isNaN(e)}function ci(e){if(N(e))return!1;var t=e.fns;return P(t)?ci(Array.isArray(t)?t[0]:t):1<(e._length||e.length)}function ui(e,t){!0!==t.data.show&&oi(t)}we=function(e){for(var t,h={},n=e.modules,y=e.nodeOps,r=0;r<Mr.length;++r)for(h[Mr[r]]=[],t=0;t<n.length;++t)P(n[t][Mr[r]])&&h[Mr[r]].push(n[t][Mr[r]]);function i(e,t){function n(){0==--n.listeners&&a(e)}return n.listeners=t,n}function a(e){var t=y.parentNode(e);P(t)&&y.removeChild(t,e)}function m(t,e){return!e&&!t.ns&&(!F.ignoredElements.length||!F.ignoredElements.some(function(e){return o(e)?e.test(t.tag):e===t.tag}))&&F.isUnknownElement(t.tag)}var s=0;function g(e,t,n,r,o,i,a){(e=P(e.elm)&&P(i)?i[a]=Ce(e):e).isRootInsert=!o,function(e,t,n,r){var o=e.data;if(P(o)){var i=P(e.componentInstance)&&o.keepAlive;if(P(o=o.hook)&&P(o=o.init)&&o(e,!1),P(e.componentInstance))return b(e,t),c(n,e.elm,r),E(i)&&function(e,t,n,r){var o,i=e;for(;i.componentInstance;)if(i=i.componentInstance._vnode,P(o=i.data)&&P(o=o.transition)){for(o=0;o<h.activate.length;++o)h.activate[o](Er,i);t.push(i);break}c(n,e.elm,r)}(e,t,n,r),!0}}(e,t,n,r)||(i=e.data,a=e.children,P(o=e.tag)?(i&&i.pre&&s++,m(e,s)&&ue("Unknown custom element: <"+o+'> - did you register the component correctly? For recursive components, make sure to provide the "name" option.',e.context),e.elm=e.ns?y.createElementNS(e.ns,o):y.createElement(o,e),u(e),_(e,a,t),P(i)&&w(e,t),c(n,e.elm,r),i&&i.pre&&s--):(E(e.isComment)?e.elm=y.createComment(e.text):e.elm=y.createTextNode(e.text),c(n,e.elm,r)))}function b(e,t){P(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,v(e)?(w(e,t),u(e)):(jr(e),t.push(e))}function c(e,t,n){P(e)&&(P(n)?y.parentNode(n)===e&&y.insertBefore(e,t,n):y.appendChild(e,t))}function _(e,t,n){if(Array.isArray(t)){k(t);for(var r=0;r<t.length;++r)g(t[r],n,e.elm,null,!0,t,r)}else f(e.text)&&y.appendChild(e.elm,y.createTextNode(String(e.text)))}function v(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return P(e.tag)}function w(e,t){for(var n=0;n<h.create.length;++n)h.create[n](Er,e);P(r=e.data.hook)&&(P(r.create)&&r.create(Er,e),P(r.insert)&&t.push(e))}function u(e){var t;if(P(t=e.fnScopeId))y.setStyleScope(e.elm,t);else for(var n=e;n;)P(t=n.context)&&P(t=t.$options._scopeId)&&y.setStyleScope(e.elm,t),n=n.parent;P(t=vn)&&t!==e.context&&t!==e.fnContext&&P(t=t.$options._scopeId)&&y.setStyleScope(e.elm,t)}function x(e,t,n,r,o,i){for(;r<=o;++r)g(n[r],i,e,t,!1,n,r)}function $(e){var t,n,r=e.data;if(P(r))for(P(t=r.hook)&&P(t=t.destroy)&&t(e),t=0;t<h.destroy.length;++t)h.destroy[t](e);if(P(t=e.children))for(n=0;n<e.children.length;++n)$(e.children[n])}function C(e,t,n,r){for(;n<=r;++n){var o=t[n];P(o)&&(P(o.tag)?(function e(t,n){if(P(n)||P(t.data)){var r,o=h.remove.length+1;for(P(n)?n.listeners+=o:n=i(t.elm,o),P(r=t.componentInstance)&&P(r=r._vnode)&&P(r.data)&&e(r,n),r=0;r<h.remove.length;++r)h.remove[r](t,n);P(r=t.data.hook)&&P(r=r.remove)?r(t,n):n()}else a(t.elm)}(o),$(o)):a(o.elm))}}function l(e,t,n,r,o){var i,a,s,c=0,u=0,l=t.length-1,f=t[0],p=t[l],d=n.length-1,h=n[0],v=n[d],m=!o;for(k(n);c<=l&&u<=d;)N(f)?f=t[++c]:N(p)?p=t[--l]:Nr(f,h)?(A(f,h,r,n,u),f=t[++c],h=n[++u]):Nr(p,v)?(A(p,v,r,n,d),p=t[--l],v=n[--d]):Nr(f,v)?(A(f,v,r,n,d),m&&y.insertBefore(e,f.elm,y.nextSibling(p.elm)),f=t[++c],v=n[--d]):h=(Nr(p,h)?(A(p,h,r,n,u),m&&y.insertBefore(e,p.elm,f.elm),p=t[--l]):(N(i)&&(i=function(e,t,n){for(var r,o={},i=t;i<=n;++i)P(r=e[i].key)&&(o[r]=i);return o}(t,c,l)),!N(a=P(h.key)?i[h.key]:function(e,t,n,r){for(var o=n;o<r;o++){var i=t[o];if(P(i)&&Nr(e,i))return o}}(h,t,c,l))&&Nr(s=t[a],h)?(A(s,h,r,n,u),t[a]=void 0,m&&y.insertBefore(e,s.elm,f.elm)):g(h,r,e,f.elm,!1,n,u)),n[++u]);l<c?x(e,N(n[d+1])?null:n[d+1].elm,n,u,d,r):d<u&&C(0,t,c,l)}function k(e){for(var t={},n=0;n<e.length;n++){var r=e[n],o=r.key;P(o)&&(t[o]?ue("Duplicate keys detected: '"+o+"'. This may cause an update error.",r.context):t[o]=!0)}}function A(e,t,n,r,o,i){if(e!==t){var a=(t=P(t.elm)&&P(r)?r[o]=Ce(t):t).elm=e.elm;if(E(e.isAsyncPlaceholder))P(t.asyncFactory.resolved)?j(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(E(t.isStatic)&&E(e.isStatic)&&t.key===e.key&&(E(t.isCloned)||E(t.isOnce)))t.componentInstance=e.componentInstance;else{var s,c=t.data;P(c)&&P(s=c.hook)&&P(s=s.prepatch)&&s(e,t);r=e.children,o=t.children;if(P(c)&&v(t)){for(s=0;s<h.update.length;++s)h.update[s](e,t);P(s=c.hook)&&P(s=s.update)&&s(e,t)}N(t.text)?P(r)&&P(o)?r!==o&&l(a,r,o,n,i):P(o)?(k(o),P(e.text)&&y.setTextContent(a,""),x(a,null,o,0,o.length-1,n)):P(r)?C(0,r,0,r.length-1):P(e.text)&&y.setTextContent(a,""):e.text!==t.text&&y.setTextContent(a,t.text),P(c)&&P(s=c.hook)&&P(s=s.postpatch)&&s(e,t)}}}function O(e,t,n){if(E(n)&&P(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var S=!1,T=M("attrs,class,staticClass,staticStyle,key");function j(e,t,n,r){var o,i,a,s,c=t.tag,u=t.data,l=t.children;if(r=r||u&&u.pre,t.elm=e,E(t.isComment)&&P(t.asyncFactory))return t.isAsyncPlaceholder=!0;if(i=e,s=r,P((a=t).tag)?0===a.tag.indexOf("vue-component")||!m(a,s)&&a.tag.toLowerCase()===(i.tagName&&i.tagName.toLowerCase()):i.nodeType===(a.isComment?8:3)){if(P(u)&&(P(o=u.hook)&&P(o=o.init)&&o(t,!0),P(o=t.componentInstance)))return b(t,n),1;if(P(c)){if(P(l))if(e.hasChildNodes())if(P(o=u)&&P(o=o.domProps)&&P(o=o.innerHTML)){if(o!==e.innerHTML)return void("undefined"==typeof console||S||(S=!0,console.warn("Parent: ",e),console.warn("server innerHTML: ",o),console.warn("client innerHTML: ",e.innerHTML)))}else{for(var f=!0,p=e.firstChild,d=0;d<l.length;d++){if(!p||!j(p,l[d],n,r)){f=!1;break}p=p.nextSibling}if(!f||p)return void("undefined"==typeof console||S||(S=!0,console.warn("Parent: ",e),console.warn("Mismatching childNodes vs. VNodes: ",e.childNodes,l)))}else _(t,l,n);if(P(u)){var h,v=!1;for(h in u)if(!T(h)){v=!0,w(t,n);break}!v&&u.class&&$t(u.class)}}else e.data!==t.text&&(e.data=t.text);return 1}}return function(e,t,n,r){if(!N(t)){var o=!1,i=[];if(N(e))o=!0,g(t,i);else{var a=P(e.nodeType);if(!a&&Nr(e,t))A(e,t,i,null,null,r);else{if(a){if(1===e.nodeType&&e.hasAttribute(R)&&(e.removeAttribute(R),n=!0),E(n)){if(j(e,t,i))return O(t,i,!0),e;ue("The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.")}s=e,e=new _e(y.tagName(s).toLowerCase(),{},[],void 0,s)}var n=e.elm,s=y.parentNode(n);if(g(t,i,n._leaveCb?null:s,y.nextSibling(n)),P(t.parent))for(var c=t.parent,u=v(t);c;){for(var l=0;l<h.destroy.length;++l)h.destroy[l](c);if(c.elm=t.elm,u){for(var f=0;f<h.create.length;++f)h.create[f](Er,c);var p=c.data.hook.insert;if(p.merged)for(var d=1;d<p.fns.length;d++)p.fns[d]()}else jr(c);c=c.parent}P(s)?C(0,[e],0,0):P(e.tag)&&$(e)}}return O(t,i,o),t.elm}P(e)&&$(e)}}({nodeOps:re,modules:[sr,we,j,ct,ee,J?{create:ui,activate:ui,remove:function(e,t){!0!==e.data.show?ii(e,t):t()}}:{}].concat(Rr)});Z&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&yi(e,"input")});var li={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Ot(n,"postpatch",function(){li.componentUpdated(e,t,n)}):fi(e,t,n.context),e._vOptions=[].map.call(e.options,hi)):"textarea"!==n.tag&&!Sr(e.type)||(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",vi),e.addEventListener("compositionend",mi),e.addEventListener("change",mi),Z&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){var r,o;"select"===n.tag&&(fi(e,t,n.context),r=e._vOptions,(o=e._vOptions=[].map.call(e.options,hi)).some(function(e,t){return!O(e,r[t])})&&(e.multiple?t.value.some(function(e){return di(e,o)}):t.value!==t.oldValue&&di(t.value,o))&&yi(e,"change"))}};function fi(e,t,n){pi(e,t,n),(X||Y)&&setTimeout(function(){pi(e,t,n)},0)}function pi(e,t,n){var r=t.value,o=e.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],o)i=-1<S(r,hi(a)),a.selected!==i&&(a.selected=i);else if(O(hi(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));o||(e.selectedIndex=-1)}else ue('<select multiple v-model="'+t.expression+'"> expects an Array value for its binding, but got '+Object.prototype.toString.call(r).slice(8,-1),n)}function di(t,e){return e.every(function(e){return!O(e,t)})}function hi(e){return"_value"in e?e._value:e.value}function vi(e){e.target.composing=!0}function mi(e){e.target.composing&&(e.target.composing=!1,yi(e.target,"input"))}function yi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function gi(e){return!e.componentInstance||e.data&&e.data.transition?e:gi(e.componentInstance._vnode)}j={model:li,show:{bind:function(e,t,n){var r=t.value,t=(n=gi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&t?(n.data.show=!0,oi(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=gi(n)).data&&n.data.transition?(n.data.show=!0,r?oi(n,function(){e.style.display=e.__vOriginalDisplay}):ii(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,o){o||(e.style.display=e.__vOriginalDisplay)}}},ct={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function bi(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?bi(ln(t.children)):e}function _i(e){var t,n={},r=e.$options;for(t in r.propsData)n[t]=e[t];var o,i=r._parentListeners;for(o in i)n[y(o)]=i[o];return n}function wi(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function xi(e){return e.tag||un(e)}function $i(e){return"show"===e.name}ee={name:"transition",props:ct,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(xi)).length){1<n.length&&ue("<transition> can only be used on a single element. Use <transition-group> for lists.",this.$parent);var r=this.mode;r&&"in-out"!==r&&"out-in"!==r&&ue("invalid <transition> mode: "+r,this.$parent);var o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return 1}(this.$vnode))return o;var i=bi(o);if(!i)return o;if(this._leaving)return wi(e,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comme