@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 23.2 kB
JavaScript
module.exports=function(n){var i={};function r(e){if(i[e])return i[e].exports;var t=i[e]={exports:{},id:e,loaded:!1};return n[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}return r.m=n,r.c=i,r.p="",r(0)}({0:function(e,t,n){e.exports=n(1691)},3:function(e,t){e.exports=function(){throw Error("define cannot be used indirect")}},20:function(e,t){e.exports=require("../kendo.core")},977:function(e,t){e.exports=require("../kendo.window")},1671:function(e,t){e.exports=require("../kendo.binder")},1691:function(e,t,n){var i;n(3),n=[n(20),n(1671),n(977),n(1692),n(1693)],void 0===(t="function"==typeof(i=function(){var v=kendo,t=v.jQuery,s={AUTO_FILL:"autoFill",CLEAR:"clear",CUT:"cut",EDIT:"edit",PASTE:"paste",VALIDATION:"validation"},n=v.spreadsheet.Command=v.Class.extend({init:function(e){this.options=e;this._workbook=e.workbook;this._property=e&&e.property;this._state={}},range:function(e){if(e!==undefined)this._setRange(e);return this._range},_setRange:function(e){this._range=e},redo:function(){this.range().select();this.exec()},undo:function(){this.setState(this._state)},getState:function(){this._state=this.range().getState(this._property)},setState:function(e){this.range().setState(e)},rejectState:function(e){this.undo();return{title:e.title,body:e.message,reason:"error",type:"validationError"}},_forEachCell:function(t){var n=this.range();var e=n._ref;e.forEach(function(e){n.sheet().forEach(e.toRangeRef(),t.bind(this))}.bind(this))},usesImage:function(){return false}}),i=(v.spreadsheet.DrawingUpdateCommand=n.extend({init:function(e){this._sheet=e.sheet;this._drawing=e.drawing;this._orig=this._drawing.clone();this._previous=e.previous},exec:function(){},undo:function(){this._drawing.reset(this._previous);this._sheet._activeDrawing=this._drawing;this._sheet.triggerChange({layout:true})},redo:function(){this._drawing.reset(this._orig);this._sheet._activeDrawing=this._drawing;this._sheet.triggerChange({layout:true})},usesImage:function(e){return this._drawing.image===e||this._orig.image===e||this._previous.image===e}}),n.extend({init:function(e){n.fn.init.call(this,e);this._drawing=e.drawing},usesImage:function(e){return this._drawing.image===e}})),e=(v.spreadsheet.InsertImageCommand=i.extend({init:function(e){i.fn.init.call(this,e);this._blob=e.blob;this._width=e.width;this._height=e.height},exec:function(){var e=this.range();var t=e.sheet();var n=this._width;var i=this._height;var r=n/i;if(n>i){n=Math.min(n,300);i=n/r}else{i=Math.min(i,300);n=i*r}this._drawing=t.addDrawing({topLeftCell:e.topLeft(),offsetX:5,offsetY:5,width:n,height:i,opacity:1,image:this._workbook.addImage(this._blob)},true);this._blob=null},undo:function(){var e=this.range().sheet();e._activeDrawing=null;e.removeDrawing(this._drawing)},redo:function(){var e=this.range().sheet();e._activeDrawing=this._drawing;e.addDrawing(this._drawing)}}),v.spreadsheet.DeleteDrawingCommand=i.extend({exec:function(){var e=this.range().sheet();e._activeDrawing=null;e.removeDrawing(this._drawing)},undo:function(){var e=this.range().sheet();e._activeDrawing=this._drawing;e.addDrawing(this._drawing)},redo:function(){this.exec()}}),i.extend({exec:function(){var e=this.range().sheet();this._origIndex=e._drawings.indexOf(this._drawing);e._drawings.splice(this._origIndex,1);this._newIndex=this._reorder();e._drawings.splice(this._newIndex,0,this._drawing);e.triggerChange({drawings:true})},undo:function(){var e=this.range().sheet();e._drawings.splice(this._newIndex,1);e._drawings.splice(this._origIndex,0,this._drawing);e.triggerChange({drawings:true})}})),r=(v.spreadsheet.BringToFrontCommand=e.extend({_reorder:function(){return this.range().sheet()._drawings.length}}),v.spreadsheet.SendToBackCommand=e.extend({_reorder:function(){return 0}}),n.extend({init:function(e){n.fn.init.call(this,e);this._target=e.target;this._value=e.value},exec:function(){this.getState();this.setState(this._value)}})),a=(v.spreadsheet.ColumnWidthCommand=r.extend({getState:function(){this._state=this.range().sheet().columnWidth(this._target)},setState:function(e){this.range().sheet().columnWidth(this._target,e)}}),v.spreadsheet.RowHeightCommand=r.extend({getState:function(){this._state=this.range().sheet().rowHeight(this._target)},setState:function(e){this.range().sheet().rowHeight(this._target,e)}}),v.spreadsheet.HyperlinkCommand=n.extend({init:function(e){n.fn.init.call(this,e);this._link=e.link},exec:function(){var e=this.range();this._prevLink=e.link();this._prevUnderline=e.underline();e.link(this._link);e.underline(true);if(e.value()==null){this._hasSetValue=true;e.value(this._link)}},undo:function(){var e=this.range();e.link(this._prevLink);e.underline(this._prevUnderline);if(this._hasSetValue)e.value(null)}}),v.spreadsheet.GridLinesChangeCommand=r.extend({getState:function(){this._state=this._range.sheet().showGridLines()},setState:function(e){this._range.sheet().showGridLines(e)}}),v.spreadsheet.PropertyChangeCommand=n.extend({_setRange:function(e){n.prototype._setRange.call(this,e.skipHiddenCells())},init:function(e){n.fn.init.call(this,e);this._value=e.value},exec:function(){var e=this.range();if(e.enable()){this.getState();if(this.options.property==="format")this._workbook.trigger("changeFormat",{range:e});e[this._property](this._value)}}})),c=(v.spreadsheet.ClearContentCommand=n.extend({exec:function(){var t=[],n,i,r,e,a;if(!this.range().enable())return{reason:"error",type:"cannotModifyDisabled"};if(!this.range().canEditArrayFormula())return{reason:"error",type:"intersectsArray"};this.getState();n=this.range().skipHiddenCells();if(n._ref.refs&&n._ref.refs.length>1)n._ref.refs.forEach(function(e){a=n.sheet().range(e);t=t.concat(a.values())});else t=n.values();r=[];t.forEach(function(e){i=[];e.forEach(function(){i.push(null)});r.push(i)});if(n.sheet().trigger("changing",{data:r,range:n,changeType:s.CLEAR}))return;n.clearContent();e=n._getValidationState();if(e)return this.rejectState(e)},undo:function(){var e=this.range().skipHiddenCells();var t=e.sheet();var n=this._state.data;var i=[];var r;n.forEach(function(e){r=[];e.forEach(function(e){r.push(e.value)});i.push(r)});if(t.trigger("changing",{data:i,range:e,changeType:s.CLEAR}))return;this.setState(this._state)}}),v.spreadsheet.EditCommand=a.extend({init:function(e){e.property=e.property||"input";a.fn.init.call(this,e)},_setRange:function(e){a.prototype._setRange.apply(this,arguments);this._editRange=this.options.arrayFormula?e:e.sheet().activeCellSelection()},getState:function(){this._state=this.range().getState()},exec:function(){return this.range().sheet().withCultureDecimals(this._exec.bind(this))},undo:function(){var e=this._editRange;var t=this._state;if(e.sheet().trigger("changing",{data:t.data[0][0].value,range:e,changeType:s.EDIT}))return;this.setState(this._state)},_exec:function(){var e=this.options.arrayFormula;var t=this._editRange;if(!t.enable())return{reason:"error",type:"rangeDisabled"};if(!t.canEditArrayFormula())return{reason:"error",type:"intersectsArray"};var n=this._value;this.getState();if(this.range().sheet().trigger("changing",{data:n,range:this._editRange,changeType:s.EDIT}))return;if(this._property=="value"){t.value(n);return}try{t.link(null);if(n==="")t.value(null);else{t.input(n,{arrayFormula:e});if(/\n/.test(t.value()))t.wrap(true)}t._adjustRowHeight();var i=t._getValidationState();if(i)return this.rejectState(i)}catch(e){if(e instanceof v.spreadsheet.calc.ParseError)return{title:"Error in formula",body:e+"",reason:"error"};else throw e}}}),v.spreadsheet.InsertCommentCommand=a.extend({init:function(e){e.property="comment";a.fn.init.call(this,e)}}),v.spreadsheet.TextWrapCommand=a.extend({init:function(e){e.property="wrap";a.fn.init.call(this,e);this._value=e.value},getState:function(){var n={};this.range().forEachRow(function(e){var t=e.topLeft().row;n[t]=e.sheet().rowHeight(t)});this._state=this.range().getState(this._property);this._rowHeight=n},undo:function(){var e=this.range().sheet();var t=this._rowHeight;this.range().setState(this._state);for(var n in t)e.rowHeight(n,t[n])}}),v.spreadsheet.AdjustDecimalsCommand=n.extend({init:function(e){this._delta=e.value;e.property="format";n.fn.init.call(this,e)},exec:function(){var a=this.range().sheet();var s=this._delta;var o=v.spreadsheet.formatting;this.getState();a.batch(function(){this.range().forEachCell(function(e,t,n){var i=n.format;if(!i){var r=n.value;if(typeof r=="number"&&/\./.test(r))i="0."+String(r).split(".")[1].replace(/\d/g,"0")}if(i||s>0){i=o.adjustDecimals(i||"0",s);a.range(e,t).format(i)}})}.bind(this))}}),v.spreadsheet.BorderChangeCommand=n.extend({init:function(e){e.property="border";n.fn.init.call(this,e);this._type=e.border;this._style=e.style},_batch:function(e){return this.range().sheet().batch(e,{})},exec:function(){var e=this;e.getState();e._batch(function(){e[e._type](e._style)})},noBorders:function(){this.range().insideBorders(null);this.outsideBorders(null)},allBorders:function(e){this.range().insideBorders(e);this.outsideBorders(e)},leftBorder:function(e){this.range().leftColumn().borderLeft(e)},rightBorder:function(e){this.range().rightColumn().borderRight(e)},topBorder:function(e){this.range().topRow().borderTop(e)},bottomBorder:function(e){this.range().bottomRow().borderBottom(e)},outsideBorders:function(e){var t=this.range();t.leftColumn().borderLeft(e);t.topRow().borderTop(e);t.rightColumn().borderRight(e);t.bottomRow().borderBottom(e)},insideBorders:function(e){this.range().insideBorders(e);this.outsideBorders(null)},insideHorizontalBorders:function(e){this.range().insideHorizontalBorders(e)},insideVerticalBorders:function(e){this.range().insideVerticalBorders(e)}}),v.spreadsheet.MergeCellCommand=n.extend({init:function(e){n.fn.init.call(this,e);this._type=e.value},exec:function(){this.getState();this[this._type]();this.range().sheet().triggerChange({recalc:true})},activate:function(e){this.range().sheet().activeCell(e)},getState:function(){this._state=this.range().getState()},undo:function(){if(this._type!=="unmerge"){this.range().unmerge();this.activate(this.range().topLeft())}this.range().setState(this._state)},cells:function(){var e=this.range();var t=e._ref;e.merge();this.activate(t)},horizontally:function(){var e=this.range().topRow()._ref;this.range().forEachRow(function(e){e.merge()});this.activate(e)},vertically:function(){var e=this.range().leftColumn()._ref;this.range().forEachColumn(function(e){e.merge()});this.activate(e)},unmerge:function(){var e=this.range();var t=e._ref.topLeft;e.unmerge();this.activate(t)}}),v.spreadsheet.FreezePanesCommand=n.extend({init:function(e){n.fn.init.call(this,e);this._type=e.value},exec:function(){this.getState();this._topLeft=this.range().topLeft();this[this._type]()},getState:function(){this._state=this.range().sheet().getState()},undo:function(){this.range().sheet().setState(this._state)},panes:function(){var e=this._topLeft;var t=this.range().sheet();t.frozenColumns(e.col).frozenRows(e.row)},rows:function(){var e=this._topLeft;var t=this.range().sheet();t.frozenRows(e.row)},columns:function(){var e=this._topLeft;var t=this.range().sheet();t.frozenColumns(e.col)},unfreeze:function(){var e=this.range().sheet();e.frozenRows(0).frozenColumns(0)}}),v.spreadsheet.PasteCommand=n.extend({init:function(e){n.fn.init.call(this,e);this._clipboard=e.workbook.clipboard();this._clipboard.parse();this._event=e.event;this._clipboardContent=this._clipboard._content;this._sheet=this._workbook.activeSheet();this._range=this._sheet.selection?this._sheet.selection():this._sheet.range(this._clipboard.pasteRef());this._state=this._range.getState();this._targetRangeRefs=(this._range._ref instanceof v.spreadsheet.UnionRef?this._range._ref.refs:[this._range._ref]).map(function(e){return e.toRangeRef()})},exec:function(){return this.range().sheet().withCultureDecimals(this._exec.bind(this))},undo:function(){var e=this._sheet;var t=this._range;if(e.trigger("changing",{data:this._state.data,range:t,changeType:s.PASTE}))return;this.setState(this._state)},_exec:function(){var e=this._clipboard.canPaste();if(!e.canPaste){if(e.menuInvoked)return{reason:"error",type:"useKeyboard"};if(e.pasteOnMerged)return{reason:"error",type:"modifyMerged"};if(e.pasteOnDisabled){this._event.preventDefault();return{reason:"error",type:"cannotModifyDisabled"}}return{reason:"error"}}var t=this._sheet;var n=this._range;if(this._workbook.trigger("paste",{range:n,clipboardContent:this._clipboardContent})||t.trigger("changing",{data:this._clipboardContent.data,range:n,changeType:s.PASTE})){this._event.preventDefault();return}else this._processPaste()},_adjustPasteTarget:function(u,d,l){var e=this;var t=e._targetRangeRefs;var n=e._sheet;var g=v.spreadsheet.RangeRef;var f=v.spreadsheet.UnionRef;var i=[];var p=function(e,t){var n=0;var i=e.topLeft;var r=t.topLeft;if(i.row>r.row)n=1;else if(i.row<r.row)n=-1;else if(i.col>r.col)n=1;else if(i.col<r.col)n=-1;return n};var r,a,s,o,h,c,_;for(c=0;c<t.length;c+=1){s=t[c];h=u[c];o=s.topLeft;_={row:h.rows*d+o.row-1,col:h.cols*l+o.col-1};r=new g(o,_);i.push(r)}if(i.length===1)a=n.range(r);else{i.sort(p);a=n.range(new f(i))}a.select();e._range=a;e._state=e._range.getState()},_processPaste:function(){var e=this;var t=e._sheet;var n=e._clipboardContent;var u=e._range;var i=n.data;var r=i.length;var a=i[0].length;var s=e._targetRangeRefs;var o=e._targetRanges(r,a);var h;var c=this._clipboard.pasteRef();if(c.bottomRight.row>=t._rows._count||c.bottomRight.col>=t._columns._count)t.resize(Math.max(c.bottomRight.row+1,t._rows._count),Math.max(c.bottomRight.col+1,t._columns._count));e._adjustPasteTarget(o,r,a);t.batch(function(){for(h=0;h<s.length;h++)e._populateTargetRange(s[h],r,a,o[h])},{recalc:true,ref:e._range._ref});u._adjustRowHeight()},_populateTargetRange:function(e,t,n,i){var r=e.topLeft;var a,s,o;for(s=0;s<i.rows;s++)for(o=0;o<i.cols;o++){a=this._sheet.range(r.row+t*s,r.col+n*o);a.setState(this._clipboardContent,this._clipboard)}},_targetRangeDimensions:function(e,t,n){var i=e.topLeft;var r=e.bottomRight;var a=r.row-i.row+1;var s=r.col-i.col+1;var o=1;var h=1;if(a%t===0&&s%n===0){o=a/t;h=s/n}return{rows:o,cols:h}},_targetRanges:function(e,t){var n=this._targetRangeRefs;var i=[];var r;for(r=0;r<n.length;r++)i.push(this._targetRangeDimensions(n[r],e,t));return i}}),v.spreadsheet.AdjustRowHeightCommand=n.extend({exec:function(){var e=this.options;var t=this._workbook.activeSheet();var n=e.range||t.range(e.rowIndex);n._adjustRowHeight()}}),v.spreadsheet.ToolbarPasteCommand=n.extend({exec:function(){if(v.support.clipboard.paste){this._workbook._view.clipboard.focus().select();document.execCommand("paste")}else return{reason:"error",type:"useKeyboard"}}}),v.spreadsheet.CutCommand=n.extend({_eventType:"cut",init:function(e){n.fn.init.call(this,e);this._clipboard=e.workbook.clipboard();this._event=e.event},exec:function(){var e=this._clipboard.canCopy();var t=[],n,i;if(!e.canCopy){if(e.menuInvoked)return{reason:"error",type:"useKeyboard"};else if(e.multiSelection)return{reason:"error",type:"unsupportedSelection"};return}var r=this._workbook.activeSheet().selection();if(this._eventType=="cut"){if(!r.enable()){this._event.preventDefault();return{reason:"error",type:"cannotModifyDisabled"}}this.getState()}if(this._workbook.trigger(this._eventType,{range:r}))this._event.preventDefault();else if(this._eventType=="cut"){n=r.values();n.forEach(function(e){i=[];e.forEach(function(){i.push({})});t.push(i)});if(r.sheet().trigger("changing",{data:t,range:r,changeType:s.CUT}))return;this._clipboard.cut()}else this._clipboard.copy()},undo:function(){var e=this.range();if(e.sheet().trigger("changing",{data:this._state.data,range:e,changeType:s.CUT}))return;this.setState(this._state)}}),v.spreadsheet.CopyCommand=v.spreadsheet.CutCommand.extend({_eventType:"copy",undo:t.noop}),v.spreadsheet.ToolbarCopyCommand=n.extend({init:function(e){n.fn.init.call(this,e);this._clipboard=e.workbook.clipboard()},undo:t.noop,exec:function(){if(v.support.clipboard.copy)document.execCommand("copy");else return{reason:"error",type:"useKeyboard"}}}),v.spreadsheet.AutoFillCommand=n.extend({init:function(e){n.fn.init.call(this,e)},origin:function(e){this._origin=e},exec:function(){var e=this.range(),t;if(!e.enable())return{reason:"error",type:"rangeDisabled"};if(e.intersectingArrayFormula())return{reason:"error",type:"intersectsArray"};this.getState();try{t=e._previewFillFrom(this._origin);if(e.sheet().trigger("changing",{data:t.props,range:t.dest,changeType:s.AUTO_FILL}))return;t.dest._properties(t.props,true)}catch(e){if(e instanceof v.spreadsheet.Range.FillError)return{reason:"error",type:e.code};throw e}},undo:function(){var e=this.range();var t=this._state;if(e.sheet().trigger("changing",{data:t.data,range:e,changeType:s.AUTO_FILL}))return;this.setState(this._state)}}),v.spreadsheet.ToolbarCutCommand=n.extend({cannotUndo:true,init:function(e){n.fn.init.call(this,e);this._clipboard=e.workbook.clipboard()},exec:function(){if(v.support.clipboard.copy)document.execCommand("cut");else return{reason:"error",type:"useKeyboard"}}}),v.spreadsheet.FilterCommand=n.extend({undo:function(){this.range().filter(this._state)},exec:function(){var e=this.range();this._state=e.hasFilter();e.filter(!this._state)}}),v.spreadsheet.SortCommand=n.extend({undo:function(){var e=this.range().sheet();e.setState(this._state)},exec:function(){var e=this.range();var t=e.sheet();var n=t.activeCell();var i=this.options.sheet?n.topLeft.col:this.options.column||0;var r=this.options.value==="asc"?true:false;this._state=t.getState();if(this.options.sheet)e=this.expandRange();var a=e.cantSort();if(a)return{reason:"error",type:a.code};e.sort({column:i,ascending:r})},expandRange:function(){var e=this.range().sheet();return new v.spreadsheet.Range(e._sheetRef,e)}}),v.spreadsheet.ApplyFilterCommand=n.extend({column:function(){return this.options.column||0},undo:function(){var e=this.range().sheet();e.clearFilter(this.column());if(this._state.length)this.range().filter(this._state)},getState:function(){var e=this.range().sheet();var t=e.filter();if(t)this._state=t.columns.filter(function(e){return e.index==this.column()}.bind(this))},exec:function(){var e=this.range();var t=this.column();var n=e.sheet().filter();var i;var r;var a=false;if(this.options.valueFilter)r={column:t,filter:new v.spreadsheet.ValueFilter(this.options.valueFilter)};else if(this.options.customFilter)r={column:t,filter:new v.spreadsheet.CustomFilter(this.options.customFilter)};this.getState();if(n&&n.ref.eq(e._ref)&&n.columns.length){n.columns.forEach(function(e){if(e.index===t)a=true});i=n.columns.map(function(e){return e.index===t?r:{column:e.index,filter:e.filter}});if(!a)i.push(r)}else i=r;e.filter(i)}})),o=(v.spreadsheet.ClearFilterCommand=c.extend({exec:function(){var e=this.range();var t=this.column();this.getState();e.clearFilter(t)}}),v.spreadsheet.HideLineCommand=n.extend({init:function(e){n.fn.init.call(this,e);this.axis=e.axis},undo:function(){var e=this.range().sheet();e.setAxisState(this._state)},exec:function(){var e=this.range().sheet();this._state=e.getAxisState();if(this.axis=="row")e.axisManager().hideSelectedRows();else e.axisManager().hideSelectedColumns()}}),v.spreadsheet.UnHideLineCommand=v.spreadsheet.HideLineCommand.extend({exec:function(){var e=this.range().sheet();this._state=e.getAxisState();if(this.axis=="row")e.axisManager().unhideSelectedRows();else e.axisManager().unhideSelectedColumns()}}),n.extend({exec:function(){this._expandedRange=this._expand(this.range());this._state=this._expandedRange.getState();this._indexes=this._exec(this._expandedRange.sheet())},undo:function(){var t=this;var e=t._expandedRange;var n=e.sheet();n.batch(function(){t._indexes.forEach(function(e){t._undoOne(n,e);n._restoreModifiedFormulas(e.formulas)});e.setState(t._state)},{layout:true,recalc:true,ref:e._ref,isValue:true})}})),h=(v.spreadsheet.DeleteRowCommand=o.extend({_expand:function(e){return e.resize({left:-Infinity,right:+Infinity})},_exec:function(e){return e.axisManager().deleteSelectedRows()},_undoOne:function(e,t){e.insertRow(t.index);e.rowHeight(t.index,t.height)}}),v.spreadsheet.DeleteColumnCommand=o.extend({_expand:function(e){return e.resize({top:-Infinity,bottom:+Infinity})},_exec:function(e){return e.axisManager().deleteSelectedColumns()},_undoOne:function(e,t){e.insertColumn(t.index);e.columnWidth(t.index,t.width)}}),n.extend({init:function(e){n.fn.init.call(this,e);this._value=e.value},undo:function(){var t=this;var n=t.range().sheet();n.batch(function(){for(var e=t._pos.count;--e>=0;)t._undoOne(n,t._pos.base)},{layout:true,recalc:true})}})),u=(v.spreadsheet.AddColumnCommand=h.extend({exec:function(){var e=this._value;var t=this.range().sheet();if(e==="left")this._pos=t.axisManager().addColumnLeft();else this._pos=t.axisManager().addColumnRight()},_undoOne:function(e,t){e.deleteColumn(t)}}),v.spreadsheet.AddRowCommand=h.extend({exec:function(){var e=this._value;var t=this.range().sheet();if(e==="above")this._pos=t.axisManager().addRowAbove();else this._pos=t.axisManager().addRowBelow()},_undoOne:function(e,t){e.deleteRow(t)}}),v.spreadsheet.EditValidationCommand=n.extend({init:function(e){n.fn.init.call(this,e);this._value=e.value},exec:function(){var e=this,t=e.range().sheet();this.getState();if(t.trigger("changing",{data:e._value,range:e.range(),changeType:s.VALIDATION}))return;try{t.withCultureDecimals(function(){e.range().validation(e._value)})}catch(e){if(e instanceof v.spreadsheet.calc.ParseError)return{title:"Error in formula",body:e+"",reason:"error"};else throw e}},undo:function(){var e=this.range();var t=this._state;if(e.sheet().trigger("changing",{data:t.data[0][0].validation,range:e,changeType:s.VALIDATION}))return;this.setState(this._state)}}),v.spreadsheet.OpenCommand=n.extend({cannotUndo:true,exec:function(){var e=this.options.file;if(e.name.match(/.xlsx$/i)===null)return{reason:"error",type:"openUnsupported"};var t=this.options.workbook;t.fromFile(this.options.file).then(function(){var e=t.excelImportErrors;if(e&&e.length)t._view.openDialog("importError",{errors:e})})}}),v.spreadsheet.SaveAsCommand=n.extend({cannotUndo:true,exec:function(){var e=this.options.name+this.options.extension;if(this.options.extension===".xlsx")this.options.workbook.saveAsExcel({fileName:e});else if(this.options.extension===".pdf")this.options.workbook.saveAsPDF(t.extend(this.options.pdf,{workbook:this.options.workbook,fileName:e}))}}),n.extend({init:function(e){n.fn.init.call(this,e);this._name=e.name;this._value=e.value},getState:function(){this._state=this._workbook.nameDefinition(this._name)},setState:function(){this._workbook.nameDefinition(this._name,this._state);this._workbook.trigger("change",{recalc:true})}}));v.spreadsheet.DefineNameCommand=u.extend({exec:function(){this.getState();try{this._workbook.defineName(this._name,this._value);this._workbook.trigger("change",{recalc:true})}catch(e){return{title:"Error",body:e+"",reason:"error"}}}}),v.spreadsheet.DeleteNameCommand=u.extend({exec:function(){this.getState();this._workbook.undefineName(this._name);this._workbook.trigger("change",{recalc:true})}})})?i.apply(t,n):i)||(e.exports=t)},1692:function(e,t){e.exports=require("../kendo.list")},1693:function(e,t){e.exports=require("../kendo.tabstrip")}});