smart-webcomponents-react 11.0.55 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/index.d.ts +34 -0
  2. package/kanban/kanban.d.ts +16 -0
  3. package/kanban/kanban.esm.js +50 -1
  4. package/kanban/kanban.umd.js +50 -1
  5. package/package.json +1 -1
  6. package/source/modules/smart.accordion.js +1 -1
  7. package/source/modules/smart.array.js +1 -1
  8. package/source/modules/smart.breadcrumb.js +1 -1
  9. package/source/modules/smart.button.js +1 -1
  10. package/source/modules/smart.buttongroup.js +1 -1
  11. package/source/modules/smart.calendar.js +3 -3
  12. package/source/modules/smart.card.js +1 -1
  13. package/source/modules/smart.cardview.js +6 -6
  14. package/source/modules/smart.carousel.js +1 -1
  15. package/source/modules/smart.chart.js +3 -3
  16. package/source/modules/smart.checkbox.js +1 -1
  17. package/source/modules/smart.checkinput.js +2 -2
  18. package/source/modules/smart.chip.js +1 -1
  19. package/source/modules/smart.colorinput.js +2 -2
  20. package/source/modules/smart.colorpanel.js +1 -1
  21. package/source/modules/smart.colorpicker.js +1 -1
  22. package/source/modules/smart.combobox.js +1 -1
  23. package/source/modules/smart.common.js +4 -4
  24. package/source/modules/smart.countryinput.js +2 -2
  25. package/source/modules/smart.dateinput.js +3 -3
  26. package/source/modules/smart.daterangeinput.js +3 -3
  27. package/source/modules/smart.datetimepicker.js +3 -3
  28. package/source/modules/smart.dockinglayout.js +1 -1
  29. package/source/modules/smart.dropdownbutton.js +1 -1
  30. package/source/modules/smart.dropdownlist.js +1 -1
  31. package/source/modules/smart.editor.js +3 -3
  32. package/source/modules/smart.element.js +1 -1
  33. package/source/modules/smart.fileupload.js +1 -1
  34. package/source/modules/smart.form.js +2 -2
  35. package/source/modules/smart.formulaparser.js +1 -1
  36. package/source/modules/smart.ganttchart.js +7 -7
  37. package/source/modules/smart.gauge.js +2 -2
  38. package/source/modules/smart.grid.js +18 -18
  39. package/source/modules/smart.gridpanel.js +6 -6
  40. package/source/modules/smart.input.js +2 -2
  41. package/source/modules/smart.kanban.js +9 -9
  42. package/source/modules/smart.layout.js +1 -1
  43. package/source/modules/smart.led.js +1 -1
  44. package/source/modules/smart.listbox.js +1 -1
  45. package/source/modules/smart.listmenu.js +1 -1
  46. package/source/modules/smart.map.js +1 -1
  47. package/source/modules/smart.maskedtextbox.js +2 -2
  48. package/source/modules/smart.menu.js +1 -1
  49. package/source/modules/smart.multicomboinput.js +3 -3
  50. package/source/modules/smart.multiinput.js +2 -2
  51. package/source/modules/smart.multilinetextbox.js +1 -1
  52. package/source/modules/smart.multisplitbutton.js +1 -1
  53. package/source/modules/smart.numberinput.js +2 -2
  54. package/source/modules/smart.numerictextbox.js +1 -1
  55. package/source/modules/smart.pager.js +2 -2
  56. package/source/modules/smart.passwordinput.js +2 -2
  57. package/source/modules/smart.passwordtextbox.js +2 -2
  58. package/source/modules/smart.path.js +1 -1
  59. package/source/modules/smart.phoneinput.js +2 -2
  60. package/source/modules/smart.pivottable.js +6 -6
  61. package/source/modules/smart.progressbar.js +1 -1
  62. package/source/modules/smart.querybuilder.js +4 -4
  63. package/source/modules/smart.radiobutton.js +1 -1
  64. package/source/modules/smart.rating.js +1 -1
  65. package/source/modules/smart.router.js +2 -2
  66. package/source/modules/smart.scheduler.js +6 -6
  67. package/source/modules/smart.scrollbar.js +1 -1
  68. package/source/modules/smart.slider.js +2 -2
  69. package/source/modules/smart.sortable.js +1 -1
  70. package/source/modules/smart.splitter.js +1 -1
  71. package/source/modules/smart.switchbutton.js +1 -1
  72. package/source/modules/smart.table.js +6 -6
  73. package/source/modules/smart.tabs.js +1 -1
  74. package/source/modules/smart.tank.js +2 -2
  75. package/source/modules/smart.textarea.js +2 -2
  76. package/source/modules/smart.textbox.js +1 -1
  77. package/source/modules/smart.timeinput.js +2 -2
  78. package/source/modules/smart.timepicker.js +1 -1
  79. package/source/modules/smart.toast.js +1 -1
  80. package/source/modules/smart.tooltip.js +1 -1
  81. package/source/modules/smart.tree.js +1 -1
  82. package/source/modules/smart.validator.js +1 -1
  83. package/source/modules/smart.window.js +1 -1
  84. package/source/smart.accordion.js +1 -1
  85. package/source/smart.ajax.js +1 -1
  86. package/source/smart.array.js +1 -1
  87. package/source/smart.bootstrap.js +1 -1
  88. package/source/smart.breadcrumb.js +1 -1
  89. package/source/smart.button.js +1 -1
  90. package/source/smart.buttongroup.js +1 -1
  91. package/source/smart.calendar.js +1 -1
  92. package/source/smart.card.js +1 -1
  93. package/source/smart.cardview.js +1 -1
  94. package/source/smart.carousel.js +1 -1
  95. package/source/smart.chart.annotations.js +1 -1
  96. package/source/smart.chart.api.js +1 -1
  97. package/source/smart.chart.core.js +1 -1
  98. package/source/smart.chart.js +1 -1
  99. package/source/smart.chart.rangeselector.js +1 -1
  100. package/source/smart.chart.waterfall.js +1 -1
  101. package/source/smart.checkbox.js +1 -1
  102. package/source/smart.checkinput.js +1 -1
  103. package/source/smart.chip.js +1 -1
  104. package/source/smart.colorinput.js +1 -1
  105. package/source/smart.colorpanel.js +1 -1
  106. package/source/smart.colorpicker.js +1 -1
  107. package/source/smart.combobox.js +1 -1
  108. package/source/smart.complex.js +1 -1
  109. package/source/smart.core.js +1 -1
  110. package/source/smart.countryinput.js +1 -1
  111. package/source/smart.data.js +2 -2
  112. package/source/smart.date.js +2 -2
  113. package/source/smart.dateformatpanel.js +1 -1
  114. package/source/smart.dateinput.js +1 -1
  115. package/source/smart.daterangeinput.js +1 -1
  116. package/source/smart.datetimepicker.js +2 -2
  117. package/source/smart.dockinglayout.js +1 -1
  118. package/source/smart.draw.js +1 -1
  119. package/source/smart.dropdownbutton.js +1 -1
  120. package/source/smart.dropdownlist.js +1 -1
  121. package/source/smart.editor.js +1 -1
  122. package/source/smart.element.js +1 -1
  123. package/source/smart.elements.js +18 -18
  124. package/source/smart.export.js +2 -2
  125. package/source/smart.fileupload.js +1 -1
  126. package/source/smart.filter.js +1 -1
  127. package/source/smart.filterbuilder.js +1 -1
  128. package/source/smart.filterpanel.js +1 -1
  129. package/source/smart.form.js +1 -1
  130. package/source/smart.format.js +1 -1
  131. package/source/smart.formulaparser.js +1 -1
  132. package/source/smart.ganttchart.js +1 -1
  133. package/source/smart.gauge.js +1 -1
  134. package/source/smart.grid.cell.js +2 -2
  135. package/source/smart.grid.chart.js +1 -1
  136. package/source/smart.grid.column.js +2 -2
  137. package/source/smart.grid.core.js +2 -2
  138. package/source/smart.grid.dialog.js +2 -2
  139. package/source/smart.grid.edit.js +2 -2
  140. package/source/smart.grid.export.js +1 -1
  141. package/source/smart.grid.filter.js +1 -1
  142. package/source/smart.grid.group.js +1 -1
  143. package/source/smart.grid.js +1 -1
  144. package/source/smart.grid.menu.js +1 -1
  145. package/source/smart.grid.pager.js +1 -1
  146. package/source/smart.grid.reorder.js +1 -1
  147. package/source/smart.grid.resize.js +2 -2
  148. package/source/smart.grid.row.js +2 -2
  149. package/source/smart.grid.select.js +2 -2
  150. package/source/smart.grid.sort.js +1 -1
  151. package/source/smart.grid.toolbar.js +2 -2
  152. package/source/smart.grid.tree.js +1 -1
  153. package/source/smart.grid.view.js +2 -2
  154. package/source/smart.gridpanel.js +2 -2
  155. package/source/smart.input.js +2 -2
  156. package/source/smart.kanban.js +2 -2
  157. package/source/smart.layout.js +1 -1
  158. package/source/smart.led.js +1 -1
  159. package/source/smart.listbox.js +1 -1
  160. package/source/smart.listmenu.js +1 -1
  161. package/source/smart.map.js +1 -1
  162. package/source/smart.maskedtextbox.js +1 -1
  163. package/source/smart.math.js +1 -1
  164. package/source/smart.menu.js +1 -1
  165. package/source/smart.multicomboinput.js +2 -2
  166. package/source/smart.multiinput.js +1 -1
  167. package/source/smart.multilinetextbox.js +1 -1
  168. package/source/smart.multisplitbutton.js +1 -1
  169. package/source/smart.numberformatpanel.js +1 -1
  170. package/source/smart.numberinput.js +1 -1
  171. package/source/smart.numeric.js +1 -1
  172. package/source/smart.numerictextbox.js +1 -1
  173. package/source/smart.pager.js +1 -1
  174. package/source/smart.passwordinput.js +1 -1
  175. package/source/smart.passwordtextbox.js +1 -1
  176. package/source/smart.path.js +1 -1
  177. package/source/smart.phoneinput.js +1 -1
  178. package/source/smart.pivottable.js +1 -1
  179. package/source/smart.powerbutton.js +1 -1
  180. package/source/smart.progressbar.js +1 -1
  181. package/source/smart.radiobutton.js +1 -1
  182. package/source/smart.rating.js +1 -1
  183. package/source/smart.router.js +1 -1
  184. package/source/smart.scheduler.js +1 -1
  185. package/source/smart.scrollbar.js +1 -1
  186. package/source/smart.slider.js +1 -1
  187. package/source/smart.sortable.js +1 -1
  188. package/source/smart.splitter.js +1 -1
  189. package/source/smart.switchbutton.js +1 -1
  190. package/source/smart.table.js +1 -1
  191. package/source/smart.tabs.js +1 -1
  192. package/source/smart.tank.js +1 -1
  193. package/source/smart.textarea.js +1 -1
  194. package/source/smart.textbox.js +1 -1
  195. package/source/smart.tickintervalhandler.js +1 -1
  196. package/source/smart.timeinput.js +1 -1
  197. package/source/smart.timepicker.js +1 -1
  198. package/source/smart.toast.js +1 -1
  199. package/source/smart.tooltip.js +1 -1
  200. package/source/smart.tree.js +1 -1
  201. package/source/smart.validationpanel.js +1 -1
  202. package/source/smart.validator.js +1 -1
  203. package/source/smart.window.js +1 -1
  204. package/source/styles/components/smart.array.css +1 -1
  205. package/source/styles/components/smart.calendar.css +1 -1
  206. package/source/styles/components/smart.cardview.css +1 -1
  207. package/source/styles/components/smart.checkinput.css +1 -1
  208. package/source/styles/components/smart.colorinput.css +1 -1
  209. package/source/styles/components/smart.columnpanel.css +1 -1
  210. package/source/styles/components/smart.countryinput.css +1 -1
  211. package/source/styles/components/smart.dateinput.css +1 -1
  212. package/source/styles/components/smart.daterangeinput.css +1 -1
  213. package/source/styles/components/smart.datetimeformatpanel.css +1 -1
  214. package/source/styles/components/smart.editor.css +1 -1
  215. package/source/styles/components/smart.filterbuilder.css +1 -1
  216. package/source/styles/components/smart.filterpanel.css +1 -1
  217. package/source/styles/components/smart.ganttchart.css +1 -1
  218. package/source/styles/components/smart.grid.css +2 -2
  219. package/source/styles/components/smart.gridpanel.css +1 -1
  220. package/source/styles/components/smart.input.css +1 -1
  221. package/source/styles/components/smart.kanban.css +2 -2
  222. package/source/styles/components/smart.maskedtextbox.css +1 -1
  223. package/source/styles/components/smart.multicolumnfilterpanel.css +1 -1
  224. package/source/styles/components/smart.multicomboinput.css +1 -1
  225. package/source/styles/components/smart.multiinput.css +1 -1
  226. package/source/styles/components/smart.multilinetextbox.css +1 -1
  227. package/source/styles/components/smart.numberformatpanel.css +1 -1
  228. package/source/styles/components/smart.numberinput.css +1 -1
  229. package/source/styles/components/smart.pager.css +1 -1
  230. package/source/styles/components/smart.passwordinput.css +1 -1
  231. package/source/styles/components/smart.passwordtextbox.css +1 -1
  232. package/source/styles/components/smart.phoneinput.css +1 -1
  233. package/source/styles/components/smart.pivottable.css +1 -1
  234. package/source/styles/components/smart.querybuilder.css +1 -1
  235. package/source/styles/components/smart.scheduler.css +1 -1
  236. package/source/styles/components/smart.sortpanel.css +1 -1
  237. package/source/styles/components/smart.table.css +1 -1
  238. package/source/styles/components/smart.textarea.css +1 -1
  239. package/source/styles/components/smart.textbox.css +1 -1
  240. package/source/styles/components/smart.timeinput.css +1 -1
  241. package/source/styles/components/smart.validationpanel.css +1 -1
  242. package/source/styles/components/smart.window.css +1 -1
  243. package/source/styles/default/scss/smart.grid.scss +97 -36
  244. package/source/styles/default/scss/smart.kanban.scss +22 -0
  245. package/source/styles/default/scss/textbox/_multi-combo-input.scss +42 -1
  246. package/source/styles/default/smart.grid.css +77 -26
  247. package/source/styles/default/smart.kanban.css +18 -0
  248. package/source/styles/default/smart.textbox.css +28 -1
  249. package/source/styles/smart.default.css +3 -3
  250. package/source/typescript/smart.elements.d.ts +34 -0
  251. package/source/typescript/smart.kanban.d.ts +34 -0
@@ -772,14 +772,14 @@ Smart("smart-button",class extends Smart.ContentElement{static get properties(){
772
772
  /***/ 6057:
773
773
  /***/ (() => {
774
774
 
775
- (()=>{Smart.DataAdapter=window.smartDataAdapter=class{constructor(e){e||(e={});const t=Object.assign(this,e);t.key=(65536*(1+Math.random())|0).toString(16).substring(1),t.$document=Smart.Utilities.Extend(document),t.boundSource=!1===t.observable||t.virtualDataSource?[]:new Smart.ObservableArray,t.dataItemById=[],void 0===t.allowAdd&&(t.allowAdd=!0),void 0===t.allowRemove&&(t.allowRemove=!0),void 0===t.allowUpdate&&(t.allowUpdate=!0),void 0===t.mapChar&&(t.mapChar="."),void 0!==e.observable||t.virtualDataSource?t.observable=!1:t.observable=!0,void 0===t.sanitizeHTML&&(t.sanitizeHTML="blackList"),t._expandedRowIds=[],e.dataSource||(t.dataSource=[]),e.dataFields||(t.dataFields=[]),e.dataSourceType||(t.dataSourceType="array"),e.id||(t.id=null),e.autoFetch||(t.autoFetch=!0),e.dataFields&&(t.dataFields=e.dataFields),Object.defineProperty(t,"groupBy",{configurable:!1,enumerable:!0,get:()=>t._groupBy?t._groupBy:[],set(e){const a=()=>{t.boundHierarchy=null,t.refreshHierarchy(),t.onGroup&&t.onGroup()};t._groupBy=new Smart.ObservableArray(e),t._groupBy.notify((function(){a()})),t.isInitialized&&a()}}),e.groupBy?e.groupBy.toArray?t.groupBy=e.groupBy.toArray():t.groupBy=e.groupBy:t.groupBy=[],e&&!1!==e.autoBind&&t.dataBind(),t.isInitialized=!0}beginUpdate(){this.isUpdating=!0}endUpdate(){const e=this;e.isUpdating=!1,e.refreshIndexes(),e.refreshHierarchy()}get expandHierarchy(){return void 0===this._expandHierarchy&&(this._expandHierarchy=!1),this._expandHierarchy}set expandHierarchy(e){const t=this;t._expandHierarchy=e,t.isInitialized&&t.refreshHierarchy()}_getDataField(e){switch(e.name){case"leaf":case"parent":case"expanded":case"checked":case"selected":case"level":case"icon":case"data":case"group":case"children":case"items":e.map?e.map=e.map.replace(e.name,"$"+e.name):e.map=e.name,e.name="$"+e.name}}get dataFields(){return this._dataFields}set dataFields(e){const t=this;return t._dataFields=t._getDataFieldObjects(e),t._dataFields}_getDataFieldObjects(e){const t=this;let a=[];if("number"==typeof e){const t="A".charCodeAt(0);let n="",r=0;for(let i=0;i<e;i++){const e=String.fromCharCode(t+r);r++;const i=n+e;a.push({name:i,dataType:"string"}),r>=26&&(r=0,n+="A")}}else if(Array.isArray(e)&&e.length>0)for(let n=0;n<e.length;n++){const r=e[n];if("string"==typeof r){const e=r.split(":"),t=e[0].trim(),n=e.length>1?e[1].trim():"string";a.push({name:t,dataType:n})}else a.push(r);t._getDataField(a[a.length-1])}return a}get dataSource(){const e=this;return e._dataSource||(e._dataSource=[]),e._dataSource}set dataSource(e){const t=this;t._dataSource=e,t.isInitialized&&(t.boundSource=!1===t.observable||t.virtualDataSource?[]:new Smart.ObservableArray,t.dataItemById=[],t.bindingCompleted=!1,t.dataBind(),t.refreshIndexes())}get canNotify(){const e=this;return void 0===e._canNotify&&(e._canNotify=!0),e._canNotify}set canNotify(e){this._canNotify=e}_notify(e){const t=this;t.canNotify&&t.notifyFn&&t.notifyFn(e)}notify(e){e&&(this.notifyFn=e)}toArray(){const e=this;return!1===e.observable?e.boundSource:e.boundSource.toArray()}dataBind(){const t=this;t.bindingCompleted=!1,t.clear();const a=()=>{t.observable&&(t.boundSource.notify||(t.boundSource=new Smart.ObservableArray),t.boundSource.notify((function(e){if("update"===e.action&&e.path&&e.path.indexOf(".")>=0&&-1===e.path.indexOf("children")&&-1===e.path.indexOf("loaded")&&-1===e.path.indexOf("level")&&-1===e.path.indexOf("leaf")&&-1===e.path.indexOf("expanded")){let a=!1;for(let n=0;n<t.dataFields.length;n++){const r=t.dataFields[n].name;e.path.indexOf(r)>=0&&(a=!0)}t._notify&&a&&t._notify({action:"update",data:e.target,index:e.index})}}))),t._onBindingComplete()};"string"==typeof t.dataSource&&(t.dataSource.indexOf(".json")>=0||"json"===t.dataSourceType)?(t.url=t.dataSource,t.dataSourceType="json",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".xml")>=0?(t.url=t.dataSource,t.dataSourceType="xml",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".xlsx")>=0?(t.url=t.dataSource,t.dataSourceType="xlsx",new e(t,(e=>{if(!e[0])return e=[],t._bindToArray(),void a();const n=Object.keys(e[0]),r={},i=[];if(!1!==t.exportHeader){let a=0;for(let e in n){r[n[e]]=t.dataFields[a++].name}for(let t=1;t<e.length;t++){const a=e[t],o={};for(let e in n){const t=n[e];o[r[t]]=a[t]}i.push(o)}t.dataSource=i}t._bindToArray(),a()}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".csv")>=0?(t.url=t.dataSource,t.dataSourceType="csv",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".tsv")>=0?(t.url=t.dataSource,t.dataSourceType="tsv",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&(t.dataSource.indexOf(".ics")>=0||t.dataSource.indexOf(".php")>=0&&"ics"===t.dataSourceType||t.dataSource.indexOf(".txt")>=0&&"ics"===t.dataSourceType)?(t.url=t.dataSource,t.dataSourceType="ics",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&(t.dataSource.indexOf("BEGIN:VCALENDAR")>=0||"ics"===t.dataSourceType)?(t._bindToICS(),a()):"string"==typeof t.dataSource&&(t.dataSource.indexOf("<?xml")>=0||"xml"===t.dataSourceType)?(t._bindToXML(),a()):"string"==typeof t.dataSource&&(t.dataSource.indexOf(" ")>=0||t.dataSource.indexOf(",")>=0||"tsv"===t.dataSourceType||"csv"===t.dataSourceType||"tab"===t.dataSourceType)?(t._bindToCSV(),a()):"array"===t.dataSourceType?(t._bindToArray(),a()):"json"===t.dataSourceType&&(t._bindToJSON(),a())}_bindToXML(){const e=this;let t=null,a=null;window.DOMParser&&(t=new DOMParser,a=t.parseFromString(e.dataSource,"text/xml")),void 0===e.root&&(e.root=""),void 0===e.record&&(e.record="");const n=a.querySelectorAll(e.root+" "+e.record),r=n.length,i=[];let o=e.dataFields?e.dataFields.length:0;if(0===o){const t=n[0],a=new Array;for(let e in t){const t=e;a[a.length]={name:t}}e.dataFields=a,o=a.length}for(let t=0;t<r;t++){const a=n[t],r={};if(void 0===a)break;if(e.id){const t=a.querySelector(e.id);r[e.id]=t.textContent}for(let t=0;t<o;t++){const n=e.dataFields[t],i=a.querySelector(n.map||n.name);r[n.name]=i.textContent}i[t]=r}e.canNotify=!1,e.dataSource=i,e.canNotify=!0,e._bindToArray()}_bindToCSV(){const e=this,t=""+e.dataSource,a=-1===t.indexOf(",")?"\t":",",n=t.split("\r"),r=new Array;let i=t.split("\n"),o=i.length;1===o&&n.length>1&&(i=n,o=i.length);const d=e.dataFields.length>0;for(let t=0;t<o;t++){const n=i[t],o={},l=i[t].split(a);for(let a=0;a<l.length;a++){let r=e.dataFields[a],i=l[a];if(r||(e.dataFields.push({name:i.trim()}),r=e.dataFields[e.dataFields.length-1]),r.map&&(i=n[r.map]),i=i.trim(),1!==t||d)switch(r.dataType){case"boolean":i="false"!==i;break;case"number":i=parseFloat(i);break;case"date":i=new Date(i)}else{let e="string";"false"===i||"true"===i?(e="boolean",i="false"!==i):isNaN(parseInt(i)&&-1===i.indexOf("/"))?(i.indexOf("-")>=0||i.indexOf("/")>=0||i.indexOf(":")>=0)&&"Invalid Date"!==new Date(i).toString()&&(e="date",i=new Date(i)):(e="number",i=parseFloat(i)),r.dataType||(r.dataType=e)}o[r.map||r.name||a.toString()]=i}(d||t>0)&&r.push(o)}e.canNotify=!1,e.dataSource=r,e.canNotify=!0,e._bindToArray()}_onBindingComplete(){const e=this;e._buildHierarchy(),e.onBindingComplete&&e.onBindingComplete({data:e.boundSource}),e._notify&&e._notify({action:"bindingComplete",data:e.boundSource}),e.bindingCompleted=!0}refreshHierarchy(){this.isUpdating||this._buildHierarchy()}find(){return this.boundSource.find.apply(this.boundSource,arguments)}onVirtualDataSourceRequested(e,t){const a=this;let n=t?t.first:1/0,r=t?t.last:1/0,i=t?t.row:null;if(void 0===n&&(n=1/0),void 0===r&&(r=1/0),a.virtualFirstIndex=n,a.virtualLastIndex=r,a.virtualDataSource){const o=function(r){void 0!==r.virtualDataSourceLength&&(a.virtualDataSourceLength=r.virtualDataSourceLength),new Smart.DataAdapter({dataSource:r.dataSource,dataFields:r.dataFields||a.dataFields,data:t,keyDataField:r.keyDataField,parentDataField:r.parentDataField,observable:!1,id:r.id||a.id,onBindingComplete(r){if(void 0===t.result&&(t.result=!0),a.virtualDataSourceOnExpand&&i)return a.groupBy.length>0?r.data&&r.data.length>0&&a.add(r.data):r.data&&r.data.length>0?a.add(r.data,i.$.id):i.leaf=!0,a.onFilter&&a.onFilter(),void e(t);n===1/0&&"scroll"===t.action?r.data&&r.data.length&&a.add(r.data):"filter"===t.action||"group"===t.action?(a.canNotify=!1,a.dataSource=r.data,a.canNotify=!0):("add"===t.action||"update"===t.action||t.action,a.canNotify=!1,a.dataSource=r.data,a.canNotify=!0),a.onFilter&&a.onFilter(),e(t)}})};let d={};if(t.sorting&&t.sorting.length>0){let e=[];for(let a in t.sorting)e.push(a+" "+t.sorting[a].sortOrder.toUpperCase());const a=" ORDER BY "+e.join(", ");d.orderBy=a}else d.orderBy="";if(void 0===n||void 0===r||0===n&&0===r)d.limit="";else{const e=r-n,t=" LIMIT "+e+" OFFSET "+n;d.limit=t,isNaN(e)&&(d.limit="")}if(t.grouping&&t.grouping.length>0){const e=" GROUP BY "+t.grouping[0];d.groupBy=e}else d.groupBy="";if(t.filtering&&t.filtering.length>0){const e=(e,t)=>{switch(t.condition){case"EMPTY":return e+" = ''";case"NOT_EMPTY":return e+" != ''";case"EQUAL":return e+" = '"+t.value+"'";case"NOT_EQUAL":return e+" != '"+t.value+"'";case"CONTAINS_CASE_SENSITIVE":case"CONTAINS":return e+" LIKE '%"+t.value+"%'";case"DOES_NOT_CONTAIN_CASE_SENSITIVE":case"DOES_NOT_CONTAIN":return e+" NOT LIKE '%"+t.value+"%'";case"STARTS_WITH_CASE_SENSITIVE":case"STARTS_WITH":return e+" LIKE '"+t.value+"%'";case"ENDS_WITH_CASE_SENSITIVE":case"ENDS_WITH":return e+" LIKE '%"+t.value+"'";case"NULL":return e+" IS NULL";case"NOT_NULL":return e+" IS NOT NULL"}},a=(e,t)=>{switch(t.condition){case"EQUAL":return e+" = "+t.value;case"NOT_EQUAL":return e+" != "+t.value;case"GREATER_THAN":return e+" > "+t.value;case"GREATER_THAN_OR_EQUAL":return e+" >= "+t.value;case"LESS_THAN":return e+" < "+t.value;case"LESS_THAN_OR_EQUAL":return e+" <= "+t.value;case"NULL":return e+" IS NULL";case"NOT_NULL":return e+" IS NOT NULL";case"RANGE":return"("+e+" >= "+t.value+" and "+e+" <= "+t.valueTo+")"}},n=(e,t,a)=>{if(a.operator){var n=e(t,a.condition1),r=e(t,a.condition2);return"("+n+" "+a.operator+" "+r+")"}return e(t,a)};let r=[];for(let i in t.filtering){const o=t.filtering[i];let d=o.filters,l=[],s=" AND ";for(let t=0;t<d.length;t++){const r=d[t];switch(r.type){case"stringFilter":l.push(n(e,i,r));break;case"numericFilter":case"dateFilter":case"booleanFilter":l.push(n(a,i,r))}1===o.logicalOperators[t]&&(s=" OR ")}r.push("("+l.join(s)+")")}if(r.length>0){let e=" AND ";t.filterOperator&&"or"===t.filterOperator.toLowerCase()&&(e=" OR "),d.where=" WHERE "+r.join(e)}else d.where=""}else d.where="";if("dataBind"===t.action&&a.virtualDataSourceOnExpand&&a.keyDataField&&a.parentDataField&&(d.where?d.where+=" AND "+a.parentDataField+" IS NULL":d.where=" WHERE "+a.parentDataField+" IS NULL"),"update"===t.action){const e=[];for(let n in t.edit.row)"$"!==n&&n!==a.id&&e.push(n+"='"+t.edit.row[n]+"'");d.update=" SET "+e.join(", ")+" WHERE "+a.id+"="+t.edit.row[a.id]}if("remove"===t.action){const e=[];for(let n in t.edit.row)"$"!==n&&n!==a.id&&e.push(n+" = '"+t.edit.row[n]+"'");d.remove=" WHERE "+a.id+"="+t.edit.row[a.id]}if("add"===t.action){const e=[],a=[];for(let n in t.edit.row)"$"!==n&&(a.push(n),e.push("'"+t.edit.row[n]+"'"));d.add=" ("+a.join(", ")+") VALUES ("+e.join(", ")+")"}"expand"===t.action?(a.groupDataField?d.where?d.where+=" AND "+a.groupDataField+" = '"+i[a.groupDataField]+"'":d.where=" WHERE "+a.groupDataField+" = '"+i[a.groupDataField]+"'":a.keyDataField&&a.parentDataField?d.where?d.where+=" AND "+a.parentDataField+" = "+i[a.keyDataField]:d.where=" WHERE "+a.parentDataField+" = "+i[a.keyDataField]:d.where?d.where+=" AND "+i.groupDataField+" = '"+i.label+"'":d.where=" WHERE "+i.groupDataField+" = '"+i.label+"'",d.limit="",d.groupBy="",a.virtualDataSourceOnExpand(o,{first:n,last:r,row:t.row,sorting:t.sorting,filtering:t.filtering,grouping:t.grouping,action:t.action,query:d})):a.virtualDataSource(o,{first:n,last:r,sorting:t.sorting,filtering:t.filtering,filterOperator:t.filterOperator||"and",grouping:t.grouping,action:t.action,query:d})}else e()}add(e,t){const a=this;if(!e)return;let n=!0;const r=function(e){const r=a._getDataItem(e,a.boundSource.length);if(a.dataItemById[r.$.id])return void 0!==t&&(r.$.parentId=t),null;a[a.boundSource.length]=r,a.dataItemById[r.$.id]=r;const i=a.boundSource.push(r);return void 0!==t&&(r.$.parentId=t),i||(n=!1),r};if(e.length){let t=[];for(let a=0;a<e.length;a++){const n=r(e[a]);n&&t.push(n)}a._notify({action:"add",data:t})}else{const t=r(e);a._notify({action:"add",data:t})}return a.refreshHierarchy(),n}refreshIndexes(){const e=this;for(let t=0;t<e.boundSource.length;t++)e[t]=e.boundSource[t],e[t].$.index=t,e.dataItemById[e[t].$.id]=e[t];let t=e.boundSource.length;for(;e[t];)delete e[t],t++}removeLast(){const e=this;delete e[e.boundSource.length-1];const t=e.boundSource.pop();return delete e.dataItemById[t.$.id],e._notify({action:"removeLast",data:t}),e.refreshHierarchy(),t}remove(e){const t=this;let a=t.indexOf(e);-1===a&&e&&e.$&&(a=t.indexOf(t.dataItemById[e.$.id])),t.removeAt(a)}removeAt(e){const t=this,a=t.boundSource[e];if(!a)throw new Error("Invalid Item Index");t.boundSource.splice(e,1),delete t.dataItemById[a.$.id],t.refreshIndexes(),t._notify({action:"remove",index:e,data:a}),t.refreshHierarchy()}update(e,t){const a=this;if(Smart.Utilities.Types.isArray(e)&&Smart.Utilities.Types.isArray(t)&&0===e.length&&0===t.length)return void a.refreshHierarchy();if(t.length&&e.length){let n=[];for(let r=0;r<e.length;r++){const i=a._getDataItem(t[r],e[r]),o=e[r];n.push(i),a.boundSource[o]=i,a[o]=a.boundSource[o],a.dataItemById[i.$.id]=a[o]}return a._notify({action:"update",index:e,data:n}),void a.refreshHierarchy()}const n=a._getDataItem(t,e),r=a.boundSource[e].$.id;return n.$.id=r,a.boundSource[e]=n,a[e]=a.boundSource[e],a.dataItemById[n.$.id]=a[e],a._notify({action:"update",index:e,data:n}),a.refreshHierarchy(),n}insert(e,t){const a=this;if(t.length){const n=[];for(let r=0;r<t.length;r++){const i=a._getDataItem(t[r],e+r);n.push(i)}t=n}else t=a._getDataItem(t,e);const n=a.boundSource.splice(e,0,t);return a.refreshIndexes(),a._notify({action:"insert",index:e,data:t}),a.refreshHierarchy(),n}move(e,t){if(t>e&&t-e==1||e===t)return;const a=this,n=a.boundSource.splice(e,1)[0];t>e?(t--,a.boundSource.splice(t,0,n)):a.boundSource.splice(t,0,n),a.refreshIndexes(),a._notify({action:"move",index:t,data:a.boundSource[t]}),a.refreshHierarchy()}indexOf(e){return this.boundSource.indexOf(e)}get length(){const e=this;return void 0!==e.virtualDataSourceLength?e.virtualDataSourceLength:e.dataSourceLength?e.dataSourceLength:"number"==typeof e.dataSource?e.dataSource:e.bindingCompleted?e.boundSource.length:e.dataSource&&"string"!=typeof e.dataSource&&e.dataSource.length?e.dataSource.length:e.boundSource.length}clear(){const e=this;if(!e.isInitialized)return e._cachedValues=[],void(e.dataItemById=[]);for(let t=0;t<e.boundSource.length;t++)delete e[t];e._expandedRowIds=[],e._cachedValues=[],e.boundSource=e.observable?new Smart.ObservableArray:[],e.dataItemById=[],e.refreshHierarchy()}_getId(e,t,a){if(null===e||void 0===e.name||!e.name||!t.getAttribute){if(e&&e.toString().length>0&&t.getAttribute){let a=t.getAttribute(e);if(null!==a&&a.toString().length>0)return a.trim().split(" ").join("").replace(/([ #;?%&,.+*~\':'!^$[\]()=>|\/@])/g,"");{let a=e.split(this.mapChar);if(a.length>1){let e=t;for(let t=0;t<a.length;t++)void 0!==e&&(e=e[a[t]]);if(void 0!==e)return e}else if(void 0!==t[e])return t[e]}}return a}{let n=t.getAttribute(e.name);if(null!==n&&n.toString().length>0)return n;if(e.map)try{let a=t.getAttribute(e.map);if(null!==a&&a.toString().length>0)return a}catch(e){return a}}}_buildHierarchy(){const e=this;if(e.reservedNames){const t=e.reservedNames;t.leaf||(t.leaf="leaf"),t.parent||(t.parent="parent"),t.expanded||(t.expanded="expanded"),t.checked||(t.checked="checked"),t.selected||(t.selected="selected"),t.level||(t.level="level"),t.data||(t.data="data")}else e.reservedNames={leaf:"leaf",parent:"parent",expanded:"expanded",checked:"checked",selected:"selected",level:"level",icon:"icon",data:"data"};const t=e.reservedNames;if(e.childrenDataField){const a=[];for(let n=0;n<e.boundSource.length;n++){const r=Object.assign({},e.boundSource[n]);if(!r)continue;a.push(r);const i=function(a){const n=e.childrenDataField.split(e.mapChar);let r=null;if(n.length>1){let e=a;for(let t=0;t<n.length;t++)void 0!==e&&(e=e[n[t]]);r=e}else r=a.children;a.children=r,(null===a.children||void 0===a.children||a.children&&0===a.children.length)&&(a[t.leaf]=!0)};i(r),r[t.level]=0,r.$||(r.$={}),r[t.parent]=null,r[t.data]=r,void 0===r[t.expanded]&&(r[t.expanded]=!1,e.expandHierarchy&&(r[t.expanded]=!0));const o=function(a,n){if(n)for(let r=0;r<n.length;r++){let d=e._getDataItem(n[r],r);if(d){if(i(d),!e.id){const e=function(){const e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()};d.$.id=e()}d[t.level]=a[t.level]+1,d[t.parent]=a,d[t.data]=Object.assign({},d),a&&(a.children[r]=d),void 0===d[t.expanded]&&(d[t.expanded]=!1,e.expandHierarchy&&(d[t.expanded]=!0)),o(d,d.children)}}else a.children=new Array};o(r,r.children)}if(e.boundHierarchy=a,!e._boundSourceUpdate){for(let t=0;t<e.boundHierarchy.length;t++){const a=e.boundHierarchy[t];if(a.children){const t=function(a){if(e.dataItemById[a.$.id]||(e.boundSource.canNotify=!1,e.dataItemById[a.$.id]=a,e.boundSource.canNotify=!0),a.children)for(let e=0;e<a.children.length;e++){const n=a.children[e];n.children&&t(n)}};t(a)}}e._boundSourceUpdate=!0}}if(e.xmlRoot&&"xml"===e.dataSourceType&&(e.boundHierarchy=this._getHierarchy("uid","_parentuid","children",null,e.boundSource)),e.keyDataField&&e.parentDataField)return["keyDataField","parentDataField"].forEach((t=>{switch(e[t]){case"parent":e[t]="$"+e[t]}})),void(e.boundHierarchy=this._getHierarchy(e.keyDataField,e.parentDataField,"children",null,e.boundSource));e.groupBy&&e.groupBy.length>0?e.boundHierarchy=this._getGroupHierarchy(e.groupBy,"children","label",null,"data",null,"parent",e.boundSource):e.virtualDataSourceOnExpand&&(e.boundHierarchy=this._getHierarchy("id","parentId","children",null,e.boundSource))}_getGroupHierarchy(e,t,a,n,r,i,o,d,l){let s=this;l||(l=0);let c=s.reservedNames;const u=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()};let f=new Array;for(let t=0;t<e.length;t++)f[t]=u();t||(t="children"),a||(a="group"),r||(r="item"),o||(o="parent"),void 0===i&&(i="value");const h=new Array,p=new Array;let g=0;const S=function(e){let t=e;if(n)for(let e in n){const a=n[e];a.name&&a.map&&(t[a.map]=t[a.name])}return t};let y=!1;for(let n=0;n<d.length;n++){let m=Object.assign({},S(d[n]));m[c.leaf]=!1;let T=new Array,b=0;for(let t=0;t<e.length;t++){const a=e[t],n=m[a];null!=n?((""===n||void 0===n&&0===t)&&(y=!0),T[b++]={value:n,group:a,hash:f[t]}):(T[b++]={value:null,group:a,hash:f[t]},0===t&&(y=!0))}if(T.length!==e.length)break;let v=null,E="";for(let e=0;e<T.length;e++){const n=T[e].value,d=T[e].group;if(E=E+"_"+T[e].hash+"_"+n,void 0===p[E]||null===p[E]){if(null===v){v={$:{}},v[c.level]=0,v[c.leaf]=!1,v[o]=null,v[a]=n,v[r]=m,v.groupDataField=d,v[d]||(v[d]=v.data[d]),void 0!==m[c.expanded]?v[c.expanded]=m[c.expanded]:(v[c.expanded]=!1,s.expandHierarchy&&(v[c.expanded]=!0)),i&&(v[i]=m[i]),v[t]=new Array;let e=h.length+l;this.id&&"number"!=typeof m.$.id&&!isFinite(m.$.id)||(e="Item"+e),void 0===v.$.id&&(v.$.id=e),s._expandedRowIds[v.$.id]&&(v[c.expanded]=!0),h[g++]=v}else{const e={$:{}};e[c.level]=v[c.level]+1,e[o]=v,e[a]=n,e[t]=new Array,e[r]=m,e.groupDataField=d,e[c.leaf]=!1,e[d]||(e[d]=e.data[d]),void 0!==m[c.expanded]?e[c.expanded]=m[c.expanded]:(e[c.expanded]=!1,s.expandHierarchy&&(e[c.expanded]=!0)),i&&(e[i]=m[i]),void 0===e.$.id&&(e.$.id=v.$.id+"_"+v[t].length),s._expandedRowIds[e.$.id]&&(e[c.expanded]=!0),v[t][v[t].length]=e,v=e}p[E]=v}else v=p[E]}m&&(m[c.leaf]=!0),null!==v?(null===this.id?void 0===m.$.id&&(m.$.id=v.$.id+"_"+v[t].length):void 0===m.$.id&&-1===m.$.id.toString().indexOf(v.$.id)&&(m.$.id=v.$.id+"_"+m.$.id),m[o]=v,m[c.level]=v[c.level]+1,v[t][v[t].length]=m):void 0===m.$.id&&(m.$.id=u())}if(y){let e=null,t=!1;for(let a=0;a<h.length;a++){const n=h[a];if(!n[n.groupDataField]){e=n,e.$.id.toString().startsWith("Item")&&(t=!0),h.splice(a,1);break}}if(e&&(h.push(e),t))for(let e=0;e<h.length;e++){h[e].$.id="Item"+e}}return h}_getHierarchy(e,t,a,n,r){const i=this,o=new Array;let d=this.boundSource;if(r&&(d=r),0===this.boundSource.length)return null;const l=null!==a?a:"children";let s=new Array,c=d,u=c.length,f=i.reservedNames;const h=function(e){let t=e;if(n)for(let e in n){const a=n[e];a.name&&a.map&&(t[a.map]=t[a.name])}return t};for(let a=0;a<u;a++){let n=c[a],r=n[t],o=n[e];"parentId"===t&&(r=n.$.parentId),"id"===e&&(o=n.$.id),n[l]=new Array,i.expandHierarchy&&void 0===n[f.expanded]&&(n[f.expanded]=i.expandHierarchy),s[o]={parentId:r,item:n}}for(let a=0;a<u;a++){const n=c[a];let r=n[t],i=n[e];if("parentId"===t&&(r=n.$.parentId),"id"===e&&(i=n.$.id),void 0!==s[r]){let e={parentId:r,item:s[i].item},t=s[r].item;t[l]||(t[l]=new Array);let a=t[l].length;e=e.item,f?e[f.parent]=t:e.parent=t;const n=h(e);t[l][a]=n,s[r].item=t,s[i].item=e}else{let e=s[i].item;f?void 0===e[f.parent]&&(e[f.parent]=null):void 0===e.parent&&(e.parent=null);const t=h(e);f?t[f.level]=0:t.level=0,o[o.length]=t}}if(0!==o.length){let e=function(t,a){for(let n=0;n<a.length;n++){const r=a[n];f?r[f.level]=t:r.level=t;const o=r[l];o&&o.length>0?(r.leaf=!1,e(t+1,o)):i.virtualDataSourceOnExpand?void 0===r.leaf&&(r.leaf=!1):f?r[f.leaf]=!0:r.leaf=!0}};e(0,o)}return o}summarize(e,t){const a=this;Array.isArray(e)||(e=[e]);let n=[];for(let t=0;t<e.length;t++){const a=e[t];for(let e in a){const t=a[e];n.push({dataField:e,functions:t})}}e=n;let r={},i=new Array;t||(t=a.boundSource);let o=t.length,d=0;if(0!==o&&void 0!==o){for(let a=0;a<o;a++){let n=t[a];if((!n||!n.$||!1!==n.$.filtered)&&n){d++;for(let t=0;t<e.length;t++){const o=e[t];let d=n[o.dataField];if(o.functions&&o.functions.length>0){r[o.dataField]=r[o.dataField]||{},i[o.dataField]=i[o.dataField]||0,i[o.dataField]++;const e=function(e){for(let t in e){let a=r[o.dataField][t];null==a&&(r[o.dataField][t]=0,a=0),"function"==typeof e[t]&&(a=e[t](a,d,o.dataField,n)),r[o.dataField][t]=a}};let t=parseFloat(d);t=!isNaN(t),"string"==typeof d&&d.startsWith("+")&&(t=!1),t&&(d=parseFloat(d)),"number"==typeof d&&isFinite(d)?o.functions.forEach((function(t){let n=r[o.dataField][t];if(null==n&&(n=0,"min"===t&&(n=9999999999999),"max"===t&&(n=-9999999999999),"median"===t&&(n=[])),"sum"===t||"avg"===t||"stdev"===t||"stdevp"===t||"var"===t||"varp"===t)n+=parseFloat(d);else if("product"===t)0===a?n=parseFloat(d):n*=parseFloat(d);else if("min"===t)n=Math.min(n,parseFloat(d));else if("max"===t)n=Math.max(n,parseFloat(d));else if("count"===t)n++;else if("median"===t)n.push(parseFloat(d));else if("object"==typeof t)return void e(t);r[o.dataField][t]=n})):o.functions.forEach((function(t){if("min"===t||"max"===t||"count"===t||"product"===t||"sum"===t||"avg"===t||"stdev"===t||"stdevp"===t||"var"===t||"varp"===t){if(null===d)return!0;let e=r[o.dataField][t];return null==e&&(e=0),r[o.dataField][t]=e,!0}if("blank"===t){let e=r[o.dataField][t];null==e&&(e=0),d||e++,r[o.dataField][t]=e}else if("filled"===t){let e=r[o.dataField][t];null==e&&(e=0),d&&e++,r[o.dataField][t]=e}else if("unique"===t){let e=r[o.dataField][t];null==e&&(e=[]),-1===e.indexOf(d)&&e.push(d),r[o.dataField][t]=e}"object"==typeof t&&e(t)}))}}}}for(let a=0;a<e.length;a++){const n=e[a];if(n.functions&&(!n.functions||0!==n.functions.length)){if(r[n.dataField]||(r[n.dataField]={},n.functions.forEach((function(e){r[n.dataField][e]=0}))),void 0!==r[n.dataField].avg){const e=r[n.dataField].avg,t=i[n.dataField];r[n.dataField].avg=0===t||void 0===t?0:e/t}else void 0!==r[n.dataField].count&&(r[n.dataField].count=d);if(void 0!==r[n.dataField].unique){const e=r[n.dataField].unique;r[n.dataField].unique=e.length}if(void 0!==r[n.dataField].median){let e=r[n.dataField].median;e.sort((function(e,t){return e-t})),r[n.dataField].median=.5*(e[Math.floor((e.length+1)/2)-1]+e[Math.ceil((e.length+1)/2)-1])}(r[n.dataField].stdev||r[n.dataField].stdevp||r[n.dataField].var||r[n.dataField].varp)&&n.functions.forEach((function(e){if("stdev"===e||"var"===e||"varp"===e||"stdevp"===e){const a=r[n.dataField][e],i=o,d=a/o;let l=0;for(let e=0;e<o;e++){let a=t[e][n.dataField];l+=(a-d)*(a-d)}let s="stdevp"===e||"varp"===e?i:i-1;0===s&&(s=1),"var"===e||"varp"===e?r[n.dataField][e]=l/s:"stdevp"!==e&&"stdev"!==e||(r[n.dataField][e]=Math.sqrt(l/s))}}))}}return r}}_getDataItem(e,t){const a=this,n={},r="number"==typeof a.dataSource||a.dataSourceLength;if(!e)return{$:{id:t,isEmpty:!0,index:t}};if("string"==typeof e&&(e={"":e}),r){for(let e=0;e<a.dataFields.length;e++){n[(a.dataFields?a.dataFields[e]:{}).name]=""}return n.$={},n.$.id=t,n.$.index=t,n}const i=e;if(void 0!==i.expanded&&(n.expanded=i.expanded,"true"===i.expanded||!0===i.expanded||1===i.expanded?n.expanded=!0:n.expanded=!1),a.childrenDataField?void 0!==i[a.childrenDataField]&&(n.children=i[a.childrenDataField]):void 0!==i.children?n.children=i.children:void 0!==i.items&&(n.children=i.items),void 0!==i.leaf&&(n.leaf=i.leaf),void 0!==i.level&&(n.level=i.level),a.keyDataField&&void 0!==i[a.keyDataField]&&(n[a.keyDataField]=i[a.keyDataField]),a.parentDataField&&void 0!==i[a.parentDataField]&&(n[a.parentDataField]=i[a.parentDataField]),0===a.dataFields.length){const t=Object.getOwnPropertyNames(e);for(let e=0;e<t.length;e++)"$"!==t[e]&&a.dataFields.push({name:t[e],dataType:"string"})}for(let t=0;t<a.dataFields.length;t++){const r=a.dataFields?a.dataFields[t]:{};let o="";if(null==r)continue;if(e.length&&(o=e[t]),r.map){let e=r.map.split(a.mapChar);if(e.length>0){let t=i;for(let a=0;a<e.length;a++)i&&(t=t[e[a]]);o=t}else o=i[r.map]}null!=o?o=o.toString():void 0===o&&null!==o&&(o="");let d=!1;""===o&&(d=!0,o=e[r.name],void 0===r.dataType&&(r.dataType="any"),null!=o?"array"!==r.dataType&&("any"===r.dataType?o=Array.isArray(e[r.name])?[...e[r.name]]:"object"==typeof e[r.name]?Object.assign({},e[r.name]):e[r.name]:"date"!==r.dataType&&(o=o.toString())):o=void 0===o&&"any"===r.dataType?null:""),"[object Object]"===o&&r.map&&d&&(o=""),a._cachedValues[o+"_"+r.dataType]?o=a._cachedValues[o+"_"+r.dataType]:("bool"===r.dataType||"boolean"===r.dataType?"true"===o||"1"===o?o=!0:"false"!==o&&"0"!==o||(o=!1):"number"===r.dataType?(-1===o.indexOf(".")&&o.indexOf(",")>=0&&o.substring(1+o.indexOf(",")).length<3&&(o=o.replace(",",".")),o=a.$document.deserialize(""+o,r.dataType,!0)):"any"!==r.dataType&&(o=a.$document.deserialize(""+o,r.dataType,!0)),"any"!==r.dataType&&(a._cachedValues[o+"_"+r.dataType]=o)),"string"!==r.dataType&&"boolean"!==r.dataType&&"bool"!==r.dataType&&"any"!==r.dataType&&(isNaN(o)||o===-1/0||o===1/0)&&(o=0),"parent"!==r.name&&"group"!==r.name&&"leaf"!==r.name&&"level"!==r.name?("string"===r.dataType&&/<.+?>/.test(o)&&o.replace&&("all"===a.sanitizeHTML?o=o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;"):"blackList"===a.sanitizeHTML&&(o=window.Smart.Utilities.Core.sanitizeHTML(o))),n[r.name]=o):n.$[r.name]=o}let o=t;if(a.id)o=i[a.id],"object"==typeof o&&(o=t),i.$&&void 0!==i.$.id&&(o=i.$.id);else if(!a.virtualDataSource&&a.dataItemById&&a.dataItemById[o])for(o=a.length;a.dataItemById[o];)o++;return n.$||(n.$={}),n.$.id=o,n.$.index=t,new Object(n)}_bindToArray(){const e=this,t="number"==typeof e.dataSource||e.dataSourceLength,a=[];e.boundSource.canNotify=!1;const n=t?"number"==typeof e.dataSource?e.dataSource:e.dataSource.length:e.observable?e.length:e.dataSource.length;for(let r=0;r<n;r++){const n=t?{}:e.dataSource[r],i=e._getDataItem(n,r);a.push(i)}if(t&&e.dataSourceLength&&e.dataSource.length>0)for(let t=0;t<e.dataSource.length;t++){const n=e.dataSource[t].cell,r=e.dataSource[t].value,i=n.replace(/[^0-9]/g,""),o=n.replace(/[0-9]/g,"");a[i-1][o]=r}e.boundSource=!1===e.observable||e.virtualDataSource?[]:new Smart.ObservableArray(a),e.observable&&(e.boundSource=new Smart.ObservableArray(a));for(let t=0;t<n;t++)e.observable?e[t]=e.boundSource[t]:e[t]=a[t],e.dataItemById[e[t].$.id]=e[t];!1===e.observable&&(e.boundSource=a),e.boundSource.canNotify=!0}_bindToICS(){const e=this,t=""+e.dataSource,a=e.rowDelimiter||"\n",n=t.split("\r"),r=[];let i=t.split(a),o=i.length;1===o&&n.length>1&&(i=n,o=i.length);const d=function(e,t){var a=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z)?$/.exec(e);if(!a)throw new Error("Invalid UNTIL value: "+e);return t?new Date(a[1],a[2]-1,a[3],0,0,0,0):new Date(Date.UTC(a[1],a[2]-1,a[3],a[5]||0,a[6]||0,a[7]||0))};for(let e=0;e<o;e++){const t=i[e].trim();if(t.indexOf("BEGIN:VEVENT")>=0)var l={};else if(l)if(t.indexOf("BEGIN:VALARM")>=0)var s={};else{if(s){if(t.indexOf("ACTION")>=0){s.ACTION=t.substring(t.indexOf("ACTION")+7);continue}if(t.indexOf("DESCRIPTION")>=0){s.DESCRIPTION=t.substring(t.indexOf("DESCRIPTION")+12);continue}if(t.indexOf("TRIGGER")>=0){s.TRIGGER=t.substring(t.indexOf("TRIGGER")+8);continue}if(t.indexOf("END:VALARM")>=0){l.ALARM||(l.ALARM=[]),l.ALARM.push(s),s=void 0;continue}}if(t.indexOf("SUMMARY")>=0)l.SUMMARY=t.substring(t.indexOf("SUMMARY")+8);else if(t.indexOf("LOCATION")>=0)l.LOCATION=t.substring(t.indexOf("LOCATION")+9);else if(t.indexOf("DESCRIPTION")>=0)l.DESCRIPTION=t.substring(t.indexOf("DESCRIPTION")+12);else if(t.indexOf("RRULE")>=0)l.RRULE=t.substring(t.indexOf("RRULE")+6);else if(t.indexOf("RECURRENCE-ID")>=0)l.RECURRENCEID=t.substring(t.indexOf("RECURRENCE-ID")+14);else if(t.indexOf("RECURRENCE-ID;VALUE=DATE")>=0)l.RECURRENCEID=t.substring(t.indexOf("RECURRENCE-ID;VALUE=DATE")+25);else if(t.indexOf("EXDATE;VALUE=DATE")>=0){const e=t.substring(t.indexOf("EXDATE;VALUE=DATE")+20);l.EXDATE=e}else if(t.indexOf("EXDATE")>=0){const e=t.substring(t.indexOf("EXDATE")+7);l.EXDATE=e}else t.indexOf("DTEND;VALUE=DATE")>=0?l.DTEND=d(t.substring(t.indexOf("DTEND;VALUE=DATE")+17),!0):t.indexOf("DTEND")>=0?l.DTEND=d(t.substring(t.indexOf("DTEND")+6)):t.indexOf("DTSTART;VALUE=DATE")>=0?l.DTSTART=d(t.substring(t.indexOf("DTSTART;VALUE=DATE")+19),!0):t.indexOf("DTSTART")>=0?l.DTSTART=d(t.substring(t.indexOf("DTSTART")+8)):t.indexOf("UID")>=0?l.uid=l.UID=t.substring(t.indexOf("UID")+4):t.indexOf("STATUS")>=0?l.STATUS=t.substring(t.indexOf("STATUS")+7):t.indexOf("TITLE")>=0?l.TITLE=t.substring(t.indexOf("TITLE")+6):t.indexOf("CATEGORIES")>=0?l.CATEGORIES=t.substring(t.indexOf("CATEGORIES")+11):t.indexOf("END:VEVENT")>=0&&(r.push(l),l.ALARM&&(l.ALARM=JSON.stringify(l.ALARM)),s=void 0)}}e.canNotify=!1,e.dataSource=r,e.canNotify=!0,e._bindToArray()}_bindToJSON(){const e=this,t=[],a=e.dataSource.length?e.dataSource:Object.entries(e.dataSource);e.boundSource.canNotify=!1;for(let n=0;n<a.length;n++){const r=a[n],i=e._getDataItem(r,n);t.push(i)}e.boundSource=!1===e.observable||e.virtualDataSource?[]:new Smart.ObservableArray(t);for(let t=0;t<e.length;t++)e[t]=e.boundSource[t],e.dataItemById[e[t].$.id]=e[t];!1===e.observable&&(e.boundSource=t),e.boundSource.canNotify=!0}sortBy(e,t,a){const n=this;if(!t)for(let a=0;a<n.dataFields.length;a++){const r=n.dataFields[a];if(r.name===e){t=r.dataType;break}}if(n.boundHierarchy){if((!e||0===e.length)&&n.groupBy.length>0)return void n.refreshHierarchy();const r=(e=>{let t=[];for(;e;){t=t.concat(e);for(let a=0;a<e.length;a++)e[a].children&&(t=t.concat(e[a].children));e=e.children}return t})(n.boundHierarchy);if(r){r.find((e=>{if(e.summaryRow)return e}))&&n.refreshHierarchy()}const i=function(r){n._sort(r,e,a,t);for(let n=0;n<r.length;n++){const o=r[n];o.children&&i(o.children,e,a,t)}};i(n.boundHierarchy)}else n._sort(n.boundSource,e,a,t)}_createFilter(e,t){const a={"=":"EQUAL","<>":"NOT_EQUAL","!=":"NOT_EQUAL",not_like:"DOES_NOT_CONTAIN",like:"CONTAINS","<":"LESS_THAN",">":"GREATER_THAN","<=":"LESS_THAN_OR_EQUAL",">=":"GREATER_THAN_OR_EQUAL",equal:"EQUAL","not equal":"NOT_EQUAL","less than":"LESS_THAN","greater than":"GREATER_THAN","greater than or equal":"GREATER_THAN_OR_EQUAL","less than or equal":"LESS_THAN_OR_EQUAL","starts with":"STARTS_WITH","ends with":"ENDS_WITH",notEqual:"NOT_EQUAL",not_equal:"NOT_EQUAL",lessThan:"LESS_THAN",greaterThan:"GREATER_THAN",greaterThanOrEqual:"GREATER_THAN_OR_EQUAL",lessThanOrEqual:"LESS_THAN_OR_EQUAL",less_than:"LESS_THAN",greater_than:"GREATER_THAN",greater_than_or_equal:"GREATER_THAN_OR_EQUAL",less_than_or_equal:"LESS_THAN_OR_EQUAL",null:"null","":"EMPTY",isblank:"EMPTY",isnotblank:"NOT_EMPTY",isBlank:"EMPTY",isNotBlank:"NOT_EMPTY",contains:"CONTAINS",does_not_contain:"DOES_NOT_CONTAIN","not contains":"DOES_NOT_CONTAIN",notcontains:"DOES_NOT_CONTAIN",notContains:"DOES_NOT_CONTAIN",startswith:"STARTS_WITH",endswith:"ENDS_WITH",starts_with:"STARTS_WITH",ends_with:"ENDS_WITH",startsWith:"STARTS_WITH",endsWith:"ENDS_WITH",NULL:"NULL",NOT_NULL:"NOT_NULL"};let n=[];for(let e=0;e<t.length;e++){const a=t[e],r=-1===a.indexOf('"')?a.split(" "):a.split('"');let i=[];for(let e=0;e<r.length;e++){const t=r[e];""!==t&&i.push(t.trim())}n.push(i)}const r=new Smart.FilterGroup,i=[],o=[];for(let t=0;t<n.length;t++){const r=n[t];if(r.length>1){const t=new Smart.FilterGroup;let n="and",i=0;for(let o=0;o<r.length;o++){const d=r[o];if("and"!==d&&"or"!==d){if(i++,2===i){const l=t.createFilter(e,d,a[r[o-1]]);i=0,n&&t.addFilter(n,l)}}else n=d}o.push(t)}else{const e=r[0];if("and"!==e&&"or"!==e)throw new Error('Filter Exprresion expects "AND" or "OR", but the token is: '+e);i.push(e)}}let d=0;if(1===o.length)return o[0];for(let e=0;e<o.length;e++){let t=i[d];(e+1)%2==0&&d++,t||(t="and"),r.addFilter(t,o[e])}return r}filterBy(e,...t){const a=this,n=(()=>{for(let t=0;t<a.dataFields.length;t++){const n=a.dataFields[t];if(n.name===e)return n.dataType}})(),r=a._createFilter(n,t);return a.boundSource.filter((t=>r.evaluate(t[e])))}_filter(e,t="and"){const a=this,n=[],r=[];if(0===e.length)return void a.clearFilter();const i=e=>{for(let t=0;t<a.dataFields.length;t++){const n=a.dataFields[t];if(n.name===e)return n.dataType}};let o,d;"and"===t?(o=!0,d=function(e,t,a){return e&&t.evaluate(a[t.dataField])}):(o=!1,d=function(e,t,a){return e||t.evaluate(a[t.dataField])});for(let t=0;t<e.length;t++){const o=e[t],d=o[0];let l=null;l=o[1]instanceof Smart.FilterGroup?o[1]:a._createFilter(i(d),o.splice(1)),l&&(r.push(d),l.dataField=d,n.push(l))}if(a.boundHierarchy){const e=function(e){let t=o;for(let a=0;a<n.length;a++){const r=n[a];t=d(t,r,e)}return e.$.filtered=t,t},t=function(n,r,i){let o=0;for(let a=0;a<n.length;a++){const i=n[a];e(i),i.$.filtered&&o++,i.children&&t(i.children,i,r)}o>0&&a.groupBy.length>0&&r?(r.$.filtered=!0,i&&!i.$.filtered&&(i.$.filtered=!0)):o>0&&o!==n.length&&r?(r.$.filtered=null,i&&!i.$.filtered&&(i.$.filtered=null)):o>0&&o===n.length&&r&&(r.$.filtered=!0,i&&!i.$.filtered&&(i.$.filtered=!0))};t(a.boundHierarchy,null,null)}else for(let e=0;e<a.boundSource.length;e++){const t=a.boundSource[e];let r=o;for(let e=0;e<n.length;e++){const a=n[e];r=d(r,a,t)}t.$.filtered=r}a.onFilter&&a.onFilter()}clearGroup(){const e=this;e.groupBy=[],e.boundHierarchy=null,e.refreshHierarchy(),e.onGroup&&e.onGroup()}clearFilter(){const e=this;for(let t=0;t<e.boundSource.length;t++){e.boundSource[t].$.filtered=!0}if(e.boundHierarchy){const t=function(e,a,n){for(let n=0;n<e.length;n++){const r=e[n];r.$.filtered=!0,r.$.filtered,r.children&&t(r.children,r,a)}a&&(a.$.filtered=!0,n&&!n.$.filtered&&(n.$.filtered=!0))};t(e.boundHierarchy,null,null)}e.onFilter&&e.onFilter()}clearSort(){this._sort(this.boundSource,[],[],[])}_sort(e,t,a,n,r,i){const o=this;let d=!1;if(0===e.length)return;if(e&&e.constructor&&e instanceof Smart.ObservableArray&&(d=!0),(!e||!Array.isArray(e)||0===e.length||!t||Array.isArray(t)&&0===t.length)&&!d&&!o.boundHierarchy)throw new Error("sort: Missing or Invalid arguments!");"string"==typeof t&&(t=[t]);const l=[],s=[];void 0===a&&(a=[]);const c=function(e,t){let a;switch(t||typeof e){case"string":a=(new Intl.Collator).compare;break;case"number":case"int":case"bigInt":case"float":case"double":a=function(e,t){return e-t};break;case"boolean":case"bool":a=function(e,t){return e===t?0:!1===e?-1:1};break;case"date":case"time":case"dateTime":a=e instanceof Date?function(e,t){return e||t?e?t?e.getTime()-t.getTime():1:-1:0}:e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber?function(e,t){return e.compare(t)}:function(e,t){return e-t};break;case"object":if(e instanceof Date)a=function(e,t){return e||t?e?t?e.getTime()-t.getTime():1:-1:0};else if(e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber)a=function(e,t){return e.compare(t)};else if(e instanceof Smart.Utilities.Complex||window.NIComplex&&e instanceof window.NIComplex){const e=new Smart.Utilities.ComplexNumericProcessor;a=function(t,a){return e.compareComplexNumbers(t,a)}}}return a};for(let r=0;r<t.length;r++){void 0===a[r]||"asc"===a[r]||"ascending"===a[r]?l[r]=1:l[r]=-1;let o=e[0][t[r]];if(void 0===o&&e[0]&&e[0].children&&e[0].data&&(o=e[0].data[t[r]]),i&&i){const e=t[r];if(i[e]){s[r]=i[e];continue}}s[r]=c(o,n[r])}t.length>0&&r?r(e,t,a,s):e.sort((function(e,a){for(let n=0;n<t.length;n++){const r=s[n](e[t[n]],a[t[n]]);if(0===r){if(t[n+1])continue;return void 0!==e.$.index?(e.$.index-a.$.index)*l[n]:0}return r*l[n]}if(0===t.length)return e.$.index<a.$.index?-1:e.$.index>a.$.index?1:0}));for(let t=0;t<e.length;t++)o[t]=e[t]}static Filter(e,t,a,n,r="and"){let i,o;"and"===r?(i=!0,o=function(e,t,a,r){return n?e&&n(t,a,r):e&&r.evaluate(t[a])}):(i=!1,o=function(e,t,a,r){return n?e||n(t,a,r):e||r.evaluate(t[a])});return e.filter((e=>{let n=i;for(let r=0;r<a.length;r++){const i=a[r],d=t[r];n=o(n,e,d,i)}return n}))}filter(e,t,a){Smart.DataAdapter.Filter(this.boundSource,e,t,a)}sort(e,t,a){Smart.DataAdapter.Sort(this.boundSource,e,t,a)}static Sort(e,t,a,n){const r=function(e){let t;switch(typeof e){case"string":if(e.indexOf("-")>=0||e.indexOf("/")>=0){const t=new Date(e);if(t&&"Invalid Date"!==t.toString()){return function(e,t){const a=new Date(e),n=new Date(t);return a||n?a?n?a.getTime()-n.getTime():1:-1:0}}}t=(new Intl.Collator).compare;break;case"number":t=function(e,t){return e-t};break;case"boolean":t=function(e,t){return e===t?0:!1===e?-1:1};break;case"object":if(e instanceof Date)t=function(e,t){return e||t?e?t?e.getTime()-t.getTime():1:-1:0};else if(e instanceof Smart.Utilities.DateTime||e instanceof BigNumberNG)t=function(e,t){return e.compare(t)};else if(e instanceof Smart.Utilities.Complex||window.NIComplex&&e instanceof window.NIComplex){const e=new Smart.Utilities.ComplexNumericProcessor;t=function(t,a){return e.compareComplexNumbers(t,a)}}}return t};if(!e||!Array.isArray(e)||0===e.length||!t||Array.isArray(t)&&0===t.length)return;"string"==typeof t&&(t=[t]);const i=[],o=[];void 0===a&&(a=[]);for(let n=0;n<t.length;n++)void 0===a[n]||"asc"===a[n]||"ascending"===a[n]?i[n]=1:i[n]=-1,o[n]=r(e[0][t[n]]);if(n)return void n(e,t,a,o);const d=e.slice(0);return d.sort((function(e,a){for(let n=0;n<t.length;n++){const r=o[n](e[t[n]],a[t[n]]);if(0===r){if(t[n+1])continue;return void 0!==e._index?(e._index-a._index)*i[n]:0}return r*i[n]}})),d}};class e{constructor(e,t){const a=this;a.config=e,a.callback=t,!1!==e.autoFetch&&a.call(e)}call(e){const t=this;e||(e=t.config);let a="GET",n=e.url,r=null,i=!0;if(e.type&&(a=e.type),e.data)if("GET"===a){n+="?";for(let t in e.data)Object.prototype.hasOwnProperty.call(e.data,t)&&(n+=encodeURI(t+"="+e.data[t]+"&"));"&"===n.charAt(n.length-1)&&(n=n.slice(0,n.length-1))}else"POST"===a&&(r=JSON.stringify(e.data));e&&!1===e.async&&"xlsx"!==e.dataSourceType&&(i=!1),void 0!==window.fetch&&i?t.ajaxFetch(e,a,n,r):t.ajaxXMLHttpRequest(e,a,n,r,i)}ajaxFetch(e,t,a,n){const r=this,i={method:t};let o,d,l,s;switch(e.dataSourceType){case"json":o="json";break;case"xlsx":o="arrayBuffer";break;default:o="text"}if(e&&e.contentType&&(i.headers=new Headers({"Content-Type":e.contentType})),null!==n&&(i.body=n),e.timeout&&(l=setTimeout((function(){s=!0}),e.timeout)),e.beforeSend){if(!1===e.beforeSend(i,e))return}fetch(a,i).then((function(e){if(s)throw d=408,new Error("timeout");if(l&&clearTimeout(l),d=e.status,!e.ok)throw new Error(e.statusText);return e[o]()})).then((function(t){if("arrayBuffer"===o)return JSZip.loadAsync(t).then((function(t){return t.files["xl/worksheets/sheet1.xml"].async("text").then((function(a){return t.files["xl/sharedStrings.xml"].async("text").then((function(t){const n=r.parseXLSXData(a,t);r.ajaxComplete(e,n,d)}))}))}));r.ajaxComplete(e,t,d)})).catch((function(t){"JSZip is not defined"===t.message&&(t.message="JSZip is not defined. Please include a reference to JSZip to be able to load data from XLSX files."),e&&e.loadError&&e.loadError(d,t),r.callback&&r.callback(t,d)}))}ajaxXMLHttpRequest(e,t,a,n,r){const i=new XMLHttpRequest,o=this;if(i.open(t,a,r),i.ontimeout=function(){e&&e.loadError&&e.loadError(408,"timeout")},i.onload=function(){if(4===i.readyState){const t=i.status;let a=i.response;t>=200&&t<=299?("json"===e.dataSourceType&&(a=JSON.parse(a)),o.ajaxComplete(e,a,t)):e&&e.loadError&&e.loadError(t,a)}},i.onerror=function(){e&&e.loadError&&e.loadError(i.status,i.response)},e&&e.contentType&&i.setRequestHeader("Content-Type",e.contentType),r&&e.timeout&&(i.timeout=e.timeout),e.beforeSend){if(!1===e.beforeSend(i,e))return}i.send(n)}ajaxComplete(e,t,a){if(e){if(e.beforeLoadComplete){const a=e.beforeLoadComplete(t);a&&(t=a)}e.loadComplete&&e.loadComplete(t,a),this.callback&&this.callback(t,a)}}parseXLSXData(e,t){const a=new DOMParser,n=a.parseFromString(t,"text/xml"),r=Array.from(n.getElementsByTagName("si")),i=[],o=a.parseFromString(e,"text/xml"),d=Array.from(o.getElementsByTagName("row")),l=[];return r.forEach((function(e){let t=e.getElementsByTagName("t");if(1===t.length)i.push(t[0].innerHTML);else{let e="";t=Array.from(t),t.forEach((function(t){e+=t.innerHTML})),i.push(e)}})),d.forEach((function(e){const t={};Array.from(e.getElementsByTagName("c")).forEach((function(e){const a=e.getAttribute("r").match(/\D+/)[0],n=e.getAttribute("t"),r=e.getElementsByTagName("v")[0].innerHTML;let o;switch(n){case"s":o=i[parseFloat(r)];break;case"b":o=1===parseFloat(r);break;default:o=parseFloat(r)}t[a]=o})),l.push(t)})),l}}Smart.Ajax=window.Ajax=e})();
775
+ (()=>{Smart.DataAdapter=window.smartDataAdapter=class{constructor(e){e||(e={});const t=Object.assign(this,e);t.key=(65536*(1+Math.random())|0).toString(16).substring(1),t.$document=Smart.Utilities.Extend(document),t.boundSource=!1===t.observable||t.virtualDataSource?[]:new Smart.ObservableArray,t.dataItemById=[],void 0===t.allowAdd&&(t.allowAdd=!0),void 0===t.allowRemove&&(t.allowRemove=!0),void 0===t.allowUpdate&&(t.allowUpdate=!0),void 0===t.mapChar&&(t.mapChar="."),void 0!==e.observable||t.virtualDataSource?t.observable=!1:t.observable=!0,void 0===t.sanitizeHTML&&(t.sanitizeHTML="blackList"),t._expandedRowIds=[],e.dataSource||(t.dataSource=[]),e.dataFields||(t.dataFields=[]),e.dataSourceType||(t.dataSourceType="array"),e.id||(t.id=null),e.autoFetch||(t.autoFetch=!0),e.dataFields&&(t.dataFields=e.dataFields),Object.defineProperty(t,"groupBy",{configurable:!1,enumerable:!0,get:()=>t._groupBy?t._groupBy:[],set(e){const a=()=>{t.boundHierarchy=null,t.refreshHierarchy(),t.onGroup&&t.onGroup()};t._groupBy=new Smart.ObservableArray(e),t._groupBy.notify((function(){a()})),t.isInitialized&&a()}}),e.groupBy?e.groupBy.toArray?t.groupBy=e.groupBy.toArray():t.groupBy=e.groupBy:t.groupBy=[],e&&!1!==e.autoBind&&t.dataBind(),t.isInitialized=!0}beginUpdate(){this.isUpdating=!0}endUpdate(){const e=this;e.isUpdating=!1,e.refreshIndexes(),e.refreshHierarchy()}get expandHierarchy(){return void 0===this._expandHierarchy&&(this._expandHierarchy=!1),this._expandHierarchy}set expandHierarchy(e){const t=this;t._expandHierarchy=e,t.isInitialized&&t.refreshHierarchy()}_getDataField(e){switch(e.name){case"leaf":case"parent":case"expanded":case"checked":case"selected":case"level":case"icon":case"data":case"group":case"children":case"items":e.map?e.map=e.map.replace(e.name,"$"+e.name):e.map=e.name,e.name="$"+e.name}}get dataFields(){return this._dataFields}set dataFields(e){const t=this;return t._dataFields=t._getDataFieldObjects(e),t._dataFields}_getDataFieldObjects(e){const t=this;let a=[];if("number"==typeof e){const t="A".charCodeAt(0);let n="",r=0;for(let i=0;i<e;i++){const e=String.fromCharCode(t+r);r++;const i=n+e;a.push({name:i,dataType:"string"}),r>=26&&(r=0,n+="A")}}else if(Array.isArray(e)&&e.length>0)for(let n=0;n<e.length;n++){const r=e[n];if("string"==typeof r){const e=r.split(":"),t=e[0].trim(),n=e.length>1?e[1].trim():"string";a.push({name:t,dataType:n})}else a.push(r);t._getDataField(a[a.length-1])}return a}get dataSource(){const e=this;return e._dataSource||(e._dataSource=[]),e._dataSource}set dataSource(e){const t=this;t._dataSource=e,t.isInitialized&&(t.boundSource=!1===t.observable||t.virtualDataSource?[]:new Smart.ObservableArray,t.dataItemById=[],t.bindingCompleted=!1,t.dataBind(),t.refreshIndexes())}get canNotify(){const e=this;return void 0===e._canNotify&&(e._canNotify=!0),e._canNotify}set canNotify(e){this._canNotify=e}_notify(e){const t=this;t.canNotify&&t.notifyFn&&t.notifyFn(e)}notify(e){e&&(this.notifyFn=e)}toArray(){const e=this;return!1===e.observable?e.boundSource:e.boundSource.toArray()}dataBind(){const t=this;t.bindingCompleted=!1,t.clear();const a=()=>{t.observable&&(t.boundSource.notify||(t.boundSource=new Smart.ObservableArray),t.boundSource.notify((function(e){if("update"===e.action&&e.path&&e.path.indexOf(".")>=0&&-1===e.path.indexOf("children")&&-1===e.path.indexOf("loaded")&&-1===e.path.indexOf("level")&&-1===e.path.indexOf("leaf")&&-1===e.path.indexOf("expanded")){let a=!1;for(let n=0;n<t.dataFields.length;n++){const r=t.dataFields[n].name;e.path.indexOf(r)>=0&&(a=!0)}t._notify&&a&&t._notify({action:"update",data:e.target,index:e.index})}}))),t._onBindingComplete()};"string"==typeof t.dataSource&&(t.dataSource.indexOf(".json")>=0||"json"===t.dataSourceType)?(t.url=t.dataSource,t.dataSourceType="json",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".xml")>=0?(t.url=t.dataSource,t.dataSourceType="xml",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".xlsx")>=0?(t.url=t.dataSource,t.dataSourceType="xlsx",new e(t,(e=>{if(!e[0])return e=[],t._bindToArray(),void a();const n=Object.keys(e[0]),r={},i=[];if(!1!==t.exportHeader){let a=0;for(let e in n){r[n[e]]=t.dataFields[a++].name}for(let t=1;t<e.length;t++){const a=e[t],o={};for(let e in n){const t=n[e];o[r[t]]=a[t]}i.push(o)}t.dataSource=i}t._bindToArray(),a()}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".csv")>=0?(t.url=t.dataSource,t.dataSourceType="csv",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".tsv")>=0?(t.url=t.dataSource,t.dataSourceType="tsv",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&(t.dataSource.indexOf(".ics")>=0||t.dataSource.indexOf(".php")>=0&&"ics"===t.dataSourceType||t.dataSource.indexOf(".txt")>=0&&"ics"===t.dataSourceType)?(t.url=t.dataSource,t.dataSourceType="ics",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&(t.dataSource.indexOf("BEGIN:VCALENDAR")>=0||"ics"===t.dataSourceType)?(t._bindToICS(),a()):"string"==typeof t.dataSource&&(t.dataSource.indexOf("<?xml")>=0||"xml"===t.dataSourceType)?(t._bindToXML(),a()):"string"==typeof t.dataSource&&(t.dataSource.indexOf(" ")>=0||t.dataSource.indexOf(",")>=0||"tsv"===t.dataSourceType||"csv"===t.dataSourceType||"tab"===t.dataSourceType)?(t._bindToCSV(),a()):"array"===t.dataSourceType?(t._bindToArray(),a()):"json"===t.dataSourceType&&(t._bindToJSON(),a())}_bindToXML(){const e=this;let t=null,a=null;window.DOMParser&&(t=new DOMParser,a=t.parseFromString(e.dataSource,"text/xml")),void 0===e.root&&(e.root=""),void 0===e.record&&(e.record="");const n=a.querySelectorAll(e.root+" "+e.record),r=n.length,i=[];let o=e.dataFields?e.dataFields.length:0;if(0===o){const t=n[0],a=new Array;for(let e in t){const t=e;a[a.length]={name:t}}e.dataFields=a,o=a.length}for(let t=0;t<r;t++){const a=n[t],r={};if(void 0===a)break;if(e.id){const t=a.querySelector(e.id);r[e.id]=t.textContent}for(let t=0;t<o;t++){const n=e.dataFields[t],i=a.querySelector(n.map||n.name);r[n.name]=i.textContent}i[t]=r}e.canNotify=!1,e.dataSource=i,e.canNotify=!0,e._bindToArray()}_bindToCSV(){const e=this,t=""+e.dataSource,a=-1===t.indexOf(",")?"\t":",",n=t.split("\r"),r=new Array;let i=t.split("\n"),o=i.length;1===o&&n.length>1&&(i=n,o=i.length);const d=e.dataFields.length>0;for(let t=0;t<o;t++){const n=i[t],o={},l=i[t].split(a);for(let a=0;a<l.length;a++){let r=e.dataFields[a],i=l[a];if(r||(e.dataFields.push({name:i.trim()}),r=e.dataFields[e.dataFields.length-1]),r.map&&(i=n[r.map]),i=i.trim(),1!==t||d)switch(r.dataType){case"boolean":i="false"!==i;break;case"number":i=parseFloat(i);break;case"date":i=new Date(i)}else{let e="string";"false"===i||"true"===i?(e="boolean",i="false"!==i):isNaN(parseInt(i)&&-1===i.indexOf("/"))?(i.indexOf("-")>=0||i.indexOf("/")>=0||i.indexOf(":")>=0)&&"Invalid Date"!==new Date(i).toString()&&(e="date",i=new Date(i)):(e="number",i=parseFloat(i)),r.dataType||(r.dataType=e)}o[r.map||r.name||a.toString()]=i}(d||t>0)&&r.push(o)}e.canNotify=!1,e.dataSource=r,e.canNotify=!0,e._bindToArray()}_onBindingComplete(){const e=this;e._buildHierarchy(),e.onBindingComplete&&e.onBindingComplete({data:e.boundSource}),e._notify&&e._notify({action:"bindingComplete",data:e.boundSource}),e.bindingCompleted=!0}refreshHierarchy(){this.isUpdating||this._buildHierarchy()}find(){return this.boundSource.find.apply(this.boundSource,arguments)}onVirtualDataSourceRequested(e,t){const a=this;let n=t?t.first:1/0,r=t?t.last:1/0,i=t?t.row:null;if(void 0===n&&(n=1/0),void 0===r&&(r=1/0),a.virtualFirstIndex=n,a.virtualLastIndex=r,a.virtualDataSource){const o=function(r){void 0!==r.virtualDataSourceLength&&(a.virtualDataSourceLength=r.virtualDataSourceLength),new Smart.DataAdapter({dataSource:r.dataSource,dataFields:r.dataFields||a.dataFields,data:t,keyDataField:r.keyDataField,parentDataField:r.parentDataField,observable:!1,id:r.id||a.id,onBindingComplete(r){if(void 0===t.result&&(t.result=!0),a.virtualDataSourceOnExpand&&i)return a.groupBy.length>0?r.data&&r.data.length>0&&a.add(r.data):r.data&&r.data.length>0?a.add(r.data,i.$.id):i.leaf=!0,a.onFilter&&a.onFilter(),void e(t);n===1/0&&"scroll"===t.action?r.data&&r.data.length&&a.add(r.data):"filter"===t.action||"group"===t.action?(a.canNotify=!1,a.dataSource=r.data,a.canNotify=!0):("add"===t.action||"update"===t.action||t.action,a.canNotify=!1,a.dataSource=r.data,a.canNotify=!0),a.onFilter&&a.onFilter(),e(t)}})};let d={};if(t.sorting&&t.sorting.length>0){let e=[];for(let a in t.sorting)e.push(a+" "+t.sorting[a].sortOrder.toUpperCase());const a=" ORDER BY "+e.join(", ");d.orderBy=a}else d.orderBy="";if(void 0===n||void 0===r||0===n&&0===r)d.limit="";else{const e=r-n,t=" LIMIT "+e+" OFFSET "+n;d.limit=t,isNaN(e)&&(d.limit="")}if(t.grouping&&t.grouping.length>0){const e=" GROUP BY "+t.grouping[0];d.groupBy=e}else d.groupBy="";if(t.filtering&&t.filtering.length>0){const e=(e,t)=>{switch(t.condition){case"EMPTY":return e+" = ''";case"NOT_EMPTY":return e+" != ''";case"EQUAL":return e+" = '"+t.value+"'";case"NOT_EQUAL":return e+" != '"+t.value+"'";case"CONTAINS_CASE_SENSITIVE":case"CONTAINS":return e+" LIKE '%"+t.value+"%'";case"DOES_NOT_CONTAIN_CASE_SENSITIVE":case"DOES_NOT_CONTAIN":return e+" NOT LIKE '%"+t.value+"%'";case"STARTS_WITH_CASE_SENSITIVE":case"STARTS_WITH":return e+" LIKE '"+t.value+"%'";case"ENDS_WITH_CASE_SENSITIVE":case"ENDS_WITH":return e+" LIKE '%"+t.value+"'";case"NULL":return e+" IS NULL";case"NOT_NULL":return e+" IS NOT NULL"}},a=(e,t)=>{switch(t.condition){case"EQUAL":return e+" = "+t.value;case"NOT_EQUAL":return e+" != "+t.value;case"GREATER_THAN":return e+" > "+t.value;case"GREATER_THAN_OR_EQUAL":return e+" >= "+t.value;case"LESS_THAN":return e+" < "+t.value;case"LESS_THAN_OR_EQUAL":return e+" <= "+t.value;case"NULL":return e+" IS NULL";case"NOT_NULL":return e+" IS NOT NULL";case"RANGE":return"("+e+" >= "+t.value+" and "+e+" <= "+t.valueTo+")"}},n=(e,t,a)=>{if(a.operator){var n=e(t,a.condition1),r=e(t,a.condition2);return"("+n+" "+a.operator+" "+r+")"}return e(t,a)};let r=[];for(let i in t.filtering){const o=t.filtering[i];let d=o.filters,l=[],s=" AND ";for(let t=0;t<d.length;t++){const r=d[t];switch(r.type){case"stringFilter":l.push(n(e,i,r));break;case"numericFilter":case"dateFilter":case"booleanFilter":l.push(n(a,i,r))}1===o.logicalOperators[t]&&(s=" OR ")}r.push("("+l.join(s)+")")}if(r.length>0){let e=" AND ";t.filterOperator&&"or"===t.filterOperator.toLowerCase()&&(e=" OR "),d.where=" WHERE "+r.join(e)}else d.where=""}else d.where="";if("dataBind"===t.action&&a.virtualDataSourceOnExpand&&a.keyDataField&&a.parentDataField&&(d.where?d.where+=" AND "+a.parentDataField+" IS NULL":d.where=" WHERE "+a.parentDataField+" IS NULL"),"update"===t.action){const e=[];for(let n in t.edit.row)"$"!==n&&n!==a.id&&e.push(n+"='"+t.edit.row[n]+"'");d.update=" SET "+e.join(", ")+" WHERE "+a.id+"="+t.edit.row[a.id]}if("remove"===t.action){const e=[];for(let n in t.edit.row)"$"!==n&&n!==a.id&&e.push(n+" = '"+t.edit.row[n]+"'");d.remove=" WHERE "+a.id+"="+t.edit.row[a.id]}if("add"===t.action){const e=[],a=[];for(let n in t.edit.row)"$"!==n&&(a.push(n),e.push("'"+t.edit.row[n]+"'"));d.add=" ("+a.join(", ")+") VALUES ("+e.join(", ")+")"}"expand"===t.action?(a.groupDataField?d.where?d.where+=" AND "+a.groupDataField+" = '"+i[a.groupDataField]+"'":d.where=" WHERE "+a.groupDataField+" = '"+i[a.groupDataField]+"'":a.keyDataField&&a.parentDataField?d.where?d.where+=" AND "+a.parentDataField+" = "+i[a.keyDataField]:d.where=" WHERE "+a.parentDataField+" = "+i[a.keyDataField]:d.where?d.where+=" AND "+i.groupDataField+" = '"+i.label+"'":d.where=" WHERE "+i.groupDataField+" = '"+i.label+"'",d.limit="",d.groupBy="",a.virtualDataSourceOnExpand(o,{first:n,last:r,row:t.row,sorting:t.sorting,filtering:t.filtering,grouping:t.grouping,action:t.action,query:d})):a.virtualDataSource(o,{first:n,last:r,sorting:t.sorting,filtering:t.filtering,filterOperator:t.filterOperator||"and",grouping:t.grouping,action:t.action,query:d})}else e()}add(e,t){const a=this;if(!e)return;let n=!0;const r=function(e){const r=a._getDataItem(e,a.boundSource.length);if(a.dataItemById[r.$.id])return void 0!==t&&(r.$.parentId=t),null;a[a.boundSource.length]=r,a.dataItemById[r.$.id]=r;const i=a.boundSource.push(r);return void 0!==t&&(r.$.parentId=t),i||(n=!1),r};if(e.length){let t=[];for(let a=0;a<e.length;a++){const n=r(e[a]);n&&t.push(n)}a._notify({action:"add",data:t})}else{const t=r(e);a._notify({action:"add",data:t})}return a.refreshHierarchy(),n}refreshIndexes(){const e=this;for(let t=0;t<e.boundSource.length;t++)e[t]=e.boundSource[t],e[t].$.index=t,e.dataItemById[e[t].$.id]=e[t];let t=e.boundSource.length;for(;e[t];)delete e[t],t++}removeLast(){const e=this;delete e[e.boundSource.length-1];const t=e.boundSource.pop();return delete e.dataItemById[t.$.id],e._notify({action:"removeLast",data:t}),e.refreshHierarchy(),t}remove(e){const t=this;let a=t.indexOf(e);-1===a&&e&&e.$&&(a=t.indexOf(t.dataItemById[e.$.id])),t.removeAt(a)}removeAt(e){const t=this,a=t.boundSource[e];if(!a)throw new Error("Invalid Item Index");t.boundSource.splice(e,1),delete t.dataItemById[a.$.id],t.refreshIndexes(),t._notify({action:"remove",index:e,data:a}),t.refreshHierarchy()}update(e,t){const a=this;if(Smart.Utilities.Types.isArray(e)&&Smart.Utilities.Types.isArray(t)&&0===e.length&&0===t.length)return void a.refreshHierarchy();if(t.length&&e.length){let n=[];for(let r=0;r<e.length;r++){const i=a._getDataItem(t[r],e[r]),o=e[r];n.push(i),a.boundSource[o]=i,a[o]=a.boundSource[o],a.dataItemById[i.$.id]=a[o]}return a._notify({action:"update",index:e,data:n}),void a.refreshHierarchy()}const n=a._getDataItem(t,e),r=a.boundSource[e].$.id;return n.$.id=r,a.boundSource[e]=n,a[e]=a.boundSource[e],a.dataItemById[n.$.id]=a[e],a._notify({action:"update",index:e,data:n}),a.refreshHierarchy(),n}insert(e,t){const a=this;if(t.length){const n=[];for(let r=0;r<t.length;r++){const i=a._getDataItem(t[r],e+r);n.push(i)}t=n}else t=a._getDataItem(t,e);const n=a.boundSource.splice(e,0,t);return a.refreshIndexes(),a._notify({action:"insert",index:e,data:t}),a.refreshHierarchy(),n}move(e,t){if(t>e&&t-e==1||e===t)return;const a=this,n=a.boundSource.splice(e,1)[0];t>e?(t--,a.boundSource.splice(t,0,n)):a.boundSource.splice(t,0,n),a.refreshIndexes(),a._notify({action:"move",index:t,data:a.boundSource[t]}),a.refreshHierarchy()}indexOf(e){return this.boundSource.indexOf(e)}get length(){const e=this;return void 0!==e.virtualDataSourceLength?e.virtualDataSourceLength:e.dataSourceLength?e.dataSourceLength:"number"==typeof e.dataSource?e.dataSource:e.bindingCompleted?e.boundSource.length:e.dataSource&&"string"!=typeof e.dataSource&&e.dataSource.length?e.dataSource.length:e.boundSource.length}clear(){const e=this;if(!e.isInitialized)return e._cachedValues=[],void(e.dataItemById=[]);for(let t=0;t<e.boundSource.length;t++)delete e[t];e._expandedRowIds=[],e._cachedValues=[],e.boundSource=e.observable?new Smart.ObservableArray:[],e.dataItemById=[],e.refreshHierarchy()}_getId(e,t,a){if(null===e||void 0===e.name||!e.name||!t.getAttribute){if(e&&e.toString().length>0&&t.getAttribute){let a=t.getAttribute(e);if(null!==a&&a.toString().length>0)return a.trim().split(" ").join("").replace(/([ #;?%&,.+*~\':'!^$[\]()=>|\/@])/g,"");{let a=e.split(this.mapChar);if(a.length>1){let e=t;for(let t=0;t<a.length;t++)void 0!==e&&(e=e[a[t]]);if(void 0!==e)return e}else if(void 0!==t[e])return t[e]}}return a}{let n=t.getAttribute(e.name);if(null!==n&&n.toString().length>0)return n;if(e.map)try{let a=t.getAttribute(e.map);if(null!==a&&a.toString().length>0)return a}catch(e){return a}}}_buildHierarchy(){const e=this;if(e.reservedNames){const t=e.reservedNames;t.leaf||(t.leaf="leaf"),t.parent||(t.parent="parent"),t.expanded||(t.expanded="expanded"),t.checked||(t.checked="checked"),t.selected||(t.selected="selected"),t.level||(t.level="level"),t.data||(t.data="data")}else e.reservedNames={leaf:"leaf",parent:"parent",expanded:"expanded",checked:"checked",selected:"selected",level:"level",icon:"icon",data:"data"};const t=e.reservedNames;if(e.childrenDataField){const a=[];for(let n=0;n<e.boundSource.length;n++){const r=Object.assign({},e.boundSource[n]);if(!r)continue;a.push(r);const i=function(a){const n=e.childrenDataField.split(e.mapChar);let r=null;if(n.length>1){let e=a;for(let t=0;t<n.length;t++)void 0!==e&&(e=e[n[t]]);r=e}else r=a.children;a.children=r,(null===a.children||void 0===a.children||a.children&&0===a.children.length)&&(a[t.leaf]=!0)};i(r),r[t.level]=0,r.$||(r.$={}),r[t.parent]=null,r[t.data]=r,void 0===r[t.expanded]&&(r[t.expanded]=!1,e.expandHierarchy&&(r[t.expanded]=!0));const o=function(a,n){if(n)for(let r=0;r<n.length;r++){let d=e._getDataItem(n[r],r);if(d){if(i(d),!e.id){const e=function(){const e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()};d.$.id=e()}d[t.level]=a[t.level]+1,d[t.parent]=a,d[t.data]=Object.assign({},d),a&&(a.children[r]=d),void 0===d[t.expanded]&&(d[t.expanded]=!1,e.expandHierarchy&&(d[t.expanded]=!0)),o(d,d.children)}}else a.children=new Array};o(r,r.children)}if(e.boundHierarchy=a,!e._boundSourceUpdate){for(let t=0;t<e.boundHierarchy.length;t++){const a=e.boundHierarchy[t];if(a.children){const t=function(a){if(e.dataItemById[a.$.id]||(e.boundSource.canNotify=!1,e.dataItemById[a.$.id]=a,e.boundSource.canNotify=!0),a.children)for(let e=0;e<a.children.length;e++){const n=a.children[e];n.children&&t(n)}};t(a)}}e._boundSourceUpdate=!0}}if(e.xmlRoot&&"xml"===e.dataSourceType&&(e.boundHierarchy=this._getHierarchy("uid","_parentuid","children",null,e.boundSource)),e.keyDataField&&e.parentDataField)return["keyDataField","parentDataField"].forEach((t=>{switch(e[t]){case"parent":e[t]="$"+e[t]}})),void(e.boundHierarchy=this._getHierarchy(e.keyDataField,e.parentDataField,"children",null,e.boundSource));e.groupBy&&e.groupBy.length>0?e.boundHierarchy=this._getGroupHierarchy(e.groupBy,"children","label",null,"data",null,"parent",e.boundSource):e.virtualDataSourceOnExpand&&(e.boundHierarchy=this._getHierarchy("id","parentId","children",null,e.boundSource))}_getGroupHierarchy(e,t,a,n,r,i,o,d,l){let s=this;l||(l=0);let c=s.reservedNames;const u=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()};let f=new Array;for(let t=0;t<e.length;t++)f[t]=u();t||(t="children"),a||(a="group"),r||(r="item"),o||(o="parent"),void 0===i&&(i="value");const h=new Array,p=new Array;let g=0;const S=function(e){let t=e;if(n)for(let e in n){const a=n[e];a.name&&a.map&&(t[a.map]=t[a.name])}return t};let y=!1;for(let n=0;n<d.length;n++){let m=Object.assign({},S(d[n]));m[c.leaf]=!1;let T=new Array,b=0;for(let t=0;t<e.length;t++){const a=e[t],n=m[a];null!=n?((""===n||void 0===n&&0===t)&&(y=!0),T[b++]={value:n,group:a,hash:f[t]}):(T[b++]={value:null,group:a,hash:f[t]},0===t&&(y=!0))}if(T.length!==e.length)break;let v=null,E="";for(let e=0;e<T.length;e++){const n=T[e].value,d=T[e].group;if(E=E+"_"+T[e].hash+"_"+n,void 0===p[E]||null===p[E]){if(null===v){v={$:{}},v[c.level]=0,v[c.leaf]=!1,v[o]=null,v[a]=n,v[r]=m,v.groupDataField=d,v[d]||(v[d]=v.data[d]),void 0!==m[c.expanded]?v[c.expanded]=m[c.expanded]:(v[c.expanded]=!1,s.expandHierarchy&&(v[c.expanded]=!0)),i&&(v[i]=m[i]),v[t]=new Array;let e=h.length+l;this.id&&"number"!=typeof m.$.id&&!isFinite(m.$.id)||(e="Item"+e),void 0===v.$.id&&(v.$.id=e),s._expandedRowIds[v.$.id]&&(v[c.expanded]=!0),h[g++]=v}else{const e={$:{}};e[c.level]=v[c.level]+1,e[o]=v,e[a]=n,e[t]=new Array,e[r]=m,e.groupDataField=d,e[c.leaf]=!1,e[d]||(e[d]=e.data[d]),void 0!==m[c.expanded]?e[c.expanded]=m[c.expanded]:(e[c.expanded]=!1,s.expandHierarchy&&(e[c.expanded]=!0)),i&&(e[i]=m[i]),void 0===e.$.id&&(e.$.id=v.$.id+"_"+v[t].length),s._expandedRowIds[e.$.id]&&(e[c.expanded]=!0),v[t][v[t].length]=e,v=e}p[E]=v}else v=p[E]}m&&(m[c.leaf]=!0),null!==v?(null===this.id?void 0===m.$.id&&(m.$.id=v.$.id+"_"+v[t].length):void 0===m.$.id&&-1===m.$.id.toString().indexOf(v.$.id)&&(m.$.id=v.$.id+"_"+m.$.id),m[o]=v,m[c.level]=v[c.level]+1,v[t][v[t].length]=m):void 0===m.$.id&&(m.$.id=u())}if(y){let e=null,t=!1;for(let a=0;a<h.length;a++){const n=h[a];if(!n[n.groupDataField]){e=n,e.$.id.toString().startsWith("Item")&&(t=!0),h.splice(a,1);break}}if(e&&(h.push(e),t))for(let e=0;e<h.length;e++){h[e].$.id="Item"+e}}return h}_getHierarchy(e,t,a,n,r){const i=this,o=new Array;let d=this.boundSource;if(r&&(d=r),0===this.boundSource.length)return null;const l=null!==a?a:"children";let s=new Array,c=d,u=c.length,f=i.reservedNames;const h=function(e){let t=e;if(n)for(let e in n){const a=n[e];a.name&&a.map&&(t[a.map]=t[a.name])}return t};for(let a=0;a<u;a++){let n=c[a],r=n[t],o=n[e];"parentId"===t&&(r=n.$.parentId),"id"===e&&(o=n.$.id),n[l]=new Array,i.expandHierarchy&&void 0===n[f.expanded]&&(n[f.expanded]=i.expandHierarchy),s[o]={parentId:r,item:n}}for(let a=0;a<u;a++){const n=c[a];let r=n[t],i=n[e];if("parentId"===t&&(r=n.$.parentId),"id"===e&&(i=n.$.id),void 0!==s[r]){let e={parentId:r,item:s[i].item},t=s[r].item;t[l]||(t[l]=new Array);let a=t[l].length;e=e.item,f?e[f.parent]=t:e.parent=t;const n=h(e);t[l][a]=n,s[r].item=t,s[i].item=e}else{let e=s[i].item;f?void 0===e[f.parent]&&(e[f.parent]=null):void 0===e.parent&&(e.parent=null);const t=h(e);f?t[f.level]=0:t.level=0,o[o.length]=t}}if(0!==o.length){let e=function(t,a){for(let n=0;n<a.length;n++){const r=a[n];f?r[f.level]=t:r.level=t;const o=r[l];o&&o.length>0?(r.leaf=!1,e(t+1,o)):i.virtualDataSourceOnExpand?void 0===r.leaf&&(r.leaf=!1):f?r[f.leaf]=!0:r.leaf=!0}};e(0,o)}return o}summarize(e,t){const a=this;Array.isArray(e)||(e=[e]);let n=[];for(let t=0;t<e.length;t++){const a=e[t];for(let e in a){const t=a[e];n.push({dataField:e,functions:t})}}e=n;let r={},i=new Array;t||(t=a.boundSource);let o=t.length,d=0;if(0!==o&&void 0!==o){for(let a=0;a<o;a++){let n=t[a];if((!n||!n.$||!1!==n.$.filtered)&&n){d++;for(let t=0;t<e.length;t++){const o=e[t];let d=n[o.dataField];if(o.functions&&o.functions.length>0){r[o.dataField]=r[o.dataField]||{},i[o.dataField]=i[o.dataField]||0,i[o.dataField]++;const e=function(e){for(let t in e){let a=r[o.dataField][t];null==a&&(r[o.dataField][t]=0,a=0),"function"==typeof e[t]&&(a=e[t](a,d,o.dataField,n)),r[o.dataField][t]=a}},t=d;let l=parseFloat(d);l=!isNaN(l),t&&t.toDate&&(l=!1),"string"==typeof d&&d.startsWith("+")&&(l=!1),l&&(d=parseFloat(d)),"number"==typeof d&&isFinite(d)?o.functions.forEach((function(t){let n=r[o.dataField][t];if(null==n&&(n=0,"min"===t&&(n=9999999999999),"max"===t&&(n=-9999999999999),"median"===t&&(n=[])),"sum"===t||"avg"===t||"stdev"===t||"stdevp"===t||"var"===t||"varp"===t)n+=parseFloat(d);else if("product"===t)0===a?n=parseFloat(d):n*=parseFloat(d);else if("min"===t)n=Math.min(n,parseFloat(d));else if("max"===t)n=Math.max(n,parseFloat(d));else if("count"===t)n++;else if("median"===t)n.push(parseFloat(d));else if("blank"===t)n=r[o.dataField][t],null==n&&(n=0),d||n++;else if("filled"===t)n=r[o.dataField][t],null==n&&(n=0),void 0!==d&&n++;else if("unique"===t)n=r[o.dataField][t],null==n&&(n=[]),-1===n.indexOf(d)&&n.push(d);else if("object"==typeof t)return void e(t);r[o.dataField][t]=n})):o.functions.forEach((function(t){if("min"===t||"max"===t||"count"===t||"product"===t||"sum"===t||"avg"===t||"stdev"===t||"stdevp"===t||"var"===t||"varp"===t){if(null===d)return!0;let e=r[o.dataField][t];return null==e&&(e=0),r[o.dataField][t]=e,!0}if("blank"===t){let e=r[o.dataField][t];null==e&&(e=0),d||e++,r[o.dataField][t]=e}else if("filled"===t){let e=r[o.dataField][t];null==e&&(e=0),d&&e++,r[o.dataField][t]=e}else if("unique"===t){let e=r[o.dataField][t];null==e&&(e=[]),-1===e.indexOf(d)&&e.push(d),r[o.dataField][t]=e}"object"==typeof t&&e(t)}))}}}}for(let a=0;a<e.length;a++){const n=e[a];if(n.functions&&(!n.functions||0!==n.functions.length)){if(r[n.dataField]||(r[n.dataField]={},n.functions.forEach((function(e){r[n.dataField][e]=0}))),void 0!==r[n.dataField].avg){const e=r[n.dataField].avg,t=i[n.dataField];r[n.dataField].avg=0===t||void 0===t?0:e/t}else void 0!==r[n.dataField].count&&(r[n.dataField].count=d);if(void 0!==r[n.dataField].unique){const e=r[n.dataField].unique;r[n.dataField].unique=e.length}if(void 0!==r[n.dataField].median){let e=r[n.dataField].median;e.sort((function(e,t){return e-t})),r[n.dataField].median=.5*(e[Math.floor((e.length+1)/2)-1]+e[Math.ceil((e.length+1)/2)-1])}(r[n.dataField].stdev||r[n.dataField].stdevp||r[n.dataField].var||r[n.dataField].varp)&&n.functions.forEach((function(e){if("stdev"===e||"var"===e||"varp"===e||"stdevp"===e){const a=r[n.dataField][e],i=o,d=a/o;let l=0;for(let e=0;e<o;e++){let a=t[e][n.dataField];l+=(a-d)*(a-d)}let s="stdevp"===e||"varp"===e?i:i-1;0===s&&(s=1),"var"===e||"varp"===e?r[n.dataField][e]=l/s:"stdevp"!==e&&"stdev"!==e||(r[n.dataField][e]=Math.sqrt(l/s))}}))}}return r}}_getDataItem(e,t){const a=this,n={},r="number"==typeof a.dataSource||a.dataSourceLength;if(!e)return{$:{id:t,isEmpty:!0,index:t}};if("string"==typeof e&&(e={"":e}),r){for(let e=0;e<a.dataFields.length;e++){n[(a.dataFields?a.dataFields[e]:{}).name]=""}return n.$={},n.$.id=t,n.$.index=t,n}const i=e;if(void 0!==i.expanded&&(n.expanded=i.expanded,"true"===i.expanded||!0===i.expanded||1===i.expanded?n.expanded=!0:n.expanded=!1),a.childrenDataField?void 0!==i[a.childrenDataField]&&(n.children=i[a.childrenDataField]):void 0!==i.children?n.children=i.children:void 0!==i.items&&(n.children=i.items),void 0!==i.leaf&&(n.leaf=i.leaf),void 0!==i.level&&(n.level=i.level),a.keyDataField&&void 0!==i[a.keyDataField]&&(n[a.keyDataField]=i[a.keyDataField]),a.parentDataField&&void 0!==i[a.parentDataField]&&(n[a.parentDataField]=i[a.parentDataField]),0===a.dataFields.length){const t=Object.getOwnPropertyNames(e);for(let e=0;e<t.length;e++)"$"!==t[e]&&a.dataFields.push({name:t[e],dataType:"string"})}for(let t=0;t<a.dataFields.length;t++){const r=a.dataFields?a.dataFields[t]:{};let o="";if(null==r)continue;if(e.length&&(o=e[t]),r.map){let e=r.map.split(a.mapChar);if(e.length>0){let t=i;for(let a=0;a<e.length;a++)i&&(t=t[e[a]]);o=t}else o=i[r.map]}null!=o?o=o.toString():void 0===o&&null!==o&&(o="");let d=!1;""===o&&(d=!0,o=e[r.name],void 0===r.dataType&&(r.dataType="any"),null!=o?"array"!==r.dataType&&("any"===r.dataType?o=Array.isArray(e[r.name])?[...e[r.name]]:"object"==typeof e[r.name]?Object.assign({},e[r.name]):e[r.name]:"date"!==r.dataType&&(o=o.toString())):o=void 0===o&&"any"===r.dataType?null:""),"[object Object]"===o&&r.map&&d&&(o=""),a._cachedValues[o+"_"+r.dataType]?o=a._cachedValues[o+"_"+r.dataType]:("bool"===r.dataType||"boolean"===r.dataType?"true"===o||"1"===o?o=!0:"false"!==o&&"0"!==o||(o=!1):"number"===r.dataType?(-1===o.indexOf(".")&&o.indexOf(",")>=0&&o.substring(1+o.indexOf(",")).length<3&&(o=o.replace(",",".")),o=a.$document.deserialize(""+o,r.dataType,!0)):"any"!==r.dataType&&(o=a.$document.deserialize(""+o,r.dataType,!0)),"any"!==r.dataType&&(a._cachedValues[o+"_"+r.dataType]=o)),"string"!==r.dataType&&"boolean"!==r.dataType&&"bool"!==r.dataType&&"any"!==r.dataType&&(isNaN(o)||o===-1/0||o===1/0)&&(o="date"===r.dataType||"number"===r.dataType?null:0),"parent"!==r.name&&"group"!==r.name&&"leaf"!==r.name&&"level"!==r.name?("string"===r.dataType&&/<.+?>/.test(o)&&o.replace&&("all"===a.sanitizeHTML?o=o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;"):"blackList"===a.sanitizeHTML&&(o=window.Smart.Utilities.Core.sanitizeHTML(o))),n[r.name]=o):n.$[r.name]=o}let o=t;if(a.id)o=i[a.id],"object"==typeof o&&(o=t),i.$&&void 0!==i.$.id&&(o=i.$.id);else if(!a.virtualDataSource&&a.dataItemById&&a.dataItemById[o])for(o=a.length;a.dataItemById[o];)o++;return n.$||(n.$={}),n.$.id=o,n.$.index=t,new Object(n)}_bindToArray(){const e=this,t="number"==typeof e.dataSource||e.dataSourceLength,a=[];e.boundSource.canNotify=!1;const n=t?"number"==typeof e.dataSource?e.dataSource:e.dataSource.length:e.observable?e.length:e.dataSource.length;for(let r=0;r<n;r++){const n=t?{}:e.dataSource[r],i=e._getDataItem(n,r);a.push(i)}if(t&&e.dataSourceLength&&e.dataSource.length>0)for(let t=0;t<e.dataSource.length;t++){const n=e.dataSource[t].cell,r=e.dataSource[t].value,i=n.replace(/[^0-9]/g,""),o=n.replace(/[0-9]/g,"");a[i-1][o]=r}e.boundSource=!1===e.observable||e.virtualDataSource?[]:new Smart.ObservableArray(a),e.observable&&(e.boundSource=new Smart.ObservableArray(a));for(let t=0;t<n;t++)e.observable?e[t]=e.boundSource[t]:e[t]=a[t],e.dataItemById[e[t].$.id]=e[t];!1===e.observable&&(e.boundSource=a),e.boundSource.canNotify=!0}_bindToICS(){const e=this,t=""+e.dataSource,a=e.rowDelimiter||"\n",n=t.split("\r"),r=[];let i=t.split(a),o=i.length;1===o&&n.length>1&&(i=n,o=i.length);const d=function(e,t){var a=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z)?$/.exec(e);if(!a)throw new Error("Invalid UNTIL value: "+e);return t?new Date(a[1],a[2]-1,a[3],0,0,0,0):new Date(Date.UTC(a[1],a[2]-1,a[3],a[5]||0,a[6]||0,a[7]||0))};for(let e=0;e<o;e++){const t=i[e].trim();if(t.indexOf("BEGIN:VEVENT")>=0)var l={};else if(l)if(t.indexOf("BEGIN:VALARM")>=0)var s={};else{if(s){if(t.indexOf("ACTION")>=0){s.ACTION=t.substring(t.indexOf("ACTION")+7);continue}if(t.indexOf("DESCRIPTION")>=0){s.DESCRIPTION=t.substring(t.indexOf("DESCRIPTION")+12);continue}if(t.indexOf("TRIGGER")>=0){s.TRIGGER=t.substring(t.indexOf("TRIGGER")+8);continue}if(t.indexOf("END:VALARM")>=0){l.ALARM||(l.ALARM=[]),l.ALARM.push(s),s=void 0;continue}}if(t.indexOf("SUMMARY")>=0)l.SUMMARY=t.substring(t.indexOf("SUMMARY")+8);else if(t.indexOf("LOCATION")>=0)l.LOCATION=t.substring(t.indexOf("LOCATION")+9);else if(t.indexOf("DESCRIPTION")>=0)l.DESCRIPTION=t.substring(t.indexOf("DESCRIPTION")+12);else if(t.indexOf("RRULE")>=0)l.RRULE=t.substring(t.indexOf("RRULE")+6);else if(t.indexOf("RECURRENCE-ID")>=0)l.RECURRENCEID=t.substring(t.indexOf("RECURRENCE-ID")+14);else if(t.indexOf("RECURRENCE-ID;VALUE=DATE")>=0)l.RECURRENCEID=t.substring(t.indexOf("RECURRENCE-ID;VALUE=DATE")+25);else if(t.indexOf("EXDATE;VALUE=DATE")>=0){const e=t.substring(t.indexOf("EXDATE;VALUE=DATE")+20);l.EXDATE=e}else if(t.indexOf("EXDATE")>=0){const e=t.substring(t.indexOf("EXDATE")+7);l.EXDATE=e}else t.indexOf("DTEND;VALUE=DATE")>=0?l.DTEND=d(t.substring(t.indexOf("DTEND;VALUE=DATE")+17),!0):t.indexOf("DTEND")>=0?l.DTEND=d(t.substring(t.indexOf("DTEND")+6)):t.indexOf("DTSTART;VALUE=DATE")>=0?l.DTSTART=d(t.substring(t.indexOf("DTSTART;VALUE=DATE")+19),!0):t.indexOf("DTSTART")>=0?l.DTSTART=d(t.substring(t.indexOf("DTSTART")+8)):t.indexOf("UID")>=0?l.uid=l.UID=t.substring(t.indexOf("UID")+4):t.indexOf("STATUS")>=0?l.STATUS=t.substring(t.indexOf("STATUS")+7):t.indexOf("TITLE")>=0?l.TITLE=t.substring(t.indexOf("TITLE")+6):t.indexOf("CATEGORIES")>=0?l.CATEGORIES=t.substring(t.indexOf("CATEGORIES")+11):t.indexOf("END:VEVENT")>=0&&(r.push(l),l.ALARM&&(l.ALARM=JSON.stringify(l.ALARM)),s=void 0)}}e.canNotify=!1,e.dataSource=r,e.canNotify=!0,e._bindToArray()}_bindToJSON(){const e=this,t=[],a=e.dataSource.length?e.dataSource:Object.entries(e.dataSource);e.boundSource.canNotify=!1;for(let n=0;n<a.length;n++){const r=a[n],i=e._getDataItem(r,n);t.push(i)}e.boundSource=!1===e.observable||e.virtualDataSource?[]:new Smart.ObservableArray(t);for(let t=0;t<e.length;t++)e[t]=e.boundSource[t],e.dataItemById[e[t].$.id]=e[t];!1===e.observable&&(e.boundSource=t),e.boundSource.canNotify=!0}sortBy(e,t,a){const n=this;if(!t)for(let a=0;a<n.dataFields.length;a++){const r=n.dataFields[a];if(r.name===e){t=r.dataType;break}}if(n.boundHierarchy){if((!e||0===e.length)&&n.groupBy.length>0)return void n.refreshHierarchy();const r=(e=>{let t=[];for(;e;){t=t.concat(e);for(let a=0;a<e.length;a++)e[a].children&&(t=t.concat(e[a].children));e=e.children}return t})(n.boundHierarchy);if(r){r.find((e=>{if(e.summaryRow)return e}))&&n.refreshHierarchy()}const i=function(r){n._sort(r,e,a,t);for(let n=0;n<r.length;n++){const o=r[n];o.children&&i(o.children,e,a,t)}};i(n.boundHierarchy)}else n._sort(n.boundSource,e,a,t)}_createFilter(e,t){const a={"=":"EQUAL","<>":"NOT_EQUAL","!=":"NOT_EQUAL",not_like:"DOES_NOT_CONTAIN",like:"CONTAINS","<":"LESS_THAN",">":"GREATER_THAN","<=":"LESS_THAN_OR_EQUAL",">=":"GREATER_THAN_OR_EQUAL",equal:"EQUAL","not equal":"NOT_EQUAL","less than":"LESS_THAN","greater than":"GREATER_THAN","greater than or equal":"GREATER_THAN_OR_EQUAL","less than or equal":"LESS_THAN_OR_EQUAL","starts with":"STARTS_WITH","ends with":"ENDS_WITH",notEqual:"NOT_EQUAL",not_equal:"NOT_EQUAL",lessThan:"LESS_THAN",greaterThan:"GREATER_THAN",greaterThanOrEqual:"GREATER_THAN_OR_EQUAL",lessThanOrEqual:"LESS_THAN_OR_EQUAL",less_than:"LESS_THAN",greater_than:"GREATER_THAN",greater_than_or_equal:"GREATER_THAN_OR_EQUAL",less_than_or_equal:"LESS_THAN_OR_EQUAL",null:"null","":"EMPTY",isblank:"EMPTY",isnotblank:"NOT_EMPTY",isBlank:"EMPTY",isNotBlank:"NOT_EMPTY",contains:"CONTAINS",does_not_contain:"DOES_NOT_CONTAIN","not contains":"DOES_NOT_CONTAIN",notcontains:"DOES_NOT_CONTAIN",notContains:"DOES_NOT_CONTAIN",startswith:"STARTS_WITH",endswith:"ENDS_WITH",starts_with:"STARTS_WITH",ends_with:"ENDS_WITH",startsWith:"STARTS_WITH",endsWith:"ENDS_WITH",NULL:"NULL",NOT_NULL:"NOT_NULL"};let n=[];for(let e=0;e<t.length;e++){const a=t[e],r=-1===a.indexOf('"')?a.split(" "):a.split('"');let i=[];for(let e=0;e<r.length;e++){const t=r[e];""!==t&&i.push(t.trim())}n.push(i)}const r=new Smart.FilterGroup,i=[],o=[];for(let t=0;t<n.length;t++){const r=n[t];if(r.length>1){const t=new Smart.FilterGroup;let n="and",i=0;for(let o=0;o<r.length;o++){const d=r[o];if("and"!==d&&"or"!==d){if(i++,2===i){const l=t.createFilter(e,d,a[r[o-1]]);i=0,n&&t.addFilter(n,l)}}else n=d}o.push(t)}else{const e=r[0];if("and"!==e&&"or"!==e)throw new Error('Filter Exprresion expects "AND" or "OR", but the token is: '+e);i.push(e)}}let d=0;if(1===o.length)return o[0];for(let e=0;e<o.length;e++){let t=i[d];(e+1)%2==0&&d++,t||(t="and"),r.addFilter(t,o[e])}return r}filterBy(e,...t){const a=this,n=(()=>{for(let t=0;t<a.dataFields.length;t++){const n=a.dataFields[t];if(n.name===e)return n.dataType}})(),r=a._createFilter(n,t);return a.boundSource.filter((t=>r.evaluate(t[e])))}_filter(e,t="and"){const a=this,n=[],r=[];if(0===e.length)return void a.clearFilter();const i=e=>{for(let t=0;t<a.dataFields.length;t++){const n=a.dataFields[t];if(n.name===e)return n.dataType}};let o,d;"and"===t?(o=!0,d=function(e,t,a){return e&&t.evaluate(a[t.dataField])}):(o=!1,d=function(e,t,a){return e||t.evaluate(a[t.dataField])});for(let t=0;t<e.length;t++){const o=e[t],d=o[0];let l=null;l=o[1]instanceof Smart.FilterGroup?o[1]:a._createFilter(i(d),o.splice(1)),l&&(r.push(d),l.dataField=d,n.push(l))}if(a.boundHierarchy){const e=function(e){let t=o;for(let a=0;a<n.length;a++){const r=n[a];t=d(t,r,e)}return e.$.filtered=t,t},t=function(n,r,i){let o=0;for(let a=0;a<n.length;a++){const i=n[a];e(i),i.$.filtered&&o++,i.children&&t(i.children,i,r)}o>0&&a.groupBy.length>0&&r?(r.$.filtered=!0,i&&!i.$.filtered&&(i.$.filtered=!0)):o>0&&o!==n.length&&r?(r.$.filtered=null,i&&!i.$.filtered&&(i.$.filtered=null)):o>0&&o===n.length&&r&&(r.$.filtered=!0,i&&!i.$.filtered&&(i.$.filtered=!0))};t(a.boundHierarchy,null,null)}else for(let e=0;e<a.boundSource.length;e++){const t=a.boundSource[e];let r=o;for(let e=0;e<n.length;e++){const a=n[e];r=d(r,a,t)}t.$.filtered=r}a.onFilter&&a.onFilter()}clearGroup(){const e=this;e.groupBy=[],e.boundHierarchy=null,e.refreshHierarchy(),e.onGroup&&e.onGroup()}clearFilter(){const e=this;for(let t=0;t<e.boundSource.length;t++){e.boundSource[t].$.filtered=!0}if(e.boundHierarchy){const t=function(e,a,n){for(let n=0;n<e.length;n++){const r=e[n];r.$.filtered=!0,r.$.filtered,r.children&&t(r.children,r,a)}a&&(a.$.filtered=!0,n&&!n.$.filtered&&(n.$.filtered=!0))};t(e.boundHierarchy,null,null)}e.onFilter&&e.onFilter()}clearSort(){this._sort(this.boundSource,[],[],[])}_sort(e,t,a,n,r,i){const o=this;let d=!1;if(0===e.length)return;if(e&&e.constructor&&e instanceof Smart.ObservableArray&&(d=!0),(!e||!Array.isArray(e)||0===e.length||!t||Array.isArray(t)&&0===t.length)&&!d&&!o.boundHierarchy)throw new Error("sort: Missing or Invalid arguments!");"string"==typeof t&&(t=[t]);const l=[],s=[];void 0===a&&(a=[]);const c=function(e,t){let a;switch(t||typeof e){case"string":a=(new Intl.Collator).compare;break;case"number":case"int":case"bigInt":case"float":case"double":a=function(e,t){return e-t};break;case"boolean":case"bool":a=function(e,t){return e===t?0:!1===e?-1:1};break;case"date":case"time":case"dateTime":a=e instanceof Date?function(e,t){return e||t?e?t?e.getTime()-t.getTime():1:-1:0}:e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber?function(e,t){return e.compare(t)}:function(e,t){return e-t};break;case"object":if(e instanceof Date)a=function(e,t){return e||t?e?t?e.getTime()-t.getTime():1:-1:0};else if(e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber)a=function(e,t){return e.compare(t)};else if(e instanceof Smart.Utilities.Complex||window.NIComplex&&e instanceof window.NIComplex){const e=new Smart.Utilities.ComplexNumericProcessor;a=function(t,a){return e.compareComplexNumbers(t,a)}}}return a};for(let r=0;r<t.length;r++){void 0===a[r]||"asc"===a[r]||"ascending"===a[r]?l[r]=1:l[r]=-1;let o=e[0][t[r]];if(void 0===o&&e[0]&&e[0].children&&e[0].data&&(o=e[0].data[t[r]]),i&&i){const e=t[r];if(i[e]){s[r]=i[e];continue}}s[r]=c(o,n[r])}t.length>0&&r?r(e,t,a,s):e.sort((function(e,a){for(let n=0;n<t.length;n++){const r=s[n](e[t[n]],a[t[n]]);if(0===r){if(t[n+1])continue;return void 0!==e.$.index?(e.$.index-a.$.index)*l[n]:0}return r*l[n]}if(0===t.length)return e.$.index<a.$.index?-1:e.$.index>a.$.index?1:0}));for(let t=0;t<e.length;t++)o[t]=e[t]}static Filter(e,t,a,n,r="and"){let i,o;"and"===r?(i=!0,o=function(e,t,a,r){return n?e&&n(t,a,r):e&&r.evaluate(t[a])}):(i=!1,o=function(e,t,a,r){return n?e||n(t,a,r):e||r.evaluate(t[a])});return e.filter((e=>{let n=i;for(let r=0;r<a.length;r++){const i=a[r],d=t[r];n=o(n,e,d,i)}return n}))}filter(e,t,a){Smart.DataAdapter.Filter(this.boundSource,e,t,a)}sort(e,t,a){Smart.DataAdapter.Sort(this.boundSource,e,t,a)}static Sort(e,t,a,n){const r=function(e){let t;switch(typeof e){case"string":if(e.indexOf("-")>=0||e.indexOf("/")>=0){const t=new Date(e);if(t&&"Invalid Date"!==t.toString()){return function(e,t){const a=new Date(e),n=new Date(t);return a||n?a?n?a.getTime()-n.getTime():1:-1:0}}}t=(new Intl.Collator).compare;break;case"number":t=function(e,t){return e-t};break;case"boolean":t=function(e,t){return e===t?0:!1===e?-1:1};break;case"object":if(e instanceof Date)t=function(e,t){return e||t?e?t?e.getTime()-t.getTime():1:-1:0};else if(e instanceof Smart.Utilities.DateTime||e instanceof BigNumberNG)t=function(e,t){return e.compare(t)};else if(e instanceof Smart.Utilities.Complex||window.NIComplex&&e instanceof window.NIComplex){const e=new Smart.Utilities.ComplexNumericProcessor;t=function(t,a){return e.compareComplexNumbers(t,a)}}}return t};if(!e||!Array.isArray(e)||0===e.length||!t||Array.isArray(t)&&0===t.length)return;"string"==typeof t&&(t=[t]);const i=[],o=[];void 0===a&&(a=[]);for(let n=0;n<t.length;n++)void 0===a[n]||"asc"===a[n]||"ascending"===a[n]?i[n]=1:i[n]=-1,o[n]=r(e[0][t[n]]);if(n)return void n(e,t,a,o);const d=e.slice(0);return d.sort((function(e,a){for(let n=0;n<t.length;n++){const r=o[n](e[t[n]],a[t[n]]);if(0===r){if(t[n+1])continue;return void 0!==e._index?(e._index-a._index)*i[n]:0}return r*i[n]}})),d}};class e{constructor(e,t){const a=this;a.config=e,a.callback=t,!1!==e.autoFetch&&a.call(e)}call(e){const t=this;e||(e=t.config);let a="GET",n=e.url,r=null,i=!0;if(e.type&&(a=e.type),e.data)if("GET"===a){n+="?";for(let t in e.data)Object.prototype.hasOwnProperty.call(e.data,t)&&(n+=encodeURI(t+"="+e.data[t]+"&"));"&"===n.charAt(n.length-1)&&(n=n.slice(0,n.length-1))}else"POST"===a&&(r=JSON.stringify(e.data));e&&!1===e.async&&"xlsx"!==e.dataSourceType&&(i=!1),void 0!==window.fetch&&i?t.ajaxFetch(e,a,n,r):t.ajaxXMLHttpRequest(e,a,n,r,i)}ajaxFetch(e,t,a,n){const r=this,i={method:t};let o,d,l,s;switch(e.dataSourceType){case"json":o="json";break;case"xlsx":o="arrayBuffer";break;default:o="text"}if(e&&e.contentType&&(i.headers=new Headers({"Content-Type":e.contentType})),null!==n&&(i.body=n),e.timeout&&(l=setTimeout((function(){s=!0}),e.timeout)),e.beforeSend){if(!1===e.beforeSend(i,e))return}fetch(a,i).then((function(e){if(s)throw d=408,new Error("timeout");if(l&&clearTimeout(l),d=e.status,!e.ok)throw new Error(e.statusText);return e[o]()})).then((function(t){if("arrayBuffer"===o)return JSZip.loadAsync(t).then((function(t){return t.files["xl/worksheets/sheet1.xml"].async("text").then((function(a){return t.files["xl/sharedStrings.xml"].async("text").then((function(t){const n=r.parseXLSXData(a,t);r.ajaxComplete(e,n,d)}))}))}));r.ajaxComplete(e,t,d)})).catch((function(t){"JSZip is not defined"===t.message&&(t.message="JSZip is not defined. Please include a reference to JSZip to be able to load data from XLSX files."),e&&e.loadError&&e.loadError(d,t),r.callback&&r.callback(t,d)}))}ajaxXMLHttpRequest(e,t,a,n,r){const i=new XMLHttpRequest,o=this;if(i.open(t,a,r),i.ontimeout=function(){e&&e.loadError&&e.loadError(408,"timeout")},i.onload=function(){if(4===i.readyState){const t=i.status;let a=i.response;t>=200&&t<=299?("json"===e.dataSourceType&&(a=JSON.parse(a)),o.ajaxComplete(e,a,t)):e&&e.loadError&&e.loadError(t,a)}},i.onerror=function(){e&&e.loadError&&e.loadError(i.status,i.response)},e&&e.contentType&&i.setRequestHeader("Content-Type",e.contentType),r&&e.timeout&&(i.timeout=e.timeout),e.beforeSend){if(!1===e.beforeSend(i,e))return}i.send(n)}ajaxComplete(e,t,a){if(e){if(e.beforeLoadComplete){const a=e.beforeLoadComplete(t);a&&(t=a)}e.loadComplete&&e.loadComplete(t,a),this.callback&&this.callback(t,a)}}parseXLSXData(e,t){const a=new DOMParser,n=a.parseFromString(t,"text/xml"),r=Array.from(n.getElementsByTagName("si")),i=[],o=a.parseFromString(e,"text/xml"),d=Array.from(o.getElementsByTagName("row")),l=[];return r.forEach((function(e){let t=e.getElementsByTagName("t");if(1===t.length)i.push(t[0].innerHTML);else{let e="";t=Array.from(t),t.forEach((function(t){e+=t.innerHTML})),i.push(e)}})),d.forEach((function(e){const t={};Array.from(e.getElementsByTagName("c")).forEach((function(e){const a=e.getAttribute("r").match(/\D+/)[0],n=e.getAttribute("t"),r=e.getElementsByTagName("v")[0].innerHTML;let o;switch(n){case"s":o=i[parseFloat(r)];break;case"b":o=1===parseFloat(r);break;default:o=parseFloat(r)}t[a]=o})),l.push(t)})),l}}Smart.Ajax=window.Ajax=e})();
776
776
 
777
777
  /***/ }),
778
778
 
779
779
  /***/ 2052:
780
780
  /***/ (() => {
781
781
 
782
- (()=>{const e=-1*(new Date).getTimezoneOffset(),t=[{id:"Local",offset:e,offsetHours:e/60,displayName:"",supportsDaylightSavingTime:!1},{id:"Dateline Standard Time",offset:-720,offsetHours:-12,displayName:"(UTC-12:00) International Date Line West",supportsDaylightSavingTime:!1},{id:"UTC-11",offset:-660,offsetHours:-11,displayName:"(UTC-11:00) Coordinated Universal Time-11",supportsDaylightSavingTime:!1},{id:"Hawaiteratoran Standard Time",offset:-600,offsetHours:-10,displayName:"(UTC-10:00) Hawaiterator",supportsDaylightSavingTime:!1},{id:"Alaskan Standard Time",offset:-540,offsetHours:-9,displayName:"(UTC-09:00) Alaska",supportsDaylightSavingTime:!0},{id:"Pacific Standard Time (Mexico)",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Baja California",supportsDaylightSavingTime:!0},{id:"Pacific Standard Time",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Pacific Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"US Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Arizona",supportsDaylightSavingTime:!1},{id:"Mountain Standard Time (Mexico)",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",supportsDaylightSavingTime:!0},{id:"Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Mountain Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"Central America Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central America",supportsDaylightSavingTime:!1},{id:"Canada Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Saskatchewan",supportsDaylightSavingTime:!1},{id:"Central Standard Time (Mexico)",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",supportsDaylightSavingTime:!0},{id:"SA Pacific Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Bogota, Lima, Quito, Rio Branco",supportsDaylightSavingTime:!1},{id:"Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Eastern Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"US Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Indiana (East)",supportsDaylightSavingTime:!0},{id:"Venezuela Standard Time",offset:-270,offsetHours:-4.5,displayName:"(UTC-04:30) Caracas",supportsDaylightSavingTime:!1},{id:"Atlantic Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Atlantic Time (Canada)",supportsDaylightSavingTime:!0},{id:"Paraguay Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Asuncion",supportsDaylightSavingTime:!0},{id:"Central Brazilian Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Cuiaba",supportsDaylightSavingTime:!0},{id:"Pacific SA Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Santiago",supportsDaylightSavingTime:!0},{id:"SA Western Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan",supportsDaylightSavingTime:!1},{id:"Newfoundland Standard Time",offset:-210,offsetHours:-3.5,displayName:"(UTC-03:30) Newfoundland",supportsDaylightSavingTime:!0},{id:"SA Eastern Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Cayenne, Fortaleza",supportsDaylightSavingTime:!1},{id:"Argentina Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Buenos Aires",supportsDaylightSavingTime:!0},{id:"E. South America Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Brasilia",supportsDaylightSavingTime:!0},{id:"Bahia Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Salvador",supportsDaylightSavingTime:!0},{id:"Montevideo Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Montevideo",supportsDaylightSavingTime:!0},{id:"Greenland Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Greenland",supportsDaylightSavingTime:!0},{id:"UTC-02",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Coordinated Universal Time-02",supportsDaylightSavingTime:!1},{id:"Mid-Atlantic Standard Time",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Mid-Atlantic - Old",supportsDaylightSavingTime:!0},{id:"Azores Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Azores",supportsDaylightSavingTime:!0},{id:"Cape Verde Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Cape Verde Is.",supportsDaylightSavingTime:!1},{id:"Morocco Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Casablanca",supportsDaylightSavingTime:!0},{id:"UTC",offset:0,offsetHours:0,displayName:"(UTC) Coordinated Universal Time",supportsDaylightSavingTime:!1},{id:"GMT Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Dublin, Edinburgh, Lisbon, London",supportsDaylightSavingTime:!0},{id:"Greenwich Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Monrovia, Reykjavik",supportsDaylightSavingTime:!1},{id:"Central European Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",supportsDaylightSavingTime:!0},{id:"Namibia Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Windhoek",supportsDaylightSavingTime:!0},{id:"W. Central Africa Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) West Central Africa",supportsDaylightSavingTime:!1},{id:"W. Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",supportsDaylightSavingTime:!0},{id:"Central Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague",supportsDaylightSavingTime:!0},{id:"Romance Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",supportsDaylightSavingTime:!0},{id:"FLE Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",supportsDaylightSavingTime:!0},{id:"South Africa Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Harare, Pretoria",supportsDaylightSavingTime:!1},{id:"Turkey Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Istanbul",supportsDaylightSavingTime:!0},{id:"GTB Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Athens, Bucharest",supportsDaylightSavingTime:!0},{id:"Libya Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Tripoli",supportsDaylightSavingTime:!0},{id:"E. Europe Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) E. Europe",supportsDaylightSavingTime:!0},{id:"Jordan Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Amman",supportsDaylightSavingTime:!0},{id:"Middle East Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Beirut",supportsDaylightSavingTime:!0},{id:"Egypt Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Cairo",supportsDaylightSavingTime:!0},{id:"Syria Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Damascus",supportsDaylightSavingTime:!0},{id:"Israel Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Jerusalem",supportsDaylightSavingTime:!0},{id:"Arab Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kuwait, Riyadh",supportsDaylightSavingTime:!1},{id:"E. Africa Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Nairobi",supportsDaylightSavingTime:!1},{id:"Arabic Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Baghdad",supportsDaylightSavingTime:!0},{id:"Kaliningrad Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kaliningrad, Minsk",supportsDaylightSavingTime:!0},{id:"Iran Standard Time",offset:210,offsetHours:3.5,displayName:"(UTC+03:30) Tehran",supportsDaylightSavingTime:!0},{id:"Mauritius Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Port Louis",supportsDaylightSavingTime:!0},{id:"Georgian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Tbilisi",supportsDaylightSavingTime:!1},{id:"Caucasus Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Yerevan",supportsDaylightSavingTime:!0},{id:"Arabian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Abu Dhabi, Muscat",supportsDaylightSavingTime:!1},{id:"Azerbaijan Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Baku",supportsDaylightSavingTime:!0},{id:"Russian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Moscow, St. Petersburg, Volgograd",supportsDaylightSavingTime:!0},{id:"Afghanistan Standard Time",offset:270,offsetHours:4.5,displayName:"(UTC+04:30) Kabul",supportsDaylightSavingTime:!1},{id:"Pakistan Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Islamabad, Karachi",supportsDaylightSavingTime:!0},{id:"West Asia Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Ashgabat, Tashkent",supportsDaylightSavingTime:!1},{id:"India Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",supportsDaylightSavingTime:!1},{id:"Sri Lanka Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Sri Jayawardenepura",supportsDaylightSavingTime:!1},{id:"Nepal Standard Time",offset:345,offsetHours:5.75,displayName:"(UTC+05:45) Kathmandu",supportsDaylightSavingTime:!1},{id:"Central Asia Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Astana",supportsDaylightSavingTime:!1},{id:"Bangladesh Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Dhaka",supportsDaylightSavingTime:!0},{id:"Ekaterinburg Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Ekaterinburg",supportsDaylightSavingTime:!0},{id:"Myanmar Standard Time",offset:390,offsetHours:6.5,displayName:"(UTC+06:30) Yangon (Rangoon)",supportsDaylightSavingTime:!1},{id:"SE Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Bangkok, Hanoi, Jakarta",supportsDaylightSavingTime:!1},{id:"N. Central Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Novosibirsk",supportsDaylightSavingTime:!0},{id:"Ulaanbaatar Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Ulaanbaatar",supportsDaylightSavingTime:!1},{id:"China Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",supportsDaylightSavingTime:!1},{id:"Singapore Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Kuala Lumpur, Singapore",supportsDaylightSavingTime:!1},{id:"North Asia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Krasnoyarsk",supportsDaylightSavingTime:!0},{id:"Taipei Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Taipei",supportsDaylightSavingTime:!1},{id:"W. Australia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Perth",supportsDaylightSavingTime:!0},{id:"Korea Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Seoul",supportsDaylightSavingTime:!1},{id:"North Asia East Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Irkutsk",supportsDaylightSavingTime:!0},{id:"Tokyo Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Osaka, Sapporo, Tokyo",supportsDaylightSavingTime:!1},{id:"AUS Central Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Darwin",supportsDaylightSavingTime:!1},{id:"Cen. Australia Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Adelaide",supportsDaylightSavingTime:!0},{id:"West Pacific Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Guam, Port Moresby",supportsDaylightSavingTime:!1},{id:"Tasmania Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Hobart",supportsDaylightSavingTime:!0},{id:"E. Australia Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Brisbane",supportsDaylightSavingTime:!1},{id:"AUS Eastern Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Canberra, Melbourne, Sydney",supportsDaylightSavingTime:!0},{id:"Yakutsk Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Yakutsk",supportsDaylightSavingTime:!0},{id:"Vladivostok Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Vladivostok",supportsDaylightSavingTime:!0},{id:"Central Pacific Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Solomon Is., New Caledonia",supportsDaylightSavingTime:!1},{id:"Magadan Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Magadan",supportsDaylightSavingTime:!0},{id:"Kamchatka Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",supportsDaylightSavingTime:!0},{id:"Fiji Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Fiji",supportsDaylightSavingTime:!0},{id:"New Zealand Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Auckland, Wellington",supportsDaylightSavingTime:!0},{id:"UTC+12",offset:720,offsetHours:12,displayName:"(UTC+12:00) Coordinated Universal Time+12",supportsDaylightSavingTime:!1},{id:"Tonga Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Nuku'alofa",supportsDaylightSavingTime:!1},{id:"Samoa Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Samoa",supportsDaylightSavingTime:!0}],a=[0,31,59,90,120,151,181,212,243,273,304,334,365],s=[0,31,60,91,121,152,182,213,244,274,305,335,366];Smart.Utilities.Assign("TimeSpan",class{constructor(){const e=this;if(e.ticksPerMillisecond=1e4,e.millisecondsPerTick=1e-4,e.ticksPerSecond=1e7,e.secondsPerTick=1e-7,e.ticksPerMinute=6e8,e.minutesPerTick=1/6e8,e.ticksPerHour=36e9,e.hoursPerTick=1/36e9,e.ticksPerDay=864e9,e.daysPerTick=1/864e9,e.millisPerSecond=1e3,e.millisPerMinute=6e4,e.millisPerHour=36e5,e.millisPerDay=864e5,e._ticks=0,1===arguments.length){if(isNaN(arguments[0]))throw new Error("Argument must be a number.");e._ticks=arguments[0]}else if(3===arguments.length)e._ticks=e.timeToMS(arguments[0],arguments[1],arguments[2],0);else if(4===arguments.length){const t=1e3*(3600*arguments[0]*24+3600*arguments[1]+60*arguments[2]+arguments[3])+0;e._ticks=t*e.ticksPerMillisecond}else if(5===arguments.length){const t=1e3*(3600*arguments[0]*24+3600*arguments[1]+60*arguments[2]+arguments[3])+arguments[4];e._ticks=t*e.ticksPerMillisecond}}ticks(){return this._ticks}days(){return parseInt(this._ticks/this.ticksPerDay)}timeToMS(e,t,a,s){return parseInt((3600*e+60*t+a+s/1e3)*this.ticksPerSecond)}hours(){return parseInt(this._ticks/this.ticksPerHour)%24}milliseconds(){return parseInt(this._ticks/this.ticksPerMillisecond)%1e3}minutes(){return parseInt(this._ticks/this.ticksPerMinute)%60}seconds(){return parseInt(this._ticks/this.ticksPerSecond)%60}totalDays(){return parseInt(this._ticks*this.daysPerTick)}totalHours(){return parseInt(this._ticks*this.hoursPerTick)}totalMilliseconds(){const e=this._ticks*this.millisecondsPerTick;return parseInt(e)}totalMinutes(){return parseInt(this._ticks*this.minutesPerTick)}totalSeconds(){return parseInt(this._ticks*this.secondsPerTick)}add(e){const t=this._ticks+e._ticks;return new Smart.Utilities.TimeSpan(t)}subtract(e){const t=this._ticks-e._ticks;return new Smart.Utilities.TimeSpan(t)}duration(){const e=this;return e._ticks>=0?new Smart.Utilities.TimeSpan(e._ticks):new Smart.Utilities.TimeSpan(-e._ticks)}equals(e){return this._ticks===e._ticks}valueOf(){return this._ticks}compare(e,t){return e._ticks>t._ticks?1:e._ticks<t._ticks?-1:0}interval(e,t){const a=e*t+(e>=0?.5:-.5);return new Smart.Utilities.TimeSpan(a*this.ticksPerMillisecond)}fromDays(e){return this.interval(e,this.millisPerDay)}fromHours(e){return this.interval(e,this.millisPerHour)}fromMilliseconds(e){return this.interval(e,1)}fromMinutes(e){return this.interval(e,this.millisPerMinute)}fromSeconds(e){return this.interval(e,this.millisPerSecond)}fromTicks(e){return new Smart.Utilities.TimeSpan(e)}toString(){return this.totalMilliseconds().toString()}negate(){return new Smart.Utilities.TimeSpan(-this._ticks)}}),Smart.Utilities.Assign("DateTime",class{constructor(){function e(e){const t=i.regexISOString.exec(e);n=new Smart.Utilities.DateTime(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3]),parseFloat(t[4]),parseFloat(t[5]),parseFloat(t[6]),parseFloat(t[7]),0,0,0,0,0,0,0,"UTC")}const i=this;let n;if(i.ticksPerMillisecond=1e4,i.millisecondsPerTick=1e-4,i.ticksPerSecond=1e7,i.secondsPerTick=1e-7,i.ticksPerMinute=6e8,i.minutesPerTick=1/6e8,i.ticksPerHour=36e9,i.hoursPerTick=1/36e9,i.ticksPerDay=864e9,i.daysPerTick=1/864e9,i.millisPerSecond=1e3,i.millisPerMinute=6e4,i.millisPerHour=36e5,i.millisPerDay=864e5,i.daysPerYear=365,i.daysPer4Years=1461,i.daysPer100Years=36524,i.daysPer400Years=146097,i.daysTo1601=584388,i.daysTo1899=693593,i.daysTo10000=3652059,i.minTicks=0,i.maxTicks=3155378976e9,i.maxMillis=3155378976e5,i.datePartYear=0,i.datePartDayOfYear=1,i.datePartMonth=2,i.datePartDay=3,i.daysToMonth365=a,i.daysToMonth366=s,i.minValue=new Date(0),i.maxValue=new Date(3155378976e9),i.ticksMask=0x4000000000000000,i.flagsMask=0xc000000000000000,i.localMask=0x8000000000000000,i.ticksCeiling=0x4000000000000000,i.kindUnspecified=0,i.kindUtc=0x4000000000000000,i.kindLocal=0x8000000000000000,i.kindLocalAmbiguousDst=0xc000000000000000,i.kindShift=62,i.regexTrim=/^\s+|\s+$/g,i.regexInfinity=/^[+-]?infinity$/i,i.regexHex=/^0x[a-f0-9]+$/i,i.regexParseFloat=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,i.regexISOString=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{3})Z$/,i.calendar={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",ISO8601:"yyyy-MM-ddTHH:mm:ss.sssZ",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",FP:"yyyy-MM-dd HH:mm:ss:fff:uu:nn:pp:ee:aa:xx:oo",FPA:"yyyy/MM/dd HH:mm:ss:fffuunnppeeaaxxoo",FPA2:"yyyy-MM-dd HH:mm:ss:fffuunnppeeaaxxoo",FT:"HH:mm:ss:fff:uu:nn:pp:ee:aa:xx:oo",PP:"yyyy-MM-dd HH:mm:ss:fff:uu:nn:pp",PT:"HH:mm:ss:fff:uu:nn:pp"},percentsymbol:"%",currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:","},i.dateData=0,i.timeZone=null,i.timeZones=t,i._codeToUnit={u:"_microsecond",uu:"_microsecond",n:"_nanosecond",nn:"_nanosecond",p:"_picosecond",pp:"_picosecond",e:"_femtosecond",ee:"_femtosecond",a:"_attosecond",aa:"_attosecond",x:"_zeptosecond",xx:"_zeptosecond",o:"_yoctosecond",oo:"_yoctosecond"},i._smallUnits=["_microsecond","_nanosecond","_picosecond","_femtosecond","_attosecond","_zeptosecond","_yoctosecond"],i._microsecond=0,i._nanosecond=0,i._picosecond=0,i._femtosecond=0,i._attosecond=0,i._zeptosecond=0,i._yoctosecond=0,0===arguments.length){const e=new Date;i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else if(1===arguments.length){void 0===arguments[0]&&(arguments[0]="todayDate");if("number"==typeof arguments[0]&&isFinite(arguments[0])||"string"!=typeof arguments[0])if("number"==typeof arguments[0])i.dateData=arguments[0];else if(arguments[0]instanceof Date){const e=arguments[0];i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else i.dateData=arguments[0];else{let t;"today"===arguments[0]?t=new Date:"todayDate"===arguments[0]?(t=new Date,t.setHours(0,0,0,0)):i.regexISOString.test(arguments[0])?e(arguments[0]):t=i.tryparseDate(arguments[0]),t&&(i.dateData=i.dateToMS(t.getFullYear(),t.getMonth()+1,t.getDate())+i.timeToMS(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}}else if(2===arguments.length){void 0===arguments[0]&&(arguments[0]="todayDate");if("number"==typeof arguments[0]&&isFinite(arguments[0])||"string"!=typeof arguments[0])if("number"==typeof arguments[0])i.dateData=arguments[0];else if(arguments[0]instanceof Date){const e=arguments[0];i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else i.dateData=arguments[0];else{let t;"today"===arguments[0]?t=new Date:"todayDate"===arguments[0]?(t=new Date,t.setHours(0,0,0,0)):i.regexISOString.test(arguments[0])?e(arguments[0]):t=i.tryparseDate(arguments[0]),t&&(i.dateData=i.dateToMS(t.getFullYear(),t.getMonth()+1,t.getDate())+i.timeToMS(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}i.validateTimeZone(arguments[1])}else if(arguments.length>2)if("string"==typeof arguments[0]){const e=i.tryparseDate(arguments[0],arguments[2],arguments[1]);i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else{const e=arguments[0],t=arguments[7]||0,a=arguments[8]||0,s=arguments[9]||0,n=arguments[10]||0,r=arguments[11]||0,o=arguments[12]||0,d=arguments[13]||0,l=new Date(e,arguments[1]-1,arguments[2],arguments[3]||0,arguments[4]||0,arguments[5]||0,arguments[6]||0);e<1970&&l.setFullYear(e),i.dateData=i.dateToMS(l.getFullYear(),l.getMonth()+1,l.getDate())+i.timeToMS(l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()),i._microsecond=t,i._nanosecond=a,i._picosecond=s,i._femtosecond=n,i._attosecond=r,i._zeptosecond=o,i._yoctosecond=d,arguments[14]&&i.validateTimeZone(arguments[14])}if(i.timeZone||i.validateTimeZone("Local"),n){const e=n.toTimeZone(i.timeZone);i.dateData=e.dateData}}static validateDate(e,t,a){if(e instanceof Smart.Utilities.DateTime)return e;if(e instanceof Date)return new Smart.Utilities.DateTime(e);try{if(new RegExp(/^\d{1,2}\/\d{1,2}\/\d{4}(, \d{1,2}:\d{2}:\d{1,2} [A|P]M)?$/).test(e)){const t=new Date(e);if(!isNaN(t.getTime()))return new Smart.Utilities.DateTime(t)}if("string"==typeof e)return this.parseDateString(e,t,a);if("number"==typeof e)return new Smart.Utilities.DateTime(new Date(e))}catch(e){}return t}static parseDateString(e,t,a){const s=new Date(e);if(!isNaN(s.getTime()))return new Smart.Utilities.DateTime(s);const i=e.indexOf("Date("),n=e.indexOf("DateTime("),r=e.lastIndexOf(")");let o=e;if(-1===i&&-1===n||-1===r){const t=new Smart.Utilities.DateTime,s=t.parseDate(e,a);if(s)return o=new Smart.Utilities.DateTime(s),t.copySmallTimePartValues(o),o}else{if(o=-1!==i?e.slice(i+5,r):e.slice(n+9,r),o=o.replace(/'/g,"").replace(/"/g,"").replace(/^\s+|\s+$|\s+(?=\s)/g,""),""===o.trim())return new Smart.Utilities.DateTime;if(new RegExp(/(^(\d+)(\s*,\s*\d+)+(\s*,\s*[a-zA-Z ]+)?$)/g).test(o))return o=o.split(","),o.map((function(e,t){isNaN(o[t])?o[t]=e.trim():o[t]=parseInt(e)})),-1!==i&&o[1]++,o.unshift(null),o=new(Function.prototype.bind.apply(Smart.Utilities.DateTime,o)),o}if(""===o.trim())return t;if(!isNaN(o))return o=new Date(parseInt(o,10)),new Smart.Utilities.DateTime(o);try{const e=o.split(",");2===e.length?(e[1]=e[1].trim(),e.unshift(null),o=new(Function.prototype.bind.apply(Smart.Utilities.DateTime,e))):o=new Smart.Utilities.DateTime(o)}catch(e){o=t}return o}static fromFullTimeStamp(e){e=e.toString();const t=new Smart.Utilities.DateTime(parseFloat(e.slice(0,e.length-21)));let a=e.slice(e.length-21),s=0;for(;a.length>0;)t[t._smallUnits[s]]=parseInt(a.slice(0,3),10),a=a.slice(3),s++;return t}static getConstructorParameters(e){return[e.year(),e.month(),e.day(),e.hour(),e.minute(),e.second(),e.millisecond(),e._microsecond,e._nanosecond,e._picosecond,e._femtosecond,e._attosecond,e._zeptosecond,e._yoctosecond,e.timeZone]}static detectDisplayMode(e,t,a){if(e.calendar.patterns[t])return-1!==["d","D","M","Y","d1","d2"].indexOf(t)?"calendar":-1!==["t","T","FT","PT"].indexOf(t)?"timePicker":"default";const s=["d","M","y"],i=["h","H","m","s","t","f","u","n","p","e","a","x","o"],n=a.groups;let r=!1,o=!1;for(let e=0;e<n.length;e++){const t=n[e].charAt(0);if(-1!==s.indexOf(t)?r=!0:-1!==i.indexOf(t)&&(o=!0),r&&o)break}return r===o?"default":r?"calendar":"timePicker"}static getLocalizedNames(e){const t={names:[],namesAbbr:[],namesShort:[]},a={names:[],namesAbbr:[]};if(this[e])return this[e];for(let a=23;a<30;a++){const s=new Date(2017,6,a),i=s.toLocaleString(e,{weekday:"long"});t.names.push(i),t.namesAbbr.push(s.toLocaleString(e,{weekday:"short"})),t.namesShort.push(i.substring(0,2))}for(let t=0;t<12;t++){const s=new Date(2017,t,1).toLocaleString(e,{month:"long"});a.names.push(s),a.namesAbbr.push(s.substring(0,3))}return a.names.push(""),a.namesAbbr.push(""),this[e]={days:t,months:a},this[e]}internalMS(){return this.dateData}getDatePart(e){const t=this,a=t.internalMS();let s=parseInt(a/t.millisPerDay);const i=parseInt(s/t.daysPer400Years);s-=i*t.daysPer400Years;let n=parseInt(s/t.daysPer100Years);4===n&&(n=3),s-=n*t.daysPer100Years;const r=parseInt(s/t.daysPer4Years);s-=r*t.daysPer4Years;let o=parseInt(s/t.daysPerYear);if(4===o&&(o=3),e===t.datePartYear)return parseInt(400*i+100*n+4*r+o+1);if(s-=o*t.daysPerYear,e===t.datePartDayOfYear)return parseInt(s+1);const d=3===o&&(24!==r||3===n)?t.daysToMonth366:t.daysToMonth365;let l=s>>6;for(;s>=d[l];)l++;return e===t.datePartMonth?parseInt(l):parseInt(s-d[l-1]+1)}dayOfWeek(){const e=this.dateData;return parseInt(e/this.millisPerDay+1)%7}dayOfYear(){return this.getDatePart(this.datePartDayOfYear)}weekOfYear(e){const t=this.toDate(),a=e||this.calendar.firstDay,s=new Date(t.getFullYear(),0,1),i=Math.floor((t.getTime()-s.getTime()-6e4*(t.getTimezoneOffset()-s.getTimezoneOffset()))/864e5)+1;let n,r=s.getDay()-a;if(r=r>=0?r:r+7,r<4){if(n=Math.floor((i+r-1)/7)+1,n>52){let e=new Date(t.getFullYear()+1,0,1).getDay()-a;e=e>=0?e:e+7,n=e<4?1:53}}else n=Math.floor((i+r-1)/7);return n}subtract(e){const t=this;return new Smart.Utilities.TimeSpan(t.dateData*t.ticksPerMillisecond-e.dateData*t.ticksPerMillisecond)}dateToMS(e,t,a){const s=this;if(e>=1&&e<=9999&&t>=1&&t<=12){e=parseInt(e);const i=s.isLeapYear(e)?s.daysToMonth366:s.daysToMonth365;if(a>=1&&a<=i[t]-i[t-1]){const n=e-1;return(365*n+parseInt(n/4)-parseInt(n/100)+parseInt(n/400)+i[t-1]+a-1)*s.millisPerDay}}}isLeapYear(e){if(e<1||e>9999)throw new Error("Year out of Range");return e%4==0&&(e%100!=0||e%400==0)}timeToMS(e,t,a,s){const i=this;if(e>=0&&e<24&&t>=0&&t<60&&a>=0&&a<60){const n=parseInt(3600*e+60*t+a);return s>0&&s<1e3?n*i.millisPerSecond+s:n*i.millisPerSecond}}daysInMonth(e,t){if(t<1||t>12)throw new Error("Month out of Range");const a=this,s=a.isLeapYear(e)?a.daysToMonth366:a.daysToMonth365;return s[t]-s[t-1]}arrayIndexOf(e,t){return e.indexOf(t)}startsWith(e,t){return 0===e.indexOf(t)}endsWith(e,t){return e.substr(e.length-t.length)===t}trim(e){return(e+"").replace(this.regexTrim,"")}expandFormat(e,t){t=t||"F";let a,s=e.patterns,i=t.length;if(s[t])return s[t];if(1===i){if(a=s[t],!a)throw"Invalid date format string '"+t+"'.";t=a}else 2===i&&"%"===t.charAt(0)&&(t=t.charAt(1));return t}getEra(e,t){if(!t)return 0;if("string"==typeof e)return 0;let a,s=e.getTime();for(let e=0,i=t.length;e<i;e++)if(a=t[e].start,null===a||s>=a)return e;return 0}toUpper(e){return e.split(" ").join(" ").toUpperCase()}toUpperArray(e){const t=[];for(let a=0,s=e.length;a<s;a++)t[a]=this.toUpper(e[a]);return t}getEraYear(e,t,a,s){let i=e.getFullYear();return!s&&t.eras&&(i-=t.eras[a].offset),i}getDayIndex(e,t,a){const s=this,i=e.days;let n,r=e._upperDays;return r||(e._upperDays=r=[s.toUpperArray(i.names),s.toUpperArray(i.namesAbbr),s.toUpperArray(i.namesShort)]),t=t.toUpperCase(),a?(n=s.arrayIndexOf(r[1],t),-1===n&&(n=s.arrayIndexOf(r[2],t))):n=s.arrayIndexOf(r[0],t),n}getMonthIndex(e,t,a){const s=this;let i=e.months,n=e.monthsGenitive||e.months,r=e._upperMonths,o=e._upperMonthsGen;r||(e._upperMonths=r=[s.toUpperArray(i.names),s.toUpperArray(i.namesAbbr)],e._upperMonthsGen=o=[s.toUpperArray(n.names),s.toUpperArray(n.namesAbbr)]),t=s.toUpper(t);let d=s.arrayIndexOf(a?r[1]:r[0],t);return d<0&&(d=s.arrayIndexOf(a?o[1]:o[0],t)),d}appendPreOrPostMatch(e,t){let a=0,s=!1;for(let i=0,n=e.length;i<n;i++){const n=e.charAt(i);switch(n){case"'":s?t.push("'"):a++,s=!1;break;case"\\":s&&t.push("\\"),s=!s;break;default:t.push(n),s=!1}}return a}getTokenRegExp(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyyy|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|uu|u|nn|n|pp|p|ee|e|aa|a|xx|x|oo|o|i{1,24}|zzz|zz|z|gg|g/g}tryparseDate(e,t,a){const s=this;if(null==t&&(t=s.calendar),void 0!==a){if(Array.isArray(a))for(let i=0;i<a.length;i++){const n=s.parseDate(e,a[i],t);if(n)return n}const i=s.parseDate(e,a,t);if(i)return i}if(""===e)return null;if(null==e||e.substring||(e=e.toString()),null!=e&&"/Date("===e.substring(0,6)){const t=/^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;let a=new Date(+e.replace(/\/Date\((\d+)\)\//,"$1"));if("Invalid Date"===a){const t=e.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);a=null,t&&(a=new Date(1*t[1]+36e5*t[2]+6e4*t[3]))}if(null==a||"Invalid Date"===a||isNaN(a)){const a=t.exec(e);if(a){const e=new Date(parseInt(a[1]));if(a[2]){let t=parseInt(a[3]);"-"===a[2]&&(t=-t);const s=e.getUTCMinutes();e.setUTCMinutes(s-t)}if(!isNaN(e.valueOf()))return e}}return a}const i={smartdate:"yyyy-MM-dd HH:mm:ss",d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",ISO8601:"yyyy-MM-ddTHH:mm:ss.sssZ",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"MM-dd-yyyy",d4:"MM.dd.yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",iso:"yyyy-MM-ddTHH:mm:ssZ",iso_date1:"yyyy-MM-dd",iso_date2:"yyyy-MM-dd",iso_date3:"yyyy-ddd",iso_date4:"yyyy-MM-dd HH:mm",iso_date5:"yyyy-MM-dd HH:mm Z",iso_date6:"yyyy-MMM-dd",iso_date7:"yyyy-MM",iso_date8:"yyyy-MMM",iso_date9:"yyyy-MMMM",iso_date10:"yyyy-MMMM-dd",iso_time1:"HH:mm:ss.tttt",iso_time2:"HH:mm:ss",iso_time3:"HH:mm",iso_time4:"HH",iso_time5:"yyyyyy-MM-dd",iso_time6:"yyyyyy-MM-dd"};for(let a in i){const n=s.parseDate(e,i[a],t);if(n)return n}const n=t.patterns;for(let a in n){const i=s.parseDate(e,n[a],t);if(i){if("ISO"===a){const a=s.parseDate(e,n.ISO2,t);if(a)return a}return i}}let r;if("string"==typeof e){const a=[":","/","-"," ",","];let i="",n=e=function(e,t,a){return a.replace(new RegExp(e,"g"),t)}(", ",",",e=s.trim(e));e.indexOf(":")>=0?(i=e.substring(e.indexOf(":")-2),i=s.trim(i),n=e.substring(0,e.indexOf(":")-2)):e.toUpperCase().indexOf("AM")>=0?(i=e.substring(e.toUpperCase().indexOf("AM")-2),i=s.trim(i),n=e.substring(0,e.toUpperCase().indexOf("AM")-2)):e.toUpperCase().indexOf("PM")>=0&&(i=e.substring(e.toUpperCase().indexOf("PM")-2),i=s.trim(i),n=e.substring(0,e.toUpperCase().indexOf("PM")-2));let o=new Date,d=!1;if(n){for(let e=0;e<a.length;e++)if(n.indexOf(a[e])>=0){r=n.split(a[e]);break}if(!r)return null;let e=new Array,i=new Array,l=new Array,f=null,m=null;for(let a=0;a<r.length;a++){const i=r[a],n=s.parseDate(i,"d",t)||s.parseDate(i,"dd",t)||s.parseDate(i,"ddd",t)||s.parseDate(i,"dddd",t);if(n&&(e.push(n.getDate()),i.length>2)){f=a;break}}for(let e=0;e<r.length;e++){const a=r[e],n=s.parseDate(a,"M",t)||s.parseDate(a,"MM",t)||s.parseDate(a,"MMM",t)||s.parseDate(a,"MMMM",t);if(n){if(null!=f&&f===e)continue;if(i.push(n.getMonth()),a.length>2){m=e;break}}}for(let e=0;e<r.length;e++){const a=r[e],i=s.parseDate(a,"yyyy",t);if(i){if(null!=f&&f===e)continue;if(null!=m&&m===e)continue;l.push(i.getFullYear())}}const c=new Array;for(let t=e.length-1;t>=0;t--)for(let a=0;a<i.length;a++)for(let s=0;s<l.length;s++){const n=new Date(l[s],i[a],e[t]);l[s]<1970&&n.setFullYear(l[s]),isNaN(n.getTime())||c.push(n)}c.length>0&&(o=c[0],d=!0)}if(i){const e=i.indexOf(":")>=0?i.split(":"):i,a=s.parseDate(i,"h:mm tt",t)||s.parseDate(i,"HH:mm:ss.fff",t)||s.parseDate(i,"HH:mm:ss.ff",t)||s.parseDate(i,"h:mm:ss tt",t)||s.parseDate(i,"HH:mm:ss.tttt",t)||s.parseDate(i,"HH:mm:ss",t)||s.parseDate(i,"HH:mm",t)||s.parseDate(i,"HH",t);let n=0,r=0,l=0,f=0;a&&!isNaN(a.getTime())?(n=a.getHours(),r=a.getMinutes(),l=a.getSeconds(),f=a.getMilliseconds()):(1===e.length&&(n=parseInt(e[0])),2===e.length&&(n=parseInt(e[0]),r=parseInt(e[1])),3===e.length&&(n=parseInt(e[0]),r=parseInt(e[1]),e[2].indexOf(".")>=0?(l=parseInt(e[2].toString().split(".")[0]),f=parseInt(e[2].toString().split(".")[1])):l=parseInt(e[2])),4===e.length&&(n=parseInt(e[0]),r=parseInt(e[1]),l=parseInt(e[2]),f=parseInt(e[3]))),!o||isNaN(n)||isNaN(r)||isNaN(l)||isNaN(f)||(o.setHours(n,r,l,f),d=!0)}if(d)return o}if(null!=e){r=[":","/","-"];let t=!0;for(let a=0;a<r.length;a++)-1!==e.indexOf(r[a])&&(t=!1);if(t){const t=new Number(e);if(!isNaN(t))return new Date(t)}}return null}getParseRegExp(e,t){const a=this;let s=e._parseRegExp;if(s){const e=s[t];if(e)return e}else e._parseRegExp=s={};let i,n=a.expandFormat(e,t).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),r=["^"],o=[],d=0,l=0,f=a.getTokenRegExp();for(;null!==(i=f.exec(n));){const e=n.slice(d,i.index);if(d=f.lastIndex,l+=a.appendPreOrPostMatch(e,r),l%2){r.push(i[0]);continue}let t,s=i[0],m=s.length;switch(s){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":t="(\\D+)";break;case"tt":case"t":t="(\\D*)";break;case"yyyyy":t="(\\d{1,4})";break;case"yyyy":t="(\\d{"+m+"})";break;case"fff":case"ff":case"f":t="(\\d{1,"+m+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":t="(\\d\\d?)";break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":t="(\\d{1,3})";break;case"zzz":t="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":t="([+-]?\\d\\d?)";break;case"/":t="/";break;default:if(!/i{1,24}/.test(s))throw"Invalid date format pattern '"+s+"'.";t="(\\d{"+s.length+"})"}t&&r.push(t),"/"!==s&&o.push(i[0])}a.appendPreOrPostMatch(n.slice(d),r),r.push("$");const m={regExp:r.join("").replace(/\s+/g,"\\s+"),groups:o};return s[t]=m}outOfRange(e,t,a){return e<t||e>a}expandYear(e,t){const a=this,s=new Date,i=a.getEra(s);if(t<100){let n=e.twoDigitYearMax;n="string"==typeof n?(new Date).getFullYear()%100+parseInt(n,10):n;const r=a.getEraYear(s,e,i);(t+=r-r%100)>n&&(t-=100)}return t}padZeros(e,t){let a,s=e+"";return t>1&&s.length<t?(a=["0","00","000"][t-2]+s,a.substr(a.length-t,t)):(a=s,a)}parseDate(e,t,a){const s=this;null==a&&(a=s.calendar),e=s.trim(e);const i=a,n=s.getParseRegExp(i,t),r=new RegExp(n.regExp).exec(e);if(null===r)return null;let o,d=n.groups,l=null,f=null,m=null,c=null,u=null,p=0,y=0,g=0,h=0,T=null,S=!1;for(let e=0,t=d.length;e<t;e++){const t=r[e+1];if(t){const a=d[e],n=a.length,r=parseInt(t,10);switch(a){case"dd":case"d":if(c=r,s.outOfRange(c,1,31))return null;break;case"MMM":case"MMMM":case"MMMMM":case"MMMMMM":case"MMMMMMM":case"MMMMMMMM":if(m=s.getMonthIndex(i,t,3===n),s.outOfRange(m,0,11))return null;break;case"M":case"MM":if(m=r-1,s.outOfRange(m,0,11))return null;break;case"y":case"yy":case"yyyy":if(f=n<4?s.expandYear(i,r):r,s.outOfRange(f,0,9999))return null;break;case"h":case"hh":if(p=r,12===p&&(p=0),s.outOfRange(p,0,11))return null;break;case"H":case"HH":if(p=r,s.outOfRange(p,0,23))return null;break;case"m":case"mm":if(y=r,s.outOfRange(y,0,59))return null;break;case"s":case"ss":if(g=r,s.outOfRange(g,0,59))return null;break;case"tt":case"t":if(S=i.PM&&(t===i.PM[0]||t===i.PM[1]||t===i.PM[2]),!S&&(!i.AM||t!==i.AM[0]&&t!==i.AM[1]&&t!==i.AM[2]))return null;break;case"f":case"ff":case"fff":if(h=r*Math.pow(10,3-n),s.outOfRange(h,0,999))return null;break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":if(s.outOfRange(r,0,1e3))return null;s[s._codeToUnit[a]]=r;break;case"ddd":case"dddd":if(u=s.getDayIndex(i,t,3===n),s.outOfRange(u,0,6))return null;break;case"zzz":{const e=t.split(/:/);if(2!==e.length)return null;if(o=parseInt(e[0],10),s.outOfRange(o,-12,13))return null;const a=parseInt(e[1],10);if(s.outOfRange(a,0,59))return null;T=60*o+(s.startsWith(t,"-")?-a:a);break}case"z":case"zz":if(o=r,s.outOfRange(o,-12,13))return null;T=60*o;break;case"g":case"gg":{let e=t;if(!e||!i.eras)return null;e=this.trim(e.toLowerCase());for(let t=0,a=i.eras.length;t<a;t++)if(e===i.eras[t].nathat.toLowerCase()){l=t;break}if(null===l)return null;break}default:{let e=t;e.length%3==1?e+="00":e.length%3==2&&(e+="0"),h=parseInt(e.slice(0,3),10),e=e.slice(3);let a=0;for(;e.length>0;)s[s._smallUnits[a]]=parseInt(e.slice(0,3),10),e=e.slice(3),a++}}}}let M,D=new Date,H=i.convert;if(M=D.getFullYear(),null===f?f=M:i.eras&&(f+=i.eras[l||0].offset),null===m&&(m=0),null===c&&(c=1),H){if(D=H.toGregorian(f,m,c),null===D)return null}else{if(D.setFullYear(f,m,c),D.getDate()!==c)return null;if(null!==u&&D.getDay()!==u)return null}if(S&&p<12&&(p+=12),D.setHours(p,y,g,h),null!==T){const e=D.getMinutes()-(T+D.getTimezoneOffset());D.setHours(D.getHours()+parseInt(e/60,10),e%60)}return D}toString(e,t){const a=this;void 0===e&&(e="yyyy-MM-dd HH:mm:ss");const s=a.dateData.toString()+a.getFractionsOfSecondStamp()+e+(a.timeZone||"");if(Smart.Utilities.DateTime.cache&&Smart.Utilities.DateTime.cache[s])return Smart.Utilities.DateTime.cache[s];const i=a.toDate();if(null==t&&(t=a.calendar),"string"==typeof i)return i;if(!e||!e.length||"i"===e){let e;return e=a.formatDate(i,t.patterns.F,t),e}const n=t.eras,r="s"===e;e=a.expandFormat(t,e);const o=[];let d,l=0,f=a.getTokenRegExp();function m(e,t){if(void 0!==e.getMonth)switch(t){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate()}}for(;;){const s=f.lastIndex,c=f.exec(e),u=e.slice(s,c?c.index:e.length);if(l+=a.appendPreOrPostMatch(u,o),!c)break;if(l%2){o.push(c[0]);continue}const p=c[0],y=p.length;let g;if(/i{1,24}/.test(p))o.push(a.getFirstNDigitsOfPrecision(p.length));else switch(p){case"ddd":case"dddd":{const e=3===y?t.days.namesAbbr:t.days.names;o.push(e[i.getDay()]);break}case"d":case"dd":o.push(a.padZeros(m(i,2),y));break;case"MMM":case"MMMM":g=m(i,1),o.push(t.months[3===y?"namesAbbr":"names"][g]);break;case"M":case"MM":o.push(a.padZeros(m(i,1)+1,y));break;case"y":case"yy":case"yyyy":g=a.getEraYear(i,t,a.getEra(i,n),r),y<4&&(g%=100),o.push(a.padZeros(g,y));break;case"h":case"hh":d=i.getHours()%12,0===d&&(d=12),o.push(a.padZeros(d,y));break;case"H":case"HH":o.push(a.padZeros(i.getHours(),y));break;case"m":case"mm":o.push(a.padZeros(i.getMinutes(),y));break;case"s":case"ss":o.push(a.padZeros(i.getSeconds(),y));break;case"t":case"tt":g=i.getHours()<12?t.AM?t.AM[0]:" ":t.PM?t.PM[0]:" ",o.push(1===y?g.charAt(0):g);break;case"f":case"ff":case"fff":o.push(a.padZeros(i.getMilliseconds(),3).substr(0,y));break;case"u":case"n":case"p":case"e":case"a":case"x":case"o":o.push(a[a._codeToUnit[p]]);break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":o.push(a.padZeros(a[a._codeToUnit[p]],3));break;case"z":case"zz":o.push((a.timeZoneOffsetHours>=0?"+":"-")+a.padZeros(Math.floor(Math.abs(a.timeZoneOffsetHours)),y));break;case"zzz":o.push((a.timeZoneOffsetHours>=0?"+":"-")+a.padZeros(Math.floor(Math.abs(a.timeZoneOffsetHours)),2)+":"+a.padZeros(60*Math.abs(a.timeZoneOffsetHours%1),2));break;case"g":case"gg":t.eras&&o.push(t.eras[a.getEra(i,n)].name);break;case"/":o.push(t["/"]);break;default:throw"Invalid date format pattern '"+p+"'."}}let c=o.join("");return Smart.Utilities.DateTime.cache||(Smart.Utilities.DateTime.cache=new Array),a._today||(a._today=new Date),a.calendar&&a.calendar.today&&-1===e.indexOf(":")&&i.getFullYear()===a._today.getFullYear()&&i.getDate()===a._today.getDate()&&i.getMonth()===a._today.getMonth()&&(c=a.calendar.today),Smart.Utilities.DateTime.cache[s]=c,c}getFractionsOfSecondStamp(){const e=this;return e._microsecond.toString()+e._nanosecond+e._picosecond+e._femtosecond+e._attosecond+e._zeptosecond+e._yoctosecond}getFirstNDigitsOfPrecision(e,t){const a=this;return(""+(!0!==t?a.padZeros(a.millisecond(),3):"")+a.padZeros(a._microsecond,3)+a.padZeros(a._nanosecond,3)+a.padZeros(a._picosecond,3)+a.padZeros(a._femtosecond,3)+a.padZeros(a._attosecond,3)+a.padZeros(a._zeptosecond,3)+a.padZeros(a._yoctosecond,3)).slice(0,e)}copySmallTimePartValues(e){const t=this;e._microsecond=t._microsecond,e._nanosecond=t._nanosecond,e._picosecond=t._picosecond,e._femtosecond=t._femtosecond,e._attosecond=t._attosecond,e._zeptosecond=t._zeptosecond,e._yoctosecond=t._yoctosecond}add(e,t,a){const s=this,i=s.internalMS();if(void 0===t){if(!1===a)return s.dateData=i+parseInt(e._ticks/s.ticksPerMillisecond),s;const t=new Smart.Utilities.DateTime(i+parseInt(e._ticks/s.ticksPerMillisecond));return s.copyTimeZone(t),s.copySmallTimePartValues(t),t}const n=e*t;if(n<=-s.maxMillis||n>=s.maxMillis)throw new Error("Out of Range");if(!1===a)return s.dateData=i+n,s;const r=new Smart.Utilities.DateTime(i+n);return s.copyTimeZone(r),s.copySmallTimePartValues(r),r}addDays(e,t){return this.add(e,this.millisPerDay,t)}clone(){const e=this,t=new Smart.Utilities.DateTime(e.dateData);return e.copyTimeZone(t),e.copySmallTimePartValues(t),t}clearTime(){const e=this,t=e.month(),a=e.year(),s=e.day(),i=new Smart.Utilities.DateTime(a,t,s,0,0,0,0);return e.copyTimeZone(i),i}addHours(e,t){return this.add(e,this.millisPerHour,t)}addDeciseconds(e,t){return this.add(100*e,1,t)}addCentiseconds(e,t){return this.add(10*e,1,t)}addMilliseconds(e,t){return this.add(e,1,t)}addMinutes(e,t){return this.add(e,this.millisPerMinute,t)}addMonths(e,t){const a=this;if(e<-12e4||e>12e4)throw new Error("Invalid Months Value");let s=parseInt(a.getDatePart(a.datePartYear)),i=parseInt(a.getDatePart(a.datePartMonth)),n=parseInt(a.getDatePart(a.datePartDay));if(e%12==0)s+=e/12;else{const t=i-1+e;t>=0?(i=t%12+1,s+=t/12):(i=12+(t+1)%12,s+=(t-11)/12),s=parseInt(s)}if(s<1||s>9999)throw new Error("Year out of range");const r=a.daysInMonth(s,i);if(n>r&&(n=r),!1===t)return a.dateData=a.dateToMS(s,i,n)+a.internalMS()%a.millisPerDay,a;const o=new Smart.Utilities.DateTime(a.dateToMS(s,i,n)+a.internalMS()%a.millisPerDay);return a.copyTimeZone(o),a.copySmallTimePartValues(o),o}addSeconds(e,t){return this.add(e,this.millisPerSecond,t)}addYears(e,t){return this.addMonths(12*e,t)}addMicroseconds(e,t){if(0===e)return;const a=this;let s,i;e<0&&0===a.hour()&&0===a.minute()&&0===a.second()&&0===a.millisecond()&&0===a._microsecond&&(s=parseInt(e/1e3,10)-1,i=1e3+e%1e3);const n=1e3*a.timeToMS(a.hour(),a.minute(),a.second(),a.millisecond())+a._microsecond,r=n+e;let o;if(void 0===s&&(s=parseInt(r/1e3,10)-parseInt(n/1e3,10)),void 0===i&&(i=parseInt(r%1e3,10)),0!==s&&(o=a.addMilliseconds(s,t)),!1!==t)return o||(o=a.clone()),o._microsecond=i,o;a._microsecond=i}addFractionsOfSecond(e,t,a,s,i){if(0===e)return;const n=this,r=1e3*n[s]+n[a],o=e+r;let d,l=parseInt(o/1e3,10)-parseInt(r/1e3,10),f=parseInt(o%1e3,10);if(e<0&&o<0&&f<0&&(l--,f=1e3+f),0!==l&&(d=n[i](l,t)),!1!==t)return d||(d=n.clone()),d[a]=f,d;n[a]=f}addNanoseconds(e,t){return this.addFractionsOfSecond(e,t,"_nanosecond","_microsecond","addMicroseconds")}addPicoseconds(e,t){return this.addFractionsOfSecond(e,t,"_picosecond","_nanosecond","addNanoseconds")}addFemtoseconds(e,t){return this.addFractionsOfSecond(e,t,"_femtosecond","_picosecond","addPicoseconds")}addAttoseconds(e,t){return this.addFractionsOfSecond(e,t,"_attosecond","_femtosecond","addFemtoseconds")}addZeptoseconds(e,t){return this.addFractionsOfSecond(e,t,"_zeptosecond","_attosecond","addAttoseconds")}addYoctoseconds(e,t){return this.addFractionsOfSecond(e,t,"_yoctosecond","_zeptosecond","addZeptoseconds")}getTimeZoneOffset(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1),s=e.getTimezoneOffset()<Math.max(t.getTimezoneOffset(),a.getTimezoneOffset());return{offset:-e.getTimezoneOffset()/60,dst:+s}}isInDaylightSavingTime(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1);return this.date().getTimezoneOffset()<Math.max(t.getTimezoneOffset(),a.getTimezoneOffset())}supportsDaylightSavingTime(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1);return t.getTimezoneOffset()!==a.getTimezoneOffset()}date(){const e=this,t=e.month(),a=e.year(),s=e.day(),i=new Smart.Utilities.DateTime(a,t,s);return e.copyTimeZone(i),i}isWeekend(){return 0===this.dayOfWeek()||6===this.dayOfWeek()}toDate(e){const t=this,a=t.month(),s=t.year(),i=t.day(),n=t.hour(),r=t.minute(),o=t.second(),d=t.millisecond();let l=new Date(s,a-1,i);if(s<1970&&l.setFullYear(s),l.setHours(n,r,o,d),e){const a=t.timeZones.filter((function(t){return t.id===e}));if(a.length){let e=a[0].offset;const s=l.getTime();let i=60*l.getTimezoneOffset()*1e3;if(t.timeZone){const e=t.timeZones.filter((function(e){return e.id===t.timeZone}));e.length&&(i=60*-e[0].offset*1e3)}l=new Date(s+i+6e4*e)}}return l}toTimeZone(e){const t=this;let a=e;if(null==a&&(a="Local"),t.timeZone===a)return t.clone();const s=t.timeZones.filter((function(e){return e.id===a}));if(0===s.length)return t.clone();const i=this.toDate(a),n=new Smart.Utilities.DateTime(i);return n.timeZone=a,n.timeZoneOffset=s[0].offset,n.timeZoneOffsetHours=s[0].offsetHours,t.copySmallTimePartValues(n),n}day(){return this.getDatePart(this.datePartDay)}month(){return this.getDatePart(this.datePartMonth)}year(){return this.getDatePart(this.datePartYear)}millisecond(){return parseInt(this.internalMS()%1e3)}hour(){return parseInt(Math.floor(this.internalMS()/this.millisPerHour)%24)}minute(){return parseInt(this.internalMS()/this.millisPerMinute%60)}second(){return parseInt(this.internalMS()/this.millisPerSecond%60)}microsecond(){return this._microsecond}nanosecond(){return this._nanosecond}picosecond(){return this._picosecond}femtosecond(){return this._femtosecond}attosecond(){return this._attosecond}zeptosecond(){return this._zeptosecond}yoctosecond(){return this._yoctosecond}valueOf(){return this.dateData}equals(e){const t=this;return t.dateData===e.dateData&&t._microsecond===e._microsecond&&t._nanosecond===e._nanosecond&&t._picosecond===e._picosecond&&t._femtosecond===e._femtosecond&&t._attosecond===e._attosecond&&t._zeptosecond===e._zeptosecond&&t._yoctosecond===e._yoctosecond}equalDateParts(e){const t=this;return t.year()===e.year()&&t.month()===e.month()&&t.day()===e.day()}compare(e){const t=this;if(t.equals(e))return 0;const a=["dateData","_microsecond","_nanosecond","_picosecond","_femtosecond","_attosecond","_zeptosecond","_yoctosecond"];for(let s=0;s<a.length;s++){const i=a[s];if(t[i]>e[i])return 1;if(t[i]<e[i])return-1}return 0}toDateString(){return this.toDate().toDateString()}toLocaleDateString(){return this.toDate().toLocaleDateString(this.calendar.locale)}toLocaleString(){return this.toDate().toLocaleString(this.calendar.locale)}toLocaleTimeString(){return this.toDate().toLocaleTimeString(this.calendar.locale)}validateTimeZone(e){const t=this;if("string"!=typeof e)return;const a=t.timeZones.filter((function(t){return t.id===e}));0!==a.length&&(t.timeZone=e,t.timeZoneOffset=a[0].offset,t.timeZoneOffsetHours=a[0].offsetHours)}copyTimeZone(e){const t=this;e.timeZone=t.timeZone,e.timeZoneOffset=t.timeZoneOffset,e.timeZoneOffsetHours=t.timeZoneOffsetHours}getTimeStamp(){return new Smart.Utilities.BigNumber(this.dateData.toString()+this.getFirstNDigitsOfPrecision(void 0,!0))}})})();
782
+ (()=>{const e=-1*(new Date).getTimezoneOffset(),t=[{id:"Local",offset:e,offsetHours:e/60,displayName:"",supportsDaylightSavingTime:!1},{id:"Dateline Standard Time",offset:-720,offsetHours:-12,displayName:"(UTC-12:00) International Date Line West",supportsDaylightSavingTime:!1},{id:"UTC-11",offset:-660,offsetHours:-11,displayName:"(UTC-11:00) Coordinated Universal Time-11",supportsDaylightSavingTime:!1},{id:"Hawaiteratoran Standard Time",offset:-600,offsetHours:-10,displayName:"(UTC-10:00) Hawaiterator",supportsDaylightSavingTime:!1},{id:"Alaskan Standard Time",offset:-540,offsetHours:-9,displayName:"(UTC-09:00) Alaska",supportsDaylightSavingTime:!0},{id:"Pacific Standard Time (Mexico)",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Baja California",supportsDaylightSavingTime:!0},{id:"Pacific Standard Time",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Pacific Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"US Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Arizona",supportsDaylightSavingTime:!1},{id:"Mountain Standard Time (Mexico)",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",supportsDaylightSavingTime:!0},{id:"Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Mountain Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"Central America Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central America",supportsDaylightSavingTime:!1},{id:"Canada Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Saskatchewan",supportsDaylightSavingTime:!1},{id:"Central Standard Time (Mexico)",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",supportsDaylightSavingTime:!0},{id:"SA Pacific Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Bogota, Lima, Quito, Rio Branco",supportsDaylightSavingTime:!1},{id:"Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Eastern Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"US Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Indiana (East)",supportsDaylightSavingTime:!0},{id:"Venezuela Standard Time",offset:-270,offsetHours:-4.5,displayName:"(UTC-04:30) Caracas",supportsDaylightSavingTime:!1},{id:"Atlantic Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Atlantic Time (Canada)",supportsDaylightSavingTime:!0},{id:"Paraguay Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Asuncion",supportsDaylightSavingTime:!0},{id:"Central Brazilian Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Cuiaba",supportsDaylightSavingTime:!0},{id:"Pacific SA Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Santiago",supportsDaylightSavingTime:!0},{id:"SA Western Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan",supportsDaylightSavingTime:!1},{id:"Newfoundland Standard Time",offset:-210,offsetHours:-3.5,displayName:"(UTC-03:30) Newfoundland",supportsDaylightSavingTime:!0},{id:"SA Eastern Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Cayenne, Fortaleza",supportsDaylightSavingTime:!1},{id:"Argentina Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Buenos Aires",supportsDaylightSavingTime:!0},{id:"E. South America Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Brasilia",supportsDaylightSavingTime:!0},{id:"Bahia Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Salvador",supportsDaylightSavingTime:!0},{id:"Montevideo Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Montevideo",supportsDaylightSavingTime:!0},{id:"Greenland Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Greenland",supportsDaylightSavingTime:!0},{id:"UTC-02",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Coordinated Universal Time-02",supportsDaylightSavingTime:!1},{id:"Mid-Atlantic Standard Time",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Mid-Atlantic - Old",supportsDaylightSavingTime:!0},{id:"Azores Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Azores",supportsDaylightSavingTime:!0},{id:"Cape Verde Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Cape Verde Is.",supportsDaylightSavingTime:!1},{id:"Morocco Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Casablanca",supportsDaylightSavingTime:!0},{id:"UTC",offset:0,offsetHours:0,displayName:"(UTC) Coordinated Universal Time",supportsDaylightSavingTime:!1},{id:"GMT Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Dublin, Edinburgh, Lisbon, London",supportsDaylightSavingTime:!0},{id:"Greenwich Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Monrovia, Reykjavik",supportsDaylightSavingTime:!1},{id:"Central European Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",supportsDaylightSavingTime:!0},{id:"Namibia Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Windhoek",supportsDaylightSavingTime:!0},{id:"W. Central Africa Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) West Central Africa",supportsDaylightSavingTime:!1},{id:"W. Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",supportsDaylightSavingTime:!0},{id:"Central Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague",supportsDaylightSavingTime:!0},{id:"Romance Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",supportsDaylightSavingTime:!0},{id:"FLE Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",supportsDaylightSavingTime:!0},{id:"South Africa Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Harare, Pretoria",supportsDaylightSavingTime:!1},{id:"Turkey Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Istanbul",supportsDaylightSavingTime:!0},{id:"GTB Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Athens, Bucharest",supportsDaylightSavingTime:!0},{id:"Libya Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Tripoli",supportsDaylightSavingTime:!0},{id:"E. Europe Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) E. Europe",supportsDaylightSavingTime:!0},{id:"Jordan Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Amman",supportsDaylightSavingTime:!0},{id:"Middle East Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Beirut",supportsDaylightSavingTime:!0},{id:"Egypt Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Cairo",supportsDaylightSavingTime:!0},{id:"Syria Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Damascus",supportsDaylightSavingTime:!0},{id:"Israel Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Jerusalem",supportsDaylightSavingTime:!0},{id:"Arab Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kuwait, Riyadh",supportsDaylightSavingTime:!1},{id:"E. Africa Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Nairobi",supportsDaylightSavingTime:!1},{id:"Arabic Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Baghdad",supportsDaylightSavingTime:!0},{id:"Kaliningrad Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kaliningrad, Minsk",supportsDaylightSavingTime:!0},{id:"Iran Standard Time",offset:210,offsetHours:3.5,displayName:"(UTC+03:30) Tehran",supportsDaylightSavingTime:!0},{id:"Mauritius Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Port Louis",supportsDaylightSavingTime:!0},{id:"Georgian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Tbilisi",supportsDaylightSavingTime:!1},{id:"Caucasus Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Yerevan",supportsDaylightSavingTime:!0},{id:"Arabian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Abu Dhabi, Muscat",supportsDaylightSavingTime:!1},{id:"Azerbaijan Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Baku",supportsDaylightSavingTime:!0},{id:"Russian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Moscow, St. Petersburg, Volgograd",supportsDaylightSavingTime:!0},{id:"Afghanistan Standard Time",offset:270,offsetHours:4.5,displayName:"(UTC+04:30) Kabul",supportsDaylightSavingTime:!1},{id:"Pakistan Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Islamabad, Karachi",supportsDaylightSavingTime:!0},{id:"West Asia Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Ashgabat, Tashkent",supportsDaylightSavingTime:!1},{id:"India Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",supportsDaylightSavingTime:!1},{id:"Sri Lanka Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Sri Jayawardenepura",supportsDaylightSavingTime:!1},{id:"Nepal Standard Time",offset:345,offsetHours:5.75,displayName:"(UTC+05:45) Kathmandu",supportsDaylightSavingTime:!1},{id:"Central Asia Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Astana",supportsDaylightSavingTime:!1},{id:"Bangladesh Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Dhaka",supportsDaylightSavingTime:!0},{id:"Ekaterinburg Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Ekaterinburg",supportsDaylightSavingTime:!0},{id:"Myanmar Standard Time",offset:390,offsetHours:6.5,displayName:"(UTC+06:30) Yangon (Rangoon)",supportsDaylightSavingTime:!1},{id:"SE Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Bangkok, Hanoi, Jakarta",supportsDaylightSavingTime:!1},{id:"N. Central Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Novosibirsk",supportsDaylightSavingTime:!0},{id:"Ulaanbaatar Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Ulaanbaatar",supportsDaylightSavingTime:!1},{id:"China Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",supportsDaylightSavingTime:!1},{id:"Singapore Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Kuala Lumpur, Singapore",supportsDaylightSavingTime:!1},{id:"North Asia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Krasnoyarsk",supportsDaylightSavingTime:!0},{id:"Taipei Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Taipei",supportsDaylightSavingTime:!1},{id:"W. Australia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Perth",supportsDaylightSavingTime:!0},{id:"Korea Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Seoul",supportsDaylightSavingTime:!1},{id:"North Asia East Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Irkutsk",supportsDaylightSavingTime:!0},{id:"Tokyo Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Osaka, Sapporo, Tokyo",supportsDaylightSavingTime:!1},{id:"AUS Central Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Darwin",supportsDaylightSavingTime:!1},{id:"Cen. Australia Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Adelaide",supportsDaylightSavingTime:!0},{id:"West Pacific Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Guam, Port Moresby",supportsDaylightSavingTime:!1},{id:"Tasmania Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Hobart",supportsDaylightSavingTime:!0},{id:"E. Australia Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Brisbane",supportsDaylightSavingTime:!1},{id:"AUS Eastern Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Canberra, Melbourne, Sydney",supportsDaylightSavingTime:!0},{id:"Yakutsk Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Yakutsk",supportsDaylightSavingTime:!0},{id:"Vladivostok Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Vladivostok",supportsDaylightSavingTime:!0},{id:"Central Pacific Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Solomon Is., New Caledonia",supportsDaylightSavingTime:!1},{id:"Magadan Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Magadan",supportsDaylightSavingTime:!0},{id:"Kamchatka Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",supportsDaylightSavingTime:!0},{id:"Fiji Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Fiji",supportsDaylightSavingTime:!0},{id:"New Zealand Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Auckland, Wellington",supportsDaylightSavingTime:!0},{id:"UTC+12",offset:720,offsetHours:12,displayName:"(UTC+12:00) Coordinated Universal Time+12",supportsDaylightSavingTime:!1},{id:"Tonga Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Nuku'alofa",supportsDaylightSavingTime:!1},{id:"Samoa Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Samoa",supportsDaylightSavingTime:!0}],a=[0,31,59,90,120,151,181,212,243,273,304,334,365],s=[0,31,60,91,121,152,182,213,244,274,305,335,366];Smart.Utilities.Assign("TimeSpan",class{constructor(){const e=this;if(e.ticksPerMillisecond=1e4,e.millisecondsPerTick=1e-4,e.ticksPerSecond=1e7,e.secondsPerTick=1e-7,e.ticksPerMinute=6e8,e.minutesPerTick=1/6e8,e.ticksPerHour=36e9,e.hoursPerTick=1/36e9,e.ticksPerDay=864e9,e.daysPerTick=1/864e9,e.millisPerSecond=1e3,e.millisPerMinute=6e4,e.millisPerHour=36e5,e.millisPerDay=864e5,e._ticks=0,1===arguments.length){if(isNaN(arguments[0]))throw new Error("Argument must be a number.");e._ticks=arguments[0]}else if(3===arguments.length)e._ticks=e.timeToMS(arguments[0],arguments[1],arguments[2],0);else if(4===arguments.length){const t=1e3*(3600*arguments[0]*24+3600*arguments[1]+60*arguments[2]+arguments[3])+0;e._ticks=t*e.ticksPerMillisecond}else if(5===arguments.length){const t=1e3*(3600*arguments[0]*24+3600*arguments[1]+60*arguments[2]+arguments[3])+arguments[4];e._ticks=t*e.ticksPerMillisecond}}ticks(){return this._ticks}days(){return parseInt(this._ticks/this.ticksPerDay)}timeToMS(e,t,a,s){return parseInt((3600*e+60*t+a+s/1e3)*this.ticksPerSecond)}hours(){return parseInt(this._ticks/this.ticksPerHour)%24}milliseconds(){return parseInt(this._ticks/this.ticksPerMillisecond)%1e3}minutes(){return parseInt(this._ticks/this.ticksPerMinute)%60}seconds(){return parseInt(this._ticks/this.ticksPerSecond)%60}totalDays(){return parseInt(this._ticks*this.daysPerTick)}totalHours(){return parseInt(this._ticks*this.hoursPerTick)}totalMilliseconds(){const e=this._ticks*this.millisecondsPerTick;return parseInt(e)}totalMinutes(){return parseInt(this._ticks*this.minutesPerTick)}totalSeconds(){return parseInt(this._ticks*this.secondsPerTick)}add(e){const t=this._ticks+e._ticks;return new Smart.Utilities.TimeSpan(t)}subtract(e){const t=this._ticks-e._ticks;return new Smart.Utilities.TimeSpan(t)}duration(){const e=this;return e._ticks>=0?new Smart.Utilities.TimeSpan(e._ticks):new Smart.Utilities.TimeSpan(-e._ticks)}equals(e){return this._ticks===e._ticks}valueOf(){return this._ticks}compare(e,t){return e._ticks>t._ticks?1:e._ticks<t._ticks?-1:0}interval(e,t){const a=e*t+(e>=0?.5:-.5);return new Smart.Utilities.TimeSpan(a*this.ticksPerMillisecond)}fromDays(e){return this.interval(e,this.millisPerDay)}fromHours(e){return this.interval(e,this.millisPerHour)}fromMilliseconds(e){return this.interval(e,1)}fromMinutes(e){return this.interval(e,this.millisPerMinute)}fromSeconds(e){return this.interval(e,this.millisPerSecond)}fromTicks(e){return new Smart.Utilities.TimeSpan(e)}toString(){return this.totalMilliseconds().toString()}negate(){return new Smart.Utilities.TimeSpan(-this._ticks)}}),Smart.Utilities.Assign("DateTime",class{constructor(){function e(e){const t=i.regexISOString.exec(e);n=new Smart.Utilities.DateTime(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3]),parseFloat(t[4]),parseFloat(t[5]),parseFloat(t[6]),parseFloat(t[7]),0,0,0,0,0,0,0,"UTC")}const i=this;let n;if(i.ticksPerMillisecond=1e4,i.millisecondsPerTick=1e-4,i.ticksPerSecond=1e7,i.secondsPerTick=1e-7,i.ticksPerMinute=6e8,i.minutesPerTick=1/6e8,i.ticksPerHour=36e9,i.hoursPerTick=1/36e9,i.ticksPerDay=864e9,i.daysPerTick=1/864e9,i.millisPerSecond=1e3,i.millisPerMinute=6e4,i.millisPerHour=36e5,i.millisPerDay=864e5,i.daysPerYear=365,i.daysPer4Years=1461,i.daysPer100Years=36524,i.daysPer400Years=146097,i.daysTo1601=584388,i.daysTo1899=693593,i.daysTo10000=3652059,i.minTicks=0,i.maxTicks=3155378976e9,i.maxMillis=3155378976e5,i.datePartYear=0,i.datePartDayOfYear=1,i.datePartMonth=2,i.datePartDay=3,i.daysToMonth365=a,i.daysToMonth366=s,i.minValue=new Date(0),i.maxValue=new Date(3155378976e9),i.ticksMask=0x4000000000000000,i.flagsMask=0xc000000000000000,i.localMask=0x8000000000000000,i.ticksCeiling=0x4000000000000000,i.kindUnspecified=0,i.kindUtc=0x4000000000000000,i.kindLocal=0x8000000000000000,i.kindLocalAmbiguousDst=0xc000000000000000,i.kindShift=62,i.regexTrim=/^\s+|\s+$/g,i.regexInfinity=/^[+-]?infinity$/i,i.regexHex=/^0x[a-f0-9]+$/i,i.regexParseFloat=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,i.regexISOString=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{3})Z$/,i.calendar={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",ISO8601:"yyyy-MM-ddTHH:mm:ss.sssZ",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",FP:"yyyy-MM-dd HH:mm:ss:fff:uu:nn:pp:ee:aa:xx:oo",FPA:"yyyy/MM/dd HH:mm:ss:fffuunnppeeaaxxoo",FPA2:"yyyy-MM-dd HH:mm:ss:fffuunnppeeaaxxoo",FT:"HH:mm:ss:fff:uu:nn:pp:ee:aa:xx:oo",PP:"yyyy-MM-dd HH:mm:ss:fff:uu:nn:pp",PT:"HH:mm:ss:fff:uu:nn:pp"},percentsymbol:"%",currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:","},i.dateData=0,i.timeZone=null,i.timeZones=t,i._codeToUnit={u:"_microsecond",uu:"_microsecond",n:"_nanosecond",nn:"_nanosecond",p:"_picosecond",pp:"_picosecond",e:"_femtosecond",ee:"_femtosecond",a:"_attosecond",aa:"_attosecond",x:"_zeptosecond",xx:"_zeptosecond",o:"_yoctosecond",oo:"_yoctosecond"},i._smallUnits=["_microsecond","_nanosecond","_picosecond","_femtosecond","_attosecond","_zeptosecond","_yoctosecond"],i._microsecond=0,i._nanosecond=0,i._picosecond=0,i._femtosecond=0,i._attosecond=0,i._zeptosecond=0,i._yoctosecond=0,0===arguments.length){const e=new Date;i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else if(1===arguments.length){void 0===arguments[0]&&(arguments[0]="todayDate");if("number"==typeof arguments[0]&&isFinite(arguments[0])||"string"!=typeof arguments[0])if("number"==typeof arguments[0])i.dateData=arguments[0];else if(arguments[0]instanceof Date){const e=arguments[0];i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else i.dateData=arguments[0];else{let t;"today"===arguments[0]?t=new Date:"todayDate"===arguments[0]?(t=new Date,t.setHours(0,0,0,0)):i.regexISOString.test(arguments[0])?e(arguments[0]):t=i.tryparseDate(arguments[0]),t&&(i.dateData=i.dateToMS(t.getFullYear(),t.getMonth()+1,t.getDate())+i.timeToMS(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}}else if(2===arguments.length){void 0===arguments[0]&&(arguments[0]="todayDate");if("number"==typeof arguments[0]&&isFinite(arguments[0])||"string"!=typeof arguments[0])if("number"==typeof arguments[0])i.dateData=arguments[0];else if(arguments[0]instanceof Date){const e=arguments[0];i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else i.dateData=arguments[0];else{let t;"today"===arguments[0]?t=new Date:"todayDate"===arguments[0]?(t=new Date,t.setHours(0,0,0,0)):i.regexISOString.test(arguments[0])?e(arguments[0]):t=i.tryparseDate(arguments[0]),t&&(i.dateData=i.dateToMS(t.getFullYear(),t.getMonth()+1,t.getDate())+i.timeToMS(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}i.validateTimeZone(arguments[1])}else if(arguments.length>2)if("string"==typeof arguments[0]){const e=i.tryparseDate(arguments[0],arguments[2],arguments[1]);i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else{const e=arguments[0],t=arguments[7]||0,a=arguments[8]||0,s=arguments[9]||0,n=arguments[10]||0,r=arguments[11]||0,o=arguments[12]||0,d=arguments[13]||0,l=new Date(e,arguments[1]-1,arguments[2],arguments[3]||0,arguments[4]||0,arguments[5]||0,arguments[6]||0);e<1970&&l.setFullYear(e),i.dateData=i.dateToMS(l.getFullYear(),l.getMonth()+1,l.getDate())+i.timeToMS(l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()),i._microsecond=t,i._nanosecond=a,i._picosecond=s,i._femtosecond=n,i._attosecond=r,i._zeptosecond=o,i._yoctosecond=d,arguments[14]&&i.validateTimeZone(arguments[14])}if(i.timeZone||i.validateTimeZone("Local"),n){const e=n.toTimeZone(i.timeZone);i.dateData=e.dateData}}static validateDate(e,t,a){if(e instanceof Smart.Utilities.DateTime)return e;if(e instanceof Date)return new Smart.Utilities.DateTime(e);try{if(new RegExp(/^\d{1,2}\/\d{1,2}\/\d{4}(, \d{1,2}:\d{2}:\d{1,2} [A|P]M)?$/).test(e)){const t=new Date(e);if(!isNaN(t.getTime()))return new Smart.Utilities.DateTime(t)}if("string"==typeof e)return this.parseDateString(e,t,a);if("number"==typeof e)return new Smart.Utilities.DateTime(new Date(e))}catch(e){}return t}static parseDateString(e,t,a){const s=new Date(e);if(!isNaN(s.getTime()))return e&&"string"==typeof e&&a?new Smart.Utilities.DateTime(e,a,null):new Smart.Utilities.DateTime(s);const i=e.indexOf("Date("),n=e.indexOf("DateTime("),r=e.lastIndexOf(")");let o=e;if(-1===i&&-1===n||-1===r){const t=new Smart.Utilities.DateTime,s=t.parseDate(e,a);if(s)return o=new Smart.Utilities.DateTime(s),t.copySmallTimePartValues(o),o}else{if(o=-1!==i?e.slice(i+5,r):e.slice(n+9,r),o=o.replace(/'/g,"").replace(/"/g,"").replace(/^\s+|\s+$|\s+(?=\s)/g,""),""===o.trim())return new Smart.Utilities.DateTime;if(new RegExp(/(^(\d+)(\s*,\s*\d+)+(\s*,\s*[a-zA-Z ]+)?$)/g).test(o))return o=o.split(","),o.map((function(e,t){isNaN(o[t])?o[t]=e.trim():o[t]=parseInt(e)})),-1!==i&&o[1]++,o.unshift(null),o=new(Function.prototype.bind.apply(Smart.Utilities.DateTime,o)),o}if(""===o.trim())return t;if(!isNaN(o))return o=new Date(parseInt(o,10)),new Smart.Utilities.DateTime(o);try{const e=o.split(",");2===e.length?(e[1]=e[1].trim(),e.unshift(null),o=new(Function.prototype.bind.apply(Smart.Utilities.DateTime,e))):o=new Smart.Utilities.DateTime(o)}catch(e){o=t}return o}static fromFullTimeStamp(e){e=e.toString();const t=new Smart.Utilities.DateTime(parseFloat(e.slice(0,e.length-21)));let a=e.slice(e.length-21),s=0;for(;a.length>0;)t[t._smallUnits[s]]=parseInt(a.slice(0,3),10),a=a.slice(3),s++;return t}static getConstructorParameters(e){return[e.year(),e.month(),e.day(),e.hour(),e.minute(),e.second(),e.millisecond(),e._microsecond,e._nanosecond,e._picosecond,e._femtosecond,e._attosecond,e._zeptosecond,e._yoctosecond,e.timeZone]}static detectDisplayMode(e,t,a){if(e.calendar.patterns[t])return-1!==["d","D","M","Y","d1","d2"].indexOf(t)?"calendar":-1!==["t","T","FT","PT"].indexOf(t)?"timePicker":"default";const s=["d","M","y"],i=["h","H","m","s","t","f","u","n","p","e","a","x","o"],n=a.groups;let r=!1,o=!1;for(let e=0;e<n.length;e++){const t=n[e].charAt(0);if(-1!==s.indexOf(t)?r=!0:-1!==i.indexOf(t)&&(o=!0),r&&o)break}return r===o?"default":r?"calendar":"timePicker"}static getLocalizedNames(e){const t={names:[],namesAbbr:[],namesShort:[]},a={names:[],namesAbbr:[]};if(this[e])return this[e];for(let a=23;a<30;a++){const s=new Date(2017,6,a),i=s.toLocaleString(e,{weekday:"long"});t.names.push(i),t.namesAbbr.push(s.toLocaleString(e,{weekday:"short"})),t.namesShort.push(i.substring(0,2))}for(let t=0;t<12;t++){const s=new Date(2017,t,1).toLocaleString(e,{month:"long"});a.names.push(s),a.namesAbbr.push(s.substring(0,3))}return a.names.push(""),a.namesAbbr.push(""),this[e]={days:t,months:a},this[e]}internalMS(){return this.dateData}getDatePart(e){const t=this,a=t.internalMS();let s=parseInt(a/t.millisPerDay);const i=parseInt(s/t.daysPer400Years);s-=i*t.daysPer400Years;let n=parseInt(s/t.daysPer100Years);4===n&&(n=3),s-=n*t.daysPer100Years;const r=parseInt(s/t.daysPer4Years);s-=r*t.daysPer4Years;let o=parseInt(s/t.daysPerYear);if(4===o&&(o=3),e===t.datePartYear)return parseInt(400*i+100*n+4*r+o+1);if(s-=o*t.daysPerYear,e===t.datePartDayOfYear)return parseInt(s+1);const d=3===o&&(24!==r||3===n)?t.daysToMonth366:t.daysToMonth365;let l=s>>6;for(;s>=d[l];)l++;return e===t.datePartMonth?parseInt(l):parseInt(s-d[l-1]+1)}dayOfWeek(){const e=this.dateData;return parseInt(e/this.millisPerDay+1)%7}dayOfYear(){return this.getDatePart(this.datePartDayOfYear)}weekOfYear(e){const t=this.toDate(),a=e||this.calendar.firstDay,s=new Date(t.getFullYear(),0,1),i=Math.floor((t.getTime()-s.getTime()-6e4*(t.getTimezoneOffset()-s.getTimezoneOffset()))/864e5)+1;let n,r=s.getDay()-a;if(r=r>=0?r:r+7,r<4){if(n=Math.floor((i+r-1)/7)+1,n>52){let e=new Date(t.getFullYear()+1,0,1).getDay()-a;e=e>=0?e:e+7,n=e<4?1:53}}else n=Math.floor((i+r-1)/7);return n}subtract(e){const t=this;return new Smart.Utilities.TimeSpan(t.dateData*t.ticksPerMillisecond-e.dateData*t.ticksPerMillisecond)}dateToMS(e,t,a){const s=this;if(e>=1&&e<=9999&&t>=1&&t<=12){e=parseInt(e);const i=s.isLeapYear(e)?s.daysToMonth366:s.daysToMonth365;if(a>=1&&a<=i[t]-i[t-1]){const n=e-1;return(365*n+parseInt(n/4)-parseInt(n/100)+parseInt(n/400)+i[t-1]+a-1)*s.millisPerDay}}}isLeapYear(e){if(e<1||e>9999)throw new Error("Year out of Range");return e%4==0&&(e%100!=0||e%400==0)}timeToMS(e,t,a,s){const i=this;if(e>=0&&e<24&&t>=0&&t<60&&a>=0&&a<60){const n=parseInt(3600*e+60*t+a);return s>0&&s<1e3?n*i.millisPerSecond+s:n*i.millisPerSecond}}daysInMonth(e,t){if(t<1||t>12)throw new Error("Month out of Range");const a=this,s=a.isLeapYear(e)?a.daysToMonth366:a.daysToMonth365;return s[t]-s[t-1]}arrayIndexOf(e,t){return e.indexOf(t)}startsWith(e,t){return 0===e.indexOf(t)}endsWith(e,t){return e.substr(e.length-t.length)===t}trim(e){return(e+"").replace(this.regexTrim,"")}expandFormat(e,t){t=t||"F";let a,s=e.patterns,i=t.length;if(s[t])return s[t];if(1===i){if(a=s[t],!a)throw"Invalid date format string '"+t+"'.";t=a}else 2===i&&"%"===t.charAt(0)&&(t=t.charAt(1));return t}getEra(e,t){if(!t)return 0;if("string"==typeof e)return 0;let a,s=e.getTime();for(let e=0,i=t.length;e<i;e++)if(a=t[e].start,null===a||s>=a)return e;return 0}toUpper(e){return e.split(" ").join(" ").toUpperCase()}toUpperArray(e){const t=[];for(let a=0,s=e.length;a<s;a++)t[a]=this.toUpper(e[a]);return t}getEraYear(e,t,a,s){let i=e.getFullYear();return!s&&t.eras&&(i-=t.eras[a].offset),i}getDayIndex(e,t,a){const s=this,i=e.days;let n,r=e._upperDays;return r||(e._upperDays=r=[s.toUpperArray(i.names),s.toUpperArray(i.namesAbbr),s.toUpperArray(i.namesShort)]),t=t.toUpperCase(),a?(n=s.arrayIndexOf(r[1],t),-1===n&&(n=s.arrayIndexOf(r[2],t))):n=s.arrayIndexOf(r[0],t),n}getMonthIndex(e,t,a){const s=this;let i=e.months,n=e.monthsGenitive||e.months,r=e._upperMonths,o=e._upperMonthsGen;r||(e._upperMonths=r=[s.toUpperArray(i.names),s.toUpperArray(i.namesAbbr)],e._upperMonthsGen=o=[s.toUpperArray(n.names),s.toUpperArray(n.namesAbbr)]),t=s.toUpper(t);let d=s.arrayIndexOf(a?r[1]:r[0],t);return d<0&&(d=s.arrayIndexOf(a?o[1]:o[0],t)),d}appendPreOrPostMatch(e,t){let a=0,s=!1;for(let i=0,n=e.length;i<n;i++){const n=e.charAt(i);switch(n){case"'":s?t.push("'"):a++,s=!1;break;case"\\":s&&t.push("\\"),s=!s;break;default:t.push(n),s=!1}}return a}getTokenRegExp(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyyy|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|uu|u|nn|n|pp|p|ee|e|aa|a|xx|x|oo|o|i{1,24}|zzz|zz|z|gg|g/g}tryparseDate(e,t,a){const s=this;if(null==t&&(t=s.calendar),void 0!==a){if(Array.isArray(a))for(let i=0;i<a.length;i++){const n=s.parseDate(e,a[i],t);if(n)return n}const i=s.parseDate(e,a,t);if(i)return i}if(""===e)return null;if(null==e||e.substring||(e=e.toString()),null!=e&&"/Date("===e.substring(0,6)){const t=/^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;let a=new Date(+e.replace(/\/Date\((\d+)\)\//,"$1"));if("Invalid Date"===a){const t=e.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);a=null,t&&(a=new Date(1*t[1]+36e5*t[2]+6e4*t[3]))}if(null==a||"Invalid Date"===a||isNaN(a)){const a=t.exec(e);if(a){const e=new Date(parseInt(a[1]));if(a[2]){let t=parseInt(a[3]);"-"===a[2]&&(t=-t);const s=e.getUTCMinutes();e.setUTCMinutes(s-t)}if(!isNaN(e.valueOf()))return e}}return a}const i={smartdate:"yyyy-MM-dd HH:mm:ss",d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",ISO8601:"yyyy-MM-ddTHH:mm:ss.sssZ",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"MM-dd-yyyy",d4:"MM.dd.yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",iso:"yyyy-MM-ddTHH:mm:ssZ",iso_date1:"yyyy-MM-dd",iso_date2:"yyyy-MM-dd",iso_date3:"yyyy-ddd",iso_date4:"yyyy-MM-dd HH:mm",iso_date5:"yyyy-MM-dd HH:mm Z",iso_date6:"yyyy-MMM-dd",iso_date7:"yyyy-MM",iso_date8:"yyyy-MMM",iso_date9:"yyyy-MMMM",iso_date10:"yyyy-MMMM-dd",iso_time1:"HH:mm:ss.tttt",iso_time2:"HH:mm:ss",iso_time3:"HH:mm",iso_time4:"HH",iso_time5:"yyyyyy-MM-dd",iso_time6:"yyyyyy-MM-dd"};for(let a in i){const n=s.parseDate(e,i[a],t);if(n)return n}const n=t.patterns;for(let a in n){const i=s.parseDate(e,n[a],t);if(i){if("ISO"===a){const a=s.parseDate(e,n.ISO2,t);if(a)return a}return i}}let r;if("string"==typeof e){const a=[":","/","-"," ",","];let i="",n=e=function(e,t,a){return a.replace(new RegExp(e,"g"),t)}(", ",",",e=s.trim(e));e.indexOf(":")>=0?(i=e.substring(e.indexOf(":")-2),i=s.trim(i),n=e.substring(0,e.indexOf(":")-2)):e.toUpperCase().indexOf("AM")>=0?(i=e.substring(e.toUpperCase().indexOf("AM")-2),i=s.trim(i),n=e.substring(0,e.toUpperCase().indexOf("AM")-2)):e.toUpperCase().indexOf("PM")>=0&&(i=e.substring(e.toUpperCase().indexOf("PM")-2),i=s.trim(i),n=e.substring(0,e.toUpperCase().indexOf("PM")-2));let o=new Date,d=!1;if(n){for(let e=0;e<a.length;e++)if(n.indexOf(a[e])>=0){r=n.split(a[e]);break}if(!r)return null;let e=new Array,i=new Array,l=new Array,f=null,m=null;for(let a=0;a<r.length;a++){const i=r[a],n=s.parseDate(i,"d",t)||s.parseDate(i,"dd",t)||s.parseDate(i,"ddd",t)||s.parseDate(i,"dddd",t);if(n&&(e.push(n.getDate()),i.length>2)){f=a;break}}for(let e=0;e<r.length;e++){const a=r[e],n=s.parseDate(a,"M",t)||s.parseDate(a,"MM",t)||s.parseDate(a,"MMM",t)||s.parseDate(a,"MMMM",t);if(n){if(null!=f&&f===e)continue;if(i.push(n.getMonth()),a.length>2){m=e;break}}}for(let e=0;e<r.length;e++){const a=r[e],i=s.parseDate(a,"yyyy",t);if(i){if(null!=f&&f===e)continue;if(null!=m&&m===e)continue;l.push(i.getFullYear())}}const c=new Array;for(let t=e.length-1;t>=0;t--)for(let a=0;a<i.length;a++)for(let s=0;s<l.length;s++){const n=new Date(l[s],i[a],e[t]);l[s]<1970&&n.setFullYear(l[s]),isNaN(n.getTime())||c.push(n)}c.length>0&&(o=c[0],d=!0)}if(i){const e=i.indexOf(":")>=0?i.split(":"):i,a=s.parseDate(i,"h:mm tt",t)||s.parseDate(i,"HH:mm:ss.fff",t)||s.parseDate(i,"HH:mm:ss.ff",t)||s.parseDate(i,"h:mm:ss tt",t)||s.parseDate(i,"HH:mm:ss.tttt",t)||s.parseDate(i,"HH:mm:ss",t)||s.parseDate(i,"HH:mm",t)||s.parseDate(i,"HH",t);let n=0,r=0,l=0,f=0;a&&!isNaN(a.getTime())?(n=a.getHours(),r=a.getMinutes(),l=a.getSeconds(),f=a.getMilliseconds()):(1===e.length&&(n=parseInt(e[0])),2===e.length&&(n=parseInt(e[0]),r=parseInt(e[1])),3===e.length&&(n=parseInt(e[0]),r=parseInt(e[1]),e[2].indexOf(".")>=0?(l=parseInt(e[2].toString().split(".")[0]),f=parseInt(e[2].toString().split(".")[1])):l=parseInt(e[2])),4===e.length&&(n=parseInt(e[0]),r=parseInt(e[1]),l=parseInt(e[2]),f=parseInt(e[3]))),!o||isNaN(n)||isNaN(r)||isNaN(l)||isNaN(f)||(o.setHours(n,r,l,f),d=!0)}if(d)return o}if(null!=e){r=[":","/","-"];let t=!0;for(let a=0;a<r.length;a++)-1!==e.indexOf(r[a])&&(t=!1);if(t){const t=new Number(e);if(!isNaN(t))return new Date(t)}}return null}getParseRegExp(e,t){const a=this;let s=e._parseRegExp;if(s){const e=s[t];if(e)return e}else e._parseRegExp=s={};let i,n=a.expandFormat(e,t).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),r=["^"],o=[],d=0,l=0,f=a.getTokenRegExp();for(;null!==(i=f.exec(n));){const e=n.slice(d,i.index);if(d=f.lastIndex,l+=a.appendPreOrPostMatch(e,r),l%2){r.push(i[0]);continue}let t,s=i[0],m=s.length;switch(s){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":t="(\\D+)";break;case"tt":case"t":t="(\\D*)";break;case"yyyyy":t="(\\d{1,4})";break;case"yyyy":t="(\\d{"+m+"})";break;case"fff":case"ff":case"f":t="(\\d{1,"+m+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":t="(\\d\\d?)";break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":t="(\\d{1,3})";break;case"zzz":t="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":t="([+-]?\\d\\d?)";break;case"/":t="/";break;default:if(!/i{1,24}/.test(s))throw"Invalid date format pattern '"+s+"'.";t="(\\d{"+s.length+"})"}t&&r.push(t),"/"!==s&&o.push(i[0])}a.appendPreOrPostMatch(n.slice(d),r),r.push("$");const m={regExp:r.join("").replace(/\s+/g,"\\s+"),groups:o};return s[t]=m}outOfRange(e,t,a){return e<t||e>a}expandYear(e,t){const a=this,s=new Date,i=a.getEra(s);if(t<100){let n=e.twoDigitYearMax;n="string"==typeof n?(new Date).getFullYear()%100+parseInt(n,10):n;const r=a.getEraYear(s,e,i);(t+=r-r%100)>n&&(t-=100)}return t}padZeros(e,t){let a,s=e+"";return t>1&&s.length<t?(a=["0","00","000"][t-2]+s,a.substr(a.length-t,t)):(a=s,a)}parseDate(e,t,a){const s=this;null==a&&(a=s.calendar),e=s.trim(e);const i=a,n=s.getParseRegExp(i,t),r=new RegExp(n.regExp).exec(e);if(null===r)return null;let o,d=n.groups,l=null,f=null,m=null,c=null,u=null,p=0,y=0,g=0,h=0,T=null,S=!1;for(let e=0,t=d.length;e<t;e++){const t=r[e+1];if(t){const a=d[e],n=a.length,r=parseInt(t,10);switch(a){case"dd":case"d":if(c=r,s.outOfRange(c,1,31))return null;break;case"MMM":case"MMMM":case"MMMMM":case"MMMMMM":case"MMMMMMM":case"MMMMMMMM":if(m=s.getMonthIndex(i,t,3===n),s.outOfRange(m,0,11))return null;break;case"M":case"MM":if(m=r-1,s.outOfRange(m,0,11))return null;break;case"y":case"yy":case"yyyy":if(f=n<4?s.expandYear(i,r):r,s.outOfRange(f,0,9999))return null;break;case"h":case"hh":if(p=r,12===p&&(p=0),s.outOfRange(p,0,11))return null;break;case"H":case"HH":if(p=r,s.outOfRange(p,0,23))return null;break;case"m":case"mm":if(y=r,s.outOfRange(y,0,59))return null;break;case"s":case"ss":if(g=r,s.outOfRange(g,0,59))return null;break;case"tt":case"t":if(S=i.PM&&(t===i.PM[0]||t===i.PM[1]||t===i.PM[2]),!S&&(!i.AM||t!==i.AM[0]&&t!==i.AM[1]&&t!==i.AM[2]))return null;break;case"f":case"ff":case"fff":if(h=r*Math.pow(10,3-n),s.outOfRange(h,0,999))return null;break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":if(s.outOfRange(r,0,1e3))return null;s[s._codeToUnit[a]]=r;break;case"ddd":case"dddd":if(u=s.getDayIndex(i,t,3===n),s.outOfRange(u,0,6))return null;break;case"zzz":{const e=t.split(/:/);if(2!==e.length)return null;if(o=parseInt(e[0],10),s.outOfRange(o,-12,13))return null;const a=parseInt(e[1],10);if(s.outOfRange(a,0,59))return null;T=60*o+(s.startsWith(t,"-")?-a:a);break}case"z":case"zz":if(o=r,s.outOfRange(o,-12,13))return null;T=60*o;break;case"g":case"gg":{let e=t;if(!e||!i.eras)return null;e=this.trim(e.toLowerCase());for(let t=0,a=i.eras.length;t<a;t++)if(e===i.eras[t].nathat.toLowerCase()){l=t;break}if(null===l)return null;break}default:{let e=t;e.length%3==1?e+="00":e.length%3==2&&(e+="0"),h=parseInt(e.slice(0,3),10),e=e.slice(3);let a=0;for(;e.length>0;)s[s._smallUnits[a]]=parseInt(e.slice(0,3),10),e=e.slice(3),a++}}}}let M,D=new Date,H=i.convert;if(M=D.getFullYear(),null===f?f=M:i.eras&&(f+=i.eras[l||0].offset),null===m&&(m=0),null===c&&(c=1),H){if(D=H.toGregorian(f,m,c),null===D)return null}else{if(D.setFullYear(f,m,c),D.getDate()!==c)return null;if(null!==u&&D.getDay()!==u)return null}if(S&&p<12&&(p+=12),D.setHours(p,y,g,h),null!==T){const e=D.getMinutes()-(T+D.getTimezoneOffset());D.setHours(D.getHours()+parseInt(e/60,10),e%60)}return D}toString(e,t){const a=this;void 0===e&&(e="yyyy-MM-dd HH:mm:ss");const s=a.dateData.toString()+a.getFractionsOfSecondStamp()+e+(a.timeZone||"");if(Smart.Utilities.DateTime.cache&&Smart.Utilities.DateTime.cache[s])return Smart.Utilities.DateTime.cache[s];const i=a.toDate();if(null==t&&(t=a.calendar),"string"==typeof i)return i;if(!e||!e.length||"i"===e){let e;return e=a.formatDate(i,t.patterns.F,t),e}const n=t.eras,r="s"===e;e=a.expandFormat(t,e);const o=[];let d,l=0,f=a.getTokenRegExp();function m(e,t){if(void 0!==e.getMonth)switch(t){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate()}}for(;;){const s=f.lastIndex,c=f.exec(e),u=e.slice(s,c?c.index:e.length);if(l+=a.appendPreOrPostMatch(u,o),!c)break;if(l%2){o.push(c[0]);continue}const p=c[0],y=p.length;let g;if(/i{1,24}/.test(p))o.push(a.getFirstNDigitsOfPrecision(p.length));else switch(p){case"ddd":case"dddd":{const e=3===y?t.days.namesAbbr:t.days.names;o.push(e[i.getDay()]);break}case"d":case"dd":o.push(a.padZeros(m(i,2),y));break;case"MMM":case"MMMM":g=m(i,1),o.push(t.months[3===y?"namesAbbr":"names"][g]);break;case"M":case"MM":o.push(a.padZeros(m(i,1)+1,y));break;case"y":case"yy":case"yyyy":g=a.getEraYear(i,t,a.getEra(i,n),r),y<4&&(g%=100),o.push(a.padZeros(g,y));break;case"h":case"hh":d=i.getHours()%12,0===d&&(d=12),o.push(a.padZeros(d,y));break;case"H":case"HH":o.push(a.padZeros(i.getHours(),y));break;case"m":case"mm":o.push(a.padZeros(i.getMinutes(),y));break;case"s":case"ss":o.push(a.padZeros(i.getSeconds(),y));break;case"t":case"tt":g=i.getHours()<12?t.AM?t.AM[0]:" ":t.PM?t.PM[0]:" ",o.push(1===y?g.charAt(0):g);break;case"f":case"ff":case"fff":o.push(a.padZeros(i.getMilliseconds(),3).substr(0,y));break;case"u":case"n":case"p":case"e":case"a":case"x":case"o":o.push(a[a._codeToUnit[p]]);break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":o.push(a.padZeros(a[a._codeToUnit[p]],3));break;case"z":case"zz":o.push((a.timeZoneOffsetHours>=0?"+":"-")+a.padZeros(Math.floor(Math.abs(a.timeZoneOffsetHours)),y));break;case"zzz":o.push((a.timeZoneOffsetHours>=0?"+":"-")+a.padZeros(Math.floor(Math.abs(a.timeZoneOffsetHours)),2)+":"+a.padZeros(60*Math.abs(a.timeZoneOffsetHours%1),2));break;case"g":case"gg":t.eras&&o.push(t.eras[a.getEra(i,n)].name);break;case"/":o.push(t["/"]);break;default:throw"Invalid date format pattern '"+p+"'."}}let c=o.join("");return Smart.Utilities.DateTime.cache||(Smart.Utilities.DateTime.cache=new Array),a._today||(a._today=new Date),a.calendar&&a.calendar.today&&-1===e.indexOf(":")&&i.getFullYear()===a._today.getFullYear()&&i.getDate()===a._today.getDate()&&i.getMonth()===a._today.getMonth()&&(c=a.calendar.today),Smart.Utilities.DateTime.cache[s]=c,c}getFractionsOfSecondStamp(){const e=this;return e._microsecond.toString()+e._nanosecond+e._picosecond+e._femtosecond+e._attosecond+e._zeptosecond+e._yoctosecond}getFirstNDigitsOfPrecision(e,t){const a=this;return(""+(!0!==t?a.padZeros(a.millisecond(),3):"")+a.padZeros(a._microsecond,3)+a.padZeros(a._nanosecond,3)+a.padZeros(a._picosecond,3)+a.padZeros(a._femtosecond,3)+a.padZeros(a._attosecond,3)+a.padZeros(a._zeptosecond,3)+a.padZeros(a._yoctosecond,3)).slice(0,e)}copySmallTimePartValues(e){const t=this;e._microsecond=t._microsecond,e._nanosecond=t._nanosecond,e._picosecond=t._picosecond,e._femtosecond=t._femtosecond,e._attosecond=t._attosecond,e._zeptosecond=t._zeptosecond,e._yoctosecond=t._yoctosecond}add(e,t,a){const s=this,i=s.internalMS();if(void 0===t){if(!1===a)return s.dateData=i+parseInt(e._ticks/s.ticksPerMillisecond),s;const t=new Smart.Utilities.DateTime(i+parseInt(e._ticks/s.ticksPerMillisecond));return s.copyTimeZone(t),s.copySmallTimePartValues(t),t}const n=e*t;if(n<=-s.maxMillis||n>=s.maxMillis)throw new Error("Out of Range");if(!1===a)return s.dateData=i+n,s;const r=new Smart.Utilities.DateTime(i+n);return s.copyTimeZone(r),s.copySmallTimePartValues(r),r}addDays(e,t){return this.add(e,this.millisPerDay,t)}clone(){const e=this,t=new Smart.Utilities.DateTime(e.dateData);return e.copyTimeZone(t),e.copySmallTimePartValues(t),t}clearTime(){const e=this,t=e.month(),a=e.year(),s=e.day(),i=new Smart.Utilities.DateTime(a,t,s,0,0,0,0);return e.copyTimeZone(i),i}addHours(e,t){return this.add(e,this.millisPerHour,t)}addDeciseconds(e,t){return this.add(100*e,1,t)}addCentiseconds(e,t){return this.add(10*e,1,t)}addMilliseconds(e,t){return this.add(e,1,t)}addMinutes(e,t){return this.add(e,this.millisPerMinute,t)}addMonths(e,t){const a=this;if(e<-12e4||e>12e4)throw new Error("Invalid Months Value");let s=parseInt(a.getDatePart(a.datePartYear)),i=parseInt(a.getDatePart(a.datePartMonth)),n=parseInt(a.getDatePart(a.datePartDay));if(e%12==0)s+=e/12;else{const t=i-1+e;t>=0?(i=t%12+1,s+=t/12):(i=12+(t+1)%12,s+=(t-11)/12),s=parseInt(s)}if(s<1||s>9999)throw new Error("Year out of range");const r=a.daysInMonth(s,i);if(n>r&&(n=r),!1===t)return a.dateData=a.dateToMS(s,i,n)+a.internalMS()%a.millisPerDay,a;const o=new Smart.Utilities.DateTime(a.dateToMS(s,i,n)+a.internalMS()%a.millisPerDay);return a.copyTimeZone(o),a.copySmallTimePartValues(o),o}addSeconds(e,t){return this.add(e,this.millisPerSecond,t)}addYears(e,t){return this.addMonths(12*e,t)}addMicroseconds(e,t){if(0===e)return;const a=this;let s,i;e<0&&0===a.hour()&&0===a.minute()&&0===a.second()&&0===a.millisecond()&&0===a._microsecond&&(s=parseInt(e/1e3,10)-1,i=1e3+e%1e3);const n=1e3*a.timeToMS(a.hour(),a.minute(),a.second(),a.millisecond())+a._microsecond,r=n+e;let o;if(void 0===s&&(s=parseInt(r/1e3,10)-parseInt(n/1e3,10)),void 0===i&&(i=parseInt(r%1e3,10)),0!==s&&(o=a.addMilliseconds(s,t)),!1!==t)return o||(o=a.clone()),o._microsecond=i,o;a._microsecond=i}addFractionsOfSecond(e,t,a,s,i){if(0===e)return;const n=this,r=1e3*n[s]+n[a],o=e+r;let d,l=parseInt(o/1e3,10)-parseInt(r/1e3,10),f=parseInt(o%1e3,10);if(e<0&&o<0&&f<0&&(l--,f=1e3+f),0!==l&&(d=n[i](l,t)),!1!==t)return d||(d=n.clone()),d[a]=f,d;n[a]=f}addNanoseconds(e,t){return this.addFractionsOfSecond(e,t,"_nanosecond","_microsecond","addMicroseconds")}addPicoseconds(e,t){return this.addFractionsOfSecond(e,t,"_picosecond","_nanosecond","addNanoseconds")}addFemtoseconds(e,t){return this.addFractionsOfSecond(e,t,"_femtosecond","_picosecond","addPicoseconds")}addAttoseconds(e,t){return this.addFractionsOfSecond(e,t,"_attosecond","_femtosecond","addFemtoseconds")}addZeptoseconds(e,t){return this.addFractionsOfSecond(e,t,"_zeptosecond","_attosecond","addAttoseconds")}addYoctoseconds(e,t){return this.addFractionsOfSecond(e,t,"_yoctosecond","_zeptosecond","addZeptoseconds")}getTimeZoneOffset(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1),s=e.getTimezoneOffset()<Math.max(t.getTimezoneOffset(),a.getTimezoneOffset());return{offset:-e.getTimezoneOffset()/60,dst:+s}}isInDaylightSavingTime(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1);return this.date().getTimezoneOffset()<Math.max(t.getTimezoneOffset(),a.getTimezoneOffset())}supportsDaylightSavingTime(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1);return t.getTimezoneOffset()!==a.getTimezoneOffset()}date(){const e=this,t=e.month(),a=e.year(),s=e.day(),i=new Smart.Utilities.DateTime(a,t,s);return e.copyTimeZone(i),i}isWeekend(){return 0===this.dayOfWeek()||6===this.dayOfWeek()}toDate(e){const t=this,a=t.month(),s=t.year(),i=t.day(),n=t.hour(),r=t.minute(),o=t.second(),d=t.millisecond();let l=new Date(s,a-1,i);if(s<1970&&l.setFullYear(s),l.setHours(n,r,o,d),e){const a=t.timeZones.filter((function(t){return t.id===e}));if(a.length){let e=a[0].offset;const s=l.getTime();let i=60*l.getTimezoneOffset()*1e3;if(t.timeZone){const e=t.timeZones.filter((function(e){return e.id===t.timeZone}));e.length&&(i=60*-e[0].offset*1e3)}l=new Date(s+i+6e4*e)}}return l}toTimeZone(e){const t=this;let a=e;if(null==a&&(a="Local"),t.timeZone===a)return t.clone();const s=t.timeZones.filter((function(e){return e.id===a}));if(0===s.length)return t.clone();const i=this.toDate(a),n=new Smart.Utilities.DateTime(i);return n.timeZone=a,n.timeZoneOffset=s[0].offset,n.timeZoneOffsetHours=s[0].offsetHours,t.copySmallTimePartValues(n),n}day(){return this.getDatePart(this.datePartDay)}month(){return this.getDatePart(this.datePartMonth)}year(){return this.getDatePart(this.datePartYear)}millisecond(){return parseInt(this.internalMS()%1e3)}hour(){return parseInt(Math.floor(this.internalMS()/this.millisPerHour)%24)}minute(){return parseInt(this.internalMS()/this.millisPerMinute%60)}second(){return parseInt(this.internalMS()/this.millisPerSecond%60)}microsecond(){return this._microsecond}nanosecond(){return this._nanosecond}picosecond(){return this._picosecond}femtosecond(){return this._femtosecond}attosecond(){return this._attosecond}zeptosecond(){return this._zeptosecond}yoctosecond(){return this._yoctosecond}valueOf(){return this.dateData}equals(e){const t=this;return t.dateData===e.dateData&&t._microsecond===e._microsecond&&t._nanosecond===e._nanosecond&&t._picosecond===e._picosecond&&t._femtosecond===e._femtosecond&&t._attosecond===e._attosecond&&t._zeptosecond===e._zeptosecond&&t._yoctosecond===e._yoctosecond}equalDateParts(e){const t=this;return t.year()===e.year()&&t.month()===e.month()&&t.day()===e.day()}compare(e){const t=this;if(t.equals(e))return 0;const a=["dateData","_microsecond","_nanosecond","_picosecond","_femtosecond","_attosecond","_zeptosecond","_yoctosecond"];for(let s=0;s<a.length;s++){const i=a[s];if(t[i]>e[i])return 1;if(t[i]<e[i])return-1}return 0}toDateString(){return this.toDate().toDateString()}toLocaleDateString(){return this.toDate().toLocaleDateString(this.calendar.locale)}toLocaleString(){return this.toDate().toLocaleString(this.calendar.locale)}toLocaleTimeString(){return this.toDate().toLocaleTimeString(this.calendar.locale)}validateTimeZone(e){const t=this;if("string"!=typeof e)return;const a=t.timeZones.filter((function(t){return t.id===e}));0!==a.length&&(t.timeZone=e,t.timeZoneOffset=a[0].offset,t.timeZoneOffsetHours=a[0].offsetHours)}copyTimeZone(e){const t=this;e.timeZone=t.timeZone,e.timeZoneOffset=t.timeZoneOffset,e.timeZoneOffsetHours=t.timeZoneOffsetHours}getTimeStamp(){return new Smart.Utilities.BigNumber(this.dateData.toString()+this.getFirstNDigitsOfPrecision(void 0,!0))}})})();
783
783
 
784
784
  /***/ }),
785
785
 
@@ -800,7 +800,7 @@ Smart("smart-drop-down-list",class extends Smart.ContentElement{static get prope
800
800
  /***/ 6802:
801
801
  /***/ (() => {
802
802
 
803
- Smart.Utilities.Assign("DataExporter",class{constructor(e,t,a,o){const l=this;e||(e={}),l.style=e.style,l.header=e.header,l.exportHeader=void 0===e.exportHeader||e.exportHeader,l.hierarchical=e.hierarchical,l.expandChar=e.expandChar||"+",l.collapseChar=e.collapseChar||"-",l.pageOrientation=e.pageOrientation,l.allowNull=e.allowNull||!1,!l.hierarchical&&t&&t.length>0?l.groupBy=t:l.mergedCells=e.mergedCells,!l.groupBy&&a&&Object.keys(a).length>0&&(l.filterBy=a),o&&(l.conditionalFormatting=o),l.timeBetween1900And1970=new Date(1970,0,1).getTime()-new Date(1900,0,1).getTime()}downloadFile(e,t,a){let o;if(!a)return e;if(o=e instanceof Blob?e:new Blob([e],{type:t}),window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(o,a);else{const e=document.createElement("a"),t=URL.createObjectURL(o);e.href=t,e.download=a,e.style.position="absolute",e.style.visibility="hidden",document.body.appendChild(e),e.click(),setTimeout((function(){document.body.removeChild(e),window.URL.revokeObjectURL(t)}),100)}}exportData(e,t,a,o){const l=this;if(l.actualHierarchy=l.hierarchical,t=t.toLowerCase(),l.exportHeader&&(l.header?(0===(e=e.slice(0)).length&&(l.actualHierarchy=!1),l.processComplexHeader(l.header,e,t)):1===e.length&&(l.actualHierarchy=!1)),0===e.length)return void console.warn("No data to export.");"xlsx"===t&&(l.xlsxStartIndex=l.complexHeader?l.complexHeader.length:+l.exportHeader),l.actualHierarchy&&(e=l.processHierarchicalData(e,t)),l.getDatafields(e),a&&a.slice(a.length-t.length-1,a.length)!=="."+t&&(a+="."+t);let r=null;switch(t){case"csv":r=l.exportToCSVAndTSV(e,{delimiter:", ",MIME:"text/csv",toRemove:2},a);break;case"html":r=l.exportToHTML(e,a);break;case"jpeg":case"png":l.exportToImage(e,a,t,o);break;case"json":r=l.exportToJSON(e,a);break;case"pdf":r=l.exportToPDF(e,a);break;case"tsv":r=l.exportToCSVAndTSV(e,{delimiter:"\t",MIME:"text/tab-separated-values",toRemove:1},a);break;case"xlsx":r=l.exportToXLSX(e,a);break;case"xml":r=l.exportToXML(e,a);break;case"md":r=l.exportToMD(e,a)}return o&&r&&o(r),delete l.complexHeader,r}exportToCSVAndTSV(e,t,a){const o=this,l=o.datafields;let r="";for(let a=0;a<e.length;a++){const n=e[a];let s="";for(let e=0;e<l.length;e++)o.actualHierarchy&&0===e?s+=('""'+t.delimiter).repeat(n._level-1)+'"'+n[l[e]]+'"'+t.delimiter+('""'+t.delimiter).repeat(o.maxLevel-n._level):s+='"'+n[l[e]]+'"'+t.delimiter;s=s.slice(0,s.length-t.toRemove)+"\n",r+=s}return this.downloadFile(r,t.MIME,a)}exportToHTML(e,t){const a=this,o=a.datafields,l=a.style;let r="",n=0,s="";e=a.processGroupingInformation(e),a.data=e,a.exportHeader&&(r=a.getHTMLHeader(o,e),n=1),arguments[2]&&(s=`<script type="text/javascript" src="${Array.from(document.getElementsByTagName("script")).find((e=>-1!==e.src.indexOf("html2canvas"))).src}"><\/script>`);let i=`<!DOCTYPE html>\n<html>\n<head>\n <meta charset="UTF-8">\n <style type="text/css">\n${a.getRowStyle()}${a.getColumnStyle()}\n </style>${s}${a.toggleableFunctionality()}\n</head>\n<body>\n <table${a.getTableStyle()}>${r}\n <tbody>\n`;const c={},p={},m=[];a.getMergedCellsInfo(c,p);e:for(let r=n;r<e.length;r++){const s=e[r],f=r-n;let d=a.getAlternationIndex(f," rowN"),h="",g="",u="",y=0;if(a.actualHierarchy)s._collapsed&&(h=" collapsed"),g=` level="${s._level}"`;else if(a.groupBy)for(let e=0;e<a.groupBy.length;e++){const t=a.groupBy[e],o=s[t],l=a.groups[t][o];if(u+=o,-1===m.indexOf(u)){i+=` <tr class="row">\n <td class="column group" style="padding-left: ${25*y}px;" colspan="${a.datafields.length}">${l}</td>\n </tr>`,m.push(u),r--;continue e}y++}let x=` <tr class="row row${f}${d}${h}"${g}`;t||(x+=' style="page-break-inside: avoid;"'),x+=">\n";for(let e=0;e<o.length;e++){const t=e+","+f;let r=1,n=1;if(c[t])r=c[t].colspan,n=c[t].rowspan;else if(p[t])continue;const i=o[e];let m=s[i],d="";if(a.actualHierarchy&&0===e){let e="";s._expanded?e=a.collapseChar:!1===s._expanded&&(e=a.expandChar),d=`<div class="toggle-element" style="margin-left: ${25*(s._level-1)+5}px;" expanded>${e}</div>`}m=a.getFormattedValue(m,i);let h="";if(l&&l.columns&&l.columns[i]&&l.columns[i][f]){const e=l.columns[i][f];h+=`border-color: ${e.border}; background-color: ${e.background}; color: ${e.color};"`}0===e&&y>1&&(h+=`padding-left: ${25*(y-1)}px;"`),h&&(h=` style="${h}"`),x+=` <td class="column column${i}"${h} colspan="${r}" rowspan="${n}">${d+m}</td>\n`}i+=x+" </tr>\n"}return i+=" </tbody>\n </table>\n</body>\n</html>",arguments[2]?i:this.downloadFile(i,"text/html",t)}exportToImage(e,t,a,o){try{html2canvas}catch(e){throw new Error("smart-grid: Missing reference to 'html2canvas.min.js'.")}let l=null;const r=this.exportToHTML(e,t,!0),n=document.createElement("iframe");return n.style.position="absolute",n.style.top=0,n.style.left=0,n.style.border="none",n.style.width="100%",n.style.height="100%",n.style.opacity=0,n.style.pointerEvents="none",document.body.appendChild(n),n.contentDocument.write(r),function e(){n.contentDocument.body&&n.contentDocument.body.firstElementChild?n.contentWindow.html2canvas(n.contentDocument.body.firstElementChild).then((e=>{const r=new Smart.Utilities.Draw(document.createElement("div"));l=e.toDataURL("image/png"),o?o(l):(document.body.appendChild(e),r.exportImage(void 0,e,a,t)),n.remove(),e.remove()})):requestAnimationFrame(e)}(),l}getMergedCellsInfo(e,t,a){const o=this;if(!o.mergedCells)return;const l=a&&0!==a[o.datafields.length-1];o.mergedCellsPDF=o.mergedCells.slice(0);for(let r=0;r<o.mergedCellsPDF.length;r++){const n=o.mergedCellsPDF[r];let s=n.colspan,i=n.rowspan;if(i<2&&s<2)continue;const c=n.cell[1];let p=n.cell[0];if(l&&s>1){const e=a[p],t=a[p+s-1],l=[];if(t>e){let r=e,n=p,m=0;e:for(let o=e;o<=t;o++){let e=n,t=0;for(;a[n]===r;)if(n++,m++,t++,m===s){l.push({start:e,span:t});break e}l.push({start:e,span:t}),r=a[n]}s=l[0].span;for(let e=1;e<l.length;e++)o.mergedCellsPDF.push({cell:[l[e].start,c],colspan:l[e].span,rowspan:i,originalCell:p})}}for(let a=p;a<p+s;a++)for(let o=c;o<c+i;o++){const l=a+","+o;a!==p||o!==c?t[l]=!0:e[l]={colspan:s,rowspan:i,originalCell:n.originalCell}}}}getAlternationIndex(e,t){if(!this.style)return"";const a=this.style.rows;return a&&a.alternationCount&&((void 0===a.alternationStart||e>=a.alternationStart)&&(void 0===a.alternationEnd||e<=a.alternationEnd)||a.alternationStart===a.alternationEnd)?t+e%a.alternationCount:""}getFormattedValue(e,t){const a=this,o=a.style;if(null===e)return a.allowNull?"null":"";if(t&&o&&o.columns&&o.columns[t]&&o.columns[t].format){if("number"==typeof e)return a.formatNumber(e,o.columns[t].format);if(e instanceof Date)return a.formatDate(e,o.columns[t].format)}else if(e instanceof Date)return a.formatDate(e,"d");return e}exportToJSON(e,t){return this.downloadFile(JSON.stringify(e,this.datafields.concat("rows")),"application/json",t)}exportToMD(e,t){const a=this.datafields;let o="";for(let t=0,l=e.length;t<l;t+=1)for(let l=0,r=a.length;l<r;l+=1){const r=e[t][a[l]];"string"==typeof r&&(o+=r)}return this.downloadFile(o,"application/text",t)}exportToPDF(e,t){try{pdfMake}catch(e){throw new Error("Missing reference to 'pdfmake.min.js'.")}const a=this,o=a.datafields,l=+a.exportHeader,r=[],n={},s={},i={},c=l?a.complexHeader?a.complexHeader.length:1:0,p={pageOrientation:a.pageOrientation||"portrait"};let m,f=[],d=[];function h(){let e=[];for(let t=0;t<m.length;t++)e.push([]);return e}e=a.processGroupingInformation(e),a.data=e,a.headerRows=c,a.getPDFStyle();const g=a.styleInfo;m=g?a.wrapPDFColumns(p,i):[{body:f,datafields:o}],l&&(f=a.getPDFHeader(o,m,i)),a.getMergedCellsInfo(n,s,i);e:for(let t=l;t<e.length;t++){const c=e[t];let p="",f=0;if(a.groupBy)for(let e=0;e<a.groupBy.length;e++){const o=a.groupBy[e],l=c[o],n=a.groups[o][l];if(p+=l,-1===r.indexOf(p)){a.createGroupHeaderRow(m,{text:n,style:["row","cell","group"],marginLeft:7.5*f}),r.push(p),t--;continue e}f++}const d=h(),g=t-l;let u=a.getAlternationIndex(g,"");for(let e=0;e<o.length;e++){const t=o[e],l={style:["row","row"+g,"cell","cell"+t]},r=i[e]||0;if(void 0!==u&&l.style.splice(1,0,"rowN"+u),a.mergedCellsPDF){const t=e+","+g,a=n[t];if(a){if(l.colSpan=a.colspan,l.rowSpan=a.rowspan,void 0!==a.originalCell){l.text="",l.style[l.style.length-1]="cell"+o[a.originalCell],d[r].push(l);continue}}else if(s[t]){d[r].push({});continue}}const p=a.getFormattedValue(c[t],t);l.text=p.toString(),a.getUniqueStylePDF(l,t,g),a.setIndentation(l,{j:e,currentRecord:c,value:p,outlineLevel:f}),d[r].push(l)}for(let e=0;e<m.length;e++)m[e].body.push(d[e])}if(g){for(let e=0;e<m.length;e++){const t=m[e].body;for(let a=c-1;a>=0;a--)t.unshift(f[e][a]);d.push({table:{headerRows:c,widths:m[e].widths,heights:function(e){return g.heights[e]?g.heights[e]:g.defaultHeight?g.defaultHeight:void 0},body:t},pageBreak:"after"})}delete d[m.length-1].pageBreak,p.styles=g.styles}else{const e=m[0].body;for(let t=c-1;t>=0;t--)e.unshift(f[0][t]);d=[{table:{headerRows:c,body:e}}],p.styles={header:{bold:!0},group:{bold:!0}}}p.content=d,pdfMake.createPdf(p).download(t),delete a.mergedCellsPDF,delete a.styleInfo}getPDFStyle(){const e=this,t=e.style;if(!t)return"";const a=e.data[0],o=t.header,l=t.columns,r=t.rows,n={heights:[],widths:Array(e.datafields.length).fill("*"),styles:{header:{},row:{},cell:{},group:{fillColor:"#FFFFFF",color:"#000000",bold:!0}}};function s(t,o){if(t)for(let l in t)if(Object.prototype.hasOwnProperty.call(t,l))if(void 0===a[l])if("height"===l&&"header"===o)for(let a=0;a<e.headerRows;a++)n.heights[a]=parseInt(t[l],10)/e.headerRows/1.4;else e.storePDFStyle({prop:l,value:t[l],toUpdate:o});else for(let a in t[l]){if(!isNaN(a)||!Object.prototype.hasOwnProperty.call(t[l],a))continue;const r=t[l][a],s=e.datafields.indexOf(l);"width"===a&&"*"===n.widths[s]?n.widths[s]=r:e.storePDFStyle({prop:a,value:r,toUpdate:o+l})}}if(e.styleInfo=n,s(o,"header"),s(l,"cell"),r){for(let t in r){if(!Object.prototype.hasOwnProperty.call(r,t)||-1!==t.indexOf("alt"))continue;const a=r[t];if(isNaN(t))"height"===t?n.defaultHeight=parseFloat(a)/1.4:e.storePDFStyle({prop:t,value:a,toUpdate:"row"});else for(let o in a)Object.prototype.hasOwnProperty.call(a,o)&&("height"===o?n.heights[parseFloat(t)+e.headerRows]=parseFloat(a[o])/1.4:e.storePDFStyle({prop:o,value:a[o],toUpdate:"row"+t}))}if(r.alternationCount)for(let e=0;e<r.alternationCount;e++){const t={};r[`alternationIndex${e}Color`]&&(t.color=r[`alternationIndex${e}Color`]),r[`alternationIndex${e}BackgroundColor`]&&(t.fillColor=r[`alternationIndex${e}BackgroundColor`]),n.styles["rowN"+e]=t}}}storePDFStyle(e){const t=this;let a=t.styleInfo.styles[e.toUpdate];a||(a={},t.styleInfo.styles[e.toUpdate]=a);let o=e.value;switch(e.prop){case"backgroundColor":a.fillColor=o;break;case"color":a.color=o;break;case"fontSize":a.fontSize=parseFloat(o);break;case"fontStyle":"italic"===o&&(a.italics=!0);break;case"fontWeight":"bold"===o&&(a.bold=!0);break;case"textAlign":a.alignment=o}}wrapPDFColumns(e,t){const a=this,o=this.styleInfo,l="portrait"===e.pageOrientation?655:1155,r=[];let n=0;for(let e=0;e<o.widths.length;e++){let s,i=o.widths[e];if("*"===i?s=l/6:"string"==typeof i&&-1!==i.indexOf("%")?(s=Math.min(l,Math.floor(parseFloat(i)/100*l)),s===l&&(i="*")):(i=parseFloat(i),i>=l?(s=l,i="*"):(s=i,i/=1.4)),void 0===r[n]){const o=[];r[n]={body:o,width:s,widths:[i],datafields:[a.datafields[e]]},t[e]=n;continue}const c=r[n];c.width+s>l?(n++,e--):(t[e]=n,c.width+=s,c.widths.push(i),c.datafields.push(a.datafields[e]))}return r}getPDFHeader(e,t,a){const o=this,l=[],r=o.headerRows,n=[],s=[];let i,c,p=[];o.complexHeader?(i=o.complexHeader,c=o.complexDataFieldsHeader):(i=[Object.values(o.data[0])],c=i);for(let e=0;e<r;e++){const t=i[e],o=c[e];for(let l=0;l<t.length;l++){let r=a[l]||0;n[r]||(n[r]=[],s[r]=[]),n[r][e]||(n[r][e]=[],s[r][e]=[]),n[r][e].push(t[l]),s[r][e].push(o[l])}}function m(e,t,a,o){for(let l=0;l<r;l++){const n=e[l],s=t[l],i=[];for(let e=0;e<n.length;e++){const a=s[e];let c=1,p=1;if(s[e-1]&&s[e-1]===a||t[l-1]&&t[l-1][e]===a){i.push({});continue}let m=e+1;for(;s[m]&&s[m]===s[m-1];)c++,m++;for(m=l+1;t[m]&&t[m][e]===a;)p++,m++;const f=l===r-1||p+l===r?o.datafields[e]:null,d={text:n[e],colSpan:c,rowSpan:p};f?d.style=["header","header"+f]:(d.alignment="center",d.style="header"),i.push(d)}a.push(i)}}for(let e=0;e<t.length;e++)p=[],m(n[e],s[e],p,t[e]),l.push(p);return l}createGroupHeaderRow(e,t){for(let a=0;a<e.length;a++){const o=Object.assign({},t),l=e[a].datafields.length,r=[o];o.colSpan=l,r.length=l,r.fill({},1,l-1),e[a].body.push(r)}}getUniqueStylePDF(e,t,a){const o=this.style;if(!o||!o.columns||!o.columns[t])return;const l=o.columns[t][a];l&&(e.fillColor=function(e){const t=/rgba\((\d+),(\d+),(\d+)\,(\d*.\d+|\d+)\)/gi.exec(e.replace(/\s/g,""));if(null===t)return e;const a=parseFloat(t[1]).toString(16).toUpperCase(),o=parseFloat(t[2]).toString(16).toUpperCase(),l=parseFloat(t[3]).toString(16).toUpperCase();return"#"+"0".repeat(2-a.length)+a+"0".repeat(2-o.length)+o+"0".repeat(2-l.length)+l}(l.background),e.color=l.color.toLowerCase())}setIndentation(e,t){if(0!==t.j)return;const a=this;if(a.actualHierarchy){const o=t.currentRecord;void 0!==o._expanded?(e.marginLeft=25*(o._level-1),e.text=a.collapseChar+" "+t.value):e.marginLeft=25*(o._level-1)+6}else t.outlineLevel>1&&(e.marginLeft=7.5*(t.outlineLevel-1))}exportToXLSX(e,t){try{JSZip}catch(e){throw new Error("Missing reference to 'jszip.min.js'.")}const a=this;let o=a.style;if(e=a.processGroupingInformation(e,!0),a.data=e,a.getColumnsArray(),a.complexHeaderMergedCells=[],a.complexHeaderMergeInfo)for(let e in a.complexHeaderMergeInfo)if(Object.prototype.hasOwnProperty.call(a.complexHeaderMergeInfo,e)){const t=a.complexHeaderMergeInfo[e];if(t.from[0]===t.to[0]&&t.from[1]===t.to[1])continue;a.complexHeaderMergedCells.push({from:a.columnsArray[t.from[1]]+(t.from[0]+1),to:a.columnsArray[t.to[1]]+(t.to[0]+1)})}a.getConditionalFormatting(),o||(o=a.generateDefaultStyle(e));const l=a.generateSharedStrings(e),r=l.collection,n=l.xml,s=a.generateStyles(o),i=a.groupBy?a.generateSheet1WithGrouping(e,r):a.generateSheet1(e,r),c=a.generateAuxiliaryFiles(),p=new JSZip,m=p.folder("_rels"),f=p.folder("docProps"),d=p.folder("xl"),h=d.folder("_rels"),g=d.folder("theme"),u=d.folder("worksheets");m.file(".rels",c._relsRels),f.file("app.xml",c.docPropsAppXml),f.file("core.xml",c.docPropsCoreXml),h.file("workbook.xml.rels",c.xl_relsWorkbookXmlRels),g.file("theme1.xml",c.xlThemeTheme1Xml),u.file("sheet1.xml",i),d.file("sharedStrings.xml",n),d.file("styles.xml",s),d.file("workbook.xml",c.xlWorkbookXml),p.file("[Content_Types].xml",c.Content_TypesXml),p.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}).then((function(e){return a.downloadFile(e,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",t)})),delete a.conditionalFormattingXLSX,delete a.complexHeaderMergeInfo,delete a.defaultRowHeight,delete a.rowHeight}processGroupingInformation(e,t){const a=this;if(!a.groupBy)return e;let o;if(e=e.slice(0),a.exportHeader&&(t&&a.complexHeader?(o=e.slice(0,a.complexHeader.length),e.splice(0,a.complexHeader.length)):(o=[e[0]],e.splice(0,1))),e.length>1){const t=function(e,t){let a;switch(t||typeof e){case"string":a=(new Intl.Collator).compare;break;case"number":a=function(e,t){return e-t};break;case"boolean":case"bool":a=function(e,t){return e===t?0:!1===e?-1:1};break;case"date":case"time":case"dateTime":e instanceof Date?a=function(e,t){return e.getTime()-t.getTime()}:(e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber)&&(a=function(e,t){return e.compare(t)});break;case"object":if(e instanceof Date)a=function(e,t){return e.getTime()-t.getTime()};else if(e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber)a=function(e,t){return e.compare(t)};else if(e instanceof Smart.Utilities.Complex||window.NIComplex&&e instanceof window.NIComplex){const e=new Smart.Utilities.ComplexNumericProcessor;a=function(t,a){return e.compareComplexNumbers(t,a)}}}return a};!function(e,a,o,l){if(!e||!Array.isArray(e)||0===e.length||!a||Array.isArray(a)&&0===a.length)return;"string"==typeof a&&(a=[a]);const r=[],n=[];void 0===o&&(o=[]);for(let l=0;l<a.length;l++)void 0===o[l]||"asc"===o[l]||"ascending"===o[l]?r[l]=1:r[l]=-1,n[l]=t(e[0][a[l]]);l?l(e,a,o,n):e.sort((function(e,t){for(let o=0;o<a.length;o++){const l=n[o](e[a[o]],t[a[o]]);if(0===l){if(a[o+1])continue;return void 0!==e._index?(e._index-t._index)*r[o]:0}return l*r[o]}}))}(e,a.groupBy)}return o&&(e=o.concat(e)),a.getGroupLabels(e),e}exportToXML(e,t){const a=this.datafields.slice(0);let o='<?xml version="1.0" encoding="UTF-8" ?>\n<table>\n';return-1===a.indexOf("rows")&&a.push("rows"),o+=function e(t,o){let l="";for(let r=0;r<t.length;r++){const n=t[r];l+=o+"<row>\n";for(let t=0;t<a.length;t++){const r=a[t];if("rows"!==r)l+=o+` <${r}>${n[r]}</${r}>\n`;else{if(!n.rows)continue;l+=`${o} <rows>\n${e(n.rows,o+" ")}${o} </rows>\n`}}l+=o+"</row>\n"}return l}(e," ")+"</table>",this.downloadFile(o,"application/xml",t)}formatDate(e,t){if(!Smart.Utilities.DateTime)return e;try{return new Smart.Utilities.DateTime(e).toString(t)}catch(t){return e}}formatNumber(e,t){if(!Smart.Utilities.NumberRenderer)return e;const a=(new Smart.Utilities.NumberRenderer).formatNumber(e,t);return void 0===a?e:a}generateAuxiliaryFiles(){const e=(new Date).toISOString();return{_relsRels:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',docPropsAppXml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>',docPropsCoreXml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>Smart HTML Elements</dc:creator><cp:lastModifiedBy>Smart HTML Elements</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">${e}</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">${e}</dcterms:modified></cp:coreProperties>`,xl_relsWorkbookXmlRels:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>',xlThemeTheme1Xml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri Light" panose="020F0302020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Calibri" panose="020F0502020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{62F939B6-93AF-4DB8-9C6B-D6C7DFDC589F}" vid="{4A3C46E8-61CC-4603-A589-7422A47A8E4A}"/></a:ext></a:extLst></a:theme>',xlWorkbookXml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15 xr xr6 xr10 xr2" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr6="http://schemas.microsoft.com/office/spreadsheetml/2016/revision6" xmlns:xr10="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"><fileVersion appName="xl" lastEdited="7" lowestEdited="7" rupBuild="20325"/><workbookPr defaultThemeVersion="166925"/><mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice Requires="x15"><x15ac:absPath url="C:UsersjqwidgetsDesktop" xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/></mc:Choice></mc:AlternateContent><xr:revisionPtr revIDLastSave="0" documentId="13_ncr:1_{0DEDCB6D-5403-4CD8-AAA5-59B6D238A8B6}" xr6:coauthVersionLast="34" xr6:coauthVersionMax="34" xr10:uidLastSave="{00000000-0000-0000-0000-000000000000}"/><bookViews><workbookView xWindow="0" yWindow="0" windowWidth="19200" windowHeight="6950" xr2:uid="{0CB664E6-3800-4A88-B158-B46A682E7484}"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><calcPr calcId="179021"/><extLst><ext uri="{140A7094-0E35-4892-8432-C4D2E57EDEB5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:workbookPr chartTrackingRefBase="1"/></ext></extLst></workbook>',Content_TypesXml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="bin" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings"/><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>'}}generateDefaultStyle(e){const t=this,a={},o=t.datafields,l=t.complexHeader?e[t.complexHeader.length]:e[+t.exportHeader];if(!l)return a;for(let e=0;e<o.length;e++)l[o[e]]instanceof Date&&(a.columns||(a.columns=[]),a.columns[o[e]]={format:"d"});return a}generateGroupRow(e){const t=e.rowNumber,a="A"+t,o=` <row r="${t}" outlineLevel="${e.outlineLevel}" spans="1:${e.numberOfColumns}"${this.getCustomRowHeight(t-1)} x14ac:dyDescent="0.45">\n <c r="${a}" t="s" s="0">\n <v>${e.sharedStringIndex}</v>\n </c>\n </row>\n`;return e.mergedCells.push({from:a,to:this.columnsArray[e.numberOfColumns-1]+t}),o}generateSharedStrings(e){const t=this,a=t.datafields,o=[];let l="",r=0,n=0;function s(e){r++,-1===o.indexOf(e)&&(n++,o.push(e),e=(e=(e=(e=(e=e.replace(/&(?!amp;)/g,"&amp;")).replace(/'/g,"&apos;")).replace(/"/g,"&quot;")).replace(/>/g,"&gt;")).replace(/</g,"&lt;"),l+=`<si><t>${e}</t></si>`)}for(let o=0;o<e.length;o++){const l=e[o];for(let e=0;e<a.length;e++){let o=l[a[e]];null!==o||t.allowNull||(o=""),"string"==typeof o&&s(o)}}if(t.groupLabels)for(let e=0;e<t.groupLabels.length;e++)s(t.groupLabels[e]);return l=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="${r}" uniqueCount="${n}">${l}</sst>`,{collection:o,xml:l}}generateSheet1(e,t){const a=this,o=a.columnsArray.length,l=e.length,r=a.columnsArray[o-1]+l,n=a.datafields,s=a.getFilters(),i=[].concat(a.complexHeaderMergedCells);let c=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac xr xr2 xr3" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xr:uid="{7F25248B-C640-4C64-AD47-C0EA0E5D90D0}">\n <sheetPr filterMode="${""!==s}" />\n <dimension ref="A1:${r}" />\n <sheetViews>\n <sheetView tabSelected="1" workbookViewId="0" />\n </sheetViews>\n <sheetFormatPr defaultRowHeight="14.5" x14ac:dyDescent="0.35" />${a.getCustomColumnWidths()}\n <sheetData>\n`;function p(e,t){return a.columnsArray[e]+t}for(let l=0;l<=e.length;l++){const r=e[l],s=l+1;let i="";if(a.actualHierarchy){const t=e[l-1];t&&t._collapsed&&(!r||t._level>r._level)&&(i=' collapsed="true"')}if(l===e.length){i&&(c+=` <row r="${s}" outlineLevel="${Math.max(e[l-1]._level-2,0)}" hidden="false" collapsed="true" />\n`);break}let m=` <row r="${s}"${a.getOutlineLevel(r)} hidden="${r._hidden||r._collapsed||!1}"${i} spans="1:${o}"${a.getCustomRowHeight(s-1)} x14ac:dyDescent="0.45">\n`;for(let e=0;e<n.length;e++){const o=a.getXLSXCellStyle(p(e,s));m+=a.getActualCellData(r[n[e]],{r:p(e,s),s:o},t)}m+=" </row>\n",c+=m}return c+=` </sheetData>${a.conditionalFormattingXLSX.conditions}${s}${a.getMergedCells(i)}\n <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" />\n <pageSetup paperSize="9" orientation="portrait" r:id="rId1" />\n</worksheet>`,c}generateSheet1WithGrouping(e,t){const a=this,o=a.columnsArray.length,l=e.length,r=a.columnsArray[o-1]+l,n=a.datafields,s=[].concat(a.complexHeaderMergedCells);let i=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac xr xr2 xr3" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xr:uid="{7F25248B-C640-4C64-AD47-C0EA0E5D90D0}">\n <dimension ref="A1:${r}" />\n <sheetViews>\n <sheetView tabSelected="1" workbookViewId="0" />\n </sheetViews>\n <sheetFormatPr defaultRowHeight="14.5" x14ac:dyDescent="0.35" />${a.getCustomColumnWidths()}\n <sheetData>\n`,c=0,p=[];function m(e,t){return a.columnsArray[e]+t}e:for(let l=0;l<e.length;l++){const r=e[l],f=l+1+c;let d=0,h="";if(!a.exportHeader||!a.complexHeader&&0!==l||a.complexHeader&&l>=a.complexHeader.length){let e="";for(let n=0;n<a.groupBy.length;n++){const m=a.groupBy[n],h=r[m],g=a.groups[m][h];if(e+=h,-1===p.indexOf(e)){let r=t.indexOf(g);i+=a.generateGroupRow({rowNumber:f,outlineLevel:d,numberOfColumns:o,sharedStringIndex:r,mergedCells:s}),p.push(e),l--,c++;continue e}d++}h=` outlineLevel="${d}"`}let g=` <row r="${f}"${h} spans="1:${o}"${a.getCustomRowHeight(f-1)} x14ac:dyDescent="0.45">\n`;for(let e=0;e<n.length;e++){const o=a.getXLSXCellStyle(m(e,l+1));g+=a.getActualCellData(r[n[e]],{r:m(e,f),s:o},t)}g+=" </row>\n",i+=g}return i+=` </sheetData>${a.getMergedCells(s)}\n <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" />\n <pageSetup paperSize="9" orientation="portrait" r:id="rId1" />\n</worksheet>`,i}getActualCellData(e,t,a){const o=t.r,l=t.s||' s="0"';return null!==e||this.allowNull||(e=""),"string"==typeof e?` <c r="${o}" t="s"${l}>\n <v>${a.indexOf(e)}</v>\n </c>\n`:"boolean"==typeof e?` <c r="${o}" t="b"${l}>\n <v>${+e}</v>\n </c>\n`:e instanceof Date?` <c r="${o}"${l}>\n <v>${(e.getTime()+this.timeBetween1900And1970)/864e5+2}</v>\n </c>\n`:` <c r="${o}"${l}>\n <v>${e}</v>\n </c>\n`}getColumnsArray(){const e=this.datafields.length,t=[];function a(e){return e<26?"":String.fromCharCode(64+Math.floor(e/26))}for(let o=0;o<e;o++)t.push(a(o)+String.fromCharCode(65+(o<26?o:o%26)));this.columnsArray=t}getColumnStyle(){const e=this,t=e.style;if(!t)return" .header { border: 1px solid black; padding: 5px; }\n .column { border: 1px solid black; padding: 5px; }\n .group { background-color: #FFFFFF; color: #000000; font-weight: bold; }";let a;a=t.removeDefault?{header:"",column:"",group:""}:{header:"border: 1px solid black; padding: 5px; ",column:"white-space: nowrap; overflow: hidden; border: 1px solid black; padding: 5px; ",group:"background-color: #FFFFFF; color: #000000; font-weight: bold; "};const o=e.data[0];let l="";const r=t.header||{};for(let t in r){if(!Object.prototype.hasOwnProperty.call(r,t))continue;const l=r[t];if(o[t]){a["header"+t]||(a["header"+t]="");for(let e in l)if(Object.prototype.hasOwnProperty.call(l,e)){const o=Smart.Utilities.Core.toDash(e)+": "+l[e]+"; ";a["header"+t]+=o,"width"===e&&(a["column"+t]||(a["column"+t]=""),a["column"+t]+=o)}}else"height"===t&&e.complexHeader?a.header+="height: "+parseInt(r[t],10)/e.complexHeader.length+"px; ":a.header+=Smart.Utilities.Core.toDash(t)+": "+r[t]+"; "}const n=t.columns||{};for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;const t=n[e];if(o[e]){a["column"+e]||(a["column"+e]="");for(let o in t)isNaN(o)&&Object.prototype.hasOwnProperty.call(t,o)&&"format"!==o&&(a["column"+e]+=Smart.Utilities.Core.toDash(o)+": "+t[o]+"; ")}else a.column+=Smart.Utilities.Core.toDash(e)+": "+t+"; "}for(let e in a)Object.prototype.hasOwnProperty.call(a,e)&&(l+=` .${e} { ${a[e]}}\n`);return t.custom&&(l+=`${t.custom}\n`),l}getCustomColumnWidths(){const e=this;if(!e.style||!e.columnWidth||0===e.columnWidth.length)return"";let t="\n <cols>\n";for(let a=0;a<e.columnWidth.length;a++){let o=e.columnWidth[a];void 0!==o&&(o=Math.round(parseFloat(o))/7,t+=` <col min="${a+1}" max="${a+1}" width="${o}" customWidth="1" />\n`)}return t+=" </cols>",t}getCustomFilter(e,t){let a,o="equal";switch(e instanceof Date&&(e=(e.getTime()+this.timeBetween1900And1970)/864e5+2),t=t.toUpperCase()){case"EMPTY":a="";break;case"NOT_EMPTY":a="",o="notEqual";break;case"CONTAINS":case"CONTAINS_CASE_SENSITIVE":a=`*${e}*`;break;case"DOES_NOT_CONTAIN":case"DOES_NOT_CONTAIN_CASE_SENSITIVE":a=`*${e}*`,o="notEqual";break;case"STARTS_WITH":case"STARTS_WITH_CASE_SENSITIVE":a=`${e}*`;break;case"ENDS_WITH":case"ENDS_WITH_CASE_SENSITIVE":a=`*${e}`;break;case"EQUAL":case"EQUAL_CASE_SENSITIVE":a=e;break;case"NULL":a=null;break;case"NOT_NULL":a=null,o="notEqual";break;case"NOT_EQUAL":a=e,o="notEqual";break;case"LESS_THAN":a=e,o="lessThan";break;case"LESS_THAN_OR_EQUAL":a=e,o="lessThanOrEqual";break;case"GREATER_THAN":a=e,o="greaterThan";break;case"GREATER_THAN_OR_EQUAL":a=e,o="greaterThanOrEqual"}return` <customFilter val="${a}" operator="${o}"/>\n`}getCustomRowHeight(e){const t=this;return t.style&&(t.rowHeight[e]||t.defaultRowHeight)||""}getDatafields(e){const t=e[0],a=[];for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&"_"!==e.charAt(0)&&a.push(e);this.datafields=a}getFilters(){const e=this,t=e.filterBy;if(!t)return"";let a="";for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){const l=e.datafields.indexOf(o);if(-1===l)continue;const r=t[o],n=r.filters;a+=` <filterColumn colId="${l}">\n <customFilters and="${!r.operator}">\n`;for(let t=0;t<n.length;t++)a+=e.getCustomFilter(n[t].value,n[t].condition);a+=" </customFilters>\n </filterColumn>"}return a?(a=`\n <autoFilter ref="A1:${e.columnsArray[e.columnsArray.length-1]+e.data.length}">\n${a}\n </autoFilter>`,a):""}getGroupLabels(e){const t=this,a=void 0!==t.xlsxStartIndex?t.xlsxStartIndex:+t.exportHeader,o={},l=[];for(let r=a;r<e.length;r++){const n=e[r];for(let r=0;r<t.groupBy.length;r++){const s=t.groupBy[r],i=n[s];let c=o[s];void 0===c&&(o[s]={},c=o[s]),void 0===c[i]&&(c[i]=(t.exportHeader?e[a-1][s]:s)+": "+i,l.push(c[i]))}}t.groups=o,t.groupLabels=l}getHTMLHeader(e,t){const a=this;let o="\n <thead>\n";if(!a.complexHeader){o+=" <tr>\n";for(let a=0;a<e.length;a++){const l=e[a];o+=` <th class="header header${l}">${t[0][l]}</th>\n`}return o+=" </tr>\n </thead>",o}for(let t=0;t<a.complexDataFieldsHeader.length;t++){const l=a.complexDataFieldsHeader[t];o+=" <tr>\n";for(let r=0;r<l.length;r++){const n=l[r];let s=1,i=1;if(l[r-1]&&l[r-1]===n||a.complexDataFieldsHeader[t-1]&&a.complexDataFieldsHeader[t-1][r]===n)continue;let c=r+1;for(;l[c]&&l[c]===l[c-1];)s++,c++;for(c=t+1;a.complexDataFieldsHeader[c]&&a.complexDataFieldsHeader[c][r]===n;)i++,c++;o+=` <th class="header${t===a.complexHeader.length-1||i+t===a.complexHeader.length?" header"+e[r]:""}" colspan="${s}" rowspan="${i}">${a.complexHeader[t][r]}</th>\n`}o+=" </tr>\n"}return o+=" </thead>",o}getConditionalFormatting(){const e=this,t=e.conditionalFormatting;if(!t)return void(e.conditionalFormattingXLSX={conditions:"",styles:""});const a=[];let o="",l="";for(let r=t.length-1;r>=0;r--){const n=t[r],s=e.columnsArray[e.datafields.indexOf(n.column)],i=s+(e.xlsxStartIndex+1),c=i+":"+s+e.data.length,p=n.background+n.color,m=e.getConditionalAttributes(n,i);let f=a.indexOf(p);-1===f&&(l+=` <dxf>\n <font>\n <b val="0"/>\n <i val="0"/>\n <color rgb="${"White"===n.color?"FFFFFFFF":"FF000000"}"/>\n <sz val="10"/>\n </font>\n <fill>\n <patternFill>\n <bgColor rgb="${e.toARGB(n.background)}"/>\n </patternFill>\n </fill>\n </dxf>\n`,f=a.length,a.push(p)),o+=` <conditionalFormatting sqref="${c}">\n <cfRule dxfId="${f}" text="${m.text}" rank="${m.rank}" percent="${m.percent}" bottom="${m.bottom}" equalAverage="${m.equalAverage}" aboveAverage="${m.aboveAverage}"${m.operator}${m.timePeriod} priority="${r+2}" type="${m.type}">\n${m.formula} </cfRule>\n </conditionalFormatting>\n`}l=` <dxfs count="${a.length}">\n${l} </dxfs>`,e.conditionalFormattingXLSX={conditions:o,styles:l}}getConditionalAttributes(e,t){let a=e.condition,o=e.comparator,l="",r=0,n=0,s=0,i=0,c="",p="",m="",f="";switch(a){case"equal":c="equal",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"lessThan":c="lessThan",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"greaterThan":c="greaterThan",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"notEqual":c="notEqual",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"between":c="between",m="cellIs",f=` <formula>${e.min}</formula>\n <formula>${e.max}</formula>\n`;break;case"duplicate":m="duplicateValues",f=" <formula>0</formula>\n";break;case"topNItems":r=o,m="top10";break;case"bottomNItems":r=o,s=1,m="top10";break;case"topNPercent":r=o,n=1,m="top10";break;case"bottomNPercent":r=o,n=1,s=1,m="top10";break;case"aboveAverage":i=1,m="aboveAverage",f=" <formula>0</formula>\n";break;case"belowAverage":m="aboveAverage",f=" <formula>0</formula>\n";break;case"contains":l=o,c="containsText",m="containsText",f=` <formula>NOT(ISERROR(SEARCH("${o}",${t})))</formula>\n`;break;case"doesNotContain":l=o,c="notContains",m="notContainsText",f=` <formula>ISERROR(SEARCH("${o}",${t}))</formula>\n`;break;case"dateOccur":p=` timePeriod="${o}"`,m="timePeriod"}return c&&(c=` operator="${c}" `),{text:l,rank:r,percent:n,bottom:s,equalAverage:0,aboveAverage:i,operator:c,timePeriod:p,type:m,formula:f}}getMergedCells(e){const t=this;let a="";for(let t=0;t<e.length;t++)e[t].from!==e[t].to&&(a+=`\n <mergeCell ref="${e[t].from}:${e[t].to}" />\n`);if(t.mergedCells)for(let e=0;e<t.mergedCells.length;e++){const o=t.mergedCells[e];o.rowspan<2&&o.colspan<2||(a+=`\n <mergeCell ref="${t.columnsArray[o.cell[0]]+(o.cell[1]+t.xlsxStartIndex+1)}:${t.columnsArray[o.cell[0]+o.colspan-1]+(o.cell[1]+t.xlsxStartIndex+o.rowspan)}" />\n`)}return a&&(a=`\n <mergeCells count="${e.length}">${a} </mergeCells>`),a}getNumFmtIndex(e,t){let a=t.collection.indexOf(e);return-1===a?(a=t.collection.length+100,t.collection.push(e),t.xml+=`<numFmt numFmtId="${a}" formatCode="${e}"/>`):a+=100,a}getOutlineLevel(e){return this.actualHierarchy&&1!==e._level?` outlineLevel="${e._level-1}"`:""}getRowStyle(){const e=this.style;if(!e)return"";const t=e.rows;if(!t)return"";const a={row:""};let o="";for(let e in t){if(!Object.prototype.hasOwnProperty.call(t,e)||"alternationCount"===e||"alternationStart"===e||"alternationEnd"===e)continue;const o=t[e];if(-1===e.indexOf("alt"))if(isNaN(e))a.row+=Smart.Utilities.Core.toDash(e)+": "+t[e]+"; ";else{a["row"+e]||(a["row"+e]="");for(let t in o)Object.prototype.hasOwnProperty.call(o,t)&&(a["row"+e]+=Smart.Utilities.Core.toDash(t)+": "+o[t]+"; ")}else{const t=e.slice(16,17),l=e.slice(17);a["rowN"+t]||(a["rowN"+t]=""),a["rowN"+t]+="Color"===l?"color : "+o+"; ":"BorderColor"===l?"border-color : "+o+"; ":"background-color : "+o+"; "}}let l=Object.keys(a);l.sort((function(e,t){if("row"===e)return-1;if("row"===t)return 1;const a=!isNaN(e.slice(3)),o=!isNaN(t.slice(3));return a&&!o?1:!a&&o?-1:+(e<t)}));for(let e=0;e<l.length;e++)o+=` .${l[e]} { ${a[l[e]]}}\n`;return o}getTableStyle(){const e=this.style;if(!e)return' style="table-layout: fixed; border: 1px solid black; border-collapse: collapse;"';let t="table-layout: fixed; ";for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===["header","columns","rows","removeDefault","custom"].indexOf(a)&&(t+=Smart.Utilities.Core.toDash(a)+": "+e[a]+"; ");return t&&(t=' style="'+t+'"'),t}getXLSXCellStyle(e){const t=this;return void 0!==t.cellStyleMapping[e]?` s="${t.cellStyleMapping[e]}"`:""}getXLSXFormat(e,t){if("number"==typeof t){if(!/^([a-zA-Z]\d*)$/g.test(e))return e;let t=parseFloat(e.slice(1))||0,a=t>0?"."+"0".repeat(t):"";switch(e=e.slice(0,1)){case"C":case"c":return"$#,0"+a;case"D":case"d":return t?"0".repeat(t):"0";case"E":case"e":return"0"+a+e+"000";case"F":case"f":return"0"+a;case"N":case"n":return"#,0"+a;case"P":case"p":return"#,0"+a+" %";default:return}}else if(t instanceof Date){switch(e){case"d":return"m/d/yyyy";case"D":return"nnnnmmmm dd, yyyy";case"t":return"h:m AM/PM";case"T":return"h:mm:ss AM/PM";case"f":return"nnnnmmmm dd, yyyy h:m AM/PM";case"F":return"nnnnmmmm dd, yyyy h:mm:ss AM/PM";case"M":return"mmmm d";case"Y":return"yyyy mmmm";case"FP":case"PP":return"yyyy-mm-dd hh:mm:ss";case"FT":case"PT":return"hh:mm:ss"}return e=(e=(e=(e=e.replace(/f|u|n|p|e|a|x|o/gi,"")).replace(/tt/gi,"AM/PM")).replace(/:{2,}|:\s|:$|\.$/g,"")).trim()}}processColumnStyle(e){const t=this,a=e.header,o=e.columns,l=t.data[0],r=t.xlsxStartIndex;if(t.columnWidth=[],r&&a)for(let e=0;e<t.columnsArray.length;e++){const o=t.columnsArray[e],n=o+r,s=a[t.datafields[e]];for(let e in a)if(Object.prototype.hasOwnProperty.call(a,e)&&void 0===l[e])if(t.complexHeader)for(let l=0;l<t.complexHeader.length;l++)"height"!==e?t.storeCellStyle(o+(l+1),e,a[e]):t.rowHeight[l]=` ht="${parseFloat(a.height)/t.complexHeader.length/2}"`;else{if("height"===e){t.rowHeight[0]=` ht="${parseFloat(a.height)/2}"`;continue}t.storeCellStyle(n,e,a[e])}if(s)for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){if("width"===a){t.columnWidth[e]=s.width;continue}t.storeCellStyle(n,a,s[a])}}else if(a)for(let e=0;e<t.columnsArray.length;e++){const o=a[t.datafields[e]];o&&void 0!==o.width&&(t.columnWidth[e]=o.width)}if(!o)return"";for(let e=r;e<t.data.length;e++)for(let a=0;a<t.columnsArray.length;a++){const r=t.columnsArray[a]+(e+1),n=t.datafields[a],s=o[n];for(let e in o)Object.prototype.hasOwnProperty.call(o,e)&&void 0===l[e]&&t.storeCellStyle(r,e,o[e]);if(s)for(let a in s)isNaN(a)&&Object.prototype.hasOwnProperty.call(s,a)&&t.storeCellStyle(r,a,s[a],t.data[e][n])}}processComplexHeader(e,t,a){const o=this,l={},r=-1!==["html","jpeg","pdf","png","xlsx"].indexOf(a)&&e.columngroups,n=[],s={},i={},c=[],p=[];let m=0;function f(t){for(let a=0;a<e.columngroups.length;a++){const o=e.columngroups[a];if(o.name===t)return o}}function d(e,t){const a=[];for(;e;){if(a.unshift(e[t]),!e.parentGroup)return a;e=f(e.parentGroup)}}if(r){for(let t=0;t<e.columngroups.length;t++){const a=e.columngroups[t],o=d(a,"label");s[a.name]=o,i[a.name]=d(a,"name"),m=Math.max(m,o.length)}m++;for(let e=0;e<m;e++)c[e]=[],p[e]=[]}for(let t=0;t<e.columns.length;t++){const a=e.columns[t];if(l[a.dataField]=a.label,!r)continue;if(n[t]=a.dataField,c[m-1][t]=a.label,p[m-1][t]=a.dataField,!a.columnGroup)continue;const o=s[a.columnGroup],f=i[a.columnGroup];if(o)for(let e=0;e<o.length;e++)c[e][t]=o[e],p[e][t]=f[e]}if(c.length>1){const e=Object.keys(l).length;for(let o=0;o<m-1;o++){const l={};for(let t=0;t<e;t++){if(void 0===c[o][t]){let e=o+1;for(;void 0===c[e][t];)e++;c[o][t]=c[e][t],p[o][t]=p[e][t]}l[n[t]]=c[o][t]}"xlsx"===a&&t.splice(o,0,l)}if(o.complexHeader=c,o.complexDataFieldsHeader=p,"xlsx"!==a)t.unshift(l);else{t.splice(m-1,0,l);const a={};for(let t=0;t<m;t++)for(let o=0;o<e;o++){const e=p[t][o];if(a[e]){const l=a[e].to;if(t-l[0]>1||o-l[1]>1){a[e+Math.random().toString(36)]=a[e],a[e]={from:[t,o],to:[t,o]};continue}a[e].to=[t,o]}else a[e]={from:[t,o]},a[e].to=a[e].from}o.complexHeaderMergeInfo=a}}else t.unshift(l)}processHierarchicalData(e,t){const a=this,o="xlsx"!==t?+a.exportHeader:a.xlsxStartIndex,l={},r=[];let n=0,s=!1;if(void 0===e[o]._keyDataField)return a.processNestedData(e,t,o);for(let t=o;t<e.length;t++){const a=Object.assign({},e[t]);let o=a._parentDataField;void 0===o&&(o=null),void 0===l[o]?l[o]=[a]:l[o].push(a)}if(o)for(let a=0;a<o;a++)r.push(Object.assign({},e[a])),-1===["json","pdf","xml"].indexOf(t)&&(r[a]._level=1);return"json"!==t&&"xml"!==t?function e(t,a,o){const i=l[t];if(n=Math.max(n,a),void 0!==i)for(let t=0;t<i.length;t++){const n=i[t],c=n._keyDataField;n._collapsed=o,n._level=a,r.push(n),l[c]&&(s=!0,n._expanded=void 0===n._expanded||n._expanded,e(c,a+1,o||!n._expanded))}}(null,1,!1):function e(a,o,r){const i=l[a];if(n=Math.max(n,o),void 0!==i)for(let a=0;a<i.length;a++){const n=i[a],c=n._keyDataField;let p;if("json"===t){p={};for(let e in n)Object.prototype.hasOwnProperty.call(n,e)&&"_"!==e.charAt(0)&&(p[e]=n[e])}else p=Object.assign({},n);r.push(p),l[c]&&(s=!0,p.rows=[],e(c,o+1,p.rows))}}(null,1,r),s||(a.actualHierarchy=!1),a.maxLevel=n,r}processNestedData(e,t,a){const o=this,l=[];let r=0,n=!1;if(a)for(let o=0;o<a;o++)l.push(Object.assign({},e[o])),-1===["json","pdf","xml"].indexOf(t)&&(l[o]._level=1);return"json"!==t&&"xml"!==t?function e(t,a,o,s){r=Math.max(r,o);for(let r=t;r<a.length;r++){const t=Object.assign({},a[r]);t._collapsed=s,t._level=o,l.push(t),t.children&&t.children.length>0&&(n=!0,t._expanded=void 0===t._expanded||t._expanded,e(0,t.children,o+1,s||!t._expanded)),delete t.children}}(a,e,1,!1):function e(t,a,o,s){r=Math.max(r,s);for(let r=t;r<a.length;r++){const t=Object.assign({},a[r]);1===s?l[r]=t:o[r]=t,t.children&&t.children.length>0&&(n=!0,t.rows=[],e(0,t.children,t.rows,s+1)),delete t.children}}(a,e,void 0,1),n||(o.actualHierarchy=!1),o.maxLevel=r,l}processRowStyle(e){const t=this,a=e.rows;if(t.rowHeight=[],!a)return;const o=t.xlsxStartIndex;function l(e,a,l){for(let r=0;r<t.columnsArray.length;r++){const n=t.columnsArray[r]+(e+1+o);t.storeCellStyle(n,a,l)}}a.height&&(t.defaultRowHeight=` ht="${parseFloat(a.height)/2}"`);for(let e=o;e<t.data.length;e++){const r=e-o;for(let e in a)Object.prototype.hasOwnProperty.call(a,e)&&-1===e.indexOf("alt")&&isNaN(e)&&"height"!==e&&l(r,e,a[e]);if(a.alternationCount&&((void 0===a.alternationStart||r>=a.alternationStart)&&(void 0===a.alternationEnd||r<=a.alternationEnd)||a.alternationStart===a.alternationEnd)){const e=(r-(a.alternationStart||0))%a.alternationCount;a[`alternationIndex${e}Color`]&&l(r,"color",a[`alternationIndex${e}Color`]),a[`alternationIndex${e}BorderColor`]&&l(r,"borderColor",a[`alternationIndex${e}BorderColor`]),a[`alternationIndex${e}BackgroundColor`]&&l(r,"backgroundColor",a[`alternationIndex${e}BackgroundColor`])}if(a[r])for(let o in a[r])if(Object.prototype.hasOwnProperty.call(a[r],o)){if("height"===o){t.rowHeight[e]=` ht="${parseFloat(a[r].height)/2}"`;continue}l(r,o,a[r][o])}}}storeCellStyle(e,t,a){const o=this.styleMap[e];switch(t){case"backgroundColor":o.fills.fgColor=a;break;case"color":o.fonts.color=a;break;case"fontFamily":o.fonts.name=a.replace(/"/g,"'");break;case"fontSize":o.fonts.sz=parseFloat(a);break;case"fontStyle":"italic"===a?o.fonts.i=!0:delete o.fonts.i;break;case"fontWeight":"bold"===a?o.fonts.b=!0:delete o.fonts.b;break;case"numFmt":o.numFmt=a;break;case"textAlign":o.alignment.horizontal=a;break;case"textDecoration":"underline"===a?o.fonts.u=!0:delete o.fonts.u;break;case"verticalAlign":"middle"===a&&(a="center"),o.alignment.vertical=a}}toARGB(e){e=e.replace(/\s/g,"");const t=/rgb\((\d+),(\d+),(\d+)\)/gi.exec(e);if(null!==t){const e=parseFloat(t[1]).toString(16).toUpperCase(),a=parseFloat(t[2]).toString(16).toUpperCase(),o=parseFloat(t[3]).toString(16).toUpperCase();return"FF"+"0".repeat(2-e.length)+e+"0".repeat(2-a.length)+a+"0".repeat(2-o.length)+o}const a=/rgba\((\d+),(\d+),(\d+)\,(\d*.\d+|\d+)\)/gi.exec(e);if(null!==a){const e=Math.round(255*parseFloat(a[4])).toString(16).toUpperCase(),t=parseFloat(a[1]).toString(16).toUpperCase(),o=parseFloat(a[2]).toString(16).toUpperCase(),l=parseFloat(a[3]).toString(16).toUpperCase();return"0".repeat(2-e.length)+e+"0".repeat(2-t.length)+t+"0".repeat(2-o.length)+o+"0".repeat(2-l.length)+l}const o=/^#(.)(.)(.)$/gi.exec(e);if(null!==o){const e=o[1].toUpperCase(),t=o[2].toUpperCase(),a=o[3].toUpperCase();return"FF"+e+e+t+t+a+a}return"FF"+e.toUpperCase().slice(1)}toggleableFunctionality(){const e=this;return e.actualHierarchy?`\n <style type="text/css">\n .toggle-element {\n width: 5px;\n height: 1px;\n padding-right: 5px;\n float: left;\n text-align: right;\n cursor: pointer;\n user-select: none;\n }\n\n .collapsed {\n display: none;\n }\n </style>\n <script type="text/javascript">\n window.onload = function () {\n var expandChar = '${e.expandChar}',\n collapseChar = '${e.collapseChar}',\n toggleElements = document.getElementsByClassName('toggle-element');\n\n function getParent(child) {\n var prevSibling = child.previousElementSibling;\n\n while (prevSibling) {\n if (child.getAttribute('level') > prevSibling.getAttribute('level')) {\n return prevSibling;\n }\n\n prevSibling = prevSibling.previousElementSibling;\n }\n\n }\n\n function getFirstCollapsedAncestor(child) {\n var parent = getParent(child);\n\n while (parent) {\n if (parent.firstElementChild.firstElementChild.innerHTML === expandChar) {\n return parent;\n }\n\n parent = getParent(parent);\n }\n }\n\n for (var i = 0; i < toggleElements.length; i++) {\n toggleElements[i].addEventListener('click', function (event) {\n var expanded = this.innerHTML === collapseChar,\n row = this.parentElement.parentElement,\n sibling = row.nextElementSibling;\n\n if (expanded) {\n this.innerHTML = expandChar;\n }\n else {\n this.innerHTML = collapseChar;\n }\n\n while (sibling && row.getAttribute('level') < sibling.getAttribute('level')) {\n if (expanded) {\n sibling.style.display = 'none';\n }\n else {\n var firstCollapsedAncestor = getFirstCollapsedAncestor(sibling);\n\n if (!firstCollapsedAncestor || firstCollapsedAncestor === row) {\n sibling.classList.remove('collapsed');\n sibling.style.display = null;\n }\n\n }\n\n sibling = sibling.nextElementSibling;\n }\n });\n }\n }\n <\/script>`:""}generateStyles(e){const t=this;if(t.cellStyleMapping={},0===Object.keys(e).length&&!t.complexHeader)return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="1" x14ac:knownFonts="1"><font><sz val="11"/><color theme="1"/><name val="Calibri"/><family val="2"/><charset val="204"/><scheme val="minor"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>${t.conditionalFormattingXLSX.styles||'<dxfs count="0"/>'}<tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`;t.styleMap={};for(let e=0;e<t.data.length;e++)for(let a=0;a<t.columnsArray.length;a++)t.styleMap[t.columnsArray[a]+(e+1)]={numFmts:{},fonts:{},fills:{},borders:{},alignment:{}};if(e&&e.columns)for(let a=0;a<t.columnsArray.length;a++){const o=t.datafields[a];if(!e.columns[o]||!e.columns[o].format)continue;const l=t.getXLSXFormat(e.columns[o].format,t.data[t.data.length-1][o]);l&&(e.columns[o].numFmt=l)}t.processRowStyle(e),t.processColumnStyle(e);const a={};for(let e=0;e<t.complexHeaderMergedCells.length;e++){const o=t.complexHeaderMergedCells[e];parseFloat(o.to[1])!==t.complexHeader.length?(t.styleMap[o.from].alignment.horizontal="center",t.styleMap[o.from].alignment.vertical="center"):a[o.to]=o.from}const o={xml:'<font><sz val="11" /><color theme="1" /><name val="Calibri" /><family val="2" /><charset val="204" /><scheme val="minor" /></font>',collection:["default"]},l={xml:'<fill><patternFill patternType="none" /></fill><fill><patternFill patternType="gray125" /></fill>',collection:["default","gray125"]},r={xml:"",collection:[]},n={xml:'<xf fontId="0" fillId="0" borderId="1"/>',collection:["default"]};for(let e=0;e<t.data.length;e++)for(let s=0;s<t.columnsArray.length;s++){const i=t.columnsArray[s]+(e+1),c=t.styleMap[i];let p="",m="",f="",d=[],h=[],g=[],u=[];for(let e in c.fonts)if(Object.prototype.hasOwnProperty.call(c.fonts,e)){const a=c.fonts[e];switch(e){case"color":d[0]=a,p+=`<color rgb="${t.toARGB(a)}" />`;break;case"name":d[1]=a,p+=`<name val="${a}" />`;break;case"sz":d[2]=a,p+=`<sz val="${a}" />`;break;case"i":d[3]=a,p+="<i />";break;case"b":d[4]=a,p+="<b />";break;case"u":d[5]=a,p+="<u />"}}for(let e in c.fills)if(Object.prototype.hasOwnProperty.call(c.fills,e)){const a=c.fills[e];switch(e){case"fgColor":h[0]=a,m+=`<fgColor rgb="${t.toARGB(a)}" />`}}for(let e in c.alignment)if(Object.prototype.hasOwnProperty.call(c.alignment,e)){const t=c.alignment[e];switch(e){case"horizontal":g[0]=t,f+=`horizontal="${t}" `;break;case"vertical":g[1]=t,f+=`vertical="${t}" `}}if(d=d.toString(),h=h.toString(),""!==p){let e=o.collection.indexOf(d);-1===e&&(e=o.collection.length,o.xml+="<font>"+p+"</font>",o.collection.push(d)),u[0]=e}if(""!==m){let e=l.collection.indexOf(h);-1===e&&(e=l.collection.length,l.xml+='<fill><patternFill patternType="solid">'+m+"</patternFill></fill>",l.collection.push(h)),u[1]=e}g.length>0&&(u[2]=f),void 0!==c.numFmt&&(u[3]=t.getNumFmtIndex(c.numFmt,r));const y=u.toString();if(""!==y){let e=n.collection.indexOf(y);if(-1===e){let t="<xf ";e=n.collection.length,void 0!==u[0]&&(t+=`fontId="${u[0]}" `),void 0!==u[1]&&(t+=`fillId="${u[1]}" `),void 0!==u[3]&&(t+=`numFmtId="${u[3]}" `),void 0!==u[2]?t+=`applyAlignment="1" borderId="1"><alignment ${f}/></xf>`:t+=' borderId="1"/>',n.xml+=t,n.collection.push(y)}t.cellStyleMapping[a[i]||i]=e}}return r.collection.length&&(r.xml=`<numFmts count="${r.collection.length}">${r.xml}</numFmts>`),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision">${r.xml}<fonts count="${o.collection.length}" x14ac:knownFonts="1">${o.xml}</fonts><fills count="${l.collection.length}">${l.xml}</fills><borders count="2"><border><left/><right/><top/><bottom/></border><border><left style="hair"/><right style="hair"/><top style="hair"/><bottom style="hair"/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="${n.collection.length}">${n.xml}</cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>${t.conditionalFormattingXLSX.styles}<dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`}});
803
+ Smart.Utilities.Assign("DataExporter",class{constructor(e,t,a,o){const l=this;e||(e={}),l.style=e.style,l.header=e.header,l.exportHeader=void 0===e.exportHeader||e.exportHeader,l.hierarchical=e.hierarchical,l.expandChar=e.expandChar||"+",l.collapseChar=e.collapseChar||"-",l.pageOrientation=e.pageOrientation,l.allowNull=e.allowNull||!1,!l.hierarchical&&t&&t.length>0?l.groupBy=t:l.mergedCells=e.mergedCells,!l.groupBy&&a&&Object.keys(a).length>0&&(l.filterBy=a),o&&(l.conditionalFormatting=o),l.timeBetween1900And1970=new Date(1970,0,1).getTime()-new Date(1900,0,1).getTime()}downloadFile(e,t,a){let o;if(!a)return e;if(o=e instanceof Blob?e:new Blob([e],{type:t}),window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(o,a);else{const e=document.createElement("a"),t=URL.createObjectURL(o);e.href=t,e.download=a,e.style.position="absolute",e.style.visibility="hidden",document.body.appendChild(e),e.click(),setTimeout((function(){document.body.removeChild(e),window.URL.revokeObjectURL(t)}),100)}}exportData(e,t,a,o){const l=this;if(l.actualHierarchy=l.hierarchical,t=t.toLowerCase(),l.exportHeader&&(l.header?(0===(e=e.slice(0)).length&&(l.actualHierarchy=!1),l.processComplexHeader(l.header,e,t)):1===e.length&&(l.actualHierarchy=!1)),0===e.length)return void console.warn("No data to export.");"xlsx"===t&&(l.xlsxStartIndex=l.complexHeader?l.complexHeader.length:+l.exportHeader),l.actualHierarchy&&(e=l.processHierarchicalData(e,t)),l.getDatafields(e),a&&a.slice(a.length-t.length-1,a.length)!=="."+t&&(a+="."+t);let r=null;switch(t){case"csv":r=l.exportToCSVAndTSV(e,{delimiter:", ",MIME:"text/csv",toRemove:2},a);break;case"html":r=l.exportToHTML(e,a);break;case"jpeg":case"png":l.exportToImage(e,a,t,o);break;case"json":r=l.exportToJSON(e,a);break;case"pdf":r=l.exportToPDF(e,a);break;case"tsv":r=l.exportToCSVAndTSV(e,{delimiter:"\t",MIME:"text/tab-separated-values",toRemove:1},a);break;case"xlsx":r=l.exportToXLSX(e,a);break;case"xml":r=l.exportToXML(e,a);break;case"md":r=l.exportToMD(e,a)}return o&&r&&o(r),delete l.complexHeader,r}exportToCSVAndTSV(e,t,a){const o=this,l=o.datafields;let r="";for(let a=0;a<e.length;a++){const n=e[a];let s="";for(let e=0;e<l.length;e++)o.actualHierarchy&&0===e?s+=('""'+t.delimiter).repeat(n._level-1)+'"'+n[l[e]]+'"'+t.delimiter+('""'+t.delimiter).repeat(o.maxLevel-n._level):s+='"'+n[l[e]]+'"'+t.delimiter;s=s.slice(0,s.length-t.toRemove)+"\n",r+=s}return this.downloadFile(r,t.MIME,a)}exportToHTML(e,t){const a=this,o=a.datafields,l=a.style;let r="",n=0,s="";e=a.processGroupingInformation(e),a.data=e,a.exportHeader&&(r=a.getHTMLHeader(o,e),n=1),arguments[2]&&(s=`<script type="text/javascript" src="${Array.from(document.getElementsByTagName("script")).find((e=>-1!==e.src.indexOf("html2canvas"))).src}"><\/script>`);let i=`<!DOCTYPE html>\n<html>\n<head>\n <meta charset="UTF-8">\n <style type="text/css">\n${a.getRowStyle()}${a.getColumnStyle()}\n </style>${s}${a.toggleableFunctionality()}\n</head>\n<body>\n <table${a.getTableStyle()}>${r}\n <tbody>\n`;const c={},p={},m=[];a.getMergedCellsInfo(c,p);e:for(let r=n;r<e.length;r++){const s=e[r],f=r-n;let d=a.getAlternationIndex(f," rowN"),h="",g="",u="",y=0;if(a.actualHierarchy)s._collapsed&&(h=" collapsed"),g=` level="${s._level}"`;else if(a.groupBy)for(let e=0;e<a.groupBy.length;e++){const t=a.groupBy[e],o=s[t],l=a.groups[t][o];if(u+=o,-1===m.indexOf(u)){i+=` <tr class="row">\n <td class="column group" style="padding-left: ${25*y}px;" colspan="${a.datafields.length}">${l}</td>\n </tr>`,m.push(u),r--;continue e}y++}let x=` <tr class="row row${f}${d}${h}"${g}`;t||(x+=' style="page-break-inside: avoid;"'),x+=">\n";for(let e=0;e<o.length;e++){const t=e+","+f;let r=1,n=1;if(c[t])r=c[t].colspan,n=c[t].rowspan;else if(p[t])continue;const i=o[e];let m=s[i],d="";if(a.actualHierarchy&&0===e){let e="";s._expanded?e=a.collapseChar:!1===s._expanded&&(e=a.expandChar),d=`<div class="toggle-element" style="margin-left: ${25*(s._level-1)+5}px;" expanded>${e}</div>`}m=a.getFormattedValue(m,i);let h="";if(l&&l.columns&&l.columns[i]&&l.columns[i][f]){const e=l.columns[i][f];h+=`border-color: ${e.border}; background-color: ${e.background}; color: ${e.color};"`}0===e&&y>1&&(h+=`padding-left: ${25*(y-1)}px;"`),h&&(h=` style="${h}"`),x+=` <td class="column column${i}"${h} colspan="${r}" rowspan="${n}">${d+m}</td>\n`}i+=x+" </tr>\n"}return i+=" </tbody>\n </table>\n</body>\n</html>",arguments[2]?i:this.downloadFile(i,"text/html",t)}exportToImage(e,t,a,o){try{html2canvas}catch(e){throw new Error("smart-grid: Missing reference to 'html2canvas.min.js'.")}let l=null;const r=this.exportToHTML(e,t,!0),n=document.createElement("iframe");return n.style.position="absolute",n.style.top=0,n.style.left=0,n.style.border="none",n.style.width="100%",n.style.height="100%",n.style.opacity=0,n.style.pointerEvents="none",document.body.appendChild(n),n.contentDocument.write(r),function e(){n.contentDocument.body&&n.contentDocument.body.firstElementChild?n.contentWindow.html2canvas(n.contentDocument.body.firstElementChild).then((e=>{const r=new Smart.Utilities.Draw(document.createElement("div"));l=e.toDataURL("image/png"),o?o(l):(document.body.appendChild(e),r.exportImage(void 0,e,a,t)),n.remove(),e.remove()})):requestAnimationFrame(e)}(),l}getMergedCellsInfo(e,t,a){const o=this;if(!o.mergedCells)return;const l=a&&0!==a[o.datafields.length-1];o.mergedCellsPDF=o.mergedCells.slice(0);for(let r=0;r<o.mergedCellsPDF.length;r++){const n=o.mergedCellsPDF[r];let s=n.colspan,i=n.rowspan;if(i<2&&s<2)continue;const c=n.cell[1];let p=n.cell[0];if(l&&s>1){const e=a[p],t=a[p+s-1],l=[];if(t>e){let r=e,n=p,m=0;e:for(let o=e;o<=t;o++){let e=n,t=0;for(;a[n]===r;)if(n++,m++,t++,m===s){l.push({start:e,span:t});break e}l.push({start:e,span:t}),r=a[n]}s=l[0].span;for(let e=1;e<l.length;e++)o.mergedCellsPDF.push({cell:[l[e].start,c],colspan:l[e].span,rowspan:i,originalCell:p})}}for(let a=p;a<p+s;a++)for(let o=c;o<c+i;o++){const l=a+","+o;a!==p||o!==c?t[l]=!0:e[l]={colspan:s,rowspan:i,originalCell:n.originalCell}}}}getAlternationIndex(e,t){if(!this.style)return"";const a=this.style.rows;return a&&a.alternationCount&&((void 0===a.alternationStart||e>=a.alternationStart)&&(void 0===a.alternationEnd||e<=a.alternationEnd)||a.alternationStart===a.alternationEnd)?t+e%a.alternationCount:""}getFormattedValue(e,t){const a=this,o=a.style;if(null===e)return a.allowNull?"null":"";if(t&&o&&o.columns&&o.columns[t]&&o.columns[t].format){if("number"==typeof e)return a.formatNumber(e,o.columns[t].format);if(e instanceof Date)return a.formatDate(e,o.columns[t].format)}else if(e instanceof Date)return a.formatDate(e,"d");return e}exportToJSON(e,t){return this.downloadFile(JSON.stringify(e,this.datafields.concat("rows")),"application/json",t)}exportToMD(e,t){const a=this.datafields;let o="";for(let t=0,l=e.length;t<l;t+=1)for(let l=0,r=a.length;l<r;l+=1){const r=e[t][a[l]];"string"==typeof r&&(o+=r)}return this.downloadFile(o,"application/text",t)}exportToPDF(e,t){try{pdfMake}catch(e){throw new Error("Missing reference to 'pdfmake.min.js'.")}const a=this,o=a.datafields,l=+a.exportHeader,r=[],n={},s={},i={},c=l?a.complexHeader?a.complexHeader.length:1:0,p={pageOrientation:a.pageOrientation||"portrait"};let m,f=[],d=[];function h(){let e=[];for(let t=0;t<m.length;t++)e.push([]);return e}e=a.processGroupingInformation(e),a.data=e,a.headerRows=c,a.getPDFStyle();const g=a.styleInfo;m=g?a.wrapPDFColumns(p,i):[{body:f,datafields:o}],l&&(f=a.getPDFHeader(o,m,i)),a.getMergedCellsInfo(n,s,i);e:for(let t=l;t<e.length;t++){const c=e[t];let p="",f=0;if(a.groupBy)for(let e=0;e<a.groupBy.length;e++){const o=a.groupBy[e],l=c[o],n=a.groups[o][l];if(p+=l,-1===r.indexOf(p)){a.createGroupHeaderRow(m,{text:n,style:["row","cell","group"],marginLeft:7.5*f}),r.push(p),t--;continue e}f++}const d=h(),g=t-l;let u=a.getAlternationIndex(g,"");for(let e=0;e<o.length;e++){const t=o[e],l={style:["row","row"+g,"cell","cell"+t]},r=i[e]||0;if(void 0!==u&&l.style.splice(1,0,"rowN"+u),a.mergedCellsPDF){const t=e+","+g,a=n[t];if(a){if(l.colSpan=a.colspan,l.rowSpan=a.rowspan,void 0!==a.originalCell){l.text="",l.style[l.style.length-1]="cell"+o[a.originalCell],d[r].push(l);continue}}else if(s[t]){d[r].push({});continue}}const p=a.getFormattedValue(c[t],t);l.text=p.toString(),a.getUniqueStylePDF(l,t,g),a.setIndentation(l,{j:e,currentRecord:c,value:p,outlineLevel:f}),d[r].push(l)}for(let e=0;e<m.length;e++)m[e].body.push(d[e])}if(g){for(let e=0;e<m.length;e++){const t=m[e].body;for(let a=c-1;a>=0;a--)t.unshift(f[e][a]);d.push({table:{headerRows:c,widths:m[e].widths,heights:function(e){return g.heights[e]?g.heights[e]:g.defaultHeight?g.defaultHeight:void 0},body:t},pageBreak:"after"})}delete d[m.length-1].pageBreak,p.styles=g.styles}else{const e=m[0].body;for(let t=c-1;t>=0;t--)e.unshift(f[0][t]);d=[{table:{headerRows:c,body:e}}],p.styles={header:{bold:!0},group:{bold:!0}}}p.content=d,pdfMake.createPdf(p).download(t),delete a.mergedCellsPDF,delete a.styleInfo}getPDFStyle(){const e=this,t=e.style;if(!t)return"";const a=e.data[0],o=t.header,l=t.columns,r=t.rows,n={heights:[],widths:Array(e.datafields.length).fill("*"),styles:{header:{},row:{},cell:{},group:{fillColor:"#FFFFFF",color:"#000000",bold:!0}}};function s(t,o){if(t)for(let l in t)if(Object.prototype.hasOwnProperty.call(t,l))if(void 0===a[l])if("height"===l&&"header"===o)for(let a=0;a<e.headerRows;a++)n.heights[a]=parseInt(t[l],10)/e.headerRows/1.4;else e.storePDFStyle({prop:l,value:t[l],toUpdate:o});else for(let a in t[l]){if(!isNaN(a)||!Object.prototype.hasOwnProperty.call(t[l],a))continue;const r=t[l][a],s=e.datafields.indexOf(l);"width"===a&&"*"===n.widths[s]?n.widths[s]=r:e.storePDFStyle({prop:a,value:r,toUpdate:o+l})}}if(e.styleInfo=n,s(o,"header"),s(l,"cell"),r){for(let t in r){if(!Object.prototype.hasOwnProperty.call(r,t)||-1!==t.indexOf("alt"))continue;const a=r[t];if(isNaN(t))"height"===t?n.defaultHeight=parseFloat(a)/1.4:e.storePDFStyle({prop:t,value:a,toUpdate:"row"});else for(let o in a)Object.prototype.hasOwnProperty.call(a,o)&&("height"===o?n.heights[parseFloat(t)+e.headerRows]=parseFloat(a[o])/1.4:e.storePDFStyle({prop:o,value:a[o],toUpdate:"row"+t}))}if(r.alternationCount)for(let e=0;e<r.alternationCount;e++){const t={};r[`alternationIndex${e}Color`]&&(t.color=r[`alternationIndex${e}Color`]),r[`alternationIndex${e}BackgroundColor`]&&(t.fillColor=r[`alternationIndex${e}BackgroundColor`]),n.styles["rowN"+e]=t}}}storePDFStyle(e){const t=this;let a=t.styleInfo.styles[e.toUpdate];a||(a={},t.styleInfo.styles[e.toUpdate]=a);let o=e.value;switch(e.prop){case"backgroundColor":a.fillColor=o;break;case"color":a.color=o;break;case"fontSize":a.fontSize=parseFloat(o);break;case"fontStyle":"italic"===o&&(a.italics=!0);break;case"fontWeight":"bold"===o&&(a.bold=!0);break;case"textAlign":a.alignment=o}}wrapPDFColumns(e,t){const a=this,o=this.styleInfo,l="portrait"===e.pageOrientation?655:1155,r=[];let n=0;for(let e=0;e<o.widths.length;e++){let s,i=o.widths[e];if("*"===i?s=l/6:"string"==typeof i&&-1!==i.indexOf("%")?(s=Math.min(l,Math.floor(parseFloat(i)/100*l)),s===l&&(i="*")):(i=parseFloat(i),i>=l?(s=l,i="*"):(s=i,i/=1.4)),void 0===r[n]){const o=[];r[n]={body:o,width:s,widths:[i],datafields:[a.datafields[e]]},t[e]=n;continue}const c=r[n];c.width+s>l?(n++,e--):(t[e]=n,c.width+=s,c.widths.push(i),c.datafields.push(a.datafields[e]))}return r}getPDFHeader(e,t,a){const o=this,l=[],r=o.headerRows,n=[],s=[];let i,c,p=[];o.complexHeader?(i=o.complexHeader,c=o.complexDataFieldsHeader):(i=[Object.values(o.data[0])],c=i);for(let e=0;e<r;e++){const t=i[e],o=c[e];for(let l=0;l<t.length;l++){let r=a[l]||0;n[r]||(n[r]=[],s[r]=[]),n[r][e]||(n[r][e]=[],s[r][e]=[]),n[r][e].push(t[l]),s[r][e].push(o[l])}}function m(e,t,a,o){for(let l=0;l<r;l++){const n=e[l],s=t[l],i=[];for(let e=0;e<n.length;e++){const a=s[e];let c=1,p=1;if(s[e-1]&&s[e-1]===a||t[l-1]&&t[l-1][e]===a){i.push({});continue}let m=e+1;for(;s[m]&&s[m]===s[m-1];)c++,m++;for(m=l+1;t[m]&&t[m][e]===a;)p++,m++;const f=l===r-1||p+l===r?o.datafields[e]:null,d={text:n[e],colSpan:c,rowSpan:p};f?d.style=["header","header"+f]:(d.alignment="center",d.style="header"),i.push(d)}a.push(i)}}for(let e=0;e<t.length;e++)p=[],m(n[e],s[e],p,t[e]),l.push(p);return l}createGroupHeaderRow(e,t){for(let a=0;a<e.length;a++){const o=Object.assign({},t),l=e[a].datafields.length,r=[o];o.colSpan=l,r.length=l,r.fill({},1,l-1),e[a].body.push(r)}}getUniqueStylePDF(e,t,a){const o=this.style;if(!o||!o.columns||!o.columns[t])return;const l=o.columns[t][a];l&&(e.fillColor=function(e){const t=/rgba\((\d+),(\d+),(\d+)\,(\d*.\d+|\d+)\)/gi.exec(e.replace(/\s/g,""));if(null===t)return e;const a=parseFloat(t[1]).toString(16).toUpperCase(),o=parseFloat(t[2]).toString(16).toUpperCase(),l=parseFloat(t[3]).toString(16).toUpperCase();return"#"+"0".repeat(2-a.length)+a+"0".repeat(2-o.length)+o+"0".repeat(2-l.length)+l}(l.background),e.color=l.color.toLowerCase())}setIndentation(e,t){if(0!==t.j)return;const a=this;if(a.actualHierarchy){const o=t.currentRecord;void 0!==o._expanded?(e.marginLeft=25*(o._level-1),e.text=a.collapseChar+" "+t.value):e.marginLeft=25*(o._level-1)+6}else t.outlineLevel>1&&(e.marginLeft=7.5*(t.outlineLevel-1))}exportToXLSX(e,t){try{JSZip}catch(e){throw new Error("Missing reference to 'jszip.min.js'.")}const a=this;let o=a.style;if(e=a.processGroupingInformation(e,!0),a.data=e,a.getColumnsArray(),a.complexHeaderMergedCells=[],a.complexHeaderMergeInfo)for(let e in a.complexHeaderMergeInfo)if(Object.prototype.hasOwnProperty.call(a.complexHeaderMergeInfo,e)){const t=a.complexHeaderMergeInfo[e];if(t.from[0]===t.to[0]&&t.from[1]===t.to[1])continue;a.complexHeaderMergedCells.push({from:a.columnsArray[t.from[1]]+(t.from[0]+1),to:a.columnsArray[t.to[1]]+(t.to[0]+1)})}a.getConditionalFormatting(),o||(o=a.generateDefaultStyle(e));const l=a.generateSharedStrings(e),r=l.collection,n=l.xml,s=a.generateStyles(o),i=a.groupBy?a.generateSheet1WithGrouping(e,r):a.generateSheet1(e,r),c=a.generateAuxiliaryFiles(),p=new JSZip,m=p.folder("_rels"),f=p.folder("docProps"),d=p.folder("xl"),h=d.folder("_rels"),g=d.folder("theme"),u=d.folder("worksheets");m.file(".rels",c._relsRels),f.file("app.xml",c.docPropsAppXml),f.file("core.xml",c.docPropsCoreXml),h.file("workbook.xml.rels",c.xl_relsWorkbookXmlRels),g.file("theme1.xml",c.xlThemeTheme1Xml),u.file("sheet1.xml",i),d.file("sharedStrings.xml",n),d.file("styles.xml",s),d.file("workbook.xml",c.xlWorkbookXml),p.file("[Content_Types].xml",c.Content_TypesXml),p.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}).then((function(e){return a.downloadFile(e,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",t)})),delete a.conditionalFormattingXLSX,delete a.complexHeaderMergeInfo,delete a.defaultRowHeight,delete a.rowHeight}processGroupingInformation(e,t){const a=this;if(!a.groupBy)return e;let o;if(e=e.slice(0),a.exportHeader&&(t&&a.complexHeader?(o=e.slice(0,a.complexHeader.length),e.splice(0,a.complexHeader.length)):(o=[e[0]],e.splice(0,1))),e.length>1){const t=function(e,t){let a;switch(t||typeof e){case"string":a=(new Intl.Collator).compare;break;case"number":a=function(e,t){return e-t};break;case"boolean":case"bool":a=function(e,t){return e===t?0:!1===e?-1:1};break;case"date":case"time":case"dateTime":e instanceof Date?a=function(e,t){return e.getTime()-t.getTime()}:(e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber)&&(a=function(e,t){return e.compare(t)});break;case"object":if(e instanceof Date)a=function(e,t){return e.getTime()-t.getTime()};else if(e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber)a=function(e,t){return e.compare(t)};else if(e instanceof Smart.Utilities.Complex||window.NIComplex&&e instanceof window.NIComplex){const e=new Smart.Utilities.ComplexNumericProcessor;a=function(t,a){return e.compareComplexNumbers(t,a)}}}return a};!function(e,a,o,l){if(!e||!Array.isArray(e)||0===e.length||!a||Array.isArray(a)&&0===a.length)return;"string"==typeof a&&(a=[a]);const r=[],n=[];void 0===o&&(o=[]);for(let l=0;l<a.length;l++)void 0===o[l]||"asc"===o[l]||"ascending"===o[l]?r[l]=1:r[l]=-1,n[l]=t(e[0][a[l]]);l?l(e,a,o,n):e.sort((function(e,t){for(let o=0;o<a.length;o++){const l=n[o](e[a[o]],t[a[o]]);if(0===l){if(a[o+1])continue;return void 0!==e._index?(e._index-t._index)*r[o]:0}return l*r[o]}}))}(e,a.groupBy)}return o&&(e=o.concat(e)),a.getGroupLabels(e),e}exportToXML(e,t){const a=this.datafields.slice(0);let o='<?xml version="1.0" encoding="UTF-8" ?>\n<table>\n';return-1===a.indexOf("rows")&&a.push("rows"),o+=function e(t,o){let l="";for(let r=0;r<t.length;r++){const n=t[r];l+=o+"<row>\n";for(let t=0;t<a.length;t++){const r=a[t];if("rows"!==r)l+=o+` <${r}>${n[r]}</${r}>\n`;else{if(!n.rows)continue;l+=`${o} <rows>\n${e(n.rows,o+" ")}${o} </rows>\n`}}l+=o+"</row>\n"}return l}(e," ")+"</table>",this.downloadFile(o,"application/xml",t)}formatDate(e,t){if(!Smart.Utilities.DateTime)return e;try{return new Smart.Utilities.DateTime(e).toString(t)}catch(t){return e}}formatNumber(e,t){if(!Smart.Utilities.NumberRenderer)return e;const a=(new Smart.Utilities.NumberRenderer).formatNumber(e,t);return void 0===a?e:a}generateAuxiliaryFiles(){const e=(new Date).toISOString();return{_relsRels:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',docPropsAppXml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>',docPropsCoreXml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>Smart HTML Elements</dc:creator><cp:lastModifiedBy>Smart HTML Elements</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">${e}</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">${e}</dcterms:modified></cp:coreProperties>`,xl_relsWorkbookXmlRels:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>',xlThemeTheme1Xml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri Light" panose="020F0302020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Calibri" panose="020F0502020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{62F939B6-93AF-4DB8-9C6B-D6C7DFDC589F}" vid="{4A3C46E8-61CC-4603-A589-7422A47A8E4A}"/></a:ext></a:extLst></a:theme>',xlWorkbookXml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15 xr xr6 xr10 xr2" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr6="http://schemas.microsoft.com/office/spreadsheetml/2016/revision6" xmlns:xr10="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"><fileVersion appName="xl" lastEdited="7" lowestEdited="7" rupBuild="20325"/><workbookPr defaultThemeVersion="166925"/><mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice Requires="x15"><x15ac:absPath url="C:UsersjqwidgetsDesktop" xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/></mc:Choice></mc:AlternateContent><xr:revisionPtr revIDLastSave="0" documentId="13_ncr:1_{0DEDCB6D-5403-4CD8-AAA5-59B6D238A8B6}" xr6:coauthVersionLast="34" xr6:coauthVersionMax="34" xr10:uidLastSave="{00000000-0000-0000-0000-000000000000}"/><bookViews><workbookView xWindow="0" yWindow="0" windowWidth="19200" windowHeight="6950" xr2:uid="{0CB664E6-3800-4A88-B158-B46A682E7484}"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><calcPr calcId="179021"/><extLst><ext uri="{140A7094-0E35-4892-8432-C4D2E57EDEB5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:workbookPr chartTrackingRefBase="1"/></ext></extLst></workbook>',Content_TypesXml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="bin" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings"/><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>'}}generateDefaultStyle(e){const t=this,a={},o=t.datafields,l=t.complexHeader?e[t.complexHeader.length]:e[+t.exportHeader];if(!l)return a;for(let e=0;e<o.length;e++)l[o[e]]instanceof Date&&(a.columns||(a.columns=[]),a.columns[o[e]]={format:"d"});return a}generateGroupRow(e){const t=e.rowNumber,a="A"+t,o=` <row r="${t}" outlineLevel="${e.outlineLevel}" spans="1:${e.numberOfColumns}"${this.getCustomRowHeight(t-1)} x14ac:dyDescent="0.45">\n <c r="${a}" t="s" s="0">\n <v>${e.sharedStringIndex}</v>\n </c>\n </row>\n`;return e.mergedCells.push({from:a,to:this.columnsArray[e.numberOfColumns-1]+t}),o}generateSharedStrings(e){const t=this,a=t.datafields,o=[];let l="",r=0,n=0;function s(e){r++,-1===o.indexOf(e)&&(n++,o.push(e),e=(e=(e=(e=(e=e.replace(/&(?!amp;)/g,"&amp;")).replace(/'/g,"&apos;")).replace(/"/g,"&quot;")).replace(/>/g,"&gt;")).replace(/</g,"&lt;"),l+=`<si><t>${e}</t></si>`)}for(let o=0;o<e.length;o++){const l=e[o];for(let e=0;e<a.length;e++){let o=l[a[e]];null!==o||t.allowNull||(o=""),"string"==typeof o&&s(o)}}if(t.groupLabels)for(let e=0;e<t.groupLabels.length;e++)s(t.groupLabels[e]);return l=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="${r}" uniqueCount="${n}">${l}</sst>`,{collection:o,xml:l}}generateSheet1(e,t){const a=this,o=a.columnsArray.length,l=e.length,r=a.columnsArray[o-1]+l,n=a.datafields,s=a.getFilters(),i=[].concat(a.complexHeaderMergedCells);let c=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac xr xr2 xr3" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xr:uid="{7F25248B-C640-4C64-AD47-C0EA0E5D90D0}">\n <sheetPr filterMode="${""!==s}" />\n <dimension ref="A1:${r}" />\n <sheetViews>\n <sheetView tabSelected="1" workbookViewId="0" />\n </sheetViews>\n <sheetFormatPr defaultRowHeight="14.5" x14ac:dyDescent="0.35" />${a.getCustomColumnWidths()}\n <sheetData>\n`;function p(e,t){return a.columnsArray[e]+t}for(let l=0;l<=e.length;l++){const r=e[l],s=l+1;let i="";if(a.actualHierarchy){const t=e[l-1];t&&t._collapsed&&(!r||t._level>r._level)&&(i=' collapsed="true"')}if(l===e.length){i&&(c+=` <row r="${s}" outlineLevel="${Math.max(e[l-1]._level-2,0)}" hidden="false" collapsed="true" />\n`);break}let m=` <row r="${s}"${a.getOutlineLevel(r)} hidden="${r._hidden||r._collapsed||!1}"${i} spans="1:${o}"${a.getCustomRowHeight(s-1)} x14ac:dyDescent="0.45">\n`;for(let e=0;e<n.length;e++){const o=a.getXLSXCellStyle(p(e,s));m+=a.getActualCellData(r[n[e]],{r:p(e,s),s:o},t)}m+=" </row>\n",c+=m}return c+=` </sheetData>${a.conditionalFormattingXLSX.conditions}${s}${a.getMergedCells(i)}\n <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" />\n <pageSetup paperSize="9" orientation="portrait" r:id="rId1" />\n</worksheet>`,c}generateSheet1WithGrouping(e,t){const a=this,o=a.columnsArray.length,l=e.length,r=a.columnsArray[o-1]+l,n=a.datafields,s=[].concat(a.complexHeaderMergedCells);let i=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac xr xr2 xr3" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xr:uid="{7F25248B-C640-4C64-AD47-C0EA0E5D90D0}">\n <dimension ref="A1:${r}" />\n <sheetViews>\n <sheetView tabSelected="1" workbookViewId="0" />\n </sheetViews>\n <sheetFormatPr defaultRowHeight="14.5" x14ac:dyDescent="0.35" />${a.getCustomColumnWidths()}\n <sheetData>\n`,c=0,p=[];function m(e,t){return a.columnsArray[e]+t}e:for(let l=0;l<e.length;l++){const r=e[l],f=l+1+c;let d=0,h="";if(!a.exportHeader||!a.complexHeader&&0!==l||a.complexHeader&&l>=a.complexHeader.length){let e="";for(let n=0;n<a.groupBy.length;n++){const m=a.groupBy[n],h=r[m],g=a.groups[m][h];if(e+=h,-1===p.indexOf(e)){let r=t.indexOf(g);i+=a.generateGroupRow({rowNumber:f,outlineLevel:d,numberOfColumns:o,sharedStringIndex:r,mergedCells:s}),p.push(e),l--,c++;continue e}d++}h=` outlineLevel="${d}"`}let g=` <row r="${f}"${h} spans="1:${o}"${a.getCustomRowHeight(f-1)} x14ac:dyDescent="0.45">\n`;for(let e=0;e<n.length;e++){const o=a.getXLSXCellStyle(m(e,l+1));g+=a.getActualCellData(r[n[e]],{r:m(e,f),s:o},t)}g+=" </row>\n",i+=g}return i+=` </sheetData>${a.getMergedCells(s)}\n <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" />\n <pageSetup paperSize="9" orientation="portrait" r:id="rId1" />\n</worksheet>`,i}getActualCellData(e,t,a){const o=t.r,l=t.s||' s="0"';return null!==e||this.allowNull||(e=""),"string"==typeof e?` <c r="${o}" t="s"${l}>\n <v>${a.indexOf(e)}</v>\n </c>\n`:"boolean"==typeof e?` <c r="${o}" t="b"${l}>\n <v>${+e}</v>\n </c>\n`:e instanceof Date?` <c r="${o}"${l}>\n <v>${(e.getTime()+this.timeBetween1900And1970)/864e5+2}</v>\n </c>\n`:` <c r="${o}"${l}>\n <v>${e}</v>\n </c>\n`}getColumnsArray(){const e=this.datafields.length,t=[];function a(e){return e<26?"":String.fromCharCode(64+Math.floor(e/26))}for(let o=0;o<e;o++)t.push(a(o)+String.fromCharCode(65+(o<26?o:o%26)));this.columnsArray=t}getColumnStyle(){const e=this,t=e.style;if(!t)return" .header { border: 1px solid black; padding: 5px; }\n .column { border: 1px solid black; padding: 5px; }\n .group { background-color: #FFFFFF; color: #000000; font-weight: bold; }";let a;a=t.removeDefault?{header:"",column:"",group:""}:{header:"border: 1px solid black; padding: 5px; ",column:"white-space: nowrap; overflow: hidden; border: 1px solid black; padding: 5px; ",group:"background-color: #FFFFFF; color: #000000; font-weight: bold; "};const o=e.data[0];let l="";const r=t.header||{};for(let t in r){if(!Object.prototype.hasOwnProperty.call(r,t))continue;const l=r[t];if(o[t]){a["header"+t]||(a["header"+t]="");for(let e in l)if(Object.prototype.hasOwnProperty.call(l,e)){const o=Smart.Utilities.Core.toDash(e)+": "+l[e]+"; ";a["header"+t]+=o,"width"===e&&(a["column"+t]||(a["column"+t]=""),a["column"+t]+=o)}}else"height"===t&&e.complexHeader?a.header+="height: "+parseInt(r[t],10)/e.complexHeader.length+"px; ":a.header+=Smart.Utilities.Core.toDash(t)+": "+r[t]+"; "}const n=t.columns||{};for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;const t=n[e];if(o[e]){a["column"+e]||(a["column"+e]="");for(let o in t)isNaN(o)&&Object.prototype.hasOwnProperty.call(t,o)&&"format"!==o&&(a["column"+e]+=Smart.Utilities.Core.toDash(o)+": "+t[o]+"; ")}else a.column+=Smart.Utilities.Core.toDash(e)+": "+t+"; "}for(let e in a)Object.prototype.hasOwnProperty.call(a,e)&&(l+=` .${e} { ${a[e]}}\n`);return t.custom&&(l+=`${t.custom}\n`),l}getCustomColumnWidths(){const e=this;if(!e.style||!e.columnWidth||0===e.columnWidth.length)return"";let t="\n <cols>\n";for(let a=0;a<e.columnWidth.length;a++){let o=e.columnWidth[a];void 0!==o&&(o=Math.round(parseFloat(o))/7,t+=` <col min="${a+1}" max="${a+1}" width="${o}" customWidth="1" />\n`)}return t+=" </cols>",t}getCustomFilter(e,t){let a,o="equal";switch(e instanceof Date&&(e=(e.getTime()+this.timeBetween1900And1970)/864e5+2),t=t.toUpperCase()){case"EMPTY":a="";break;case"NOT_EMPTY":a="",o="notEqual";break;case"CONTAINS":case"CONTAINS_CASE_SENSITIVE":a=`*${e}*`;break;case"DOES_NOT_CONTAIN":case"DOES_NOT_CONTAIN_CASE_SENSITIVE":a=`*${e}*`,o="notEqual";break;case"STARTS_WITH":case"STARTS_WITH_CASE_SENSITIVE":a=`${e}*`;break;case"ENDS_WITH":case"ENDS_WITH_CASE_SENSITIVE":a=`*${e}`;break;case"EQUAL":case"EQUAL_CASE_SENSITIVE":a=e;break;case"NULL":a=null;break;case"NOT_NULL":a=null,o="notEqual";break;case"NOT_EQUAL":a=e,o="notEqual";break;case"LESS_THAN":a=e,o="lessThan";break;case"LESS_THAN_OR_EQUAL":a=e,o="lessThanOrEqual";break;case"GREATER_THAN":a=e,o="greaterThan";break;case"GREATER_THAN_OR_EQUAL":a=e,o="greaterThanOrEqual"}return` <customFilter val="${a}" operator="${o}"/>\n`}getCustomRowHeight(e){const t=this;return t.style&&(t.rowHeight[e]||t.defaultRowHeight)||""}getDatafields(e){const t=e[0],a=[];for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&"_"!==e.charAt(0)&&a.push(e);this.datafields=a}getFilters(){const e=this,t=e.filterBy;if(!t)return"";let a="";for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){const l=e.datafields.indexOf(o);if(-1===l)continue;const r=t[o],n=r.filters;a+=` <filterColumn colId="${l}">\n <customFilters and="${!r.operator}">\n`;for(let t=0;t<n.length;t++)a+=e.getCustomFilter(n[t].value,n[t].condition);a+=" </customFilters>\n </filterColumn>"}return a?(a=`\n <autoFilter ref="A1:${e.columnsArray[e.columnsArray.length-1]+e.data.length}">\n${a}\n </autoFilter>`,a):""}getGroupLabels(e){const t=this,a=void 0!==t.xlsxStartIndex?t.xlsxStartIndex:+t.exportHeader,o={},l=[];for(let r=a;r<e.length;r++){const n=e[r];for(let r=0;r<t.groupBy.length;r++){const s=t.groupBy[r],i=n[s];let c=o[s];void 0===c&&(o[s]={},c=o[s]),void 0===c[i]&&(c[i]=(t.exportHeader?e[a-1][s]:s)+": "+i,l.push(c[i]))}}t.groups=o,t.groupLabels=l}getHTMLHeader(e,t){const a=this;let o="\n <thead>\n";if(!a.complexHeader){o+=" <tr>\n";for(let a=0;a<e.length;a++){const l=e[a];o+=` <th class="header header${l}">${t[0][l]}</th>\n`}return o+=" </tr>\n </thead>",o}for(let t=0;t<a.complexDataFieldsHeader.length;t++){const l=a.complexDataFieldsHeader[t];o+=" <tr>\n";for(let r=0;r<l.length;r++){const n=l[r];let s=1,i=1;if(l[r-1]&&l[r-1]===n||a.complexDataFieldsHeader[t-1]&&a.complexDataFieldsHeader[t-1][r]===n)continue;let c=r+1;for(;l[c]&&l[c]===l[c-1];)s++,c++;for(c=t+1;a.complexDataFieldsHeader[c]&&a.complexDataFieldsHeader[c][r]===n;)i++,c++;o+=` <th class="header${t===a.complexHeader.length-1||i+t===a.complexHeader.length?" header"+e[r]:""}" colspan="${s}" rowspan="${i}">${a.complexHeader[t][r]}</th>\n`}o+=" </tr>\n"}return o+=" </thead>",o}getConditionalFormatting(){const e=this,t=e.conditionalFormatting;if(!t)return void(e.conditionalFormattingXLSX={conditions:"",styles:""});const a=[];let o="",l="";for(let r=t.length-1;r>=0;r--){const n=t[r],s=e.columnsArray[e.datafields.indexOf(n.column)],i=s+(e.xlsxStartIndex+1),c=i+":"+s+e.data.length,p=n.background+n.color,m=e.getConditionalAttributes(n,i);let f=a.indexOf(p);-1===f&&(l+=` <dxf>\n <font>\n <b val="0"/>\n <i val="0"/>\n <color rgb="${"White"===n.color?"FFFFFFFF":"FF000000"}"/>\n <sz val="10"/>\n </font>\n <fill>\n <patternFill>\n <bgColor rgb="${e.toARGB(n.background)}"/>\n </patternFill>\n </fill>\n </dxf>\n`,f=a.length,a.push(p)),o+=` <conditionalFormatting sqref="${c}">\n <cfRule dxfId="${f}" text="${m.text}" rank="${m.rank}" percent="${m.percent}" bottom="${m.bottom}" equalAverage="${m.equalAverage}" aboveAverage="${m.aboveAverage}"${m.operator}${m.timePeriod} priority="${r+2}" type="${m.type}">\n${m.formula} </cfRule>\n </conditionalFormatting>\n`}l=` <dxfs count="${a.length}">\n${l} </dxfs>`,e.conditionalFormattingXLSX={conditions:o,styles:l}}getConditionalAttributes(e,t){let a=e.condition,o=e.comparator,l="",r=0,n=0,s=0,i=0,c="",p="",m="",f="";switch(a){case"equal":c="equal",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"lessThan":c="lessThan",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"greaterThan":c="greaterThan",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"notEqual":c="notEqual",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"between":c="between",m="cellIs",f=` <formula>${e.min}</formula>\n <formula>${e.max}</formula>\n`;break;case"duplicate":m="duplicateValues",f=" <formula>0</formula>\n";break;case"topNItems":r=o,m="top10";break;case"bottomNItems":r=o,s=1,m="top10";break;case"topNPercent":r=o,n=1,m="top10";break;case"bottomNPercent":r=o,n=1,s=1,m="top10";break;case"aboveAverage":i=1,m="aboveAverage",f=" <formula>0</formula>\n";break;case"belowAverage":m="aboveAverage",f=" <formula>0</formula>\n";break;case"contains":l=o,c="containsText",m="containsText",f=` <formula>NOT(ISERROR(SEARCH("${o}",${t})))</formula>\n`;break;case"doesNotContain":l=o,c="notContains",m="notContainsText",f=` <formula>ISERROR(SEARCH("${o}",${t}))</formula>\n`;break;case"dateOccur":p=` timePeriod="${o}"`,m="timePeriod"}return c&&(c=` operator="${c}" `),{text:l,rank:r,percent:n,bottom:s,equalAverage:0,aboveAverage:i,operator:c,timePeriod:p,type:m,formula:f}}getMergedCells(e){const t=this;let a="";for(let t=0;t<e.length;t++)e[t].from!==e[t].to&&(a+=`\n <mergeCell ref="${e[t].from}:${e[t].to}" />\n`);if(t.mergedCells)for(let e=0;e<t.mergedCells.length;e++){const o=t.mergedCells[e];o.rowspan<2&&o.colspan<2||(a+=`\n <mergeCell ref="${t.columnsArray[o.cell[0]]+(o.cell[1]+t.xlsxStartIndex+1)}:${t.columnsArray[o.cell[0]+o.colspan-1]+(o.cell[1]+t.xlsxStartIndex+o.rowspan)}" />\n`)}return a&&(a=`\n <mergeCells count="${e.length}">${a} </mergeCells>`),a}getNumFmtIndex(e,t){let a=t.collection.indexOf(e);return-1===a?(a=t.collection.length+100,t.collection.push(e),t.xml+=`<numFmt numFmtId="${a}" formatCode="${e}"/>`):a+=100,a}getOutlineLevel(e){return this.actualHierarchy&&1!==e._level?` outlineLevel="${e._level-1}"`:""}getRowStyle(){const e=this.style;if(!e)return"";const t=e.rows;if(!t)return"";const a={row:""};let o="";for(let e in t){if(!Object.prototype.hasOwnProperty.call(t,e)||"alternationCount"===e||"alternationStart"===e||"alternationEnd"===e)continue;const o=t[e];if(-1===e.indexOf("alt"))if(isNaN(e))a.row+=Smart.Utilities.Core.toDash(e)+": "+t[e]+"; ";else{a["row"+e]||(a["row"+e]="");for(let t in o)Object.prototype.hasOwnProperty.call(o,t)&&(a["row"+e]+=Smart.Utilities.Core.toDash(t)+": "+o[t]+"; ")}else{const t=e.slice(16,17),l=e.slice(17);a["rowN"+t]||(a["rowN"+t]=""),a["rowN"+t]+="Color"===l?"color : "+o+"; ":"BorderColor"===l?"border-color : "+o+"; ":"background-color : "+o+"; "}}let l=Object.keys(a);l.sort((function(e,t){if("row"===e)return-1;if("row"===t)return 1;const a=!isNaN(e.slice(3)),o=!isNaN(t.slice(3));return a&&!o?1:!a&&o?-1:+(e<t)}));for(let e=0;e<l.length;e++)o+=` .${l[e]} { ${a[l[e]]}}\n`;return o}getTableStyle(){const e=this.style;if(!e)return' style="table-layout: fixed; border: 1px solid black; border-collapse: collapse;"';let t="table-layout: fixed; ";for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===["header","columns","rows","removeDefault","custom"].indexOf(a)&&(t+=Smart.Utilities.Core.toDash(a)+": "+e[a]+"; ");return t&&(t=' style="'+t+'"'),t}getXLSXCellStyle(e){const t=this;return void 0!==t.cellStyleMapping[e]?` s="${t.cellStyleMapping[e]}"`:""}getXLSXFormat(e,t){if("number"==typeof t){if(!/^([a-zA-Z]\d*)$/g.test(e))return e;let t=parseFloat(e.slice(1))||0,a=t>0?"."+"0".repeat(t):"";switch(e=e.slice(0,1)){case"C":case"c":return"$#,0"+a;case"D":case"d":return t?"0".repeat(t):"0";case"E":case"e":return"0"+a+e+"000";case"F":case"f":return"0"+a;case"N":case"n":return"#,0"+a;case"P":case"p":return"#,0"+a+" %";default:return}}else if(t instanceof Date){switch(e){case"d":return"m/d/yyyy";case"D":return"nnnnmmmm dd, yyyy";case"t":return"h:m AM/PM";case"T":return"h:mm:ss AM/PM";case"f":return"nnnnmmmm dd, yyyy h:m AM/PM";case"F":return"nnnnmmmm dd, yyyy h:mm:ss AM/PM";case"M":return"mmmm d";case"Y":return"yyyy mmmm";case"FP":case"PP":return"yyyy-mm-dd hh:mm:ss";case"FT":case"PT":return"hh:mm:ss"}return e=(e=(e=(e=e.replace(/f|u|n|p|e|a|x|o/gi,"")).replace(/tt/gi,"AM/PM")).replace(/:{2,}|:\s|:$|\.$/g,"")).trim()}}processColumnStyle(e){const t=this,a=e.header,o=e.columns,l=t.data[0],r=t.xlsxStartIndex;if(t.columnWidth=[],r&&a)for(let e=0;e<t.columnsArray.length;e++){const o=t.columnsArray[e],n=o+r,s=a[t.datafields[e]];for(let e in a)if(Object.prototype.hasOwnProperty.call(a,e)&&void 0===l[e])if(t.complexHeader)for(let l=0;l<t.complexHeader.length;l++)"height"!==e?t.storeCellStyle(o+(l+1),e,a[e]):t.rowHeight[l]=` ht="${parseFloat(a.height)/t.complexHeader.length/2}"`;else{if("height"===e){t.rowHeight[0]=` ht="${parseFloat(a.height)/2}"`;continue}t.storeCellStyle(n,e,a[e])}if(s)for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){if("width"===a){t.columnWidth[e]=s.width;continue}t.storeCellStyle(n,a,s[a])}}else if(a)for(let e=0;e<t.columnsArray.length;e++){const o=a[t.datafields[e]];o&&void 0!==o.width&&(t.columnWidth[e]=o.width)}if(!o)return"";for(let e=r;e<t.data.length;e++)for(let a=0;a<t.columnsArray.length;a++){const r=t.columnsArray[a]+(e+1),n=t.datafields[a],s=o[n];for(let e in o)Object.prototype.hasOwnProperty.call(o,e)&&void 0===l[e]&&t.storeCellStyle(r,e,o[e]);if(s)for(let a in s)isNaN(a)&&Object.prototype.hasOwnProperty.call(s,a)&&t.storeCellStyle(r,a,s[a],t.data[e][n])}}processComplexHeader(e,t,a){const o=this,l={},r=-1!==["html","jpeg","pdf","png","xlsx"].indexOf(a)&&e.columngroups,n=[],s={},i={},c=[],p=[];let m=0;function f(t){for(let a=0;a<e.columngroups.length;a++){const o=e.columngroups[a];if(o.name===t)return o}}function d(e,t){const a=[];for(;e;){if(a.unshift(e[t]),!e.parentGroup)return a;e=f(e.parentGroup)}}if(r){for(let t=0;t<e.columngroups.length;t++){const a=e.columngroups[t],o=d(a,"label");s[a.name]=o,i[a.name]=d(a,"name"),m=Math.max(m,o.length)}m++;for(let e=0;e<m;e++)c[e]=[],p[e]=[]}for(let t=0;t<e.columns.length;t++){const a=e.columns[t];if(l[a.dataField]=a.label,!r)continue;if(n[t]=a.dataField,c[m-1][t]=a.label,p[m-1][t]=a.dataField,!a.columnGroup)continue;const o=s[a.columnGroup],f=i[a.columnGroup];if(o)for(let e=0;e<o.length;e++)c[e][t]=o[e],p[e][t]=f[e]}if(c.length>1){const e=Object.keys(l).length;for(let o=0;o<m-1;o++){const l={};for(let t=0;t<e;t++){if(void 0===c[o][t]){let e=o+1;for(;void 0===c[e][t];)e++;c[o][t]=c[e][t],p[o][t]=p[e][t]}l[n[t]]=c[o][t]}"xlsx"===a&&t.splice(o,0,l)}if(o.complexHeader=c,o.complexDataFieldsHeader=p,"xlsx"!==a)t.unshift(l);else{t.splice(m-1,0,l);const a={};for(let t=0;t<m;t++)for(let o=0;o<e;o++){const e=p[t][o];if(a[e]){const l=a[e].to;if(t-l[0]>1||o-l[1]>1){a[e+Math.random().toString(36)]=a[e],a[e]={from:[t,o],to:[t,o]};continue}a[e].to=[t,o]}else a[e]={from:[t,o]},a[e].to=a[e].from}o.complexHeaderMergeInfo=a}}else t.unshift(l)}processHierarchicalData(e,t){const a=this,o="xlsx"!==t?+a.exportHeader:a.xlsxStartIndex,l={},r=[];let n=0,s=!1;if(void 0===e[o]._keyDataField)return a.processNestedData(e,t,o);for(let t=o;t<e.length;t++){const a=Object.assign({},e[t]);let o=a._parentDataField;void 0===o&&(o=null),void 0===l[o]?l[o]=[a]:l[o].push(a)}if(o)for(let a=0;a<o;a++)r.push(Object.assign({},e[a])),-1===["json","pdf","xml"].indexOf(t)&&(r[a]._level=1);return"json"!==t&&"xml"!==t?function e(t,a,o){const i=l[t];if(n=Math.max(n,a),void 0!==i)for(let t=0;t<i.length;t++){const n=i[t],c=n._keyDataField;n._collapsed=o,n._level=a,r.push(n),l[c]&&(s=!0,n._expanded=void 0===n._expanded||n._expanded,e(c,a+1,o||!n._expanded))}}(null,1,!1):function e(a,o,r){const i=l[a];if(n=Math.max(n,o),void 0!==i)for(let a=0;a<i.length;a++){const n=i[a],c=n._keyDataField;let p;if("json"===t){p={};for(let e in n)Object.prototype.hasOwnProperty.call(n,e)&&"_"!==e.charAt(0)&&(p[e]=n[e])}else p=Object.assign({},n);r.push(p),l[c]&&(s=!0,p.rows=[],e(c,o+1,p.rows))}}(null,1,r),s||(a.actualHierarchy=!1),a.maxLevel=n,r}processNestedData(e,t,a){const o=this,l=[];let r=0,n=!1;if(a)for(let o=0;o<a;o++)l.push(Object.assign({},e[o])),-1===["json","pdf","xml"].indexOf(t)&&(l[o]._level=1);return"json"!==t&&"xml"!==t?function e(t,a,o,s){r=Math.max(r,o);for(let r=t;r<a.length;r++){const t=Object.assign({},a[r]);t._collapsed=s,t._level=o,l.push(t),t.children&&t.children.length>0&&(n=!0,t._expanded=void 0===t._expanded||t._expanded,e(0,t.children,o+1,s||!t._expanded)),delete t.children}}(a,e,1,!1):function e(t,a,o,s){r=Math.max(r,s);for(let r=t;r<a.length;r++){const t=Object.assign({},a[r]);1===s?l[r]=t:o[r]=t,t.children&&t.children.length>0&&(n=!0,t.rows=[],e(0,t.children,t.rows,s+1)),delete t.children}}(a,e,void 0,1),n||(o.actualHierarchy=!1),o.maxLevel=r,l}processRowStyle(e){const t=this,a=e.rows;if(t.rowHeight=[],!a)return;const o=t.xlsxStartIndex;function l(e,a,l){for(let r=0;r<t.columnsArray.length;r++){const n=t.columnsArray[r]+(e+1+o);t.storeCellStyle(n,a,l)}}a.height&&(t.defaultRowHeight=` ht="${parseFloat(a.height)/2}"`);for(let e=o;e<t.data.length;e++){const r=e-o;for(let e in a)Object.prototype.hasOwnProperty.call(a,e)&&-1===e.indexOf("alt")&&isNaN(e)&&"height"!==e&&l(r,e,a[e]);if(a.alternationCount&&((void 0===a.alternationStart||r>=a.alternationStart)&&(void 0===a.alternationEnd||r<=a.alternationEnd)||a.alternationStart===a.alternationEnd)){const e=(r-(a.alternationStart||0))%a.alternationCount;a[`alternationIndex${e}Color`]&&l(r,"color",a[`alternationIndex${e}Color`]),a[`alternationIndex${e}BorderColor`]&&l(r,"borderColor",a[`alternationIndex${e}BorderColor`]),a[`alternationIndex${e}BackgroundColor`]&&l(r,"backgroundColor",a[`alternationIndex${e}BackgroundColor`])}if(a[r])for(let o in a[r])if(Object.prototype.hasOwnProperty.call(a[r],o)){if("height"===o){t.rowHeight[e]=` ht="${parseFloat(a[r].height)/2}"`;continue}l(r,o,a[r][o])}}}storeCellStyle(e,t,a){const o=this.styleMap[e];switch(t){case"backgroundColor":o.fills.fgColor=a;break;case"color":o.fonts.color=a;break;case"fontFamily":o.fonts.name=a.replace(/"/g,"'");break;case"fontSize":o.fonts.sz=parseFloat(a);break;case"fontStyle":"italic"===a?o.fonts.i=!0:delete o.fonts.i;break;case"fontWeight":"bold"===a?o.fonts.b=!0:delete o.fonts.b;break;case"numFmt":o.numFmt=a;break;case"textAlign":o.alignment.horizontal=a;break;case"textDecoration":"underline"===a?o.fonts.u=!0:delete o.fonts.u;break;case"verticalAlign":"middle"===a&&(a="center"),o.alignment.vertical=a}}toARGB(e){e=e.replace(/\s/g,"");const t=/rgb\((\d+),(\d+),(\d+)\)/gi.exec(e);if(null!==t){const e=parseFloat(t[1]).toString(16).toUpperCase(),a=parseFloat(t[2]).toString(16).toUpperCase(),o=parseFloat(t[3]).toString(16).toUpperCase();return"FF"+"0".repeat(2-e.length)+e+"0".repeat(2-a.length)+a+"0".repeat(2-o.length)+o}const a=/rgba\((\d+),(\d+),(\d+)\,(\d*.\d+|\d+)\)/gi.exec(e);if(null!==a){const e=Math.round(255*parseFloat(a[4])).toString(16).toUpperCase(),t=parseFloat(a[1]).toString(16).toUpperCase(),o=parseFloat(a[2]).toString(16).toUpperCase(),l=parseFloat(a[3]).toString(16).toUpperCase();return"0".repeat(2-e.length)+e+"0".repeat(2-t.length)+t+"0".repeat(2-o.length)+o+"0".repeat(2-l.length)+l}const o=/^#(.)(.)(.)$/gi.exec(e);if(null!==o){const e=o[1].toUpperCase(),t=o[2].toUpperCase(),a=o[3].toUpperCase();return"FF"+e+e+t+t+a+a}return"FF"+e.toUpperCase().slice(1)}toggleableFunctionality(){const e=this;return e.actualHierarchy?`\n <style type="text/css">\n .toggle-element {\n width: 5px;\n height: 1px;\n padding-right: 5px;\n float: left;\n text-align: right;\n cursor: pointer;\n user-select: none;\n }\n\n .collapsed {\n display: none;\n }\n </style>\n <script type="text/javascript">\n window.onload = function () {\n var expandChar = '${e.expandChar}',\n collapseChar = '${e.collapseChar}',\n toggleElements = document.getElementsByClassName('toggle-element');\n\n function getParent(child) {\n var prevSibling = child.previousElementSibling;\n\n while (prevSibling) {\n if (child.getAttribute('level') > prevSibling.getAttribute('level')) {\n return prevSibling;\n }\n\n prevSibling = prevSibling.previousElementSibling;\n }\n\n }\n\n function getFirstCollapsedAncestor(child) {\n var parent = getParent(child);\n\n while (parent) {\n if (parent.firstElementChild.firstElementChild.innerHTML === expandChar) {\n return parent;\n }\n\n parent = getParent(parent);\n }\n }\n\n for (var i = 0; i < toggleElements.length; i++) {\n toggleElements[i].addEventListener('click', function (event) {\n var expanded = this.innerHTML === collapseChar,\n row = this.parentElement.parentElement,\n sibling = row.nextElementSibling;\n\n if (expanded) {\n this.innerHTML = expandChar;\n }\n else {\n this.innerHTML = collapseChar;\n }\n\n while (sibling && row.getAttribute('level') < sibling.getAttribute('level')) {\n if (expanded) {\n sibling.style.display = 'none';\n }\n else {\n var firstCollapsedAncestor = getFirstCollapsedAncestor(sibling);\n\n if (!firstCollapsedAncestor || firstCollapsedAncestor === row) {\n sibling.classList.remove('collapsed');\n sibling.style.display = null;\n }\n\n }\n\n sibling = sibling.nextElementSibling;\n }\n });\n }\n }\n <\/script>`:""}generateStyles(e){const t=this;if(t.cellStyleMapping={},0===Object.keys(e).length&&!t.complexHeader)return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="1" x14ac:knownFonts="1"><font><sz val="11"/><color theme="1"/><name val="Calibri"/><family val="2"/><charset val="204"/><scheme val="minor"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>${t.conditionalFormattingXLSX.styles||'<dxfs count="0"/>'}<tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`;t.styleMap={};for(let e=0;e<t.data.length;e++)for(let a=0;a<t.columnsArray.length;a++)t.styleMap[t.columnsArray[a]+(e+1)]={numFmts:{},fonts:{},fills:{},borders:{},alignment:{}};if(e&&e.columns)for(let a=0;a<t.columnsArray.length;a++){const o=t.datafields[a];if(!e.columns[o]||!e.columns[o].format)continue;const l=t.getXLSXFormat(e.columns[o].format,t.data[1][o]),r=t.getXLSXFormat(e.columns[o].format,t.data[t.data.length-1][o]);r?e.columns[o].numFmt=r:l&&(e.columns[o].numFmt=l)}t.processRowStyle(e),t.processColumnStyle(e);const a={};for(let e=0;e<t.complexHeaderMergedCells.length;e++){const o=t.complexHeaderMergedCells[e];parseFloat(o.to[1])!==t.complexHeader.length?(t.styleMap[o.from].alignment.horizontal="center",t.styleMap[o.from].alignment.vertical="center"):a[o.to]=o.from}const o={xml:'<font><sz val="11" /><color theme="1" /><name val="Calibri" /><family val="2" /><charset val="204" /><scheme val="minor" /></font>',collection:["default"]},l={xml:'<fill><patternFill patternType="none" /></fill><fill><patternFill patternType="gray125" /></fill>',collection:["default","gray125"]},r={xml:"",collection:[]},n={xml:'<xf fontId="0" fillId="0" borderId="1"/>',collection:["default"]};for(let e=0;e<t.data.length;e++)for(let s=0;s<t.columnsArray.length;s++){const i=t.columnsArray[s]+(e+1),c=t.styleMap[i];let p="",m="",f="",d=[],h=[],g=[],u=[];for(let e in c.fonts)if(Object.prototype.hasOwnProperty.call(c.fonts,e)){const a=c.fonts[e];switch(e){case"color":d[0]=a,p+=`<color rgb="${t.toARGB(a)}" />`;break;case"name":d[1]=a,p+=`<name val="${a}" />`;break;case"sz":d[2]=a,p+=`<sz val="${a}" />`;break;case"i":d[3]=a,p+="<i />";break;case"b":d[4]=a,p+="<b />";break;case"u":d[5]=a,p+="<u />"}}for(let e in c.fills)if(Object.prototype.hasOwnProperty.call(c.fills,e)){const a=c.fills[e];switch(e){case"fgColor":h[0]=a,m+=`<fgColor rgb="${t.toARGB(a)}" />`}}for(let e in c.alignment)if(Object.prototype.hasOwnProperty.call(c.alignment,e)){const t=c.alignment[e];switch(e){case"horizontal":g[0]=t,f+=`horizontal="${t}" `;break;case"vertical":g[1]=t,f+=`vertical="${t}" `}}if(d=d.toString(),h=h.toString(),""!==p){let e=o.collection.indexOf(d);-1===e&&(e=o.collection.length,o.xml+="<font>"+p+"</font>",o.collection.push(d)),u[0]=e}if(""!==m){let e=l.collection.indexOf(h);-1===e&&(e=l.collection.length,l.xml+='<fill><patternFill patternType="solid">'+m+"</patternFill></fill>",l.collection.push(h)),u[1]=e}g.length>0&&(u[2]=f),void 0!==c.numFmt&&(u[3]=t.getNumFmtIndex(c.numFmt,r));const y=u.toString();if(""!==y){let e=n.collection.indexOf(y);if(-1===e){let t="<xf ";e=n.collection.length,void 0!==u[0]&&(t+=`fontId="${u[0]}" `),void 0!==u[1]&&(t+=`fillId="${u[1]}" `),void 0!==u[3]&&(t+=`numFmtId="${u[3]}" `),void 0!==u[2]?t+=`applyAlignment="1" borderId="1"><alignment ${f}/></xf>`:t+=' borderId="1"/>',n.xml+=t,n.collection.push(y)}t.cellStyleMapping[a[i]||i]=e}}return r.collection.length&&(r.xml=`<numFmts count="${r.collection.length}">${r.xml}</numFmts>`),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision">${r.xml}<fonts count="${o.collection.length}" x14ac:knownFonts="1">${o.xml}</fonts><fills count="${l.collection.length}">${l.xml}</fills><borders count="2"><border><left/><right/><top/><bottom/></border><border><left style="hair"/><right style="hair"/><top style="hair"/><bottom style="hair"/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="${n.collection.length}">${n.xml}</cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>${t.conditionalFormattingXLSX.styles}<dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`}});
804
804
 
805
805
  /***/ }),
806
806
 
@@ -828,14 +828,14 @@ Smart.Utilities.Assign("FormulaParser",class{constructor(a){const e=this;let r;t
828
828
  /***/ 3176:
829
829
  /***/ (() => {
830
830
 
831
- Smart("smart-grid-panel",class extends Smart.BaseElement{static get properties(){return{closeButtonPosition:{value:"left",allowedValues:["left","right"],type:"string"},dataSource:{value:[],type:"array",reflectToAttribute:!1},messages:{value:{en:{apply:"Ok",booleanFirst:"☐",booleanLast:"☑",cancel:"Cancel",dateFirst:"1",dateLast:"9",from:"from",numberFirst:"1",numberLast:"9",stringFirst:"A",stringLast:"Z",thenBy:"then by"}},type:"object",extend:!0}}}static get listeners(){return{change:"_changeHandler",click:"_clickHandler",keydown:"_keydownHandler","sortable.dragEnd":"_sortableDragEndHandler"}}static get requires(){return{"Smart.Input":"smart.input.js","Smart.Sortable":"smart.sortable.js"}}static get styleUrls(){return["smart.gridpanel.css"]}template(){return'<div id="container" role="presentation">\n <smart-sortable id="sortable" disable-mode="manual" animation="[[animation]]" disabled="[[readonly]]" right-to-left="[[rightToLeft]]"\n drag-mode="handle" handle-position="right" handle-visibility="visible" theme="[[theme]]">\n </smart-sortable>\n <div id="footer" class="smart-grid-panel-container-footer" role="presentation">\n <smart-input id="inputNotSorted" right-to-left="[[rightToLeft]]" animation="[[animation]]" readonly theme="[[theme]]"></smart-input>\n <div id="buttonsContainer" class="smart-grid-panel-buttons-container smart-unselectable" role="presentation">\n <span class="smart-grid-panel-cancel-button" role="button"></span>\n <span class="smart-grid-panel-apply-button primary" role="button"></span>\n </div>\n </div>\n </div>'}ready(){super.ready()}render(){const e=this;e.setAttribute("role","dialog"),"right"===e.closeButtonPosition&&(e.$.sortable.handlePosition="left"),e._localize(),e._createSources(),super.render()}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const n=this;switch(e){case"animation":case"theme":Array.from(n.$.sortable.getElementsByTagName("smart-input")).forEach((t=>t[e]=a));break;case"disabled":case"unfocusable":n._setFocusable();break;case"closeButtonPosition":"right"===n.closeButtonPosition?n.$.sortable.handlePosition="left":n.$.sortable.handlePosition="right";break;case"dataSource":n.$.sortable.$.container.innerHTML="",n._createSources();break;case"locale":case"messages":{const e=n.$.sortable._items;n._localize(),e.length&&(e[0].children[1].innerHTML=n.localize("firstBy"),e.forEach((function(e,t){0!==t&&(e.children[1].innerHTML=n.localize("thenBy"));const a=n._HTMLToSourceMap.get(e),l=n._ascDescTemplates[a.dataType]||n._ascDescTemplates.string;e.children[3].innerHTML=n.localize("from"),e.children[4].firstElementChild.innerHTML=l[0],e.children[4].children[1].innerHTML=l[1]})));break}case"maxLevel":if(null!=a)for(;n.$.sortable._items.length>0&&n.$.sortable._items.length>a;)n._interactionHandler(n.$.sortable._items[n.$.sortable._items.length-1].firstElementChild);n._disableItemAddition();break;case"rightToLeft":n.$.inputNotSorted.rightToLeft=a,n.$.inputNotSorted.dropDownButtonPosition=a?"left":"right",n.$.sortable._items.forEach((e=>{const t=e.querySelector("smart-input");t.rightToLeft=a,t.dropDownButtonPosition=a?"left":"right"}))}}_changeHandler(e){const t=this,a=t.shadowRoot||t.isInShadowDOM?e.composedPath()[0]:e.target;if(t.$.inputNotSorted.contains(a)){const e=t.$.inputNotSorted.value,a=t._labelToSourceMap.get(e);return t._createSortItem(a,t.$.sortable._items.length),t.$.sortable.updateItems(),t._visibleLabels.push(e),t._updateHiddenSource(),t._disableItemAddition(),void(t.$.inputNotSorted.value="")}const n=a.closest("smart-input");if(!n)return;const l=n.parentElement.parentElement,o=l.children[4].firstElementChild,i=l.children[4].children[1],r=n.value,s=t._HTMLToSourceMap.get(l).label,d=t._labelToSourceMap.get(r),c=t._ascDescTemplates[d.dataType]||t._ascDescTemplates.string;t._HTMLToSourceMap.set(l,d),t._visibleLabels.splice(t._visibleLabels.indexOf(s),1,r),t._updateHiddenSource(),o.innerHTML=c[0],i.innerHTML=c[1],d.sortDirection&&-1===d.sortDirection.indexOf("asc")?(i.classList.add("selected"),o.classList.remove("selected")):(o.classList.add("selected"),i.classList.remove("selected"))}_updateHiddenSource(){const e=this;e._hiddenSource=e.dataSource.map((e=>({label:e.label,value:e.dataField,icon:e.icon}))).filter((t=>-1===e._visibleLabels.indexOf(t.label))),e.$.inputNotSorted.dataSource=e._hiddenSource,e.$.sortable._items.forEach((t=>t.getElementsByTagName("smart-input")[0].dataSource=e._hiddenSource)),e._disableItemAddition(),e.$.fireEvent("dataSourceChange")}_clickHandler(e){const t=this;t._interactionHandler(t.shadowRoot||t.isInShadowDOM?e.composedPath()[0]:e.target,e)}_interactionHandler(e,t){const a=this;if(a.disabled||a.readonly)return!0;const n=e.closest(".smart-grid-panel-item");if(n){if(e===n.firstElementChild){const e=a._HTMLToSourceMap.get(n).label;a.$.sortable.$.container.removeChild(n),a.$.sortable.updateItems(),a._visibleLabels.splice(a._visibleLabels.indexOf(e),1),a._updateHiddenSource(),a._disableItemAddition(),a.$.sortable._items.length&&(a.$.sortable._items[0].children[1].innerHTML=a.localize("firstBy")),a.$.fireEvent("remove")}else if(n.children[4].contains(e)){const l=n.children[4].firstElementChild,o=n.children[4].children[1];"click"===t.type?e.classList.contains("selected")||(e===l?(o.classList.remove("selected"),l.classList.add("selected"),a._HTMLToSourceMap.get(n).sortDirection="ascending"):e===o&&(l.classList.remove("selected"),o.classList.add("selected"),a._HTMLToSourceMap.get(n).sortDirection="descending")):(l.classList.toggle("selected"),o.classList.toggle("selected"),a._HTMLToSourceMap.get(n).sortDirection=l.classList.contains("selected")?"ascending":"descending")}return!0}if(e===a.$.buttonsContainer.firstElementChild)return a.$.fireEvent("cancel"),!0;if(e===a.$.buttonsContainer.children[1]){const e=[],t={dataFields:[],dataTypes:[],orderBy:[]},n={value:e};return a.$.sortable._items.forEach((n=>{const l=a._HTMLToSourceMap.get(n);e.push({dataField:l.dataField,sortDirection:l.sortDirection}),t.dataFields.push(l.dataField),t.dataTypes.push(l.dataType),t.orderBy.push(l.sortDirection)})),(a instanceof Smart.SortPanel||a instanceof Smart.GroupPanel)&&(n.sortByInfo=t),a.$.fireEvent("apply",n),!0}}_keydownHandler(e){const t=this,a=e.key;" "!==a&&"Enter"!==a||(e.preventDefault(),t._interactionHandler((t.shadowRoot||t.getRootNode()).activeElement,e))}_sortableDragEndHandler(e){const t=this,a=e.detail.oldIndex,n=e.detail.newIndex,l=Math.max(a,n),o=t.$.sortable._items;0===(a&&n)&&(o[0].children[1].innerHTML=t.localize("firstBy"),o[1].children[1].innerHTML=t.localize("thenBy"),l>1&&(o[l].children[1].innerHTML=t.localize("thenBy")))}_localize(){const e=this;e.$.inputNotSorted.placeholder=e.localize("pickAnother"),e.$.buttonsContainer.firstElementChild.innerHTML=e.localize("cancel"),e.$.buttonsContainer.children[1].innerHTML=e.localize("apply"),e._ascDescTemplates={boolean:[e.localize("booleanFirst")+" → "+e.localize("booleanLast"),e.localize("booleanLast")+" → "+e.localize("booleanFirst")],date:[e.localize("dateFirst")+" → "+e.localize("dateLast"),e.localize("dateLast")+" → "+e.localize("dateFirst")],number:[e.localize("numberFirst")+" → "+e.localize("numberLast"),e.localize("numberLast")+" → "+e.localize("numberFirst")],string:[e.localize("stringFirst")+" → "+e.localize("stringLast"),e.localize("stringLast")+" → "+e.localize("stringFirst")]}}_createSources(){const e=this,t=(e instanceof Smart.SortPanel?"sort":"group")+"Index",a=[],n=[];if(e._HTMLToSourceMap=new Map,e._labelToSourceMap=new Map,e.dataSource.forEach((n=>{e._labelToSourceMap.set(n.label,n),-1!==n[t]&&void 0!==n[t]&&a.push(n)})),a.sort(((e,a)=>e[t]-a[t])),void 0!==e.maxLevel&&null!==e.maxLevel)for(;a.length>0&&a.length>e.maxLevel;)a.pop();e.$.inputNotSorted.dropDownButtonPosition=e.rightToLeft?"left":"right",e.$.inputNotSorted.dataSource&&e.$.inputNotSorted.dataSource.length<10&&e.$.inputNotSorted.dataSource.length>0?e.$.inputNotSorted.dropDownHeight="auto":e.$.inputNotSorted.dropDownHeight=250,a.forEach((e=>n.push(e.label))),e._visibleLabels=n,e._updateHiddenSource(),a.forEach(((t,a)=>{e._createSortItem(t,a)})),e.$.sortable.updateItems(),e._disableItemAddition(),e._setFocusable()}_createSortItem(e,t){const a=this,n=a.disabled||a.unfocusable?-1:0,l=document.createElement("div"),o=a._ascDescTemplates[e.dataType]||a._ascDescTemplates.string;l.className="smart-grid-panel-item",l.innerHTML=`<div class="smart-grid-panel-item-close-button" tabindex="${n}" role="button" aria-label="Close"></div>\n<div class="smart-grid-panel-label-by smart-unselectable" role="presentation">${a.localize(t>0?"thenBy":"firstBy")}</div>\n<div class="smart-grid-panel-field-container" role="presentation"><smart-input class="smart-grid-panel-field-selection" value="${e.label}" animation="${a.animation}" readonly theme="${a.theme}" aria-label="Field name"></smart-input></div>\n<div class="smart-grid-panel-from smart-unselectable" role="presentation">${a.localize("from")}</div >\n<div class="smart-grid-panel-direction smart-unselectable" tabindex="${n}" role="presentation">\n <div class="smart-grid-panel-asc" role="button" aria-label="Ascending">${o[0]}</div >\n <div class="smart-grid-panel-desc" role="button" aria-label="Descending">${o[1]}</div>\n</div>\n`;const i=l.querySelector("smart-input");i.dataSource=a._hiddenSource,i.rightToLeft=a.rightToLeft,i.dropDownButtonPosition=a.rightToLeft?"left":"right",i.dataSource&&i.dataSource.length<10?i.dropDownHeight="auto":i.dropDownHeight=250,a.$.sortable.$.container.appendChild(l),i.tabIndex=n,e.sortDirection&&-1===e.sortDirection.indexOf("asc")?l.children[4].children[1].classList.add("selected"):(e.sortDirection="ascending",l.children[4].firstElementChild.classList.add("selected")),a._HTMLToSourceMap.set(l,e)}_disableItemAddition(){const e=this,t=e.maxLevel,a=0===e._hiddenSource.length||null!=t&&Math.max(0,t)===e.$.sortable._items.length;e.$.inputNotSorted.disabled=a,a&&e.$.inputNotSorted.removeAttribute("focus")}_setFocusable(){const e=this,t=e.disabled||e.unfocusable?-1:0,a=Array.from(e.getElementsByClassName("smart-grid-panel-item-close-button")),n=Array.from(e.getElementsByClassName("smart-grid-panel-direction")),l=Array.from(e.getElementsByTagName("input")),o=a.concat(n).concat(l);e.$.buttonsContainer.firstElementChild.tabIndex=t,e.$.buttonsContainer.children[1].tabIndex=t,o.forEach((e=>e.tabIndex=t))}}),Smart("smart-sort-panel",class extends Smart.GridPanel{static get properties(){return{messages:{value:{en:{firstBy:"Sort by",noSorting:"No sorting applied",pickAnother:"Pick another field to sort by"}},type:"object",extend:!0}}}static get styleUrls(){return["smart.textbox.css"]}_localize(){super._localize(),this.$.sortable.$.container.setAttribute("no-sorting",this.localize("noSorting"))}}),Smart("smart-group-panel",class extends Smart.GridPanel{static get properties(){return{maxLevel:{value:8,type:"number?"},messages:{value:{en:{collapseAll:"Collapse all",expandAll:"Expand all",firstBy:"Group by",noGrouping:"No grouping",pickAnother:"Pick another field to group by"}},type:"object",extend:!0}}}template(){return'<div id="container" role="presentation">\n <smart-sortable disable-mode="manual" right-to-left="[[rightToLeft]]" id="sortable" animation="[[animation]]" disabled="[[readonly]]" drag-mode="handle" handle-position="right" handle-visibility="visible" theme="[[theme]]"></smart-sortable>\n <div id="expandCollapseContainer" class="smart-grid-panel-buttons-container smart-grid-panel-expand-collapse smart-unselectable" role="presentation">\n <span class="smart-group-panel-collapse-button" role="button"></span>\n <span class="smart-group-panel-expand-button" role="button"></span>\n </div>\n <div id="footer" class="smart-grid-panel-container-footer" role="presentation">\n <smart-input right-to-left="[[rightToLeft]]" id="inputNotSorted" animation="[[animation]]" readonly theme="[[theme]]"></smart-input>\n <div id="buttonsContainer" class="smart-grid-panel-buttons-container smart-unselectable" role="presentation">\n <span class="smart-grid-panel-cancel-button" role="button"></span>\n <span class="smart-grid-panel-apply-button primary" role="button"></span>\n </div>\n </div>\n </div>'}_interactionHandler(e,t){const a=this;super._interactionHandler(e,t)||(e===a.$.expandCollapseContainer.firstElementChild?a.$.fireEvent("collapseAll"):e===a.$.expandCollapseContainer.children[1]&&a.$.fireEvent("expandAll"))}_localize(){super._localize();const e=this;e.$.expandCollapseContainer.firstElementChild.innerHTML=e.localize("collapseAll"),e.$.expandCollapseContainer.children[1].innerHTML=e.localize("expandAll"),e.$.sortable.$.container.setAttribute("no-grouping",e.localize("noGrouping"))}_setFocusable(){super._setFocusable();const e=this,t=e.disabled||e.unfocusable?-1:0;e.$.expandCollapseContainer.firstElementChild.tabIndex=t,e.$.expandCollapseContainer.children[1].tabIndex=t}}),Smart("smart-multi-column-filter-panel",class extends Smart.BaseElement{static get properties(){return{closeButtonPosition:{value:"left",allowedValues:["left","right"],type:"string"},dataSource:{value:[],type:"array",reflectToAttribute:!1},editorCallback:{value:null,type:"function?",reflectToAttribute:!1},editorPlaceholder:{value:"Value",type:"string"},messages:{value:{en:{addFilter:"+ Add filter",and:"And",apply:"Ok",cancel:"Cancel",CONTAINS:"contains",CONTAINS_CASE_SENSITIVE:"contains (case sensitive)",DOES_NOT_CONTAIN:"does not contain",DOES_NOT_CONTAIN_CASE_SENSITIVE:"does not contain (case sensitive)",EMPTY:"empty",ENDS_WITH:"ends with",ENDS_WITH_CASE_SENSITIVE:"ends with (case sensitive)",EQUAL:"equal",EQUAL_CASE_SENSITIVE:"equal (case sensitive)",GREATER_THAN:"greater than",GREATER_THAN_OR_EQUAL:"greater than or equal",LESS_THAN:"less than",LESS_THAN_OR_EQUAL:"less than or equal",noFilters:"No filters applied",NOT_EMPTY:"not empty",NOT_EQUAL:"not equal",NOT_NULL:"not null",NULL:"null",or:"Or",STARTS_WITH:"starts with",STARTS_WITH_CASE_SENSITIVE:"starts with (case sensitive)",where:"Where"}},type:"object",extend:!0},operator:{value:"and",allowedValues:["and","or"],type:"string"},value:{value:[],type:"array"}}}static get listeners(){return{change:"_changeHandler",click:"_interactionHandler",keydown:"_interactionHandler"}}static get requires(){return{"Smart.Button":"smart.button.js","Smart.CheckBox":"smart.checkbox.js","Smart.DateTimePicker":"smart.datetimepicker.js","Smart.FilterGroup":"smart.filter.js","Smart.Input":"smart.input.js","Smart.NumericTextBox":"smart.numerictextbox.js"}}static get styleUrls(){return["smart.gridpanel.css"]}template(){return'<div id="container" role="presentation">\n <div id="itemsContainer" class="smart-filter-panel-items-container smart-unselectable"></div>\n <div id="footer" class="smart-grid-panel-container-footer" role="presentation">\n <div id="addFilterButton" class="smart-filter-panel-add-filter-button smart-unselectable" role="button"></div>\n <div id="buttonsContainer" class="smart-grid-panel-buttons-container smart-unselectable" role="presentation">\n <span class="smart-grid-panel-cancel-button" role="button"></span>\n <span class="smart-grid-panel-apply-button primary" role="button"></span>\n </div>\n </div>\n </div>'}ready(){super.ready()}render(){const e=this;e.setAttribute("role","dialog"),e._setFocusable(),e._localize(),e._applyValue(),super.render()}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const n=this;switch(e){case"animation":case"theme":case"rightToLeft":Array.from(n.$.itemsContainer.querySelectorAll("smart-date-time-picker, smart-numeric-text-box, smart-check-box, smart-input")).forEach((t=>{t[e]=a,"smart-input"===t.tagName.toLowerCase()&&"rightToLeft"===e&&"none"!==t.dropDownButtonPosition&&(t.dropDownButtonPosition=a?"left":"right")}));break;case"disabled":case"unfocusable":n._setFocusable(!0);break;case"dataSource":case"value":n._applyValue();break;case"editorPlaceholder":Array.from(n.$.itemsContainer.getElementsByClassName("editor")).forEach((e=>e.placeholder=a));break;case"locale":case"messages":n._localize(!0);break;case"operator":n._setOperator()}}_setOperator(){const e=this,t=e.localize(e.operator);for(let a=2;a<e._items.length;a++)e._items[a].children[1].innerHTML=t}_changeHandler(e){const t=this,a=t.shadowRoot||t.isInShadowDOM?e.composedPath()[0]:e.target;if(a instanceof Smart.Input==0)return;const n=a.parentElement,l=n.children;if(a===l[1])t.operator=a.$.input.dataValue,t._setOperator();else if(a===l[2]){const a=t.dataSource.find((t=>t.dataField===e.detail.oldValue)).dataType,o=t.dataSource.find((t=>t.dataField===e.detail.value)),i=o.dataType;if("enum"!==i&&i===a)return void(t.editorCallback&&t.editorCallback(l[4],o));const r=l[3].value;let s,d;switch(i){case"date":s=t._numberAndDateConditions,d=document.createElement("smart-date-time-picker"),d.calendarButton=!0,d.dropDownAppendTo="body",d.dropDownDisplayMode="auto",d.formatString="M/d/yy H:mm";break;case"number":s=t._numberAndDateConditions,d=document.createElement("smart-numeric-text-box");break;case"boolean":s=t._booleanConditions,d=document.createElement("smart-check-box");break;case"enum":s=t._enumConditions,d=document.createElement("smart-input"),d.dataSource=o.options,d.readonly=!0,d.dropDownButtonPosition="right";break;default:s=t._stringConditions,d=document.createElement("smart-input")}d.rightToLeft=t.rightToLeft,d.animation=t.animation,d.theme=t.theme,d.unfocusable=t.disabled||t.unfocusable,d.classList.add("underlined"),d.dataSource&&d.dataSource.length<10?d.dropDownHeight="auto":d.dropDownHeight=250,"boolean"!==i&&(d.placeholder=t.editorPlaceholder),t.editorCallback&&t.editorCallback(d,o),l[4].remove(),n.appendChild(d),""===r||s.find((e=>e.label===r))||(l[3].value=""),l[3].dataSource=s,s.length>=10?l[3].dropDownHeight=250:l[3].dropDownHeight="auto",n.dataType=i}else if(a===l[3]){const e=l[4],t=a.$.input.dataValue;-1!==t.indexOf("NULL")||-1!==t.indexOf("EMPTY")?(e.value="",e.checked=!1,e.classList.add("smart-visibility-hidden")):e.classList.remove("smart-visibility-hidden"),a.condition=t}}_interactionHandler(e){const t=this;if(t.disabled||t.readonly)return;if("keydown"===e.type){if("Enter"!==e.key)return;e.preventDefault()}const a=t.shadowRoot||t.isInShadowDOM?e.composedPath()[0]:e.target,n=a.closest(".smart-grid-panel-item");if(n){if(a===n.firstElementChild){const e=t._items.indexOf(n);let a;t._items.splice(e,1),n.remove(),t._items.length>0&&e<2&&(0===e&&(t._items[0].children[1].remove(),a=document.createElement("div"),a.innerHTML=t.localize("where"),t._items[0].insertBefore(a,t._items[0].children[1])),t._items.length>1&&(t._items[1].children[1].remove(),a=document.createElement("smart-input"),a.className="underlined",a.dataSource=[{value:"and",label:t.localize("and")},{value:"or",label:t.localize("or")}],a.dropDownButtonPosition=t.rightToLeft?"left":"right",a.readonly=!0,a.value=t.localize(t.operator),a.animation=t.animation,a.theme=t.theme,a.rightToLeft=t.rightToLeft,a.unfocusable=t.disabled||t.unfocusable,t._items[1].insertBefore(a,t._items[1].children[1])))}}else if(a===t.$.addFilterButton&&t.dataSource.length>0)t.$.itemsContainer.appendChild(t._createItem(t.dataSource[0],"","",t._items.length));else if(a!==t.$.buttonsContainer.firstElementChild){if(a===t.$.buttonsContainer.children[1]){const e=t._stringConditions.concat(t._numberAndDateConditions),a=t.operator,n=[],l={},o=[];t._items.forEach((o=>{const i=t.dataSource.find((e=>e.label===o.children[2].value)),r=[];let s=o.children[3].value;if(""===s)return;let d=i.dataType;if(s=e.find((e=>e.label===s)).value,r.push(i.dataField,s),-1===s.indexOf("NULL")&&-1===s.indexOf("EMPTY"))if("boolean"===d)r.push(o.children[4].checked);else if("date"===d)r.push(o.children[4].value.toDate());else if("enum"===d){let e=o.children[4].$.input.dataValue;if(void 0===e){const t=i.options.find((e=>e.label===o.children[4].value));if(!t)return;e=t.value}d="string",r.push(e)}else r.push(o.children[4].value);let c=l[r[0]];void 0===c&&(c=new Smart.Utilities.FilterGroup,l[r[0]]=c);const u=c.createFilter(d,r[2],r[1]);c.addFilter(a,u),n.push(r)}));for(let e in l)o.push([e,l[e]]);t.value=n,t.$.fireEvent("apply",{filters:o,operator:a,value:n})}}else t.$.fireEvent("cancel")}_applyValue(){const e=this,t=document.createDocumentFragment();let a=0;for(e._items=[];e.$.itemsContainer.firstElementChild;)e.$.itemsContainer.firstElementChild.remove();0!==e.dataSource.length&&(e.value.forEach((n=>{if(!Array.isArray(n))return;const l=n[0],o=e.dataSource.find((e=>e.dataField===l));if(!o)return;const i=e._createItem(o,n[1],n[2],a);t.appendChild(i),a++})),e.$.itemsContainer.appendChild(t))}_createItem(e,t,a,n){const l=this,o=l.disabled||l.unfocusable?-1:0,i=document.createElement("div"),r=document.createDocumentFragment(),s=document.createElement("div"),d=document.createElement("smart-input"),c=document.createElement("smart-input");let u,p;return s.className="smart-grid-panel-item-close-button",s.tabIndex=o,s.setAttribute("role","button"),s.setAttribute("aria-label","button"),r.appendChild(s),0===n?(u=document.createElement("div"),u.innerHTML=l.localize("where"),u.setAttribute("role","presentation")):1===n?(u=document.createElement("smart-input"),u.className="underlined",u.dataSource=[{value:"and",label:l.localize("and")},{value:"or",label:l.localize("or")}],u.dropDownButtonPosition=l.rightToLeft?"left":"right",u.readonly=!0,u.value=l.localize(l.operator),u.animation=l.animation,u.theme=l.theme,u.rightToLeft=l.rightToLeft,u.unfocusable=l.disabled||l.unfocusable,u.setAttribute("aria-label","Operator")):(u=document.createElement("div"),u.innerHTML=l.localize(l.operator),u.setAttribute("role","presentation")),r.appendChild(u),d.className="underlined",d.dataSource=l.dataSource.map((e=>({value:e.dataField,label:e.label,icon:e.icon}))),d.dropDownButtonPosition=l.rightToLeft?"left":"right",d.readonly=!0,d.value=e.label,d.animation=l.animation,d.theme=l.theme,d.rightToLeft=l.rightToLeft,d.unfocusable=l.disabled||l.unfocusable,d.setAttribute("aria-label","Field"),d.dataSource&&d.dataSource.length<10?d.dropDownHeight="auto":d.dropDownHeight=250,r.appendChild(d),"boolean"===e.dataType?(c.dataSource=l._booleanConditions,p=document.createElement("smart-check-box"),p.checked="boolean"==typeof a&&a):"date"===e.dataType?(c.dataSource=l._numberAndDateConditions,p=document.createElement("smart-date-time-picker"),p.dropDownDisplayMode="auto",p.calendarButton=!0,p.dropDownAppendTo="body",p.formatString="M/d/yy H:mm",p.value=a):"number"===e.dataType?(c.dataSource=l._numberAndDateConditions,p=document.createElement("smart-numeric-text-box"),p.value="number"==typeof a||"string"==typeof a?a:0):"enum"===e.dataType?(c.dataSource=l._enumConditions,p=document.createElement("smart-input"),p.dataSource=e.options,p.readonly=!0,p.dropDownButtonPosition="right",p.value=a?e.options.find((e=>e.value===a)).label:""):(c.dataSource=l._stringConditions,p=document.createElement("smart-input"),p.value=null!=a?a.toString():""),c.className="underlined",c.dropDownButtonPosition=l.rightToLeft?"left":"right",c.readonly=!0,c.animation=l.animation,c.theme=l.theme,c.rightToLeft=l.rightToLeft,c.unfocusable=l.disabled||l.unfocusable,c.setAttribute("aria-label","Condition"),c.classList.add("smart-filter-panel-list"),c.dataSource.find((e=>e.value===t))?(c.value=l.localize(t),c.condition=t):(p.value="",p.checked=!1),void 0===t||-1===t.indexOf("NULL")&&-1===t.indexOf("EMPTY")||(p.value="",p.checked=!1,p.classList.add("smart-visibility-hidden")),c.dataSource&&c.dataSource.length<10?c.dropDownHeight="auto":c.dropDownHeight=250,p.animation=l.animation,p.classList.add("editor"),p.rightToLeft=l.rightToLeft,p.theme=l.theme,p.unfocusable=l.disabled||l.unfocusable,p.classList.add("underlined"),"boolean"!==e.dataType&&(p.placeholder=l.editorPlaceholder),l.editorCallback&&l.editorCallback(p,e),r.appendChild(c),r.appendChild(p),i.appendChild(r),i.className="smart-grid-panel-item",l._items.push(i),i.dataType=e.dataType,i}_localize(e){const t=this;t.$.addFilterButton.innerHTML=t.localize("addFilter"),t.$.buttonsContainer.firstElementChild.innerHTML=t.localize("cancel"),t.$.buttonsContainer.children[1].innerHTML=t.localize("apply"),t.$.itemsContainer.setAttribute("no-filters",t.localize("noFilters")),t._stringConditions=[{prefix:'<span class="smart-icon smart-icon-empty"></span>',value:"EMPTY",label:t.localize("EMPTY")},{prefix:'<span class="smart-icon smart-icon-not-empty"></span>',value:"NOT_EMPTY",label:t.localize("NOT_EMPTY")},{prefix:'<span class="smart-icon smart-icon-contains"></span>',value:"CONTAINS",label:t.localize("CONTAINS")},{prefix:'<span class="smart-icon smart-icon-does-not-contain"></span>',value:"DOES_NOT_CONTAIN",label:t.localize("DOES_NOT_CONTAIN")},{prefix:'<span class="smart-icon smart-icon-starts-with"></span>',value:"STARTS_WITH",label:t.localize("STARTS_WITH")},{prefix:'<span class="smart-icon smart-icon-ends-with"></span>',value:"ENDS_WITH",label:t.localize("ENDS_WITH")},{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("EQUAL")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("NOT_EQUAL")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("NULL")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("NOT_NULL")}],t._enumConditions=[{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("EQUAL")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("NOT_EQUAL")}],t._numberAndDateConditions=[{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("EQUAL")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("NOT_EQUAL")},{prefix:'<span class="smart-icon smart-icon-less-than"></span>',value:"LESS_THAN",label:t.localize("LESS_THAN")},{prefix:'<span class="smart-icon smart-icon-less-than-equal"></span>',value:"LESS_THAN_OR_EQUAL",label:t.localize("LESS_THAN_OR_EQUAL")},{prefix:'<span class="smart-icon smart-icon-greater-than"></span>',value:"GREATER_THAN",label:t.localize("GREATER_THAN")},{prefix:'<span class="smart-icon smart-icon-greater-than-equal"></span>',value:"GREATER_THAN_OR_EQUAL",label:t.localize("GREATER_THAN_OR_EQUAL")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("NULL")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("NOT_NULL")}],t._booleanConditions=[{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("EQUAL")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("NOT_EQUAL")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("NULL")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("NOT_NULL")}],e&&t._items.forEach(((e,a)=>{const n=e.children[1],l=e.children[3];0===a?n.innerHTML=t.localize("where"):1===a?(n.dataSource=[{value:"and",label:t.localize("and")},{value:"or",label:t.localize("or")}],n.value=t.localize(t.operator)):n.innerHTML=t.localize(t.operator),"string"===e.dataType?l.dataSource=t._stringConditions:"enum"===e.dataType?l.dataSource=t._enumConditions:"boolean"===e.dataType?l.dataSource=t._booleanConditions:l.dataSource=t._numberAndDateConditions,l.value=l.condition?t.localize(l.condition):""}))}_setFocusable(e){const t=this,a=t.disabled||t.unfocusable?-1:0;if(t.$.addFilterButton.tabIndex=a,t.$.buttonsContainer.firstElementChild.tabIndex=a,t.$.buttonsContainer.children[1].tabIndex=a,e){const e=Array.from(t.$.itemsContainer.getElementsByClassName("smart-grid-panel-item-close-button")),n=Array.from(t.$.itemsContainer.querySelectorAll("smart-date-time-picker, smart-numeric-text-box, smart-check-box, smart-input"));e.forEach((e=>e.tabIndex=a)),n.forEach((e=>e.unfocusable=t.disabled||t.unfocusable))}}}),Smart("smart-column-panel",class extends Smart.BaseElement{static get properties(){return{dataSource:{value:[],type:"array",reflectToAttribute:!1},messages:{value:{en:{apply:"Ok",cancel:"Cancel",find:"Find a field",reset:"Reset",noResults:"No results"}},type:"object",extend:!0}}}static get listeners(){return{click:"_interactionHandler",keydown:"_interactionHandler","find.keyup":"_findKeyupHandler","sortable.dragEnd":"_sortableDragEndHandler"}}static get requires(){return{"Smart.Sortable":"smart.sortable.js"}}static get styleUrls(){return["smart.gridpanel.css"]}template(){return'<div id="container" role="presentation">\n <div class="smart-column-panel-find-container" role="search">\n <input id="find" readonly="[[readonly]]" role="searchbox" aria-label="Find a field"></input>\n <span id="clearButton" class="clear-button smart-hidden" role="button" aria-label="Clear"></span>\n </div>\n <smart-sortable id="sortable" disable-mode="manual" right-to-left="[[rightToLeft]]" animation="[[animation]]" disabled="[[readonly]]" drag-mode="handle" handle-position="right" handle-visibility="visible" theme="[[theme]]"></smart-sortable>\n <div id="footer" class="smart-grid-panel-container-footer" role="presentation">\n <span id="reset" class="smart-grid-panel-reset-button" role="button"></span>\n <div id="buttonsContainer" class="smart-grid-panel-buttons-container smart-unselectable" role="presentation">\n <span class="smart-grid-panel-cancel-button" role="button"></span>\n <span class="smart-grid-panel-apply-button primary" role="button"></span>\n </div>\n </div>\n </div>'}ready(){super.ready()}render(){const e=this;e.setAttribute("role","dialog"),e._positionChanged=!1,e._localize(),e._moves=[],e._createSortItems(),super.render()}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const n=this;switch(e){case"disabled":case"unfocusable":n._setFocusable();break;case"dataSource":{const e=n.$.sortable.$.container;for(;e.firstChild;)e.removeChild(e.firstChild);n._createSortItems(),n._positionChanged=!1,n.$.find.value="",n.$.clearButton.classList.add("smart-hidden");break}case"locale":case"messages":n._localize()}}_createSortItems(){const e=this,t=document.createDocumentFragment();e._HTMLToSourceMap=new Map,e.dataSource.forEach((a=>t.appendChild(e._createSortItem(a)))),e.$.sortable.$.container.appendChild(t),e.$.sortable.updateItems(),e._setFocusable()}_createSortItem(e){const t=document.createElement("div"),a=this.id+"Label"+e.dataField;return this._HTMLToSourceMap.set(t,e),t.className="smart-grid-panel-item",t.innerHTML=`<div class="toggle-visibility${!1!==e.visible?"":" hidden"}${e.disableToggle?" disable-toggle":""}" role="button" aria-controls="${a}" aria-label="Toggle visibility"></div>\n<span id="${a}" class="smart-column-panel-label smart-unselectable${e.icon?" icon "+e.icon:""}">${e.label}</span>`,1===e.level?t.classList.add("indent"):0===e.level&&t.classList.add("group"),e.disableDrag&&t.setAttribute("disable-drag",""),e.dataField&&t.setAttribute("data-field",e.dataField),e.parentDataField&&t.setAttribute("parent-data-field",e.parentDataField),!1===e.allowHide&&(t.style.pointerEvents="none",t.style.opacity=.8),t}_interactionHandler(e){const t=this;if(t.disabled||t.readonly||"keydown"===e.type&&-1===[" ","Enter"].indexOf(e.key))return;const a=t.shadowRoot||t.isInShadowDOM?e.composedPath()[0]:e.target;if(a.classList.contains("toggle-visibility")){a.classList.toggle("hidden");const e=a.closest(".smart-grid-panel-item");if(e.hasAttribute("data-field")){const n=e.getAttribute("data-field");if(e.hasAttribute("parent-data-field")){const a=e.getAttribute("parent-data-field"),n=t.$.sortable.querySelectorAll(".smart-grid-panel-item");let l=null;if(n.forEach((e=>{e.getAttribute("data-field")===a&&(l=e)})),l){let e=0,t=0;n.forEach((n=>{n.getAttribute("parent-data-field")===a&&(e++,n.firstElementChild.classList.contains("hidden")&&t++)})),t===e?l.firstElementChild.classList.add("hidden"):t<e&&l.firstElementChild.classList.remove("hidden")}}else t.$.sortable._items.forEach((e=>{if(e.hasAttribute("parent-data-field")){const t=e.getAttribute("parent-data-field"),l=e.firstElementChild;t===n&&(a.classList.contains("hidden")?l.classList.add("hidden"):l.classList.remove("hidden"))}}))}}else if(a.parentElement===t.$.buttonsContainer){if(a===t.$.buttonsContainer.firstElementChild)return t.$.fireEvent("cancel"),void(t._moves=[]);if(a===t.$.buttonsContainer.children[1]){const e=[];t.$.sortable._items.forEach((a=>{const n=Object.assign({},t._HTMLToSourceMap.get(a));n.visible=!a.firstElementChild.classList.contains("hidden"),e.push(n)})),t.$.fireEvent("apply",{value:e,positionChanged:t._positionChanged,moves:t._moves}),t._positionChanged=!1,t._moves=[]}}else if(a===t.$.reset){const e=[];t.$.sortable._items.forEach((a=>{const n=Object.assign({},t._HTMLToSourceMap.get(a));n.visible=!0,e.push(n)})),t.$.fireEvent("apply",{value:e,positionChanged:t._positionChanged,moves:t._moves}),t._positionChanged=!1,t._moves=[]}else a.classList.contains("clear-button")&&(t.$.find.value="",t._findKeyupHandler())}_findKeyupHandler(){const e=this;if(e.disabled||e.readonly)return;const t=e.$.find,a=t.value,n=e.$.sortable._items;if(void 0===e._disabledSortable&&(e._disabledSortable=e.$.sortable.disabled),""===a)return t.parentElement.classList.remove("no-results"),e.$.clearButton.classList.add("smart-hidden"),n.forEach((e=>e.classList.remove("smart-hidden"))),e.$.sortable.disabled=e._disabledSortable||e.readonly,void delete e._disabledSortable;let l=!0;e.$.clearButton.classList.remove("smart-hidden"),n.forEach((t=>{-1===e._HTMLToSourceMap.get(t).label.toLowerCase().indexOf(a.toLowerCase())?t.classList.add("smart-hidden"):(t.classList.remove("smart-hidden"),l=!1)})),e.$.sortable.disabled=l,l?t.parentElement.classList.add("no-results"):t.parentElement.classList.remove("no-results")}_sortableDragEndHandler(e){const t=e.detail;this._positionChanged=!0,this._moves.push({oldIndex:t.oldIndex,newIndex:t.newIndex})}_localize(){const e=this;e.$.find.placeholder=e.localize("find"),e.$.reset.innerHTML=e.localize("reset"),e.$.buttonsContainer.firstElementChild.innerHTML=e.localize("cancel"),e.$.buttonsContainer.children[1].innerHTML=e.localize("apply"),e.$.container.firstElementChild.setAttribute("no-results",e.localize("noResults"))}_setFocusable(){const e=this,t=e.disabled||e.unfocusable?-1:0,a=Array.from(e.$.sortable.getElementsByClassName("toggle-visibility"));e.$.find.tabIndex=t,e.$.clearButton.tabIndex=t,e.$.buttonsContainer.firstElementChild.tabIndex=t,e.$.buttonsContainer.children[1].tabIndex=t,a.forEach((e=>e.tabIndex=e.classList.contains("disable-toggle")?-1:t))}}),Smart("smart-formatting-panel",class extends Smart.BaseElement{static get properties(){return{columns:{value:[],type:"array",reflectToAttribute:!1},dataSource:{value:[],type:"any",reflectToAttribute:!1},items:{value:null,type:"array?",reflectToAttribute:!1},dropDownAppendTo:{value:null,type:"any",reflectToAttribute:!1},messages:{value:{en:{add:"Add condition",all:"All columns",apply:"Ok",between:"Between",cancel:"Cancel",close:"Close",column:"Column:",condition:"Condition:",equal:"Equal To",fontFamily:"Font family:",fontSize:"Font size:",format:"Format:",greaterThan:"Greater Than",highlight:"Highlight",lessThan:"Less Than",notEqual:"Not Equal To",remove:"Remove condition",secondValue:"Second value:",text:"Text",value:"Value:"}},type:"object",extend:!0}}}static get listeners(){return{click:"_interactionHandler",keydown:"_interactionHandler",change:"_changeHandler","popup.change":"_changeHandler","popup.click":"_interactionHandler","popup.keydown":"_interactionHandler","document.down":"_documentDownHandler"}}template(){return'<div id="container" role="presentation">\n <div id="itemsContainer" class="smart-formatting-panel-items-container" role="presentation"></div>\n <div id="addNewButton" class="smart-add-new-button" role="button" aria-label="Add new condition"></div>\n <div id="popup" class="smart-formatting-panel-popup smart-hidden smart-visibility-hidden" role="dialog">\n <div id="popupHeader" class="header" role="presentation">\n <div id="text" class="selected" role="button" aria-label="Text color"></div>\n <div id="highlight" role="button" aria-label="Highlight color"></div>\n </div>\n <div id="colorCode" class="color-code"></div>\n <input id="colorInput" type="color" />\n <div id="colorsContainer" class="colors-container"></div>\n <smart-button id="apply" class="ok primary" animation="[[animation]]" right-to-left="[[rightToLeft]]" theme="[[theme]]" unfocusable="[[unfocusable]]"></smart-button>\n <smart-button id="cancel" class="cancel" animation="[[animation]]" right-to-left="[[rightToLeft]]" theme="[[theme]]" unfocusable="[[unfocusable]]"></smart-button>\n </div>\n </div>'}render(){const e=this,t=getComputedStyle(e);e.setAttribute("role","dialog"),e.$.popup.id=e.id+"Popup",e._basicColors=[[0,0,0],[68,68,68],[102,102,102],[153,153,153],[204,204,204],[238,238,238],[243,243,243],[255,255,255],[255,0,0],[255,153,0],[255,255,0],[0,255,0],[0,255,255],[0,0,255],[153,0,255],[255,0,255],[244,204,204],[252,229,205],[255,242,204],[217,234,211],[208,224,227],[207,226,243],[217,210,233],[234,209,220],[234,153,153],[249,203,156],[255,229,153],[182,215,168],[162,196,201],[159,197,232],[180,167,214],[213,166,189],[224,102,102],[246,178,107],[255,217,102],[147,196,125],[118,165,175],[111,168,220],[142,124,195],[194,123,160],[204,0,0],[230,145,56],[241,194,50],[106,168,79],[69,129,142],[61,133,198],[103,78,167],[166,77,121],[153,0,0],[180,95,6],[191,144,0],[56,118,29],[19,79,92],[11,83,148],[53,28,117],[116,27,71],[102,0,0],[120,63,4],[127,96,0],[39,78,19],[12,52,61],[7,55,99],[32,18,77],[76,17,48]],e._defaults={fontFamily:t.fontFamily,fontSize:t.fontSize,text:e._toHex(t.color),highlight:e._toHex(t.backgroundColor)},t.fontFamily.indexOf("-apple")>=0&&(e._defaults.fontFamily="Segoe UI"),e._localize(),e._setFocusable(),e._populatePopupWithColors(),e._processColumnsAndDataSource(),e._addDefaultItems(),super.render()}attached(){const e=this;super.attached(),e.isCompleted&&e._addDefaultItemsOnAttach&&e._addDefaultItems()}add(e,t){const a=this;if(e&&e.column&&"all"!==e.column&&!a.columns.find((t=>t.dataField===e.column)))return void a.items.splice(t,1);const n=document.createElement("div"),l=a._defaults,o=` animation="${a.animation}"${a.rightToLeft?" right-to-left":""} theme="${a.theme}"${a.unfocusable?" unfocusable":""}`,i=a.disabled||a.unfocusable?"":' tabindex="0"';e=Object.assign({column:"all",condition:"lessThan",firstValue:0,secondValue:1,fontFamily:l.fontFamily,fontSize:l.fontSize,text:l.text,highlight:l.highlight},e);const r=`\n<div class="value-label">${a.localize("value")}</div>\n<smart-input class="columns-input underlined" data-source='${JSON.stringify(a._columnsInputDataSource)}' placeholder="${a.localize("column")}" readonly value="${a._columnsInputDataSource.find((t=>t.value===e.column)).label}"${o}></smart-input>\n<smart-input class="condition-input underlined" data-source='${a._conditionsDataSource}' placeholder="${a.localize("condition")}" readonly value="${a.localize(e.condition)}"${o}></smart-input>\n<smart-input class="first-value underlined" type="number" placeholder="${a.localize("value")}" value="${e.firstValue}"${o}></smart-input>\n<div class="ampersand">&</div>\n<smart-input class="second-value underlined" type="number" placeholder="${a.localize("secondValue")}" value="${e.secondValue}"${o}></smart-input>\n<div class="close-button" title="${a.localize("close")}"${i} role="button" aria-label="Close"></div>\n<div class="format-label">${a.localize("format")}</div>\n<smart-input class="font-family-input underlined" drop-down-height="auto" placeholder="${a.localize("fontFamily")}" readonly${o}></smart-input>\n<smart-input class="font-size-input underlined" data-source='["8px", "9px", "10px", "11px", "12px", "13px", "14px", "15px", "16px"]' drop-down-height="auto" placeholder="${a.localize("fontSize")}" readonly value="${e.fontSize}"${o}></smart-input>\n<div class="popup-button smart-unselectable"${i} role="button" aria-haspopup="dialog" aria-label="Toggle pop-up">A</div>\n<div class="preview smart-unselectable">2.71828</div>`;n.classList.add("smart-formatting-panel-item"),n.classList.toggle("between","between"===e.condition),n.innerHTML=r,n.columnsInput=n.querySelector(".columns-input"),n.conditionInput=n.querySelector(".condition-input"),n.firstValue=n.querySelector(".first-value"),n.secondValue=n.querySelector(".second-value"),n.closeButton=n.querySelector(".close-button"),n.fontFamilyInput=n.querySelector(".font-family-input"),n.fontFamilyInput.dataSource=[l.fontFamily,"Arial","Verdana","Courier New","Georgia","Times New Roman"],n.fontFamilyInput.value=e.fontFamily,n.fontSizeInput=n.querySelector(".font-size-input"),n.popupButton=n.querySelector(".popup-button"),n.fontFamilyInput=n.querySelector(".font-family-input"),n.preview=n.querySelector(".preview"),n.popupButton.style.color=e.text,n.popupButton.style.backgroundColor=e.highlight,n.preview.style.fontFamily=e.fontFamily,n.preview.style.fontSize=e.fontSize,n.preview.style.color=e.text,n.preview.style.backgroundColor=e.highlight,n.data=e,a.$.itemsContainer.appendChild(n),n.columnsInput.$.input.dataValue="all",n.conditionInput.$.input.dataValue=e.condition,a._checkScrollBar()}apply(){const e=this,t=new Smart.Utilities.ConditionalFormatter(e.dataSource),a=Array.from(e.$.itemsContainer.children),n=[];let l;if(0===a.length)return;if(e.ownerElement&&"smart-pivot-table"===e.ownerElement.nodeName.toLowerCase()){const t=e.ownerElement._dynamicColumns;l=function(e){return"all"===e?t.map((e=>e.id)):t.filter((t=>t.dataFields[t.dataFields.length-1].dataField===e)).map((e=>e.id))}}else l=function(t){return"all"===t?e._columns.map((e=>e.value)):[t]};for(let e=0;e<a.length;e++){const o=a[e].data,i=l(o.column),r=o.condition;t.color=o.highlight,t.comparator=o.firstValue,t.min=o.firstValue,t.max=o.secondValue;const s=t.format(r,i);for(let e in s){const t=s[e];for(let e in t){const a=t[e];a.color=o.text,a.fontFamily=o.fontFamily,a.fontSize=o.fontSize}}n.push(s)}if(0===n.length)return n[0];const o={};for(let e=0;e<n.length;e++){const t=n[e];for(let e in t){const a=t[e];o[e]||(o[e]={});for(let t in a)o[e][t]=Object.assign({},o[e][t],a[t])}}return o}getItems(){return Array.from(this.$.itemsContainer.children).map((e=>e.data))}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const n=this;switch(e){case"animation":case"theme":case"rightToLeft":if(Array.from(n.$.itemsContainer.querySelectorAll(".smart-element")).forEach((t=>t[e]=a)),null!==n.dropDownAppendTo&&(n.$.apply[e]=a,n.$.cancel[e]=a),"theme"===e){const e=getComputedStyle(n);n._defaults.text=n._toHex(e.color),n._defaults.highlight=n._toHex(e.backgroundColor)}break;case"columns":case"items":"columns"===e&&(n._processColumnsAndDataSource(),n.items=null),n.$.itemsContainer.innerHTML="",n._addDefaultItems();break;case"disabled":case"unfocusable":{const t=n.disabled||n.unfocusable,l=Array.from(n.$.itemsContainer.querySelectorAll(".close-button, .popup-button"));"disabled"===e?n._closePopup():null!==n.dropDownAppendTo&&(n.$.apply.unfocusable=a,n.$.cancel.unfocusable=a),n._setFocusable(),Array.from(n.$.itemsContainer.querySelectorAll(".smart-element")).forEach((e=>e.unfocusable=t)),t?l.forEach((e=>e.removeAttribute("tabindex"))):l.forEach((e=>e.setAttribute("tabindex",0)));break}case"dataSource":Smart.DataAdapter&&a instanceof Smart.DataAdapter&&(n.dataSource=a.toArray());break;case"locale":case"messages":n.items=n.getItems(),n.$.itemsContainer.innerHTML="",n._localize(),n._columnsInputDataSource=n._columns.concat([{label:n.localize("all"),value:"all"}]),n._addDefaultItems()}}_populatePopupWithColors(){const e=this,t=e._basicColors,a=document.createDocumentFragment();for(let n=0;n<t.length;n++){const l=document.createElement("div"),o=t[n],i=`rgb(${o[0]}, ${o[1]}, ${o[2]})`,r=e._toHex(i);l.setAttribute("role","button"),l.setAttribute("aria-label","Select color "+r),l.index=n,l.value=r,l.style.backgroundColor=i,a.appendChild(l)}e.$.colorsContainer.appendChild(a)}_processColumnsAndDataSource(){const e=this,t=e.columns,a=e.dataSource,n=[];Smart.DataAdapter&&a instanceof Smart.DataAdapter&&(e.dataSource=a.toArray());for(let e=0;e<t.length;e++){const a=t[e];"number"===a.dataType&&n.push({label:a.label,value:a.dataField})}e._columns=n,e._columnsInputDataSource=n.concat([{label:e.localize("all"),value:"all"}])}_addDefaultItems(){const e=this,t=e.items,a=e.getRootNode();a===document||document.body.contains(a)?(t&&t.length>0?t.forEach(((t,a)=>e.add(t,a))):(e.add({condition:"greaterThan",firstValue:100}),e.add({condition:"lessThan",firstValue:0})),delete e._addDefaultItemsOnAttach):e._addDefaultItemsOnAttach=!0}_changeHandler(e){const t=this,a=t.isInShadowDOM?e.composedPath()[0]:e.target,n=a.closest(".smart-formatting-panel-item");if(n)if(a!==n.columnsInput){if(a===n.conditionInput)return n.data.condition=a.$.input.dataValue,void n.classList.toggle("between","between"===a.$.input.dataValue);if(n.firstValue.contains(a))n.data.firstValue=parseFloat(a.value);else{if(!n.secondValue.contains(a))return a===n.fontFamilyInput?(n.data.fontFamily=a.value,void(n.preview.style.fontFamily=a.value)):void(a===n.fontSizeInput&&(n.data.fontSize=a.value,n.preview.style.fontSize=a.value));n.data.secondValue=parseFloat(a.value)}}else n.data.column=a.$.input.dataValue;else t.$.popup.contains(a)&&t._updateUI(a.value.toUpperCase())}_checkScrollBar(){this.classList.toggle("scroll",this.$.itemsContainer.offsetHeight<this.$.itemsContainer.scrollHeight)}_interactionHandler(e){const t=this;if(!t.dropDownAppendTo&&e.currentTarget===t.$.popup)return;if("keydown"===e.type){if(-1===[" ","Enter"].indexOf(e.key))return void(t.disabled||t.readonly||t._keydownHandler(e));e.preventDefault()}const a=t.isInShadowDOM?e.composedPath()[0]:e.target;if(a===t.$.addNewButton)return void t.add();const n=a.closest(".smart-formatting-panel-item");if(n)return void(a===n.closeButton?(n.remove(),this._checkScrollBar()):a===n.popupButton&&(t._togglePopup(n),t._activePopupButton=a));const l=t.$.popup;if(l.contains(a)){if(a.parentElement===t.$.colorsContainer)return void t._updateUI(a.value);if(a.parentElement===t.$.popupHeader)a.classList.add("selected"),a===t.$.text?(l.selection="currentText",t.$.highlight.classList.remove("selected")):(l.selection="currentHighlight",t.$.text.classList.remove("selected")),t._updateUI(l[l.selection]);else if(a.classList.contains("smart-button")){if(t.$.apply.contains(a)||a&&a.ownerElement&&a.ownerElement.classList.contains("ok")){const e=l.item;e.data.text=l.currentText,e.data.highlight=l.currentHighlight,e.popupButton.style.color=l.currentText,e.popupButton.style.backgroundColor=l.currentHighlight,e.preview.style.color=l.currentText,e.preview.style.backgroundColor=l.currentHighlight}t._closePopup()}}}_keydownHandler(e){const t=this,a=e.key;if(-1===["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Escape","Home","PageDown","PageUp"].indexOf(a))return;if(e.preventDefault(),"Escape"===a&&!t.$.popup.classList.contains("smart-hidden"))return void t._closePopup();if(t.getRootNode().activeElement!==t.$.colorsContainer)return;const n=Array.from(this.$.colorsContainer.children),l=this.$.colorsContainer.querySelector(".selected");let o,i="ArrowRight",r="ArrowLeft";if(t.rightToLeft&&(i="ArrowLeft",r="ArrowRight"),l){let e=l.index;switch(a){case r:e=Math.max(e-1,e-e%8);break;case i:e=Math.min(e+1,e+8-e%8-1);break;case"ArrowUp":e=Math.max(e-8,e%8);break;case"ArrowDown":e=Math.min(e+8,56+e%8);break;case"Home":e-=e%8;break;case"End":e=e+8-e%8-1;break;case"PageUp":e%=8;break;case"PageDown":e=56+e%8}o=n[e]}else o=n[0];t._updateUI(o.value,o)}_togglePopup(e){const t=this,a=t.$.popup;if(e===a.item)return void t._closePopup();if(a.setAttribute("animation",t.animation),a.setAttribute("theme",t.theme),t.rightToLeft&&a.setAttribute("right-to-left",""),a.classList.contains("smart-hidden")&&a.classList.remove("smart-hidden"),t.dropDownAppendTo)if("body"===t.dropDownAppendTo)document.body.appendChild(a);else{const e=document.querySelector(t.dropDownAppendTo);e&&e.appendChild(a)}const n=e.popupButton,l=n.getBoundingClientRect(),o=n.offsetLeft,i=n.offsetTop,r=a.offsetWidth,s=a.offsetHeight,d=t.$.itemsContainer.scrollTop,c=t._toHex(e.data.text),u=t._toHex(e.data.highlight);l.top>=s+5?a.style.top=i-(s+d+5)+"px":a.style.top=i+l.height-d+5+"px",a.style.left=o+l.width/2-r/2+"px",t.dropDownAppendTo&&(a.style.top=l.bottom+5+"px",a.style.left=l.left+l.width/2-r/2+"px"),t.$.text.classList.add("selected"),t.$.highlight.classList.remove("selected"),t.$.text.focus(),a.item=e,a.selection="currentText",a.currentText=c,a.currentHighlight=u,t._updateUI(c),a.controlledBy&&(a.controlledBy.removeAttribute("aria-controls"),a.controlledBy.removeAttribute("aria-expanded")),n.setAttribute("aria-controls",a.id),n.setAttribute("aria-expanded",!0),a.controlledBy=n,a.classList.remove("smart-visibility-hidden")}_closePopup(){const e=this,t=e.$.popup;"none"!==e.animation?(t.addEventListener("transitionend",(function e(){t.classList.add("smart-hidden"),t.removeEventListener("transitionend",e)})),t.classList.add("smart-visibility-hidden")):(t.classList.add("smart-visibility-hidden"),t.classList.add("smart-hidden")),delete t.item,e._activePopupButton&&e._activePopupButton.focus(),t.controlledBy&&(t.controlledBy.removeAttribute("aria-controls"),t.controlledBy.removeAttribute("aria-expanded"))}_toHex(e){if(-1!==e.indexOf("#"))return e;const t=/rgb\((\d+), (\d+), (\d+)\)/g.exec(e);return t?"#"+(parseFloat(t[1]).toString(16).padStart(2,"0")+parseFloat(t[2]).toString(16).padStart(2,"0")+parseFloat(t[3]).toString(16).padStart(2,"0")).toUpperCase():"#FFFFFF"}_updateUI(e,t){const a=this;a.$.colorInput.value=e,a.$.colorCode.innerHTML=e,a._selectColor(e,t)}_selectColor(e,t){const a=this.$.popup,n=Array.from(this.$.colorsContainer.children);n.forEach((e=>e.classList.remove("selected"))),(t=t||n.find((t=>t.value===e)))&&t.classList.add("selected"),a[a.selection]=e}_localize(){const e=this;e._conditionsDataSource=JSON.stringify([{label:e.localize("lessThan"),value:"lessThan"},{label:e.localize("greaterThan"),value:"greaterThan"},{label:e.localize("equal"),value:"equal"},{label:e.localize("notEqual"),value:"notEqual"},{label:e.localize("between"),value:"between"}]),e.$.text.innerHTML=e.localize("text"),e.$.highlight.innerHTML=e.localize("highlight"),e.$.apply.innerHTML=e.localize("apply"),e.$.cancel.innerHTML=e.localize("cancel"),e.$.addNewButton.title=e.localize("add")}_setFocusable(){const e=this,t=!e.disabled&&!e.unfocusable,a=[e.$.addNewButton,e.$.text,e.$.highlight,e.$.colorsContainer];t?(a.forEach((e=>e.setAttribute("tabindex",0))),e.$.colorInput.removeAttribute("tabindex")):(a.forEach((e=>e.removeAttribute("tabindex"))),e.$.colorInput.setAttribute("tabindex",-1))}_documentDownHandler(e){const t=this,a=t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target,n=t.$.popup;n.classList.contains("smart-hidden")||n.contains(a)||a.classList.contains("popup-button")||(delete t._activePopupButton,t._closePopup())}}),Smart("smart-data-view",class extends Smart.BaseElement{static get properties(){return{addNewButton:{value:!1,type:"boolean"},allowDrag:{value:!1,type:"boolean"},collapsible:{value:!1,type:"boolean"},columns:{value:[],type:"object",reflectToAttribute:!1},dataSource:{value:null,type:"object?",reflectToAttribute:!1},dataSourceSettings:{value:{autoGenerateColumns:{value:!1,type:"boolean"},sanitizeHTML:{value:"blackList",allowedValues:["all","blackList","none"],type:"string"},root:{value:"",type:"string"},record:{value:"",type:"string"},keyDataField:{value:"",type:"string"},parentDataField:{value:"",type:"string"},childrenDataField:{value:"",type:"string"},groupBy:{value:[],type:"array"},dataFields:{value:[],type:"array"},mapChar:{value:".",type:"string"},id:{value:"",type:"string"},virtualDataSource:{value:null,type:"any"},virtualDataSourceOnExpand:{value:null,type:"any"}},type:"object"},editable:{value:!1,type:"boolean"},headerPosition:{value:"none",allowedValues:["none","top","bottom"],type:"string"},messages:{value:{en:{addFilter:"+ Add filter",and:"And",apply:"Ok",booleanFirst:"☐",booleanLast:"☑",cancel:"Cancel",CONTAINS:"contains",CONTAINS_CASE_SENSITIVE:"contains (case sensitive)",dateFirst:"1",dateLast:"9",DOES_NOT_CONTAIN:"does not contain",DOES_NOT_CONTAIN_CASE_SENSITIVE:"does not contain (case sensitive)",EMPTY:"empty",ENDS_WITH:"ends with",ENDS_WITH_CASE_SENSITIVE:"ends with (case sensitive)",EQUAL:"equal",EQUAL_CASE_SENSITIVE:"equal (case sensitive)",filter:"Filter",customize:"Customize Columns",filteredByMultiple:"{{n}} filters",filteredByOne:"1 filter",filterValuePlaceholder:"Value",find:"Find a field",findInView:"Find in view",firstBy:"Sort by",found:"{{nth}} of {{n}}",from:"from",GREATER_THAN:"greater than",GREATER_THAN_OR_EQUAL:"greater than or equal",LESS_THAN:"less than",LESS_THAN_OR_EQUAL:"less than or equal",noFilters:"No filters applied",noResults:"No results",noSorting:"No sorting applied",NOT_EMPTY:"not empty",NOT_EQUAL:"not equal",NOT_NULL:"not null",NULL:"null",numberFirst:"1",numberLast:"9",ok:"OK",or:"Or",pickAnother:"Pick another field to sort by",sort:"Sort",group:"Group",fontFamily:"Font family:",fontSize:"Font size:",format:"Format:",formatColumn:"Format Column",formating:"Conditional Formating",sortedByMultiple:"Sorted by {{n}} fields",sortedByOne:"Sorted by 1 field",STARTS_WITH:"starts with",STARTS_WITH_CASE_SENSITIVE:"starts with (case sensitive)",stringFirst:"A",stringLast:"Z",thenBy:"then by",where:"Where",collapseAll:"Collapse all",expandAll:"Expand all",noGrouping:"No grouping",groupedByMultiple:"{{n}} groups",groupedByOne:"1 group",firstByGroup:"Group by",pickAnotherGroupBy:"Pick another field to group by",add:"Add condition",all:"All columns",between:"Between",close:"Close",column:"Column:",condition:"Condition:",equal:"Equal To",greaterThan:"Greater Than",highlight:"Highlight",lessThan:"Less Than",notEqual:"Not Equal To",remove:"Remove condition",secondValue:"Second value:",text:"Text",value:"Value:",reset:"Reset"}}}}}static get listeners(){return{"header.apply":"_applyHandler","header.cancel":"closePanel","headerDropDown.transitionend":"_headerDropDownTransitionendHandler","searchInput.keyup":"_searchInputKeyupHandler",resize:"_resizeHandler","document.move":"_documentMoveHandler","document.up":"_documentUpHandler"}}render(){const e=this;e.$.headerDropDown.id||(e.$.headerDropDown.id=e.id+"HeaderDropDown"),e.setAttribute("role","group"),e._isMobile=Smart.Utilities.Core.isMobile,super.render()}addFilter(e,t="and"){const a=this;if(!Array.isArray(e)||e.length>0&&!Array.isArray(e[0]))return;let n;a.closePanel(),arguments[2]?n={filters:arguments[2],operator:t}:(n={filters:[],operator:t},e.forEach((e=>{e[1].filters.forEach((t=>{n.filters.push([e[0],t.condition,t.value])}))}))),JSON.stringify(n)!==JSON.stringify(a._appliedFiltering)&&(n.filterGroups=e,a._appliedFiltering=n,a._applyFilter(e,t),a.$.fireEvent("filter"),a._refreshFilterButton())}_refreshFilterButton(){const e=this,t=e._appliedFiltering.filters?e._appliedFiltering.filters.length:0;if(0===t)return e.$.filterButton.firstElementChild.innerHTML=e.localize("filter"),void e.$.filterButton.classList.remove("filtered");e.$.filterButton.firstElementChild.innerHTML=1===t?e.localize("filteredByOne"):e.localize("filteredByMultiple",{n:t}),e.$.filterButton.classList.add("filtered")}addSort(e,t){const a=this,n=a.dataSource,l=JSON.stringify(a._appliedSorting);let o;function i(e,l){if(a.columns.find((t=>t.dataField===e))){let a=Array.isArray(t)?t[l]:"string"==typeof t?t:"ascending";o.dataFields.push(e),o.dataTypes.push(n.dataFields.find((t=>t.name===e)).dataType),a=a&&-1!==a.indexOf("desc")?"descending":"ascending",o.orderBy.push(a)}}if(0!==arguments.length&&n&&0!==n.length){if(a.closePanel(),1===arguments.length&&"object"==typeof e)o=e;else if(o={dataFields:[],dataTypes:[],orderBy:[]},Array.isArray(e))e.forEach(i);else{if("string"!=typeof e)return;i(e,0)}a.closePanel(),a._appliedSorting=o,l!==JSON.stringify(a._appliedSorting)&&(a._applySort(),a.$.fireEvent("sort"),a._refreshSortButton())}}_refreshSortButton(){const e=this,t=e._appliedSorting.dataFields.length;if(0===t)return e.$.sortButton.firstElementChild.innerHTML=e.localize("sort"),void e.$.sortButton.classList.remove("sorted");e.$.sortButton.firstElementChild.innerHTML=1===t?e.localize("sortedByOne"):e.localize("sortedByMultiple",{n:t}),e.$.sortButton.classList.add("sorted")}closePanel(){const e=this.$.headerDropDown;e.classList.remove("open"),setTimeout((()=>{e.classList.add("smart-visibility-hidden")}),150),this._closeSearchPanel(),e.controlledBy&&(e.controlledBy.removeAttribute("aria-controls"),e.controlledBy.setAttribute("aria-expanded",!1),delete e.controlledBy)}_closeSearchPanel(){const e=this;e._searchInfo&&delete e._searchInfo}_closeDialog(){const e=this;e._editInfo&&e._editInfo.window.close()}openFormatPanel(){}openFilterPanel(e,t){const a=this,n=a.dataSource;if(!n||0===n.length&&!n.virtualDataSource||a.disabled||"none"===a.headerPosition)return;let l;a._editInfo&&a._editInfo.window.close(),a.$.headerDropDown.classList.add("filter-panel"),a.$.headerDropDown.classList.remove("customize-panel","sort-panel","search-panel","format-panel"),a.$.filter.classList.remove("smart-hidden"),a.$.customize.classList.add("smart-hidden"),a.$.sort.classList.add("smart-hidden"),a.$.format&&a.$.format.classList.add("smart-hidden"),a.$.group&&a.$.group.classList.add("smart-hidden"),a.$.search.classList.add("smart-hidden"),a._closeSearchPanel(),a._filterPartCreated?(l=a.$.filter.firstElementChild,l.set("dataSource",e),l.set("locale",a.locale),l.messages=a._innerElementMessages.multiColumnFilterPanel,l.operator=a._appliedFiltering.operator,l.editorPlaceholder=a.localize("filterValuePlaceholder"),l.set("operator",a._appliedFiltering.operator),l.set("value",a._appliedFiltering.filters),l._applyValue(),l.rightToLeft=a.rightToLeft):(l=document.createElement("smart-multi-column-filter-panel"),l.rightToLeft=a.rightToLeft,l.animation=a.animation,l.dataSource=e,l.locale=a.locale,l.messages=a._innerElementMessages.multiColumnFilterPanel,l.operator=a._appliedFiltering.operator,l.editorPlaceholder=a.localize("filterValuePlaceholder"),l.theme=a.theme,l.value=a._appliedFiltering.filters,l.editorCallback=t,a.$.filter.appendChild(l),a._filterPartCreated=!0),a._openHeaderDropDown(a.$.filterButton)}openSortPanel(e){const t=this,a=t.dataSource;if(!a||0===a.length&&!a.virtualDataSource||t.disabled||"none"===t.headerPosition)return;let n;t._closeDialog(),t.$.headerDropDown.classList.add("sort-panel"),t.$.headerDropDown.classList.remove("customize-panel","filter-panel","format-panel","search-panel"),t.$.sort.classList.remove("smart-hidden"),t.$.customize.classList.add("smart-hidden"),t.$.filter.classList.add("smart-hidden"),t.$.format&&t.$.format.classList.add("smart-hidden"),t.$.group&&t.$.group.classList.add("smart-hidden"),t.$.search.classList.add("smart-hidden"),t._closeSearchPanel(),t._sortPartCreated?(n=t.$.sort.firstElementChild,n.rightToLeft=t.rightToLeft,n.dataSource=e,n.locale=t.locale,n.messages=t._innerElementMessages.sortPanel,n.set("dataSource",e),n.propertyChangedHandler("dataSource",void 0,e)):(n=document.createElement("smart-sort-panel"),n.rightToLeft=t.rightToLeft,n.animation=t.animation,n.dataSource=e,n.locale=t.locale,n.messages=t._innerElementMessages.sortPanel,n.theme=t.theme,t.$.sort.appendChild(n),t._sortPartCreated=!0),t._openHeaderDropDown(t.$.sortButton)}removeFilter(){this.addFilter([])}removeSort(){this.addSort({dataFields:[],dataTypes:[],orderBy:[]})}_clearFilterAndSortUI(){const e=this;e._appliedFiltering={filterGroups:[],filters:[],operator:"and"},e._appliedSorting={dataFields:[],dataTypes:[],orderBy:[]},e._appliedGrouping={dataFields:[]},e.$.filterButton.classList.remove("filtered"),e.$.sortButton.classList.remove("sorted"),e.$.filterButton.firstElementChild.innerHTML=e.localize("filter"),e.$.sortButton.firstElementChild.innerHTML=e.localize("sort")}_getInnerElementMessages(){const e=this,t=e.locale,a={columnPanel:{},groupPanel:{},multiColumnFilterPanel:{},sortPanel:{},formattingPanel:{},dateTimePicker:{}};a.formattingPanel[t]={add:e.localize("add"),all:e.localize("all"),apply:e.localize("apply"),between:e.localize("between"),cancel:e.localize("cancel"),close:e.localize("close"),column:e.localize("column"),condition:e.localize("condition"),equal:e.localize("equal"),fontFamily:e.localize("fontFamily"),fontSize:e.localize("fontSize"),format:e.localize("format"),greaterThan:e.localize("greaterThan"),highlight:e.localize("highlight"),lessThan:e.localize("lessThan"),notEqual:e.localize("notEqual"),remove:e.localize("remove"),secondValue:e.localize("secondValue"),text:e.localize("text"),value:e.localize("value")},a.columnPanel[t]={apply:e.localize("apply"),cancel:e.localize("cancel"),reset:e.localize("reset"),find:e.localize("find"),noResults:e.localize("noResults")},a.groupPanel[t]={apply:e.localize("apply"),cancel:e.localize("cancel"),collapseAll:e.localize("collapseAll"),expandAll:e.localize("expandAll"),firstBy:e.localize("firstByGroup"),noGrouping:e.localize("noGrouping"),pickAnother:e.localize("pickAnotherGroupBy"),stringFirst:e.localize("stringFirst"),stringLast:e.localize("stringLast"),thenBy:e.localize("thenBy"),from:e.localize("from"),booleanFirst:e.localize("booleanFirst"),booleanLast:e.localize("booleanLast"),dateFirst:e.localize("dateFirst"),dateLast:e.localize("dateLast"),numberFirst:e.localize("numberFirst"),numberLast:e.localize("numberLast")},a.multiColumnFilterPanel[t]={addFilter:e.localize("addFilter"),and:e.localize("and"),apply:e.localize("apply"),cancel:e.localize("cancel"),CONTAINS:e.localize("CONTAINS"),CONTAINS_CASE_SENSITIVE:e.localize("CONTAINS_CASE_SENSITIVE"),DOES_NOT_CONTAIN:e.localize("DOES_NOT_CONTAIN"),DOES_NOT_CONTAIN_CASE_SENSITIVE:e.localize("DOES_NOT_CONTAIN_CASE_SENSITIVE"),EMPTY:e.localize("EMPTY"),ENDS_WITH:e.localize("ENDS_WITH"),ENDS_WITH_CASE_SENSITIVE:e.localize("ENDS_WITH_CASE_SENSITIVE"),EQUAL:e.localize("EQUAL"),EQUAL_CASE_SENSITIVE:e.localize("EQUAL_CASE_SENSITIVE"),GREATER_THAN:e.localize("GREATER_THAN"),GREATER_THAN_OR_EQUAL:e.localize("GREATER_THAN_OR_EQUAL"),LESS_THAN:e.localize("LESS_THAN"),LESS_THAN_OR_EQUAL:e.localize("LESS_THAN_OR_EQUAL"),noFilters:e.localize("noFilters"),NOT_EMPTY:e.localize("NOT_EMPTY"),NOT_EQUAL:e.localize("NOT_EQUAL"),NOT_NULL:e.localize("NOT_NULL"),NULL:e.localize("NULL"),or:e.localize("or"),STARTS_WITH:e.localize("STARTS_WITH"),STARTS_WITH_CASE_SENSITIVE:e.localize("STARTS_WITH_CASE_SENSITIVE"),where:e.localize("where")},a.sortPanel[t]={apply:e.localize("apply"),booleanFirst:e.localize("booleanFirst"),booleanLast:e.localize("booleanLast"),cancel:e.localize("cancel"),dateFirst:e.localize("dateFirst"),dateLast:e.localize("dateLast"),firstBy:e.localize("firstBy"),from:e.localize("from"),numberFirst:e.localize("numberFirst"),numberLast:e.localize("numberLast"),noSorting:e.localize("noSorting"),pickAnother:e.localize("pickAnother"),stringFirst:e.localize("stringFirst"),stringLast:e.localize("stringLast"),thenBy:e.localize("thenBy")},a.dateTimePicker[t]={now:e.localize("now"),dateTabLabel:e.localize("dateTabLabel"),timeTabLabel:e.localize("timeTabLabel")},e._innerElementMessages=a}_handleHeaderPosition(e){const t=this,a=t.headerPosition,n=t.$.header;"none"!==a?(n.classList.remove("smart-hidden"),"top"===a&&n.nextElementSibling!==e?t.$.container.insertBefore(n,e):"bottom"===a&&n.previousElementSibling!==e&&t.$.container.insertBefore(n,t.$.loadingIndicatorContainer)):n.classList.add("smart-hidden")}_headerClickHandler(e){const t=this,a=t.$.headerDropDown;function n(e,n){a.classList.contains("smart-visibility-hidden")||e.classList.contains("smart-hidden")?t[n]():t.closePanel()}if(t.$.customizeButton.contains(e))n(t.$.customize,"openCustomizePanel");else if(t.$.filterButton.contains(e))n(t.$.filter,"openFilterPanel");else if(t.$.sortButton.contains(e))n(t.$.sort,"openSortPanel");else if(t.$.formatButton&&t.$.formatButton.contains(e))n(t.$.format,"openFormatPanel");else if(e===t.$.searchButton)n(t.$.search,"_openSearchPanel");else if(t.$.groupButton&&t.$.groupButton.contains(e))n(t.$.group,"openGroupPanel");else if(e===t.$.searchClose)t.closePanel();else if(e===t.$.searchPrev||e===t.$.searchNext){const a=t._searchInfo,n=a.foundIdsArray,l=e===t.$.searchNext,o=n.length;let i;if(void 0===a.highlighted)i=l?0:o-1;else{if(1===n.length)return;{const e=n.indexOf(a.highlighted);i=l?(e+1)%o:e-1>=0?e-1:o-1}}a.highlighted=n[i],t.grid?(t.grid.highlighted=a.highlighted,t.grid.ensureVisible(a.highlighted),t.grid._recycle(!1)):t.ensureVisible&&t.ensureVisible(a.highlighted),t.$.searchLabel.innerHTML=t.localize("found",{nth:i+1,n:n.length})}}_headerDropDownTransitionendHandler(e){const t=this,a=t.$.headerDropDown;e&&("visibility"!==e.propertyName||a.classList.contains("smart-visibility-hidden"))||(a.classList.contains("search-panel")?t.$.searchInput.focus():!1===t.unfocusable&&(!t._isMobile&&a.classList.contains("customize-panel")?a.querySelector("smart-column-panel").$.find.focus():a.classList.contains("filter-panel")?a.querySelector("smart-multi-column-filter-panel").$.addFilterButton.focus():a.classList.contains("sort-panel")&&a.querySelector("smart-sort-panel").$.inputNotSorted.focus()))}_localizeHeader(){const e=this;e.$.customizeButton.firstElementChild.innerHTML=e.localize("customize"),e.$.groupButton&&(e.$.groupButton.firstElementChild.innerHTML=e.localize("group")),0===e._appliedFiltering.filters.length?e.$.filterButton.firstElementChild.innerHTML=e.localize("filter"):1===e._appliedFiltering.filters.length?e.$.filterButton.firstElementChild.innerHTML=e.localize("filteredByOne"):e.$.filterButton.firstElementChild.innerHTML=e.localize("filteredByMultiple",{n:e._appliedFiltering.filters.length}),0===e._appliedSorting.dataFields.length?e.$.sortButton.firstElementChild.innerHTML=e.localize("sort"):1===e._appliedSorting.dataFields.length?e.$.sortButton.firstElementChild.innerHTML=e.localize("sortedByOne"):e.$.sortButton.firstElementChild.innerHTML=e.localize("sortedByMultiple",{n:e._appliedSorting.dataFields.length}),e.$.formatButton&&(e.$.formatButton.firstElementChild.innerHTML=e.localize("formating")),e.$.searchInput.placeholder=e.localize("findInView")}_openHeaderDropDown(e){const t=this,a=t.$.headerDropDown;"top"===t.headerPosition?(a.style.bottom=null,a.style.top="100%"):(a.style.top=null,a.style.bottom="100%"),e!==t.$.searchButton?a.style.left=e.offsetLeft-(t.rightToLeft?a.offsetWidth-e.offsetWidth:0)+"px":a.style.left=(t.rightToLeft?e.offsetLeft:e.offsetLeft+Math.max(25,e.offsetWidth)-a.offsetWidth)+"px",a.classList.remove("smart-visibility-hidden"),a.classList.add("open"),a.controlledBy&&(a.controlledBy.removeAttribute("aria-controls"),a.controlledBy.setAttribute("aria-expanded",!1)),a.controlledBy=e,e.setAttribute("aria-controls",a.id),e.setAttribute("aria-expanded",!0),t._headerDropDownTransitionendHandler()}_searchInputKeyupHandler(){const e=this;function t(){e._searchInfo&&e.$.searchInput.value!==e._searchInfo.query&&e._search(e.$.searchInput.value)}if(clearTimeout(e._searchInputTimeout),"Enter"===event.key&&e._searchInfo.foundIdsArray&&e._searchInfo.foundIdsArray.length>1)return t(),void e._headerClickHandler(e.$.searchNext,e.$.cardContainer||e.$.body);e._searchInputTimeout=setTimeout(t,500)}});
831
+ Smart("smart-grid-panel",class extends Smart.BaseElement{static get properties(){return{closeButtonPosition:{value:"left",allowedValues:["left","right"],type:"string"},dataSource:{value:[],type:"array",reflectToAttribute:!1},messages:{value:{en:{apply:"Ok",booleanFirst:"☐",booleanLast:"☑",cancel:"Cancel",dateFirst:"1",dateLast:"9",from:"from",numberFirst:"1",numberLast:"9",stringFirst:"A",stringLast:"Z",thenBy:"then by"}},type:"object",extend:!0}}}static get listeners(){return{change:"_changeHandler",click:"_clickHandler",keydown:"_keydownHandler","sortable.dragEnd":"_sortableDragEndHandler"}}static get requires(){return{"Smart.Input":"smart.input.js","Smart.Sortable":"smart.sortable.js"}}static get styleUrls(){return["smart.gridpanel.css"]}template(){return'<div id="container" role="presentation">\n <smart-sortable id="sortable" disable-mode="manual" animation="[[animation]]" disabled="[[readonly]]" right-to-left="[[rightToLeft]]"\n drag-mode="handle" handle-position="right" handle-visibility="visible" theme="[[theme]]">\n </smart-sortable>\n <div id="footer" class="smart-grid-panel-container-footer" role="presentation">\n <smart-input id="inputNotSorted" right-to-left="[[rightToLeft]]" animation="[[animation]]" readonly theme="[[theme]]"></smart-input>\n <div id="buttonsContainer" class="smart-grid-panel-buttons-container smart-unselectable" role="presentation">\n <span class="smart-grid-panel-cancel-button" role="button"></span>\n <span class="smart-grid-panel-apply-button primary" role="button"></span>\n </div>\n </div>\n </div>'}ready(){super.ready()}render(){const e=this;e.setAttribute("role","dialog"),"right"===e.closeButtonPosition&&(e.$.sortable.handlePosition="left"),e._localize(),e._createSources(),super.render()}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const n=this;switch(e){case"animation":case"theme":Array.from(n.$.sortable.getElementsByTagName("smart-input")).forEach((t=>t[e]=a));break;case"disabled":case"unfocusable":n._setFocusable();break;case"closeButtonPosition":"right"===n.closeButtonPosition?n.$.sortable.handlePosition="left":n.$.sortable.handlePosition="right";break;case"dataSource":n.$.sortable.$.container.innerHTML="",n._createSources();break;case"locale":case"messages":{const e=n.$.sortable._items;n._localize(),e.length&&(e[0].children[1].innerHTML=n.localize("firstBy"),e.forEach((function(e,t){0!==t&&(e.children[1].innerHTML=n.localize("thenBy"));const a=n._HTMLToSourceMap.get(e),l=n._ascDescTemplates[a.dataType]||n._ascDescTemplates.string;e.children[3].innerHTML=n.localize("from"),e.children[4].firstElementChild.innerHTML=l[0],e.children[4].children[1].innerHTML=l[1]})));break}case"maxLevel":if(null!=a)for(;n.$.sortable._items.length>0&&n.$.sortable._items.length>a;)n._interactionHandler(n.$.sortable._items[n.$.sortable._items.length-1].firstElementChild);n._disableItemAddition();break;case"rightToLeft":n.$.inputNotSorted.rightToLeft=a,n.$.inputNotSorted.dropDownButtonPosition=a?"left":"right",n.$.sortable._items.forEach((e=>{const t=e.querySelector("smart-input");t.rightToLeft=a,t.dropDownButtonPosition=a?"left":"right"}))}}_changeHandler(e){const t=this,a=t.shadowRoot||t.isInShadowDOM?e.composedPath()[0]:e.target;if(t.$.inputNotSorted.contains(a)){const e=t.$.inputNotSorted.value,a=t._labelToSourceMap.get(e);return t._createSortItem(a,t.$.sortable._items.length),t.$.sortable.updateItems(),t._visibleLabels.push(e),t._updateHiddenSource(),t._disableItemAddition(),void(t.$.inputNotSorted.value="")}const n=a.closest("smart-input");if(!n)return;const l=n.parentElement.parentElement,o=l.children[4].firstElementChild,i=l.children[4].children[1],r=n.value,s=t._HTMLToSourceMap.get(l).label,d=t._labelToSourceMap.get(r),c=t._ascDescTemplates[d.dataType]||t._ascDescTemplates.string;t._HTMLToSourceMap.set(l,d),t._visibleLabels.splice(t._visibleLabels.indexOf(s),1,r),t._updateHiddenSource(),o.innerHTML=c[0],i.innerHTML=c[1],d.sortDirection&&-1===d.sortDirection.indexOf("asc")?(i.classList.add("selected"),o.classList.remove("selected")):(o.classList.add("selected"),i.classList.remove("selected"))}_updateHiddenSource(){const e=this;e._hiddenSource=e.dataSource.map((e=>({label:e.label,value:e.dataField,icon:e.icon}))).filter((t=>-1===e._visibleLabels.indexOf(t.label))),e.$.inputNotSorted.dataSource=e._hiddenSource,e.$.sortable._items.forEach((t=>t.getElementsByTagName("smart-input")[0].dataSource=e._hiddenSource)),e._disableItemAddition(),e.$.fireEvent("dataSourceChange")}_clickHandler(e){const t=this;t._interactionHandler(t.shadowRoot||t.isInShadowDOM?e.composedPath()[0]:e.target,e)}_interactionHandler(e,t){const a=this;if(a.disabled||a.readonly)return!0;const n=e.closest(".smart-grid-panel-item");if(n){if(e===n.firstElementChild){const e=a._HTMLToSourceMap.get(n).label;a.$.sortable.$.container.removeChild(n),a.$.sortable.updateItems(),a._visibleLabels.splice(a._visibleLabels.indexOf(e),1),a._updateHiddenSource(),a._disableItemAddition(),a.$.sortable._items.length&&(a.$.sortable._items[0].children[1].innerHTML=a.localize("firstBy")),a.$.fireEvent("remove")}else if(n.children[4].contains(e)){const l=n.children[4].firstElementChild,o=n.children[4].children[1];"click"===t.type?e.classList.contains("selected")||(e===l?(o.classList.remove("selected"),l.classList.add("selected"),a._HTMLToSourceMap.get(n).sortDirection="ascending"):e===o&&(l.classList.remove("selected"),o.classList.add("selected"),a._HTMLToSourceMap.get(n).sortDirection="descending")):(l.classList.toggle("selected"),o.classList.toggle("selected"),a._HTMLToSourceMap.get(n).sortDirection=l.classList.contains("selected")?"ascending":"descending")}return!0}if(e===a.$.buttonsContainer.firstElementChild)return a.$.fireEvent("cancel"),!0;if(e===a.$.buttonsContainer.children[1]){const e=[],t={dataFields:[],dataTypes:[],orderBy:[]},n={value:e};return a.$.sortable._items.forEach((n=>{const l=a._HTMLToSourceMap.get(n);e.push({dataField:l.dataField,sortDirection:l.sortDirection}),t.dataFields.push(l.dataField),t.dataTypes.push(l.dataType),t.orderBy.push(l.sortDirection)})),(a instanceof Smart.SortPanel||a instanceof Smart.GroupPanel)&&(n.sortByInfo=t),a.$.fireEvent("apply",n),!0}}_keydownHandler(e){const t=this,a=e.key;" "!==a&&"Enter"!==a||(e.preventDefault(),t._interactionHandler((t.shadowRoot||t.getRootNode()).activeElement,e))}_sortableDragEndHandler(e){const t=this,a=e.detail.oldIndex,n=e.detail.newIndex,l=Math.max(a,n),o=t.$.sortable._items;0===(a&&n)&&(o[0].children[1].innerHTML=t.localize("firstBy"),o[1].children[1].innerHTML=t.localize("thenBy"),l>1&&(o[l].children[1].innerHTML=t.localize("thenBy")))}_localize(){const e=this;e.$.inputNotSorted.placeholder=e.localize("pickAnother"),e.$.buttonsContainer.firstElementChild.innerHTML=e.localize("cancel"),e.$.buttonsContainer.children[1].innerHTML=e.localize("apply"),e._ascDescTemplates={boolean:[e.localize("booleanFirst")+" → "+e.localize("booleanLast"),e.localize("booleanLast")+" → "+e.localize("booleanFirst")],date:[e.localize("dateFirst")+" → "+e.localize("dateLast"),e.localize("dateLast")+" → "+e.localize("dateFirst")],number:[e.localize("numberFirst")+" → "+e.localize("numberLast"),e.localize("numberLast")+" → "+e.localize("numberFirst")],string:[e.localize("stringFirst")+" → "+e.localize("stringLast"),e.localize("stringLast")+" → "+e.localize("stringFirst")]}}_createSources(){const e=this,t=(e instanceof Smart.SortPanel?"sort":"group")+"Index",a=[],n=[];if(e._HTMLToSourceMap=new Map,e._labelToSourceMap=new Map,e.dataSource.forEach((n=>{e._labelToSourceMap.set(n.label,n),-1!==n[t]&&void 0!==n[t]&&a.push(n)})),a.sort(((e,a)=>e[t]-a[t])),void 0!==e.maxLevel&&null!==e.maxLevel)for(;a.length>0&&a.length>e.maxLevel;)a.pop();e.$.inputNotSorted.dropDownButtonPosition=e.rightToLeft?"left":"right",e.$.inputNotSorted.dataSource&&e.$.inputNotSorted.dataSource.length<10&&e.$.inputNotSorted.dataSource.length>0?e.$.inputNotSorted.dropDownHeight="auto":e.$.inputNotSorted.dropDownHeight=250,a.forEach((e=>n.push(e.label))),e._visibleLabels=n,e._updateHiddenSource(),a.forEach(((t,a)=>{e._createSortItem(t,a)})),e.$.sortable.updateItems(),e._disableItemAddition(),e._setFocusable()}_createSortItem(e,t){const a=this,n=a.disabled||a.unfocusable?-1:0,l=document.createElement("div"),o=a._ascDescTemplates[e.dataType]||a._ascDescTemplates.string;l.className="smart-grid-panel-item",l.innerHTML=`<div class="smart-grid-panel-item-close-button" tabindex="${n}" role="button" aria-label="Close"></div>\n<div class="smart-grid-panel-label-by smart-unselectable" role="presentation">${a.localize(t>0?"thenBy":"firstBy")}</div>\n<div class="smart-grid-panel-field-container" role="presentation"><smart-input class="smart-grid-panel-field-selection" value="${e.label}" animation="${a.animation}" readonly theme="${a.theme}" aria-label="Field name"></smart-input></div>\n<div class="smart-grid-panel-from smart-unselectable" role="presentation">${a.localize("from")}</div >\n<div class="smart-grid-panel-direction smart-unselectable" tabindex="${n}" role="presentation">\n <div class="smart-grid-panel-asc" role="button" aria-label="Ascending">${o[0]}</div >\n <div class="smart-grid-panel-desc" role="button" aria-label="Descending">${o[1]}</div>\n</div>\n`;const i=l.querySelector("smart-input");i.dataSource=a._hiddenSource,i.rightToLeft=a.rightToLeft,i.dropDownButtonPosition=a.rightToLeft?"left":"right",i.dataSource&&i.dataSource.length<10?i.dropDownHeight="auto":i.dropDownHeight=250,a.$.sortable.$.container.appendChild(l),i.tabIndex=n,e.sortDirection&&-1===e.sortDirection.indexOf("asc")?l.children[4].children[1].classList.add("selected"):(e.sortDirection="ascending",l.children[4].firstElementChild.classList.add("selected")),a._HTMLToSourceMap.set(l,e)}_disableItemAddition(){const e=this,t=e.maxLevel,a=0===e._hiddenSource.length||null!=t&&Math.max(0,t)===e.$.sortable._items.length;e.$.inputNotSorted.disabled=a,a&&e.$.inputNotSorted.removeAttribute("focus")}_setFocusable(){const e=this,t=e.disabled||e.unfocusable?-1:0,a=Array.from(e.getElementsByClassName("smart-grid-panel-item-close-button")),n=Array.from(e.getElementsByClassName("smart-grid-panel-direction")),l=Array.from(e.getElementsByTagName("input")),o=a.concat(n).concat(l);e.$.buttonsContainer.firstElementChild.tabIndex=t,e.$.buttonsContainer.children[1].tabIndex=t,o.forEach((e=>e.tabIndex=t))}}),Smart("smart-sort-panel",class extends Smart.GridPanel{static get properties(){return{messages:{value:{en:{firstBy:"Sort by",noSorting:"No sorting applied",pickAnother:"Pick another field to sort by"}},type:"object",extend:!0}}}static get styleUrls(){return["smart.textbox.css"]}_localize(){super._localize(),this.$.sortable.$.container.setAttribute("no-sorting",this.localize("noSorting"))}}),Smart("smart-group-panel",class extends Smart.GridPanel{static get properties(){return{maxLevel:{value:8,type:"number?"},messages:{value:{en:{collapseAll:"Collapse all",expandAll:"Expand all",firstBy:"Group by",noGrouping:"No grouping",pickAnother:"Pick another field to group by"}},type:"object",extend:!0}}}template(){return'<div id="container" role="presentation">\n <smart-sortable disable-mode="manual" right-to-left="[[rightToLeft]]" id="sortable" animation="[[animation]]" disabled="[[readonly]]" drag-mode="handle" handle-position="right" handle-visibility="visible" theme="[[theme]]"></smart-sortable>\n <div id="expandCollapseContainer" class="smart-grid-panel-buttons-container smart-grid-panel-expand-collapse smart-unselectable" role="presentation">\n <span class="smart-group-panel-collapse-button" role="button"></span>\n <span class="smart-group-panel-expand-button" role="button"></span>\n </div>\n <div id="footer" class="smart-grid-panel-container-footer" role="presentation">\n <smart-input right-to-left="[[rightToLeft]]" id="inputNotSorted" animation="[[animation]]" readonly theme="[[theme]]"></smart-input>\n <div id="buttonsContainer" class="smart-grid-panel-buttons-container smart-unselectable" role="presentation">\n <span class="smart-grid-panel-cancel-button" role="button"></span>\n <span class="smart-grid-panel-apply-button primary" role="button"></span>\n </div>\n </div>\n </div>'}_interactionHandler(e,t){const a=this;super._interactionHandler(e,t)||(e===a.$.expandCollapseContainer.firstElementChild?a.$.fireEvent("collapseAll"):e===a.$.expandCollapseContainer.children[1]&&a.$.fireEvent("expandAll"))}_localize(){super._localize();const e=this;e.$.expandCollapseContainer.firstElementChild.innerHTML=e.localize("collapseAll"),e.$.expandCollapseContainer.children[1].innerHTML=e.localize("expandAll"),e.$.sortable.$.container.setAttribute("no-grouping",e.localize("noGrouping"))}_setFocusable(){super._setFocusable();const e=this,t=e.disabled||e.unfocusable?-1:0;e.$.expandCollapseContainer.firstElementChild.tabIndex=t,e.$.expandCollapseContainer.children[1].tabIndex=t}}),Smart("smart-multi-column-filter-panel",class extends Smart.BaseElement{static get properties(){return{closeButtonPosition:{value:"left",allowedValues:["left","right"],type:"string"},dataSource:{value:[],type:"array",reflectToAttribute:!1},editorCallback:{value:null,type:"function?",reflectToAttribute:!1},editorPlaceholder:{value:"Value",type:"string"},messages:{value:{en:{addFilter:"+ Add filter",and:"And",apply:"Ok",cancel:"Cancel",CONTAINS:"contains",CONTAINS_CASE_SENSITIVE:"contains (case sensitive)",DOES_NOT_CONTAIN:"does not contain",DOES_NOT_CONTAIN_CASE_SENSITIVE:"does not contain (case sensitive)",EMPTY:"empty",ENDS_WITH:"ends with",ENDS_WITH_CASE_SENSITIVE:"ends with (case sensitive)",EQUAL:"equal",EQUAL_CASE_SENSITIVE:"equal (case sensitive)",GREATER_THAN:"greater than",GREATER_THAN_OR_EQUAL:"greater than or equal",LESS_THAN:"less than",LESS_THAN_OR_EQUAL:"less than or equal",noFilters:"No filters applied",NOT_EMPTY:"not empty",NOT_EQUAL:"not equal",NOT_NULL:"not null",NULL:"null",or:"Or",STARTS_WITH:"starts with",STARTS_WITH_CASE_SENSITIVE:"starts with (case sensitive)",where:"Where"}},type:"object",extend:!0},operator:{value:"and",allowedValues:["and","or"],type:"string"},value:{value:[],type:"array"}}}static get listeners(){return{change:"_changeHandler",click:"_interactionHandler",keydown:"_interactionHandler"}}static get requires(){return{"Smart.Button":"smart.button.js","Smart.CheckBox":"smart.checkbox.js","Smart.DateTimePicker":"smart.datetimepicker.js","Smart.FilterGroup":"smart.filter.js","Smart.Input":"smart.input.js","Smart.NumericTextBox":"smart.numerictextbox.js"}}static get styleUrls(){return["smart.gridpanel.css"]}template(){return'<div id="container" role="presentation">\n <div id="itemsContainer" class="smart-filter-panel-items-container smart-unselectable"></div>\n <div id="footer" class="smart-grid-panel-container-footer" role="presentation">\n <div id="addFilterButton" class="smart-filter-panel-add-filter-button smart-unselectable" role="button"></div>\n <div id="buttonsContainer" class="smart-grid-panel-buttons-container smart-unselectable" role="presentation">\n <span class="smart-grid-panel-cancel-button" role="button"></span>\n <span class="smart-grid-panel-apply-button primary" role="button"></span>\n </div>\n </div>\n </div>'}ready(){super.ready()}render(){const e=this;e.setAttribute("role","dialog"),e._setFocusable(),e._localize(),e._applyValue(),super.render()}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const n=this;switch(e){case"animation":case"theme":case"rightToLeft":Array.from(n.$.itemsContainer.querySelectorAll("smart-date-time-picker, smart-numeric-text-box, smart-check-box, smart-input")).forEach((t=>{t[e]=a,"smart-input"===t.tagName.toLowerCase()&&"rightToLeft"===e&&"none"!==t.dropDownButtonPosition&&(t.dropDownButtonPosition=a?"left":"right")}));break;case"disabled":case"unfocusable":n._setFocusable(!0);break;case"dataSource":case"value":n._applyValue();break;case"editorPlaceholder":Array.from(n.$.itemsContainer.getElementsByClassName("editor")).forEach((e=>e.placeholder=a));break;case"locale":case"messages":n._localize(!0);break;case"operator":n._setOperator()}}_setOperator(){const e=this,t=e.localize(e.operator);for(let a=2;a<e._items.length;a++)e._items[a].children[1].innerHTML=t}_changeHandler(e){const t=this,a=t.shadowRoot||t.isInShadowDOM?e.composedPath()[0]:e.target;if(a instanceof Smart.Input==0)return;const n=a.parentElement,l=n.children;if(a===l[1])t.operator=a.$.input.dataValue,t._setOperator();else if(a===l[2]){const a=t.dataSource.find((t=>t.dataField===e.detail.oldValue)).dataType,o=t.dataSource.find((t=>t.dataField===e.detail.value)),i=o.dataType;if("enum"!==i&&i===a)return void(t.editorCallback&&t.editorCallback(l[4],o));const r=l[3].value;let s,d;switch(i){case"date":s=t._numberAndDateConditions,d=document.createElement("smart-date-time-picker"),d.calendarButton=!0,d.dropDownAppendTo="body",d.dropDownDisplayMode="auto",d.formatString="M/d/yy H:mm";break;case"number":s=t._numberAndDateConditions,d=document.createElement("smart-numeric-text-box");break;case"boolean":s=t._booleanConditions,d=document.createElement("smart-check-box");break;case"enum":s=t._enumConditions,d=document.createElement("smart-input"),d.dataSource=o.options,d.readonly=!0,d.dropDownButtonPosition="right";break;default:s=t._stringConditions,d=document.createElement("smart-input")}d.rightToLeft=t.rightToLeft,d.animation=t.animation,d.theme=t.theme,d.unfocusable=t.disabled||t.unfocusable,d.classList.add("underlined"),d.dataSource&&d.dataSource.length<10?d.dropDownHeight="auto":d.dropDownHeight=250,"boolean"!==i&&(d.placeholder=t.editorPlaceholder),t.editorCallback&&t.editorCallback(d,o),l[4].remove(),n.appendChild(d),""===r||s.find((e=>e.label===r))||(l[3].value=""),l[3].dataSource=s,s.length>=10?l[3].dropDownHeight=250:l[3].dropDownHeight="auto",n.dataType=i}else if(a===l[3]){const e=l[4],t=a.$.input.dataValue;-1!==t.indexOf("NULL")||-1!==t.indexOf("EMPTY")?(e.value="",e.checked=!1,e.classList.add("smart-visibility-hidden")):e.classList.remove("smart-visibility-hidden"),a.condition=t}}_interactionHandler(e){const t=this;if(t.disabled||t.readonly)return;if("keydown"===e.type){if("Enter"!==e.key)return;e.preventDefault()}const a=t.shadowRoot||t.isInShadowDOM?e.composedPath()[0]:e.target,n=a.closest(".smart-grid-panel-item");if(n){if(a===n.firstElementChild){const e=t._items.indexOf(n);let a;t._items.splice(e,1),n.remove(),t._items.length>0&&e<2&&(0===e&&(t._items[0].children[1].remove(),a=document.createElement("div"),a.innerHTML=t.localize("where"),t._items[0].insertBefore(a,t._items[0].children[1])),t._items.length>1&&(t._items[1].children[1].remove(),a=document.createElement("smart-input"),a.className="underlined",a.dataSource=[{value:"and",label:t.localize("and")},{value:"or",label:t.localize("or")}],a.dropDownButtonPosition=t.rightToLeft?"left":"right",a.readonly=!0,a.value=t.localize(t.operator),a.animation=t.animation,a.theme=t.theme,a.rightToLeft=t.rightToLeft,a.unfocusable=t.disabled||t.unfocusable,t._items[1].insertBefore(a,t._items[1].children[1])))}}else if(a===t.$.addFilterButton&&t.dataSource.length>0)t.$.itemsContainer.appendChild(t._createItem(t.dataSource[0],"","",t._items.length));else if(a!==t.$.buttonsContainer.firstElementChild){if(a===t.$.buttonsContainer.children[1]){const e=t._stringConditions.concat(t._numberAndDateConditions),a=t.operator,n=[],l={},o=[];t._items.forEach((o=>{const i=t.dataSource.find((e=>e.label===o.children[2].value)),r=[];let s=o.children[3].value;if(""===s)return;let d=i.dataType;if(s=e.find((e=>e.label===s)).value,r.push(i.dataField,s),-1===s.indexOf("NULL")&&-1===s.indexOf("EMPTY"))if("boolean"===d)r.push(o.children[4].checked);else if("date"===d)r.push(o.children[4].value.toDate());else if("enum"===d){let e=o.children[4].$.input.dataValue;if(void 0===e){const t=i.options.find((e=>e.label===o.children[4].value));if(!t)return;e=t.value}d="string",r.push(e)}else r.push(o.children[4].value);let c=l[r[0]];void 0===c&&(c=new Smart.Utilities.FilterGroup,l[r[0]]=c);const u=c.createFilter(d,r[2],r[1]);c.addFilter(a,u),n.push(r)}));for(let e in l)o.push([e,l[e]]);t.value=n,t.$.fireEvent("apply",{filters:o,operator:a,value:n})}}else t.$.fireEvent("cancel")}_applyValue(){const e=this,t=document.createDocumentFragment();let a=0;for(e._items=[];e.$.itemsContainer.firstElementChild;)e.$.itemsContainer.firstElementChild.remove();0!==e.dataSource.length&&(e.value.forEach((n=>{if(!Array.isArray(n))return;const l=n[0],o=e.dataSource.find((e=>e.dataField===l));if(!o)return;const i=e._createItem(o,n[1],n[2],a);t.appendChild(i),a++})),e.$.itemsContainer.appendChild(t))}_createItem(e,t,a,n){const l=this,o=l.disabled||l.unfocusable?-1:0,i=document.createElement("div"),r=document.createDocumentFragment(),s=document.createElement("div"),d=document.createElement("smart-input"),c=document.createElement("smart-input");let u,p;return s.className="smart-grid-panel-item-close-button",s.tabIndex=o,s.setAttribute("role","button"),s.setAttribute("aria-label","button"),r.appendChild(s),0===n?(u=document.createElement("div"),u.innerHTML=l.localize("where"),u.setAttribute("role","presentation")):1===n?(u=document.createElement("smart-input"),u.className="underlined",u.dataSource=[{value:"and",label:l.localize("and")},{value:"or",label:l.localize("or")}],u.dropDownButtonPosition=l.rightToLeft?"left":"right",u.readonly=!0,u.value=l.localize(l.operator),u.animation=l.animation,u.theme=l.theme,u.rightToLeft=l.rightToLeft,u.unfocusable=l.disabled||l.unfocusable,u.setAttribute("aria-label","Operator")):(u=document.createElement("div"),u.innerHTML=l.localize(l.operator),u.setAttribute("role","presentation")),r.appendChild(u),d.className="underlined",d.dataSource=l.dataSource.map((e=>({value:e.dataField,label:e.label,icon:e.icon}))),d.dropDownButtonPosition=l.rightToLeft?"left":"right",d.readonly=!0,d.value=e.label,d.animation=l.animation,d.theme=l.theme,d.rightToLeft=l.rightToLeft,d.unfocusable=l.disabled||l.unfocusable,d.setAttribute("aria-label","Field"),d.dataSource&&d.dataSource.length<10?d.dropDownHeight="auto":d.dropDownHeight=250,r.appendChild(d),"boolean"===e.dataType?(c.dataSource=l._booleanConditions,p=document.createElement("smart-check-box"),p.checked="boolean"==typeof a&&a):"date"===e.dataType?(c.dataSource=l._numberAndDateConditions,p=document.createElement("smart-date-time-picker"),p.dropDownDisplayMode="auto",p.calendarButton=!0,p.dropDownAppendTo="body",p.formatString="M/d/yy H:mm",p.value=a):"number"===e.dataType?(c.dataSource=l._numberAndDateConditions,p=document.createElement("smart-numeric-text-box"),p.value="number"==typeof a||"string"==typeof a?a:0):"enum"===e.dataType?(c.dataSource=l._enumConditions,p=document.createElement("smart-input"),p.dataSource=e.options,p.readonly=!0,p.dropDownButtonPosition="right",p.value=a?e.options.find((e=>e.value===a)).label:""):(c.dataSource=l._stringConditions,p=document.createElement("smart-input"),p.value=null!=a?a.toString():""),c.className="underlined",c.dropDownButtonPosition=l.rightToLeft?"left":"right",c.readonly=!0,c.animation=l.animation,c.theme=l.theme,c.rightToLeft=l.rightToLeft,c.unfocusable=l.disabled||l.unfocusable,c.setAttribute("aria-label","Condition"),c.classList.add("smart-filter-panel-list"),c.dataSource.find((e=>e.value===t))?(c.value=l.localize(t),c.condition=t):(p.value="",p.checked=!1),void 0===t||-1===t.indexOf("NULL")&&-1===t.indexOf("EMPTY")||(p.value="",p.checked=!1,p.classList.add("smart-visibility-hidden")),c.dataSource&&c.dataSource.length<10?c.dropDownHeight="auto":c.dropDownHeight=250,p.animation=l.animation,p.classList.add("editor"),p.rightToLeft=l.rightToLeft,p.theme=l.theme,p.unfocusable=l.disabled||l.unfocusable,p.classList.add("underlined"),"boolean"!==e.dataType&&(p.placeholder=l.editorPlaceholder),l.editorCallback&&l.editorCallback(p,e),r.appendChild(c),r.appendChild(p),i.appendChild(r),i.className="smart-grid-panel-item",l._items.push(i),i.dataType=e.dataType,i}_localize(e){const t=this;t.$.addFilterButton.innerHTML=t.localize("addFilter"),t.$.buttonsContainer.firstElementChild.innerHTML=t.localize("cancel"),t.$.buttonsContainer.children[1].innerHTML=t.localize("apply"),t.$.itemsContainer.setAttribute("no-filters",t.localize("noFilters")),t._stringConditions=[{prefix:'<span class="smart-icon smart-icon-empty"></span>',value:"EMPTY",label:t.localize("EMPTY")},{prefix:'<span class="smart-icon smart-icon-not-empty"></span>',value:"NOT_EMPTY",label:t.localize("NOT_EMPTY")},{prefix:'<span class="smart-icon smart-icon-contains"></span>',value:"CONTAINS",label:t.localize("CONTAINS")},{prefix:'<span class="smart-icon smart-icon-does-not-contain"></span>',value:"DOES_NOT_CONTAIN",label:t.localize("DOES_NOT_CONTAIN")},{prefix:'<span class="smart-icon smart-icon-starts-with"></span>',value:"STARTS_WITH",label:t.localize("STARTS_WITH")},{prefix:'<span class="smart-icon smart-icon-ends-with"></span>',value:"ENDS_WITH",label:t.localize("ENDS_WITH")},{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("EQUAL")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("NOT_EQUAL")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("NULL")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("NOT_NULL")}],t._enumConditions=[{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("EQUAL")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("NOT_EQUAL")}],t._numberAndDateConditions=[{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("EQUAL")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("NOT_EQUAL")},{prefix:'<span class="smart-icon smart-icon-less-than"></span>',value:"LESS_THAN",label:t.localize("LESS_THAN")},{prefix:'<span class="smart-icon smart-icon-less-than-equal"></span>',value:"LESS_THAN_OR_EQUAL",label:t.localize("LESS_THAN_OR_EQUAL")},{prefix:'<span class="smart-icon smart-icon-greater-than"></span>',value:"GREATER_THAN",label:t.localize("GREATER_THAN")},{prefix:'<span class="smart-icon smart-icon-greater-than-equal"></span>',value:"GREATER_THAN_OR_EQUAL",label:t.localize("GREATER_THAN_OR_EQUAL")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("NULL")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("NOT_NULL")}],t._booleanConditions=[{prefix:'<span class="smart-icon smart-icon-equal"></span>',value:"EQUAL",label:t.localize("EQUAL")},{prefix:'<span class="smart-icon smart-icon-not-equal"></span>',value:"NOT_EQUAL",label:t.localize("NOT_EQUAL")},{prefix:'<span class="smart-icon smart-icon-null"></span>',value:"NULL",label:t.localize("NULL")},{prefix:'<span class="smart-icon smart-icon-not-null"></span>',value:"NOT_NULL",label:t.localize("NOT_NULL")}],e&&t._items.forEach(((e,a)=>{const n=e.children[1],l=e.children[3];0===a?n.innerHTML=t.localize("where"):1===a?(n.dataSource=[{value:"and",label:t.localize("and")},{value:"or",label:t.localize("or")}],n.value=t.localize(t.operator)):n.innerHTML=t.localize(t.operator),"string"===e.dataType?l.dataSource=t._stringConditions:"enum"===e.dataType?l.dataSource=t._enumConditions:"boolean"===e.dataType?l.dataSource=t._booleanConditions:l.dataSource=t._numberAndDateConditions,l.value=l.condition?t.localize(l.condition):""}))}_setFocusable(e){const t=this,a=t.disabled||t.unfocusable?-1:0;if(t.$.addFilterButton.tabIndex=a,t.$.buttonsContainer.firstElementChild.tabIndex=a,t.$.buttonsContainer.children[1].tabIndex=a,e){const e=Array.from(t.$.itemsContainer.getElementsByClassName("smart-grid-panel-item-close-button")),n=Array.from(t.$.itemsContainer.querySelectorAll("smart-date-time-picker, smart-numeric-text-box, smart-check-box, smart-input"));e.forEach((e=>e.tabIndex=a)),n.forEach((e=>e.unfocusable=t.disabled||t.unfocusable))}}}),Smart("smart-column-panel",class extends Smart.BaseElement{static get properties(){return{dataSource:{value:[],type:"array",reflectToAttribute:!1},messages:{value:{en:{apply:"Ok",cancel:"Cancel",find:"Find a field",reset:"Reset",noResults:"No results"}},type:"object",extend:!0}}}static get listeners(){return{click:"_interactionHandler",keydown:"_interactionHandler","find.keyup":"_findKeyupHandler","sortable.dragEnd":"_sortableDragEndHandler"}}static get requires(){return{"Smart.Sortable":"smart.sortable.js"}}static get styleUrls(){return["smart.gridpanel.css"]}template(){return'<div id="container" role="presentation">\n <div class="smart-column-panel-find-container" role="search">\n <input id="find" readonly="[[readonly]]" role="searchbox" aria-label="Find a field"></input>\n <span id="clearButton" class="clear-button smart-hidden" role="button" aria-label="Clear"></span>\n </div>\n <smart-sortable id="sortable" disable-mode="manual" right-to-left="[[rightToLeft]]" animation="[[animation]]" disabled="[[readonly]]" drag-mode="handle" handle-position="right" handle-visibility="visible" theme="[[theme]]"></smart-sortable>\n <div id="footer" class="smart-grid-panel-container-footer" role="presentation">\n <span id="reset" class="smart-grid-panel-reset-button" role="button"></span>\n <div id="buttonsContainer" class="smart-grid-panel-buttons-container smart-unselectable" role="presentation">\n <span class="smart-grid-panel-cancel-button" role="button"></span>\n <span class="smart-grid-panel-apply-button primary" role="button"></span>\n </div>\n </div>\n </div>'}ready(){super.ready()}render(){const e=this;e.setAttribute("role","dialog"),e._positionChanged=!1,e._localize(),e._moves=[],e._createSortItems(),super.render()}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const n=this;switch(e){case"disabled":case"unfocusable":n._setFocusable();break;case"dataSource":{const e=n.$.sortable.$.container;for(;e.firstChild;)e.removeChild(e.firstChild);n._createSortItems(),n._positionChanged=!1,n.$.find.value="",n.$.clearButton.classList.add("smart-hidden");break}case"locale":case"messages":n._localize()}}_createSortItems(){const e=this,t=document.createDocumentFragment();e._HTMLToSourceMap=new Map,e.dataSource.forEach((a=>t.appendChild(e._createSortItem(a)))),e.$.sortable.$.container.appendChild(t),e.$.sortable.updateItems(),e._setFocusable()}_createSortItem(e){const t=document.createElement("div"),a=this.id+"Label"+e.dataField;return this._HTMLToSourceMap.set(t,e),t.className="smart-grid-panel-item",t.innerHTML=`<div class="toggle-visibility${!1!==e.visible?"":" hidden"}${e.disableToggle?" disable-toggle":""}" role="button" aria-controls="${a}" aria-label="Toggle visibility"></div>\n<span id="${a}" class="smart-column-panel-label smart-unselectable${e.icon?" icon "+e.icon:""}">${e.label}</span>`,1===e.level?t.classList.add("indent"):0===e.level&&t.classList.add("group"),e.disableDrag&&t.setAttribute("disable-drag",""),e.dataField&&t.setAttribute("data-field",e.dataField),e.parentDataField&&t.setAttribute("parent-data-field",e.parentDataField),!1!==e.allowHide&&!0!==e.disableToggle||(t.style.pointerEvents="none",t.setAttribute("disabled",""),t.style.opacity=.8),t}_interactionHandler(e){const t=this;if(t.disabled||t.readonly||"keydown"===e.type&&-1===[" ","Enter"].indexOf(e.key))return;const a=t.shadowRoot||t.isInShadowDOM?e.composedPath()[0]:e.target;if(a.classList.contains("toggle-visibility")){a.classList.toggle("hidden");const e=a.closest(".smart-grid-panel-item");if(e.hasAttribute("data-field")){const n=e.getAttribute("data-field");if(e.hasAttribute("parent-data-field")||e.hasAttribute("disabled")){const a=e.getAttribute("parent-data-field"),n=t.$.sortable.querySelectorAll(".smart-grid-panel-item");let l=null;if(n.forEach((e=>{e.getAttribute("data-field")===a&&(l=e)})),l){let e=0,t=0;n.forEach((n=>{n.getAttribute("parent-data-field")===a&&(e++,n.firstElementChild.classList.contains("hidden")&&t++)})),t===e?l.firstElementChild.classList.add("hidden"):t<e&&l.firstElementChild.classList.remove("hidden")}}else t.$.sortable._items.forEach((e=>{if(e.hasAttribute("parent-data-field")&&!e.hasAttribute("disabled")){const t=e.getAttribute("parent-data-field"),l=e.firstElementChild;t===n&&(a.classList.contains("hidden")?l.classList.add("hidden"):l.classList.remove("hidden"))}}))}}else if(a.parentElement===t.$.buttonsContainer){if(a===t.$.buttonsContainer.firstElementChild)return t.$.fireEvent("cancel"),void(t._moves=[]);if(a===t.$.buttonsContainer.children[1]){const e=[];t.$.sortable._items.forEach((a=>{const n=Object.assign({},t._HTMLToSourceMap.get(a));n.visible=!a.firstElementChild.classList.contains("hidden"),e.push(n)})),t.$.fireEvent("apply",{value:e,positionChanged:t._positionChanged,moves:t._moves}),t._positionChanged=!1,t._moves=[]}}else if(a===t.$.reset){const e=[];t.$.sortable._items.forEach((a=>{const n=Object.assign({},t._HTMLToSourceMap.get(a));n.visible=!0,e.push(n)})),t.$.fireEvent("apply",{value:e,positionChanged:t._positionChanged,moves:t._moves}),t._positionChanged=!1,t._moves=[]}else a.classList.contains("clear-button")&&(t.$.find.value="",t._findKeyupHandler())}_findKeyupHandler(){const e=this;if(e.disabled||e.readonly)return;const t=e.$.find,a=t.value,n=e.$.sortable._items;if(void 0===e._disabledSortable&&(e._disabledSortable=e.$.sortable.disabled),""===a)return t.parentElement.classList.remove("no-results"),e.$.clearButton.classList.add("smart-hidden"),n.forEach((e=>e.classList.remove("smart-hidden"))),e.$.sortable.disabled=e._disabledSortable||e.readonly,void delete e._disabledSortable;let l=!0;e.$.clearButton.classList.remove("smart-hidden"),n.forEach((t=>{-1===e._HTMLToSourceMap.get(t).label.toLowerCase().indexOf(a.toLowerCase())?t.classList.add("smart-hidden"):(t.classList.remove("smart-hidden"),l=!1)})),e.$.sortable.disabled=l,l?t.parentElement.classList.add("no-results"):t.parentElement.classList.remove("no-results")}_sortableDragEndHandler(e){const t=e.detail;this._positionChanged=!0,this._moves.push({oldIndex:t.oldIndex,newIndex:t.newIndex})}_localize(){const e=this;e.$.find.placeholder=e.localize("find"),e.$.reset.innerHTML=e.localize("reset"),e.$.buttonsContainer.firstElementChild.innerHTML=e.localize("cancel"),e.$.buttonsContainer.children[1].innerHTML=e.localize("apply"),e.$.container.firstElementChild.setAttribute("no-results",e.localize("noResults"))}_setFocusable(){const e=this,t=e.disabled||e.unfocusable?-1:0,a=Array.from(e.$.sortable.getElementsByClassName("toggle-visibility"));e.$.find.tabIndex=t,e.$.clearButton.tabIndex=t,e.$.buttonsContainer.firstElementChild.tabIndex=t,e.$.buttonsContainer.children[1].tabIndex=t,a.forEach((e=>e.tabIndex=e.classList.contains("disable-toggle")?-1:t))}}),Smart("smart-formatting-panel",class extends Smart.BaseElement{static get properties(){return{columns:{value:[],type:"array",reflectToAttribute:!1},dataSource:{value:[],type:"any",reflectToAttribute:!1},items:{value:null,type:"array?",reflectToAttribute:!1},dropDownAppendTo:{value:null,type:"any",reflectToAttribute:!1},messages:{value:{en:{add:"Add condition",all:"All columns",apply:"Ok",between:"Between",cancel:"Cancel",close:"Close",column:"Column:",condition:"Condition:",equal:"Equal To",fontFamily:"Font family:",fontSize:"Font size:",format:"Format:",greaterThan:"Greater Than",highlight:"Highlight",lessThan:"Less Than",notEqual:"Not Equal To",remove:"Remove condition",secondValue:"Second value:",text:"Text",value:"Value:"}},type:"object",extend:!0}}}static get listeners(){return{click:"_interactionHandler",keydown:"_interactionHandler",change:"_changeHandler","popup.change":"_changeHandler","popup.click":"_interactionHandler","popup.keydown":"_interactionHandler","document.down":"_documentDownHandler"}}template(){return'<div id="container" role="presentation">\n <div id="itemsContainer" class="smart-formatting-panel-items-container" role="presentation"></div>\n <div id="addNewButton" class="smart-add-new-button" role="button" aria-label="Add new condition"></div>\n <div id="popup" class="smart-formatting-panel-popup smart-hidden smart-visibility-hidden" role="dialog">\n <div id="popupHeader" class="header" role="presentation">\n <div id="text" class="selected" role="button" aria-label="Text color"></div>\n <div id="highlight" role="button" aria-label="Highlight color"></div>\n </div>\n <div id="colorCode" class="color-code"></div>\n <input id="colorInput" type="color" />\n <div id="colorsContainer" class="colors-container"></div>\n <smart-button id="apply" class="ok primary" animation="[[animation]]" right-to-left="[[rightToLeft]]" theme="[[theme]]" unfocusable="[[unfocusable]]"></smart-button>\n <smart-button id="cancel" class="cancel" animation="[[animation]]" right-to-left="[[rightToLeft]]" theme="[[theme]]" unfocusable="[[unfocusable]]"></smart-button>\n </div>\n </div>'}render(){const e=this,t=getComputedStyle(e);e.setAttribute("role","dialog"),e.$.popup.id=e.id+"Popup",e._basicColors=[[0,0,0],[68,68,68],[102,102,102],[153,153,153],[204,204,204],[238,238,238],[243,243,243],[255,255,255],[255,0,0],[255,153,0],[255,255,0],[0,255,0],[0,255,255],[0,0,255],[153,0,255],[255,0,255],[244,204,204],[252,229,205],[255,242,204],[217,234,211],[208,224,227],[207,226,243],[217,210,233],[234,209,220],[234,153,153],[249,203,156],[255,229,153],[182,215,168],[162,196,201],[159,197,232],[180,167,214],[213,166,189],[224,102,102],[246,178,107],[255,217,102],[147,196,125],[118,165,175],[111,168,220],[142,124,195],[194,123,160],[204,0,0],[230,145,56],[241,194,50],[106,168,79],[69,129,142],[61,133,198],[103,78,167],[166,77,121],[153,0,0],[180,95,6],[191,144,0],[56,118,29],[19,79,92],[11,83,148],[53,28,117],[116,27,71],[102,0,0],[120,63,4],[127,96,0],[39,78,19],[12,52,61],[7,55,99],[32,18,77],[76,17,48]],e._defaults={fontFamily:t.fontFamily,fontSize:t.fontSize,text:e._toHex(t.color),highlight:e._toHex(t.backgroundColor)},t.fontFamily.indexOf("-apple")>=0&&(e._defaults.fontFamily="Segoe UI"),e._localize(),e._setFocusable(),e._populatePopupWithColors(),e._processColumnsAndDataSource(),e._addDefaultItems(),super.render()}attached(){const e=this;super.attached(),e.isCompleted&&e._addDefaultItemsOnAttach&&e._addDefaultItems()}add(e,t){const a=this;if(e&&e.column&&"all"!==e.column&&!a.columns.find((t=>t.dataField===e.column)))return void a.items.splice(t,1);const n=document.createElement("div"),l=a._defaults,o=` animation="${a.animation}"${a.rightToLeft?" right-to-left":""} theme="${a.theme}"${a.unfocusable?" unfocusable":""}`,i=a.disabled||a.unfocusable?"":' tabindex="0"';e=Object.assign({column:"all",condition:"lessThan",firstValue:0,secondValue:1,fontFamily:l.fontFamily,fontSize:l.fontSize,text:l.text,highlight:l.highlight},e);const r=`\n<div class="value-label">${a.localize("value")}</div>\n<smart-input class="columns-input underlined" data-source='${JSON.stringify(a._columnsInputDataSource)}' placeholder="${a.localize("column")}" readonly value="${a._columnsInputDataSource.find((t=>t.value===e.column)).label}"${o}></smart-input>\n<smart-input class="condition-input underlined" data-source='${a._conditionsDataSource}' placeholder="${a.localize("condition")}" readonly value="${a.localize(e.condition)}"${o}></smart-input>\n<smart-input class="first-value underlined" type="number" placeholder="${a.localize("value")}" value="${e.firstValue}"${o}></smart-input>\n<div class="ampersand">&</div>\n<smart-input class="second-value underlined" type="number" placeholder="${a.localize("secondValue")}" value="${e.secondValue}"${o}></smart-input>\n<div class="close-button" title="${a.localize("close")}"${i} role="button" aria-label="Close"></div>\n<div class="format-label">${a.localize("format")}</div>\n<smart-input class="font-family-input underlined" drop-down-height="auto" placeholder="${a.localize("fontFamily")}" readonly${o}></smart-input>\n<smart-input class="font-size-input underlined" data-source='["8px", "9px", "10px", "11px", "12px", "13px", "14px", "15px", "16px"]' drop-down-height="auto" placeholder="${a.localize("fontSize")}" readonly value="${e.fontSize}"${o}></smart-input>\n<div class="popup-button smart-unselectable"${i} role="button" aria-haspopup="dialog" aria-label="Toggle pop-up">A</div>\n<div class="preview smart-unselectable">2.71828</div>`;n.classList.add("smart-formatting-panel-item"),n.classList.toggle("between","between"===e.condition),n.innerHTML=r,n.columnsInput=n.querySelector(".columns-input"),n.conditionInput=n.querySelector(".condition-input"),n.firstValue=n.querySelector(".first-value"),n.secondValue=n.querySelector(".second-value"),n.closeButton=n.querySelector(".close-button"),n.fontFamilyInput=n.querySelector(".font-family-input"),n.fontFamilyInput.dataSource=[l.fontFamily,"Arial","Verdana","Courier New","Georgia","Times New Roman"],n.fontFamilyInput.value=e.fontFamily,n.fontSizeInput=n.querySelector(".font-size-input"),n.popupButton=n.querySelector(".popup-button"),n.fontFamilyInput=n.querySelector(".font-family-input"),n.preview=n.querySelector(".preview"),n.popupButton.style.color=e.text,n.popupButton.style.backgroundColor=e.highlight,n.preview.style.fontFamily=e.fontFamily,n.preview.style.fontSize=e.fontSize,n.preview.style.color=e.text,n.preview.style.backgroundColor=e.highlight,n.data=e,a.$.itemsContainer.appendChild(n),n.columnsInput.$.input.dataValue="all",n.conditionInput.$.input.dataValue=e.condition,a._checkScrollBar()}apply(){const e=this,t=new Smart.Utilities.ConditionalFormatter(e.dataSource),a=Array.from(e.$.itemsContainer.children),n=[];let l;if(0===a.length)return;if(e.ownerElement&&"smart-pivot-table"===e.ownerElement.nodeName.toLowerCase()){const t=e.ownerElement._dynamicColumns;l=function(e){return"all"===e?t.map((e=>e.id)):t.filter((t=>t.dataFields[t.dataFields.length-1].dataField===e)).map((e=>e.id))}}else l=function(t){return"all"===t?e._columns.map((e=>e.value)):[t]};for(let e=0;e<a.length;e++){const o=a[e].data,i=l(o.column),r=o.condition;t.color=o.highlight,t.comparator=o.firstValue,t.min=o.firstValue,t.max=o.secondValue;const s=t.format(r,i);for(let e in s){const t=s[e];for(let e in t){const a=t[e];a.color=o.text,a.fontFamily=o.fontFamily,a.fontSize=o.fontSize}}n.push(s)}if(0===n.length)return n[0];const o={};for(let e=0;e<n.length;e++){const t=n[e];for(let e in t){const a=t[e];o[e]||(o[e]={});for(let t in a)o[e][t]=Object.assign({},o[e][t],a[t])}}return o}getItems(){return Array.from(this.$.itemsContainer.children).map((e=>e.data))}propertyChangedHandler(e,t,a){super.propertyChangedHandler(e,t,a);const n=this;switch(e){case"animation":case"theme":case"rightToLeft":if(Array.from(n.$.itemsContainer.querySelectorAll(".smart-element")).forEach((t=>t[e]=a)),null!==n.dropDownAppendTo&&(n.$.apply[e]=a,n.$.cancel[e]=a),"theme"===e){const e=getComputedStyle(n);n._defaults.text=n._toHex(e.color),n._defaults.highlight=n._toHex(e.backgroundColor)}break;case"columns":case"items":"columns"===e&&(n._processColumnsAndDataSource(),n.items=null),n.$.itemsContainer.innerHTML="",n._addDefaultItems();break;case"disabled":case"unfocusable":{const t=n.disabled||n.unfocusable,l=Array.from(n.$.itemsContainer.querySelectorAll(".close-button, .popup-button"));"disabled"===e?n._closePopup():null!==n.dropDownAppendTo&&(n.$.apply.unfocusable=a,n.$.cancel.unfocusable=a),n._setFocusable(),Array.from(n.$.itemsContainer.querySelectorAll(".smart-element")).forEach((e=>e.unfocusable=t)),t?l.forEach((e=>e.removeAttribute("tabindex"))):l.forEach((e=>e.setAttribute("tabindex",0)));break}case"dataSource":Smart.DataAdapter&&a instanceof Smart.DataAdapter&&(n.dataSource=a.toArray());break;case"locale":case"messages":n.items=n.getItems(),n.$.itemsContainer.innerHTML="",n._localize(),n._columnsInputDataSource=n._columns.concat([{label:n.localize("all"),value:"all"}]),n._addDefaultItems()}}_populatePopupWithColors(){const e=this,t=e._basicColors,a=document.createDocumentFragment();for(let n=0;n<t.length;n++){const l=document.createElement("div"),o=t[n],i=`rgb(${o[0]}, ${o[1]}, ${o[2]})`,r=e._toHex(i);l.setAttribute("role","button"),l.setAttribute("aria-label","Select color "+r),l.index=n,l.value=r,l.style.backgroundColor=i,a.appendChild(l)}e.$.colorsContainer.appendChild(a)}_processColumnsAndDataSource(){const e=this,t=e.columns,a=e.dataSource,n=[];Smart.DataAdapter&&a instanceof Smart.DataAdapter&&(e.dataSource=a.toArray());for(let e=0;e<t.length;e++){const a=t[e];"number"===a.dataType&&n.push({label:a.label,value:a.dataField})}e._columns=n,e._columnsInputDataSource=n.concat([{label:e.localize("all"),value:"all"}])}_addDefaultItems(){const e=this,t=e.items,a=e.getRootNode();a===document||document.body.contains(a)?(t&&t.length>0?t.forEach(((t,a)=>e.add(t,a))):(e.add({condition:"greaterThan",firstValue:100}),e.add({condition:"lessThan",firstValue:0})),delete e._addDefaultItemsOnAttach):e._addDefaultItemsOnAttach=!0}_changeHandler(e){const t=this,a=t.isInShadowDOM?e.composedPath()[0]:e.target,n=a.closest(".smart-formatting-panel-item");if(n)if(a!==n.columnsInput){if(a===n.conditionInput)return n.data.condition=a.$.input.dataValue,void n.classList.toggle("between","between"===a.$.input.dataValue);if(n.firstValue.contains(a))n.data.firstValue=parseFloat(a.value);else{if(!n.secondValue.contains(a))return a===n.fontFamilyInput?(n.data.fontFamily=a.value,void(n.preview.style.fontFamily=a.value)):void(a===n.fontSizeInput&&(n.data.fontSize=a.value,n.preview.style.fontSize=a.value));n.data.secondValue=parseFloat(a.value)}}else n.data.column=a.$.input.dataValue;else t.$.popup.contains(a)&&t._updateUI(a.value.toUpperCase())}_checkScrollBar(){this.classList.toggle("scroll",this.$.itemsContainer.offsetHeight<this.$.itemsContainer.scrollHeight)}_interactionHandler(e){const t=this;if(!t.dropDownAppendTo&&e.currentTarget===t.$.popup)return;if("keydown"===e.type){if(-1===[" ","Enter"].indexOf(e.key))return void(t.disabled||t.readonly||t._keydownHandler(e));e.preventDefault()}const a=t.isInShadowDOM?e.composedPath()[0]:e.target;if(a===t.$.addNewButton)return void t.add();const n=a.closest(".smart-formatting-panel-item");if(n)return void(a===n.closeButton?(n.remove(),this._checkScrollBar()):a===n.popupButton&&(t._togglePopup(n),t._activePopupButton=a));const l=t.$.popup;if(l.contains(a)){if(a.parentElement===t.$.colorsContainer)return void t._updateUI(a.value);if(a.parentElement===t.$.popupHeader)a.classList.add("selected"),a===t.$.text?(l.selection="currentText",t.$.highlight.classList.remove("selected")):(l.selection="currentHighlight",t.$.text.classList.remove("selected")),t._updateUI(l[l.selection]);else if(a.classList.contains("smart-button")){if(t.$.apply.contains(a)||a&&a.ownerElement&&a.ownerElement.classList.contains("ok")){const e=l.item;e.data.text=l.currentText,e.data.highlight=l.currentHighlight,e.popupButton.style.color=l.currentText,e.popupButton.style.backgroundColor=l.currentHighlight,e.preview.style.color=l.currentText,e.preview.style.backgroundColor=l.currentHighlight}t._closePopup()}}}_keydownHandler(e){const t=this,a=e.key;if(-1===["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Escape","Home","PageDown","PageUp"].indexOf(a))return;if(e.preventDefault(),"Escape"===a&&!t.$.popup.classList.contains("smart-hidden"))return void t._closePopup();if(t.getRootNode().activeElement!==t.$.colorsContainer)return;const n=Array.from(this.$.colorsContainer.children),l=this.$.colorsContainer.querySelector(".selected");let o,i="ArrowRight",r="ArrowLeft";if(t.rightToLeft&&(i="ArrowLeft",r="ArrowRight"),l){let e=l.index;switch(a){case r:e=Math.max(e-1,e-e%8);break;case i:e=Math.min(e+1,e+8-e%8-1);break;case"ArrowUp":e=Math.max(e-8,e%8);break;case"ArrowDown":e=Math.min(e+8,56+e%8);break;case"Home":e-=e%8;break;case"End":e=e+8-e%8-1;break;case"PageUp":e%=8;break;case"PageDown":e=56+e%8}o=n[e]}else o=n[0];t._updateUI(o.value,o)}_togglePopup(e){const t=this,a=t.$.popup;if(e===a.item)return void t._closePopup();if(a.setAttribute("animation",t.animation),a.setAttribute("theme",t.theme),t.rightToLeft&&a.setAttribute("right-to-left",""),a.classList.contains("smart-hidden")&&a.classList.remove("smart-hidden"),t.dropDownAppendTo)if("body"===t.dropDownAppendTo)document.body.appendChild(a);else{const e=document.querySelector(t.dropDownAppendTo);e&&e.appendChild(a)}const n=e.popupButton,l=n.getBoundingClientRect(),o=n.offsetLeft,i=n.offsetTop,r=a.offsetWidth,s=a.offsetHeight,d=t.$.itemsContainer.scrollTop,c=t._toHex(e.data.text),u=t._toHex(e.data.highlight);l.top>=s+5?a.style.top=i-(s+d+5)+"px":a.style.top=i+l.height-d+5+"px",a.style.left=o+l.width/2-r/2+"px",t.dropDownAppendTo&&(a.style.top=l.bottom+5+"px",a.style.left=l.left+l.width/2-r/2+"px"),t.$.text.classList.add("selected"),t.$.highlight.classList.remove("selected"),t.$.text.focus(),a.item=e,a.selection="currentText",a.currentText=c,a.currentHighlight=u,t._updateUI(c),a.controlledBy&&(a.controlledBy.removeAttribute("aria-controls"),a.controlledBy.removeAttribute("aria-expanded")),n.setAttribute("aria-controls",a.id),n.setAttribute("aria-expanded",!0),a.controlledBy=n,a.classList.remove("smart-visibility-hidden")}_closePopup(){const e=this,t=e.$.popup;"none"!==e.animation?(t.addEventListener("transitionend",(function e(){t.classList.add("smart-hidden"),t.removeEventListener("transitionend",e)})),t.classList.add("smart-visibility-hidden")):(t.classList.add("smart-visibility-hidden"),t.classList.add("smart-hidden")),delete t.item,e._activePopupButton&&e._activePopupButton.focus(),t.controlledBy&&(t.controlledBy.removeAttribute("aria-controls"),t.controlledBy.removeAttribute("aria-expanded"))}_toHex(e){if(-1!==e.indexOf("#"))return e;const t=/rgb\((\d+), (\d+), (\d+)\)/g.exec(e);return t?"#"+(parseFloat(t[1]).toString(16).padStart(2,"0")+parseFloat(t[2]).toString(16).padStart(2,"0")+parseFloat(t[3]).toString(16).padStart(2,"0")).toUpperCase():"#FFFFFF"}_updateUI(e,t){const a=this;a.$.colorInput.value=e,a.$.colorCode.innerHTML=e,a._selectColor(e,t)}_selectColor(e,t){const a=this.$.popup,n=Array.from(this.$.colorsContainer.children);n.forEach((e=>e.classList.remove("selected"))),(t=t||n.find((t=>t.value===e)))&&t.classList.add("selected"),a[a.selection]=e}_localize(){const e=this;e._conditionsDataSource=JSON.stringify([{label:e.localize("lessThan"),value:"lessThan"},{label:e.localize("greaterThan"),value:"greaterThan"},{label:e.localize("equal"),value:"equal"},{label:e.localize("notEqual"),value:"notEqual"},{label:e.localize("between"),value:"between"}]),e.$.text.innerHTML=e.localize("text"),e.$.highlight.innerHTML=e.localize("highlight"),e.$.apply.innerHTML=e.localize("apply"),e.$.cancel.innerHTML=e.localize("cancel"),e.$.addNewButton.title=e.localize("add")}_setFocusable(){const e=this,t=!e.disabled&&!e.unfocusable,a=[e.$.addNewButton,e.$.text,e.$.highlight,e.$.colorsContainer];t?(a.forEach((e=>e.setAttribute("tabindex",0))),e.$.colorInput.removeAttribute("tabindex")):(a.forEach((e=>e.removeAttribute("tabindex"))),e.$.colorInput.setAttribute("tabindex",-1))}_documentDownHandler(e){const t=this,a=t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target,n=t.$.popup;n.classList.contains("smart-hidden")||n.contains(a)||a.classList.contains("popup-button")||(delete t._activePopupButton,t._closePopup())}}),Smart("smart-data-view",class extends Smart.BaseElement{static get properties(){return{addNewButton:{value:!1,type:"boolean"},allowDrag:{value:!1,type:"boolean"},collapsible:{value:!1,type:"boolean"},columns:{value:[],type:"object",reflectToAttribute:!1},dataSource:{value:null,type:"object?",reflectToAttribute:!1},dataSourceSettings:{value:{autoGenerateColumns:{value:!1,type:"boolean"},sanitizeHTML:{value:"blackList",allowedValues:["all","blackList","none"],type:"string"},root:{value:"",type:"string"},record:{value:"",type:"string"},keyDataField:{value:"",type:"string"},parentDataField:{value:"",type:"string"},childrenDataField:{value:"",type:"string"},groupBy:{value:[],type:"array"},dataFields:{value:[],type:"array"},mapChar:{value:".",type:"string"},id:{value:"",type:"string"},virtualDataSource:{value:null,type:"any"},virtualDataSourceOnExpand:{value:null,type:"any"}},type:"object"},editable:{value:!1,type:"boolean"},headerPosition:{value:"none",allowedValues:["none","top","bottom"],type:"string"},messages:{value:{en:{addFilter:"+ Add filter",and:"And",apply:"Ok",booleanFirst:"☐",booleanLast:"☑",cancel:"Cancel",CONTAINS:"contains",CONTAINS_CASE_SENSITIVE:"contains (case sensitive)",dateFirst:"1",dateLast:"9",DOES_NOT_CONTAIN:"does not contain",DOES_NOT_CONTAIN_CASE_SENSITIVE:"does not contain (case sensitive)",EMPTY:"empty",ENDS_WITH:"ends with",ENDS_WITH_CASE_SENSITIVE:"ends with (case sensitive)",EQUAL:"equal",EQUAL_CASE_SENSITIVE:"equal (case sensitive)",filter:"Filter",customize:"Customize Columns",filteredByMultiple:"{{n}} filters",filteredByOne:"1 filter",filterValuePlaceholder:"Value",find:"Find a field",findInView:"Find in view",firstBy:"Sort by",found:"{{nth}} of {{n}}",from:"from",GREATER_THAN:"greater than",GREATER_THAN_OR_EQUAL:"greater than or equal",LESS_THAN:"less than",LESS_THAN_OR_EQUAL:"less than or equal",noFilters:"No filters applied",noResults:"No results",noSorting:"No sorting applied",NOT_EMPTY:"not empty",NOT_EQUAL:"not equal",NOT_NULL:"not null",NULL:"null",numberFirst:"1",numberLast:"9",ok:"OK",or:"Or",pickAnother:"Pick another field to sort by",sort:"Sort",group:"Group",fontFamily:"Font family:",fontSize:"Font size:",format:"Format:",formatColumn:"Format Column",formating:"Conditional Formating",sortedByMultiple:"Sorted by {{n}} fields",sortedByOne:"Sorted by 1 field",STARTS_WITH:"starts with",STARTS_WITH_CASE_SENSITIVE:"starts with (case sensitive)",stringFirst:"A",stringLast:"Z",thenBy:"then by",where:"Where",collapseAll:"Collapse all",expandAll:"Expand all",noGrouping:"No grouping",groupedByMultiple:"{{n}} groups",groupedByOne:"1 group",firstByGroup:"Group by",pickAnotherGroupBy:"Pick another field to group by",add:"Add condition",all:"All columns",between:"Between",close:"Close",column:"Column:",condition:"Condition:",equal:"Equal To",greaterThan:"Greater Than",highlight:"Highlight",lessThan:"Less Than",notEqual:"Not Equal To",remove:"Remove condition",secondValue:"Second value:",text:"Text",value:"Value:",reset:"Reset"}}}}}static get listeners(){return{"header.apply":"_applyHandler","header.cancel":"closePanel","headerDropDown.transitionend":"_headerDropDownTransitionendHandler","searchInput.keyup":"_searchInputKeyupHandler",resize:"_resizeHandler","document.move":"_documentMoveHandler","document.up":"_documentUpHandler"}}render(){const e=this;e.$.headerDropDown.id||(e.$.headerDropDown.id=e.id+"HeaderDropDown"),e.setAttribute("role","group"),e._isMobile=Smart.Utilities.Core.isMobile,super.render()}addFilter(e,t="and"){const a=this;if(!Array.isArray(e)||e.length>0&&!Array.isArray(e[0]))return;let n;a.closePanel(),arguments[2]?n={filters:arguments[2],operator:t}:(n={filters:[],operator:t},e.forEach((e=>{e[1].filters.forEach((t=>{n.filters.push([e[0],t.condition,t.value])}))}))),JSON.stringify(n)!==JSON.stringify(a._appliedFiltering)&&(n.filterGroups=e,a._appliedFiltering=n,a._applyFilter(e,t),a.$.fireEvent("filter"),a._refreshFilterButton())}_refreshFilterButton(){const e=this,t=e._appliedFiltering.filters?e._appliedFiltering.filters.length:0;if(0===t)return e.$.filterButton.firstElementChild.innerHTML=e.localize("filter"),void e.$.filterButton.classList.remove("filtered");e.$.filterButton.firstElementChild.innerHTML=1===t?e.localize("filteredByOne"):e.localize("filteredByMultiple",{n:t}),e.$.filterButton.classList.add("filtered")}addSort(e,t){const a=this,n=a.dataSource,l=JSON.stringify(a._appliedSorting);let o;function i(e,l){if(a.columns.find((t=>t.dataField===e))){let a=Array.isArray(t)?t[l]:"string"==typeof t?t:"ascending";o.dataFields.push(e),o.dataTypes.push(n.dataFields.find((t=>t.name===e)).dataType),a=a&&-1!==a.indexOf("desc")?"descending":"ascending",o.orderBy.push(a)}}if(0!==arguments.length&&n&&0!==n.length){if(a.closePanel(),1===arguments.length&&"object"==typeof e)o=e;else if(o={dataFields:[],dataTypes:[],orderBy:[]},Array.isArray(e))e.forEach(i);else{if("string"!=typeof e)return;i(e,0)}a.closePanel(),a._appliedSorting=o,l!==JSON.stringify(a._appliedSorting)&&(a._applySort(),a.$.fireEvent("sort"),a._refreshSortButton())}}_refreshSortButton(){const e=this,t=e._appliedSorting.dataFields.length;if(0===t)return e.$.sortButton.firstElementChild.innerHTML=e.localize("sort"),void e.$.sortButton.classList.remove("sorted");e.$.sortButton.firstElementChild.innerHTML=1===t?e.localize("sortedByOne"):e.localize("sortedByMultiple",{n:t}),e.$.sortButton.classList.add("sorted")}closePanel(){const e=this.$.headerDropDown;e.classList.remove("open"),setTimeout((()=>{e.classList.add("smart-visibility-hidden")}),150),this._closeSearchPanel(),e.controlledBy&&(e.controlledBy.removeAttribute("aria-controls"),e.controlledBy.setAttribute("aria-expanded",!1),delete e.controlledBy)}_closeSearchPanel(){const e=this;e._searchInfo&&delete e._searchInfo}_closeDialog(){const e=this;e._editInfo&&e._editInfo.window.close()}openFormatPanel(){}openFilterPanel(e,t){const a=this,n=a.dataSource;if(!n||0===n.length&&!n.virtualDataSource||a.disabled||"none"===a.headerPosition)return;let l;a._editInfo&&a._editInfo.window.close(),a.$.headerDropDown.classList.add("filter-panel"),a.$.headerDropDown.classList.remove("customize-panel","sort-panel","search-panel","format-panel"),a.$.filter.classList.remove("smart-hidden"),a.$.customize.classList.add("smart-hidden"),a.$.sort.classList.add("smart-hidden"),a.$.format&&a.$.format.classList.add("smart-hidden"),a.$.group&&a.$.group.classList.add("smart-hidden"),a.$.search.classList.add("smart-hidden"),a._closeSearchPanel(),a._filterPartCreated?(l=a.$.filter.firstElementChild,l.set("dataSource",e),l.set("locale",a.locale),l.messages=a._innerElementMessages.multiColumnFilterPanel,l.operator=a._appliedFiltering.operator,l.editorPlaceholder=a.localize("filterValuePlaceholder"),l.set("operator",a._appliedFiltering.operator),l.set("value",a._appliedFiltering.filters),l._applyValue(),l.rightToLeft=a.rightToLeft):(l=document.createElement("smart-multi-column-filter-panel"),l.rightToLeft=a.rightToLeft,l.animation=a.animation,l.dataSource=e,l.locale=a.locale,l.messages=a._innerElementMessages.multiColumnFilterPanel,l.operator=a._appliedFiltering.operator,l.editorPlaceholder=a.localize("filterValuePlaceholder"),l.theme=a.theme,l.value=a._appliedFiltering.filters,l.editorCallback=t,a.$.filter.appendChild(l),a._filterPartCreated=!0),a._openHeaderDropDown(a.$.filterButton)}openSortPanel(e){const t=this,a=t.dataSource;if(!a||0===a.length&&!a.virtualDataSource||t.disabled||"none"===t.headerPosition)return;let n;t._closeDialog(),t.$.headerDropDown.classList.add("sort-panel"),t.$.headerDropDown.classList.remove("customize-panel","filter-panel","format-panel","search-panel"),t.$.sort.classList.remove("smart-hidden"),t.$.customize.classList.add("smart-hidden"),t.$.filter.classList.add("smart-hidden"),t.$.format&&t.$.format.classList.add("smart-hidden"),t.$.group&&t.$.group.classList.add("smart-hidden"),t.$.search.classList.add("smart-hidden"),t._closeSearchPanel(),t._sortPartCreated?(n=t.$.sort.firstElementChild,n.rightToLeft=t.rightToLeft,n.dataSource=e,n.locale=t.locale,n.messages=t._innerElementMessages.sortPanel,n.set("dataSource",e),n.propertyChangedHandler("dataSource",void 0,e)):(n=document.createElement("smart-sort-panel"),n.rightToLeft=t.rightToLeft,n.animation=t.animation,n.dataSource=e,n.locale=t.locale,n.messages=t._innerElementMessages.sortPanel,n.theme=t.theme,t.$.sort.appendChild(n),t._sortPartCreated=!0),t._openHeaderDropDown(t.$.sortButton)}removeFilter(){this.addFilter([])}removeSort(){this.addSort({dataFields:[],dataTypes:[],orderBy:[]})}_clearFilterAndSortUI(){const e=this;e._appliedFiltering={filterGroups:[],filters:[],operator:"and"},e._appliedSorting={dataFields:[],dataTypes:[],orderBy:[]},e._appliedGrouping={dataFields:[]},e.$.filterButton.classList.remove("filtered"),e.$.sortButton.classList.remove("sorted"),e.$.filterButton.firstElementChild.innerHTML=e.localize("filter"),e.$.sortButton.firstElementChild.innerHTML=e.localize("sort")}_getInnerElementMessages(){const e=this,t=e.locale,a={columnPanel:{},groupPanel:{},multiColumnFilterPanel:{},sortPanel:{},formattingPanel:{},dateTimePicker:{}};a.formattingPanel[t]={add:e.localize("add"),all:e.localize("all"),apply:e.localize("apply"),between:e.localize("between"),cancel:e.localize("cancel"),close:e.localize("close"),column:e.localize("column"),condition:e.localize("condition"),equal:e.localize("equal"),fontFamily:e.localize("fontFamily"),fontSize:e.localize("fontSize"),format:e.localize("format"),greaterThan:e.localize("greaterThan"),highlight:e.localize("highlight"),lessThan:e.localize("lessThan"),notEqual:e.localize("notEqual"),remove:e.localize("remove"),secondValue:e.localize("secondValue"),text:e.localize("text"),value:e.localize("value")},a.columnPanel[t]={apply:e.localize("apply"),cancel:e.localize("cancel"),reset:e.localize("reset"),find:e.localize("find"),noResults:e.localize("noResults")},a.groupPanel[t]={apply:e.localize("apply"),cancel:e.localize("cancel"),collapseAll:e.localize("collapseAll"),expandAll:e.localize("expandAll"),firstBy:e.localize("firstByGroup"),noGrouping:e.localize("noGrouping"),pickAnother:e.localize("pickAnotherGroupBy"),stringFirst:e.localize("stringFirst"),stringLast:e.localize("stringLast"),thenBy:e.localize("thenBy"),from:e.localize("from"),booleanFirst:e.localize("booleanFirst"),booleanLast:e.localize("booleanLast"),dateFirst:e.localize("dateFirst"),dateLast:e.localize("dateLast"),numberFirst:e.localize("numberFirst"),numberLast:e.localize("numberLast")},a.multiColumnFilterPanel[t]={addFilter:e.localize("addFilter"),and:e.localize("and"),apply:e.localize("apply"),cancel:e.localize("cancel"),CONTAINS:e.localize("CONTAINS"),CONTAINS_CASE_SENSITIVE:e.localize("CONTAINS_CASE_SENSITIVE"),DOES_NOT_CONTAIN:e.localize("DOES_NOT_CONTAIN"),DOES_NOT_CONTAIN_CASE_SENSITIVE:e.localize("DOES_NOT_CONTAIN_CASE_SENSITIVE"),EMPTY:e.localize("EMPTY"),ENDS_WITH:e.localize("ENDS_WITH"),ENDS_WITH_CASE_SENSITIVE:e.localize("ENDS_WITH_CASE_SENSITIVE"),EQUAL:e.localize("EQUAL"),EQUAL_CASE_SENSITIVE:e.localize("EQUAL_CASE_SENSITIVE"),GREATER_THAN:e.localize("GREATER_THAN"),GREATER_THAN_OR_EQUAL:e.localize("GREATER_THAN_OR_EQUAL"),LESS_THAN:e.localize("LESS_THAN"),LESS_THAN_OR_EQUAL:e.localize("LESS_THAN_OR_EQUAL"),noFilters:e.localize("noFilters"),NOT_EMPTY:e.localize("NOT_EMPTY"),NOT_EQUAL:e.localize("NOT_EQUAL"),NOT_NULL:e.localize("NOT_NULL"),NULL:e.localize("NULL"),or:e.localize("or"),STARTS_WITH:e.localize("STARTS_WITH"),STARTS_WITH_CASE_SENSITIVE:e.localize("STARTS_WITH_CASE_SENSITIVE"),where:e.localize("where")},a.sortPanel[t]={apply:e.localize("apply"),booleanFirst:e.localize("booleanFirst"),booleanLast:e.localize("booleanLast"),cancel:e.localize("cancel"),dateFirst:e.localize("dateFirst"),dateLast:e.localize("dateLast"),firstBy:e.localize("firstBy"),from:e.localize("from"),numberFirst:e.localize("numberFirst"),numberLast:e.localize("numberLast"),noSorting:e.localize("noSorting"),pickAnother:e.localize("pickAnother"),stringFirst:e.localize("stringFirst"),stringLast:e.localize("stringLast"),thenBy:e.localize("thenBy")},a.dateTimePicker[t]={now:e.localize("now"),dateTabLabel:e.localize("dateTabLabel"),timeTabLabel:e.localize("timeTabLabel")},e._innerElementMessages=a}_handleHeaderPosition(e){const t=this,a=t.headerPosition,n=t.$.header;"none"!==a?(n.classList.remove("smart-hidden"),"top"===a&&n.nextElementSibling!==e?t.$.container.insertBefore(n,e):"bottom"===a&&n.previousElementSibling!==e&&t.$.container.insertBefore(n,t.$.loadingIndicatorContainer)):n.classList.add("smart-hidden")}_headerClickHandler(e){const t=this,a=t.$.headerDropDown;function n(e,n){a.classList.contains("smart-visibility-hidden")||e.classList.contains("smart-hidden")?t[n]():t.closePanel()}if(t.$.customizeButton.contains(e))n(t.$.customize,"openCustomizePanel");else if(t.$.filterButton.contains(e))n(t.$.filter,"openFilterPanel");else if(t.$.sortButton.contains(e))n(t.$.sort,"openSortPanel");else if(t.$.formatButton&&t.$.formatButton.contains(e))n(t.$.format,"openFormatPanel");else if(e===t.$.searchButton)n(t.$.search,"_openSearchPanel");else if(t.$.groupButton&&t.$.groupButton.contains(e))n(t.$.group,"openGroupPanel");else if(e===t.$.searchClose)t.closePanel();else if(e===t.$.searchPrev||e===t.$.searchNext){const a=t._searchInfo,n=a.foundIdsArray,l=e===t.$.searchNext,o=n.length;let i;if(void 0===a.highlighted)i=l?0:o-1;else{if(1===n.length)return;{const e=n.indexOf(a.highlighted);i=l?(e+1)%o:e-1>=0?e-1:o-1}}a.highlighted=n[i],t.grid?(t.grid.highlighted=a.highlighted,t.grid.ensureVisible(a.highlighted),t.grid._recycle(!1)):t.ensureVisible&&t.ensureVisible(a.highlighted),t.$.searchLabel.innerHTML=t.localize("found",{nth:i+1,n:n.length})}}_headerDropDownTransitionendHandler(e){const t=this,a=t.$.headerDropDown;e&&("visibility"!==e.propertyName||a.classList.contains("smart-visibility-hidden"))||(a.classList.contains("search-panel")?t.$.searchInput.focus():!1===t.unfocusable&&(!t._isMobile&&a.classList.contains("customize-panel")?a.querySelector("smart-column-panel").$.find.focus():a.classList.contains("filter-panel")?a.querySelector("smart-multi-column-filter-panel").$.addFilterButton.focus():a.classList.contains("sort-panel")&&a.querySelector("smart-sort-panel").$.inputNotSorted.focus()))}_localizeHeader(){const e=this;e.$.customizeButton.firstElementChild.innerHTML=e.localize("customize"),e.$.groupButton&&(e.$.groupButton.firstElementChild.innerHTML=e.localize("group")),0===e._appliedFiltering.filters.length?e.$.filterButton.firstElementChild.innerHTML=e.localize("filter"):1===e._appliedFiltering.filters.length?e.$.filterButton.firstElementChild.innerHTML=e.localize("filteredByOne"):e.$.filterButton.firstElementChild.innerHTML=e.localize("filteredByMultiple",{n:e._appliedFiltering.filters.length}),0===e._appliedSorting.dataFields.length?e.$.sortButton.firstElementChild.innerHTML=e.localize("sort"):1===e._appliedSorting.dataFields.length?e.$.sortButton.firstElementChild.innerHTML=e.localize("sortedByOne"):e.$.sortButton.firstElementChild.innerHTML=e.localize("sortedByMultiple",{n:e._appliedSorting.dataFields.length}),e.$.formatButton&&(e.$.formatButton.firstElementChild.innerHTML=e.localize("formating")),e.$.searchInput.placeholder=e.localize("findInView")}_openHeaderDropDown(e){const t=this,a=t.$.headerDropDown;"top"===t.headerPosition?(a.style.bottom=null,a.style.top="100%"):(a.style.top=null,a.style.bottom="100%"),e!==t.$.searchButton?a.style.left=e.offsetLeft-(t.rightToLeft?a.offsetWidth-e.offsetWidth:0)+"px":a.style.left=(t.rightToLeft?e.offsetLeft:e.offsetLeft+Math.max(25,e.offsetWidth)-a.offsetWidth)+"px",a.classList.remove("smart-visibility-hidden"),a.classList.add("open"),a.controlledBy&&(a.controlledBy.removeAttribute("aria-controls"),a.controlledBy.setAttribute("aria-expanded",!1)),a.controlledBy=e,e.setAttribute("aria-controls",a.id),e.setAttribute("aria-expanded",!0),t._headerDropDownTransitionendHandler()}_searchInputKeyupHandler(){const e=this;function t(){e._searchInfo&&e.$.searchInput.value!==e._searchInfo.query&&e._search(e.$.searchInput.value)}if(clearTimeout(e._searchInputTimeout),"Enter"===event.key&&e._searchInfo.foundIdsArray&&e._searchInfo.foundIdsArray.length>1)return t(),void e._headerClickHandler(e.$.searchNext,e.$.cardContainer||e.$.body);e._searchInputTimeout=setTimeout(t,500)}});
832
832
 
833
833
  /***/ }),
834
834
 
835
835
  /***/ 8588:
836
836
  /***/ (() => {
837
837
 
838
- Smart("smart-input",class extends Smart.BaseElement{static get properties(){return{autoCompleteDelay:{value:100,type:"number"},dataSource:{type:"any",value:[],reflectToAttribute:!1},dropDownClassList:{value:[],type:"array",reflectToAttribute:!1},dropDownDataSource:{type:"any",value:[]},dropDownHeight:{type:"any",value:200},dropDownOpenMode:{allowedValues:["default","manual"],value:"default",type:"string"},dropDownWidth:{type:"any",value:null},dropDownButtonPosition:{allowedValues:["none","left","right"],value:"none",type:"string"},dropDownOpenPosition:{allowedValues:["bottom","top"],value:"bottom",type:"string"},hint:{type:"string",value:""},inputPurpose:{type:"string",value:"off"},items:{type:"number",value:8},minLength:{type:"number",value:1},name:{value:"",type:"string"},opened:{value:!1,type:"boolean"},query:{type:"string",value:""},queryMode:{allowedValues:["contains","containsIgnoreCase","doesNotContain","doesNotContainIgnoreCase","equals","equalsIgnoreCase","startsWith","startsWithIgnoreCase","endsWith","endsWithIgnoreCase"],type:"string",value:"containsIgnoreCase"},placeholder:{value:"",type:"string"},readonly:{type:"boolean",value:!1},sorted:{value:!1,type:"boolean"},sortDirection:{value:"asc",type:"string"},selectedIndex:{type:"number",value:-1},selectedValues:{value:[],type:"array"},type:{type:"string"},value:{type:"string",value:""}}}static get styleUrls(){return["smart.textbox.css"]}template(){return'<div id="inputContainer" role="presentation"><input class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' value=\'{{value::keyup}}\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","input.paste":"_pasteHandler","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}get selectedIndexes(){return this.isCompleted?[this.selectedIndex]:[]}set selectedIndexes(e){this.isCompleted&&(e&&e[0]?this.selectedIndex=e[0]:this.selectedIndex=-1)}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,o=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;o!==t&&o!==t.$.dropDownButton&&o!==t.$.input&&o!==t.$.arrow?t.$.scrollView.contains(o.shadowParent||o)?t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()):(t.opened&&(t._preventLookup=!0),"manual"===t.dropDownOpenMode||t._isPointerDown||t.close(),t._isPointerDown=!1):t._isPointerDown=!1}_focusHandler(){const e=this;e.setAttribute("focus",""),e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup?(e.$.fireEvent("focus"),delete e._preventLookup):e._lookup()}_blurHandler(){const e=this;e.opened||e.removeAttribute("focus"),e.opened||e.$.fireEvent("blur"),e._refreshSelectedIndex(),delete e._preventLookup}_pasteHandler(e){const t=this,o=t.$.input,r=o.value,n=o.selectionStart,a=o.selectionEnd;if(!e.clipboardData&&!window.clipboardData)return;const s=(e.clipboardData||window.clipboardData).getData("text");let l=r.slice(0,n)+s,i=l.length;l+=r.slice(a),e.preventDefault(),t.set("value",l),t.setAttribute("data-value",l),o.setSelectionRange(i,i),t._refreshSelectedIndex()}_refreshSelectedIndex(){const e=this;let t=e.dataSource;if(t){let o=-1;if(e.dataSource instanceof Promise)return;if("function"==typeof e.dataSource)return;"string"==typeof t&&(t=e.$.deserialize(t,"array"));for(let r=0;r<t.length;r++){let n=t[r];if("number"!=typeof n&&"boolean"!=typeof n||(n=""+n),"string"==typeof n){if(n===e.value){o=r;break}}else if(n&&n.label===e.value){o=r;break}}e.set("selectedIndex",o,!1),-1===e.selectedIndex&&(e.$.input.dataValue=null)}}selectItem(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),o)for(let r=0;r<o.length;r++){const n=o[r];if(t.set("selectedIndex",-1),t.set("value",""),t.$.input.dataValue=null,"string"==typeof n){if(n===e)return t.set("selectedIndex",r,!1),t.set("value",t.$.input.dataValue=e),void t.setAttribute("data-value",t.$.input.dataValue)}else if(n.value===e)return t.set("selectedIndex",r,!1),t.set("value",n.label),t.$.input.dataValue=e,void t.setAttribute("data-value",t.$.input.dataValue)}else t.set("value",t.$.input.dataValue=e),t.setAttribute("data-value",t.$.input.dataValue),t.set("selectedIndex",-1,!1)}getItem(e){const t=this;if(t.dataSource)for(let o=0;o<t.dataSource.length;o++){const r=t.dataSource[o];if(r.value===e)return r}return null}getSelectedItem(){const e=this;return{label:e.value,value:e.$.input.dataValue||e.value}}_refreshMenu(){const e=this;e.$.menu.classList.remove("scroll"),e.$.scrollView.computedVerticalScrollBarVisibility&&e.$.menu.classList.add("scroll")}_performSelect(){const e=this,t=e.$.menu.querySelector(".active"),o=t.getAttribute("data-label"),r=t.dataValue,n=e.value,a=e.$.input.dataValue;e.set("value",o),e.$.input.dataValue=r,e.setAttribute("data-value",r),e.set("selectedIndex",t.index),e.set("selectedValues",[e.$.input.dataValue]),e.close(),o===n&&r===a||e.$.fireEvent("change",{value:r,label:o,oldValue:a,oldLabel:n})}_open(){const e=this;if(e.opened)return;const t=window.scrollX,o=window.scrollY;let r=e.getBoundingClientRect(),n=0,a=0;if(e.timer&&clearTimeout(e.timer),e.getRootNode()&&e.getRootNode().host?e.getRootNode().host.shadowRoot.appendChild(e.$.scrollView):document.body.appendChild(e.$.scrollView),e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();n=e.left,a=e.top}e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.style.left=-3+r.left+t-n+"px",e.$.scrollView.classList.remove("open"),"bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=r.bottom+o-a+1+"px":e.$.scrollView.style.top=r.top-e.$.scrollView.offsetHeight+o-a+1+"px",e.opening=!0,e._positionTimer&&clearInterval(e._positionTimer),e._positionTimer=setInterval((()=>{const t=e.getBoundingClientRect();if(e.opening)e.opening=!1,r=t;else if(Math.abs(parseInt(t.top)-parseInt(r.top))>=10||Math.abs(parseInt(t.left)-parseInt(r.left))>=10){const o=window.scrollX,r=window.scrollY;return e.$.scrollView.style.left=-3+t.left+o-n+"px",void("bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=t.bottom+r-a+1+"px":e.$.scrollView.style.top=t.top-e.$.scrollView.offsetHeight+r-a+1+"px")}}),50),e.$.scrollView.onpointerdown=function(){e._isPointerDown=!0},requestAnimationFrame((function(){const t=e.dropDownWidth;if(e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open",""),t&&"string"==typeof t&&-1!==t.indexOf("%")){const o=parseFloat(t)/100;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",e.offsetWidth*o+"px")}else if("auto"!==t&&t)e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",parseFloat(t)+"px");else if("auto"===t){if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.$.scrollViewerContainer.classList.contains("vscroll")){const t=e.$.scrollView.offsetWidth+parseFloat(getComputedStyle(e.$.scrollView).getPropertyValue("--smart-scroll-bar-size"));e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",t+"px")}}else{e.$.menu.style.width="auto";let t=e.$.menu.offsetWidth;const o=e.$.menu.querySelectorAll("li");for(let t=0;t<o.length;t++)e._maxDropDownWidth=Math.max((o[t].firstElementChild||o[t]).offsetWidth,e._maxDropDownWidth);e.$.scrollView.computedVerticalScrollBarVisibility&&(t+=e.$.scrollView.$&&e.$.scrollView.$.verticalScrollBar?e.$.scrollView.$.verticalScrollBar.offsetWidth:30),e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",Math.max(t,e.offsetWidth-8)+"px"),e.$.menu.style.width=""}(e.shadowRoot||e.isInShadowDOM)&&e.$.scrollView._scrollView&&Smart.ScrollBar&&requestAnimationFrame((()=>{e.$.scrollView._scrollView&&e.$.scrollView._scrollView.vScrollBar.refresh()}))})),e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.set("opened",!0),e.setAttribute("aria-expanded",!0),e.$.fireEvent("open")}close(){const e=this;return!!e.opened&&(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(e.$.scrollView.remove(),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e._positionTimer&&clearInterval(e._positionTimer),e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.set("opened",!1),e.setAttribute("aria-expanded",!1),e.$.input.focus(),e.$.fireEvent("close"),!0)}refresh(){const e=this;e.$.scrollView.refresh&&e.$.scrollView.refresh(),e.close()}_lookup(e){const t=this;if(t.query=t.$.input.value,t.$.input.readonly&&(t._incrementalSearchQuery||(t._incrementalSearchQuery=""),t._incrementalSearchQuery+=e.key,t._incrementalSearchTimer&&clearTimeout(t._incrementalSearchTimer),t.query=t._incrementalSearchQuery,t._incrementalSearchTimer=setTimeout((function(){t._incrementalSearchQuery=""}),700)),t.query.length<t.minLength)return void t.close();const o=function(e){clearTimeout(t._autoCompleteTimeout),t._autoCompleteTimeout=setTimeout((()=>{const o=t.context;t.context=t,t._process(e),t.context=o}),t.autoCompleteDelay)};"function"==typeof t.dataSource?t.dataSource(t.query,o):o(t.dataSource)}_downHandler(e){const t=this;t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){const t=this;return"manual"!==t.dropDownOpenMode&&t._toggle(),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),t._isPointerDown=!0,!1}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;function t(t){e._process(t);const o=e.$.menu.querySelector(".active");if(o){const t=e.$.input.dataValue;for(let r=0;r<e.$.menu.children.length;r++){const n=e.$.menu.children[r],a=n.getAttribute("data-label"),s=n.dataValue;if(void 0!==t&&s===t||void 0===t&&a===e.$.input.value){o.classList.remove("active"),n.classList.add("active"),e._setActiveDescendant(n),e.$.input.dataValue=s,e.setAttribute("data-value",s);break}}}e.ensureVisible(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}e.dropDownDataSource&&(Array.isArray(e.dropDownDataSource)&&e.dropDownDataSource.length>0||"function"==typeof e.dropDownDataSource)?(e.query="","function"==typeof e.dropDownDataSource?e.dropDownDataSource(e.query,t):t(e.dropDownDataSource)):(e.query="","function"==typeof e.dataSource?e.dataSource(e.query,t):t(e.dataSource))}_process(e){const t=this;"string"==typeof e&&(e=t.$.deserialize(e,"array")),e=e.filter((function(e){return""===e||(t.matcher?t.matcher(e):t._matcher(e))})),e=t._sorter(e),t.sorted&&(e.sort(((e,t)=>void 0!==e.label?e.label.localeCompare(t.label):e.localeCompare(t))),"desc"===t.sortDirection&&e.reverse()),!e.length&&t.opened&&t.close(),0!==e.length&&(t.query.length>0?t._render(e.slice(0,t.items)):t._render(e),t._open(),t.$.scrollView.refresh&&t.$.scrollView.refresh(),t._refreshMenu(),t.ensureVisible())}_matcher(e){const t=this.query;switch(null===e&&(e="null"),e=""+(e=e.label||e),this.queryMode){case"startsWith":return e.startsWith(t);case"startsWithIgnoreCase":return e.toLowerCase().startsWith(t.toLowerCase());case"doesNotContain":return e.indexOf(t)<0;case"doesNotContainIgnoreCase":return e.toLowerCase().indexOf(t.toLowerCase())<0;case"contains":return e.indexOf(t)>-1;default:case"containsIgnoreCase":return~e.toLowerCase().indexOf(t.toLowerCase());case"equals":return 0===e.localeCompare(t);case"equalsIgnoreCase":return 0===e.toLowerCase().localeCompare(t.toLowerCase());case"endsWith":return e.endsWith(t);case"endsWithIgnoreCase":return e.toLowerCase().endsWith(t.toLowerCase())}}_sorter(e){const t=this;let o,r=[],n=[],a=[];if(e&&""===e[0])return e;for(;o=e.shift();){let e=o.label||o;e=""+e,e.toLowerCase().indexOf(t.query.toLowerCase())?~e.indexOf(t.query)?n.push(o):a.push(o):r.push(o)}return r.concat(n,a)}_highlighter(e){const t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),(function(e,t){return"<strong>"+t+"</strong>"}))}_render(e){const t=this;let o=0;const r=e.map((function(e){let r=e,n=e;"object"==typeof e&&(r=e.label,n=void 0!==e.value?e.value:r),r=""+r;const a=document.createElement("li"),s=document.createElement("a");if(s.href="#",a.id=t.id+"Item"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),a.setAttribute("data-label",r),a.index=o++,a.dataValue=n,"string"==typeof n?a.setAttribute("value",n):a.setAttribute("value",JSON.stringify(n)),a.setAttribute("role","option"),a.setAttribute("aria-label",r),s.innerHTML=t.highlighter?t.highlighter(r):t._highlighter(r),s.setAttribute("aria-hidden",!0),e.icon&&(s.classList.add("icon"),s.classList.add(e.icon)),e.prefix){const t=document.createElement("span");t.innerHTML=e.prefix,s.classList.add("has-prefix"),s.innerHTML=t.innerHTML+s.innerHTML}if(e.suffix){const t=document.createElement("span");t.innerHTML=e.suffix,s.classList.add("has-suffix"),s.innerHTML=s.innerHTML+t.innerHTML}return a.appendChild(s),a}));function n(){const e=t.$.menu.getElementsByClassName("active");e[0]&&e[0].classList.remove("active"),this.classList.add("active"),t._setActiveDescendant(this)}r.length>0&&(r[0].classList.add("active"),t._setActiveDescendant(r[0])),t.$.menu.innerHTML="";for(let e=0;e<r.length;e++){const o=r[e];t.$.menu.appendChild(o),o.onmouseenter=n,o.onmouseleave=function(){this.classList.remove("active"),t._setActiveDescendant(null)},o.onclick=n}}ensureVisible(){const e=this,t=e.$.menu.querySelector(".active");t&&(t.offsetTop+t.offsetHeight>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight&&(e.$.scrollView.scrollTop=t.offsetTop+t.offsetHeight),(t.offsetTop<=e.$.scrollView.scrollTop||t.offsetTop>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight)&&(e.$.scrollView.scrollTop=t.offsetTop),0===[...e.$.menu.children].indexOf(t)?e.$.scrollView.scrollTop=0:[...e.$.menu.children].indexOf(t)===e.$.menu.children.length-1&&(e.$.scrollView.scrollTop=e.$.scrollView.scrollHeight))}_next(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.nextElementSibling;o||(o=e.$.menu.firstElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_prev(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.previousElementSibling;o||(o=e.$.menu.lastElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_move(e){const t=this;if(t.opened){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),t._prev();break;case 40:e.preventDefault(),t._next()}e.stopPropagation()}}_keyDownHandler(e){const t=this;t._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode),t._oldValue=t.$.input.value,e.shiftKey||e.altKey||e.ctrlKey||t._move(e)}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey||this._move(e)}_keyUpHandler(e){const t=this;if(!e.shiftKey&&"F2"!==e.key)switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&t.open(),38===e.keyCode&&e.altKey&&t.close();break;case 9:case 13:if(!t.opened)return;t._performSelect(),e.stopPropagation(),e.preventDefault();break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault();break;default:t._lookup(e),!t.opened||e.ctrlKey||e.shiftKey||(e.stopPropagation(),e.preventDefault()),t.$.fireEvent("changing",{value:t.$.input.value,oldValue:t._oldValue}),t.$.input.dataValue=t.$.input.value,t.setAttribute("data-value",t.$.input.dataValue)}}propertyChangedHandler(e,t,o){super.propertyChangedHandler(e,t,o);const r=this;if("selectedIndex"===e)r._setSelection();else if("dataSource"===e)r._setSelection(!1);else if("dropDownClassList"===e){const e=r.$.scrollView;for(let o=0,r=t.length;o<r;o+=1)e.classList.remove(t[o]);for(let t=0,r=o.length;t<r;t+=1)e.classList.add(o[t])}else if("dropDownHeight"===e)"auto"!==r.dropDownHeight?r.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height",r.dropDownHeight+"px"):r.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height","auto");else if("opened"===e)r.opened=t,o?r.open():r.close();else if("placeholder"===e){if(r.readonly){const e=r.getAttribute("aria-label");if(e&&e!==t)return;o?r.setAttribute("aria-label",o):r.removeAttribute("aria-label")}}else if("selectedValues"===e)if(null===o)r.$.input.value="",r.$.input.dataValue=o,r.setAttribute("data-value",o),r._refreshSelectedIndex();else{const e=o.join(","),t=r.value;r.value=e,r.propertyChangedHandler("value",t,r.value)}else"value"===e?(r.displayMember!==r.valueMember&&"string"!=typeof o?(r.set("value",o[r.displayMember]),r.$.input.dataValue=o[r.valueMember],r.setAttribute("data-value",r.$.input.dataValue)):(r.$.input.value=r.$.input.dataValue=o,r.setAttribute("data-value",o)),r._refreshSelectedIndex()):"readonly"===e?(r._setAriaRelations(),r._setInputPurpose()):"theme"===e||"rightToLeft"===e?r.$.scrollView[e]=o:"inputPurpose"===e?r._setInputPurpose():"inverted"===e?o?r.$.scrollView.setAttribute("inverted",""):r.$.scrollView.removeAttribute("inverted"):"disabled"!==e&&"unfocusable"!==e||r._setFocusable()}detached(){super.detached(),this.close(),this.removeAttribute("focus")}render(){const e=this,t=e.dropDownClassList;e._createElement&&e._createElement();const o=e.$.scrollView;for(let e=0,r=t.length;e<r;e+=1)o.classList.add(t[e]);e.opened&&(e.opened=!1,e.open());const r=e.$.menu;r&&(r.setAttribute("role","presentation"),o.appendChild(r)),"auto"!==e.dropDownHeight?o.style.setProperty("--smart-input-drop-down-menu-height",e.dropDownHeight+"px"):o.style.setProperty("--smart-input-drop-down-menu-height","auto"),o.classList.add("smart-input-drop-down-menu");for(let t=0;t<e.classList.length;t++){const r=e.classList[t];"smart-element"!==r&&"smart-input"!==r&&o.classList.add(r+"-drop-down-menu")}o.id=e.id+"_"+e.tagName.toLowerCase()+"_menu_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),o.ownerElement=e,e._setAriaRelations(),e._setInputPurpose(),e._setSelection(),e.isInitialized=!0,super.render()}_setSelection(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),t.selectedIndex>=0&&o&&o.length>0){let r=o[t.selectedIndex];if("number"!=typeof r&&"boolean"!=typeof r||(r=""+r),"string"==typeof r){let e=t.$.input.dataValue,o=t.value;t.set("value",r),t.$.input.dataValue=r,t.$.input.setAttribute("data-value",r),t.selectedValues=[t.$.input.dataValue],t.isInitialized&&t.$.fireEvent("change",{value:t.value,label:t.label,oldValue:e,oldLabel:o})}else{let o=t.$.input.dataValue,n=t.value;r&&(void 0!==r.value?(t.set("value",void 0!==r.value?r.value+"":""),t.$.input.dataValue=r.value,t.$.input.setAttribute("data-value",r.value),t.selectedValues=[t.$.input.dataValue]):r.label&&(t.selectedValues=[r.value]),r.label&&t.set("value",r.label)),t.isInitialized&&!1!==e&&t.$.fireEvent("change",{value:t.$.input.dataValue,label:r.value,oldValue:o,oldLabel:n})}}}_createElement(){const e=this,t=document.createElement("ul"),o=document.createElement("smart-scroll-viewer");o.rightToLeft=e.rightToLeft,o.theme=e.theme,o.horizontalScrollBarVisibility="hidden",e.inverted?o.setAttribute("inverted",""):o.removeAttribute("inverted"),e.$.scrollView=o,e.$.menu=t,e._setFocusable(),e.$.menu.onclick=function(t){const o=t.target.closest("li");t.stopPropagation(),t.preventDefault(),e._performSelect(),o&&e.$.fireEvent("itemClick",{item:o,label:o.getAttribute("aria-label"),value:o.dataValue}),e.$.input.focus()}}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");e.readonly?(e.setAttribute("role","button"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder),e.removeAttribute("aria-readonly"),e.$.input.setAttribute("aria-hidden",!0),e.$.input.removeAttribute("aria-activedescendant"),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)):(e.setAttribute("role","combobox"),t&&t===e.placeholder&&e.removeAttribute("aria-label"),e.$.input.setAttribute("role","searchbox"),e.$.input.removeAttribute("aria-hidden",!0),e.$.dropDownButton.removeAttribute("aria-hidden")),e.setAttribute("aria-expanded",e.opened),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-owns",e.$.scrollView.id),e.$.scrollView.setAttribute("role","listbox")}_setActiveDescendant(e){const t=this;t.readonly||(e?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant"))}_setInputPurpose(){const e=this;e.readonly?e.$.input.removeAttribute("autocomplete"):e.$.input.setAttribute("autocomplete",e.inputPurpose)}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.$.input.setAttribute("tabindex",-1):e.$.input.removeAttribute("tabindex")}});
838
+ Smart("smart-input",class extends Smart.BaseElement{static get properties(){return{autoCompleteDelay:{value:100,type:"number"},dataSource:{type:"any",value:[],reflectToAttribute:!1},dropDownClassList:{value:[],type:"array",reflectToAttribute:!1},dropDownDataSource:{type:"any",value:[]},dropDownHeight:{type:"any",value:200},dropDownOpenMode:{allowedValues:["default","manual"],value:"default",type:"string"},dropDownWidth:{type:"any",value:null},dropDownButtonPosition:{allowedValues:["none","left","right"],value:"none",type:"string"},dropDownOpenPosition:{allowedValues:["bottom","top"],value:"bottom",type:"string"},hint:{type:"string",value:""},inputPurpose:{type:"string",value:"off"},items:{type:"number",value:8},minLength:{type:"number",value:1},name:{value:"",type:"string"},opened:{value:!1,type:"boolean"},query:{type:"string",value:""},queryMode:{allowedValues:["contains","containsIgnoreCase","doesNotContain","doesNotContainIgnoreCase","equals","equalsIgnoreCase","startsWith","startsWithIgnoreCase","endsWith","endsWithIgnoreCase"],type:"string",value:"containsIgnoreCase"},placeholder:{value:"",type:"string"},readonly:{type:"boolean",value:!1},sorted:{value:!1,type:"boolean"},sortDirection:{value:"asc",type:"string"},selectedIndex:{type:"number",value:-1},selectedValues:{value:[],type:"array"},type:{type:"string"},value:{type:"string",value:""}}}static get styleUrls(){return["smart.textbox.css"]}template(){return'<div id="inputContainer" role="presentation"><input class="smart-input" id=\'input\' readonly=\'[[readonly]]\' placeholder=\'[[placeholder]]\' type=\'[[type]]\' name=\'[[name]]\' value=\'{{value::keyup}}\' disabled=\'[[disabled]]\' aria-label="[[placeholder]]" /><span class="smart-hidden smart-hint" id="span">[[hint]]</span><div id="dropDownButton" tabindex=-1 class="smart-drop-down-button" role="button" aria-label="Toggle popup"><div id="arrow" class="arrow" aria-hidden="true"></div></div></div>'}static get listeners(){return{"input.focus":"_focusHandler","input.blur":"_blurHandler","input.keydown":"_keyDownHandler","input.keyup":"_keyUpHandler","input.keypress":"_keyPressHandler","input.paste":"_pasteHandler","dropDownButton.down":"_dropDownButtonDownHandler","inputContainer.down":"_downHandler","document.up":"_documentUpHandler"}}get selectedIndexes(){return this.isCompleted?[this.selectedIndex]:[]}set selectedIndexes(e){this.isCompleted&&(e&&void 0!==e[0]?this.selectedIndex=e[0]:this.selectedIndex=-1)}focus(){this.$.input.focus()}select(){const e=this;e.readonly?e.$.input.focus():e.$.input.select()}_documentUpHandler(e){const t=this,o=t.shadowRoot||t.isInShadowDOM?e.originalEvent.composedPath()[0]:e.originalEvent.target;o!==t&&o!==t.$.dropDownButton&&o!==t.$.input&&o!==t.$.arrow?t.$.scrollView.contains(o.shadowParent||o)?t._isPointerDown&&(t._isPointerDown=!1,t.opened&&(t._preventLookup=!0),t.$.input.focus()):(t.opened&&(t._preventLookup=!0),"manual"===t.dropDownOpenMode||t._isPointerDown||t.close(),t._isPointerDown=!1):t._isPointerDown=!1}_focusHandler(){const e=this;e.setAttribute("focus",""),e.readonly||0!==e.minLength||0!==e.$.input.value.length||e._preventLookup?(e.$.fireEvent("focus"),delete e._preventLookup):e._lookup()}_blurHandler(){const e=this;e.opened||e.removeAttribute("focus"),e.opened||e.$.fireEvent("blur"),e._refreshSelectedIndex(),delete e._preventLookup}_pasteHandler(e){const t=this,o=t.$.input,r=o.value,n=o.selectionStart,a=o.selectionEnd;if(!e.clipboardData&&!window.clipboardData)return;const s=(e.clipboardData||window.clipboardData).getData("text");let l=r.slice(0,n)+s,i=l.length;l+=r.slice(a),e.preventDefault(),t.set("value",l),t.setAttribute("data-value",l),o.setSelectionRange(i,i),t._refreshSelectedIndex()}_refreshSelectedIndex(){const e=this;let t=e.dataSource;if(t){let o=-1;if(e.dataSource instanceof Promise)return;if("function"==typeof e.dataSource)return;"string"==typeof t&&(t=e.$.deserialize(t,"array"));for(let r=0;r<t.length;r++){let n=t[r];if("number"!=typeof n&&"boolean"!=typeof n||(n=""+n),"string"==typeof n){if(n===e.value){o=r;break}}else if(n&&n.label===e.value){o=r;break}}e.set("selectedIndex",o,!1),-1===e.selectedIndex&&(e.$.input.dataValue=null)}}selectItem(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),o)for(let r=0;r<o.length;r++){const n=o[r];if(t.set("selectedIndex",-1),t.set("value",""),t.$.input.dataValue=null,"string"==typeof n){if(n===e)return t.set("selectedIndex",r,!1),t.set("value",t.$.input.dataValue=e),void t.setAttribute("data-value",t.$.input.dataValue)}else if(n.value===e)return t.set("selectedIndex",r,!1),t.set("value",n.label),t.$.input.dataValue=e,void t.setAttribute("data-value",t.$.input.dataValue)}else t.set("value",t.$.input.dataValue=e),t.setAttribute("data-value",t.$.input.dataValue),t.set("selectedIndex",-1,!1)}getItem(e){const t=this;if(t.dataSource)for(let o=0;o<t.dataSource.length;o++){const r=t.dataSource[o];if(r.value===e)return r}return null}getSelectedItem(){const e=this;return{label:e.value,value:e.$.input.dataValue||e.value}}_refreshMenu(){const e=this;e.$.menu.classList.remove("scroll"),e.$.scrollView.computedVerticalScrollBarVisibility&&e.$.menu.classList.add("scroll")}_performSelect(){const e=this,t=e.$.menu.querySelector(".active"),o=t.getAttribute("data-label"),r=t.dataValue,n=e.value,a=e.$.input.dataValue;e.set("value",o),e.$.input.dataValue=r,e.setAttribute("data-value",r),e.set("selectedIndex",t.index),e.set("selectedValues",[e.$.input.dataValue]),e.close(),o===n&&r===a||e.$.fireEvent("change",{value:r,label:o,oldValue:a,oldLabel:n})}_open(){const e=this;if(e.opened)return;const t=window.scrollX,o=window.scrollY;let r=e.getBoundingClientRect(),n=0,a=0;if(e.timer&&clearTimeout(e.timer),e.getRootNode()&&e.getRootNode().host?e.getRootNode().host.shadowRoot.appendChild(e.$.scrollView):document.body.appendChild(e.$.scrollView),e.setAttribute("aria-owns",e.$.scrollView.id),e.readonly||e.$.input.setAttribute("aria-controls",e.$.scrollView.id),e.$.scrollView.enableShadowDOM&&!e._importedStyle&&(e.$.scrollView.importStyle(e._getStyleUrl("smart.textbox.css")),e._importedStyle=!0),"static"!==getComputedStyle(document.body).position){const e=document.body.getBoundingClientRect();n=e.left,a=e.top}e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.style.left=-3+r.left+t-n+"px",e.$.scrollView.classList.remove("open"),"bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=r.bottom+o-a+1+"px":e.$.scrollView.style.top=r.top-e.$.scrollView.offsetHeight+o-a+1+"px",e.opening=!0,e._positionTimer&&clearInterval(e._positionTimer),e._positionTimer=setInterval((()=>{const t=e.getBoundingClientRect();if(e.opening)e.opening=!1,r=t;else if(Math.abs(parseInt(t.top)-parseInt(r.top))>=10||Math.abs(parseInt(t.left)-parseInt(r.left))>=10){const o=window.scrollX,r=window.scrollY;return e.$.scrollView.style.left=-3+t.left+o-n+"px",void("bottom"===e.dropDownOpenPosition?e.$.scrollView.style.top=t.bottom+r-a+1+"px":e.$.scrollView.style.top=t.top-e.$.scrollView.offsetHeight+r-a+1+"px")}}),50),e.$.scrollView.onpointerdown=function(){e._isPointerDown=!0},requestAnimationFrame((function(){const t=e.dropDownWidth;if(e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.$.scrollView.setAttribute("open",""),e.setAttribute("open",""),e.$.dropDownButton.setAttribute("open",""),e.$.input.setAttribute("open",""),t&&"string"==typeof t&&-1!==t.indexOf("%")){const o=parseFloat(t)/100;e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",e.offsetWidth*o+"px")}else if("auto"!==t&&t)e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",parseFloat(t)+"px");else if("auto"===t){if(e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",""),e.$.scrollView.$.scrollViewerContainer.classList.contains("vscroll")){const t=e.$.scrollView.offsetWidth+parseFloat(getComputedStyle(e.$.scrollView).getPropertyValue("--smart-scroll-bar-size"));e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",t+"px")}}else{e.$.menu.style.width="auto";let t=e.$.menu.offsetWidth;const o=e.$.menu.querySelectorAll("li");for(let t=0;t<o.length;t++)e._maxDropDownWidth=Math.max((o[t].firstElementChild||o[t]).offsetWidth,e._maxDropDownWidth);e.$.scrollView.computedVerticalScrollBarVisibility&&(t+=e.$.scrollView.$&&e.$.scrollView.$.verticalScrollBar?e.$.scrollView.$.verticalScrollBar.offsetWidth:30),e.$.scrollView.style.setProperty("--smart-input-drop-down-menu-width",Math.max(t,e.offsetWidth-8)+"px"),e.$.menu.style.width=""}(e.shadowRoot||e.isInShadowDOM)&&e.$.scrollView._scrollView&&Smart.ScrollBar&&requestAnimationFrame((()=>{e.$.scrollView._scrollView&&e.$.scrollView._scrollView.vScrollBar.refresh()}))})),e.$.scrollView.refresh&&e.$.scrollView.refresh(),e._refreshMenu(),e.set("opened",!0),e.setAttribute("aria-expanded",!0),e.$.fireEvent("open")}close(){const e=this;return!!e.opened&&(e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$.scrollView.parentNode&&!e.opened&&(e.$.scrollView.remove(),e.removeAttribute("aria-owns"),e.readonly||e.$.input.removeAttribute("aria-controls"))}),1e3),e._positionTimer&&clearInterval(e._positionTimer),e.$.scrollView.removeAttribute("open"),e.$.dropDownButton.removeAttribute("open"),e.$.input.removeAttribute("open"),e.removeAttribute("open"),e.set("opened",!1),e.setAttribute("aria-expanded",!1),e.$.input.focus(),e.$.fireEvent("close"),!0)}refresh(){const e=this;e.$.scrollView.refresh&&e.$.scrollView.refresh(),e.close()}_lookup(e){const t=this;if(t.query=t.$.input.value,t.$.input.readonly&&(t._incrementalSearchQuery||(t._incrementalSearchQuery=""),t._incrementalSearchQuery+=e.key,t._incrementalSearchTimer&&clearTimeout(t._incrementalSearchTimer),t.query=t._incrementalSearchQuery,t._incrementalSearchTimer=setTimeout((function(){t._incrementalSearchQuery=""}),700)),t.query.length<t.minLength)return void t.close();const o=function(e){clearTimeout(t._autoCompleteTimeout),t._autoCompleteTimeout=setTimeout((()=>{const o=t.context;t.context=t,t._process(e),t.context=o}),t.autoCompleteDelay)};"function"==typeof t.dataSource?t.dataSource(t.query,o):o(t.dataSource)}_downHandler(e){const t=this;t.readonly&&t._dropDownButtonDownHandler(e)}_dropDownButtonDownHandler(e){const t=this;return"manual"!==t.dropDownOpenMode&&t._toggle(),e.preventDefault(),e.stopPropagation(),e.originalEvent.preventDefault(),e.originalEvent.stopPropagation(),t._isPointerDown=!0,!1}_toggle(){const e=this;e.opened?e.close():e.open()}open(){const e=this;function t(t){e._process(t);const o=e.$.menu.querySelector(".active");if(o){const t=e.$.input.dataValue;for(let r=0;r<e.$.menu.children.length;r++){const n=e.$.menu.children[r],a=n.getAttribute("data-label"),s=n.dataValue;if(void 0!==t&&s===t||void 0===t&&a===e.$.input.value){o.classList.remove("active"),n.classList.add("active"),e._setActiveDescendant(n),e.$.input.dataValue=s,e.setAttribute("data-value",s);break}}}e.ensureVisible(),e.$.input.focus(),setTimeout((function(){e.$.input.focus()}),25)}e.dropDownDataSource&&(Array.isArray(e.dropDownDataSource)&&e.dropDownDataSource.length>0||"function"==typeof e.dropDownDataSource)?(e.query="","function"==typeof e.dropDownDataSource?e.dropDownDataSource(e.query,t):t(e.dropDownDataSource)):(e.query="","function"==typeof e.dataSource?e.dataSource(e.query,t):t(e.dataSource))}_process(e){const t=this;"string"==typeof e&&(e=t.$.deserialize(e,"array")),e=e.filter((function(e){return""===e||(t.matcher?t.matcher(e):t._matcher(e))})),e=t._sorter(e),t.sorted&&(e.sort(((e,t)=>void 0!==e.label?e.label.localeCompare(t.label):e.localeCompare(t))),"desc"===t.sortDirection&&e.reverse()),!e.length&&t.opened&&t.close(),0===e.length&&!0!==t.allowItemsAdd||(t.query.length>0?t._render(e.slice(0,t.items)):t._render(e),t._open(),t.$.scrollView.refresh&&t.$.scrollView.refresh(),t._refreshMenu(),t.ensureVisible())}_matcher(e){const t=this.query;switch(null===e&&(e="null"),e=""+(e=e.label||e),this.queryMode){case"startsWith":return e.startsWith(t);case"startsWithIgnoreCase":return e.toLowerCase().startsWith(t.toLowerCase());case"doesNotContain":return e.indexOf(t)<0;case"doesNotContainIgnoreCase":return e.toLowerCase().indexOf(t.toLowerCase())<0;case"contains":return e.indexOf(t)>-1;default:case"containsIgnoreCase":return~e.toLowerCase().indexOf(t.toLowerCase());case"equals":return 0===e.localeCompare(t);case"equalsIgnoreCase":return 0===e.toLowerCase().localeCompare(t.toLowerCase());case"endsWith":return e.endsWith(t);case"endsWithIgnoreCase":return e.toLowerCase().endsWith(t.toLowerCase())}}_sorter(e){const t=this;let o,r=[],n=[],a=[];if(e&&""===e[0])return e;for(;o=e.shift();){let e=o.label||o;e=""+e,e.toLowerCase().indexOf(t.query.toLowerCase())?~e.indexOf(t.query)?n.push(o):a.push(o):r.push(o)}return r.concat(n,a)}_highlighter(e){const t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),(function(e,t){return"<strong>"+t+"</strong>"}))}_render(e){const t=this;let o=0;const r=e.map((function(e){let r=e,n=e;"object"==typeof e&&(r=e.label,n=void 0!==e.value?e.value:r),r=""+r;const a=document.createElement("li"),s=document.createElement("a");if(s.href="#",a.id=t.id+"Item"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),a.setAttribute("data-label",r),a.index=o++,a.dataValue=n,"string"==typeof n?a.setAttribute("value",n):a.setAttribute("value",JSON.stringify(n)),a.setAttribute("role","option"),a.setAttribute("aria-label",r),s.innerHTML=t.highlighter?t.highlighter(r):t._highlighter(r),s.setAttribute("aria-hidden",!0),e.icon&&(s.classList.add("icon"),s.classList.add(e.icon)),e.prefix){const t=document.createElement("span");t.innerHTML=e.prefix,s.classList.add("has-prefix"),s.innerHTML=t.innerHTML+s.innerHTML}if(e.suffix){const t=document.createElement("span");t.innerHTML=e.suffix,s.classList.add("has-suffix"),s.innerHTML=s.innerHTML+t.innerHTML}return a.appendChild(s),a}));function n(){const e=t.$.menu.getElementsByClassName("active");e[0]&&e[0].classList.remove("active"),this.classList.add("active"),t._setActiveDescendant(this)}r.length>0&&(r[0].classList.add("active"),t._setActiveDescendant(r[0])),t.$.menu.innerHTML="";for(let e=0;e<r.length;e++){const o=r[e];t.$.menu.appendChild(o),o.onmouseenter=n,o.onmouseleave=function(){this.classList.remove("active"),t._setActiveDescendant(null)},o.onclick=n}}ensureVisible(){const e=this,t=e.$.menu.querySelector(".active");t&&(t.offsetTop+t.offsetHeight>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight&&(e.$.scrollView.scrollTop=t.offsetTop+t.offsetHeight),(t.offsetTop<=e.$.scrollView.scrollTop||t.offsetTop>=e.$.scrollView.scrollTop+e.$.scrollView.offsetHeight)&&(e.$.scrollView.scrollTop=t.offsetTop),0===[...e.$.menu.children].indexOf(t)?e.$.scrollView.scrollTop=0:[...e.$.menu.children].indexOf(t)===e.$.menu.children.length-1&&(e.$.scrollView.scrollTop=e.$.scrollView.scrollHeight))}_next(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.nextElementSibling;o||(o=e.$.menu.firstElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_prev(){const e=this,t=e.$.menu.querySelector(".active");if(!t){const t=e.$.menu.firstElementChild;return t.classList.add("active"),void e._setActiveDescendant(t)}t.classList.remove("active");let o=t.previousElementSibling;o||(o=e.$.menu.lastElementChild),o.classList.add("active"),e._setActiveDescendant(o),e.ensureVisible()}_move(e){const t=this;if(t.opened){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),t._prev();break;case 40:e.preventDefault(),t._next()}e.stopPropagation()}}_keyDownHandler(e){const t=this;t._suppressKeyPressRepeat=![40,38,9,13,27,16,17,18].includes(e.keyCode),t._oldValue=t.$.input.value,e.shiftKey||e.altKey||e.ctrlKey||t._move(e)}_keyPressHandler(e){this._suppressKeyPressRepeat||e.shiftKey||e.altKey||e.ctrlKey||this._move(e)}_keyUpHandler(e){const t=this;if(!e.shiftKey&&"F2"!==e.key)switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:40===e.keyCode&&e.altKey&&t.open(),38===e.keyCode&&e.altKey&&t.close();break;case 9:case 13:if(!t.opened)return;t._performSelect(),e.stopPropagation(),e.preventDefault();break;case 27:if(!t.opened)return;t.close(),e.stopPropagation(),e.preventDefault();break;default:t._lookup(e),!t.opened||e.ctrlKey||e.shiftKey||(e.stopPropagation(),e.preventDefault()),t.$.fireEvent("changing",{value:t.$.input.value,oldValue:t._oldValue}),t.$.input.dataValue=t.$.input.value,t.setAttribute("data-value",t.$.input.dataValue)}}propertyChangedHandler(e,t,o){super.propertyChangedHandler(e,t,o);const r=this;if("selectedIndex"===e)r._setSelection();else if("dataSource"===e)r._setSelection(!1);else if("dropDownClassList"===e){const e=r.$.scrollView;for(let o=0,r=t.length;o<r;o+=1)e.classList.remove(t[o]);for(let t=0,r=o.length;t<r;t+=1)e.classList.add(o[t])}else if("dropDownHeight"===e)"auto"!==r.dropDownHeight?r.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height",r.dropDownHeight+"px"):r.$.scrollView.style.setProperty("--smart-input-drop-down-menu-height","auto");else if("opened"===e)r.opened=t,o?r.open():r.close();else if("placeholder"===e){if(r.readonly){const e=r.getAttribute("aria-label");if(e&&e!==t)return;o?r.setAttribute("aria-label",o):r.removeAttribute("aria-label")}}else if("selectedValues"===e)if(null===o)r.$.input.value="",r.$.input.dataValue=o,r.setAttribute("data-value",o),r._refreshSelectedIndex();else{const e=o.join(","),t=r.value;r.value=e,r.propertyChangedHandler("value",t,r.value)}else"value"===e?(r.displayMember!==r.valueMember&&"string"!=typeof o?(r.set("value",o[r.displayMember]),r.$.input.dataValue=o[r.valueMember],r.setAttribute("data-value",r.$.input.dataValue)):(r.$.input.value=r.$.input.dataValue=o,r.setAttribute("data-value",o)),r._refreshSelectedIndex()):"readonly"===e?(r._setAriaRelations(),r._setInputPurpose()):"theme"===e||"rightToLeft"===e?r.$.scrollView[e]=o:"inputPurpose"===e?r._setInputPurpose():"inverted"===e?o?r.$.scrollView.setAttribute("inverted",""):r.$.scrollView.removeAttribute("inverted"):"disabled"!==e&&"unfocusable"!==e||r._setFocusable()}detached(){super.detached(),this.close(),this.removeAttribute("focus")}render(){const e=this,t=e.dropDownClassList;e._createElement&&e._createElement();const o=e.$.scrollView;for(let e=0,r=t.length;e<r;e+=1)o.classList.add(t[e]);e.opened&&(e.opened=!1,e.open());const r=e.$.menu;r&&(r.setAttribute("role","presentation"),o.appendChild(r)),"auto"!==e.dropDownHeight?o.style.setProperty("--smart-input-drop-down-menu-height",e.dropDownHeight+"px"):o.style.setProperty("--smart-input-drop-down-menu-height","auto"),o.classList.add("smart-input-drop-down-menu");for(let t=0;t<e.classList.length;t++){const r=e.classList[t];"smart-element"!==r&&"smart-input"!==r&&o.classList.add(r+"-drop-down-menu")}o.id=e.id+"_"+e.tagName.toLowerCase()+"_menu_"+Math.floor(65536*(1+Math.random())).toString(16).substring(1),o.ownerElement=e,e._setAriaRelations(),e._setInputPurpose(),e._setSelection(),e.isInitialized=!0,super.render()}_setSelection(e){const t=this;let o=t.dataSource;if("string"==typeof o&&(o=t.$.deserialize(o,"array")),t.selectedIndex>=0&&o&&o.length>0){let r=o[t.selectedIndex];if("number"!=typeof r&&"boolean"!=typeof r||(r=""+r),"string"==typeof r){let e=t.$.input.dataValue,o=t.value;t.set("value",r),t.$.input.dataValue=r,t.$.input.setAttribute("data-value",r),t.selectedValues=[t.$.input.dataValue],t.isInitialized&&t.$.fireEvent("change",{value:t.value,label:t.label,oldValue:e,oldLabel:o})}else{let o=t.$.input.dataValue,n=t.value;r&&(void 0!==r.value?(t.set("value",void 0!==r.value?r.value+"":""),t.$.input.dataValue=r.value,t.$.input.setAttribute("data-value",r.value),t.selectedValues=[t.$.input.dataValue]):r.label&&(t.selectedValues=[r.value]),r.label&&t.set("value",r.label)),t.isInitialized&&!1!==e&&t.$.fireEvent("change",{value:t.$.input.dataValue,label:r.value,oldValue:o,oldLabel:n})}}}_createElement(){const e=this,t=document.createElement("ul"),o=document.createElement("smart-scroll-viewer");o.rightToLeft=e.rightToLeft,o.theme=e.theme,o.horizontalScrollBarVisibility="hidden",e.inverted?o.setAttribute("inverted",""):o.removeAttribute("inverted"),e.$.scrollView=o,e.$.menu=t,e._setFocusable(),e.$.menu.onclick=function(t){const o=t.target.closest("li");t.stopPropagation(),t.preventDefault(),e._performSelect(),o&&e.$.fireEvent("itemClick",{item:o,label:o.getAttribute("aria-label"),value:o.dataValue}),e.$.input.focus()}}_setAriaRelations(){const e=this,t=e.getAttribute("aria-label");e.readonly?(e.setAttribute("role","button"),!t&&e.placeholder&&e.setAttribute("aria-label",e.placeholder),e.removeAttribute("aria-readonly"),e.$.input.setAttribute("aria-hidden",!0),e.$.input.removeAttribute("aria-activedescendant"),e.$.input.removeAttribute("aria-controls"),e.$.dropDownButton.setAttribute("aria-hidden",!0)):(e.setAttribute("role","combobox"),t&&t===e.placeholder&&e.removeAttribute("aria-label"),e.$.input.setAttribute("role","searchbox"),e.$.input.removeAttribute("aria-hidden",!0),e.$.dropDownButton.removeAttribute("aria-hidden")),e.setAttribute("aria-expanded",e.opened),e.setAttribute("aria-haspopup","listbox"),e.setAttribute("aria-owns",e.$.scrollView.id),e.$.scrollView.setAttribute("role","listbox")}_setActiveDescendant(e){const t=this;t.readonly||(e?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant"))}_setInputPurpose(){const e=this;e.readonly?e.$.input.removeAttribute("autocomplete"):e.$.input.setAttribute("autocomplete",e.inputPurpose)}_setFocusable(){const e=this;e.disabled||e.unfocusable?e.$.input.setAttribute("tabindex",-1):e.$.input.removeAttribute("tabindex")}});
839
839
 
840
840
  /***/ }),
841
841
 
@@ -971,7 +971,7 @@ var __webpack_exports__ = {};
971
971
  /* harmony import */ var _smart_table_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(5523);
972
972
  /* harmony import */ var _smart_table_js__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_smart_table_js__WEBPACK_IMPORTED_MODULE_16__);
973
973
 
974
- /* Smart UI v11.0.54 (2022-01-09)
974
+ /* Smart UI v12.0.0 (2022-01-16)
975
975
  Copyright (c) 2011-2021 jQWidgets.
976
976
  License: https://htmlelements.com/license/ */ //
977
977