UNPKG

@mescius/wijmo

Version:

UI library for pure JS, Angular, React, Vue and more...

14 lines (13 loc) 149 kB
/*! * * Wijmo Library 5.20252.44 * https://developer.mescius.com/wijmo * * Copyright(c) MESCIUS inc. All rights reserved. * * Licensed under the End-User License Agreement For MESCIUS Wijmo Software. * us.sales@mescius.com * https://developer.mescius.com/wijmo/licensing * */ "use strict";var __importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});const selfModule=__importStar(require("@mescius/wijmo"));function _ipTools(){const e={};var t="(0?\\d+|0x[a-f0-9]+)",i={fourOctet:new RegExp("^".concat(t,"\\.").concat(t,"\\.").concat(t,"\\.").concat(t,"$"),"i"),threeOctet:new RegExp("^".concat(t,"\\.").concat(t,"\\.").concat(t,"$"),"i"),twoOctet:new RegExp("^".concat(t,"\\.").concat(t,"$"),"i"),longValue:new RegExp("^".concat(t,"$"),"i")},s=new RegExp("^0[0-7]+$","i"),r=new RegExp("^0x[a-f0-9]+$","i"),n="(?:[0-9a-f]+::?)+",o={zoneIndex:new RegExp("%[0-9a-z]{1,}","i"),native:new RegExp("^(::)?(".concat(n,")?([0-9a-f]+)?(::)?(").concat("%[0-9a-z]{1,}",")?$"),"i"),deprecatedTransitional:new RegExp("^(?:::)(".concat(t,"\\.").concat(t,"\\.").concat(t,"\\.").concat(t,"(").concat("%[0-9a-z]{1,}",")?)$"),"i"),transitional:new RegExp("^((?:".concat(n,")|(?:::)(?:").concat(n,")?)").concat(t,"\\.").concat(t,"\\.").concat(t,"\\.").concat(t,"(").concat("%[0-9a-z]{1,}",")?$"),"i")};function expandIPv6(e,t){if(e.indexOf("::")!==e.lastIndexOf("::"))return null;var i,s,r=0,n=-1,a=(e.match(o.zoneIndex)||[])[0];if(a){a=a.substring(1);e=e.replace(/%.+$/,"")}for(;(n=e.indexOf(":",n+1))>=0;)r++;"::"===e.substr(0,2)&&r--;"::"===e.substr(-2,2)&&r--;if(r>t)return null;s=t-r;i=":";for(;s--;)i+="0:";":"===(e=e.replace("::",i))[0]&&(e=e.slice(1));":"===e[e.length-1]&&(e=e.slice(0,-1));return{parts:t=function(){for(var t=e.split(":"),i=[],s=0;s<t.length;s++)i.push(parseInt(t[s],16));return i}(),zoneId:a}}function matchCIDR(e,t,i,s){if(e.length!==t.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(var r,n=0;s>0;){(r=i-s)<0&&(r=0);if(e[n]>>r!=t[n]>>r)return!1;s-=i;n+=1}return!0}function parseIntAuto(e){if(r.test(e))return parseInt(e,16);if("0"===e[0]&&!isNaN(parseInt(e[1],10))){if(s.test(e))return parseInt(e,8);throw new Error("ipaddr: cannot parse ".concat(e," as octal"))}return parseInt(e,10)}function padPart(e,t){for(;e.length<t;)e="0".concat(e);return e}e.IPv4=function(){function IPv4(e){if(4!==e.length)throw new Error("ipaddr: ipv4 octet count should be 4");var t,i;for(t=0;t<e.length;t++)if(!(0<=(i=e[t])&&i<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=e}IPv4.prototype.SpecialRanges={unspecified:[[new IPv4([0,0,0,0]),8]],broadcast:[[new IPv4([255,255,255,255]),32]],multicast:[[new IPv4([224,0,0,0]),4]],linkLocal:[[new IPv4([169,254,0,0]),16]],loopback:[[new IPv4([127,0,0,0]),8]],carrierGradeNat:[[new IPv4([100,64,0,0]),10]],private:[[new IPv4([10,0,0,0]),8],[new IPv4([172,16,0,0]),12],[new IPv4([192,168,0,0]),16]],reserved:[[new IPv4([192,0,0,0]),24],[new IPv4([192,0,2,0]),24],[new IPv4([192,88,99,0]),24],[new IPv4([198,51,100,0]),24],[new IPv4([203,0,113,0]),24],[new IPv4([240,0,0,0]),4]]};IPv4.prototype.kind=function(){return"ipv4"};IPv4.prototype.match=function(e,t){var i;if(void 0===t){e=(i=e)[0];t=i[1]}if("ipv4"!==e.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return matchCIDR(this.octets,e.octets,8,t)};IPv4.prototype.prefixLengthFromSubnetMask=function(){var e,t,i,s=0,r=!1,n={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};for(e=3;e>=0;e-=1){if(!((t=this.octets[e])in n))return null;i=n[t];if(r&&0!==i)return null;8!==i&&(r=!0);s+=i}return 32-s};IPv4.prototype.range=function(){return e.subnetMatch(this,this.SpecialRanges)};IPv4.prototype.toByteArray=function(){return this.octets.slice(0)};IPv4.prototype.toIPv4MappedAddress=function(){return e.IPv6.parse("::ffff:".concat(this.toString()))};IPv4.prototype.toNormalizedString=function(){return this.toString()};IPv4.prototype.toString=function(){return this.octets.join(".")};return IPv4}();e.IPv4.broadcastAddressFromCIDR=function(e){try{for(var t=this.parseCIDR(e),i=t[0].toByteArray(),s=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),r=[],n=0;n<4;){r.push(parseInt(i[n],10)|255^parseInt(s[n],10));n++}return new this(r)}catch(e){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}};e.IPv4.isIPv4=function(e){return null!==this.parser(e)};e.IPv4.isValid=function(e){try{new this(this.parser(e));return!0}catch(e){return!1}};e.IPv4.isValidFourPartDecimal=function(t){return!(!e.IPv4.isValid(t)||!t.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))};e.IPv4.networkAddressFromCIDR=function(e){var t,i,s,r,n;try{s=(t=this.parseCIDR(e))[0].toByteArray();n=this.subnetMaskFromPrefixLength(t[1]).toByteArray();r=[];i=0;for(;i<4;){r.push(parseInt(s[i],10)&parseInt(n[i],10));i++}return new this(r)}catch(e){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}};e.IPv4.parse=function(e){var t=this.parser(e);if(null===t)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(t)};e.IPv4.parseCIDR=function(e){var t;if(t=e.match(/^(.+)\/(\d+)$/)){var i=parseInt(t[2]);if(i>=0&&i<=32){var s=[this.parse(t[1]),i];Object.defineProperty(s,"toString",{value:function value(){return this.join("/")}});return s}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")};e.IPv4.parser=function(e){var t,s,r;if(t=e.match(i.fourOctet))return function(){for(var e=t.slice(1,6),i=[],r=0;r<e.length;r++){s=e[r];i.push(parseIntAuto(s))}return i}();if(t=e.match(i.longValue)){if((r=parseIntAuto(t[1]))>4294967295||r<0)throw new Error("ipaddr: address outside defined range");return function(){var e,t=[];for(e=0;e<=24;e+=8)t.push(r>>e&255);return t}().reverse()}return(t=e.match(i.twoOctet))?function(){var e=t.slice(1,4),i=[];if((r=parseIntAuto(e[1]))>16777215||r<0)throw new Error("ipaddr: address outside defined range");i.push(parseIntAuto(e[0]));i.push(r>>16&255);i.push(r>>8&255);i.push(255&r);return i}():(t=e.match(i.threeOctet))?function(){var e=t.slice(1,5),i=[];if((r=parseIntAuto(e[2]))>65535||r<0)throw new Error("ipaddr: address outside defined range");i.push(parseIntAuto(e[0]));i.push(parseIntAuto(e[1]));i.push(r>>8&255);i.push(255&r);return i}():null};e.IPv4.subnetMaskFromPrefixLength=function(e){if((e=parseInt(e))<0||e>32)throw new Error("ipaddr: invalid IPv4 prefix length");for(var t=[0,0,0,0],i=0,s=Math.floor(e/8);i<s;){t[i]=255;i++}s<4&&(t[s]=Math.pow(2,e%8)-1<<8-e%8);return new this(t)};e.IPv6=function(){function IPv6(e,t){var i,s;if(16===e.length){this.parts=[];for(i=0;i<=14;i+=2)this.parts.push(e[i]<<8|e[i+1])}else{if(8!==e.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=e}for(i=0;i<this.parts.length;i++)if(!(0<=(s=this.parts[i])&&s<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");t&&(this.zoneId=t)}IPv6.prototype.SpecialRanges={unspecified:[new IPv6([0,0,0,0,0,0,0,0]),128],linkLocal:[new IPv6([65152,0,0,0,0,0,0,0]),10],multicast:[new IPv6([65280,0,0,0,0,0,0,0]),8],loopback:[new IPv6([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new IPv6([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new IPv6([0,0,0,0,0,65535,0,0]),96],rfc6145:[new IPv6([0,0,0,0,65535,0,0,0]),96],rfc6052:[new IPv6([100,65435,0,0,0,0,0,0]),96],"6to4":[new IPv6([8194,0,0,0,0,0,0,0]),16],teredo:[new IPv6([8193,0,0,0,0,0,0,0]),32],reserved:[[new IPv6([8193,3512,0,0,0,0,0,0]),32]]};IPv6.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()};IPv6.prototype.kind=function(){return"ipv6"};IPv6.prototype.match=function(e,t){var i;if(void 0===t){e=(i=e)[0];t=i[1]}if("ipv6"!==e.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return matchCIDR(this.parts,e.parts,16,t)};IPv6.prototype.prefixLengthFromSubnetMask=function(){for(var e,t,i=0,s=!1,r={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},n=7;n>=0;n-=1){if(!((e=this.parts[n])in r))return null;t=r[e];if(s&&0!==t)return null;16!==t&&(s=!0);i+=t}return 128-i};IPv6.prototype.range=function(){return e.subnetMatch(this,this.SpecialRanges)};IPv6.prototype.toByteArray=function(){for(var e,t=[],i=this.parts,s=0;s<i.length;s++){e=i[s];t.push(e>>8);t.push(255&e)}return t};IPv6.prototype.toFixedLengthString=function(){var e=function(){for(var e=[],t=0;t<this.parts.length;t++)e.push(padPart(this.parts[t].toString(16),4));return e}.call(this).join(":"),t="";this.zoneId&&(t="%".concat(this.zoneId));return e+t};IPv6.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");var t=this.parts.slice(-2),i=t[0],s=t[1];return new e.IPv4([i>>8,255&i,s>>8,255&s])};IPv6.prototype.toNormalizedString=function(){var e=function(){for(var e=[],t=0;t<this.parts.length;t++)e.push(this.parts[t].toString(16));return e}.call(this).join(":"),t="";this.zoneId&&(t="%".concat(this.zoneId));return e+t};IPv6.prototype.toRFC5952String=function(){for(var e,t=/((^|:)(0(:|$)){2,})/g,i=this.toNormalizedString(),s=0,r=-1;e=t.exec(i);)if(e[0].length>r){s=e.index;r=e[0].length}return r<0?i:"".concat(i.substring(0,s),"::").concat(i.substring(s+r))};IPv6.prototype.toString=function(){return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/,"::")};return IPv6}();e.IPv6.broadcastAddressFromCIDR=function(e){try{for(var t=this.parseCIDR(e),i=t[0].toByteArray(),s=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),r=[],n=0;n<16;){r.push(parseInt(i[n],10)|255^parseInt(s[n],10));n++}return new this(r)}catch(e){throw new Error("ipaddr: the address does not have IPv6 CIDR format (".concat(e,")"))}};e.IPv6.isIPv6=function(e){return null!==this.parser(e)};e.IPv6.isValid=function(e){if("string"==typeof e&&-1===e.indexOf(":"))return!1;try{var t=this.parser(e);new this(t.parts,t.zoneId);return!0}catch(e){return!1}};e.IPv6.networkAddressFromCIDR=function(e){var t,i,s,r,n;try{s=(t=this.parseCIDR(e))[0].toByteArray();n=this.subnetMaskFromPrefixLength(t[1]).toByteArray();r=[];i=0;for(;i<16;){r.push(parseInt(s[i],10)&parseInt(n[i],10));i++}return new this(r)}catch(e){throw new Error("ipaddr: the address does not have IPv6 CIDR format (".concat(e,")"))}};e.IPv6.parse=function(e){var t=this.parser(e);if(null===t.parts)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(t.parts,t.zoneId)};e.IPv6.parseCIDR=function(e){var t,i,s;if((i=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(i[2]))>=0&&t<=128){s=[this.parse(i[1]),t];Object.defineProperty(s,"toString",{value:function value(){return this.join("/")}});return s}throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")};e.IPv6.parser=function(e){var t,i,s,r,n,a;if(s=e.match(o.deprecatedTransitional))return this.parser("::ffff:".concat(s[1]));if(o.native.test(e))return expandIPv6(e,8);if(s=e.match(o.transitional)){a=s[6]||"";if((t=expandIPv6(s[1].slice(0,-1)+a,6)).parts){n=[parseInt(s[2]),parseInt(s[3]),parseInt(s[4]),parseInt(s[5])];for(i=0;i<n.length;i++)if(!(0<=(r=n[i])&&r<=255))return null;t.parts.push(n[0]<<8|n[1]);t.parts.push(n[2]<<8|n[3]);return{parts:t.parts,zoneId:t.zoneId}}}return null};e.IPv6.subnetMaskFromPrefixLength=function(e){if((e=parseInt(e))<0||e>128)throw new Error("ipaddr: invalid IPv6 prefix length");for(var t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=0,s=Math.floor(e/8);i<s;){t[i]=255;i++}s<16&&(t[s]=Math.pow(2,e%8)-1<<8-e%8);return new this(t)};e.fromByteArray=function(t){var i=t.length;if(4===i)return new e.IPv4(t);if(16===i)return new e.IPv6(t);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")};e.isValid=function(t){return e.IPv6.isValid(t)||e.IPv4.isValid(t)};e.parse=function(t){if(e.IPv6.isValid(t))return e.IPv6.parse(t);if(e.IPv4.isValid(t))return e.IPv4.parse(t);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")};e.parseCIDR=function(t){try{return e.IPv6.parseCIDR(t)}catch(i){try{return e.IPv4.parseCIDR(t)}catch(e){throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}};e.process=function(e){var t=this.parse(e);return"ipv6"===t.kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t};e.subnetMatch=function(e,t,i){var s,r,n,o;null==i&&(i="unicast");for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)){!(n=t[r])[0]||n[0]instanceof Array||(n=[n]);for(s=0;s<n.length;s++){o=n[s];if(e.kind()===o[0].kind()&&e.match.apply(e,o))return r}}return i};return e}exports.ipaddr=_ipTools();class Binding{constructor(e){this.path=e}get path(){return this._path}set path(e){this._path=e;this._parts=e?e.split("."):[];for(let e=0;e<this._parts.length;e++){let t=this._parts[e],i=t.indexOf("[");if(i>-1){this._parts[e]=t.substr(0,i);this._parts.splice(++e,0,parseInt(t.substr(i+1)))}}this._key=1==this._parts.length?this._parts[0]:null}getValue(e){if(e){if(this._key)return e[this._key];if(this._path&&this._path in e)return e[this._path];for(let t=0;t<this._parts.length&&e;t++)e=e[this._parts[t]]}return e}setValue(e,t){if(e)try{let i=this._path;if(i in e){e[i]=t;return e[i]==t}for(let t=0;t<this._parts.length-1;t++)if(null==(e=e[this._parts[t]]))return!1;i=this._parts[this._parts.length-1];e[i]=t;return e[i]==t}catch(e){return!1}return!1}}exports.Binding=Binding;class EventHandler{constructor(e,t){this.handler=e;this.self=t}}class Event{constructor(e){this._handlers=[];this._handlersChanged=e}addHandler(e,t){e=asFunction(e);this._handlers.push(new EventHandler(e,t));isFunction(this._handlersChanged)&&this._handlersChanged()}getHandler(e=0){const t=this._handlers[e];if(t)return t.handler}removeHandler(e,t){let i=!1;e=asFunction(e);for(let s=0;s<this._handlers.length;s++){let r=this._handlers[s];if(!(r.handler!=e&&null!=e||r.self!=t&&null!=t)){this._handlers.splice(s--,1);i=!0;if(e&&t)break}}i&&isFunction(this._handlersChanged)&&this._handlersChanged()}removeAllHandlers(){let e=this._handlers.length>0;this._handlers.length=0;e&&isFunction(this._handlersChanged)&&this._handlersChanged()}raise(e,t=EventArgs.empty){let i=this._handlers;for(let s=0;s<i.length;s++){let r=i[s];r.handler.call(r.self,e,t);i[s]!==r&&s--}}get hasHandlers(){return this._handlers.length>0}get handlerCount(){return this._handlers.length}}exports.Event=Event;class EventArgs{}EventArgs.empty=new EventArgs;exports.EventArgs=EventArgs;class CancelEventArgs extends EventArgs{constructor(){super(...arguments);this.cancel=!1}}exports.CancelEventArgs=CancelEventArgs;class PropertyChangedEventArgs extends EventArgs{constructor(e,t,i){super();this._name=e;this._oldVal=t;this._newVal=i}get propertyName(){return this._name}get oldValue(){return this._oldVal}get newValue(){return this._newVal}}exports.PropertyChangedEventArgs=PropertyChangedEventArgs;class RequestErrorEventArgs extends CancelEventArgs{constructor(e,t){super();this._xhr=e;this._msg=t}get request(){return this._xhr}get message(){return this._msg}set message(e){this._msg=e}}exports.RequestErrorEventArgs=RequestErrorEventArgs;var NotifyCollectionChangedAction;!function(e){e[e.Add=0]="Add";e[e.Remove=1]="Remove";e[e.Change=2]="Change";e[e.Reset=3]="Reset"}(NotifyCollectionChangedAction=exports.NotifyCollectionChangedAction||(exports.NotifyCollectionChangedAction={}));class NotifyCollectionChangedEventArgs extends EventArgs{constructor(e=NotifyCollectionChangedAction.Reset,t=null,i=-1){super();this.action=e;this.item=t;this.index=i}}NotifyCollectionChangedEventArgs.reset=new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset);exports.NotifyCollectionChangedEventArgs=NotifyCollectionChangedEventArgs;class SortDescription{constructor(e,t){this._bnd=new Binding(e);this._asc=t}get property(){return this._bnd.path}get ascending(){return this._asc}}exports.SortDescription=SortDescription;class PageChangingEventArgs extends CancelEventArgs{constructor(e){super();this.newPageIndex=e}}exports.PageChangingEventArgs=PageChangingEventArgs;class GroupDescription{groupNameFromItem(e,t){return""}namesMatch(e,t){return e===t}}exports.GroupDescription=GroupDescription;class PropertyGroupDescription extends GroupDescription{constructor(e,t){super();this._bnd=new Binding(e);this._converter=t}get propertyName(){return this._bnd.path}groupNameFromItem(e,t){return this._converter?this._converter(e,this.propertyName):this._bnd.getValue(e)}namesMatch(e,t){return e===t}}exports.PropertyGroupDescription=PropertyGroupDescription;exports.empty={};exports.ClipboardClsNames={clipboard:"wj-clipboard"};exports.ControlClsNames={content:"wj-content",hostElement:"wj-control",template:"wj-template"};exports.ControlStateClsNames={active:"wj-state-active",checked:"wj-state-checked",collapsed:"wj-state-collapsed",collapsing:"wj-state-collapsing",disabled:"wj-state-disabled",dragSrc:"wj-state-dragsrc",empty:"wj-state-empty",focus:"wj-state-focus",focused:"wj-state-focused",invalid:"wj-state-invalid",lastSelected:"wj-state-last-selected",loading:"wj-state-loading",match:"wj-state-match",exactMatchSpace:"wj-state-exact-match-space",measuring:"wj-state-measuring",multiSelected:"wj-state-multi-selected",pinned:"wj-state-pinned",readOnly:"wj-state-readonly",selected:"wj-state-selected",sticky:"wj-state-sticky",updating:"wj-state-updating",labeledInput:".wj-labeled-input",wjError:".wj-error",errorVisible:"wj-error-visible"};exports.GlyphClsNames={backward:"wj-glyph-backward",btnGlyph:"wj-btn-glyph",calendar:"wj-glyph-calendar",circle:"wj-glyph-circle",clock:"wj-glyph-clock",down:"wj-glyph-down",downLeft:"wj-glyph-down-left",drag:"wj-glyph-drag",file:"wj-glyph-file",filter:"wj-glyph-filter",forward:"wj-glyph-forward",glyph:"wj-glyph",left:"wj-glyph-left",minus:"wj-glyph-minus",plus:"wj-glyph-plus",right:"wj-glyph-right",stepBackward:"wj-glyph-step-backward",stepForward:"wj-glyph-step-forward",up:"wj-glyph-up"};exports.InputFormElementsClsNames={btn:"wj-btn",btnDefault:"wj-btn-default",btnGroup:"wj-btn-group",btnGroupVertical:"wj-btn-group-vertical",btnsOutside:"wj-btns-outside",formControl:"wj-form-control",svgBtn:"wj-svg-btn"};exports.PrintDocumentClsNames={printDocument:"wj-printdocument"};exports.TooltipClsNames={hostElement:"wj-tooltip"};exports.UtilitesClsNames={align:"wj-align",alignVCenter:"wj-align-vcenter",animated:"wj-animated",centerVert:"wj-center-vert",close:"wj-close",hide:"wj-hide",hideOk:"wj-hide-ok",remove:"wj-remove",right:"wj-right",rtl:"wj-rtl",separator:"wj-separator"};exports.ForeignClsNames={InputClsNames:{input:"wj-input",inputBtnVisible:"wj-input-btn-visible",inputGroup:"wj-input-group",inputGroupBtn:"wj-input-group-btn"},SelectorClsNames:{columnSelector:"wj-column-selector",columnSelectorGroup:"wj-column-selector-group"}};const _agent="undefined"!=typeof navigator?navigator.userAgent:"";function isMobile(){const e=_agent.toLowerCase();return["android","webos","iphone","ipad","ipod","blackberry","windows phone","mobile","mobi","tablet"].some(t=>e.includes(t))}exports.isMobile=isMobile;function isSupportTouch(){return"ontouchstart"in window||navigator.maxTouchPoints>0}exports.isSupportTouch=isSupportTouch;const _isiOS=null!=_agent.match(/iPad|iPhone|iPod/i);function isiOS(){return _isiOS}exports.isiOS=isiOS;const _isFF=null!=_agent.match(/Firefox\//);function isFirefox(){return _isFF}exports.isFirefox=isFirefox;const _isSafari=null!=_agent.match(/^((?!Chrome|Android).)*safari/i);function isSafari(){return _isSafari}exports.isSafari=isSafari;const _isEdge=null!=_agent.match(/Edge\/|Edg\//);function isEdge(){return _isEdge}exports.isEdge=isEdge;const _isIE=null!=_agent.match(/MSIE |Trident\/|Edge\//);function isIE(){return _isIE}exports.isIE=isIE;let _isIE9=!1;function isIE9(){return _isIE9}exports.isIE9=isIE9;let _isIE10=!1;function isIE10(){return _isIE10}exports.isIE10=isIE10;let _isChromiumBased=null;function isChromiumBased(){if(null!=_isChromiumBased)return _isChromiumBased;{_isChromiumBased=!1;const e="undefined"!=typeof navigator?navigator.userAgentData:null;if(e&&e.brands)for(let t of e.brands)if("Chromium"==t.brand){_isChromiumBased=!0;break}return _isChromiumBased}}exports.isChromiumBased=isChromiumBased;let _supportsPassive=!1;"undefined"!=typeof document&&document.addEventListener("test",e=>{},{get passive(){_supportsPassive=!0;return!0}});function getEventOptions(e,t){return _supportsPassive?{capture:e,passive:t}:e}exports.getEventOptions=getEventOptions;var _supportsFocusOptions=!1;"undefined"!=typeof document&&document.createElement("div").focus({get preventScroll(){_supportsFocusOptions=!0;return!0}});function supportsFocusOptions(){return _supportsFocusOptions}exports.supportsFocusOptions=supportsFocusOptions;function _startDrag(e,t){e.effectAllowed=t;isFirefox()&&e.setData("text","")}exports._startDrag=_startDrag;if("undefined"!=typeof document&&document.doctype){navigator.appVersion.indexOf("MSIE 10")>-1&&(_isIE10=!0);if(navigator.appVersion.indexOf("MSIE 9")>-1){_isIE9=!0;document.addEventListener("mousemove",e=>{if(1==e.which){let t=closest(e.target,"."+exports.ControlClsNames.hostElement);if(t&&!t.style.cursor)for(let t=e.target;t;t=t.parentElement)if(t.attributes&&t.attributes.draggable){t.dragDrop();return!1}}})}}if("undefined"!=typeof window){let e="requestAnimationFrame",t="cancelAnimationFrame";if(!window[e]){let i=0;window[e]=e=>{let t=Date.now(),s=16-(t-i),r=s>0?s:0;i=t+r;return setTimeout(()=>{e(i)},r)};window[t]=clearTimeout}if(!window.atob){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",t=new RegExp("[^"+e+"]");window.atob=i=>{let s,r,n,o,a=[],l=0,u=i.length;if(t.test(i)||/=/.test(i)&&(/=[^=]/.test(i)||/={3}/.test(i)))throw new Error("Invalid base64 data");u%4>0&&(u=(i+=Array(4-u%4+1).join("=")).length);for(;l<u;){for(r=[],o=l;l<o+4;)r.push(e.indexOf(i.charAt(l++)));s=(r[0]<<18)+(r[1]<<12)+((63&r[2])<<6)+(63&r[3]);n=[(s&255<<16)>>16,64===r[2]?-1:(65280&s)>>8,64===r[3]?-1:255&s];for(o=0;o<3;++o)(n[o]>=0||0===o)&&a.push(String.fromCharCode(n[o]))}return a.join("")};window.btoa=t=>{let i,s,r=[],n=0,o=t.length;for(;n<o;){s=[t.charCodeAt(n++),t.charCodeAt(n++),t.charCodeAt(n++)];i=(s[0]<<16)+((s[1]||0)<<8)+(s[2]||0);r.push(e.charAt((i&63<<18)>>18),e.charAt((258048&i)>>12),e.charAt(isNaN(s[1])?64:(4032&i)>>6),e.charAt(isNaN(s[2])?64:63&i))}return r.join("")}}}class _FocusService{constructor(){this._hasDoc="undefined"!=typeof Document;this._ae=this._nativeAe();let e=window,t=this._onBlur.bind(this),i=this._onFocus.bind(this);e.addEventListener("focusout",t,!0);e.addEventListener("focusin",i,!0);if(!isIE()){e.addEventListener("blur",t,!0);e.addEventListener("focus",i,!0)}}get activeElement(){let e=this._ae,t=this._nativeAe();e===_FocusService._noAe?e=this._ae=t:e!=t&&(this._isSpecialRoot(e)||document.body.contains(e)||(e=this._ae=t));return e!==_FocusService._noAe?e:null}_onBlur(e){if(e.isTrusted){let t=e.relatedTarget;this._ae=this._isSpecialRoot(t)?this._nativeAe():t}}_onFocus(e){e.isTrusted&&(this._ae=this._nativeAe())}_isSpecialRoot(e){return null==e||e===document.body||this._hasDoc&&e instanceof Document}_nativeAe(){let e;try{e="unknown"!=typeof document.activeElement?document.activeElement:_FocusService._noAe}catch(t){e=_FocusService._noAe}return e}dispose(){if(!isIE()){window.removeEventListener("blur",this._onBlur,!0);window.removeEventListener("focus",this._onFocus,!0)}window.removeEventListener("focusout",this._onBlur,!0);window.removeEventListener("focusin",this._onFocus,!0)}}_FocusService._noAe={};exports._FocusService=_FocusService;const _getProxyTarget="undefined"!=typeof window&&window.Symbol?Symbol("_getProxyTarget"):"\t_get\tProxy\tTarget\t";function _getCalculatedArray(e,t,i){let s=new WeakMap;if(!i){let t={};if(e.length){let s=e[0];for(let e in s){let i=typeof s[e];t[e]="string"==i?"":"number"==i?0:null}i=t}}return new Proxy(e,{get(e,r){if(r===_getProxyTarget)return e;if("string"==typeof r||"number"==typeof r){if("indexOf"==r)return(t,i)=>{let s=e.indexOf(t,i);s<0&&t&&(t=t[_getProxyTarget])&&(s=e.indexOf(t,i));return s};let n=parseInt(r);if(!isNaN(n)){let r=e[n];if(r&&!r[_getProxyTarget]){let e=s.get(r);if(!e){e=_createItemProxy(r,t,i);s.set(r,e)}r=e}return r}}return Reflect.get(e,r)}})}exports._getCalculatedArray=_getCalculatedArray;function _createItemProxy(e,t,i){if(!e[_getProxyTarget]){if(isIE())for(let i in t)e[i]=null;let s={get:(e,s,r)=>{if(s===_getProxyTarget)return e;if("constructor"===s)return()=>Object.assign({},i||{});let n=t[s];if(n)switch(typeof n){case"function":return n(r);case"string":return _eval(n,r)}return e[s]}};if(!isIE()){s.ownKeys=e=>Object.keys(e).concat(Object.keys(t));s.getOwnPropertyDescriptor=(e,i)=>i in t?{enumerable:!0,configurable:!0,writable:!1}:Reflect.getOwnPropertyDescriptor(e,i)}e=new Proxy(e,s)}return e}function _getTargetObject(e){return(e?e[_getProxyTarget]:null)||e}exports._getTargetObject=_getTargetObject;function _eval(e,t){let i=[t];return new Function(...["$"],"return "+e)(...i)}var Key,DataType,_VERSION="5.20252.44";class _ENV_TOOLS{}_ENV_TOOLS.isSameInstance=(e,t)=>e==t;_ENV_TOOLS.indexOf=(e,t)=>e.indexOf(t);exports._ENV_TOOLS=_ENV_TOOLS;exports._CLS_STATE_DISABLED=exports.ControlStateClsNames.disabled;function getVersion(){return _VERSION}exports.getVersion=getVersion;function setLicenseKey(e){Control._licKey=e}exports.setLicenseKey=setLicenseKey;!function(e){e[e.Back=8]="Back";e[e.Tab=9]="Tab";e[e.Enter=13]="Enter";e[e.Escape=27]="Escape";e[e.Space=32]="Space";e[e.PageUp=33]="PageUp";e[e.PageDown=34]="PageDown";e[e.End=35]="End";e[e.Home=36]="Home";e[e.Left=37]="Left";e[e.Up=38]="Up";e[e.Right=39]="Right";e[e.Down=40]="Down";e[e.Delete=46]="Delete";e[e.X=88]="X";e[e.F1=112]="F1";e[e.F2=113]="F2";e[e.F3=114]="F3";e[e.F4=115]="F4";e[e.F5=116]="F5";e[e.F6=117]="F6";e[e.F7=118]="F7";e[e.F8=119]="F8";e[e.F9=120]="F9";e[e.F10=121]="F10";e[e.F11=122]="F11";e[e.F12=123]="F12";e[e.PlusKey=107]="PlusKey";e[e.EqualPlusKey=187]="EqualPlusKey";e[e.MinusKey=109]="MinusKey";e[e.HyphenMinusKey=189]="HyphenMinusKey";e[e.S=83]="S";e[e.P=80]="P";e[e.F=70]="F"}(Key=exports.Key||(exports.Key={}));!function(e){e[e.Object=0]="Object";e[e.String=1]="String";e[e.Number=2]="Number";e[e.Boolean=3]="Boolean";e[e.Date=4]="Date";e[e.Array=5]="Array"}(DataType=exports.DataType||(exports.DataType={}));function tryCast(e,t){return null==e?null:isString(t)?isFunction(e.implementsInterface)&&e.implementsInterface(t)?e:null:e instanceof t?e:null}exports.tryCast=tryCast;function isPrimitive(e){return isString(e)||isNumber(e)||isBoolean(e)||isDate(e)}exports.isPrimitive=isPrimitive;function isString(e){return"string"==typeof e}exports.isString=isString;function isNullOrWhiteSpace(e){return!e||!/\S/.test(e)}exports.isNullOrWhiteSpace=isNullOrWhiteSpace;function isNumber(e){return"number"==typeof e}exports.isNumber=isNumber;function isInt(e){return isNumber(e)&&e==Math.round(e)}exports.isInt=isInt;function isBoolean(e){return"boolean"==typeof e}exports.isBoolean=isBoolean;function isFunction(e){return"function"==typeof e}exports.isFunction=isFunction;function isUndefined(e){return void 0===e}exports.isUndefined=isUndefined;function isNullOrUndefined(e){return null==e}exports.isNullOrUndefined=isNullOrUndefined;function isDate(e){return(e instanceof Date||"[object Date]"===Object.prototype.toString.call(e))&&!isNaN(e.getTime())}exports.isDate=isDate;function isArray(e){return e instanceof Array||Array.isArray(e)||"[object Array]"===Object.prototype.toString.call(e)}exports.isArray=isArray;function _isPlainArray(e){return Array.isArray(e)}exports._isPlainArray=_isPlainArray;function isObject(e){return null!=e&&"object"==typeof e&&!isDate(e)&&!isArray(e)}exports.isObject=isObject;function isEmpty(e){for(var t in e)return!1;return!0}exports.isEmpty=isEmpty;function _areObjectsEqual(e,t){const i=Object.entries(e),s=Object.entries(t);if(i.length!==s.length)return!1;for(const[e,s]of i)if(!t.hasOwnProperty(e)||t[e]!==s)return!1;return!0}exports._areObjectsEqual=_areObjectsEqual;function getUniqueId(e){let t=e;for(let i=0;null!=document.getElementById(t);i++)t=e+i;return t}exports.getUniqueId=getUniqueId;function getSafeUniqueId(e,t="wj",i){let s=e;s=s.trim().toLowerCase();s=s.replace(/[^a-z0-9_-]+/g,"-");s=s.replace(/-+/g,"-").replace(/^-|-$/g,"");s?/^[a-z]/.test(s)&&!i||(s=`${t}-${s}`):s=`${t}-${Date.now()}`;for(let e=0;null!=document.getElementById(s);e++)s+=e;return s}exports.getSafeUniqueId=getSafeUniqueId;function uidGenerator(){for(var e="",t="0123456789abcdef".split(""),i=0;i<32;i++){var s=Math.floor(16*Math.random());switch(i){case 8:e+="-";break;case 12:s=4;e+="-";break;case 16:s=3&s|8;e+="-";break;case 20:e+="-"}e+=t[s]}return e}exports.uidGenerator=uidGenerator;function mouseToPage(e){if(e instanceof Point)return e;e&&e.touches&&e.touches.length>0&&(e=e.touches[0]);if(isNumber(e.clientX)&&isNumber(e.clientY))return new Point(e.clientX+pageXOffset,e.clientY+pageYOffset);throw"Mouse or touch event expected."}exports.mouseToPage=mouseToPage;function getType(e){return isNumber(e)?DataType.Number:isBoolean(e)?DataType.Boolean:isDate(e)?DataType.Date:isString(e)?DataType.String:isArray(e)?DataType.Array:DataType.Object}exports.getType=getType;function getTypes(e,t=1e3){if(!e)return[];const i=e.length;(t<=0||i<t)&&(t=i);const s=[];if(t){const i=Object.keys(e[0]),r={},n=[...i];for(let i=0;i<t;i++){const t=e[i];for(let s=n.length-1;s>=0;s--){const o=n[s],a=t[o];if(isPrimitive(a)){let t=Object.getOwnPropertyDescriptor(e[i],o);r[o]={binding:o,dataType:getType(a),isReadOnly:t&&!t.writable&&!t.set};n.splice(s,1)}}if(!n.length)break}for(let e=0;e<i.length;e++){const t=r[i[e]];t&&s.push(t)}}return s}exports.getTypes=getTypes;function changeType(e,t,i,s){if(null!=e){let r=DataType;if(isString(e))switch(t){case r.Number:let t=Globalize.parseFloat(e,i);return isNaN(t)?e:t;case r.Date:let n=Globalize.parseDate(e,i,isDate(s)?s:null);n||i||!e||(n=new Date(e));return n&&isFinite(n.getTime())?n:e;case r.Boolean:switch(e.toLowerCase()){case"true":return!0;case"false":return!1}return e;case r.Array:try{let t=e.split(",").map(e=>(e=e.trim()).match(/^(\+|\-)?\d+\.?\d*$/)?e:'"'+e+'"');return JSON.parse("["+t.join(",")+"]")}catch(e){}}if(t==DataType.String)return Globalize.format(e,i)}return e}exports.changeType=changeType;function toFixed(e,t,i){if(i){let i=e.toString(),s=i.indexOf("e"),r=i.indexOf(".");if(s>-1){if("-"===i[s+1]){let n=parseFloat(i.substr(s+2)),o=i.substr(0,s);r>-1&&(o=o.substr(0,r)+o.substr(r+1));i="0."+(Array(n).join("0")+o).substr(0,t);e=parseFloat(i)}}else if(r>-1){i=i.substr(0,r+1+t);e=parseFloat(i)}}else{let i=Math.pow(10,t);e=Math.round(e*i)/i}return e}exports.toFixed=toFixed;function format(e,t,i){if((e=asString(e)).match(/\{.*"count".*:.*"when".*:.*\}/))try{let i=JSON.parse(e);if(isString(i.count)){let s=t[i.count],r=i.when;if(isNumber(s)&&isObject(r)){let t=r[s]||r.other;isString(t)&&(e=t)}}}catch(e){}return e.replace(/\{(.*?)(:(.*?))?\}/g,(e,s,r,n)=>{let o=e;if(s&&"{"!=s[0]&&t){o=new Binding(s).getValue(t);n&&(o=Globalize.format(o,n));i&&(o=i(t,s,n,o))}return null==o?"":o})}exports.format=format;function glbz(...e){let t=[],i=-1;e[0].forEach((s,r)=>{if(r>0&&r!=i){let n=e[r],o=s.match(/^:([a-z][0-9]*\b)/i)||s.match(/^:'(.+?)'/)||s.match(/^:"(.+?)"/);if(o){n=Globalize.format(n,o[1]);s=s.substr(o[0].length)}else if(":"==s&&r<e.length-1&&(isNumber(n)||isDate(n))){n=Globalize.format(n,e[r+1]);s="";i=r+1}t.push(n)}s&&t.push(s)});return t.join("")}exports.glbz=glbz;function evalTemplate(e,t){if(isIE()){let i=/:\${([^}]*)}/g,s=/\${([^}]*)}(:(([A-Za-z]\d*)|"([^"]+)"|'([^']+)'))?/g;return(e=e.replace(i,(e,i)=>":"+_evalExpression(i,t))).replace(s,(e,i,s,r,n,o,a)=>{let l=_evalExpression(i,t);return r?Globalize.format(l,n||o||a):l})}return _evalExpression(e,t)}exports.evalTemplate=evalTemplate;function _evalExpression(e,t){(t=t||{}).glbz=glbz;const i=parseTpl(e,t);return isIE()?i:glbz`${i}`}function get(e,t,i=`\${${e}}`){return e.split(".").reduce((e,t)=>null!=e&&null!=e[t]?e[t]:i,t)}function parseTpl(e,t,i){return e.replace(/\$\{.+?}/g,e=>get(e.substr(2,e.length-3).trim(),t,i))}function clamp(e,t,i){if(null!=e){null!=i&&e>i&&(e=i);null!=t&&e<t&&(e=t)}return e}exports.clamp=clamp;function copy(e,t,i=!0,s=!1){if(t)for(let r in t)if("_"!=r[0]){assert(r in e,'Unknown property "'+r+'".');let n=t[r];if(!e._copy||!e._copy(r,n)){const t=e[r];e[r]instanceof Event?isFunction(n)&&e[r].addHandler(n):!i||!isObject(n)||"undefined"!=typeof Element&&n instanceof Element||!t||!isObject(t)||Object.getPrototypeOf(t).constructor==Object.prototype.constructor&&isWritable(e,r)||"itemsSource"==r?s&&isObject(n)&&Object.getPrototypeOf(n).isPrototypeOf(Object)&&isObject(t)&&!Object.getPrototypeOf(t).isPrototypeOf(Object)?copy(t,n):e[r]=n:copy(t,n)}}return e}exports.copy=copy;function _isPlainObject(e){return isObject(e)&&Object.getPrototypeOf(e).isPrototypeOf(Object)}exports._isPlainObject=_isPlainObject;function isWritable(e,t){const i=Object.getOwnPropertyDescriptor(e,t)||Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||{};return!!i.writable||isFunction(i.set)}exports.isWritable=isWritable;function deepClone(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e)){return e.map(e=>deepClone(e))}const t={};for(const i in e)e.hasOwnProperty(i)&&(t[i]=deepClone(e[i]));return t}exports.deepClone=deepClone;function assert(e,t,i=!0){if(!e){t="** Assertion failed in Wijmo: "+t;let e=new Error;isString(e.stack)&&i&&(t+=" "+e.stack);throw t}}exports.assert=assert;function _deprecated(e,t){console.error('** WARNING: "'+e+'" has been deprecated; please use "'+t+'" instead.')}exports._deprecated=_deprecated;function _warning(e){console.error('** WARNING: "'+e)}exports._warning=_warning;function asString(e,t=!0){isUndefined(e)&&(e=null);assert(t&&null==e||isString(e),"String expected.");return e}exports.asString=asString;function asNumber(e,t=!1,i=!1){assert(t&&null==e||isNumber(e),"Number expected.");if(i&&e&&e<0)throw"Positive number expected.";return e}exports.asNumber=asNumber;function asInt(e,t=!1,i=!1){assert(t&&null==e||isInt(e),"Integer expected.");if(i&&e&&e<0)throw"Positive integer expected.";return e}exports.asInt=asInt;function asBoolean(e,t=!1){assert(t&&null==e||isBoolean(e),"Boolean expected.");return e}exports.asBoolean=asBoolean;function asDate(e,t=!1){if(isString(e)){let t=changeType(e,DataType.Date,"r");isDate(t)&&(e=t)}assert(t&&null==e||isDate(e),"Date expected.");return e}exports.asDate=asDate;function asFunction(e,t=!0){assert(t&&null==e||isFunction(e),"Function expected.");return e}exports.asFunction=asFunction;function asArray(e,t=!0){assert(t&&null==e||isArray(e),"Array expected.");return e}exports.asArray=asArray;function asType(e,t,i=!1){e=tryCast(e,t);assert(i||null!=e,t+" expected.");return e}exports.asType=asType;function asEnum(e,t,i=!1){if(null==e&&i)return null;let s=isString(e)?t[e]:e;assert(null!=s,'Invalid enum value: "'+e+'"');return isNumber(s)?s:e}exports.asEnum=asEnum;function asCollectionView(e,t=!0){if(null==e&&t)return null;let i=tryCast(e,"ICollectionView");if(null!=i)return i;isArray(e)||assert(!1,"Array or ICollectionView expected.");return new CollectionView(e)}exports.asCollectionView=asCollectionView;function hasItems(e){return null!=e&&null!=e.items&&e.items.length>0}exports.hasItems=hasItems;function toHeaderCase(e){return e&&e.length?e[0].toUpperCase()+e.substr(1).replace(/([a-z])([A-Z])/g,"$1 $2"):""}exports.toHeaderCase=toHeaderCase;function escapeHtml(e){e&&isString(e)&&(e=e.replace(/[&<>]/g,e=>_ENTITYMAP[e]));return null!=e?e.toString():""}exports.escapeHtml=escapeHtml;const _ENTITYMAP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},_specialCharsRegex=/"(.*?)"|[^\w]|_/g;function getSpecialCharsRegex(){return _specialCharsRegex}exports.getSpecialCharsRegex=getSpecialCharsRegex;function escapeRegExp(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}exports.escapeRegExp=escapeRegExp;function toPlainText(e){let t=asString(e);if(isString(t)&&t.indexOf("<")>-1){_plainText||(_plainText=document.createElement("div"));_plainText.innerHTML=t;t=_plainText.textContent}return t}exports.toPlainText=toPlainText;var _plainText;function hasClass(e,t){if(e&&t){if(e instanceof HTMLElement&&e.classList&&!isIE9())return e.classList.contains(t);if(e.getAttribute){let i=new RegExp("(\\s|^)"+t+"(\\s|$)");return e&&i.test(e.getAttribute("class"))}}return!1}exports.hasClass=hasClass;function addClass(e,t=""){if(e&&t){let i=t.trim();if(e instanceof HTMLElement&&e.classList&&!isIE9()){i.indexOf(" ")<0?e.classList.add(i):i.split(" ").forEach(t=>{t.length>0&&e.classList.add(t)});return}e.setAttribute&&i.split(" ").forEach(t=>{if(t.length>0&&!hasClass(e,t)){let i=e.getAttribute("class");e.setAttribute("class",i?i+" "+t:t)}})}}exports.addClass=addClass;function removeClass(e,t){if(e&&t){let i=t.trim();if(e instanceof HTMLElement&&e.classList&&!isIE9()){i.indexOf(" ")<0?e.classList.remove(i):i.split(" ").forEach(t=>{t.length>0&&e.classList.remove(t)});0===e.classList.length&&e.removeAttribute("class");return}e.setAttribute&&i.split(" ").forEach(t=>{if(hasClass(e,t)){let i=new RegExp("((\\s|^)"+t+"(\\s|$))","g"),s=e.getAttribute("class");s=s.replace(i," ").replace(/ +/g," ").trim();s?e.setAttribute("class",s):e.removeAttribute("class")}})}}exports.removeClass=removeClass;function toggleClass(e,t,i){null==i&&(i=!hasClass(e,t));i?addClass(e,t):removeClass(e,t)}exports.toggleClass=toggleClass;function setAttribute(e,t,i,s){e&&(null!=i?s&&e.getAttribute(t)||("style"===t.toLowerCase()&&(e instanceof HTMLElement||e instanceof SVGElement)?e.style.cssText=i.toString():e.setAttribute(t,i.toString())):e.removeAttribute(t))}exports.setAttribute=setAttribute;function setInnerHTMLSafe(e,t){t=t.replace(/\bstyle\s*=/gi,"data-wj-style=");e.innerHTML=t;const i=e.querySelectorAll("[data-wj-style]");for(let e=0;e<i.length;e++){const t=i[e],s=t.getAttribute("data-wj-style");s&&(t instanceof HTMLElement||t instanceof SVGElement)&&(t.style.cssText=s);t.removeAttribute("data-wj-style")}}exports.setInnerHTMLSafe=setInnerHTMLSafe;function setChecked(e,t){let i=null==t;e.checked=isIE()?t||i:t;e.indeterminate=i}exports.setChecked=setChecked;function setAriaLabel(e,t){setAttribute(e,"aria-label",t)}exports.setAriaLabel=setAriaLabel;function setSelectionRange(e,t,i=t,s=!0){assert(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement,"INPUT or TEXTAREA element expected");if(contains(document.body,e)&&!e.disabled&&e.offsetHeight){try{e.setSelectionRange(t,i,"backward")}catch(e){}if(s)try{e.focus();return!0}catch(e){}}return!1}exports.setSelectionRange=setSelectionRange;function disableAutoComplete(e){let t="autocomplete",i=e.getAttribute(t);i&&"on"!=i||e.setAttribute(t,"off");"autocorrect,autocapitalize,spellcheck".split(",").forEach(t=>{e.setAttribute(t,"spellcheck"==t?"false":"off")})}exports.disableAutoComplete=disableAutoComplete;function removeChild(e){return e&&e.parentNode?e.parentNode.removeChild(e):null}exports.removeChild=removeChild;function getActiveElement(){let e=document.activeElement;if(e){let t=e.shadowRoot;t&&t.activeElement&&(e=t.activeElement)}return e}exports.getActiveElement=getActiveElement;function _getActiveElement(e){let t=e;if(t){let e=t.shadowRoot;e&&e.activeElement&&(t=e.activeElement)}return t}exports._getActiveElement=_getActiveElement;function moveFocus(e,t){let i=_getFocusableElements(e,t<0),s=0;if(t){let e=i.indexOf(getActiveElement());e>-1&&(s=(e+t+i.length)%i.length)}if(s<i.length){let e=i[s];e.focus();e instanceof HTMLInputElement&&e.select();return!0}return!1}exports.moveFocus=moveFocus;function _getFocusableElements(e,t=!1){let i=[],s=Array.prototype.slice.call(e.querySelectorAll("input,select,textarea,button,a,div,label,[tabindex]")),r={};s=s.filter(e=>-1!==e.tabIndex);const isRb=e=>e instanceof HTMLInputElement&&"radio"===e.type;s.forEach(e=>{isRb(e)&&e.checked&&(r[e.name||""]=!0)});s=s.filter(e=>!isRb(e)||e.checked||!r[e.name||""]);s.sort((e,t)=>e.tabIndex===t.tabIndex?0:0===e.tabIndex?1:0===t.tabIndex?-1:e.tabIndex-t.tabIndex);for(let e=0;e<s.length;e++){let r=s[e];if(r.offsetHeight>0&&r.tabIndex>-1&&!r.disabled&&"hidden"!==window.getComputedStyle(r).visibility&&!closest(r,"[disabled],."+exports.ControlStateClsNames.disabled)){if(r instanceof HTMLAnchorElement&&!r.hasAttribute("href"))continue;if(isIE()&&!r.hasAttribute("tabindex")){if(r instanceof HTMLDivElement)continue;let e=Control.getControl(closest(r,".wj-flexgrid"));if(e&&0==e.keyActionTab)continue}if("radio"===r.type&&!r.checked&&i.length>0){let e=i[i.length-1],s=getActiveElement();if("radio"===e.type&&e.name===r.name){t&&e!=s&&(i[i.length-1]=r);continue}}(Control.getControl(r)||!_getFocusableElements(r).length||r.classList.contains("wj-detail"))&&i.push(r)}}return i}exports._getFocusableElements=_getFocusableElements;function saveFile(e,t,i="text/plain"){let s=e instanceof Blob;s||!i.match(/\bcsv\b/i)&&!t.match(/\.csv$/i)||(e="\ufeff"+e);let r=s?e:new Blob([e],{type:i});const n=navigator;if(isFunction(n.msSaveOrOpenBlob))n.msSaveOrOpenBlob(r,t);else{var o=document.createElement("a"),click=e=>{let t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null);e.dispatchEvent(t)};if("download"in o){let e=window.URL||window.webkitURL,i=e.createObjectURL(r);o.href=i;o.target="_blank";o.download=t;click(o);o=null;window.setTimeout(()=>{e.revokeObjectURL(i)},3e4)}else{let e=new FileReader;e.onloadend=()=>{o.href=e.result;o.download=t;click(o);o=null};e.readAsDataURL(r)}}}exports.saveFile=saveFile;function getElement(e){if(e instanceof Element||e&&e.appendChild&&e.appendChild instanceof Function)return e;if(isString(e))try{return document.querySelector(e)}catch(e){}return e&&e.jquery?e[0]:null}exports.getElement=getElement;function processStyleProperty(e){let t=(e=e.replace(";base64,","_wj_")).split(";"),i=[];t.forEach(e=>{let t=[];if(e.indexOf("_wj_")>-1){t=(e=e.replace("_wj_",";base64,").replace("data:image","_wjimg_")).split(":");2==t.length&&(t[1]=t[1].replace("_wjimg_","data:image"))}else t=e.split(":");i.push(t)});return i}function createElement(e,t,i){e=e.replace(/\bstyle\s*=/gi,"_wj-style=");let s=document.createElement("div");s.innerHTML=e;if(e.indexOf("_wj-style")>-1){const e=s.querySelectorAll("[_wj-style]");for(let t=0;t<e.length;t++){let i=e[t],s=i.getAttribute("_wj-style"),r=[];if(s.indexOf(";base64,")>-1)r=processStyleProperty(s);else{s.split(";").forEach(e=>{r.push(e.split(":"))})}r.forEach(e=>{2==e.length&&(i.style[e[0].trim()]=e[1].trim())});i.removeAttribute("_wj-style")}}1==s.children.length&&(s=s.children[0]);i&&setCss(s,i);t&&(t=getElement(t)).appendChild(s);return s}exports.createElement=createElement;function setText(e,t){e.textContent=t||""}exports.setText=setText;function contains(e,t,i){for(let s=t;s&&e;){if(s===e)return!0;s=(i?s[Control._OWNR_KEY]:null)||s.parentNode||s.host}return!1}exports.contains=contains;function closest(e,t){if(e){if(isFunction(e.closest))return e.closest(t);let i=e.matches||e.webkitMatchesSelector||e.msMatchesSelector||e.mozMatchesSelector;if(i)for(;e&&1===e.nodeType;e=e.parentElement||e.parentNode)if(i.call(e,t))return e}return null}exports.closest=closest;function closestClass(e,t){return closest(e,"."+t)}exports.closestClass=closestClass;function enable(e,t){let i=!t,s="disabled";toggleClass(e,exports.ControlStateClsNames.disabled,i);setAttribute(e,s,i?s:null);let r=e.querySelectorAll("input,button");for(let e=0;e<r.length;e++)setAttribute(r[e],s,i?s:null)}exports.enable=enable;function getElementRect(e){let t=e.getBoundingClientRect();return new Rect(t.left+pageXOffset,t.top+pageYOffset,t.width,t.height)}exports.getElementRect=getElementRect;function setCss(e,t){assert(isObject(t),"css parameter should be an object");if(e instanceof Array)for(let i=0;i<e.length;i++)setCss(e[i],t);else if(e&&e.style){let i=e.style;for(let e in t){let s=t[e];"number"==typeof s&&e.match(/width|height|left|top|right|bottom|size|padding|margin'/i)&&(s+="px");i[e]!==s&&(i[e]=s)}}}exports.setCss=setCss;function animate(e,t,i,s){null==t&&(t=Control._ANIM_DEF_DURATION);null==i&&(i=Control._ANIM_DEF_STEP);e=asFunction(e);t=asNumber(t,!1,!0);i=asNumber(i,!1,!0);let r,n=Date.now(),o=setInterval(()=>{let i=Math.min(1,(Date.now()-n)/t);i=Math.sin(i*Math.PI/2);i*=i;r&&cancelAnimationFrame(r);r=requestAnimationFrame(()=>{r=null;e(i);i>=1&&s&&s()});i>=1&&clearInterval(o)},i);return o}exports.animate=animate;class Point{constructor(e=0,t=0){this.x=asNumber(e);this.y=asNumber(t)}equals(e,t=0,i=0){return e instanceof Point&&Math.abs(this.x-e.x)<=t&&Math.abs(this.y-e.y)<=i}clone(){return new Point(this.x,this.y)}}exports.Point=Point;class Size{constructor(e=0,t=0){this.width=asNumber(e);this.height=asNumber(t)}equals(e){return e instanceof Size&&this.width==e.width&&this.height==e.height}clone(){return new Size(this.width,this.height)}}exports.Size=Size;class Rect{constructor(e,t,i,s){this.left=asNumber(e);this.top=asNumber(t);this.width=asNumber(i);this.height=asNumber(s)}get right(){return this.left+this.width}get bottom(){return this.top+this.height}equals(e){return e instanceof Rect&&this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height}clone(){return new Rect(this.left,this.top,this.width,this.height)}static fromBoundingRect(e){if(null!=e.left)return new Rect(e.left,e.top,e.width,e.height);if(null!=e.x)return new Rect(e.x,e.y,e.width,e.height);assert(!1,"Invalid source rectangle.")}static union(e,t){let i=Math.min(e.left,t.left),s=Math.min(e.top,t.top),r=Math.max(e.right,t.right),n=Math.max(e.bottom,t.bottom);return new Rect(i,s,r-i,n-s)}static intersection(e,t){let i=Math.max(e.left,t.left),s=Math.max(e.top,t.top),r=Math.min(e.right,t.right),n=Math.min(e.bottom,t.bottom);return new Rect(i,s,r-i,n-s)}contains(e){if(e instanceof Point)return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom;if(e instanceof Rect){let t=e;return t.left>=this.left&&t.right<=this.right&&t.top>=this.top&&t.bottom<=this.bottom}assert(!1,"Point or Rect expected.")}inflate(e,t,i,s){return null!=i&&null!=s?new Rect(this.left-e,this.top-t,this.width+e+i,this.height+t+s):new Rect(this.left-e,this.top-t,this.width+2*e,this.height+2*t)}}exports.Rect=Rect;class DateTime{static addDays(e,t){(e=new Date(e.getTime())).setDate(e.getDate()+t);return e}static addMonths(e,t){var i=(e=new Date(e.getTime())).getDate();e.setMonth(e.getMonth()+t);e.getDate()!=i&&e.setDate(0);return e}static addYears(e,t){(e=new Date(e.getTime())).setFullYear(e.getFullYear()+t);return e}static addHours(e,t){(e=new Date(e.getTime())).setHours(e.getHours()+t);return e}static addMinutes(e,t){(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t);return e}static addSeconds(e,t){(e=new Date(e.getTime())).setSeconds(e.getSeconds()+t);return e}static weekFirst(e,t=Globalize.getFirstDayOfWeek()){return DateTime.addDays(e,-(e.getDay()-t))}static weekLast(e,t=Globalize.getFirstDayOfWeek()){e=DateTime.weekFirst(e,t);return DateTime.addDays(e,6)}static monthFirst(e){return DateTime.addDays(e,1-e.getDate())}static monthLast(e){e=DateTime.monthFirst(e);e=DateTime.addMonths(e,1);return DateTime.addDays(e,-1)}static yearFirst(e){return new Date(e.getFullYear(),0,1)}static yearLast(e){return new Date(e.getFullYear(),11,31)}static sameDate(e,t){return isDate(e)&&isDate(t)&&e.getFullYear()==t.getFullYear()&&e.getMonth()==t.getMonth()&&e.getDate()==t.getDate()}static sameTime(e,t){return isDate(e)&&isDate(t)&&e.getHours()==t.getHours()&&e.getMinutes()==t.getMinutes()&&e.getSeconds()==t.getSeconds()&&e.getMilliseconds()==t.getMilliseconds()}static equals(e,t){return null==e&&null==t||isDate(e)&&isDate(t)&&e.getTime()==t.getTime()}static fromDateTime(e,t){if(!e&&!t)return null;e||(e=t);t||(t=e);return DateTime.newDate(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())}static toFiscal(e,t){let i=exports.culture.Globalize.calendar;return isArray(i.fiscalYearOffsets)?DateTime.addMonths(e,-i.fiscalYearOffsets[t?0:1]):e}static fromFiscal(e,t){let i=exports.culture.Globalize.calendar;return isArray(i.fiscalYearOffsets)?DateTime.addMonths(e,+i.fiscalYearOffsets[t?0:1]):e}static newDate(e,t,i,s,r,n,o){if(null==e||null==t||null==i){let s=new Date;null==e&&(e=s.getFullYear());null==t&&(t=s.getMonth());null==i&&(i=s.getDate())}null==s&&(s=0);null==r&&(r=0);null==n&&(n=0);null==o&&(o=0);let a=new Date(e,t,i,s,r,n,o),l=a.getFullYear();e<100&&l>=1900&&a.setFullYear(a.getFullYear()-1900);return a}static clone(e){return DateTime.fromDateTime(e,e)}}exports.DateTime=DateTime;function httpRequest(e,t){let i=t||{},s=i.method?asString(i.method).toUpperCase():"GET",r=null==i.async||asBoolean(i.async),n=i.data;if(null!=n&&"GET"==s){let t=[];for(let e in n){let i=n[e];isDate(i)&&(i=i.toJSON());t.push(e+"="+encodeURIComponent(i))}if(t.length){let i=e.indexOf("?")<0?"?":"&";e+=i+t.join("&")}n=null}let o=new XMLHttpRequest;o.URL_DEBUG=e;let a=!1;if(null!=n&&!isString(n)){a=isObject(n);n=JSON.stringify(n)}o.onload=function(){if(4==o.readyState){o.status<300?i.success&&asFunction(i.success)(o):i.error&&asFunction(i.error)(o);i.complete&&asFunction(i.complete)(o)}};o.onerror=function(){if(!isFunction(i.error))throw"HttpRequest Error: "+o.status+" "+o.statusText;i.error(o)};o.open(s,e,r,i.user,i.password);i.user&&i.password&&o.setRequestHeader("Authorization","Basic "+btoa(i.user+":"+i.password));a&&(()=>{for(let e in i.requestHeaders)if("content-type"===e.toLowerCase())return!1;return!0})()&&o.setRequestHeader("Content-Type","application/json");if(i.requestHeaders)for(let e in i.requestHeaders)o.setRequestHeader(e,i.requestHeaders[e]);isNumber(i.timeout)&&(o.timeout=i.timeout);isFunction(i.beforeSend)&&i.beforeSend(o);o.send(n);return o}exports.httpRequest=httpRequest;let _modules={};function _registerModule(e,t){_modules[e]=t;if("wijmo"===e){let e="undefined"!=typeof window?window:"undefined"!=typeof self?self:null;e&&(e.wijmo=t)}}exports._registerModule