text: // @link https://www.dataformsjs.com
  // @author Conrad Sollitt (http://www.conradsollitt.com)
  // @license MIT
  "use strict";if(void 0===window.exports&&(window.exports=window),void 0===window.React&&void 0!==window.preact)var React=window.preact;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _classCallCheck(e,t){if(!_instanceof(e,t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.DataFormsJS=exports.SortableTable=exports.LeafletMap=exports.LazyLoad=exports.JsonData=exports.InputFilter=exports.I18n=exports.Format=exports.ErrorBoundary=exports.Cache=void 0;var cachedValues={},Cache=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"get",value:function(e,t){return void 0===cachedValues[e]?t:cachedValues[e]}},{key:"set",value:function(e,t){cachedValues[e]=t}}]),e}();exports.Cache=Cache;var ErrorBoundary=function(){function r(e){var t;return _classCallCheck(this,r),(t=_possibleConstructorReturn(this,_getPrototypeOf(r).call(this,e))).state={error:null,errorInfo:null},t}return _inherits(r,React.Component),_createClass(r,[{key:"componentDidCatch",value:function(e,t){this.setState({error:e,errorInfo:t})}},{key:"render",value:function(){return this.state.errorInfo?React.createElement("div",null,React.createElement("h2",{style:{textAlign:"left",color:"white",backgroundColor:"#bc0000",padding:"1em"}},"An error has occurred"),React.createElement("details",{style:{whiteSpace:"pre-wrap",textAlign:"left",color:"white",backgroundColor:"red",padding:"1em"}},this.state.error&&this.state.error.toString(),React.createElement("br",null),this.state.errorInfo.componentStack)):this.props.children}}]),r}();exports.ErrorBoundary=ErrorBoundary;var Format=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"number",value:function(e){return formatNumber(e,{})}},{key:"currency",value:function(e,t){return formatNumber(e,{style:"currency",currency:t,maximumFractionDigits:2})}},{key:"percent",value:function(e,t){var r=1<arguments.length&&void 0!==t?t:0;return formatNumber(e,{style:"percent",maximumFractionDigits:r,minimumFractionDigits:r})}},{key:"date",value:function(e){return formatDateTime(e,{})}},{key:"dateTime",value:function(e){return formatDateTime(e,{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})}},{key:"time",value:function(e){return formatDateTime(e,{hour:"numeric",minute:"numeric",second:"numeric"})}}]),e}();function isNumber(e){return!isNaN(parseFloat(e))&&isFinite(e)}function formatDateTime(t,r){if(void 0===window.Intl)return t;try{if(_instanceof(t,Date))return new Intl.DateTimeFormat(navigator.language,r).format(t);var e=new Date(t);return new Intl.DateTimeFormat(navigator.language,r).format(e)}catch(e){return console.warn("Error formatting Date/Time Value:"),console.log(navigator.language),console.log(r),console.log(t),console.log(e),"Error"}}function formatNumber(t,r){var e,n,a,o,s,i=null,l=null,u=null;if(s=navigator.language?navigator.language:navigator.userLanguage,null===t||""===t)return null;if(!isNumber(t))return console.warn("Warning value specified in DateFormsJS Handlebars Helper function formatNumber() is not a number:"),console.log(t),t;if(void 0===window.Intl){if(e=r.style?r.style:null,n=r.maximumFractionDigits?r.maximumFractionDigits:0,"percent"===e)return(100*t).toFixed(n)+"%";switch(s){case"en-us":i=",",l=".",u="$"}return null!==i?((a=t.toString().split("."))[0]=a[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o=a.join(l),"currency"===e?u+o:o):t}try{return new Intl.NumberFormat(s,r).format(t)}catch(e){return console.warn("Error formatting Numeric Value:"),console.log(s),console.log(r),console.log(t),console.log(e),"Error"}}exports.Format=Format;var I18n=function(){function a(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"_",n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"i18n";if(_classCallCheck(this,a),"string"!=typeof e)throw new Error("Error - I18n - Missing default locale See examples for usage.");if(!Array.isArray(t))throw new Error("Error - I18n - Missing or invalid supported locales. See examples for usage.");this.state={fileName:r,fileDir:n,defaultLocale:e,supportedLocales:t,currentLocale:null,langText:{},langCache:{},startCallback:null,loadedCallback:null},window.addEventListener("hashchange",this.onHashChange.bind(this)),this.onHashChange()}return _createClass(a,[{key:"onLangStart",value:function(e){this.state.startCallback=e}},{key:"onLangLoaded",value:function(e){this.state.loadedCallback=e}},{key:"onHashChange",value:function(){var e=this,r=this.state,t=null;if(0===window.location.hash.indexOf("#/")&&(""!==(t=window.location.hash.split("/")[1])&&-1!==r.supportedLocales.indexOf(t)||(t=null)),null===t&&(t=r.defaultLocale),r.currentLocale!==t){r.currentLocale=t,this.state.startCallback&&this.state.startCallback();var n=r.fileDir+"/"+r.fileName+"."+r.currentLocale+".json";void 0!==r.langCache[n]?(r.langText=r.langCache[n],e.updatePageTitle(),r.loadedCallback&&r.loadedCallback()):fetch(n,{mode:"cors",cache:"no-store",credentials:"same-origin"}).then(function(e){var t=e.status;if(200<=t&&t<300||304===t)return Promise.resolve(e);var r="Error loading data. Server Response Code: "+t+", Response Text: "+e.statusText;return Promise.reject(r)}).then(function(e){return e.json()}).then(function(e){r.langCache[n]=e}).catch(function(e){var t="Error Downloading I18N file: ["+n+"], Response Code Status: "+e.message;console.error(t),r.langCache[n]={}}).finally(function(){r.langText=r.langCache[n],e.updatePageTitle(),r.loadedCallback&&r.loadedCallback()})}}},{key:"updatePageTitle",value:function(){var e=document.querySelector("html title[data-i18n]");e&&(e.textContent=this.text(e.getAttribute("data-i18n"))),document.documentElement.lang=this.state.currentLocale}},{key:"text",value:function(e){return this.state.langText&&this.state.langText[e]?this.state.langText[e]:e}},{key:"currentLocale",get:function(){return this.state.currentLocale}},{key:"getUserDefaultLang",get:function(){if(navigator.languages&&navigator.languages.length&&this.state.supportedLocales&&this.state.supportedLocales.length)for(var e=0,t=navigator.languages.length;e<t;e++)if(-1!==this.state.supportedLocales.indexOf(navigator.languages[e]))return navigator.languages[e];return this.state.defaultLocale}}]),a}();exports.I18n=I18n;var InputFilter=function(){function r(e){var t;return _classCallCheck(this,r),(t=_possibleConstructorReturn(this,_getPrototypeOf(r).call(this,e))).onChange=t.onChange.bind(_assertThisInitialized(t)),t.input=React.createRef(),t}return _inherits(r,React.Component),_createClass(r,[{key:"componentDidMount",value:function(){this.filter()}},{key:"onChange",value:function(){this.filter(),"function"==typeof this.props.afterFilter&&this.props.afterFilter()}},{key:"filter",value:function(){var e=this.input.current,t=e.value.toLowerCase().split(" "),r=t.length,n=0!==r,a=0,o=null,s=null,i=document.querySelectorAll(this.props["filter-selector"]);if(1===i.length&&"TABLE"===i[0].tagName&&i[0].tHead&&1===i[0].tHead.rows.length&&1===i[0].tBodies.length){var l=i[0];o=l.getAttribute("data-sort-class-odd"),s=l.getAttribute("data-sort-class-even"),i=i[0].tBodies[0].rows}for(var u=i.length,c=s&&o,p=0,h=i.length;p<h;p++){var d=i[p],f=!0;if(n)for(var g=d.textContent.toLowerCase(),m=0;m<r;m++)if(""!==t[m]&&!g.includes(t[m])){f=!1;break}f&&(a++,c&&(a%2==0?(d.classList.add(s),d.classList.remove(o)):(d.classList.add(o),d.classList.remove(s)))),d.style.display=f?"":"none"}var v=e.getAttribute("filter-results-selector");if(v){var y=document.querySelector(v);if(!y)return void console.warn("Defined [filter-results-selector] but element not found");var b=e.getAttribute("filter-results-text-all"),C=e.getAttribute("filter-results-text-filtered");if(null===b&&null===C)return void console.warn("Defined [filter-results-selector] without [filter-results-text-all] or [filter-results-text-filtered]");var w=null;a===u?w=b:null!==C&&(w=C.replace(/{displayCount}/g,a)),null===w?y.textContent="":(w=w.replace(/{totalCount}/g,u),y.textContent=w)}}},{key:"render",value:function(){return void 0!==window&&window.React===window.preact?React.createElement("input",Object.assign({},this.props,{onInput:this.onChange,ref:this.input})):React.createElement("input",Object.assign({},this.props,{onChange:this.onChange,ref:this.input}))}}]),r}();exports.InputFilter=InputFilter;var jsonDataCache=[],graphQL_Cache={};function saveDataToCache(e,t,r,n){for(var a=0,o=jsonDataCache.length;a<o;a++){var s=jsonDataCache[a];if(s.url===e&&s.query===t)return s.params=JSON.stringify(r),void(s.data=n)}jsonDataCache.push({url:e,query:t,params:JSON.stringify(r),data:n})}function getDataFromCache(e,t,r){for(var n=0,a=jsonDataCache.length;n<a;n++){var o=jsonDataCache[n];if(o.url===e&&o.query===t){if(JSON.stringify(r)===o.params)return o.data;break}}return null}function IsLoading(e){return 0===e.fetchState&&e.children?e.children:null}function HasError(e){if(!(-1===e.fetchState)||!e.children)return null;var t=e.error;return"string"==typeof t&&-1===t.indexOf("Error")&&(t="Error - "+t),React.cloneElement(e.children,{error:t})}function IsLoaded(e){return 1===e.fetchState&&e.children?React.cloneElement(e.children,{data:e.data,params:e.params,handleChange:e.handleChange}):null}var JsonData=function(){function r(e){var t;return _classCallCheck(this,r),(t=_possibleConstructorReturn(this,_getPrototypeOf(r).call(this,e)))._isFetching=!1,t._isMounted=!1,t.fetchData=t.fetchData.bind(_assertThisInitialized(t)),t.handleChange=t.handleChange.bind(_assertThisInitialized(t)),t.state={fetchState:0,error:null,params:t.getUrlParams(),data:null},t}return _inherits(r,React.Component),_createClass(r,[{key:"getUrlParams",value:function(){var e={};if(this.props&&!0===this.props.graphQL)return void 0===this.props.variables?{}:this.props.variables;for(var t in this.props)"url"!==t&&"string"==typeof this.props[t]&&(e[t]=this.props[t]);return e}},{key:"componentDidMount",value:function(){if((this._isMounted=!0)===this.props.graphQL&&void 0===this.props.query&&void 0!==this.props.querySrc&&void 0!==graphQL_Cache[this.props.querySrc]&&(this.props.query=graphQL_Cache[this.props.querySrc]),this.props.loadOnlyOnce){var e=getDataFromCache(this.props.url,this.props.query,this.getUrlParams());if(null!==e)return void this.setState({fetchState:1,data:e})}if(!0!==this.props.graphQL||void 0!==this.props.query||void 0===this.props.querySrc)this.fetchData();else{var t=this.props.querySrc,r=this;fetch(t,null).then(function(e){var t=e.status;if(200<=t&&t<300||304===t)return Promise.resolve(e);var r="Error loading data. Server Response Code: "+t+", Response Text: "+e.statusText;return Promise.reject(r)}).then(function(e){return e.text()}).then(function(e){graphQL_Cache[t]=e,r.props.query=graphQL_Cache[t],r.fetchData()}).catch(function(e){throw new Error("Error Downloading GraphQL Script: ["+t+"], Error: "+e.toString())})}}},{key:"componentDidUpdate",value:function(e,t){var r;!0===this.props.graphQL?r=JSON.stringify(e.variables)!==JSON.stringify(this.props.variables):r=this.buildUrl(t.params)!==this.buildUrl(this.props);r&&this.setState({params:this.getUrlParams()},this.fetchData)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1}},{key:"buildUrl",value:function(e){var t=this.props.url;if(!0!==this.props.graphQL&&0<Object.keys(e).length)for(var r in e)-1<t.indexOf(":"+r)&&(t=t.replace(new RegExp(":"+r,"g"),encodeURIComponent(e[r])));return t}},{key:"fetchData",value:function(){var n=this,e=this.buildUrl(this.state.params);if(!this._isFetching){this._isFetching=!0;var t={mode:"cors",cache:"no-store",credentials:"same-origin"};if(this.props.fetchOptions&&(t=this.props.fetchOptions),this.props.fetchHeaders&&(t.headers=this.props.fetchHeaders),!0===this.props.graphQL){var r=void 0===this.props.variables?{}:this.props.variables;"file://"===window.location.origin||"null"===window.location.origin?(e+=-1===e.indexOf("?")?"?":"&",e+="query="+encodeURIComponent(this.props.query.trim()),e+="&variables="+encodeURIComponent(JSON.stringify(r))):(t.method="POST",void 0===t.headers?t.headers={"Content-Type":"application/json"}:t.headers["Content-Type"]="application/json",t.body=JSON.stringify({query:this.props.query,variables:r}))}this.setState({fetchState:0},function(){n.updateView(),fetch(e,t).then(function(e){var t=e.status;if(200<=t&&t<300||304===t)return Promise.resolve(e);var r="Error loading data. Server Response Code: "+t+", Response Text: "+e.statusText;return Promise.reject(r)}).then(function(e){return e.json()}).then(function(e){var t=!0===n.props.graphQL;if(t&&e.errors&&e.errors.length){var r;if(1===e.errors.length&&e.errors[0].message)r="[GraphQL Error]: "+e.errors[0].message;else r=("string"==typeof n.props.errorTextGraphQLErrors?n.props.errorTextGraphQLErrors:"{count} GraphQL Errors occured. See console for full details.").replace("{count}",e.errors.length);throw console.error(e.errors),r}n._isMounted&&n.setState({fetchState:1,data:t?e.data:e}),n.props.loadOnlyOnce&&saveDataToCache(n.props.url,n.props.query,n.getUrlParams(),t?e.data:e)}).catch(function(e){n._isMounted&&n.setState({fetchState:-1,error:e.toString()})}).finally(function(){n._isFetching=!1,n.updateView()})})}}},{key:"handleChange",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;this._isMounted&&this.setState({data:null===t?this.state.data:t})}},{key:"updateView",value:function(){if("function"==typeof this.props.onViewUpdated)try{this.props.onViewUpdated()}catch(e){console.error(e)}}},{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement(IsLoading,{fetchState:this.state.fetchState},this.props.isLoading),React.createElement(HasError,{fetchState:this.state.fetchState,error:this.state.error},this.props.hasError),React.createElement(IsLoaded,{fetchState:this.state.fetchState,data:this.state.data,params:this.state.params,handleChange:this.handleChange},this.props.isLoaded))}}]),r}();exports.JsonData=JsonData;var LazyLoad=function(){function r(e){var t;return _classCallCheck(this,r),(t=_possibleConstructorReturn(this,_getPrototypeOf(r).call(this,e))).state={isReady:!1},t}return _inherits(r,React.Component),_createClass(r,[{key:"componentDidMount",value:function(){var e=this;this.loadScripts(this.props.scripts,this.props.loadScriptsInOrder).then(function(){e.setState({isReady:!0})})}},{key:"loadScripts",value:function(o,e){function s(o){return new Promise(function(e){for(var t=document.querySelectorAll("link"),r=0,n=t.length;r<n;r++)if("stylesheet"===t[r].rel&&t[r].getAttribute("href")===o)return void e();var a=document.createElement("link");a.rel="stylesheet",a.onload=e,a.onerror=function(){console.error("Error loading CSS File: "+o),e()},a.href=o,document.head.appendChild(a)})}function i(o){return new Promise(function(e){for(var t=document.querySelectorAll("script"),r=0,n=t.length;r<n;r++)if(t[r].getAttribute("src")===o)return void e();var a=document.createElement("script");a.onload=e,a.onerror=function(){console.error("Error loading JS File: "+o),e()},a.src=o,document.head.appendChild(a)})}function l(o){return new Promise(function(e){for(var t=document.querySelectorAll("script[data-src][data-compiler]"),r=0,n=t.length;r<n;r++)if(t[r].getAttribute("data-src")===o)return void e();var a=document.createElement("script");a.type="text/babel",a.setAttribute("src",o),document.head.appendChild(a),jsxLoader.loadScript(a).then(function(){e()})})}if("string"==typeof o)o=[o];else if(!Array.isArray(o))return console.error("Invalid prop for <LazyLoad>, expected [scripts] to be a string or an array of strings. Check console."),console.log(o),new Promise(function(e){e()});return!0===e?new Promise(function(r){var n=0,a=o.length;!function e(){if(n!==a){var t=o[n];n++,t.endsWith(".js")?i(t).then(e):t.endsWith(".css")?s(t).then(e):t.endsWith(".jsx")?l(t).then(e):(console.error("Invalid Script for <LazyLoad>. Only scripts ending with [js, css, or jsx] can be used. Error URL: "+t),e())}else r()}()}):new Promise(function(e){for(var t=[],r=0,n=o.length;r<n;r++){var a=o[r];a.endsWith(".js")?t.push(i(a)):a.endsWith(".css")?t.push(s(a)):a.endsWith(".jsx")?t.push(l(a)):console.error("Invalid Script for <LazyLoad>. Only scripts ending with [js, css, or jsx] can be used. Error URL: "+a)}Promise.all(t).then(function(){e()})})}},{key:"loadPolyfill",value:function(e,o){return!1===e||void 0===e?new Promise(function(e,t){var r,n,a;r=e,n=t,(a=document.createElement("script")).onload=function(){r()},a.onerror=function(){console.error("Error loading Script: "+o),n()},a.src=o,document.head.appendChild(a)}):new Promise(function(e){e()})}},{key:"render",value:function(){if(!this.state.isReady)return this.props.isLoading?this.props.isLoading:null;if(this.props.children)return this.props.children;if(this.props.isLoaded){if("string"!=typeof this.props.isLoaded)return this.props.isLoaded;var e=this.props.isLoaded,t={};for(var r in this.props)this.props.hasOwnProperty(r)&&"scripts"!==r&&"isLoaded"!==r&&"isLoading"!==r&&(t[r]=this.props[r]);if(void 0!==window&&void 0!==window[e])return React.createElement(window[e],t);if(void 0!==globalThis&&void 0!==globalThis[e])return React.createElement(globalThis[e],t);throw new TypeError("Component <LazyLoad isLoaded="+JSON.stringify(e)+"> was not found. Check if your script is missing or has a compile error.")}throw new TypeError("Missing child nodes or the [isLoaded] property for a <LazyLoad> element.")}}]),r}();exports.LazyLoad=LazyLoad;var LeafletMap=function(){function r(e){var t;return _classCallCheck(this,r),(t=_possibleConstructorReturn(this,_getPrototypeOf(r).call(this,e))).div=React.createRef(),t}return _inherits(r,React.Component),_createClass(r,[{key:"componentDidMount",value:function(){for(var e=parseFloat(this.props.latitude),t=parseFloat(this.props.longitude),r=parseInt(this.props.zoom,10),n=this.props.marker,a=[{attr:"latitude",value:e},{attr:"longitude",value:t},{attr:"zoom",value:r}],o=0,s=a.length;o<s;o++)if(isNaN(a[o].value))return console.error("<LeafletMap> - Invalid Prop for ["+a[o].attr+"], value was not a number."),console.log(a[o].attr),void console.log(this.props);var i=L.map(this.div.current).setView([e,t],r);if(L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://osm.org/copyright" target="_blank">OpenStreetMap</a> contributors'}).addTo(i),null!==n){var l=L.marker([e,t]).addTo(i);n&&l.bindPopup(n),l.openPopup()}}},{key:"render",value:function(){return React.createElement("div",{className:"leaflet-map",ref:this.div})}}]),r}();exports.LeafletMap=LeafletMap;var SortableTable=function(){function r(e){var t;return _classCallCheck(this,r),(t=_possibleConstructorReturn(this,_getPrototypeOf(r).call(this,e))).sortColumn=t.sortColumn.bind(_assertThisInitialized(t)),t.table=React.createRef(),t}return _inherits(r,React.Component),_createClass(r,[{key:"componentDidMount",value:function(){this.setupTable()}},{key:"setupTable",value:function(){var e=this.table.current;if(null===e.tHead)return console.warn("Unable to setup sorting for table because there is no <thead> element"),void console.log(e);if(0===e.tHead.rows.length)return console.warn("Unable to setup sorting for table because the <thead> element contained now rows"),void console.log(e);if(0===e.tBodies.length)return console.warn("Unable to setup sorting for table because the <tbody> element is missing"),void console.log(e);if(1!==e.tBodies.length)return console.warn("Unable to setup sorting for table because there can only be one <tbody> element for the table"),void console.log(e);for(var t=e.tHead.rows[e.tHead.rows.length-1],r=0,n=t.cells.length;r<n;r++)t.cells[r].addEventListener("click",this.sortColumn),t.cells[r].style.cursor="pointer"}},{key:"sortColumn",value:function(e){var t=e.target,r=t&&t.parentElement&&t.parentElement.parentElement?t.parentElement.parentElement.parentElement:null;if("TH"!==t.tagName&&"TD"!==t.tagName)return console.warn("SortableTable.sortColumn() was called with an invalid element. If called manually the cell needs to be passed."),void console.log(t);if(null!=r&&"TABLE"!==r.tagName)return console.warn("SortableTable.sortColumn() was called with an invalid element. If called manually the table cell of the last row from the table header should be used."),void console.log(t);var n=r.getAttribute("data-sort-column"),a=t.cellIndex,o="asc";null!==n&&parseInt(n,10)===a&&(o="asc"===r.getAttribute("data-sort-order")?"desc":"asc");for(var s=r.tBodies[0],i=s.rows,l=[],u=0,c=i.length;u<c;u++){var p=i[u].cells[a];if(void 0!==p){var h=p.getAttribute("data-value"),d=null!==h?h.trim():p.textContent.trim(),f=_typeof(d);if(""===d)d=null;else if(isNaN(d)){var g=new Date(d);isNaN(g.getTime())?d=void 0!==d.toLocaleLowerCase?d.toLocaleLowerCase():d.toLowerCase():(d=g,f="date")}else d=parseFloat(d);l.push({row:i[u],value:d,type:null===d?null:f})}}l.sort(this.sortCompare),"desc"===o&&l.reverse();for(var m=r.getAttribute("data-sort-class-odd"),v=r.getAttribute("data-sort-class-even"),y=m&&v,b=0,C=0,w=l.length;C<w;C++){var L=l[C].row;y&&"none"!==L.style.display&&(++b%2==0?(L.classList.add(v),L.classList.remove(m)):(L.classList.add(m),L.classList.remove(v))),s.appendChild(L)}r.setAttribute("data-sort-column",a),r.setAttribute("data-sort-order",o)}},{key:"sortCompare",value:function(e,t){return null===e.type&&null!==t.type?-1:null===t.type&&null!==e.type?1:null===e.type&&null===t.type?0:"number"===e.type&&"number"!==t.type?-1:"number"===t.type&&"number"!==e.type?1:"number"===e.type&&"number"===t.type?e.value-t.value:"date"===e.type&&"date"!==t.type?-1:"date"===t.type&&"date"!==e.type?1:"date"===e.type&&"date"===t.type?e.value<t.value?-1:e.value>t.value?1:0:"string"===e.type&&"string"===t.type?void 0!==e.value.localeCompare?e.value.localeCompare(t.value):e.value<t.value?-1:e.value>t.value?1:0:(console.warn("A code change from [SortableTable] impacted sorting and caused an expected error so the data may appear out of order. Please review your code changes"),0)}},{key:"render",value:function(){return React.createElement("table",Object.assign({},this.props,{ref:this.table}),this.props.children)}}]),r}();exports.SortableTable=SortableTable;var DataFormsJS=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"Cache",get:function(){return Cache}},{key:"ErrorBoundary",get:function(){return ErrorBoundary}},{key:"Format",get:function(){return Format}},{key:"I18n",get:function(){return I18n}},{key:"InputFilter",get:function(){return InputFilter}},{key:"JsonData",get:function(){return JsonData}},{key:"LazyLoad",get:function(){return LazyLoad}},{key:"LeafletMap",get:function(){return LeafletMap}},{key:"SortableTable",get:function(){return SortableTable}}]),e}();exports.DataFormsJS=DataFormsJS;