UNPKG

@js-preview/excel

Version:

支持多种文件(**docx、excel、pdf、pptx**)预览的vue组件库,支持vue2/3。也支持非Vue框架的预览。

1 lines 1.76 MB
function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _superPropGet(t,e,o,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),e,o);return 2&r&&"function"==typeof p?function(t){return p.apply(o,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n170=0,F=function F(){};return{s:F,n:function n(){return _n170>=r.length?{done:!0}:{done:!1,value:r[_n170++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function _toArray(r){return _arrayWithHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _awaitAsyncGenerator(e){return new _OverloadYield(e,0);}function _wrapAsyncGenerator(e){return function(){return new AsyncGenerator(e.apply(this,arguments));};}function AsyncGenerator(e){var r,t;function resume(r,t){try{var n=e[r](t),o=n.value,u=o instanceof _OverloadYield;Promise.resolve(u?o.v:o).then(function(t){if(u){var i="return"===r?"return":"next";if(!o.k||t.done)return resume(i,t);t=e[i](t).value;}settle(n.done?"return":"normal",t);},function(e){resume("throw",e);});}catch(e){settle("throw",e);}}function settle(e,n){switch(e){case"return":r.resolve({value:n,done:!0});break;case"throw":r.reject(n);break;default:r.resolve({value:n,done:!1});}(r=r.next)?resume(r.key,r.arg):t=null;}this._invoke=function(e,n){return new Promise(function(o,u){var i={key:e,arg:n,resolve:o,reject:u,next:null};t?t=t.next=i:(r=t=i,resume(e,n));});},"function"!=typeof e["return"]&&(this["return"]=void 0);}AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this;},AsyncGenerator.prototype.next=function(e){return this._invoke("next",e);},AsyncGenerator.prototype["throw"]=function(e){return this._invoke("throw",e);},AsyncGenerator.prototype["return"]=function(e){return this._invoke("return",e);};function _OverloadYield(e,d){this.v=e,this.k=d;}function _asyncIterator(r){var n,t,o,e=2;for("undefined"!=typeof Symbol&&(t=Symbol.asyncIterator,o=Symbol.iterator);e--;){if(t&&null!=(n=r[t]))return n.call(r);if(o&&null!=(n=r[o]))return new AsyncFromSyncIterator(n.call(r));t="@@asyncIterator",o="@@iterator";}throw new TypeError("Object is not async iterable");}function AsyncFromSyncIterator(r){function AsyncFromSyncIteratorContinuation(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var n=r.done;return Promise.resolve(r.value).then(function(r){return{value:r,done:n};});}return AsyncFromSyncIterator=function AsyncFromSyncIterator(r){this.s=r,this.n=r.next;},AsyncFromSyncIterator.prototype={s:null,n:null,next:function next(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments));},"return":function _return(r){var n=this.s["return"];return void 0===n?Promise.resolve({value:r,done:!0}):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments));},"throw":function _throw(r){var n=this.s["return"];return void 0===n?Promise.reject(r):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments));}},new AsyncFromSyncIterator(r);}var e=/*#__PURE__*/function(){function e(_e2){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";_classCallCheck(this,e);"string"==typeof _e2?(this.el=document.createElement(_e2),this.el.className=t):this.el=_e2,this.data={};}return _createClass(e,[{key:"data",value:function data(_e3,t){return void 0!==t?(this.data[_e3]=t,this):this.data[_e3];}},{key:"on",value:function on(_e4,t){var _e4$split=_e4.split("."),_e4$split2=_toArray(_e4$split),r=_e4$split2[0],n=_e4$split2.slice(1);var i=r;return"mousewheel"===i&&/Firefox/i.test(window.navigator.userAgent)&&(i="DOMMouseScroll"),this.el.addEventListener(i,function(_e5){t(_e5);for(var _t2=0;_t2<n.length;_t2+=1){var _r2=n[_t2];if("left"===_r2&&0!==_e5.button)return;if("right"===_r2&&2!==_e5.button)return;"stop"===_r2&&_e5.stopPropagation();}}),this;}},{key:"offset",value:function offset(_e6){var _this=this;if(void 0!==_e6)return Object.keys(_e6).forEach(function(t){_this.css(t,"".concat(_e6[t],"px"));}),this;var _this$el=this.el,t=_this$el.offsetTop,r=_this$el.offsetLeft,n=_this$el.offsetHeight,i=_this$el.offsetWidth;return{top:t,left:r,height:n,width:i};}},{key:"scroll",value:function scroll(_e7){var t=this.el;return void 0!==_e7&&(void 0!==_e7.left&&(t.scrollLeft=_e7.left),void 0!==_e7.top&&(t.scrollTop=_e7.top)),{left:t.scrollLeft,top:t.scrollTop};}},{key:"box",value:function box(){return this.el.getBoundingClientRect();}},{key:"parent",value:function parent(){return new e(this.el.parentNode);}},{key:"children",value:function children(){var _this2=this;for(var _len=arguments.length,_e8=new Array(_len),_key=0;_key<_len;_key++){_e8[_key]=arguments[_key];}return 0===arguments.length?this.el.childNodes:(_e8.forEach(function(_e9){return _this2.child(_e9);}),this);}},{key:"removeChild",value:function removeChild(_e10){this.el.removeChild(_e10);}},{key:"child",value:function child(t){var r=t;return"string"==typeof t?r=document.createTextNode(t):t instanceof e&&(r=t.el),this.el.appendChild(r),this;}},{key:"contains",value:function contains(_e11){return this.el.contains(_e11);}},{key:"className",value:function className(_e12){return void 0!==_e12?(this.el.className=_e12,this):this.el.className;}},{key:"addClass",value:function addClass(_e13){return this.el.classList.add(_e13),this;}},{key:"hasClass",value:function hasClass(_e14){return this.el.classList.contains(_e14);}},{key:"removeClass",value:function removeClass(_e15){return this.el.classList.remove(_e15),this;}},{key:"toggle",value:function toggle(){var _e16=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"active";return this.toggleClass(_e16);}},{key:"toggleClass",value:function toggleClass(_e17){return this.el.classList.toggle(_e17);}},{key:"active",value:function active(){var _e18=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!0;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"active";return _e18?this.addClass(t):this.removeClass(t),this;}},{key:"checked",value:function checked(){var _e19=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!0;return this.active(_e19,"checked"),this;}},{key:"disabled",value:function disabled(){var _e20=arguments.length>0&&arguments[0]!==undefined?arguments[0]:!0;return _e20?this.addClass("disabled"):this.removeClass("disabled"),this;}},{key:"attr",value:function attr(_e21,t){var _this3=this;if(void 0!==t)this.el.setAttribute(_e21,t);else{if("string"==typeof _e21)return this.el.getAttribute(_e21);Object.keys(_e21).forEach(function(t){_this3.el.setAttribute(t,_e21[t]);});}return this;}},{key:"removeAttr",value:function removeAttr(_e22){return this.el.removeAttribute(_e22),this;}},{key:"html",value:function html(_e23){return void 0!==_e23?(this.el.innerHTML=_e23,this):this.el.innerHTML;}},{key:"val",value:function val(_e24){return void 0!==_e24?(this.el.value=_e24,this):this.el.value;}},{key:"focus",value:function focus(){this.el.focus();}},{key:"cssRemoveKeys",value:function cssRemoveKeys(){var _this4=this;for(var _len2=arguments.length,_e25=new Array(_len2),_key2=0;_key2<_len2;_key2++){_e25[_key2]=arguments[_key2];}return _e25.forEach(function(_e26){return _this4.el.style.removeProperty(_e26);}),this;}},{key:"css",value:function css(_e27,t){var _this5=this;return void 0===t&&"string"!=typeof _e27?(Object.keys(_e27).forEach(function(t){_this5.el.style[t]=_e27[t];}),this):void 0!==t?(this.el.style[_e27]=t,this):this.el.style[_e27];}},{key:"computedStyle",value:function computedStyle(){return window.getComputedStyle(this.el,null);}},{key:"show",value:function show(){return this.css("display","block"),this;}},{key:"hide",value:function hide(){return this.css("display","none"),this;}}]);}();var t=function t(_t3){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"";return new e(_t3,r);},r=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function n(e){var t="",n=e;for(;n>=r.length;)n/=r.length,n-=1,t+=r[parseInt(n,10)%r.length];return t+=r[e%r.length],t;}function i(e){var t=0;for(var _r3=0;_r3!==e.length;++_r3)t=26*t+e.charCodeAt(_r3)-64;return t-1;}function s(e){var t="",r="";for(var _n2=0;_n2<e.length;_n2+=1)e.charAt(_n2)>="0"&&e.charAt(_n2)<="9"?r+=e.charAt(_n2):t+=e.charAt(_n2);return[i(t),parseInt(r,10)-1];}function a(e,t){return"".concat(n(e)).concat(t+1);}function o(e,t,r){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:function(){return!0;};if(0===t&&0===r)return e;var _s2=s(e),_s3=_slicedToArray(_s2,2),i=_s3[0],o=_s3[1];return n(i,o)?a(i+t,o+r):e;}var l=/*#__PURE__*/function(){function l(e,t,r,n){var i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:0;var s=arguments.length>5&&arguments[5]!==undefined?arguments[5]:0;_classCallCheck(this,l);this.sri=e,this.sci=t,this.eri=r,this.eci=n,this.w=i,this.h=s;}return _createClass(l,[{key:"set",value:function set(e,t,r,n){this.sri=e,this.sci=t,this.eri=r,this.eci=n;}},{key:"multiple",value:function multiple(){return this.eri-this.sri>0||this.eci-this.sci>0;}},{key:"includes",value:function includes(){var _s4,_s5,_e28,_e29;var t=0,r=0;for(var _len3=arguments.length,e=new Array(_len3),_key3=0;_key3<_len3;_key3++){e[_key3]=arguments[_key3];}1===e.length?(_s4=s(e[0]),_s5=_slicedToArray(_s4,2),r=_s5[0],t=_s5[1],_s4):2===e.length&&(_e28=e,_e29=_slicedToArray(_e28,2),t=_e29[0],r=_e29[1],_e28);var n=this.sri,i=this.sci,a=this.eri,o=this.eci;return n<=t&&t<=a&&i<=r&&r<=o;}},{key:"each",value:function each(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){return!0;};var r=this.sri,n=this.sci,i=this.eri,s=this.eci;for(var _a2=r;_a2<=i;_a2+=1)if(t(_a2))for(var _t4=n;_t4<=s;_t4+=1)e(_a2,_t4);}},{key:"contains",value:function contains(e){return this.sri<=e.sri&&this.sci<=e.sci&&this.eri>=e.eri&&this.eci>=e.eci;}},{key:"within",value:function within(e){return this.sri>=e.sri&&this.sci>=e.sci&&this.eri<=e.eri&&this.eci<=e.eci;}},{key:"disjoint",value:function disjoint(e){return this.sri>e.eri||this.sci>e.eci||e.sri>this.eri||e.sci>this.eci;}},{key:"intersects",value:function intersects(e){return this.sri<=e.eri&&this.sci<=e.eci&&e.sri<=this.eri&&e.sci<=this.eci;}},{key:"union",value:function union(e){var t=this.sri,r=this.sci,n=this.eri,i=this.eci;return new l(e.sri<t?e.sri:t,e.sci<r?e.sci:r,e.eri>n?e.eri:n,e.eci>i?e.eci:i);}},{key:"difference",value:function difference(e){var t=[],r=function r(e,_r4,n,i){t.push(new l(e,_r4,n,i));},n=this.sri,i=this.sci,s=this.eri,a=this.eci,o=e.sri-n,c=e.sci-i,h=s-e.eri,f=a-e.eci;return o>0?(r(n,i,e.sri-1,a),h>0?(r(e.eri+1,i,s,a),c>0&&r(e.sri,i,e.eri,e.sci-1),f>0&&r(e.sri,e.eci+1,e.eri,a)):(c>0&&r(e.sri,i,s,e.sci-1),f>0&&r(e.sri,e.eci+1,s,a))):h>0&&(r(e.eri+1,i,s,a),c>0&&r(n,i,e.eri,e.sci-1),f>0&&r(n,e.eci+1,e.eri,a)),c>0?(r(n,i,s,e.sci-1),f>0?(r(n,e.eri+1,s,a),o>0&&r(n,e.sci,e.sri-1,e.eci),h>0&&r(e.sri+1,e.sci,s,e.eci)):(o>0&&r(n,e.sci,e.sri-1,a),h>0&&r(e.sri+1,e.sci,s,a))):f>0&&(r(s,e.eci+1,s,a),o>0&&r(n,i,e.sri-1,e.eci),h>0&&r(e.eri+1,i,s,e.eci)),t;}},{key:"size",value:function size(){return[this.eri-this.sri+1,this.eci-this.sci+1];}},{key:"toString",value:function toString(){var e=this.sri,t=this.sci,r=this.eri,n=this.eci;var i=a(t,e);return this.multiple()&&(i="".concat(i,":").concat(a(n,r))),i;}},{key:"clone",value:function clone(){var e=this.sri,t=this.sci,r=this.eri,n=this.eci,i=this.w,s=this.h;return new l(e,t,r,n,i,s);}},{key:"equals",value:function equals(e){return this.eri===e.eri&&this.eci===e.eci&&this.sri===e.sri&&this.sci===e.sci;}}],[{key:"valueOf",value:function valueOf(e){var _s8,_s9;var t=e.split(":"),_s6=s(t[0]),_s7=_slicedToArray(_s6,2),r=_s7[0],n=_s7[1];var i=n,a=r;return t.length>1&&(_s8=s(t[1]),_s9=_slicedToArray(_s8,2),a=_s9[0],i=_s9[1],_s8),new l(n,r,i,a);}}]);}();var c=/*#__PURE__*/function(){function c(){_classCallCheck(this,c);this.range=new l(0,0,0,0),this.ri=0,this.ci=0;}return _createClass(c,[{key:"multiple",value:function multiple(){return this.range.multiple();}},{key:"setIndexes",value:function setIndexes(e,t){this.ri=e,this.ci=t;}},{key:"size",value:function size(){return this.range.size();}}]);}();var h=/*#__PURE__*/_createClass(function h(){_classCallCheck(this,h);this.x=0,this.y=0,this.ri=0,this.ci=0;});var f=/*#__PURE__*/function(){function f(){_classCallCheck(this,f);this.undoItems=[],this.redoItems=[];}return _createClass(f,[{key:"add",value:function add(e){this.undoItems.push(JSON.stringify(e)),this.redoItems=[];}},{key:"canUndo",value:function canUndo(){return this.undoItems.length>0;}},{key:"canRedo",value:function canRedo(){return this.redoItems.length>0;}},{key:"undo",value:function undo(e,t){var r=this.undoItems,n=this.redoItems;this.canUndo()&&(n.push(JSON.stringify(e)),t(JSON.parse(r.pop())));}},{key:"redo",value:function redo(e,t){var r=this.undoItems,n=this.redoItems;this.canRedo()&&(r.push(JSON.stringify(e)),t(JSON.parse(n.pop())));}}]);}();var u=/*#__PURE__*/function(){function u(){_classCallCheck(this,u);this.range=null,this.state="clear";}return _createClass(u,[{key:"copy",value:function copy(e){return this.range=e,this.state="copy",this;}},{key:"cut",value:function cut(e){return this.range=e,this.state="cut",this;}},{key:"isCopy",value:function isCopy(){return"copy"===this.state;}},{key:"isCut",value:function isCut(){return"cut"===this.state;}},{key:"isClear",value:function isClear(){return"clear"===this.state;}},{key:"clear",value:function clear(){this.range=null,this.state="clear";}}]);}();var d=/*#__PURE__*/function(){function d(e,t,r){_classCallCheck(this,d);this.ci=e,this.operator=t,this.value=r;}return _createClass(d,[{key:"set",value:function set(e,t){this.operator=e,this.value=t;}},{key:"includes",value:function includes(e){var t=this.operator,r=this.value;return"all"===t||"in"===t&&r.includes(e);}},{key:"vlength",value:function vlength(){var e=this.operator,t=this.value;return"in"===e?t.length:0;}},{key:"getData",value:function getData(){var e=this.ci,t=this.operator,r=this.value;return{ci:e,operator:t,value:r};}}]);}();var p=/*#__PURE__*/function(){function p(e,t){_classCallCheck(this,p);this.ci=e,this.order=t;}return _createClass(p,[{key:"asc",value:function asc(){return"asc"===this.order;}},{key:"desc",value:function desc(){return"desc"===this.order;}}]);}();var m=/*#__PURE__*/function(){function m(){_classCallCheck(this,m);this.ref=null,this.filters=[],this.sort=null;}return _createClass(m,[{key:"setData",value:function setData(_ref2){var e=_ref2.ref,t=_ref2.filters,r=_ref2.sort;null!=e&&(this.ref=e,this.filters=t.map(function(e){return new d(e.ci,e.operator,e.value);}),r&&(this.sort=new p(r.ci,r.order)));}},{key:"getData",value:function getData(){if(this.active()){var _e30=this.ref,_t5=this.filters,_r5=this.sort;return{ref:_e30,filters:_t5.map(function(e){return e.getData();}),sort:_r5};}return{};}},{key:"addFilter",value:function addFilter(e,t,r){var n=this.getFilter(e);null==n?this.filters.push(new d(e,t,r)):n.set(t,r);}},{key:"setSort",value:function setSort(e,t){this.sort=t?new p(e,t):null;}},{key:"includes",value:function includes(e,t){return!!this.active()&&this.hrange().includes(e,t);}},{key:"getSort",value:function getSort(e){var t=this.sort;return t&&t.ci===e?t:null;}},{key:"getFilter",value:function getFilter(e){var t=this.filters;for(var _r6=0;_r6<t.length;_r6+=1)if(t[_r6].ci===e)return t[_r6];return null;}},{key:"filteredRows",value:function filteredRows(e){var t=new Set(),r=new Set();if(this.active()){var _this$range=this.range(),_n3=_this$range.sri,_i2=_this$range.eri,_s10=this.filters;for(var _a3=_n3+1;_a3<=_i2;_a3+=1)for(var _n4=0;_n4<_s10.length;_n4+=1){var _i3=_s10[_n4],_o2=e(_a3,_i3.ci),_l2=_o2?_o2.text:"";if(!_i3.includes(_l2)){t.add(_a3);break;}r.add(_a3);}}return{rset:t,fset:r};}},{key:"items",value:function items(e,t){var r={};if(this.active()){var _this$range2=this.range(),_n5=_this$range2.sri,_i4=_this$range2.eri;for(var _s11=_n5+1;_s11<=_i4;_s11+=1){var _n6=t(_s11,e);if(null===_n6||/^\s*$/.test(_n6.text))r[""]=(r[""]||0)+1;else{var _e31=_n6.text,_t6=(r[_e31]||0)+1;r[_e31]=_t6;}}}return r;}},{key:"range",value:function range(){return l.valueOf(this.ref);}},{key:"hrange",value:function hrange(){var e=this.range();return e.eri=e.sri,e;}},{key:"clear",value:function clear(){this.ref=null,this.filters=[],this.sort=null;}},{key:"active",value:function active(){return null!==this.ref;}}]);}();var g=/*#__PURE__*/function(){function g(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];_classCallCheck(this,g);this._=e;}return _createClass(g,[{key:"forEach",value:function forEach(e){this._.forEach(e);}},{key:"deleteWithin",value:function deleteWithin(e){this._=this._.filter(function(t){return!t.within(e);});}},{key:"getFirstIncludes",value:function getFirstIncludes(e,t){for(var _r7=0;_r7<this._.length;_r7+=1){var _n7=this._[_r7];if(_n7.includes(e,t))return _n7;}return null;}},{key:"filterIntersects",value:function filterIntersects(e){return new g(this._.filter(function(t){return t.intersects(e);}));}},{key:"intersects",value:function intersects(e){for(var _t7=0;_t7<this._.length;_t7+=1){if(this._[_t7].intersects(e))return!0;}return!1;}},{key:"union",value:function union(e){var t=e;return this._.forEach(function(e){e.intersects(t)&&(t=e.union(t));}),t;}},{key:"add",value:function add(e){this.deleteWithin(e),this._.push(e);}},{key:"shift",value:function shift(e,t,r,n){this._.forEach(function(i){var s=i.sri,a=i.sci,o=i.eri,l=i.eci,c=i;"row"===e?s>=t?(c.sri+=r,c.eri+=r):s<t&&t<=o&&(c.eri+=r,n(s,a,r,0)):"column"===e&&(a>=t?(c.sci+=r,c.eci+=r):a<t&&t<=l&&(c.eci+=r,n(s,a,0,r)));});}},{key:"move",value:function move(e,t,r){this._.forEach(function(n){var i=n;i.within(e)&&(i.eri+=t,i.sri+=t,i.sci+=r,i.eci+=r);});}},{key:"setData",value:function setData(e){return this._=e.map(function(e){return l.valueOf(e);}),this;}},{key:"getData",value:function getData(){return this._.map(function(e){return e.toString();});}}]);}();var _b=function b(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};for(var _len4=arguments.length,t=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){t[_key4-1]=arguments[_key4];}return t.forEach(function(t){Object.keys(t).forEach(function(r){var n=t[r];"string"==typeof n||"number"==typeof n||"boolean"==typeof n?e[r]=n:"function"!=typeof n&&!Array.isArray(n)&&n instanceof Object?(e[r]=e[r]||{},_b(e[r],n)):e[r]=n;});}),e;};function v(e){var t="".concat(e);var r=0,n=!1;for(var _e32=0;_e32<t.length;_e32+=1)!0===n&&(r+=1),"."===t.charAt(_e32)&&(n=!0);return r;}function y(e,t,r){if(Number.isNaN(t)||Number.isNaN(r))return t+e+r;var n=v(t),i=v(r),s=Number(t),a=Number(r);var o=0;if("-"===e)o=s-a;else if("+"===e)o=s+a;else if("*"===e)o=s*a;else if("/"===e)return o=s/a,v(o)>5?o.toFixed(2):o;return o.toFixed(Math.max(n,i));}var w={cloneDeep:function cloneDeep(e){return JSON.parse(JSON.stringify(e));},merge:function merge(){for(var _len5=arguments.length,e=new Array(_len5),_key5=0;_key5<_len5;_key5++){e[_key5]=arguments[_key5];}return _b.apply(void 0,[{}].concat(e));},equals:function e(t,r){var n=Object.keys(t);if(n.length!==Object.keys(r).length)return!1;for(var _i5=0;_i5<n.length;_i5+=1){var _s12=n[_i5],_a4=t[_s12],_o3=r[_s12];if(void 0===_o3)return!1;if("string"==typeof _a4||"number"==typeof _a4||"boolean"==typeof _a4){if(_a4!==_o3)return!1;}else if(Array.isArray(_a4)){if(_a4.length!==_o3.length)return!1;for(var _t8=0;_t8<_a4.length;_t8+=1)if(!e(_a4[_t8],_o3[_t8]))return!1;}else if("function"!=typeof _a4&&!Array.isArray(_a4)&&_a4 instanceof Object&&!e(_a4,_o3))return!1;}return!0;},arrayEquals:function arrayEquals(e,t){if(e.length!==t.length)return!1;for(var _r8=0;_r8<e.length;_r8+=1)if(e[_r8]!==t[_r8])return!1;return!0;},sum:function sum(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(e){return e;};var r=0,n=0;return Object.keys(e).forEach(function(i){r+=t(e[i],i),n+=1;}),[r,n];},rangeEach:function rangeEach(e,t,r){for(var _n8=e;_n8<t;_n8+=1)r(_n8);},rangeSum:function rangeSum(e,t,r){var n=0;for(var _i6=e;_i6<t;_i6+=1)n+=r(_i6);return n;},rangeReduceIf:function rangeReduceIf(e,t,r,n,i,s){var a=r,o=n,l=e;for(;l<t&&!(a>i);l+=1)o=s(l),a+=o;return[l,a-o,o];},deleteProperty:function deleteProperty(e,t){var r=e["".concat(t)];return delete e["".concat(t)],r;},numberCalc:y};var x=/*#__PURE__*/function(){function x(_ref3){var e=_ref3.len,t=_ref3.height;_classCallCheck(this,x);this._={},this.len=e,this.height=t;}return _createClass(x,[{key:"getHeight",value:function getHeight(e){if(this.isHide(e))return 0;var t=this.get(e);return t&&t.height?t.height:this.height;}},{key:"setHeight",value:function setHeight(e,t){this.getOrNew(e).height=t;}},{key:"unhide",value:function unhide(e){var t=e;for(;t>0&&(t-=1,this.isHide(t));)this.setHide(t,!1);}},{key:"isHide",value:function isHide(e){var t=this.get(e);return t&&t.hide;}},{key:"setHide",value:function setHide(e,t){var r=this.getOrNew(e);!0===t?r.hide=!0:delete r.hide;}},{key:"setStyle",value:function setStyle(e,t){this.getOrNew(e).style=t;}},{key:"sumHeight",value:function sumHeight(e,t,r){var _this6=this;return w.rangeSum(e,t,function(e){return r&&r.has(e)?0:_this6.getHeight(e);});}},{key:"totalHeight",value:function totalHeight(){return this.sumHeight(0,this.len);}},{key:"get",value:function get(e){return this._[e];}},{key:"getOrNew",value:function getOrNew(e){return this._[e]=this._[e]||{cells:{}},this._[e];}},{key:"getCell",value:function getCell(e,t){var r=this.get(e);return void 0!==r&&void 0!==r.cells&&void 0!==r.cells[t]?r.cells[t]:null;}},{key:"getCellMerge",value:function getCellMerge(e,t){var r=this.getCell(e,t);return r&&r.merge?r.merge:[0,0];}},{key:"getCellOrNew",value:function getCellOrNew(e,t){var r=this.getOrNew(e);return r.cells[t]=r.cells[t]||{},r.cells[t];}},{key:"setCell",value:function setCell(e,t,r){var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"all";var i=this.getOrNew(e);"all"===n?i.cells[t]=r:"text"===n?(i.cells[t]=i.cells[t]||{},i.cells[t].text=r.text):"format"===n&&(i.cells[t]=i.cells[t]||{},i.cells[t].style=r.style,r.merge&&(i.cells[t].merge=r.merge));}},{key:"setCellText",value:function setCellText(e,t,r){var n=this.getCellOrNew(e,t);!1!==n.editable&&(n.text=r);}},{key:"copyPaste",value:function copyPaste(e,t,r){var _this7=this;var n=arguments.length>3&&arguments[3]!==undefined?arguments[3]:!1;var i=arguments.length>4&&arguments[4]!==undefined?arguments[4]:function(){};var s=e.sri,a=e.sci,l=e.eri,c=e.eci,h=t.sri,f=t.sci,u=t.eri,d=t.eci,_e$size=e.size(),_e$size2=_slicedToArray(_e$size,2),p=_e$size2[0],m=_e$size2[1],_t$size=t.size(),_t$size2=_slicedToArray(_t$size,2),g=_t$size2[0],b=_t$size2[1];var v=!0,y=0;(u<s||d<a)&&(v=!1,y=u<s?g:b);for(var _e33=s;_e33<=l;_e33+=1)if(this._[_e33])for(var _t9=a;_t9<=c;_t9+=1)if(this._[_e33].cells&&this._[_e33].cells[_t9])for(var _g2=h;_g2<=u;_g2+=p){var _loop=function _loop(){var _x2=_g2+(_e33-s),_=_b2+(_t9-a),k=w.cloneDeep(_this7._[_e33].cells[_t9]);if(n&&k&&k.text&&k.text.length>0){var _e34=k.text;var _t10=_b2-f+(_g2-h)+2;if(v||(_t10-=y+1),"="===_e34[0])k.text=_e34.replace(/[a-zA-Z]{1,3}\d+/g,function(e){var r=0,n=0;return s===h?r=_t10-1:n=_t10-1,/^\d+$/.test(e)?e:o(e,r,n);});else if(p<=1&&m>1&&(h>l||u<s)||m<=1&&p>1&&(f>c||d<a)||p<=1&&m<=1){var _r9=/[\\.\d]+$/.exec(_e34);if(null!==_r9){var _n9=Number(_r9[0])+_t10-1;k.text=_e34.substring(0,_r9.index)+_n9;}}}_this7.setCell(_x2,_,k,r),i(_x2,_,k);};for(var _b2=f;_b2<=d;_b2+=m){_loop();}}}},{key:"cutPaste",value:function cutPaste(e,t){var _this8=this;var r={};this.each(function(n){_this8.eachCells(n,function(i){var s=parseInt(n,10),a=parseInt(i,10);e.includes(n,i)&&(s=t.sri+(s-e.sri),a=t.sci+(a-e.sci)),r[s]=r[s]||{cells:{}},r[s].cells[a]=_this8._[n].cells[i];});}),this._=r;}},{key:"paste",value:function paste(e,t){var _this9=this;if(e.length<=0)return;var r=t.sri,n=t.sci;e.forEach(function(e,t){var i=r+t;e.forEach(function(e,t){var r=n+t;_this9.setCellText(i,r,e);});});}},{key:"insert",value:function insert(e){var _this10=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;var r={};this.each(function(n,i){var s=parseInt(n,10);s>=e&&(s+=t,_this10.eachCells(n,function(r,n){n.text&&"="===n.text[0]&&(n.text=n.text.replace(/[a-zA-Z]{1,3}\d+/g,function(r){return o(r,0,t,function(t,r){return r>=e;});}));})),r[s]=i;}),this._=r,this.len+=t;}},{key:"delete",value:function _delete(e,t){var _this11=this;var r=t-e+1,n={};this.each(function(i,s){var a=parseInt(i,10);a<e?n[a]=s:i>t&&(n[a-r]=s,_this11.eachCells(i,function(e,n){n.text&&"="===n.text[0]&&(n.text=n.text.replace(/[a-zA-Z]{1,3}\d+/g,function(e){return o(e,0,-r,function(e,r){return r>t;});}));}));}),this._=n,this.len-=r;}},{key:"insertColumn",value:function insertColumn(e){var _this12=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;this.each(function(r,n){var i={};_this12.eachCells(r,function(r,n){var s=parseInt(r,10);s>=e&&(s+=t,n.text&&"="===n.text[0]&&(n.text=n.text.replace(/[a-zA-Z]{1,3}\d+/g,function(r){return o(r,t,0,function(t){return t>=e;});}))),i[s]=n;}),n.cells=i;});}},{key:"deleteColumn",value:function deleteColumn(e,t){var _this13=this;var r=t-e+1;this.each(function(n,i){var s={};_this13.eachCells(n,function(n,i){var a=parseInt(n,10);a<e?s[a]=i:a>t&&(s[a-r]=i,i.text&&"="===i.text[0]&&(i.text=i.text.replace(/[a-zA-Z]{1,3}\d+/g,function(e){return o(e,-r,0,function(e){return e>t;});})));}),i.cells=s;});}},{key:"deleteCells",value:function deleteCells(e){var _this14=this;var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"all";e.each(function(e,r){_this14.deleteCell(e,r,t);});}},{key:"deleteCell",value:function deleteCell(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"all";var n=this.get(e);if(null!==n){var _i7=this.getCell(e,t);null!==_i7&&!1!==_i7.editable&&("all"===r?delete n.cells[t]:"text"===r?(_i7.text&&delete _i7.text,_i7.value&&delete _i7.value):"format"===r?(void 0!==_i7.style&&delete _i7.style,_i7.merge&&delete _i7.merge):"merge"===r&&_i7.merge&&delete _i7.merge);}}},{key:"maxCell",value:function maxCell(){var e=Object.keys(this._),t=e[e.length-1],r=this._[t];if(r){var _e35=r.cells,_n10=Object.keys(_e35),_i8=_n10[_n10.length-1];return[parseInt(t,10),parseInt(_i8,10)];}return[0,0];}},{key:"each",value:function each(e){Object.entries(this._).forEach(function(_ref4){var _ref5=_slicedToArray(_ref4,2),t=_ref5[0],r=_ref5[1];e(t,r);});}},{key:"eachCells",value:function eachCells(e,t){this._[e]&&this._[e].cells&&Object.entries(this._[e].cells).forEach(function(_ref6){var _ref7=_slicedToArray(_ref6,2),e=_ref7[0],r=_ref7[1];t(e,r);});}},{key:"setData",value:function setData(e){e.len&&(this.len=e.len,delete e.len),this._=e;}},{key:"getData",value:function getData(){var e=this.len;return Object.assign({len:e},this._);}}]);}();var _=/*#__PURE__*/function(){function _(_ref8){var e=_ref8.len,t=_ref8.width,r=_ref8.indexWidth,n=_ref8.minWidth;_classCallCheck(this,_);this._={},this.len=e,this.width=t,this.indexWidth=r,this.minWidth=n;}return _createClass(_,[{key:"setData",value:function setData(e){e.len&&(this.len=e.len,delete e.len),this._=e;}},{key:"getData",value:function getData(){var e=this.len;return Object.assign({len:e},this._);}},{key:"getWidth",value:function getWidth(e){if(this.isHide(e))return 0;var t=this._[e];return t&&t.width?t.width:this.width;}},{key:"getOrNew",value:function getOrNew(e){return this._[e]=this._[e]||{},this._[e];}},{key:"setWidth",value:function setWidth(e,t){this.getOrNew(e).width=t;}},{key:"unhide",value:function unhide(e){var t=e;for(;t>0&&(t-=1,this.isHide(t));)this.setHide(t,!1);}},{key:"isHide",value:function isHide(e){var t=this._[e];return t&&t.hide;}},{key:"setHide",value:function setHide(e,t){var r=this.getOrNew(e);!0===t?r.hide=!0:delete r.hide;}},{key:"setStyle",value:function setStyle(e,t){this.getOrNew(e).style=t;}},{key:"sumWidth",value:function sumWidth(e,t){var _this15=this;return w.rangeSum(e,t,function(e){return _this15.getWidth(e);});}},{key:"totalWidth",value:function totalWidth(){return this.sumWidth(0,this.len);}}]);}();var k=["en"];var S={en:{toolbar:{undo:"Undo",redo:"Redo",print:"Print",paintformat:"Paint format",clearformat:"Clear format",format:"Format",fontName:"Font",fontSize:"Font size",fontBold:"Font bold",fontItalic:"Font italic",underline:"Underline",strike:"Strike",color:"Text color",bgcolor:"Fill color",border:"Borders",merge:"Merge cells",align:"Horizontal align",valign:"Vertical align",textwrap:"Text wrapping",freeze:"Freeze cell",autofilter:"Filter",formula:"Functions",more:"More"},contextmenu:{copy:"Copy",cut:"Cut",paste:"Paste",pasteValue:"Paste values only",pasteFormat:"Paste format only",hide:"Hide",insertRow:"Insert row",insertColumn:"Insert column",deleteSheet:"Delete",deleteRow:"Delete row",deleteColumn:"Delete column",deleteCell:"Delete cell",deleteCellText:"Delete cell text",validation:"Data validations",cellprintable:"Enable export",cellnonprintable:"Disable export",celleditable:"Enable editing",cellnoneditable:"Disable editing"},print:{size:"Paper size",orientation:"Page orientation",orientations:["Landscape","Portrait"]},format:{normal:"Normal",text:"Plain Text",number:"Number",percent:"Percent",rmb:"RMB",usd:"USD",eur:"EUR",date:"Date",time:"Time",datetime:"Date time",duration:"Duration"},formula:{sum:"Sum",average:"Average",max:"Max",min:"Min",_if:"IF",and:"AND",or:"OR",concat:"Concat"},validation:{required:"it must be required",notMatch:"it not match its validation rule",between:"it is between {} and {}",notBetween:"it is not between {} and {}",notIn:"it is not in list",equal:"it equal to {}",notEqual:"it not equal to {}",lessThan:"it less than {}",lessThanEqual:"it less than or equal to {}",greaterThan:"it greater than {}",greaterThanEqual:"it greater than or equal to {}"},error:{pasteForMergedCell:"Unable to do this for merged cells"},calendar:{weeks:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]},button:{next:"Next",cancel:"Cancel",remove:"Remove",save:"Save",ok:"OK"},sort:{desc:"Sort Z -> A",asc:"Sort A -> Z"},filter:{empty:"empty"},dataValidation:{mode:"Mode",range:"Cell Range",criteria:"Criteria",modeType:{cell:"Cell",column:"Colun",row:"Row"},type:{list:"List",number:"Number",date:"Date",phone:"Phone",email:"Email"},operator:{be:"between",nbe:"not betwwen",lt:"less than",lte:"less than or equal to",gt:"greater than",gte:"greater than or equal to",eq:"equal to",neq:"not equal to"}}}};function T(e,t){if(t){var _iterator4=_createForOfIteratorHelper(k),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _r10=_step4.value;if(!t[_r10])break;var _n11=t[_r10];var _i9=e.match(/(?:\\.|[^.])+/g);for(var _e36=0;_e36<_i9.length;_e36+=1){var _t11=_n11[_i9[_e36]];if(!_t11)break;if(_e36===_i9.length-1)return _t11;_n11=_t11;}}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}}}function E(e){var t=T(e,S);return!t&&window&&window.x_spreadsheet&&window.x_spreadsheet.$messages&&(t=T(e,window.x_spreadsheet.$messages)),t||"";}function C(e){return function(){return E(e);};}function A(e,t){var r=arguments.length>2&&arguments[2]!==undefined?arguments[2]:!1;r?k=[e]:k.unshift(e),t&&(S[e]=t);}var M={phone:/^[1-9]\d{10}$/,email:/w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/};function R(e,t){var n="";for(var _len6=arguments.length,r=new Array(_len6>2?_len6-2:0),_key6=2;_key6<_len6;_key6++){r[_key6-2]=arguments[_key6];}return e||(n=E.apply(void 0,["validation.".concat(t)].concat(r))),[e,n];}var O=/*#__PURE__*/function(){function O(e,t,r,n){_classCallCheck(this,O);this.required=t,this.value=r,this.type=e,this.operator=n,this.message="";}return _createClass(O,[{key:"parseValue",value:function parseValue(e){var t=this.type;return"date"===t?new Date(e):"number"===t?Number(e):e;}},{key:"equals",value:function equals(e){var t=this.type===e.type&&this.required===e.required&&this.operator===e.operator;return t&&(t=Array.isArray(this.value)?w.arrayEquals(this.value,e.value):this.value===e.value),t;}},{key:"values",value:function values(){return this.value.split(",");}},{key:"validate",value:function validate(e){var t=this.required,r=this.operator,n=this.value,i=this.type;if(t&&/^\s*$/.test(e))return R(!1,"required");if(/^\s*$/.test(e))return[!0];if(M[i]&&!M[i].test(e))return R(!1,"notMatch");if("list"===i)return R(this.values().includes(e),"notIn");if(r){var _t12=this.parseValue(e);if("be"===r){var _n12=_slicedToArray(n,2),_e37=_n12[0],_r11=_n12[1];return R(_t12>=this.parseValue(_e37)&&_t12<=this.parseValue(_r11),"between",_e37,_r11);}if("nbe"===r){var _n13=_slicedToArray(n,2),_e38=_n13[0],_r12=_n13[1];return R(_t12<this.parseValue(_e38)||_t12>this.parseValue(_r12),"notBetween",_e38,_r12);}if("eq"===r)return R(_t12===this.parseValue(n),"equal",n);if("neq"===r)return R(_t12!==this.parseValue(n),"notEqual",n);if("lt"===r)return R(_t12<this.parseValue(n),"lessThan",n);if("lte"===r)return R(_t12<=this.parseValue(n),"lessThanEqual",n);if("gt"===r)return R(_t12>this.parseValue(n),"greaterThan",n);if("gte"===r)return R(_t12>=this.parseValue(n),"greaterThanEqual",n);}return[!0];}}]);}();var I=/*#__PURE__*/function(){function I(e,t,r){_classCallCheck(this,I);this.refs=t,this.mode=e,this.validator=r;}return _createClass(I,[{key:"includes",value:function includes(e,t){var r=this.refs;for(var _n14=0;_n14<r.length;_n14+=1){if(l.valueOf(r[_n14]).includes(e,t))return!0;}return!1;}},{key:"addRef",value:function addRef(e){this.remove(l.valueOf(e)),this.refs.push(e);}},{key:"remove",value:function remove(e){var t=[];this.refs.forEach(function(r){var n=l.valueOf(r);if(n.intersects(e)){n.difference(e).forEach(function(e){return t.push(e.toString());});}else t.push(r);}),this.refs=t;}},{key:"getData",value:function getData(){var e=this.refs,t=this.mode,r=this.validator,n=r.type,i=r.required,s=r.operator,a=r.value;return{refs:e,mode:t,type:n,required:i,operator:s,value:a};}}],[{key:"valueOf",value:function valueOf(_ref9){var e=_ref9.refs,t=_ref9.mode,r=_ref9.type,n=_ref9.required,i=_ref9.operator,s=_ref9.value;return new I(t,e,new O(r,n,s,i));}}]);}();var N=/*#__PURE__*/function(){function N(){_classCallCheck(this,N);this._=[],this.errors=new Map();}return _createClass(N,[{key:"getError",value:function getError(e,t){return this.errors.get("".concat(e,"_").concat(t));}},{key:"validate",value:function validate(e,t,r){var n=this.get(e,t),i="".concat(e,"_").concat(t),s=this.errors;if(null!==n){var _n$validator$validate=n.validator.validate(r),_n$validator$validate2=_slicedToArray(_n$validator$validate,2),_e39=_n$validator$validate2[0],_t13=_n$validator$validate2[1];_e39?s["delete"](i):s.set(i,_t13);}else s["delete"](i);return!0;}},{key:"add",value:function add(e,t,_ref10){var r=_ref10.type,n=_ref10.required,i=_ref10.value,s=_ref10.operator;var a=new O(r,n,i,s),o=this.getByValidator(a);null!==o?o.addRef(t):this._.push(new I(e,[t],a));}},{key:"getByValidator",value:function getByValidator(e){for(var _t14=0;_t14<this._.length;_t14+=1){var _r13=this._[_t14];if(_r13.validator.equals(e))return _r13;}return null;}},{key:"get",value:function get(e,t){for(var _r14=0;_r14<this._.length;_r14+=1){var _n15=this._[_r14];if(_n15.includes(e,t))return _n15;}return null;}},{key:"remove",value:function remove(e){this.each(function(t){t.remove(e);});}},{key:"each",value:function each(e){this._.forEach(function(t){return e(t);});}},{key:"getData",value:function getData(){return this._.filter(function(e){return e.refs.length>0;}).map(function(e){return e.getData();});}},{key:"setData",value:function setData(e){this._=e.map(function(e){return I.valueOf(e);});}}]);}();var D={mode:"edit",view:{height:function height(){return document.documentElement.clientHeight;},width:function width(){return document.documentElement.clientWidth;}},showGrid:!0,showToolbar:!0,showContextmenu:!0,showBottomBar:!0,row:{len:100,height:25},col:{len:26,width:100,indexWidth:60,minWidth:60},style:{bgcolor:"#ffffff",align:"left",valign:"mi