/*! * * Spread.Sheets Library 11.2.2 * * 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=GC||{};GC.Spread=GC.Spread||{},GC.Spread.Sheets=GC.Spread.Sheets||{},GC.Spread.Sheets.OutlineColumn=function(a){var b={};function c(d){if(b[d])return b[d].exports;var e=b[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,c),e.loaded=!0,e.exports}return c.m=a,c.c=b,c.p="/assets/",c(0)}([function(a,b,c){!function(){"use strict";var b=c(1);c(4),a.exports=b}()},function(a,b,c){!function(){"use strict";var b,d,e,f,g,h,i=c(2),j=c(3),k=c(4).commands,l=c(4).setCheckStatus,m=j.k,n=m.ac,o=i.GC$,p=o.each,q=o.isEmptyObject,r=j.j.Fa,s=5,t=6,u=6,v=3,w=16,x=16,y=16,z=16,A=void 0,B={columnIndex:A,showCheckBox:!1,showImage:!1,images:A,showIndicator:!0,expandIndicator:A,collapseIndicator:A,maxLevel:10};function C(a){return a.expandIndicator||a.collapseIndicator}function D(a,b){return a.outlineColumn&&a.outlineColumn.options()&&a.outlineColumn.options().columnIndex===b}function E(a,b,c){var d=b.x+c.x,e=c.y+c.height/2-b.height/2,f=b.height,g=b.width;c.x+c.width0?a.group(b,1):a.ungroupRange(b,1)}function K(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o,p=L(c,"showIndicator");p?(h=a.zoom(),i=a.getRowCount(),j=!!a.rowOutlines.isCollapsed(b+1),k=s*h,l=t*h,m=null,n=null,c.expandIndicator&&(m=c.expandIndicator,j&&(k=y*h,l=z*h)),c.collapseIndicator&&(n=c.collapseIndicator,j||(k=y*h,l=z*h)),be?g.indicator={x:f.value+v*h,y:-l/2,width:k,height:l,collapsed:j,collapseIndicator:n,expandIndicator:m}:delete g.indicator),f.value+=2*v*h+k):delete g.indicator}function L(a,b){return r(a[b])?B[b]:a[b]}function M(a,b,c,d,e,f){var g,h,i=r(c.showCheckBox)?B.showCheckBox:c.showCheckBox;i?(g=!r(f.checkBox)&&1!==f.checkBox&&f.checkBox.checkStatus,h=a.zoom(),f.checkBox={x:e.value+v*h,y:-u*h,width:2*u*h,height:2*u*h,checkStatus:g},e.value+=2*v*h+2*u*h):delete f.checkBox}function N(a,b,c,d,e){var f,g,h,i,j,k=r(c.showImage)?B.showImage:c.showImage;k?(f=c.images,g=a.zoom(),f&&f.length&&(h=b>f.length-1?f[f.length-1]:f[b],i=d.value+v*g,j=0,e.images={image:h,x:i,y:j,width:w*g,height:x*g},d.value+=2*v*g+w*g)):delete e.images}function O(a,b,c){var d,e,f,g,h=a.outlineColumn.options(),i=h&&h.columnIndex;if(!r(i))return d={value:0},e=0,f=a.getStyle(b,i),f&&f.textIndent&&(e=f.textIndent),0!==b&&(g=a.rowOutlines.getLevel(b-1),e-g>=3&&(e=g+2)),d.value+=8*e,J(a.rowOutlines,b,e),K(a,b,h,i,e,d,c),M(a,b,h,i,d,c),N(a,e,h,d,c),c.cellContent={left:d.value,x:d.value,y:0,width:-d.value,height:0},c}b=function(a){this.kj=a,this.outlineColumnOptions={},this.$e=0},b.prototype={LRa:function(a,b){return this.ZQa(b)?this.Kia.QR[a].cellContent.left:null},options:function(a){var b=this,c=b.YQa;return n(arguments)?(b.YQa=a,b.refresh(),b):c},refresh:function(){var a=this.kj;r(this.YQa)||r(this.YQa.columnIndex)||0===this.$e&&(a.suspendPaint(),a.outlineColumn.Kia.updateModel(),a.resumePaint())},setCheckStatus:function(a,b){var c=this.YQa.columnIndex;r(c)||I(this.kj,a,c,b)},getCheckStatus:function(a){var b,c;if(n(arguments))return this.kj.outlineColumn.Kia.getCheckStatus(a);for(b=[],c=this.kj.getRowCount(),a=0;a0&&this.$e--,0===this.$e&&this.refresh()},Nia:function(a,b){this.kj.outlineColumn.Kia.insertRows(a,b)},Oia:function(){return B},Pia:function(){return{TRIANGLE_HEIGHT:s,TRIANGLE_BASE:t,CHECKBOX_RADIUS:u,GAP:v,IMAGE_WIDTH:w,IMAGE_HEIGHT:x,INDICATOR_IMAGE_WIDTH:y,INDICATOR_IMAGE_HEIGHT:z}},Gka:function(a){var b,c,d=this;for(b in a)a.hasOwnProperty(b)&&(c=d.Kia.QR[b]=d.Kia.QR[b]||{},c.checkBox={checkStatus:a[b].checked})},CXa:function(a,b){var c=this.YQa.columnIndex;r(c)||l(this.kj,a,c,b)},QZa:function(){return this.Kia.QR}},d=function(){function a(a){var b=this;b.kj=a,b.QR={}}var b={updateIndicatorCollapsed:function(a,b){var c=this;r(c.QR[a])||r(c.QR[a].indicator)||(c.QR[a].indicator.collapsed=b)},updateCheckStatus:function(a,b){var c=this;c.JVa(a),r(c.QR[a])||(c.QR[a].checkBox.checkStatus=b)},getCheckStatus:function(a){var b=this;return r(b.QR[a])||r(b.QR[a].checkBox)?null:b.QR[a].checkBox.checkStatus},getCollapsed:function(a){var b=this;return!r(b.QR[a])&&!r(b.QR[a].indicator)&&b.QR[a].indicator.collapsed},updateModel:function(){var a,b=this,c=b.kj,d=c.getRowCount();for(c.rowOutlines.direction(0),a=0;a0&&c.height>0&&(b=d.outlineColumn.Kia.QR[f],b&&(h.save(),b.indicator&&F(h,b.indicator,c,e.imageLoader),b.checkBox&&E(h,b.checkBox,c),b.images&&G(h,b.images.image,b.images,c,e.imageLoader),h.restore(),b.cellContent&&(c.x+=b.cellContent.left,c.width-=b.cellContent.left)))},getCellPaddingRect:function(a){var b,c=a.options.rect,d=a.options.context.sheet,e=a.options.context,f=e.row,g=e.col;D(d,g)&&c.width>0&&c.height>0&&(b=d.outlineColumn.Kia.QR[f],b&&b.cellContent&&(c.x+=b.cellContent.left,c.width-=b.cellContent.left))},getCellPaddingHitInfo:function(a){var b,c,d,e,f=a.context.sheet,g=a.context.col,h=a.context.row,i=a.x,j=a.y,k=a.cellRect,l=f.outlineColumn;if(a.paddingHitInfo=null,l&&l.YQa){for(b=l.Kia.QR[h],c=l.YQa.columnIndex;g>c;)g--,k.x-=f.getColumnWidth(g);b&&(b.indicator&&(d=b.indicator.x,e=b.indicator.x+k.x,i>=e&&i=e&&i=e&&i=k.x&&il&&!c[h-1])||(m=j+e,n=a.outlineColumn.options(),o=k(n.maxLevel)?a.outlineColumn.Oia().maxLevel:n.maxLevel,o&&m+1>o||m+1<0||(c[h]={row:h,original:j+1,current:m+1},i=!0)));return i?c:null}function s(a,b,c,d){var e,f,g,h=r(a,b,c,d);if(!h)return null;e=k(d)?a.getActiveColumnIndex():d,a.outlineColumn.Lia(),a.suspendPaint();for(f in h)Object.prototype.hasOwnProperty.call(h,f)&&(g=h[f],a.getCell(g.row,e).textIndent(g.current));a.resumePaint(),a.outlineColumn.Mia()}function t(a,b,c,d){var e,f,g,h,i,j=0,k=0,l=a.rowOutlines.getLevel(b);if(a.outlineColumn.Kia.updateCheckStatus(b,d),f=b<=a.getRowCount()-2?a.rowOutlines.find(b+1,l+1):null,null!==f&&null!==d)for(g=f.start;g0){for(j=f.start-1,k=a.rowOutlines.getLevel(j),a.outlineColumn.Kia.updateCheckStatus(j,d),e=a.rowOutlines.find(j+1,k+1),g=e.start;g