/*! * * SpreadJS Library 13.1.0 * * Copyright(c) GrapeCity, Inc. All rights reserved. * * Licensed under the SpreadJS Commercial License. * us.sales@grapecity.com * http://www.grapecity.com/en/licensing/grapecity/ * * */ var GC="object"==typeof GC?GC:{};GC.Spread=GC.Spread||{},GC.Spread.Sheets=GC.Spread.Sheets||{},GC.Spread.Sheets.StatusBar=function(a){var b={};function c(d){if(b[d])return b[d].exports;var e=b[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,c),e.l=!0,e.exports}return c.m=a,c.c=b,c.d=function(a,b,d){c.o(a,b)||Object.defineProperty(a,b,{enumerable:!0,get:d})},c.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},c.t=function(a,b){var d,e;if(1&b&&(a=c(a)),8&b)return a;if(4&b&&"object"==typeof a&&a&&a.__esModule)return a;if(d=Object.create(null),c.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&b&&"string"!=typeof a)for(e in a)c.d(d,e,function(b){return a[b]}.bind(null,e));return d},c.n=function(a){var b=a&&a.__esModule?function b(){return a.default}:function b(){return a};return c.d(b,"a",b),b},c.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},c.p="/assets/",c(c.s="./dist/plugins/statusBar/statusBar.entry.js")}({"./dist/plugins/statusBar/baseStatusBar.js":function(a,b,c){"use strict";var d,e,f,g,h,i,j,k;Object.defineProperty(b,"__esModule",{value:!0}),d=c("Core"),e=c("./dist/plugins/statusBar/statusItem.js"),f=d.GC$,g="statusItem",h=null,i="left",j="right",k=function(){function a(a){this.yzb=[],this.zzb=[],this.Azb=[],this.mi=0,this.qo=h,this.ET=a,this.Bzb()}return a.prototype.Bzb=function(){var a=this.qo,b=this.Czb;a||(a=this.qo=document.createElement("div"),b=this.Czb=document.createElement("div")),this.ET.appendChild(a),this.ET.appendChild(b)},a.prototype.Dzb=function(a){a.name||(a.name=g+this.mi,this.mi++)},a.prototype.mL=function(a,b){return a instanceof e.StatusItem&&!this.Jp(a.name)&&(this.Dzb(a),b>=0&&b=0&&b=0&&e1){for(f.push(b[0]),c=1;c0&&a<=4&&(b=Math.floor(+parseFloat((100*a).toPrecision(12)))),b}function $a(a,b,c){a&&a.parent&&a.parent.options.allowUserZoom&&c!==b&&(a.wu().execute({cmd:ma,sheetName:a.name(),newZoomFactor:b,oldZoomFactor:c}),bb(a,b,c))}function _a(a){for(var b,c,d,e={top:a.offsetTop,left:a.offsetLeft},f=a.offsetParent;f;)e.top+=f.offsetTop,e.left+=f.offsetLeft,f=f.offsetParent;return b=document.body,c=b.clientTop,d=b.clientLeft,isNaN(c)||(e.top+=c),isNaN(d)||(e.left+=d),e}function ab(a){return""!==a}Ma=function(a){Sa(b,a);function b(b,c){var d=a.call(this,b,c)||this;return d.Rzb=ta+d.name,d}return b.prototype.onBind=function(a){var b=this,c;b.xc=a,a.bind(d.Events.EditorStatusChanged+b.Rzb,function(a,d){c=b.Szb(d.newStatus),b.Tzb(c)}),a.bind(d.Events.ActiveSheetChanged+b.Rzb,function(){b.onUpdate()})},b.prototype.onUpdate=function(){var b,c,d;a.prototype.onUpdate.call(this),b=Ta(this.xc),b&&(c=b.editorStatus(),d=this.Szb(c),this.Tzb(d))},b.prototype.Szb=function(a){var b;switch(a){case 0:b=La().cellModeReady;break;case 1:b=La().cellModeEnter;break;case 2:b=La().cellModeEdit}return b},b.prototype.Tzb=function(a){if(a!==this.value){this.value=a,this.tipText=q(La().toolTipCellMode,[a]);var b=this.TJa;b&&(b.parentElement.title=this.tipText,r(this.value)||(b.innerText=this.value+""))}},b.prototype.onUnbind=function(){this.xc&&(this.xc.unbind(d.Events.EditorStatusChanged+this.Rzb),this.xc.unbind(d.Events.ActiveSheetChanged+this.Rzb),this.xc=u)},b}(j.StatusItem),Na=function(a){Sa(b,a);function b(b,c){var d=a.call(this,b,c)||this;return d.Uzb=": ",d.Uk=c.prefix,d.Rzb=ta+d.name,d.ZLb=Number.MAX_VALUE,d}return b.prototype.onBind=function(a){var b=this;b.xc=a,a.bind(d.Events.SelectionChanging+b.Rzb,function(a,c){b.Vzb(c)}),a.bind(d.Events.SelectionChanged+b.Rzb,function(a,c){b.Vzb(c)}),a.bind(d.Events.ValueChanged+b.Rzb,function(a,c){var d=c.sheet,e=c.row,f=c.col;d.vp(e,f)&&b.onUpdate()}),a.bind(d.Events.RangeChanged+b.Rzb,function(){b.onUpdate()}),a.bind(d.Events.DragFillBlockCompleted+b.Rzb,function(){b.onUpdate()}),a.bind(d.Events.ActiveSheetChanged+b.Rzb,function(){b.onUpdate()})},b.prototype.$Lb=function(a){var b=Ta(this.xc),c=0;return a.forEach(function(a){var d=b.Tq(a);c+=d.rowCount*d.colCount}),c1&&(p=n(a,Ua(xa,b)),p>0&&(c=n(a,Ua(va,b)),d=n(a,Ua(ya,b)),e=n(a,Ua(za,b)),f=n(a,Ua(Aa,b)),t(c)||t(d)||t(e)||t(f)||(h=a.getActiveRowIndex(),i=a.getActiveColumnIndex(),j=a.getCellType(h,i),k=Ya(a,h,i),l={},r=j.format(c,k,l),s=j.format(d,k,l),v=j.format(e,k,l),q=j.format(f,k,l))))),m={},m.average=r,m.numericalCount=p>0?p:u,m.min=s,m.max=v,m.sum=q,m.count=o>1?o:u,m},b.prototype.Xzb=function(a){this.Qzb&&(this.Qzb.style.display=a?$:Y)},b.prototype.Tzb=function(a){var b=this.Uzb,c=this.TJa,d=this.Uk,e=this.visible,f=!1;this.value=a,c.innerText=d+b+a,!r(a)&&e&&(f=!0),this.Xzb(f)},b.prototype.Av=function(a){if(a){var b=a.menuContent,c=a.tipText;this.menuContent=b,this.Uk=b,this.tipText=c,this.Qzb.title=c}},b.prototype.onUpdate=function(){var b,c,d,e,f,g;a.prototype.onUpdate.call(this),b=this,c=Ta(b.xc),c&&(d=c.getSelections(),b.$Lb(d)?1===d.length&&1===d[0].rowCount&&1===d[0].colCount?(e=b.Wzb(c,u),b.Tzb(e[b.name])):(f=b._Lb(Wa(c,d)),ab(f)?(e=b.Wzb(c,f),g=e[b.name],(r(g)||g!==b.value)&&(b.value=g,b.Tzb(g))):r(b.value)&&b.Xzb(!1)):b.Tzb(u))},b.prototype.onUnbind=function(){this.xc&&(this.xc.unbind(d.Events.SelectionChanging+this.Rzb),this.xc.unbind(d.Events.SelectionChanged+this.Rzb),this.xc.unbind(d.Events.ValueChanged+this.Rzb),this.xc.unbind(d.Events.RangeChanged+this.Rzb),this.xc.unbind(d.Events.DragFillBlockCompleted+this.Rzb),this.xc.unbind(d.Events.ActiveSheetChanged+this.Rzb),this.xc=u)},b.prototype._Lb=function(a,b,c,d,e){var h,i=this.kh;return i||(i=this.kh=new f.Parser),h=this.Dh,h||(h=this.Dh=new g.SheetParserContext(u,(!!e),f.pf(b,c))),g.CLb(i,h,a,b,c,d)},b.prototype.onDispose=function(){a.prototype.onDispose.call(this),this.kh=u,this.Dh&&(this.Dh.no(),this.Dh=u)},b}(j.StatusItem),Oa=function(a){Sa(b,a);function b(b,c,d){var e=a.call(this,c,d)||this;return e.min=aa,e.max=ba,e.middle=ca,e.step=ea,e.Yzb=fa,e.Zzb=ga,e.$zb=ha,e._zb=Math.round((e.$zb+e.Yzb)/2),e.aAb=Math.round((e.$zb+e.Zzb)/2),e.bAb=!1,e.cAb=b,e.Rzb=ta+e.name,e}return b.prototype.onCreateItemView=function(a){var b,c,d,e,f,g,h,i,j=this,k=j._v,m=k+M;a.style.display=this.visible?Z:Y,b=this.dAb,b||(b=this.dAb=n(W)),l(b).addClass(F),b.style.height=m,b.style.lineHeight=m,c=this.eAb,c||(c=this.eAb=n(W)),c.title=La().toolTipZoomOut,l(c).addClass(y),c.style.height=m,c.addEventListener(oa,function(){j.fAb(!1)}),d=this.gAb,d||(d=this.gAb=n(W)),l(d).addClass(G),d.style.height=m,d.style.lineHeight=m,e=this.hAb,e||(e=this.hAb=n(W)),e.title=La().toolTipZoomIn,l(e).addClass(z),e.style.height=m,e.addEventListener(oa,function(){j.fAb(!0)}),f=this.iAb,f||(f=this.iAb=n(W)),l(f).addClass(A),f.style.marginTop=Math.floor(k/2+1)+M,f.addEventListener(oa,function(){return!1}),g=this.jAb,g||(g=this.jAb=n(W)),l(g).addClass(C),g.style.top=Math.floor((k-ja)/2+1)+M,g.style.left=j._zb+M,h=this.kAb,h||(h=this.kAb=n(W)),h.title=La().toolTipSlider,l(h).addClass(D),h.style.top=Math.floor((k-ka)/2+1)+M,h.style.right=j.aAb+M,h.addEventListener(pa,function(){j.bAb=!0}),document.addEventListener(qa,function(){j.bAb=!1}),document.addEventListener(ra,function(a){if(j.bAb){var b=a.pageX,c=_a(f).left,d=f.offsetWidth,e=j.Zzb,g=c+d+e-b;j.lAb(g)}}),i=this.mAb,i||(i=this.mAb=n(W)),i.title=La().toolTipSlider,l(i).addClass(B),i.style.height=m,i.style.lineHeight=m,i.addEventListener(oa,function(a){var b,c,d,e=a.target;e!==h&&(e===g?b=j.aAb:(c=a.offsetX,d=i.offsetWidth,b=d-c),j.lAb(b))}),b.appendChild(c),a.appendChild(b),i.appendChild(g),i.appendChild(f),i.appendChild(h),a.appendChild(i),d.appendChild(e),a.appendChild(d)},b.prototype.M4=function(){this.xc&&this.xc.focus()},b.prototype.onBind=function(a){cb(this,a)},b.prototype.onUpdate=function(){db(this)},b.prototype.fAb=function(a){var b,c=this,d=this.value;d%10===0?d=a?d+this.step:d-this.step:(b=d/10,d=a?Math.ceil(b):Math.floor(b),d=10*d),d=d>this.max?this.max:d,d=dl.$zb&&(a=l.$zb+l.Zzb),c=l.value/100,d=l.aAb,e=l.$zb,f=3*l.Zzb/2,g=l.min,h=l.middle,i=l.max,j=a<=d?(d-a)/d*(i-h)+h:(e-a+f)/d*(h-g)+g,j<=g+5?j=g:j>=i-5&&(j=i),b=j/100,k=Ta(this.xc),$a(k,b,c),l.M4()},b.prototype.nAb=function(a){if(a){a=Za(a);var b=Ta(this.xc);$a(b,a/100,this.value/100),this.M4()}},b.prototype.oAb=function(a){var b=this,c=b.min,d=b.middle,e=b.max,f=b.Zzb,g=b.aAb,h=b.$zb,i;i=a<=d?(a-c)/(d-c)*g-f/2:(a-d)/(e-d)*g+g-f/2,i=h-i,this.pAb(i)},b.prototype.pAb=function(a){var b,c=this,d=c.Zzb/2,e=c.Zzb;a<=e?a+=e:ax?b:x,c=this.IAb(),this.Qzb=c,this.onCreateItemView(c),this.QQ(c)},a.prototype.IAb=function(){var a=this.Qzb,b=this._v&&this._v+w;return a||(a=this.Qzb=f(k),a.title=this.tipText,g(a).addClass(j),g(a).css({height:b,lineHeight:b,float:this.align,marginLeft:this._marginLeft+"",marginRight:this._marginRight+""}),this.visible===!1&&(a.style.display=m)),a},a.prototype.onCreateItemView=function(a){var b=this.TJa;b||(b=this.TJa=f(l),b.innerText=this.value+""),a.appendChild(b)},a.prototype.onBind=function(a){},a.prototype.QQ=function(a){a.addEventListener(o,this.sAb.bind(this)),a.addEventListener(p,this.uAb.bind(this))},a.prototype.Gzb=function(){return this.Qzb},a.prototype.sAb=function(a){},a.prototype.uAb=function(a){},a.prototype.Mzb=function(){var a=this.JAb();return a.type=u,a.workArea=u,a},a.prototype.Nzb=function(a){this.visible=!a.visible,this.onUpdate()},a.prototype.JAb=function(){var a=this.showStatusInContexMenu?this.KAb():null;return z(this.name,this.menuContent,this.visible,a)},a.prototype.KAb=function(){return this.value},a.prototype.D4=function(){this.Qzb&&(this.Qzb.style.display=this.visible?n:m)},a.prototype.Av=function(a){a&&(this.menuContent=a.menuContent,this.tipText=a.tipText,this.Qzb.title=this.tipText)},a.prototype.onUpdate=function(){this.D4()},a.prototype.onUnbind=function(){},a.prototype.onDispose=function(){this.onUnbind(),this.TJa=q,this.Qzb&&(this.Qzb.removeEventListener(o,this.sAb),this.Qzb.removeEventListener(p,this.uAb),g(this.Qzb).empty(),this.Qzb=q)},a}(),b.StatusItem=y},CalcEngine:function(a,b){a.exports=GC.Spread.CalcEngine},Common:function(a,b){a.exports=GC.Spread},ContextMenu:function(a,b){a.exports=GC.Spread.Sheets.ContextMenu},Core:function(a,b){a.exports=GC.Spread.Sheets},SheetsCalc:function(a,b){a.exports=GC.Spread.Sheets.CalcEngine}});