@grapecity-software/spread-sheets-touch 18.0.4 → 18.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * SpreadJS Library 18.0.4
3
+ * SpreadJS Library 18.0.6
4
4
  *
5
5
  * Copyright(c) GrapeCity Software inc. All rights reserved.
6
6
  *
@@ -9,4 +9,4 @@
9
9
  * https://www.grapecity.com.cn/developer/spreadjs
10
10
  *
11
11
  */
12
- !function(t){var n;"object"==typeof module&&"object"==typeof module.exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-sheets-core"),module.exports=t(n)):"function"==typeof define&&define.amd?define(["@grapecity-software/spread-common","@grapecity-software/spread-sheets-core"],t):"object"==typeof exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-sheets-core"),exports.Spread=t(n)):t(GC)}(function(n){!function(){"use strict";var i,r,t;function e(t){var n,n,n=r[t];return void 0!==n||(n=r[t]={exports:{}},i[t].call(n.exports,n,n.exports,e)),n.exports}i={"./dist/plugins/touch/touch.entry.js":function(t,n,i){var r,e,r=this&&this.__createBinding||(Object.create?function(t,n,i,r){void 0===r&&(r=i);var e=Object.getOwnPropertyDescriptor(n,i);e&&("get"in e?n.__esModule:!e.writable&&!e.configurable)||(e={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,r,e)}:function(t,n,i,r){t[r=void 0===r?i:r]=n[i]}),e=this&&this.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||r(n,t,i)};Object.defineProperty(n,"__esModule",{value:!0}),e(i("./dist/plugins/touch/touch.js"),n)},"./dist/plugins/touch/touch.js":function(k,t,P){var N,Y,F,P,I,P,O,D,_,c,a,Z,Q,L,z,r,M,p,S,j,G,J,K,o,X,V,W,q,$,tt,h,nt,it,rt,et,ot,ut,ft,st,ct,at,v,u,ht,vt,At,B,lt,w,wt,H,L,f,dt,pt,gt,mt,Ct,bt,b,Mt,xt,yt,Et,kt,Pt,Ft,It,Ot,Bt,Nt,Yt,St,jt,Ht,Tt,Ut,T,Rt,Dt,_t,Zt,Qt,Lt,zt,Gt,Jt,Kt,Xt,A,Vt,Wt,qt,$t,tn,nn,rn,en,on,un,fn,sn,cn,an,hn;function U(t){return t.height}function R(t){return t.width}function vn(t){clearInterval(t)}function l(){return(new Date).valueOf()}function An(t,n){var i,r,e,o,u,f,s,t;return t&&n&&(o=e=i=13,f=u=r=15,s=t.X-n.X,t=t.Y-n.Y,S(s)<13)&&S(t)<13&&V(s*s+t*t)<j(15,15)}function d(t){var t=t.jg();return t instanceof F.Worksheet?t:t&&t.Mf}function m(t){return t.getSelections()}function ln(t){return t.frozenTrailingColumnCount()}function wn(t){return t.frozenTrailingRowCount()}function dn(t,n){return t.getColumnCount(n)}function pn(t,n){return t.getRowCount(n)}function gn(t){var t=O(t).offset(),n=B.body,i=0,r=0;return t&&(i=t.top+n.clientTop||0,r=t.left+n.clientLeft||0),{A0:i,I0:r}}function n(){var t=this;t.j0t=[],t.WTt={length:0},t.QTt=new Ct,t.KTt=new bt}function mn(t,n){var n=K(n.Y,n.X)-K(t.Y,t.X);return o<n?n-=2*o:n<-o&&(n+=2*o),n}function Cn(t,n){return V((n.X-t.X)*(n.X-t.X)+(n.Y-t.Y)*(n.Y-t.Y))}function bn(t,n,i){var r,e,t,n,r,r=new b(i._Center.X,i._Center.Y),e=new b(n.X-r.X,n.Y-r.Y),t=new b(t.X-r.X,t.Y-r.Y),n=j(1,J(Cn(n,r)/i._Radius,4)),r=mn(e,t);return u(r)?0:r*n}function Mn(t){return S(t)<=2220446049250313e-31}function xn(t,n){var i=!1,r=!1,e;return{JTt:i=0!==t&&(e=W(n/t)/o*180)<20?!0:i,XTt:r=0===t||75<(e=W(n/t)/o*180)&&e<105?!0:r}}function i(){var t=this;t.qTt=0,t.$Tt=0,t.tAt=1,t.nAt=0,t.eAt=0,t._process=0,t.rAt=511,t.oAt=new Ft,t.aAt=20,t.uAt=new Mt}function yn(){}function En(t,n){this.X=t,this.Y=n}function kn(t){return new b(t?X(t.X):-1,t?X(t.Y):-1)}function e(){var t=this;t.DU=0,t.ak=0,t.sAt=10,t.cAt=[]}function Pn(t,n,i,r,e){var o=this;t?o.cAt=t:(o.fAt=new b(n,i),o.lAt=r,o.hAt=e)}function Fn(t){this.dAt=t,this.vAt=0}function In(t){this.dAt=t,this.vAt=0}function On(t,n){var i=this;i.mAt=t,i.gAt=n,i.pAt=0,i.bAt=0,i.vAt=0,i.yAt=V(t*t+n*n)}function Bn(){var t=this;t.wAt=new b(0,0),t.tW=0,t.MAt=0,t.CAt=0}function Nn(){this.wY=[]}function Yn(t,n,i){var r=this;r.nW=t,r.SAt=n,r.TAt=i}function Sn(t,n,i,r,e){var o=this;o.qZ=t,o.nW=n,o.AAt=i,o.JZ=r,o.TAt=e}function jn(t,n,i,r,e,o){var u=this;u.qZ=t,u.nW=n,u.SAt=i,u.AAt=r,u.JZ=e,u.TAt=o}function Hn(t,n,i,r,e,o,u){var f=this;f.qZ=t,f.nW=n,f.SAt=i,f.TAt=r,f.IAt=e,f.xAt=o,f.NAt=u}function Tn(t,n,i,r){var e=this;e.qZ=t,e.kAt=n,e.nW=i,e.JZ=r}function Un(t,n,i,r){var e=this;e.qZ=t,e.KZ=n,e.DAt=i,e.JZ=r}function Rn(t){this.JZ=t}function Dn(t){this.JZ=t}function _n(t){this.JZ=t}function Zn(t,n){var t=t*n;return 4<t?t=4:t<.5&&(t=.5),t}function Qn(t){this.Mf=t}function Ln(t,n,i,r){var e,o,i,u,f,s,c,a,h,v,v,A,l,w,d,c,e=i,o=0,i=0,u=t.Jt,c=t.Fi(),a=c.Cy,h=t.dw(1).findRow(e),v=t.parent,v=v&&v.options.scrollByPixel&&v.options.scrollbarMaxAlign;if(h)if(0<n){for(f=t.vw(-1),o=a-h.y;f<e&&o<n;)o+=u.Gt(--e);i=n-o}else if(n<0){if(A=0,l=r,v){if(w=t.frozenRowCount(),d=t.getRowCount()-t.frozenTrailingRowCount()-1,s=(c=t.gw(t.Sy(c),w,d)).Ky,A=c.Xy,l=r+n,s<e||e===s&&l<A)return M}else s=t.mw().Ky;for(o=-(h.y+U(h)-a);e<s&&n<o;)o-=u.Gt(++e);i=n-o,v&&e===s&&l<A&&(n=(i=A+u.Gt(e))+o)}return{Ky:e,Xy:i,_At:n}}function zn(t,n,i,r){var e,o,i,u,f,s,c,a,h,v,A,v,A,l,w,d,c,e=i,o=0,i=0,s=t.Jt,c=t.Fi(),a=c.Py,h=t.yw(1).findCol(e),v=t.parent,A=t.options.rightToLeft,v=v&&v.options.scrollByPixel&&v.options.scrollbarMaxAlign;if(h)if(A){if(0<n){for(f=t.Mw().iw,o=c.b6-h.x;e<f&&o<n;)o+=s.Kt(++e);i=n-o}else if(n<0){for(u=t.ww(-1),o=-(h.x+h.width-c.b6);u<e&&n<o;)o-=s.Kt(--e);i=n-o}}else if(0<n){for(u=t.ww(-1),o=a-h.x;u<e&&o<n;)o+=s.Kt(--e);i=n-o}else if(n<0){if(A=0,l=r,v){if(w=t.frozenColumnCount(),d=t.getColumnCount()-t.frozenTrailingColumnCount()-1,f=(c=t.Cw(t.Gy(c),w,d)).iw,A=c.Xy,l=r+n,f<e||e===f&&l<A)return M}else f=t.Mw().iw;for(o=-(h.x+R(h)-a);e<f&&n<o;)o-=s.Kt(++e);i=n-o,v&&e===f&&l<A&&(n=(i=A+s.Kt(e))+o)}return{iw:e,Xy:i,EAt:n}}function Gn(t,n){return ht(-n/(t/n+1)+n+"")}function Jn(t,n){return ht(n*(-n/(t-n)-1)+"")}function C(t,n,i,r,e,o){t.fillStyle=n,t.fillRect(i,r,e,o)}function Kn(t,n,i,r,e){var o,u,f,u,s,c,a,h,u=F.I.He(0,"gc-columnHeader-normal"),f=u&&u.backgroundImage,u=u&&u.backgroundColor;if(f&&-1!==f.indexOf("linear-gradient"))for(s=F.mt.ri(f),o=t.createLinearGradient(n+r/2,i,n+r/2,i+e),c=0,a=s.length;c<a;c++)h=s[c],o.addColorStop(h.point,h.color);else u&&(o=u);return o}function Xn(){var t=F.I.He(0,"gc-rowHeader-normal");return t&&t.backgroundColor}function Vn(t,n){var i,r,e,o,e,u,e,f,s,r,c,a,h,v,A,l,w,d,p,g,u,e,m,A,m,A,A,m,A,m,g,e,p,i=t.Fi(),r=t.Dn,e=t.options,o=t.options.rightToLeft,e=e.sheetAreaOffset,u=e.left,e=e.top,f=r.R7(!1),s=r.J(),r=r._7(),A=t.dw(1),l=qn(t),w=i.J7,d=i.Uy,p=i.X7,g=i.Ty,c=i.BA,u=1<=u?1:0,e=1<=e?1:0,h=R(i);s.save(),r.save(),m=t.vw(-1),(A=A.findRow(m))&&(a=i.Cy,0<(v=A.y-a-1-e))&&(n?(m=i.XC,C(s,A=Xn(),c,a,m-1,v+1),C(r,A,c,a,m-1,v+1),C(s,f,A=o?i.x:c+m,a,m=o?h-m:h-m-l.width,v),C(r,f,A,a,m,v)):(C(s,f,c,a,h,v),C(r,f,c,a,h,v))),H<g&&(C(s,f,c,p,h,v=g-H-e),C(r,f,c,p,h,v)),A=t.yw(1),a=i.LA,v=U(i),m=t.ww(-1),(g=A.findCol(m))&&(o?(c=i.b6,c-=h=c-(g.x+g.width)):(c=i.Py,h=g.x-c-1-u),0<h)&&(n?(C(s,p=Kn(s,c,a,h+1,(e=i.qC)-1),c,a,h+1,e-1),C(r,p,c,a,h+1,e-1),C(s,f,c,a+e,h,v-e-l.height),C(r,f,c,a+e,h,v-e-l.height)):(C(s,f,c,a,h,v),C(r,f,c,a,h,v))),H<d&&(h=d-H-u,C(s,f,w,a,h=o&&w+h>=i.b6?i.b6-w:h,v),C(r,f,w,a,h,v)),r.restore(),s.restore()}function Wn(t,n,i,r,e,o){t.beginPath(),t.strokeStyle=n,t.moveTo(i,r),t.lineTo(e,o),t.stroke()}function qn(t){var n,i=t.options.sheetAreaOffset;return t.gj&&t.gj()||{x:i.left,y:i.top,width:0,height:0}}function $n(t,n){var i,r,e,o,u,f,s,u,s,c,a,h,c,u,t,c,i=t.Fi(),r,e=t.Dn.J(),o=t.options.rightToLeft,u=t.dw(1),f=qn(t),s=t.vw(-1),u=u.findRow(s),s=Q("gc-group").color;u&&(c=i.Cy,0<(a=u.y-c))&&n&&0<f.width&&0===i.XC&&Wn(e,s,h=o?i.BA-.5:i.b6-.5,c,h,u.y),c=t.yw(1),u=t.ww(-1),(t=c.findCol(u))&&(c=h=void 0,o?(h=i.b6,h-=c=h-(t.x+t.width)):(h=i.Py,c=t.x-h),0<c)&&n&&0<f.height&&0===i.qC&&Wn(e,s,h,i.T6-.5,h+c,i.T6-.5)}function ti(t,n){var i,r,e,o,u,u,r,f,s,c,a,h,v,A,h,A,A,h,t,i=t.Fi(),r=t.Dn,e=t.options.rightToLeft,o=t.options.gridline.color,u=F.I.He(0,"gc-columnHeader-normal"),u=u&&u.borderBottomColor,r=r.J(),h=t.dw(1),v=qn(t),f=i.BA,c=R(i),A=t.vw(-1),h=h.findRow(A);h&&(s=i.Cy,0<(a=h.y-s))&&(Wn(r,o,f,h.y-.5,f+c-v.width,h.y-.5),n)&&(0===v.width&&Wn(r,o,i.BA-.5,s,i.BA-.5,h.y),Wn(r,u,A=e?i.BA+i.XC-.5:i.b6-.5,s,A,h.y)),A=t.yw(1),s=i.LA,a=U(i),h=t.ww(-1),(t=A.findCol(h))&&(e?(f=i.b6,f-=c=f-(t.x+t.width)):(f=i.Py,c=t.x-f),0<c)&&(Wn(r,o,t.x-.5,s,t.x-.5,s+a-v.height),n)&&(0===v.height&&Wn(r,o,f,i.LA-.5,f+c,i.LA-.5),Wn(r,u,f,i.T6-.5,f+c,i.T6-.5))}function ni(t,n){var i=0;return t||(i|=1),n||(i|=2),i}function ii(t,n){var i=0;return i=i|(0!==t?1:0)|(0!==n?2:0)}function s(t){this.Mf=t}function ri(t,n,i,r,e){var o,u,f,s,c,a,h,a,v,A,l,a,o=t.parent,u=t.rt,f=t.options,s=n.rowViewportIndex,c=n.colViewportIndex,a=m(t),h=M;return t.Oi&&0<a.length&&(v=(a=a[a.length-1]).row,A=a.row+a.rowCount-1,l=a.col,a=a.col+a.colCount-1,o&&!o.options.allowUserResize||(-1!==v&&-1===l&&0<=s&&c<0&&f.rowHeaderVisible?!(h=u.cD(t,n,e,2,r))||"sizeRow"!==h.action&&"sizeHiddenRow"!==h.action||2!==h.sheetArea||h.index===A||(h=M):-1===v&&-1!==l&&s<0&&0<=c&&f.colHeaderVisible&&(!(h=u.dD(t,n,e,1,i))||"sizeCol"!==h.action&&"sizeHiddenCol"!==h.action||1!==h.sheetArea||h.index===a||(h=M)))),h}function ei(t,n,i,r){var e,o,u,f,u,s,c,c,c;if(0===t.selectionPolicy())return M;for(e=n.hitTestType,o=ki(t),u=m(t),f=3,t.Oi&&0<u.length&&(-1!==(u=u[u.length-1]).row&&-1===u.col?f=2:-1!==u.col&&-1===u.row&&(f=1)),s=0;s<o.length;s++)if((c=o[s])&&(c.x-=R(c),c.y-=U(c),c.width*=3,c.height*=3,c.contains(i,r)))return I(n.row)&&(c=t.dw(1))&&0<c.length&&(n.row=c[c.length-1].row),I(n.col)&&(c=t.yw(1))&&0<c.length&&(n.col=c[c.length-1].col),{x:i,y:r,type:f,isHeader:!1,isFirstIndicator:0===s};return 1===e&&t.JA(-1,n.col)?{x:i,y:r,type:1,isHeader:!0}:2===e&&t.JA(n.row,-1)?{x:i,y:r,type:2,isHeader:!0}:M}function oi(t,n,i,r){var e,o,n,u,f,f,s,c,a,h,s,a,n,s,a,e=M,o=n.rowViewportIndex,n=n.colViewportIndex;if(!I(o)&&!I(n)){if(u=t.parent,f=t.U5(),0<=o&&0<=n&&1===t.Ut.getSelections().length){if(f=t.JS(f),s=ln(t),c=wn(t),a=dn(t)-s,h=pn(t)-c,1===n&&0<s&&f.col<a&&f.col+f.colCount>a&&(s=t.Yy(n))&&0<s.length&&i>(a=s[s.length-1]).x+R(a))return e;if(1===o&&0<c&&f.row<h&&f.row+f.rowCount>h&&(n=t._y(o))&&0<n.length&&r>(s=n[n.length-1]).y+U(s))return e}(a=xi(t))&&(e||(a.x-=R(a),a.y-=U(a),a.width*=3,a.height*=3,a.contains(i,r)&&(e={action:"drag",side:"corner"})),u&&u.options.allowUserDragFill||e&&"corner"===e.side&&(e.side=M))}return e}function ui(t,n,i,r){for(var e,o,u,f,s,c,a,h,v,s,e=!1,o=t.Ut.getSelections(),u=0,f=o.length;u<f;u++){if(s=o[u],a=(s=(c=3===r||I(r))?t.JS(s):s).row,h=s.col,v=s.rowCount,s=s.colCount,c)e=a<=n&&n<a+v&&h<=i&&i<h+s;else if(2===r)e=-1===h&&a<=n&&n<a+v;else if(1===r)e=-1===a&&h<=i&&i<h+s;else if(0===r)return e;if(e)break}return e}function fi(t,n,i,r,e){n===r&&i===e||(t.Ut.setCellState(n,i,F.CellStatesType.active,!1,F.SheetArea.viewport),t.k_&&t.k_(F.CellStatesType.active,n,i,F.SheetArea.viewport),t.Ut.setCellState(r,e,F.CellStatesType.active,!0,F.SheetArea.viewport),t.k_&&t.k_(F.CellStatesType.active,r,e,F.SheetArea.viewport))}function si(t,n,i,r){var n,n,e,o;n||(n=(n=m(t))[n.length-1],e=t.ui,o=t.ci,i?3===r?(t.ui=n.row+n.rowCount-1,t.ci=n.col+n.colCount-1):2===r?(t.ui=n.row+n.rowCount-1,t.ci=0):1===r&&(t.ui=0,t.ci=n.col+n.colCount-1):3===r?(t.ui=n.row,t.ci=n.col):2===r?(t.ui=n.row,t.ci=0):1===r&&(t.ui=0,t.ci=n.col),fi(t,e,o,t.ui,t.ci))}function ci(t,n,i,r){var n,n,e,o;n||(n=(n=m(t))[n.length-1],e=t.ui,o=t.ci,i&&(3===r?(t.ui=n.row,t.ci=n.col):2===r?(t.ui=n.row,t.ci=0):1===r&&(t.ui=0,t.ci=n.col)),fi(t,e,o,t.ui,t.ci))}function ai(t){return t.hitTestType}function hi(t,n,i){var r;return r=n.addRowColumnButtonHitInfo?t.K_e(ai(i)):r}function vi(t,n,i){var r=hi(t,n,i);return I(r)&&(r=t.getCellType(n.row,n.col,ai(i),{rowSpacingIndex:i.rowSpacingIndex,isAfterRowSpacing:i.isAfterRowSpacing})),n.sheet||(n.sheet=t),r}function g(t){var n=this;n.jAt=!1,n.YZ=new Ut(t),n.OAt=new Dt(t),n.Mf=t}function Ai(t,n,i){var r=this;r.kZ=i,r.AZ=new tn(n),r.DZ=new _t(n),r.xZ=new nn(t,"sheet",r.AZ,100,10),r.kZ.aW(r.xZ,!0)}function x(t,n){var n,i,t,n=hn.call(this,n,F.mt.gi(t.Ti))||this;return n.ter=F.DialogFeatureType.touch,(i=n).RAt=32,i.BAt=45,i.f$={},i.Jet=!1,i.Vv=t,t=i.Xc(),(i.LAt=t).addClass("gc-toolstrip-default ui-state-default well"),t.appendTo(i.qc()),t.hide(),i.FAt(),i.PAt(),i.aY(),n}function li(t){var t=t.WL,n=!1;return t&&t.QP().forEach(function(t){t&&t.isSelected()&&(n=!0)}),n}function wi(t,n,i){var r,e,i,r=c("span"),e=B.body;return r.className=i,r.style.font=t,r.style.cssFloat="left",r.textContent=n,e.insertBefore(r,M),i=O(r).width(),e.removeChild(r),i}function di(t,n,i,r,e){this._font="normal 12px Arial";var o=this;o.Zc=t,o._text=n,o.GAt=i,r&&(o.tT=r),e&&(o.UAt=e)}function pi(t){function n(){for(var t,n,i,t="separator",n=0,i=t+n.toString();B.getElementById(i);)i=t+(++n).toString();return i}this.Zc=n(),t&&(this.UAt=t)}function y(t){this.jS=t}function gi(t,n,i,r,e){var o=this;o.RS=t,o.HAt=i,o.zAt=n,o.VAt=r,o.YAt=e}function mi(){}function E(t){this.w2=t}function Ci(t,n,i){var r,e,t,r=this;r.AZ=new tn(r),r.xZ=new nn(t,"tabStrip",r.AZ,1,-1),r.kZ=i,r.DZ=new fn(n),e=r.DZ,(t=r.xZ).RZ=function(t){return e.BZ(t)},t.LZ=function(t){return e.FZ(t)},t.PZ=function(t){return e.GZ(t)},t.UZ=function(t){return e.HZ(t)},t.ZAt=function(t){return e.WAt(t)}}function bi(t,n,i,r){var t=t.BO();t.getState(n)?i.drawImage(t.getImage(n),r.x,r.y,R(r),U(r)):t.addImage(n)}function Mi(t,n){var i,r,e,o,u,f,f,s,c,a,f,h,v,A,h,h,l,h,s,i=t.Fi(),e=16,f=m(t);t.Oi&&0<f.length&&(s=(f=f[f.length-1]).row,c=f.row+f.rowCount-1,a=f.col,f=f.col+f.colCount-1,h=t.parent,v=t.options.rightToLeft,A="AAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADs",h&&!h.options.allowUserResize||(-1!==s&&-1===a&&t.getRowResizable(c)?(h=t.C0(c),r=w+A+"MAAA7DAcdvqGQAAABaSURBVDhPY/z//z8DLsDIyAiWBKphBAtgAUxQGgPANIMAMhsdYDUAmwZchtDOC8SCgTcA5DfcgUAEoNwFo7GAPQxwJVtsYYHVBdgU4gpInF5A1oBLMwMDAwMApuAtD6Z7YxQAAAAASUVORK5CYII=",h=U(o=t.getCellRect(c,dn(t,2)-1,h,-1)),l=v?i.BA:i.b6-16,Ei(t,c,f,o.x,o.y+h,{rowCheck:!0})&&(u=new F.Rect(l,o.y+h-8,16,16))):-1===s&&-1!==a&&t.getColumnResizable(f)&&(h=t.S0(f),r=w+A+"IAAA7CARUoSoAAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAE1JREFUOE/ljtEKACAIA/v/nzZ9mFhsJPRocLEuGS4zk/iJyyP/D6gE0wrYoCqoLoUafPl8fEBln3ulSscfErk65TMjMFRBhUowosDWBoHpba8+C7w0"+wt,s=R(o=t.getCellRect(pn(t,1)-1,f,-1,h)),l=v?o.x-8:o.x+s-8,Ei(t,c,f,o.x+s,o.y,{colCheck:!0}))&&(u=new F.Rect(l,i.T6-16,16,16)),r&&u&&bi(t,r,n,u)))}function xi(t){var n,i,r,i,r,e,o,n=M,i=m(t),r=i.length;return t.Oi&&0<r&&(i=i[r-1],r=t.j1(i),n=new F.Rect(r.x+R(r)-(e=17),r.y+U(r),17,o=20)),n}function yi(t,n,i){var n,i,n,t,i,r,e,o,n=t.C0(n),i=t.S0(i),n=t.dw(n),t=t.yw(i),i=0,r=0,e=0,o=0;return 0<n.length&&(i=n[0].row,r=n[n.length-1].row),0<t.length&&(e=t[0].col,o=t[t.length-1].col),(0,F.Ec)(i,e,r-i+1,o-e+1)}function Ei(t,n,i,r,e,o){var u,f,s,u,f,t,n,u=t.C0(n),f=t.S0(i),s,u=t.Fi().c9(u,f),f=yi(t,n,i),t=f.row<=n&&n<=f.row+f.rowCount-1&&u.y<=e&&e<=u.y+U(u),n=f.col<=i&&i<=f.col+f.colCount-1&&u.x<=r&&r<=u.x+R(u);return o&&o.colCheck?n:(o&&o.rowCheck||n)&&t}function ki(t){var n,i,n,r,e,o,u,f,s,c,a,h,v,A,l,A,w,l,A,l,v,n,d,o,p,g,n=m(t),i=[];if(t.Oi&&0<n.length)for(n=n[n.length-1],r=t.j1(n),e=8,o=t.Fi(),u=n.row,f=n.row+n.rowCount-1,s=n.col,c=n.col+n.colCount-1,-1!==n.row&&-1!==n.col?(Ei(t,u,s,r.x,r.y)&&(i[0]=new F.Rect(r.x-8,r.y-8,16,16)),Ei(t,f,c,r.x+R(r),r.y+U(r))&&(i[1]=new F.Rect(r.x+R(r)-8,r.y+U(r)-8,16,16))):-1!==n.row?(a=o.c9(1,0),h=o.c9(1,1),v=a.x+(R(a)+R(h))/2-8,A=dn(t)-1-ln(t),(A=(l=t.yw(1)).findCol(A))&&(l=(w=t.yw(0))[0]||l[0])&&(v=l.x+(A.x+R(A)-l.x)/2-8),Ei(t,u,s,v+8,r.y,{rowCheck:!0})&&(i[0]=new F.Rect(v,r.y-8,16,16)),Ei(t,f,c,v+8,r.y+U(r),{rowCheck:!0})&&(i[1]=new F.Rect(v,r.y+U(r)-8,16,16))):-1!==n.col&&(a=o.c9(0,1),h=o.c9(1,1),A=a.y+(U(a)+U(h))/2-8,l=pn(t)-1-wn(t),(n=(v=t.dw(1)).findRow(l))&&(o=(d=t.dw(0))[0]||v[0])&&(A=o.y+(n.y+U(n)-o.y)/2-8),Ei(t,u,s,r.x,A+8,{colCheck:!0})&&(i[0]=new F.Rect(r.x-8,A,16,16)),Ei(t,f,c,r.x+R(r),A+8,{colCheck:!0}))&&(i[1]=new F.Rect(r.x+R(r)-8,A,16,16)),p=void 0,g=i.length-1;0<=g;g--)(!(p=i[g])||p.x<0||p.y<0)&&(i[g]=M);return i}function Pi(t,n,i){var r,e,o,u;if((0,F.needPaintSelection)(t)&&!t.isEditing()&&n&&0!==t.selectionPolicy()&&(o=void 0,0<(e=(r=ki(t)).length))){for(i.save(),i.fillStyle=t.aR()||"white",i.strokeStyle=t.getSelectionBorderColor(),u=0;u<e;u++)(o=r[u])&&(i.beginPath(),i.arc(o.x+R(o)/2,o.y+U(o)/2,R(o)/2,0,2*Math.PI,!1),i.fill(),i.stroke());i.restore()}}function Fi(t,n){var i,r,i=xi(t);i&&bi(t,r=w+"EAAAATCAIAAAD5x3GmAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2 + oZAAAAGhJREFUOE / djkEOwCAIBHk6P98u1lKo1diEU + dggOyAAkC + YPl / Onx3WDmiytm4aulQoKba + 4uiO77YhHDH5SqnRa0If / Nhq0fnjPob2h5oVXJI0rJA3h1ya1kgU4f4nQfVzozk7APgAIEqATZbalz1"+wt,n,i)}N=this&&this.__extends||(an=function(t,n){return(an=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}an(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(t,"__esModule",{value:!0}),t.QAt=t.NZ=t.IZ=t.TouchToolStripSeparator=t.TouchToolStripItem=t.TouchToolStrip=t.TouchEventHandler=t.ZZ=t.ManipulationStartingEventArgs=t.ManipulationStartedEventArgs=t.ManipulationDeltaEventArgs=t.ManipulationCompletedEventArgs=t.QZ=t.TouchEventProvider=t.SR=void 0,Y=P("Common"),F=P("Core"),P=P("./dist/plugins/touch/touch.res.en.js"),t.SR={en:P},I=Y.Common.lt.ht,P=F.zc,D=(O=F.GC$).extend,_=O.isEmptyObject,c=F.mt.En,a=F.mt.vi,Z=F.mt.Tt.mozilla,Q=F.I.fl,L=F.mt.pi(),z=L.ipad,r=z||L.iphone,M=null,p=void 0,S=Math.abs,j=Math.min,G=Math.max,J=Math.pow,K=Math.atan2,o=Math.PI,X=Math.round,V=Math.sqrt,W=Math.atan,q=Math.log,$=Math.floor,tt=100,h="touch",nt="none",it="MSPointerDown",rt="MSPointerMove",et="MSPointerUp",ot="pointerdown",ut="pointermove",ft="pointerup",st="touchstart",ct="touchmove",at="touchend",v="MSPOINTER_TYPE_TOUCH",u=isNaN,ht=parseInt,vt=parseFloat,At=window,B=document,lt=At.gcGlobal,w="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB",wt="AAAAAElFTkSuQmCC",H=1,F.Of.touch=!0,L=new Y.Common.ResourceManager(t.SR,"Touch"),f=L.getResource.bind(L),dt=400,pt=1e3,gt=20,n.prototype.KAt=function(t){this.QTt.KAt=t},n.prototype.JAt=function(t){this.QTt.JAt=t},n.prototype.XAt=function(n){var i=this;i.QTt.XAt=function(t){var t;n&&(n(t),t=i.AZ)&&t.qAt()}},n.prototype.$At=function(t){this.QTt.$At=t},n.prototype.tIt=function(t){this.QTt.tIt=t},n.prototype.nIt=function(t){this.KTt.nIt=t},n.prototype.eIt=function(t){this.KTt.eIt=t},n.prototype.iIt=function(t){this.KTt.iIt=t},n.prototype.rIt=function(t){this.oIt=t},n.prototype.aIt=function(t){this.uIt=t},n.prototype.sIt=function(t,n){var n=(n||this.cIt).RS;return F.mt.T0(t,n)},n.prototype.fIt=function(t,n){var i,r,e,o,u,r,f,r,s,t,e,i=this,r=n.pointerType,e=n.target,o=n.offsetX,u=n.offsetY;r!==n[v]&&r!==h||(f=(r=i.sIt(e,t)).I0,r=r.A0,(s=i.lIt(t,e,n.pointerId,new b(o+f,u+r),n.timeStamp))&&a(n),"sheet"===i.cIt.zAt&&(t=n.pageX-(o+f),e=n.pageY-(u+r),i.cIt.RS.canvasOffset={top:e,left:t}))},n.prototype.hIt=function(t){var n,i,r,i,e,n=this,i=t.pointerType,r=t.pointerId;if(i===t[v]||i===h){if(n.WTt[r]===p)return!1;i=n.sIt(t.target),(e=n.iE(r,new b(t.offsetX+i.I0,t.offsetY+i.A0),t.timeStamp))&&a(t)}},n.prototype.dIt=function(t){var n,i,r,i,e,n=this,i=t.pointerType,r=t.pointerId;if(i===t[v]||i===h){if(n.WTt[r]===p)return!1;i=n.sIt(t.target),(e=n._up(r,new b(t.offsetX+i.I0,t.offsetY+i.A0)))&&a(t)}},n.prototype.mIt=function(t){var n,i,r,i,e,n=this,i=t.pointerType,r=t.pointerId;if(i===t[v]||i===h){if(n.WTt[r]===p)return!1;i=n.sIt(t.target),(e=n.gIt(r,new b(t.offsetX+i.I0,t.offsetY+i.A0)))&&a(t)}},n.prototype.pIt=function(t,n){for(var i,r,e,o,u,f,i=gn(t.RS),r=n.changedTouches,e=!1,o=0;o<r.length;o++)u=r[o],f=Z?l():n.timeStamp,e=this.lIt(t,n.target,u.identifier,new b(u.pageX-i.I0,u.pageY-i.A0),f)||e;e&&a(n)},n.prototype.bIt=function(t){for(var n,i,r,e,o,u,f,n=this,i=gn(n.cIt.RS),r=t.changedTouches,e=!1,o=0;o<r.length;o++)u=r[o],f=Z?l():t.timeStamp,e=n.iE(u.identifier,new b(u.pageX-i.I0,u.pageY-i.A0),f)||e;e&&a(t)},n.prototype.yIt=function(t){for(var n,i,r,e,o,u,n=this,i=gn(n.cIt.RS),r=t.changedTouches,e=!1,o=0;o<r.length;o++)u=r[o],e=n._up(u.identifier,new b(u.pageX-i.I0,u.pageY-i.A0))||e;e&&a(t)},n.prototype.wIt=function(t){for(var n,i,r,e,o,u,n=this,i=gn(n.cIt.RS),r=t.changedTouches,e=!1,o=0;o<r.length;o++)u=r[o],e=n.gIt(u.identifier,new b(u.pageX-i.I0,u.pageY-i.A0))||e;e&&a(t)},n.prototype.MIt=function(t){var n,i,n,i,n,n=this,i=n.cIt,n=n.CIt;i!==n&&(i=O(i.RS).offset(),n=O(n.RS).offset(),t.X+=i.left-n.left,t.Y+=i.top-n.top)},n.prototype.SIt=function(t,n){var i,r,e,o,u,f,s,i=this,r=i.j0t;for(i.CIt=M,i.AZ=M,o=0;o<r.length;o++)if(r[o]===t){if(u=r[o],s=f=M,u._Z&&!u._Z()){for(o=0;o<r.length;o++)if((e=r[o])!==u&&0<=e.YAt&&e.YAt<u.YAt&&(!e._Z||e._Z())){f=e;break}if(f===M)return!1}if(u.EZ&&!u.EZ()){for(o=0;o<r.length;o++)if((e=r[o])!==u&&0<=e.YAt&&e.YAt<u.YAt&&(!e.EZ||e.EZ())){s=e;break}if(s===M)return!1}f===M&&(f=u),s===M&&(s=u),i.cIt=u,i.CIt=f,i.TIt=s,i.KAt(s.jZ||M),i.JAt(f.RZ||M),i.tIt(f.LZ||M),i.$At(f.AIt||M),i.XAt(f.PZ||M),i.nIt(s.UZ||M),i.eIt(s.ZAt||M),i.iIt(s.IIt||M),i.rIt(f.oIt||M),i.aIt(f.uIt||M),f.HAt&&(i.AZ=u.HAt);break}return!0},n.prototype.lIt=function(t,n,i,r,e){var o=this;if(o.WTt[i]!==p)return!1;if(0===o.WTt.length&&!o.SIt(t,n))return!1;if(!o.CIt)return!1;if(!(o.WTt.length>=o.CIt.VAt)){if(o.AZ&&o.AZ.xIt())return!1;o.MIt(r),o.AZ&&0===o.WTt.length&&o.AZ.NIt(),o.WTt[i]={id:i,time:l(),position:r},o.WTt.length++,o.QTt.kIt(n,i,r,e),o.QTt.DIt(i,r,o.WTt.length,e),1===o.WTt.length&&o.KTt.DIt(r),1===o.WTt.length&&o.oIt&&o.oIt({JZ:r})}return!0},n.prototype.iE=function(t,n,i){var r=this;return r.WTt[t]!==p&&!(r.AZ&&r.AZ._It()||(r.MIt(n),r.WTt[t]={id:t,time:l(),position:n},r.QTt.EIt(t,n,i),0))},n.prototype._up=function(t,n){var i=this;return i.WTt[t]!==p&&(delete i.WTt[t],i.WTt.length--,!(i.AZ&&i.AZ.jIt()||(i.MIt(n),i.QTt.OIt(t),i.QTt.RIt(),0===i.WTt.length&&(i.KTt.OIt(n),i.KTt.RIt()),0===i.WTt.length&&i.uIt&&i.uIt({JZ:n}),i.AZ&&0===i.WTt.length&&0===i.QTt._process&&i.AZ.qAt(),0)))},n.prototype.gIt=function(t,n){return this._up(t,n)},n.prototype.aW=function(n,t){var i,r,e,o,u,f,s,c,a,h,v,A,l,r,w,d,e,p,g,m,C,b;function M(){O(B).bind(u,E).bind(f,k).bind(h,E).bind(v,k).bind(s,P).bind(c,P).bind(A,P).bind(l,P)}function x(){O(B).unbind(u).unbind(h).unbind(f).unbind(v).unbind(s).unbind(l).unbind(c).unbind(A)}function y(t){M(),i.fIt(n,t)}function E(t){i.hIt(t)}function k(t){i.dIt(t),0===i.WTt.length&&x()}function P(t){i.mIt(t),0===i.WTt.length&&x()}i=this,r="."+n.zAt,o=it+(e=".gcSheet"),u=rt+e+r,f=et+e+r,s="MSPointerCancel"+e+r,c="MSLostPointerCapture"+e+r,a=ot+e,h=ut+e+r,v=ft+e+r,A="LostPointerCapture"+e+r,l="pointercancel"+e+r,r=st+e,w=ct+e,d=at+e,e="touchcancel"+e,p=n.RS,g=i.j0t,0<=(m=Y.Common.Uf.hD(g,n))&&t||m<0&&!t||(C=F.mt.m0(),t?C?(b=p.style,I(b.msTouchAction)||(b.msTouchAction=nt),I(b.touchAction)||(b.touchAction=nt),O(p).bind(o,y).bind(a,y)):(O(p).bind(r,function(t){i.pIt(n,t)}),O(p).bind(w,function(t){i.bIt(t)}).bind(d,function(t){i.yIt(t)}).bind(e,function(t){i.wIt(t)})):C?O(p).unbind(o).unbind(a):O(p).unbind(r).unbind(w).unbind(d).unbind(e),t?g.push(n):g.splice(m,1))},n.prototype.L0=function(){for(var t,n,i,t=this,n=t.j0t,i=n.length-1;0<=i;i--)t.aW(n[i],!1)},mt=n,t.TouchEventProvider=mt,i.prototype.kIt=function(t,n,i,r){var e,t,e=this;3===e._process&&e.BIt(!0),e.jAt=2===e._process&&1===e.oAt.LIt(),e.FIt=t,(t={})._ID=n,t.PIt=i,t.GIt=i,e.oAt.UIt(t),e.HIt=r,1<e.oAt.LIt()&&(e.zIt=!1,e.VIt=!1,1===e._process)&&e.YIt()},i.prototype.DIt=function(t,n,i,r){0===this._process&&1===i&&this.ZIt(this.oAt.WIt(0).GIt)},i.prototype.EIt=function(t,n,i){var r,e,e,o,e,u,f,s,r=this;if(0!==r.rAt&&r.oAt.QIt(t)){if(1===r._process&&1===r.oAt.LIt()){if(e=r.KIt(),!r.JIt(1)&&!r.JIt(2)&&!e)return;if(An(n,e=r.oAt.XIt(t).GIt))return;o=S(n.X-e.X),e=S(n.Y-e.Y),r.qIt(o,e)}if(!(i-r.HIt<20)){if(r.oAt.XIt(t).$It=n,1<(u=r.oAt.LIt()))for(f=0;f<u;f++)if(!(s=r.oAt.WIt(f)).$It)return;for(r.txt(i),r.HIt=i,u=r.oAt.LIt(),f=0;f<u;f++)(s=r.oAt.WIt(f)).PIt=s.$It,s.$It=M}}},i.prototype.RIt=function(){var t=this;t.nxt&&(t.ixt(t.nxt),t.nxt=M)},i.prototype.OIt=function(t){var n=this;n.oAt.QIt(t)&&(n.oAt.rxt(t),2===n._process?0===n.oAt.LIt()&&(n.JIt(64)||n.JIt(256)||n.JIt(128)?n.oxt():n.BIt(!0)):3===n._process?n.BIt(!0):1===n._process&&n.BIt(!1))},i.prototype.txt=function(t){var n,i,r,e,o,u,f,f,e,s,c,t,s,e,n=this,f=n.axt(),i=f.uxt,r=f.sxt,f=f.u_,e=n.cxt(),u=e.L0t,o=e.fxt,e=e.hAt;n.qTt+=i,n.$Tt+=r,n.tAt*=o,n.nAt+=u,n.eAt+=e,(s={}).hAt=e,s.L0t=u,s.lxt=t-n.HIt,s.uxt=i,s.sxt=r,n.uAt.hxt(s),n.dxt=f,1!==n._process&&2!==n._process||1===n._process&&(c=n.YIt())||((t=new Pt).CAt=e,t.MAt=u,t.tW=o,t.wAt=new b(i,r),s=new xt(n.uAt),e=new Bt(n.FIt,n.vxt(),t,!1,f,s),n.mxt(e),e.gxt&&n.BIt(!0))},i.prototype.YIt=function(){var t,n,t=this;return t._process=2,n=new Yt(t.FIt,t.oAt.LIt(),t.vxt(),t.oAt.WIt(0).GIt),t.pxt(n),!!n.gxt&&(t.BIt(!0),!0)},i.prototype.qIt=function(t,n){var t=xn(t,n);this.zIt=t.JTt,this.VIt=t.XTt},i.prototype.axt=function(){var t,n,i,r,i,e,t=0,n=0,i=this.bxt(),r=i.yxt,i=i.wxt,e=new b(r.X,r.Y);return{uxt:t=r.X-i.X,sxt:n=r.Y-i.Y,u_:e}},i.prototype.cxt=function(){var t,n,i,r,t,t=this,n=0,i=1,r=0;return t.JIt(16)&&1===t.oAt.LIt()&&t.KIt()&&(n=bn(t.oAt.WIt(0).$It,t.oAt.WIt(0).PIt,t.fMt)),1<t.oAt.LIt()&&(n=(t=t.Mxt()).L0t,i=t.fxt,r=t.hAt),{L0t:n=n/o*180,fxt:i,hAt:r}},i.prototype.Mxt=function(){for(var t,n,i,r,e,o,u,n,f,s,c,a,h,v,A,l,w,l,d,p,g,m,l,w,C,t=this,n=t.bxt(),i=n.yxt,r=n.wxt,e=t.KIt(),o=e?t.fMt._Center:new b(0,0),u=0,n=1,f=0,s=0,c=0,a=0,h=0,v=t.oAt.LIt(),A=0;A<v;A++)w=(l=t.oAt.WIt(A)).$It,l=l.PIt,d=Cn(w,i),p=Cn(l,r),g=e?new b(l.X-o.X,l.Y-o.Y):new b(l.X-r.X,l.Y-r.Y),m=e?new b(w.X-o.X,w.Y-o.Y):new b(w.X-i.X,w.Y-i.Y),l=Cn(l,o),w=Cn(w,o),p>=t.aAt&&d>=t.aAt&&(c++,a+=d,h+=p,!e||l>=t.aAt)&&w>=t.aAt&&(u+=C=mn(g,m),s++);return 0<s&&t.JIt(16)?u/=s:u=0,0<c&&t.JIt(32)?(t.jAt||(n=a/h),f=(a-h)/c,t.Cxt=a/c):t.Cxt=0,{L0t:u,fxt:n,hAt:f}},i.prototype.JIt=function(t){return 0!=(this.rAt&t)},i.prototype.bxt=function(){for(var t,n,i,r,e,o,u,f,s,f,c,a,t=0,n=0,i=0,r=0,e=this.oAt,o=e.LIt(),u=0;u<o;u++)s=(f=e.WIt(u)).PIt,f=f.$It,t+=s.X,n+=s.Y,i+=f.X,r+=f.Y;return c=new b(t/o,n/o),{yxt:a=new b(i/o,r/o),wxt:c}},i.prototype.KIt=function(){var t=this.fMt;return t&&!u(t._Radius)},i.prototype.ZIt=function(t){var n,t,n=this,t=new St(n.FIt,n.rAt,M,t);return t.KZ=511,n.Sxt(t),n.Txt=t.KZ,0===t.KZ?(n.BIt(!1),!1):(n.rAt=t.KZ,n.fMt=t.DAt,n._process=1,!0)},i.prototype.BIt=function(t){var n,i,t,n=this,i=3===n._process;n._process=0,n.Axt&&(vn(n.Axt),n.Axt=M),t&&(t=new Ot(n.FIt,n.vxt(),i,kn(n.dxt),new xt(n.uAt)),3===n._process?n.nxt=t:n.ixt(t)),n.uAt.Ixt(),n.oAt.Ixt(),n.fMt=M,n.qTt=0,n.$Tt=0,n.tAt=1,n.nAt=0,n.eAt=0,n.zIt=!1,n.VIt=!1,n.rAt=0},i.prototype.oxt=function(){var t,n,i,i,i,t=this,n={},i=new xt(t.uAt);n.xxt=t.JIt(64)?i.Nxt().X:0,n.kxt=t.JIt(64)?i.Nxt().Y:0,n.Dxt=t.JIt(256)?i.CAt():0,n._xt=t.JIt(128)?i.Ext():0,0===n.xxt&&0===n.kxt&&0===n.Dxt&&0===n._xt?t.BIt(!0):(n.jxt=new kt(n.xxt,n.kxt),n.IAt=new yt(n.Dxt),n.xAt=new Et(n._xt),i=new xt(M,n.xxt,n.kxt,n._xt,n.Dxt),i=new Nt(t.FIt,t.vxt(),new Pt,i,n.IAt,n.xAt,n.jxt),t.Oxt(i),n.jxt=i.NAt,n.IAt=i.IAt,n.xAt=i.xAt,n.jxt.pAt<=0&&n.jxt.bAt<=0&&n.jxt.Rxt(.003),n.IAt.Bxt()<=0&&n.IAt.Rxt(.002),n.xAt.Bxt()<=0&&n.xAt.Rxt(.003),i=l(),n.Lxt=i,n.Fxt=i,n.Pxt=0,n.Gxt=0,t._process=3,t.Axt=At.setInterval(function(){try{t.Uxt(n)}catch(t){}},20))},i.prototype.Uxt=function(t){var n,i,r,e,o,u,f,i,e,o,u,r,f,s,e,o,n=this,i=l(),r=i-t.Fxt;if(0!=r){if(e=t.xxt,o=t.kxt,u=t.Dxt,f=t._xt,t.xxt=n.Hxt(r,t.jxt.pAt,t.xxt),t.kxt=n.Hxt(r,t.jxt.bAt,t.kxt),t.Dxt=n.Hxt(r,t.IAt.Bxt(),t.Dxt),t._xt=n.Hxt(r,t.xAt.Bxt(),t._xt),e=(e+t.xxt)/2,o=(o+t.kxt)/2,u=(u+t.Dxt)/2,f=(f+t._xt)/2,t.Fxt=i,i=!1,Mn(e)&&Mn(o)&&Mn(u)&&Mn(f)&&(i=!0),e=r*e,o=r*o,u=r*u,r=r*f,f=1,0<n.Cxt&&(n.Cxt+2*u<0&&(u=-n.Cxt/2+1),0!==n.Cxt)&&(f=(n.Cxt+2*u)/n.Cxt),n.eAt+=u,n.nAt+=r,n.qTt+=e,n.$Tt+=o,n.tAt*=f,n.Cxt+=u,n.dxt=new b(n.dxt.X+e,n.dxt.Y+o),t.Pxt+=e,t.Gxt+=o,i){if(e=X(t.Pxt),o=X(t.Gxt),Mn(e)&&Mn(o))return void n.BIt(!0)}else 1<=S(t.Pxt)&&(e=t.Pxt,t.Pxt-=e),1<=S(t.Gxt)&&(o=t.Gxt,t.Gxt-=o);(s=new Pt).wAt=new b(e,o),s.tW=f,s.CAt=u,s.MAt=r,e=new xt(M,t.xxt,t.kxt,t._xt,t.Dxt),o=new Bt(n.FIt,n.vxt(),s,!0,kn(n.dxt),e),n.mxt(o),(o.gxt||i)&&n.BIt(!0)}},i.prototype.Hxt=function(t,n,i){var n,n;return Mn(i)||(n=i<0?i+n*t:i-n*t)<0&&0<i||0<n&&i<0?0:n},i.prototype.vxt=function(){var t,n,t=this,n=new Pt;return n.CAt=t.eAt,n.MAt=t.nAt,n.tW=t.tAt,n.wAt=new b(t.qTt,t.$Tt),n},i.prototype.zxt=function(t,n,i,r){var e,o,u,f,s,c,a,h,v,v,e=this,o=new Pt,u=new Pt,f=0,s=0,c=0,a=0,h=e.JIt(4)&&e.zIt,v=e.JIt(8)&&e.VIt;return!e.JIt(1)||v||t&&!e.JIt(64)||(o.wAt.X=n.wAt.X,u.wAt.X=i.wAt.X,f=r.Nxt().X),!e.JIt(2)||h||t&&!e.JIt(64)||(o.wAt.Y=n.wAt.Y,u.wAt.Y=i.wAt.Y,s=r.Nxt().Y),!e.JIt(32)||t&&!e.JIt(256)?(o.tW=n.tW,u.tW=1):(o.tW=n.tW,o.CAt=n.CAt,u.tW=i.tW,u.CAt=i.CAt,a=r.CAt()),!e.JIt(16)||t&&!e.JIt(128)||(o.MAt=n.MAt,u.MAt=i.MAt,c=r.Ext()),v=new xt(M,f,s,c,a),new It(o,u,v)},i.prototype.Sxt=function(t){this.KAt&&t&&this.KAt(t)},i.prototype.pxt=function(t){this.JAt&&t&&this.JAt(t)},i.prototype.ixt=function(t){var n,i,n=this;n.XAt&&t&&(i=n.zxt(!1,t.nW,t.nW,t.TAt),t.nW=i.nW,t.TAt=i.TAt,n.XAt(t))},i.prototype.Oxt=function(t){var n,i,n=this;n.$At&&t&&(i=n.zxt(!1,t.nW,t.SAt,t.TAt),t.nW=i.nW,t.SAt=i.SAt,t.TAt=i.TAt,n.$At(t))},i.prototype.mxt=function(t){var n,i,n=this;n.tIt&&t&&(i=n.zxt(t.AAt,t.nW,t.SAt,t.TAt),t.nW=i.nW,t.SAt=i.SAt,t.TAt=i.TAt,n.tIt(t))},Ct=i,yn.prototype.DIt=function(t){var n,i,n=this;n.Vxt++,1<n.Vxt||(i=l(),n.Yxt&&An(t,n.Yxt)&&i-n.Zxt<dt?n.DU++:(n.Yxt=t,n.DU=1),n.Wxt=t,n.Zxt=i)},yn.prototype.RIt=function(){var t=this;t.nxt&&(t.nxt instanceof jt?t.Qxt(t.nxt):t.nxt instanceof Ht&&t.Kxt(t.nxt),t.nxt=M)},yn.prototype.OIt=function(t){var n,i,n=this;n.Vxt--,0<n.Vxt||(i=l(),An(t,n.Wxt)?i-n.Zxt>pt?n.nxt=new Ht(n.Wxt):1<n.DU?(n.DU=0,n.Jxt(new Tt(n.Yxt)),n.Yxt=M):n.nxt=new jt(n.Wxt):n.Yxt=M)},yn.prototype.Xxt=function(){this.Yxt=M},yn.prototype.Qxt=function(t){this.nIt&&t&&this.nIt(t)},yn.prototype.Jxt=function(t){this.eIt&&t&&this.eIt(t)},yn.prototype.Kxt=function(t){this.iIt&&t&&this.iIt(t)},bt=yn,b=En,t.QZ=b,e.prototype.qxt=function(t){var n,i,r,e,o,u,o,n=this;if(0===n.DU)return 0;for(i=0,r=(1+n.DU)*n.DU/2,e=n.DU-1;0<=e;e--)o=0,u=n.$xt(e),0===t?o=u.uxt:1===t?o=u.sxt:2===t?o=u.hAt:3===t&&(o=u.L0t),o=n.tNt(o,u.lxt),i+=o*=e+1;return i/r},e.prototype.tNt=function(t,n){return t/n},e.prototype.$xt=function(t){return this.cAt[this.nNt(t)]},e.prototype.eNt=function(){return this.cAt[this.DU-1]},e.prototype.hxt=function(t){var n,i,r,n=this;for(10===n.DU&&n.iNt(),n.DU++,n.cAt[n.nNt(n.DU-1)]=t,i=20*n.sAt,r=0;r<n.DU;r++)t.lxt-n.cAt[r].lxt>i&&(n.iNt(),r--)},e.prototype.iNt=function(){var t=this;t.ak++,t.ak===t.sAt&&(t.ak=0),t.DU--},e.prototype.Ixt=function(){this.DU=0},e.prototype.nNt=function(t){return(this.ak+t)%this.sAt},Mt=e,Pn.prototype.Nxt=function(){var t=this;return t.fAt||(t.fAt=new b(t.cAt.qxt(0),t.cAt.qxt(1))),t.fAt},Pn.prototype.Ext=function(){var t=this;return I(t.lAt)&&(t.lAt=t.cAt.qxt(3)),t.lAt},Pn.prototype.CAt=function(){var t=this;return I(t.hAt)&&(t.hAt=t.cAt.qxt(2)),t.hAt},xt=Pn,Fn.prototype.Bxt=function(){var t=this,n=t._DesiredExpansion,i=t._DesiredDeceleration,r=t.dAt;return u(n)||0===n?u(i)?t.vAt:i:.5*r*r/n},Fn.prototype.Rxt=function(t){this.vAt=t},yt=Fn,In.prototype.Bxt=function(){var t=this,n=t._DesiredRotation,i=t._DesiredDeceleration,r=t.dAt;return u(n)||0===n?u(i)?t.vAt:i:.5*r*r/n},In.prototype.Rxt=function(t){this.vAt=t},Et=In,On.prototype.rNt=function(){var t=this,n=t._DesiredDisplacement,i=t.yAt,r=t.mAt,e=t.gAt,o=t.Bxt();u(n)||0===n?u(o)||0===o?(t.pAt=0,t.bAt=0):(t.pAt=o*S(r)/i,t.bAt=o*S(e)/i):(t.pAt=.5*i*S(r)/n,t.bAt=.5*i*S(e)/n)},On.prototype.Bxt=function(){var t=this,n=t._DesiredDeceleration;return u(n)&&u(t._DesiredDisplacement)?t.vAt:n},On.prototype.Rxt=function(t){this.vAt=t,this.rNt()},kt=On,Pt=Bn,Nn.prototype.QIt=function(t){for(var n,i,r,n=this.wY,i=0;i<n.length;i++)if((r=n[i])._ID===t)return!0;return!1},Nn.prototype.UIt=function(t){this.wY.push(t)},Nn.prototype.rxt=function(t){for(var n,i,n=this.wY,i=0;i<n.length;i++)if(n[i]._ID===t){n.splice(i,1);break}},Nn.prototype.LIt=function(){return this.wY.length},Nn.prototype.WIt=function(t){return this.wY[t]},Nn.prototype.XIt=function(t){for(var n,i,r,n=this.wY,i=0;i<n.length;i++)if((r=n[i])._ID===t)return r;return M},Nn.prototype.Ixt=function(){var t=this.wY;t.splice(0,t.length)},Ft=Nn,It=Yn,Ot=Sn,t.ManipulationCompletedEventArgs=Ot,Bt=jn,t.ManipulationDeltaEventArgs=Bt,Nt=Hn,Yt=Tn,t.ManipulationStartedEventArgs=Yt,St=Un,t.ManipulationStartingEventArgs=St,jt=Rn,Ht=Dn,Tt=_n,Qn.prototype.oNt=function(t,n){var i=this.fg;return i?t===F.Bf.Xl(i)&&n===F.Bf.ql(i)||F.Bf.$l(i,t,n):(i=c("canvas"),F.Bf.Wl(i,M,this.Mf),F.Bf.$l(i,t,n)),i},Qn.prototype.aNt=function(t,n,i,r){var e,o,u,o,u,f,s,e=this,o=F.Bf.Xl(t),u=F.Bf.ql(t),o=e.oNt(o,u),u=o.getContext("2d"),f=F.Bf.Kl(o),s=F.Bf.Jl(o);F.Lf.Vl(u,1,1),u.drawImage(t,0,0,R(o),U(o),0,0,R(o),U(o)),F.Lf.Vl(u,f,s),e.fg=o,e.uNt=n,e.sNt=i,e.cNt=r},Qn.prototype.fNt=function(t,n,i){var r,e,o,u,f,s,c,i,a,e,h,a,c,v,A,l,w,d,p,g,m,n,C,b,t,r,i,a,r=this,e=r.Mf,h=e.options.rightToLeft,a=F.Bf.Xl(t),c=F.Bf.ql(t),v=ln(e),A=wn(e),l=0<v?1:0,w=0<A?1:0,d=r.sNt,p=qn(e),g=r.uNt,m=e.Fi(),n=n/r.cNt,C=t.getContext("2d"),b=F.Bf.Kl(t),t=F.Bf.Jl(t),r=r.fg;C.save(),C.fillStyle=i,C.fillRect(0,0,a,c),i=e.rowOutlines,a=e.columnOutlines,i&&i._e(e,C,M,!0),a&&a._e(e,C,M,!1),e=(a=(i=(c=h?(o=g.Hy+g.zy,u=d.y+U(d),f=d.x-o-l,s=g.Ay-u-w,p.x-f*n):(o=d.x+R(d),u=d.y+U(d),f=g.Hy-o-l,s=g.Ay-u-w,p.x+R(p)),p.y+U(p)),f*n),s*n),o*=b,u*=t,f*=b,s*=t,c*=b,i*=t,a*=b,e*=t,F.Lf.Vl(C,1,1),C.drawImage(r,o,u,f,s,c,i,a,e),0<v&&(o=g.Hy-l,u=d.y+U(d),f=g.zy+l,s=g.Ay-u-w,c=m.Hy-l,i=p.y+U(p),a=m.zy+l,e=s*n,C.drawImage(r,o*=b,u*=t,f*=b,s*=t,c*=b,i*=t,a*=b,e*=t)),0<A&&(e=(a=(i=(c=h?(o=g.Hy+g.zy,u=g.Ay-w,f=d.x-o-l,s=g.Iy+w,p.x-f*n):(o=d.x+R(d),u=g.Ay-w,f=g.Hy-o-l,s=g.Iy+w,p.x+R(p)),m.Ay-w),f*n),m.Iy+w),C.drawImage(r,o*=b,u*=t,f*=b,s*=t,c*=b,i*=t,a*=b,e*=t)),0<v&&0<A&&(o=g.Hy-l,u=g.Ay-w,f=g.zy+l,s=g.Iy+w,c=m.Hy-l,i=m.Ay-w,a=m.zy+l,e=m.Iy+w,C.drawImage(r,o*=b,u*=t,f*=b,s*=t,c*=b,i*=t,a*=b,e*=t)),F.Lf.Vl(C,b,t),C.restore()},Qn.prototype.$Z=function(){var t,n,i,r,t=this,n=t.Mf,i=n.zoom(),r=n.Dn._7();r&&t.aNt(r.canvas,n.Fi(),qn(n),i)},Qn.prototype.iW=function(t){var n,i,t,r,e,o,o,e,n=this,i=n.Mf;i.endEdit()&&(t=Zn(t,n.cNt),r=i.zoom(),e=i.name(),r!==t)&&(i.ki(F.Events.ViewZooming,o={sheet:i,sheetName:e,oldZoomFactor:r,newZoomFactor:t,cancel:!1}),!0!==o.cancel)&&(i.g8(t=o.newZoomFactor),i.ki(F.Events.UserZooming,{sheet:i,sheetName:e,oldZoomFactor:r,newZoomFactor:t}),i.ki(F.Events.ViewZoomed,{sheet:i,sheetName:e,oldZoomFactor:r,newZoomFactor:t}),i.invalidateLayout(),(e=(o=i.Dn).J())&&n.fNt(e.canvas,t,o.R7(!1)),i.oht&&i.oht(M,t),i.CW)&&i.CW(M)},Qn.prototype.rW=function(t){var n,i,r,t,n,e,n=this,i=n.Mf,r=i.name(),t=Zn(t,n.cNt),n=i.zoom();if(t!==n){if(i.ki(F.Events.ViewZooming,e={sheet:i,sheetName:r,oldZoomFactor:n,newZoomFactor:t,cancel:!1}),!0===e.cancel)return;i.g8(t=e.newZoomFactor),i.ki(F.Events.UserZooming,{sheet:i,sheetName:r,oldZoomFactor:n,newZoomFactor:t}),i.ki(F.Events.ViewZoomed,{sheet:i,sheetName:r,oldZoomFactor:n,newZoomFactor:t})}i.Zw=!0,i.Ww=!0,i.zw()},Ut=Qn,t.ZZ=Ut,T=200,Rt=20,s.prototype.lNt=function(t){var n;this.Mf.my=t,this.B5e=!0},s.prototype.hNt=function(t){var n;this.Mf.ly=t,this.G5e=!0},s.prototype.dNt=function(){var t;this.Mf.invalidateLayout()},s.prototype.yy=function(t,n,i,r,e){var o,u,f,s,c,a,h,v,a,A,l,w,d,p,g,m,A,C,b,M,f,x,y,E,k,k,E,y,k,P,F,h,o=this,u=o.Mf,f=u.options,s,c,a=Ln(u,t,u.Tb,u.ly);if(a&&(h=a.Ky,v=a.Xy,t=a._At,u.Tb=h,!(0<u.My)))if(a=u.ot(),l=(A=u.Fi()).Cy,w=u.Sy(A),d=A.Iy,p=A.Ay,g=A.Ty,m=(a||A).x,A=R(A),f=f.sheetAreaOffset,x=u.Ny,A+=f.left,t<0)o.vNt=0,E=y=void(o.mNt=0),(y=(k=u.dw(1))&&0<k.length?k.findRow(h):y)&&(E=k[k.length-1]).row>=h&&(C=2+f.top,b=l+S(t),0<=(M=j(l+w,E.y+U(E))-b))&&(M-=C,o.hNt(v-U(y)),i.x=m,i.y=b,i.width=A,i.height=M,i.tx=m,i.ty=l,k=x?w:w+d+g,r.x=m,r.y=l+M,r.width=A,r.height=k-M);else if(0<t){if(E=u.vw(-1),k=y=void 0,(P=u.parent&&u.parent.options.scrollByPixel)&&0<v&&(t-=v,v=0),h===E&&0<v){if(0<o.vNt&&0<o.mNt){if(v=k=Gn(y=o.vNt+t,T),(t=k-o.mNt)<=0)return n;if(n&&20<=k)return!0}else{if(T<=v&&(t-=v-199,v=199,t<=0))return n;if(y=Jn(v,T),k=v,n&&20<=k)return!0}o.vNt=y,o.mNt=k}else o.vNt=0,o.mNt=0;t<(F=x?w:w+d)&&(C=2+f.top,b=l,M=w-t,0<wn(u)&&(M-=H),o.hNt(v),!x&&0<g&&(h=j(a.height-d-H,p-H+t),e.x=m,e.y=p-H,e.width=A,e.height=d+H,e.tx=m,e.ty=h),i.x=m,i.y=b,i.width=A,i.height=M+(x?0:j(t,g)-H),i.tx=m,i.ty=b+t,r.x=m,r.y=b,r.width=A,r.height=t+C)}return!1},s.prototype.wy=function(t,n,i,r,e){var o,u,f,s,c,a,h,c,v,A,l,w,d,p,g,m,C,b,M,x,y,E,k,P,F,I,O,B,O,I,N,Y,F,O,o=this,u=o.Mf,f,s,c=zn(u,t,u.Ab,u.my);if(c&&(a=c.iw,h=c.Xy,t=c.EAt,u.Ab=a,!(0<u.My)))if(c=u.ot(),A=(v=u.Fi()).Py,l=u.Gy(v),w=v.zy,d=v.Hy,p=v.Uy,g=(c||v).y,m=U(v),E=u.options.rightToLeft,k=u.options.sheetAreaOffset,P=u.Vy,m+=k.top,t<0)o.gNt=0,I=F=void(o.pNt=0),((F=(O=u.yw(1))&&0<O.length?O.findCol(a):F)||E&&O&&0<O.length)&&(I=O[O.length-1]).col>=a&&(C=2+k.left,b=A+S(t),0<=(M=j(A+l,I.x+R(I))-b))&&(M-=C,B=E?-h:h-(F?R(F):u.nn(a)),o.lNt(B),i.x=b,i.y=g,i.width=M,i.height=m,i.tx=A,i.ty=g,O=P?l:l+w+p,r.x=A+M,r.y=g,r.width=O-M,r.height=m);else if(0<t){if(I=u.ww(-1),(N=u.parent&&u.parent.options.scrollByPixel)&&0<h&&(t-=h,h=0),a===I&&0<h){if(0<o.gNt&&0<o.pNt){if(h=y=Gn(x=o.gNt+t,T),(t=y-o.pNt)<=0)return n;if(n&&20<=y)return!0}else{if(T<=h&&(t-=h-199,h=199,t<=0))return n;if(x=Jn(h,T),y=h,n&&20<=y)return!0}o.gNt=x,o.pNt=y}else o.gNt=0,o.pNt=0;t<(Y=P?l:l+w)&&(C=2+k.left,b=A,E&&(b-=v.Uy),M=l-t,0<ln(u)&&(M-=H),B=E?-(h+u.nn(a)):h,o.lNt(B),F=0,!P&&0<p&&(O=j(c.width-(F=w)-H,d-H+t),e.x=d-H,e.y=g,e.width=F+H,e.height=m,e.tx=O,e.ty=g),i.x=b,i.y=g,i.width=M+(P?0:j(t,p)-H),i.height=m,i.tx=b+t,i.ty=g,r.x=b,r.y=g,r.width=t+C,r.height=m)}return!1},s.prototype.bNt=function(t,n,i,r){var e,o,u,f,s,c,n,a,h,v,A,i,h,l,w,d,p,g,w,d,h,m,C,b,M,x,n,m,C,b,M,x,t,r,l,n,m,C,b,M,x,e=this,o=e.Mf,u=!0,f=!0,s=o.Dn,c=s.J(),A=0!=(2&i),i=0!=(1&i);if(i||A)return h={},l={},w=o.ot(),d=o.Fi(),p=(w||d).y,g=U(d),w=(w||d).x,d=R(d),A&&(u=e.yy(n,r,n={},a={},h),m=h.y,C=R(h),b=U(h),M=h.tx,x=h.ty,I(h=h.x)||s.Ey(h,m,C,b,M,x),s.Ey(n.x,n.y,R(n),U(n),n.tx,n.ty)),i&&(f=e.wy(t,r,h={},v={},l),m=l.y,C=R(l),b=U(l),M=l.tx,x=l.ty,I(n=l.x)||s.Ey(n,m,C,b,M,x),s.Ey(h.x,h.y,R(h),U(h),h.tx,h.ty),A||(a=v)),(t=o.parent)&&!t.options.scrollbarShowMax&&(i&&(o.Zw=!0),A)&&(o.Ww=!0),e.dNt(),r=o.rowOutlines&&!o.rowOutlines.Oy()?1:0,l=o.columnOutlines&&!o.columnOutlines.Oy()?1:0,i&&A?s.D1(c,new F.Rect(a.x,a.y,R(a),U(a)+r),new F.Rect(v.x,v.y,R(v)+l,U(v))):s.D1(c,new F.Rect(a.x,a.y,R(a)+l,U(a)+r)),n=new F.Rect(w,p,d,g),(m=o.getSelections())&&0<m.length&&(C=o.getRangeRect(1,1,m[0]),b=G(n.x+n.width,C.x+C.width),M=G(n.y+n.height,C.y+C.height),n.x=j(n.x,C.x),n.y=j(n.y,C.y),n.width=b-n.x+1,n.height=M-n.y+1),s.O1(n),s.jy(c,n),ti(o,!0),Vn(o,!0),e.yNt(i,A),$n(o,!0),x=o.options.sheetAreaOffset,o.options.rowHeaderVisible||s.q7(c,new F.Rect(w,p,2,g+x.top)),o.options.colHeaderVisible||s.q7(c,new F.Rect(w,p,d+x.left,2)),u&&f},s.prototype.yNt=function(t,n){var i=this.Mf;n&&i.tw(),t&&i.ow(),i.rt.By()},s.prototype.wNt=function(e,o,u){function f(t,n,i,r){return J(.75,t/=i)*r*(n?1:-1)}function t(t,n,i){return t=S(t),q(t/=i)/q(.75)*n}var s=this,c=s.Mf,a=T,n=10,i=20,h=100,v=t(e,10,a),A=t(o,10,a),l=e,w=o,d=0,p=0,g=!1,m=!1;s.H6=At.setInterval(function(){var t,t,n,i,r;g&&m?(c.Jt.Rl(),(t=c.parent)&&!t.options.scrollbarShowMax&&(c.Zw=!0,c.Ww=!0),c.Jt.Bl(),c.ly=0,c.my=0,c.zw(),c.ow(),c.tw(),vn(s.H6),s.H6=M):(A+=20,h<(v+=20)&&h<A?(s.bNt(e-d,o-p,ni(g,m),u),m=g=!0):(h<v&&!g&&(s.bNt(e-d,0,1,u),g=!0),h<A&&!m&&(s.bNt(0,o-p,2,u),m=!0),t=f(v,0<e,10,a),n=f(A,0<o,10,a),i=$(l-t),r=$(w-n),s.bNt(i,r,ni(g,m),u),l=t,w=n,d+=i,p+=r))},20)},s.prototype.Ok=function(t){var n=this,i=n.Mf,r=i.Jt;n.H6&&(r.Bl(),vn(n.H6),n.H6=M),n.B5e=!1,n.G5e=!1,n.LSe=i.my,n.BSe=i.ly,n.gNt=0,n.pNt=0,n.vNt=0,n.mNt=0,n.MNt=i.Tb,n.CNt=i.Ab,t&&r.jl()},s.prototype.a9=function(t,n){var i,r,e,o,u,f,e,s,t,c,i,r,e=this.Mf.parent,o=e.options.scrollbarAppearance===F.ScrollbarAppearance.mobile,u=e._vScrollbar,f=e._hScrollbar,e=e.ib,s=ht(t.X+""),t=ht(t.Y+""),c=ii(s,t);return o&&(0!==t&&(u.qy(F.ScrollbarState.show),e.$y(!0)),0!==s)&&(f.qy(F.ScrollbarState.show),e.$y(!1)),this.bNt(s,t,c,n)},s.prototype.SNt=function(t){var n,i,r,e,o,u,f,s,c,a,h,c,v,A,l,w,l,d,p,g,p,m,n=this,i=n.Mf,r=i.options.rightToLeft,e=n.MNt,o=i.Tb,u=n.CNt,f=i.Ab,s;i.parent&&i.parent.options.scrollByPixel?(i.Jt.Bl(),i.zw(),n.TNt(),n.B5e=M,n.G5e=M,n.LSe=M,n.BSe=M):(a=(c=i.Fi()).Py,h=c.b6,c=c.Cy,v=i.yw(1),l=i.Mw().iw,w=1,v&&0<v.length&&(A=v.findCol(f),f<l&&A&&!r&&A.x+R(A)-a<R(A)/2||r&&h-A.x<R(A)/2?f++:w=-1),l=i.dw(1),p=i.mw().Ky,g=1,l&&0<l.length&&(d=l.findRow(o),o<p&&d&&d.y+U(d)-c<U(d)/2?o++:g=-1),m=p=0,v&&0<v.length&&(A=v.findCol(f))&&(p=r?h-(A.x+A.width):a-A.x),l&&0<l.length&&(m=c-(d=l.findRow(o)).y),o!==e&&i.$A(o,0,e),f!==u&&i.o9(f,0,u),n.wNt(p*=w,m*=g,t))},s.prototype.TNt=function(){var t,n,i,r,e,o,u,f,t=this,n=t.Mf,i=t.MNt,r=n.Tb,e=t.CNt,o=n.Ab,u=n.zoom(),f=!1;i===r&&!t.G5e||(n.ki(F.Events.TopRowChanged,{sheet:n,sheetName:n.name(),oldTopRow:i,newTopRow:r,oldOffset:S(t.BSe/u),newOffset:S(n.ly/u)}),f=!0),e===o&&!t.B5e||(n.ki(F.Events.LeftColumnChanged,{sheet:n,sheetName:n.name(),oldLeftCol:e,newLeftCol:o,oldOffset:S(t.LSe/u),newOffset:S(n.my/u)}),f=!0),f&&n.$Dr({type:"updateTopLeftPosition",leftCol:n.Ab,topRow:n.Tb})},Dt=s,g.prototype.OZ=function(t){var n,i,r,e,o,u,f,s,c,a,h,r,v,A,l,w,n,v,d,p,n=this,i=n.Mf,r=i.Fi(),e=i.options.rightToLeft,o=r.Py,u=r.Cy,f=r.J7,s=r.Uy,c=r.X7,a=r.b6,h=r.Hy,r=r.Ay,v=t.JZ,A=i.Ny,l=i.Vy,w=0,n=n.ANt(v.X,v.Y),v=n.dragInfo,d=n.x,p=n.y;n&&(n.resizeInfo||v&&"corner"===v.side||n.selectionHitInfo)?w|=3:(u<=p&&(A&&p<r||!A&&p<c)&&(w|=2),o<=d&&(l&&(e?d<a:d<h)||!l&&(e?f+s<d:d<f))&&(w|=1),w|=96,i.parent&&(w|=12)),t.KZ=w},g.prototype.BZ=function(t){var n,i,i,r,e,o,u,i,f,s,f,c,s,a,n=this,i={e:t,r:M};g.et(n,"preProcessManipulationStarted",i),i.r||(i=t.JZ,e=(r=n.Mf).parent,o=r.rt,u=r.Dn,f=(i=n.ANt(i.X,i.Y)).dragInfo,s=i.selectionHitInfo,(r.sw=i).resizeInfo?r.endEdit()&&o.gk(i):f&&"corner"===f.side?o.wk&&o.wk(i):s?r.endEdit()&&(f=s.isHeader,c=s.isFirstIndicator,s=s.type,f&&o.A9(i,!0),a=i.hitTestType,i.hitTestType=s,o.F9(i),i.hitTestType=a,si(r,f,c,s),r.INt=!1,u.PD()):(r.pW&&(r.pW().VW=!1),r.INt=!1,u.PD(),1<t.kAt&&e&&e.options.allowUserZoom?(n.jAt=!1,n.YZ.$Z()):(n.jAt=!0,n.OAt.Ok(1===t.kAt))))},g.prototype.FZ=function(t){var n,i,i,r,e,r,o,i,u,f,r,u,n=this,i={e:t,r:M};g.et(n,"preProcessManipulationDelta",i),i.r||(i=t.JZ,e=(r=n.Mf).rt,r=r.sw,o=i.X,i=i.Y,r&&(u=r.dragInfo,f=r.selectionHitInfo,r.resizeInfo?(e.fk={e:t,x:o,y:i},e.y9()):u&&"corner"===u.side?(e.fk={e:t,x:o,y:i},e.Zk&&e.Zk()):f||e.ob?f&&e.Rk&&e.rb&&!0!==e.FI&&(r=f.type,e.fk={e:t,x:o,y:i},3===r?e.Y9():2===r?e.Z9():1===r&&e.W9()):n.jAt?t.gxt=n.OAt.a9(t.SAt.wAt,t.AAt):(u=t.nW.tW,n.YZ.iW(u))))},g.prototype.GZ=function(t){var n,i,i,r,e,o,e,n=this,i={e:t,r:M};g.et(n,"preProcessManipulationCompleted",i),i.r||(r=(i=n.Mf).rt,i.INt=!0,o=(e=i.sw).selectionHitInfo,e.resizeInfo?r.C9():e.dragInfo&&r.Yk?(r.DD&&r.DD(),i.parent.touchToolStrip.xNt()):o||r.ob?(r.X9(),o&&ci(i,o.isHeader,o.isFirstIndicator,o.type),i.Dn.E1()):(i.pW&&(i.pW().VW=!0),n.jAt?n.OAt.SNt(t.AAt):(e=t.nW.tW,n.YZ.rW(e))))},g.prototype.HZ=function(t){var i,n,n,r,e,t,o,o,u,n,f,s,c,a,h,v,A,v,h,A,a,v,n,n,n,l,l,l,l,w,d,l,n,i=this,n={e:t,r:M};if(g.et(i,"preProcessTapped",n),n.r)i.Mf.repaint();else if(n=t.JZ,r=i.Mf,e=r.parent,t=!1,r.Nk=p,i.NNt(),r.Olt&&r.Olt(),(o=r.Ut.pI)&&o.CZ(),o=r.rt,n=(u=i.ANt(n.X,n.Y,!0)).filterButtonHitInfo,f=u.hitTestType,s=u.row,c=u.col,a=u.outlineHitInfo)r.isEditing()||(h=a.what,v=r.rowOutlines,A=r.columnOutlines,"rg"===h||"rgh"===h?v&&v.rpt(r,a):"cg"!==h&&"cgh"!==h||A&&A.rpt(r,a));else if(r.sw=u,n)r.endEdit()&&(v=n.rowFilter)&&v.openFilterDialog(n);else if(!u.resizeInfo)if(r.JA(u.rowViewportIndex<0?-1:s,u.colViewportIndex<0?-1:c)){if(r.kNt&&!o.Yk&&e.touchToolStrip.xNt(),h=r.getActiveRowIndex(),A=r.getActiveColumnIndex(),a=u.cellTypeHitInfo){if(v=vi(r,a,u),a.sheet||(a.sheet=r),i.xk(v,a))if(n=a.sheetArea,!I(n)&&3!==n||s===h&&c===A)r.Dn.PD();else{if(r.suspendPaint(),!r.endEdit())return;if(n={sheet:r,sheetName:r.name(),row:h,col:A,cancel:!1},r.ki(F.Events.LeaveCell,n),!0===n.cancel)return;n=r.Ut.getSelections(),l=r.Ut.getSpan(s,c),l=[(0,F.Ec)(l.row,l.col,l.rowCount,l.colCount)],r.EA(n,l),r.ki(F.Events.FloatingElementSelected,{type:"worksheet"}),l=a.isReservedLocation&&a.isFocusAware,r.t4(s,c,p,p,l?0:1),l={sheet:r,sheetName:r.name(),row:s,col:c},r.ki(F.Events.EnterCell,l),r.ki(F.Events.EnterCellInternal,l),r.jA(n),r.Nk=!0,o.PA&&o.PA(s,c),r.resumePaint(),t=!0}v.processCellAndPaddingMouseDown(a),v.Ve(a)}if(a&&a.isReservedLocation)return!0;a&&(a.cellButtonHitInfo||a.outlineColumnHitInfo)&&(t=!0),r.ki(F.Events.CellClick,{sheet:r,sheetName:r.name(),sheetArea:f,row:u.row,col:u.col});try{if(o.Dk=u,w=r.isEditing(),d=r.endEdit(),r.Oi&&z&&w&&d&&(o.shift=!1),w&&h===r.getActiveRowIndex()&&A===r.getActiveColumnIndex()&&!d)return}finally{o.Dk=M}I(s)||I(c)||(3===f&&o.PA&&o.PA(s,c),ui(r,s,c,f)&&!t?i.DNt=At.setTimeout(function(){var t,n,t={x:u.x,y:u.y,handled:!1},n=e.touchToolStrip;r.ki(F.Events.TouchToolStripOpening,t),t.handled||n.open(u.x,u.y-tt),i.NNt()},420):(r.ki(F.Events.FloatingElementSelected,{type:"worksheet"}),l=r.Ut.getSelections(),o.A9(u),n=r.Ut.getSelections(),r.EA(l,n),o.X9()))}else r.ki(F.Events.CellClick,{sheet:r,sheetName:r.name(),sheetArea:f,row:u.row,col:u.col})},g.prototype.xk=function(t,n){return!(t&&t.activeOnClick&&!t.activeOnClick()&&n.isReservedLocation)},g.prototype._Nt=function(t,n){var i,r,i,t,n,e,o,i=this,r=i.Mf,i=i.ANt(t,n,!0);i&&0<=i.row&&0<=i.col&&0<=i.rowViewportIndex&&0<=i.colViewportIndex&&!i.resizeInfo&&r.JA(i.row,i.col)&&((t=r.isCtrlPressed(i.hitTestType))||r.IA(),n=r.C0(i.row),e=r.S0(i.col),o=!0,r.ui===i.row&&r.ci===i.col||(o=!1),r.O6(i.row,i.col,n,e,o),t?r.zw():r.n4(i.row,i.col,1,1),r.rt.S_(!1,!0),r.f6(r.Dg(),i.row,i.col))},g.prototype.WAt=function(t){var n,i,i,t,r,e,n=this,i={e:t,r:M};g.et(n,"preProcessDoubleTapped",i),!i.r&&(i=n.Mf,t=t.JZ,n.NNt(),r=i.sw)&&(e=!1,3===r.hitTestType?n._Nt(t.X,t.Y):e=i.rt.j_(r),e||i.ki(F.Events.CellDoubleClick,{sheet:i,sheetName:i.name(),sheetArea:r.hitTestType,row:r.row,col:r.col}))},g.prototype.ENt=function(t){var n,i,t,r,r,n=this,i=n.Mf,t=t.JZ,r=n.ANt(t.X,t.Y);i.isEditing()?r.row===i.ui&&r.col===i.ci||i.rt.C_(r):(n._target=r,(r=n.ANt(t.X,t.Y,!0))&&r.cellTypeHitInfo&&r.cellTypeHitInfo.isEditing||i.rt.C_(r))},g.prototype.jNt=function(t){var n,i,n,r,e,e,n=this,i=n.Mf;!i.isEditing()&&(r=!0,r=(!(n=n._target)||!((e=n.cellTypeHitInfo)&&e.isReservedLocation||(e=i.getCellType(n.row,n.col))&&e.isEditing()))&&r)&&i.rt.S_(!0)},g.prototype.ANt=function(t,n,i){var r,e,o,u,f,s,u,f,s,s,u,f,c,a,f,f,f,r,e=this.Mf;return e.Fi(),o={x:t,y:n,rowViewportIndex:M,colViewportIndex:M,row:-1,col:-1,resizeInfo:M,hitTestType:M,outlineHitInfo:M,filterButtonHitInfo:M,dragInfo:M,cellTypeHitInfo:M,selectionHitInfo:M},u=e.rowOutlines,f=e.columnOutlines,(s=!(s=u?u.hitTest(e,t,n):s)&&f?f.hitTest(e,t,n):s)?o.outlineHitInfo=s:(f=u=void 0,u=e.FL(n),f=e.PL(t),o.rowViewportIndex=u,o.colViewportIndex=f,o.row=e.GL(n,u),o.col=e.UL(t,f,n,u,o.row),0<=u&&u<=2&&0<=f&&(s=e.O_(u,f,p,o.row,o.col))&&(o.row=s.row,o.col=s.col),o.hitTestType=e.C6(u,f),a=c=f=u=s=void 0,s=ri(e,o,t,n,10),c=(c=(f=e.IB)&&f.hitTest(o,t,n))||(f=(f=(f=e.tables)&&f.find(o.row,o.col))&&f.IB)&&f.hitTest(o,t,n),e.kNt?(u=oi(e,o,t,n),o.dragInfo=u):s?o.resizeInfo=s:c?o.filterButtonHitInfo=c:i?o.cellTypeHitInfo=e.JL(o,t,n):(a=ei(e,o,t,n),o.selectionHitInfo=a)),o},g.prototype.NNt=function(){var t=this,n=t.DNt;n&&(clearTimeout(n),t.DNt=M)},_t=g,t.TouchEventHandler=_t,(0,F.$e)(_t),Ai.prototype.oW=function(){var t,n,t,t=this,n=t.DZ,t=t.xZ;t.jZ=function(t){return n.OZ(t)},t.RZ=function(t){return n.BZ(t)},t.LZ=function(t){return n.FZ(t)},t.PZ=function(t){return n.GZ(t)},t.UZ=function(t){return n.HZ(t)},t.ZAt=function(t){return n.WAt(t)},t.oIt=function(t){return n.ENt(t)},t.uIt=function(t){return n.jNt(t)}},Ai.prototype.uW=function(){var t=this,n=t.xZ;n&&(t.kZ.aW(n,!1),n.jZ=M,n.RZ=M,n.LZ=M,n.AIt=M,n.PZ=M,n.UZ=M,n.ZAt=M,n.IIt=M,n.oIt=M,n.uIt=M,t.xZ=M)},Ai.prototype.sW=function(t){return this.AZ.sW()},Ai.prototype.cW=function(t){return this.AZ.cW()},Ai.prototype.fW=function(t){return this.AZ.fW()},Zt=Ai,Qt="gc-toolstrip-button",Lt="gc-toolstrip-text",zt="gc-toolstrip-image",Gt="gc-toolstrip-item",Jt="gc-touch-sperate-line",Kt="height",Xt="width",A="px",Vt="button",N(x,hn=P),x.prototype.open=function(t,n){var i,r,e,o,u,f,i=this,r=d(i.Vv);if(r&&(F.hi.F1(M,!0),i.LAt.css({left:t,top:n}),i.$c(),i.Jet=!0,i.if(),!_(i.f$)))for(o in e=i.f$)e.hasOwnProperty(o)&&((f=!(u=e[o]).UAt||u.UAt.call(i))?O("#"+o).show():O("#"+o).hide())},x.prototype.add=function(t){var n,i,r,r;t&&(i=(n=this).f$,t instanceof $t?(r=t.name())&&(i[r]=t,n.ONt(t.RNt(Jt,n.BAt+A))):t instanceof qt&&(r=t.name(),n.getItem(r)||(i[r]=t,n.ONt(t.RNt(zt,n.RAt+A,Lt,Qt)))))},x.prototype.getItem=function(t){return this.f$[t]},x.prototype.getItems=function(){var t,n,i,r,t,n=[],i=this.f$;if(_(i))return M;for(r in i)i.hasOwnProperty(r)&&n.push(i[r]);return n},x.prototype.remove=function(t){var n,i,n=this;return n.getItem(t)?(O("#"+t).parent().remove(),i=n.f$[t],delete n.f$[t],i):M},x.prototype.clear=function(){var t=this;t.LAt&&(t.LAt.find("td."+Gt).remove(),t.f$={})},x.prototype.close=function(){var t,t,n,t=this;lt.cf(),t.LAt&&t.LAt.hide(),t.Jet=!1,t.uf(),(t=d(t.Vv))&&(t.Zg(),0<(n=m(t)).length)&&!t.kNt&&-1===n[0].row&&-1===n[0].col&&t.IA()},x.prototype.imageAreaHeight=function(t){var n=this;return 0===arguments.length?n.RAt:(0<t&&(n.RAt=t,n.LAt.find("span."+zt).css(Kt,t+A)),n)},x.prototype.itemHeight=function(t){var n=this,i=n.LAt.find("button."+Qt);return 0===arguments.length?vt(i.css(Kt)):(0<t&&i.css(Kt,t+A),n)},x.prototype.itemWidth=function(t){var n,i,r,e,n=this,i=n.LAt.find("button."+Qt);return 0===arguments.length?vt(i.css(Xt)):(0<t&&(t<(e=vt(i.css(r="min-width")))&&i.css(r,t+A),i.css(Xt,t+A)),n)},x.prototype.separatorHeight=function(t){var n=this;return 0===arguments.length?n.BAt:(0<t&&(n.BAt=t,n.LAt.find("div."+Jt).css(Kt,t+A)),n)},x.prototype.FAt=function(){var t,n,t,t="table",n=this,t=O(c(t)).css({padding:0,display:t}).attr({cellspacing:0,cellpadding:0});n.BNt=O(c("tr")).appendTo(t),t.appendTo(n.LAt)},x.prototype.L0=function(){var t=this,n=t.LAt;n&&(t.Jet&&(lt.cf(),t.uf()),n.unbind("click"),n.remove(),t.LAt=M)},x.prototype.aY=function(){var r=this;r.LAt.bind("click",function(t){var t,n,i,t,t,t=t.target,n;t.tagName.toLowerCase()===Vt?i=t.id:(t=t.parentElement)&&t.tagName.toLowerCase()===Vt&&(i=t.id),t=r.f$[i],i&&t&&t.tT.call(r)})},x.prototype.ONt=function(t){this.LAt&&t&&O(c("td")).append(t).appendTo(this.BNt).addClass(Gt)},x.prototype.PAt=function(){var t,t,n,i,r,e,t;function o(t){for(var n,i,n=0,i=t+n;B.getElementById(i);)i=t+ ++n;return i}i=(t={0:w+(t="gAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAA")+"A8ElEQVRIS92VwQ3CMAxFe+qZERiHY8dgDI4cYYNOhDhwY4ayQviW4q/Eddu0KRe+9CQ72P8rEpAmhPBT3ENLd76EiPv5HO5hSmK+KYTFsz+04A4G9NZ0hAizn7jTos2MFRYYugFZQlscoFzRZsYKCwwNulAqnZddtJmxwiIZ3oT6WFh4S2tQHwsLb2kN6mNh4S2tQX0sLLwly4IyY4WFZ2gReV/ZhBOQH2ddgKcYwBAc7R/weL0ZgqO6gGPXE1E0JlBdwJx2CUhvkCL63xvw33QKUc0N+B5MIaq5gb5o8kotBszJDShFlkvQ+ZHBvoTmC+fiVfoq/m86"+wt,1:w+t+"BkklEQVRIS7WTUXECQRBEcYCFOIiESAAH/OYPCcQBEogDJCABCUhAwqXf1QzVM0cojko+Xt3ObG/33t7eYhiGf6UU68+vneD5Mu4HpZDgKja+YCYH94NSSHAUg3glZC9k8zgAYwLmhuS6o/tBKUJ8CTGsoveIsin3g1LEAkxzAd/kXbihwxwatGys+EEpEAT5LR6FuDmMb+t+UAoEwVL44h7CvB8lGxrn3A9KkaLAj8pDMD9HL/v0ZgfAQfSAk/WgXAT3g1K4MPCj2AoPhNvRJO4HpejigF1jxtjNy9Ek7gel6GIjfzoP+Ihewf2gFPcWNNL817/c/aAUKXpbfy/FXlzFIM6gOYy3Gp+iz/xBPHeLQGLAMI2PNmYOw1uojZfdCyYNCXexiGcGpiljdp9hsBGjvnvBpCHhRbgBZChjAgj0eXrX7gWThoR992lAMGOOLMfJuIHuBZMGQuE75KN66Cpq14xH2L1g0kixyLNm3I8sNbwJulHfvWDSkJArmou4hlxXeh4AvBEBuZnnbtHfMix+AHqkr6wgQ4Q7"+wt,2:w+t+"A3UlEQVRIS72PwQ3CMAxFOwrjcOyZCTgyAjfWYCJO3JiCCVL/iFSO9W0MDTzpqYob+ztTKeWn0uJIadE6H8/ljXsR96q6tzt4YogH/olPcQ2R8mp3CHRBwO3+6EKkvNodcDkSgyyoAx0iRz/AA/8Op0sdtJuv1Va3Ct8FYHgL8dgUAGxIe41+kRAH6CbdaGW86nFAhnaXLSLEAbqJCbxlUgEZ2DIgFaCbmMBbJhWQgS0DUgG6iQm8ZVIBGTYFsK21oN3F1yrEARnsIM/u8JeAT9S9nrQ4UlocKS2Os0wLtkPMdu9POt0AAAAASUVORK5CYII=",3:w+"UAAAAXCAIAAABrvZPKAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAIdJREFUOE/tzEEKgCAQheEOWLdx351adYc8Qgs3rbuAUC9nkkF0BKNN9CMy0Xx25llf8Edr7d57j/tlP4wTHf4W/b7gsT0vLs7Sz9bFWfM9nrDXE9ITphlVPO512wkkM++FNF86vBfKeKR43rjLe5QwOvxPVPSoipHmkY5RxSMFo7rXY9+eMSdet07b6c/bnwAAAABJRU5ErkJggg=="})[0],r=t[1],e=t[2],t=t[3],(n=this).LNt=new qt(o("wijspread_toolstrip_paste"),f().ToolStrip_PasteText,i,n.FNt),n.PNt=new qt(o("wijspread_toolstrip_cut"),f().ToolStrip_CutText,r,n.GNt),n.UNt=new qt(o("wijspread_toolstrip_copy"),f().ToolStrip_CopyText,e,n.HNt),n.zNt=new qt(o("wijspread_toolstrip_autofill"),f().ToolStrip_AutoFillText,t,n.VNt,n.YNt),n.add(n.LNt),n.add(n.PNt),n.add(n.UNt),n.add(new $t(n.YNt)),n.add(n.zNt)},x.prototype.YNt=function(){var t,n,i,r,t=d(this.Vv);if(!t)return!1;if(0===(n=m(t)).length)return!1;for(i=0;i<n.length;i++)if(-1===(r=n[i]).row&&-1===r.col)return!1;return!0},x.prototype.VNt=function(){var t,n;this.close(),(t=d(this.Vv))&&(n=m(t).length)<=1&&(t.kNt=!0,t.Dn.E1())},x.prototype.xNt=function(){var t=d(this.Vv);t&&(t.kNt=!1,t.Dn.E1())},x.prototype.HNt=function(){var t,n,t=d(this.Vv);t&&((n=li(t))?t.Qy().execute({cmd:"copyFloatingObjects",sheetName:t.name()}):t.Qy().execute({cmd:"copy",sheetName:t.name(),ignoreClipboard:!0})),this.close()},x.prototype.GNt=function(){var t,n,i,t=d(this.Vv);if(t){if(n={r:M},x.et(this,"beforeDoTabCut",n),n.r)return;(i=li(t))?t.Qy().execute({cmd:"cutFloatingObjects",sheetName:t.name()}):t.Qy().execute({cmd:"cut",sheetName:t.name(),ignoreClipboard:!0})}this.close()},x.prototype.FNt=function(){var t,n,i,t=this,n=d(t.Vv);if(n){if(i={r:M},x.et(this,"beforeDoTabPaste",i),i.r)return;n.isPasteFloatingObject&&n.isPasteFloatingObject()?n.Qy().execute({cmd:"pasteFloatingObjects",sheetName:n.name()}):n.isPasteShapes&&n.isPasteShapes()?n.Qy().execute({cmd:"pasteShapes",sheetName:n.name()}):n.Qy().execute({cmd:"paste",sheetName:n.name(),pasteOption:0})}t.close()},x.prototype.WNt=function(){var t=this,n="span."+Lt;O("#"+t.LNt.Zc).find(n).text(f().ToolStrip_PasteText),O("#"+t.PNt.Zc).find(n).text(f().ToolStrip_CutText),O("#"+t.UNt.Zc).find(n).text(f().ToolStrip_CopyText),O("#"+t.zNt.Zc).find(n).text(f().ToolStrip_AutoFillText)},Wt=x,t.TouchToolStrip=Wt,(0,F.$e)(Wt),di.prototype.name=function(t){var n=this;return 0===arguments.length?n.Zc:(O("#"+n.Zc).attr("id",t),O("#"+n.Zc+"Text").attr("id",t+"Text"),O("#"+n.Zc+"Image").attr("id",t+"Image"),n.Zc=t,n)},di.prototype.text=function(t){var n=this;return 0===arguments.length?n._text:(n._text=t,O("#"+n.name()+"Text").text(t),n)},di.prototype.font=function(t){var n,i,n=this,i=O("#"+n.name()+"Text");return 0===arguments.length?n._font:(n._font=t,i.css("font",t),n)},di.prototype.foreColor=function(t){var n,i,n=this,i=O("#"+n.name()+"Text");return 0===arguments.length?n.Oft||i.css("color"):(i.css("color",t),n)},di.prototype.image=function(t){var n=this;return 0===arguments.length?n.GAt:(n.GAt=t,O("#"+n.name()+"Image").css("background-image","url("+t+")"),n)},di.prototype.RNt=function(t,n,i,r){var e,o,u,f,s,t,n,e,u,e=this,o=e.name(),u=e.font(),f=e.text(),s=O(c("span"));return s.attr("id",o+"Image"),s.addClass(t),s.css({"background-image":"url("+e.image()+")","background-repeat":"no-repeat",display:"block",height:n,"background-position-x":"50%"}),(t=O(c("span"))).attr("id",o+"Text"),t.addClass(i),t.css("font",u),t.text(f),(e=60)<(n=wi(u,f,i))&&(e=n),(u=O(c(Vt))).attr("type",Vt),u.attr("id",o),u.addClass(r+" gc-toolstrip-button-style ui-state-default ui-widget btn btn-default"),u.css({"box-sizing":"content-box",border:"0px",padding:"4px",margin:"3px",width:e+A}),u.append(s),u.append(t),u[0]},qt=di,t.TouchToolStripItem=qt,pi.prototype.name=function(){return this.Zc},pi.prototype.RNt=function(t,n){var i=O(c("div"));return i.attr("id",this.name()),i.addClass(t),i.css({width:"1px",height:n,display:"inline-block;","background-color":"#CCC","margin-left":"5px","margin-right":"5px",opacity:.6}),i[0]},$t=pi,t.TouchToolStripSeparator=$t,y.prototype.NIt=function(){this.QNt=2,this.jS.Oi=!0},y.prototype.qAt=function(){this.QNt=0,this.KNt=l()},y.prototype.xIt=function(){return 1===this.QNt},y.prototype.jIt=function(){return 1===this.QNt},y.prototype._It=function(){return 1===this.QNt},y.prototype.sW=function(){var t=this;if(2===t.QNt)return!0;if(t.KNt){if(l()-t.KNt<=200)return t.JNt++,!0;t.KNt=0,t.JNt=0}return t.QNt=1,t.jS.Oi=!1},y.prototype.cW=function(){var t=this;return t.JNt?(t.JNt--,!0):2===t.QNt||(t.QNt=0,!1)},y.prototype.fW=function(){return 2===this.QNt},tn=y,t.IZ=tn,nn=gi,t.NZ=nn,mi.prototype.XNt=function(t,n){var i,r,e,o,r,e,i=t,r=i.touches,e=i.targetTouches,o=i.changedTouches;!1===i.isPrimary||r&&1<=r.length&&e&&1<=e.length&&(r[0].clientX!==e[0].clientX||r[0].clientY!==e[0].clientY)||(a(t),r=I(o)?i:o[0],(e=B.createEvent("MouseEvents")).initMouseEvent(n,!0,!0,At,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,M),t.target.dispatchEvent(e))},mi.prototype.lIt=function(t){var n,n,n=t.pointerType;n&&n!==t[v]&&n!==h||(n=t.data).Vb||(n.Vb=!0,n.qNt=!1,n.XNt(t,"mouseover"),n.XNt(t,"mousemove"),n.XNt(t,"mousedown"))},mi.prototype.iE=function(t){var n,n,n=t.pointerType;n&&n!==t[v]&&n!==h||(n=t.data).Vb&&(n.qNt=!0,n.XNt(t,"mousemove"))},mi.prototype._up=function(t){var n,n,n=t.pointerType;n&&n!==t[v]&&n!==h||(n=t.data).Vb&&(n.XNt(t,"mouseup"),n.XNt(t,"mouseout"),n.qNt||n.XNt(t,"click"),n.Vb=!1)},mi.prototype.$Nt=function(t,n,i){var r,e,e,o,u,f,s,c,a,h,i,v,n,r=this,e=i.charAt(0),e=it+(i="."!==e?"."+i:i),o=rt+i,u=et+i,f=ot+i,s=ut+i,c=ft+i,a=st+i,h=ct+i,i=at+i,v=F.mt.m0();n?v?(n=t.style,I(n.msTouchAction)||(n.msTouchAction=nt),I(n.touchAction)||(n.touchAction=nt),O(t).bind(e,r,r.lIt).bind(f,r,r.lIt),O(B).bind(o,r,r.iE).bind(s,r,r.iE).bind(u,r,r._up).bind(c,r,r._up)):O(t).bind(a,r,r.lIt).bind(h,r,r.iE).bind(i,r,r._up):v?(O(t).unbind(e).unbind(f),O(B).unbind(o).unbind(s).unbind(u).unbind(c)):O(t).unbind(a).unbind(h).unbind(i)},rn=mi,t.QAt=rn,en="newSheet",on="tab",un="allSheets",E.prototype.BZ=function(t){var n,t,i,r,e,e,o,u,e,t,u,t,u,f,s,e,c,u,n=this,t=t.JZ,i=n.w2,r=i.im(),e=d(i.Vv);i.Og&&i.Rg(e,!1),e="resize",(u=(o=i.hitTest(t.X,t.Y)).element)===e?(i.Bg=!0,i.Lg=t.X):u!==on&&u!==en&&""!==u||(e=i.fg,t=F.Bf.Xl(e),u=F.Bf.ql(e),u=(t=n.oNt(t,u)).getContext("2d"),f=F.Bf.Kl(t),s=F.Bf.Jl(t),F.Lf.Vl(u,1,1),u.drawImage(e,0,0,R(t),U(t),0,0,R(t),U(t)),F.Lf.Vl(u,f,s),n.fg=t,n.t6t=i.om,n.n6t=i.tm(),n.e6t=i.Xv(),n.Rv=i.Jv()),n.i6t=i.N2(-1),e=i.Ym(i.Zm()),n.r6t=-1===e?i.om:e,u=(c=r?i.$v:i.gTe).slice(0,n.t6t),n._Re=0<u.length?u.reduce(function(t,n){return t+n}):0},E.prototype.FZ=function(t){var n,i,r,e,o,u,n,f,s,c,f,a,f,u,s,a,c,r,h,t,v,v,s,u,a,c,s,A,l,w,d,o,n,o,p,g,n,i,i=this,r=t.JZ.X,e=i.w2,o=e.im(),u=e.Vv,n=null==(n=(0,F.jf)(u))?void 0:n.options.rightToLeft;e.Bg?(f=r-e.Lg,s=u.options,c=u._vp.clientWidth,s.tabStripRatio=u.Jg()+f/c,f=n?0:e.rm()/c,a=n?1-e.rm()/c:1,u.Jg()<f?(s.tabStripRatio=f,e.Lg=e.rm()):u.Jg()>=a?(s.tabStripRatio=a,e.Lg=c):e.Lg=r):(f=i.fg,u=i.t6t,f&&!I(u)&&(s=i.i6t,a=i.r6t,c=i.Rv,r=i.n6t,h=i.e6t,t=o?t.nW.wAt.X:t.nW.wAt.Y,v=i.o6t(t,u),e.om=v.om,v=v._size,(0<t&&u===s&&e.om===s||t<0&&u===a&&e.om===a)&&(v=0),0<t&&v+c<t?t=v+c:t<0&&t<v-c&&(t=v-c),0!==t)&&(u=(s=e.fg).getContext("2d"),a=F.Bf.Kl(s),c=F.Bf.Jl(s),u.save(),u.clearRect(0,0,F.Bf.Xl(s),F.Bf.ql(s)),s=e.ot(),e.wm(u,s),o?(d=w=l=A=void 0,n?(d=U(s),n=o=void(l=0),0<t?(0<(w=h-(o=(A=r)+t))&&(F.Lf.Vl(u,1,1),u.drawImage(f,A*a,l,w*a,d*c,o*a,l,w*a,d*c),F.Lf.Vl(u,a,c)),n=h-r<=t?0:t-v,A=r,0<(w=v)&&(F.Lf.Yl(u,n,0),e.Z2(u,new F.Rect(A,l,w,d)),F.Lf.Yl(u,-n,0))):t<0&&(0<(w=h-(A=(o=r)+S(t)))&&(F.Lf.Vl(u,1,1),u.drawImage(f,A*a,l,w*a,d*c,o*a,l,w*a,d*c),F.Lf.Vl(u,a,c)),n=t-v,h-r<=S(t)&&(n=0),A=h-(w=S(v)),0<w)&&(F.Lf.Yl(u,n,0),e.Z2(u,new F.Rect(A,l,w,d)),F.Lf.Yl(u,-n,0)),F.Lf.Vl(u,1,1),A=0,w=r):(o=r-i._Re+t,F.Lf.Yl(u,o,0),e.Z2(u,void 0,!0),F.Lf.Yl(u,-o,0),F.Lf.Vl(u,1,1),l=A=0,w=r,d=U(s)),u.drawImage(f,A*a,l,w*a,d*c,A*a,l,w*a,d*c),p=F.I.fl(""),2007<(g=ht(p.zIndex))&&(A=h,w=s.x+R(s)-e.rm()-A,u.drawImage(f,A*a,l,w*a,d*c,A*a,l,w*a,d*c)),A=R(s)-e.rm(),w=e.rm(),u.drawImage(f,A*a,l,w*a,d*c,A*a,l,w*a,d*c)):(w=R(s),i=n=d=l=void(A=0),0<t?(0<(d=h-(n=(l=r)+t))&&(F.Lf.Vl(u,1,1),u.drawImage(f,A*a,l*c,w*a,d*c,A*a,n*c,w*a,d*c),F.Lf.Vl(u,a,c)),i=h-r<=t?0:t-v,l=r,0<(d=v)&&(F.Lf.Yl(u,0,i),e.Z2(u,new F.Rect(A,l,w,d)),F.Lf.Yl(u,0,-i))):t<0&&(0<(d=h-(l=(n=r)+S(t)))&&(F.Lf.Vl(u,1,1),u.drawImage(f,A*a,l*c,w*a,d*c,A*a,n*c,w*a,d*c),F.Lf.Vl(u,a,c)),i=t-v,h-r<=S(t)&&(i=0),l=h-(d=S(v)),0<d)&&(F.Lf.Yl(u,0,i),e.Z2(u,new F.Rect(A,l,w,d)),F.Lf.Yl(u,0,-i)),F.Lf.Vl(u,1,1),u.drawImage(f,A*a,(l=0)*c,w*a,(d=r)*c,A*a,l*c,w*a,d*c),p=F.I.fl(""),2007<(g=ht(p.zIndex))&&(l=h,d=s.y+U(s)-e.rm()-l,u.drawImage(f,A*a,l*c,w*a,d*c,A*a,l*c,w*a,d*c)),l=U(s)-e.rm(),d=e.rm(),u.drawImage(f,A*a,l*c,w*a,d*c,A*a,l*c,w*a,d*c)),F.Lf.Vl(u,a,c),u.restore()))},E.prototype.GZ=function(t){var n=this.w2;n.Bg?(n.Bg=!1,n.Vv.Xg()):n.repaint()},E.prototype.HZ=function(t){var n,i,r,e,o,r,u,o,n=this.w2,i=n.Vv,r=t.JZ,e=d(i);n.Og&&n.Rg(e,!1),o=["first","prevArrow","nextArrow","last","","prevButton","nextButton"],u=(r=n.hitTest(r.X,r.Y)).element,i.Bp=!0;try{0<=o.indexOf(u)?n.Pg(r.index,!0):u===on?n.Gg(r.index,r.position):u===en?n.Hg(r.position):u===un&&this.zg(t)}finally{i.Bp=!1,(o=d(i))!==e&&(o.Oi=!0,o.Zg())}},E.prototype.WAt=function(t){return this.w2.E2(t.JZ.X,t.JZ.Y)},E.prototype.oNt=function(t,n){var i=this.fg;return i?t===F.Bf.Xl(i)&&n===F.Bf.ql(i)||F.Bf.$l(i,t,n):(i=c("canvas"),F.Bf.Wl(i,this.w2.Vv),F.Bf.$l(i,t,n)),i},E.prototype.o6t=function(t,n){var i,r,e,o,u,f,s,c,i,a,h,v,i=this,r=i.w2,e=r.$v,o=r.gTe,u=i.i6t,f=i.r6t,s=r.im(),c,i=d(r.Vv),a,h=n,v=0;if((null==i?void 0:i.options.rightToLeft)&&s){if(0<t){for(;h<=f&&!(t<v);)v+=e[h],h++;f<h&&(h=f)}else if(t<0&&-1!==f){for(;u<=h&&!(v<t);)v-=e[h],h--;h<u&&(h=u)}}else if(0<t){for(;u<=h&&!(t<v);)v+=(s?e:o)[h],h--;h<u&&(h=u)}else if(t<0&&-1!==f){for(;h<=f&&!(v<t);)v-=(s?e:o)[h],h++;f<h&&(h=f)}return{om:h,_size:v}},E.prototype.zg=function(t){var n,i,n=this.w2,i=gn(n.getCanvas());n.zg({pageX:t.JZ.X+i.I0,pageY:t.JZ.Y+i.A0})},fn=E,Ci.prototype.oW=function(){var t=this,n=t.kZ;n&&n.aW(t.xZ,!0)},Ci.prototype.uW=function(){var t=this,n=t.kZ;n&&n.aW(t.xZ,!1)},Ci.prototype.sW=function(t){return this.AZ.sW()},Ci.prototype.cW=function(t){return this.AZ.cW()},Ci.prototype.fW=function(t){return this.AZ.fW()},sn=Ci,F.g7.prototype.PD=function(){var t,n,i,r,t=this,n=t.Mf,i=m(n),r=i.length;n.My<=0&&0<r&&t.E1(i[r-1],p,p,!0)},F.Worksheet.ch(h,{init:function(){this.kNt=!1,this.INt=!0},setHost:function(t){var n,i,i,t,n=this,i=n.parent,i=i&&i.kZ||new mt,t=new Zt(t[0],n,i);t.oW(),n.dW=t},dispose:function(t){var n=this;n.dW&&n.dW.uW(),!1!==t.clearCache&&(n.dW=M)},startEdit:function(){this.Oi&&this.Dn.PD()},paintAdornment:function(t){var n,t,n=this,t=t.ctx;n.Oi&&(n.isActualProtected()||Mi(n,t),n.kNt?Fi(n,t):Pi(n,n.INt,t))},preProcessMouseDown:function(t){var n,i,n=t.e,i=this.dW;(r||i.sW(n))&&(a(n),t.r=!0)},preProcessMouseMove:function(t){var n,i,n=t.e,i=this.dW;(r||i.fW(n))&&(a(n),t.r=!0)},preProcessMouseUp:function(t){var n,i,n=t.e,i=this.dW;(r||i.cW(n))&&(a(n),t.r=!0)},preProcessMouseDbClick:function(t){(r||this.Oi)&&(t.r=!0)},preProcessMouseOut:function(t){r&&(t.r=!0)},preProcessMouseWheel:function(t){r&&(t.r=!0)}}),F.Workbook.ch(h,{init:function(){this.kZ=new mt},setHost:function(){var t=this;t.touchToolStrip=new Wt(t,t.j2())},dispose:function(){var t=this,n=t.kZ,i=t.touchToolStrip;n&&n.L0(),i&&(i.L0(),t.touchToolStrip=M)},onCultureChanged:function(){var t=this.touchToolStrip;t&&t.WNt()}}),F.Hv.ch(h,{setHost:function(){var t,n,t=this,n=new sn(t.fg,t,t.Vv.kZ);n.oW(),t.dW=n},dispose:function(){var t=this,n=t.dW;n&&(n.uW(),t.dW=M)},preProcessMouseDown:function(t){var n=this.dW,i=t.e;(r||n.sW(i))&&(a(i),t.r=!1)},preProcessMouseMove:function(t){var n=this.dW,i=t.e;(r||n.fW(i))&&(a(i),t.r=!1)},preProcessMouseUp:function(t){var n=this.dW,i=t.e;(r||n.cW(i))&&(a(i),t.r=!1)},preProcessMouseDbClick:function(t){var n=d(this.Vv);(r||n&&n.Oi)&&(t.r=!1)},preProcessMouseOut:function(t){r&&(t.r=!1)}}),cn=".gcScrollbar",F.YM.ch(h,{initEvents:function(t){var n;(this.Hb=new rn).$Nt(t,!0,cn)},dispose:function(t){var n=this.Hb;n&&n.$Nt(t,!1,cn)}})},"./dist/plugins/touch/touch.res.en.js":function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ToolStrip_AutoFillText=n.ToolStrip_CopyText=n.ToolStrip_CutText=n.ToolStrip_PasteText=void 0,n.ToolStrip_PasteText="Paste",n.ToolStrip_CutText="Cut",n.ToolStrip_CopyText="Copy",n.ToolStrip_AutoFillText="AutoFill"},Common:function(t){t.exports=n.Spread},Core:function(t){t.exports=n.Spread.Sheets}},r={},t=e("./dist/plugins/touch/touch.entry.js"),(((n=void 0===n?{}:n).Spread=n.Spread||{}).Sheets=n.Spread.Sheets||{}).Touch=t}()});
12
+ !function(t){var n;"object"==typeof module&&"object"==typeof module.exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-sheets-core"),module.exports=t(n)):"function"==typeof define&&define.amd?define(["@grapecity-software/spread-common","@grapecity-software/spread-sheets-core"],t):"object"==typeof exports?(n=require("@grapecity-software/spread-common"),require("@grapecity-software/spread-sheets-core"),exports.Spread=t(n)):t(GC)}(function(n){!function(){"use strict";var i,r,t;function e(t){var n,n,n=r[t];return void 0!==n||(n=r[t]={exports:{}},i[t].call(n.exports,n,n.exports,e)),n.exports}i={"./dist/plugins/touch/touch.entry.js":function(t,n,i){var r,e,r=this&&this.__createBinding||(Object.create?function(t,n,i,r){void 0===r&&(r=i);var e=Object.getOwnPropertyDescriptor(n,i);e&&("get"in e?n.__esModule:!e.writable&&!e.configurable)||(e={enumerable:!0,get:function(){return n[i]}}),Object.defineProperty(t,r,e)}:function(t,n,i,r){t[r=void 0===r?i:r]=n[i]}),e=this&&this.__exportStar||function(t,n){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(n,i)||r(n,t,i)};Object.defineProperty(n,"__esModule",{value:!0}),e(i("./dist/plugins/touch/touch.js"),n)},"./dist/plugins/touch/touch.js":function(k,t,P){var N,Y,F,P,I,P,O,D,_,c,a,Z,Q,L,z,r,M,p,S,j,G,J,K,o,X,V,W,q,$,tt,h,nt,it,rt,et,ot,ut,ft,st,ct,at,v,u,ht,vt,At,B,lt,w,wt,H,L,f,dt,pt,gt,mt,Ct,bt,b,Mt,xt,yt,Et,kt,Pt,Ft,It,Ot,Bt,Nt,Yt,St,jt,Ht,Tt,Ut,T,Rt,Dt,_t,Zt,Qt,Lt,zt,Gt,Jt,Kt,Xt,A,Vt,Wt,qt,$t,tn,nn,rn,en,on,un,fn,sn,cn,an,hn;function U(t){return t.height}function R(t){return t.width}function vn(t){clearInterval(t)}function l(){return(new Date).valueOf()}function An(t,n){var i,r,e,o,u,f,s,t;return t&&n&&(o=e=i=13,f=u=r=15,s=t.X-n.X,t=t.Y-n.Y,S(s)<13)&&S(t)<13&&V(s*s+t*t)<j(15,15)}function d(t){var t=t.jg();return t instanceof F.Worksheet?t:t&&t.Mf}function m(t){return t.getSelections()}function ln(t){return t.frozenTrailingColumnCount()}function wn(t){return t.frozenTrailingRowCount()}function dn(t,n){return t.getColumnCount(n)}function pn(t,n){return t.getRowCount(n)}function gn(t){var t=O(t).offset(),n=B.body,i=0,r=0;return t&&(i=t.top+n.clientTop||0,r=t.left+n.clientLeft||0),{A0:i,I0:r}}function n(){var t=this;t.j0t=[],t.WTt={length:0},t.QTt=new Ct,t.KTt=new bt}function mn(t,n){var n=K(n.Y,n.X)-K(t.Y,t.X);return o<n?n-=2*o:n<-o&&(n+=2*o),n}function Cn(t,n){return V((n.X-t.X)*(n.X-t.X)+(n.Y-t.Y)*(n.Y-t.Y))}function bn(t,n,i){var r,e,t,n,r,r=new b(i._Center.X,i._Center.Y),e=new b(n.X-r.X,n.Y-r.Y),t=new b(t.X-r.X,t.Y-r.Y),n=j(1,J(Cn(n,r)/i._Radius,4)),r=mn(e,t);return u(r)?0:r*n}function Mn(t){return S(t)<=2220446049250313e-31}function xn(t,n){var i=!1,r=!1,e;return{JTt:i=0!==t&&(e=W(n/t)/o*180)<20?!0:i,XTt:r=0===t||75<(e=W(n/t)/o*180)&&e<105?!0:r}}function i(){var t=this;t.qTt=0,t.$Tt=0,t.tAt=1,t.nAt=0,t.eAt=0,t._process=0,t.rAt=511,t.oAt=new Ft,t.aAt=20,t.uAt=new Mt}function yn(){}function En(t,n){this.X=t,this.Y=n}function kn(t){return new b(t?X(t.X):-1,t?X(t.Y):-1)}function e(){var t=this;t.DU=0,t.ak=0,t.sAt=10,t.cAt=[]}function Pn(t,n,i,r,e){var o=this;t?o.cAt=t:(o.fAt=new b(n,i),o.lAt=r,o.hAt=e)}function Fn(t){this.dAt=t,this.vAt=0}function In(t){this.dAt=t,this.vAt=0}function On(t,n){var i=this;i.mAt=t,i.gAt=n,i.pAt=0,i.bAt=0,i.vAt=0,i.yAt=V(t*t+n*n)}function Bn(){var t=this;t.wAt=new b(0,0),t.tW=0,t.MAt=0,t.CAt=0}function Nn(){this.wY=[]}function Yn(t,n,i){var r=this;r.nW=t,r.SAt=n,r.TAt=i}function Sn(t,n,i,r,e){var o=this;o.qZ=t,o.nW=n,o.AAt=i,o.JZ=r,o.TAt=e}function jn(t,n,i,r,e,o){var u=this;u.qZ=t,u.nW=n,u.SAt=i,u.AAt=r,u.JZ=e,u.TAt=o}function Hn(t,n,i,r,e,o,u){var f=this;f.qZ=t,f.nW=n,f.SAt=i,f.TAt=r,f.IAt=e,f.xAt=o,f.NAt=u}function Tn(t,n,i,r){var e=this;e.qZ=t,e.kAt=n,e.nW=i,e.JZ=r}function Un(t,n,i,r){var e=this;e.qZ=t,e.KZ=n,e.DAt=i,e.JZ=r}function Rn(t){this.JZ=t}function Dn(t){this.JZ=t}function _n(t){this.JZ=t}function Zn(t,n){var t=t*n;return 4<t?t=4:t<.5&&(t=.5),t}function Qn(t){this.Mf=t}function Ln(t,n,i,r){var e,o,i,u,f,s,c,a,h,v,v,A,l,w,d,c,e=i,o=0,i=0,u=t.Jt,c=t.Fi(),a=c.Cy,h=t.dw(1).findRow(e),v=t.parent,v=v&&v.options.scrollByPixel&&v.options.scrollbarMaxAlign;if(h)if(0<n){for(f=t.vw(-1),o=a-h.y;f<e&&o<n;)o+=u.Gt(--e);i=n-o}else if(n<0){if(A=0,l=r,v){if(w=t.frozenRowCount(),d=t.getRowCount()-t.frozenTrailingRowCount()-1,s=(c=t.gw(t.Sy(c),w,d)).Ky,A=c.Xy,l=r+n,s<e||e===s&&l<A)return M}else s=t.mw().Ky;for(o=-(h.y+U(h)-a);e<s&&n<o;)o-=u.Gt(++e);i=n-o,v&&e===s&&l<A&&(n=(i=A+u.Gt(e))+o)}return{Ky:e,Xy:i,_At:n}}function zn(t,n,i,r){var e,o,i,u,f,s,c,a,h,v,A,v,A,l,w,d,c,e=i,o=0,i=0,s=t.Jt,c=t.Fi(),a=c.Py,h=t.yw(1).findCol(e),v=t.parent,A=t.options.rightToLeft,v=v&&v.options.scrollByPixel&&v.options.scrollbarMaxAlign;if(h)if(A){if(0<n){for(f=t.Mw().iw,o=c.b6-h.x;e<f&&o<n;)o+=s.Kt(++e);i=n-o}else if(n<0){for(u=t.ww(-1),o=-(h.x+h.width-c.b6);u<e&&n<o;)o-=s.Kt(--e);i=n-o}}else if(0<n){for(u=t.ww(-1),o=a-h.x;u<e&&o<n;)o+=s.Kt(--e);i=n-o}else if(n<0){if(A=0,l=r,v){if(w=t.frozenColumnCount(),d=t.getColumnCount()-t.frozenTrailingColumnCount()-1,f=(c=t.Cw(t.Gy(c),w,d)).iw,A=c.Xy,l=r+n,f<e||e===f&&l<A)return M}else f=t.Mw().iw;for(o=-(h.x+R(h)-a);e<f&&n<o;)o-=s.Kt(++e);i=n-o,v&&e===f&&l<A&&(n=(i=A+s.Kt(e))+o)}return{iw:e,Xy:i,EAt:n}}function Gn(t,n){return ht(-n/(t/n+1)+n+"")}function Jn(t,n){return ht(n*(-n/(t-n)-1)+"")}function C(t,n,i,r,e,o){t.fillStyle=n,t.fillRect(i,r,e,o)}function Kn(t,n,i,r,e){var o,u,f,u,s,c,a,h,u=F.I.He(0,"gc-columnHeader-normal"),f=u&&u.backgroundImage,u=u&&u.backgroundColor;if(f&&-1!==f.indexOf("linear-gradient"))for(s=F.mt.ri(f),o=t.createLinearGradient(n+r/2,i,n+r/2,i+e),c=0,a=s.length;c<a;c++)h=s[c],o.addColorStop(h.point,h.color);else u&&(o=u);return o}function Xn(){var t=F.I.He(0,"gc-rowHeader-normal");return t&&t.backgroundColor}function Vn(t,n){var i,r,e,o,e,u,e,f,s,r,c,a,h,v,A,l,w,d,p,g,u,e,m,A,m,A,A,m,A,m,g,e,p,i=t.Fi(),r=t.Dn,e=t.options,o=t.options.rightToLeft,e=e.sheetAreaOffset,u=e.left,e=e.top,f=r.R7(!1),s=r.J(),r=r._7(),A=t.dw(1),l=qn(t),w=i.J7,d=i.Uy,p=i.X7,g=i.Ty,c=i.BA,u=1<=u?1:0,e=1<=e?1:0,h=R(i);s.save(),r.save(),m=t.vw(-1),(A=A.findRow(m))&&(a=i.Cy,0<(v=A.y-a-1-e))&&(n?(m=i.XC,C(s,A=Xn(),c,a,m-1,v+1),C(r,A,c,a,m-1,v+1),C(s,f,A=o?i.x:c+m,a,m=o?h-m:h-m-l.width,v),C(r,f,A,a,m,v)):(C(s,f,c,a,h,v),C(r,f,c,a,h,v))),H<g&&(C(s,f,c,p,h,v=g-H-e),C(r,f,c,p,h,v)),A=t.yw(1),a=i.LA,v=U(i),m=t.ww(-1),(g=A.findCol(m))&&(o?(c=i.b6,c-=h=c-(g.x+g.width)):(c=i.Py,h=g.x-c-1-u),0<h)&&(n?(C(s,p=Kn(s,c,a,h+1,(e=i.qC)-1),c,a,h+1,e-1),C(r,p,c,a,h+1,e-1),C(s,f,c,a+e,h,v-e-l.height),C(r,f,c,a+e,h,v-e-l.height)):(C(s,f,c,a,h,v),C(r,f,c,a,h,v))),H<d&&(h=d-H-u,C(s,f,w,a,h=o&&w+h>=i.b6?i.b6-w:h,v),C(r,f,w,a,h,v)),r.restore(),s.restore()}function Wn(t,n,i,r,e,o){t.beginPath(),t.strokeStyle=n,t.moveTo(i,r),t.lineTo(e,o),t.stroke()}function qn(t){var n,i=t.options.sheetAreaOffset;return t.gj&&t.gj()||{x:i.left,y:i.top,width:0,height:0}}function $n(t,n){var i,r,e,o,u,f,s,u,s,c,a,h,c,u,t,c,i=t.Fi(),r,e=t.Dn.J(),o=t.options.rightToLeft,u=t.dw(1),f=qn(t),s=t.vw(-1),u=u.findRow(s),s=Q("gc-group").color;u&&(c=i.Cy,0<(a=u.y-c))&&n&&0<f.width&&0===i.XC&&Wn(e,s,h=o?i.BA-.5:i.b6-.5,c,h,u.y),c=t.yw(1),u=t.ww(-1),(t=c.findCol(u))&&(c=h=void 0,o?(h=i.b6,h-=c=h-(t.x+t.width)):(h=i.Py,c=t.x-h),0<c)&&n&&0<f.height&&0===i.qC&&Wn(e,s,h,i.T6-.5,h+c,i.T6-.5)}function ti(t,n){var i,r,e,o,u,u,r,f,s,c,a,h,v,A,h,A,A,h,t,i=t.Fi(),r=t.Dn,e=t.options.rightToLeft,o=t.options.gridline.color,u=F.I.He(0,"gc-columnHeader-normal"),u=u&&u.borderBottomColor,r=r.J(),h=t.dw(1),v=qn(t),f=i.BA,c=R(i),A=t.vw(-1),h=h.findRow(A);h&&(s=i.Cy,0<(a=h.y-s))&&(Wn(r,o,f,h.y-.5,f+c-v.width,h.y-.5),n)&&(0===v.width&&Wn(r,o,i.BA-.5,s,i.BA-.5,h.y),Wn(r,u,A=e?i.BA+i.XC-.5:i.b6-.5,s,A,h.y)),A=t.yw(1),s=i.LA,a=U(i),h=t.ww(-1),(t=A.findCol(h))&&(e?(f=i.b6,f-=c=f-(t.x+t.width)):(f=i.Py,c=t.x-f),0<c)&&(Wn(r,o,t.x-.5,s,t.x-.5,s+a-v.height),n)&&(0===v.height&&Wn(r,o,f,i.LA-.5,f+c,i.LA-.5),Wn(r,u,f,i.T6-.5,f+c,i.T6-.5))}function ni(t,n){var i=0;return t||(i|=1),n||(i|=2),i}function ii(t,n){var i=0;return i=i|(0!==t?1:0)|(0!==n?2:0)}function s(t){this.Mf=t}function ri(t,n,i,r,e){var o,u,f,s,c,a,h,a,v,A,l,a,o=t.parent,u=t.rt,f=t.options,s=n.rowViewportIndex,c=n.colViewportIndex,a=m(t),h=M;return t.Oi&&0<a.length&&(v=(a=a[a.length-1]).row,A=a.row+a.rowCount-1,l=a.col,a=a.col+a.colCount-1,o&&!o.options.allowUserResize||(-1!==v&&-1===l&&0<=s&&c<0&&f.rowHeaderVisible?!(h=u.cD(t,n,e,2,r))||"sizeRow"!==h.action&&"sizeHiddenRow"!==h.action||2!==h.sheetArea||h.index===A||(h=M):-1===v&&-1!==l&&s<0&&0<=c&&f.colHeaderVisible&&(!(h=u.dD(t,n,e,1,i))||"sizeCol"!==h.action&&"sizeHiddenCol"!==h.action||1!==h.sheetArea||h.index===a||(h=M)))),h}function ei(t,n,i,r){var e,o,u,f,u,s,c,c,c;if(0===t.selectionPolicy())return M;for(e=n.hitTestType,o=ki(t),u=m(t),f=3,t.Oi&&0<u.length&&(-1!==(u=u[u.length-1]).row&&-1===u.col?f=2:-1!==u.col&&-1===u.row&&(f=1)),s=0;s<o.length;s++)if((c=o[s])&&(c.x-=R(c),c.y-=U(c),c.width*=3,c.height*=3,c.contains(i,r)))return I(n.row)&&(c=t.dw(1))&&0<c.length&&(n.row=c[c.length-1].row),I(n.col)&&(c=t.yw(1))&&0<c.length&&(n.col=c[c.length-1].col),{x:i,y:r,type:f,isHeader:!1,isFirstIndicator:0===s};return 1===e&&t.JA(-1,n.col)?{x:i,y:r,type:1,isHeader:!0}:2===e&&t.JA(n.row,-1)?{x:i,y:r,type:2,isHeader:!0}:M}function oi(t,n,i,r){var e,o,n,u,f,f,s,c,a,h,s,a,n,s,a,e=M,o=n.rowViewportIndex,n=n.colViewportIndex;if(!I(o)&&!I(n)){if(u=t.parent,f=t.U5(),0<=o&&0<=n&&1===t.Ut.getSelections().length){if(f=t.JS(f),s=ln(t),c=wn(t),a=dn(t)-s,h=pn(t)-c,1===n&&0<s&&f.col<a&&f.col+f.colCount>a&&(s=t.Yy(n))&&0<s.length&&i>(a=s[s.length-1]).x+R(a))return e;if(1===o&&0<c&&f.row<h&&f.row+f.rowCount>h&&(n=t._y(o))&&0<n.length&&r>(s=n[n.length-1]).y+U(s))return e}(a=xi(t))&&(e||(a.x-=R(a),a.y-=U(a),a.width*=3,a.height*=3,a.contains(i,r)&&(e={action:"drag",side:"corner"})),u&&u.options.allowUserDragFill||e&&"corner"===e.side&&(e.side=M))}return e}function ui(t,n,i,r){for(var e,o,u,f,s,c,a,h,v,s,e=!1,o=t.Ut.getSelections(),u=0,f=o.length;u<f;u++){if(s=o[u],a=(s=(c=3===r||I(r))?t.JS(s):s).row,h=s.col,v=s.rowCount,s=s.colCount,c)e=a<=n&&n<a+v&&h<=i&&i<h+s;else if(2===r)e=-1===h&&a<=n&&n<a+v;else if(1===r)e=-1===a&&h<=i&&i<h+s;else if(0===r)return e;if(e)break}return e}function fi(t,n,i,r,e){n===r&&i===e||(t.Ut.setCellState(n,i,F.CellStatesType.active,!1,F.SheetArea.viewport),t.k_&&t.k_(F.CellStatesType.active,n,i,F.SheetArea.viewport),t.Ut.setCellState(r,e,F.CellStatesType.active,!0,F.SheetArea.viewport),t.k_&&t.k_(F.CellStatesType.active,r,e,F.SheetArea.viewport))}function si(t,n,i,r){var n,n,e,o;n||(n=(n=m(t))[n.length-1],e=t.ui,o=t.ci,i?3===r?(t.ui=n.row+n.rowCount-1,t.ci=n.col+n.colCount-1):2===r?(t.ui=n.row+n.rowCount-1,t.ci=0):1===r&&(t.ui=0,t.ci=n.col+n.colCount-1):3===r?(t.ui=n.row,t.ci=n.col):2===r?(t.ui=n.row,t.ci=0):1===r&&(t.ui=0,t.ci=n.col),fi(t,e,o,t.ui,t.ci))}function ci(t,n,i,r){var n,n,e,o;n||(n=(n=m(t))[n.length-1],e=t.ui,o=t.ci,i&&(3===r?(t.ui=n.row,t.ci=n.col):2===r?(t.ui=n.row,t.ci=0):1===r&&(t.ui=0,t.ci=n.col)),fi(t,e,o,t.ui,t.ci))}function ai(t){return t.hitTestType}function hi(t,n,i){var r;return r=n.addRowColumnButtonHitInfo?t.K_e(ai(i)):r}function vi(t,n,i){var r=hi(t,n,i);return I(r)&&(r=t.getCellType(n.row,n.col,ai(i),{rowSpacingIndex:i.rowSpacingIndex,isAfterRowSpacing:i.isAfterRowSpacing})),n.sheet||(n.sheet=t),r}function g(t){var n=this;n.jAt=!1,n.YZ=new Ut(t),n.OAt=new Dt(t),n.Mf=t}function Ai(t,n,i){var r=this;r.kZ=i,r.AZ=new tn(n),r.DZ=new _t(n),r.xZ=new nn(t,"sheet",r.AZ,100,10),r.kZ.aW(r.xZ,!0)}function x(t,n){var n,i,t,n=hn.call(this,n,F.mt.gi(t.Ti))||this;return n.ter=F.DialogFeatureType.touch,(i=n).RAt=32,i.BAt=45,i.f$={},i.Jet=!1,i.Vv=t,t=i.Xc(),(i.LAt=t).addClass("gc-toolstrip-default ui-state-default well"),t.appendTo(i.qc()),t.hide(),i.FAt(),i.PAt(),i.aY(),n}function li(t){var t=t.WL,n=!1;return t&&t.QP().forEach(function(t){t&&t.isSelected()&&(n=!0)}),n}function wi(t,n,i){var r,e,i,r=c("span"),e=B.body;return r.className=i,r.style.font=t,r.style.cssFloat="left",r.textContent=n,e.insertBefore(r,M),i=O(r).width(),e.removeChild(r),i}function di(t,n,i,r,e){this._font="normal 12px Arial";var o=this;o.Zc=t,o._text=n,o.GAt=i,r&&(o.tT=r),e&&(o.UAt=e)}function pi(t){function n(){for(var t,n,i,t="separator",n=0,i=t+n.toString();B.getElementById(i);)i=t+(++n).toString();return i}this.Zc=n(),t&&(this.UAt=t)}function y(t){this.jS=t}function gi(t,n,i,r,e){var o=this;o.RS=t,o.HAt=i,o.zAt=n,o.VAt=r,o.YAt=e}function mi(){}function E(t){this.w2=t}function Ci(t,n,i){var r,e,t,r=this;r.AZ=new tn(r),r.xZ=new nn(t,"tabStrip",r.AZ,1,-1),r.kZ=i,r.DZ=new fn(n),e=r.DZ,(t=r.xZ).RZ=function(t){return e.BZ(t)},t.LZ=function(t){return e.FZ(t)},t.PZ=function(t){return e.GZ(t)},t.UZ=function(t){return e.HZ(t)},t.ZAt=function(t){return e.WAt(t)}}function bi(t,n,i,r){var t=t.BO();t.getState(n)?i.drawImage(t.getImage(n),r.x,r.y,R(r),U(r)):t.addImage(n)}function Mi(t,n){var i,r,e,o,u,f,f,s,c,a,f,h,v,A,h,h,l,h,s,i=t.Fi(),e=16,f=m(t);t.Oi&&0<f.length&&(s=(f=f[f.length-1]).row,c=f.row+f.rowCount-1,a=f.col,f=f.col+f.colCount-1,h=t.parent,v=t.options.rightToLeft,A="AAAAAQCAYAAAAf8/9hAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADs",h&&!h.options.allowUserResize||(-1!==s&&-1===a&&t.getRowResizable(c)?(h=t.C0(c),r=w+A+"MAAA7DAcdvqGQAAABaSURBVDhPY/z//z8DLsDIyAiWBKphBAtgAUxQGgPANIMAMhsdYDUAmwZchtDOC8SCgTcA5DfcgUAEoNwFo7GAPQxwJVtsYYHVBdgU4gpInF5A1oBLMwMDAwMApuAtD6Z7YxQAAAAASUVORK5CYII=",h=U(o=t.getCellRect(c,dn(t,2)-1,h,-1)),l=v?i.BA:i.b6-16,Ei(t,c,f,o.x,o.y+h,{rowCheck:!0})&&(u=new F.Rect(l,o.y+h-8,16,16))):-1===s&&-1!==a&&t.getColumnResizable(f)&&(h=t.S0(f),r=w+A+"IAAA7CARUoSoAAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAE1JREFUOE/ljtEKACAIA/v/nzZ9mFhsJPRocLEuGS4zk/iJyyP/D6gE0wrYoCqoLoUafPl8fEBln3ulSscfErk65TMjMFRBhUowosDWBoHpba8+C7w0"+wt,s=R(o=t.getCellRect(pn(t,1)-1,f,-1,h)),l=v?o.x-8:o.x+s-8,Ei(t,c,f,o.x+s,o.y,{colCheck:!0}))&&(u=new F.Rect(l,i.T6-16,16,16)),r&&u&&bi(t,r,n,u)))}function xi(t){var n,i,r,i,r,e,o,n=M,i=m(t),r=i.length;return t.Oi&&0<r&&(i=i[r-1],r=t.j1(i),n=new F.Rect(r.x+R(r)-(e=17),r.y+U(r),17,o=20)),n}function yi(t,n,i){var n,i,n,t,i,r,e,o,n=t.C0(n),i=t.S0(i),n=t.dw(n),t=t.yw(i),i=0,r=0,e=0,o=0;return 0<n.length&&(i=n[0].row,r=n[n.length-1].row),0<t.length&&(e=t[0].col,o=t[t.length-1].col),(0,F.Ec)(i,e,r-i+1,o-e+1)}function Ei(t,n,i,r,e,o){var u,f,s,u,f,t,n,u=t.C0(n),f=t.S0(i),s,u=t.Fi().c9(u,f),f=yi(t,n,i),t=f.row<=n&&n<=f.row+f.rowCount-1&&u.y<=e&&e<=u.y+U(u),n=f.col<=i&&i<=f.col+f.colCount-1&&u.x<=r&&r<=u.x+R(u);return o&&o.colCheck?n:(o&&o.rowCheck||n)&&t}function ki(t){var n,i,n,r,e,o,u,f,s,c,a,h,v,A,l,A,w,l,A,l,v,n,d,o,p,g,n=m(t),i=[];if(t.Oi&&0<n.length)for(n=n[n.length-1],r=t.j1(n),e=8,o=t.Fi(),u=n.row,f=n.row+n.rowCount-1,s=n.col,c=n.col+n.colCount-1,-1!==n.row&&-1!==n.col?(Ei(t,u,s,r.x,r.y)&&(i[0]=new F.Rect(r.x-8,r.y-8,16,16)),Ei(t,f,c,r.x+R(r),r.y+U(r))&&(i[1]=new F.Rect(r.x+R(r)-8,r.y+U(r)-8,16,16))):-1!==n.row?(a=o.c9(1,0),h=o.c9(1,1),v=a.x+(R(a)+R(h))/2-8,A=dn(t)-1-ln(t),(A=(l=t.yw(1)).findCol(A))&&(l=(w=t.yw(0))[0]||l[0])&&(v=l.x+(A.x+R(A)-l.x)/2-8),Ei(t,u,s,v+8,r.y,{rowCheck:!0})&&(i[0]=new F.Rect(v,r.y-8,16,16)),Ei(t,f,c,v+8,r.y+U(r),{rowCheck:!0})&&(i[1]=new F.Rect(v,r.y+U(r)-8,16,16))):-1!==n.col&&(a=o.c9(0,1),h=o.c9(1,1),A=a.y+(U(a)+U(h))/2-8,l=pn(t)-1-wn(t),(n=(v=t.dw(1)).findRow(l))&&(o=(d=t.dw(0))[0]||v[0])&&(A=o.y+(n.y+U(n)-o.y)/2-8),Ei(t,u,s,r.x,A+8,{colCheck:!0})&&(i[0]=new F.Rect(r.x-8,A,16,16)),Ei(t,f,c,r.x+R(r),A+8,{colCheck:!0}))&&(i[1]=new F.Rect(r.x+R(r)-8,A,16,16)),p=void 0,g=i.length-1;0<=g;g--)(!(p=i[g])||p.x<0||p.y<0)&&(i[g]=M);return i}function Pi(t,n,i){var r,e,o,u;if((0,F.needPaintSelection)(t)&&!t.isEditing()&&n&&0!==t.selectionPolicy()&&(o=void 0,0<(e=(r=ki(t)).length))){for(i.save(),i.fillStyle=t.aR()||"white",i.strokeStyle=t.getSelectionBorderColor(),u=0;u<e;u++)(o=r[u])&&(i.beginPath(),i.arc(o.x+R(o)/2,o.y+U(o)/2,R(o)/2,0,2*Math.PI,!1),i.fill(),i.stroke());i.restore()}}function Fi(t,n){var i,r,i=xi(t);i&&bi(t,r=w+"EAAAATCAIAAAD5x3GmAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2 + oZAAAAGhJREFUOE / djkEOwCAIBHk6P98u1lKo1diEU + dggOyAAkC + YPl / Onx3WDmiytm4aulQoKba + 4uiO77YhHDH5SqnRa0If / Nhq0fnjPob2h5oVXJI0rJA3h1ya1kgU4f4nQfVzozk7APgAIEqATZbalz1"+wt,n,i)}N=this&&this.__extends||(an=function(t,n){return(an=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){t.__proto__=n}:function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}))(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}an(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),Object.defineProperty(t,"__esModule",{value:!0}),t.QAt=t.NZ=t.IZ=t.TouchToolStripSeparator=t.TouchToolStripItem=t.TouchToolStrip=t.TouchEventHandler=t.ZZ=t.ManipulationStartingEventArgs=t.ManipulationStartedEventArgs=t.ManipulationDeltaEventArgs=t.ManipulationCompletedEventArgs=t.QZ=t.TouchEventProvider=t.SR=void 0,Y=P("Common"),F=P("Core"),P=P("./dist/plugins/touch/touch.res.en.js"),t.SR={en:P},I=Y.Common.lt.ht,P=F.zc,D=(O=F.GC$).extend,_=O.isEmptyObject,c=F.mt.En,a=F.mt.vi,Z=F.mt.Tt.mozilla,Q=F.I.fl,L=F.mt.pi(),z=L.ipad,r=z||L.iphone,M=null,p=void 0,S=Math.abs,j=Math.min,G=Math.max,J=Math.pow,K=Math.atan2,o=Math.PI,X=Math.round,V=Math.sqrt,W=Math.atan,q=Math.log,$=Math.floor,tt=100,h="touch",nt="none",it="MSPointerDown",rt="MSPointerMove",et="MSPointerUp",ot="pointerdown",ut="pointermove",ft="pointerup",st="touchstart",ct="touchmove",at="touchend",v="MSPOINTER_TYPE_TOUCH",u=isNaN,ht=parseInt,vt=parseFloat,At=window,B=document,lt=At.gcGlobal,w="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB",wt="AAAAAElFTkSuQmCC",H=1,F.Of.touch=!0,L=new Y.Common.ResourceManager(t.SR,"Touch"),f=L.getResource.bind(L),dt=400,pt=1e3,gt=20,n.prototype.KAt=function(t){this.QTt.KAt=t},n.prototype.JAt=function(t){this.QTt.JAt=t},n.prototype.XAt=function(n){var i=this;i.QTt.XAt=function(t){var t;n&&(n(t),t=i.AZ)&&t.qAt()}},n.prototype.$At=function(t){this.QTt.$At=t},n.prototype.tIt=function(t){this.QTt.tIt=t},n.prototype.nIt=function(t){this.KTt.nIt=t},n.prototype.eIt=function(t){this.KTt.eIt=t},n.prototype.iIt=function(t){this.KTt.iIt=t},n.prototype.rIt=function(t){this.oIt=t},n.prototype.aIt=function(t){this.uIt=t},n.prototype.sIt=function(t,n){var n=(n||this.cIt).RS;return F.mt.T0(t,n)},n.prototype.fIt=function(t,n){var i,r,e,o,u,r,f,r,s,t,e,i=this,r=n.pointerType,e=n.target,o=n.offsetX,u=n.offsetY;r!==n[v]&&r!==h||(f=(r=i.sIt(e,t)).I0,r=r.A0,(s=i.lIt(t,e,n.pointerId,new b(o+f,u+r),n.timeStamp))&&a(n),"sheet"===i.cIt.zAt&&(t=n.pageX-(o+f),e=n.pageY-(u+r),i.cIt.RS.canvasOffset={top:e,left:t}))},n.prototype.hIt=function(t){var n,i,r,i,e,n=this,i=t.pointerType,r=t.pointerId;if(i===t[v]||i===h){if(n.WTt[r]===p)return!1;i=n.sIt(t.target),(e=n.iE(r,new b(t.offsetX+i.I0,t.offsetY+i.A0),t.timeStamp))&&a(t)}},n.prototype.dIt=function(t){var n,i,r,i,e,n=this,i=t.pointerType,r=t.pointerId;if(i===t[v]||i===h){if(n.WTt[r]===p)return!1;i=n.sIt(t.target),(e=n._up(r,new b(t.offsetX+i.I0,t.offsetY+i.A0)))&&a(t)}},n.prototype.mIt=function(t){var n,i,r,i,e,n=this,i=t.pointerType,r=t.pointerId;if(i===t[v]||i===h){if(n.WTt[r]===p)return!1;i=n.sIt(t.target),(e=n.gIt(r,new b(t.offsetX+i.I0,t.offsetY+i.A0)))&&a(t)}},n.prototype.pIt=function(t,n){for(var i,r,e,o,u,f,i=gn(t.RS),r=n.changedTouches,e=!1,o=0;o<r.length;o++)u=r[o],f=Z?l():n.timeStamp,e=this.lIt(t,n.target,u.identifier,new b(u.pageX-i.I0,u.pageY-i.A0),f)||e;e&&a(n)},n.prototype.bIt=function(t){for(var n,i,r,e,o,u,f,n=this,i=gn(n.cIt.RS),r=t.changedTouches,e=!1,o=0;o<r.length;o++)u=r[o],f=Z?l():t.timeStamp,e=n.iE(u.identifier,new b(u.pageX-i.I0,u.pageY-i.A0),f)||e;e&&a(t)},n.prototype.yIt=function(t){for(var n,i,r,e,o,u,n=this,i=gn(n.cIt.RS),r=t.changedTouches,e=!1,o=0;o<r.length;o++)u=r[o],e=n._up(u.identifier,new b(u.pageX-i.I0,u.pageY-i.A0))||e;e&&a(t)},n.prototype.wIt=function(t){for(var n,i,r,e,o,u,n=this,i=gn(n.cIt.RS),r=t.changedTouches,e=!1,o=0;o<r.length;o++)u=r[o],e=n.gIt(u.identifier,new b(u.pageX-i.I0,u.pageY-i.A0))||e;e&&a(t)},n.prototype.MIt=function(t){var n,i,n,i,n,n=this,i=n.cIt,n=n.CIt;i!==n&&(i=O(i.RS).offset(),n=O(n.RS).offset(),t.X+=i.left-n.left,t.Y+=i.top-n.top)},n.prototype.SIt=function(t,n){var i,r,e,o,u,f,s,i=this,r=i.j0t;for(i.CIt=M,i.AZ=M,o=0;o<r.length;o++)if(r[o]===t){if(u=r[o],s=f=M,u._Z&&!u._Z()){for(o=0;o<r.length;o++)if((e=r[o])!==u&&0<=e.YAt&&e.YAt<u.YAt&&(!e._Z||e._Z())){f=e;break}if(f===M)return!1}if(u.EZ&&!u.EZ()){for(o=0;o<r.length;o++)if((e=r[o])!==u&&0<=e.YAt&&e.YAt<u.YAt&&(!e.EZ||e.EZ())){s=e;break}if(s===M)return!1}f===M&&(f=u),s===M&&(s=u),i.cIt=u,i.CIt=f,i.TIt=s,i.KAt(s.jZ||M),i.JAt(f.RZ||M),i.tIt(f.LZ||M),i.$At(f.AIt||M),i.XAt(f.PZ||M),i.nIt(s.UZ||M),i.eIt(s.ZAt||M),i.iIt(s.IIt||M),i.rIt(f.oIt||M),i.aIt(f.uIt||M),f.HAt&&(i.AZ=u.HAt);break}return!0},n.prototype.lIt=function(t,n,i,r,e){var o=this;if(o.WTt[i]!==p)return!1;if(0===o.WTt.length&&!o.SIt(t,n))return!1;if(!o.CIt)return!1;if(!(o.WTt.length>=o.CIt.VAt)){if(o.AZ&&o.AZ.xIt())return!1;o.MIt(r),o.AZ&&0===o.WTt.length&&o.AZ.NIt(),o.WTt[i]={id:i,time:l(),position:r},o.WTt.length++,o.QTt.kIt(n,i,r,e),o.QTt.DIt(i,r,o.WTt.length,e),1===o.WTt.length&&o.KTt.DIt(r),1===o.WTt.length&&o.oIt&&o.oIt({JZ:r})}return!0},n.prototype.iE=function(t,n,i){var r=this;return r.WTt[t]!==p&&!(r.AZ&&r.AZ._It()||(r.MIt(n),r.WTt[t]={id:t,time:l(),position:n},r.QTt.EIt(t,n,i),0))},n.prototype._up=function(t,n){var i=this;return i.WTt[t]!==p&&(delete i.WTt[t],i.WTt.length--,!(i.AZ&&i.AZ.jIt()||(i.MIt(n),i.QTt.OIt(t),i.QTt.RIt(),0===i.WTt.length&&(i.KTt.OIt(n),i.KTt.RIt()),0===i.WTt.length&&i.uIt&&i.uIt({JZ:n}),i.AZ&&0===i.WTt.length&&0===i.QTt._process&&i.AZ.qAt(),0)))},n.prototype.gIt=function(t,n){return this._up(t,n)},n.prototype.aW=function(n,t){var i,r,e,o,u,f,s,c,a,h,v,A,l,r,w,d,e,p,g,m,C,b;function M(){O(B).bind(u,E).bind(f,k).bind(h,E).bind(v,k).bind(s,P).bind(c,P).bind(A,P).bind(l,P)}function x(){O(B).unbind(u).unbind(h).unbind(f).unbind(v).unbind(s).unbind(l).unbind(c).unbind(A)}function y(t){M(),i.fIt(n,t)}function E(t){i.hIt(t)}function k(t){i.dIt(t),0===i.WTt.length&&x()}function P(t){i.mIt(t),0===i.WTt.length&&x()}i=this,r="."+n.zAt,o=it+(e=".gcSheet"),u=rt+e+r,f=et+e+r,s="MSPointerCancel"+e+r,c="MSLostPointerCapture"+e+r,a=ot+e,h=ut+e+r,v=ft+e+r,A="LostPointerCapture"+e+r,l="pointercancel"+e+r,r=st+e,w=ct+e,d=at+e,e="touchcancel"+e,p=n.RS,g=i.j0t,0<=(m=Y.Common.Uf.hD(g,n))&&t||m<0&&!t||(C=F.mt.m0(),t?C?(b=p.style,I(b.msTouchAction)||(b.msTouchAction=nt),I(b.touchAction)||(b.touchAction=nt),O(p).bind(o,y).bind(a,y)):(O(p).bind(r,function(t){i.pIt(n,t)}),O(p).bind(w,function(t){i.bIt(t)}).bind(d,function(t){i.yIt(t)}).bind(e,function(t){i.wIt(t)})):C?O(p).unbind(o).unbind(a):O(p).unbind(r).unbind(w).unbind(d).unbind(e),t?g.push(n):g.splice(m,1))},n.prototype.L0=function(){for(var t,n,i,t=this,n=t.j0t,i=n.length-1;0<=i;i--)t.aW(n[i],!1)},mt=n,t.TouchEventProvider=mt,i.prototype.kIt=function(t,n,i,r){var e,t,e=this;3===e._process&&e.BIt(!0),e.jAt=2===e._process&&1===e.oAt.LIt(),e.FIt=t,(t={})._ID=n,t.PIt=i,t.GIt=i,e.oAt.UIt(t),e.HIt=r,1<e.oAt.LIt()&&(e.zIt=!1,e.VIt=!1,1===e._process)&&e.YIt()},i.prototype.DIt=function(t,n,i,r){0===this._process&&1===i&&this.ZIt(this.oAt.WIt(0).GIt)},i.prototype.EIt=function(t,n,i){var r,e,e,o,e,u,f,s,r=this;if(0!==r.rAt&&r.oAt.QIt(t)){if(1===r._process&&1===r.oAt.LIt()){if(e=r.KIt(),!r.JIt(1)&&!r.JIt(2)&&!e)return;if(An(n,e=r.oAt.XIt(t).GIt))return;o=S(n.X-e.X),e=S(n.Y-e.Y),r.qIt(o,e)}if(!(i-r.HIt<20)){if(r.oAt.XIt(t).$It=n,1<(u=r.oAt.LIt()))for(f=0;f<u;f++)if(!(s=r.oAt.WIt(f)).$It)return;for(r.txt(i),r.HIt=i,u=r.oAt.LIt(),f=0;f<u;f++)(s=r.oAt.WIt(f)).PIt=s.$It,s.$It=M}}},i.prototype.RIt=function(){var t=this;t.nxt&&(t.ixt(t.nxt),t.nxt=M)},i.prototype.OIt=function(t){var n=this;n.oAt.QIt(t)&&(n.oAt.rxt(t),2===n._process?0===n.oAt.LIt()&&(n.JIt(64)||n.JIt(256)||n.JIt(128)?n.oxt():n.BIt(!0)):3===n._process?n.BIt(!0):1===n._process&&n.BIt(!1))},i.prototype.txt=function(t){var n,i,r,e,o,u,f,f,e,s,c,t,s,e,n=this,f=n.axt(),i=f.uxt,r=f.sxt,f=f.u_,e=n.cxt(),u=e.L0t,o=e.fxt,e=e.hAt;n.qTt+=i,n.$Tt+=r,n.tAt*=o,n.nAt+=u,n.eAt+=e,(s={}).hAt=e,s.L0t=u,s.lxt=t-n.HIt,s.uxt=i,s.sxt=r,n.uAt.hxt(s),n.dxt=f,1!==n._process&&2!==n._process||1===n._process&&(c=n.YIt())||((t=new Pt).CAt=e,t.MAt=u,t.tW=o,t.wAt=new b(i,r),s=new xt(n.uAt),e=new Bt(n.FIt,n.vxt(),t,!1,f,s),n.mxt(e),e.gxt&&n.BIt(!0))},i.prototype.YIt=function(){var t,n,t=this;return t._process=2,n=new Yt(t.FIt,t.oAt.LIt(),t.vxt(),t.oAt.WIt(0).GIt),t.pxt(n),!!n.gxt&&(t.BIt(!0),!0)},i.prototype.qIt=function(t,n){var t=xn(t,n);this.zIt=t.JTt,this.VIt=t.XTt},i.prototype.axt=function(){var t,n,i,r,i,e,t=0,n=0,i=this.bxt(),r=i.yxt,i=i.wxt,e=new b(r.X,r.Y);return{uxt:t=r.X-i.X,sxt:n=r.Y-i.Y,u_:e}},i.prototype.cxt=function(){var t,n,i,r,t,t=this,n=0,i=1,r=0;return t.JIt(16)&&1===t.oAt.LIt()&&t.KIt()&&(n=bn(t.oAt.WIt(0).$It,t.oAt.WIt(0).PIt,t.fMt)),1<t.oAt.LIt()&&(n=(t=t.Mxt()).L0t,i=t.fxt,r=t.hAt),{L0t:n=n/o*180,fxt:i,hAt:r}},i.prototype.Mxt=function(){for(var t,n,i,r,e,o,u,n,f,s,c,a,h,v,A,l,w,l,d,p,g,m,l,w,C,t=this,n=t.bxt(),i=n.yxt,r=n.wxt,e=t.KIt(),o=e?t.fMt._Center:new b(0,0),u=0,n=1,f=0,s=0,c=0,a=0,h=0,v=t.oAt.LIt(),A=0;A<v;A++)w=(l=t.oAt.WIt(A)).$It,l=l.PIt,d=Cn(w,i),p=Cn(l,r),g=e?new b(l.X-o.X,l.Y-o.Y):new b(l.X-r.X,l.Y-r.Y),m=e?new b(w.X-o.X,w.Y-o.Y):new b(w.X-i.X,w.Y-i.Y),l=Cn(l,o),w=Cn(w,o),p>=t.aAt&&d>=t.aAt&&(c++,a+=d,h+=p,!e||l>=t.aAt)&&w>=t.aAt&&(u+=C=mn(g,m),s++);return 0<s&&t.JIt(16)?u/=s:u=0,0<c&&t.JIt(32)?(t.jAt||(n=a/h),f=(a-h)/c,t.Cxt=a/c):t.Cxt=0,{L0t:u,fxt:n,hAt:f}},i.prototype.JIt=function(t){return 0!=(this.rAt&t)},i.prototype.bxt=function(){for(var t,n,i,r,e,o,u,f,s,f,c,a,t=0,n=0,i=0,r=0,e=this.oAt,o=e.LIt(),u=0;u<o;u++)s=(f=e.WIt(u)).PIt,f=f.$It,t+=s.X,n+=s.Y,i+=f.X,r+=f.Y;return c=new b(t/o,n/o),{yxt:a=new b(i/o,r/o),wxt:c}},i.prototype.KIt=function(){var t=this.fMt;return t&&!u(t._Radius)},i.prototype.ZIt=function(t){var n,t,n=this,t=new St(n.FIt,n.rAt,M,t);return t.KZ=511,n.Sxt(t),n.Txt=t.KZ,0===t.KZ?(n.BIt(!1),!1):(n.rAt=t.KZ,n.fMt=t.DAt,n._process=1,!0)},i.prototype.BIt=function(t){var n,i,t,n=this,i=3===n._process;n._process=0,n.Axt&&(vn(n.Axt),n.Axt=M),t&&(t=new Ot(n.FIt,n.vxt(),i,kn(n.dxt),new xt(n.uAt)),3===n._process?n.nxt=t:n.ixt(t)),n.uAt.Ixt(),n.oAt.Ixt(),n.fMt=M,n.qTt=0,n.$Tt=0,n.tAt=1,n.nAt=0,n.eAt=0,n.zIt=!1,n.VIt=!1,n.rAt=0},i.prototype.oxt=function(){var t,n,i,i,i,t=this,n={},i=new xt(t.uAt);n.xxt=t.JIt(64)?i.Nxt().X:0,n.kxt=t.JIt(64)?i.Nxt().Y:0,n.Dxt=t.JIt(256)?i.CAt():0,n._xt=t.JIt(128)?i.Ext():0,0===n.xxt&&0===n.kxt&&0===n.Dxt&&0===n._xt?t.BIt(!0):(n.jxt=new kt(n.xxt,n.kxt),n.IAt=new yt(n.Dxt),n.xAt=new Et(n._xt),i=new xt(M,n.xxt,n.kxt,n._xt,n.Dxt),i=new Nt(t.FIt,t.vxt(),new Pt,i,n.IAt,n.xAt,n.jxt),t.Oxt(i),n.jxt=i.NAt,n.IAt=i.IAt,n.xAt=i.xAt,n.jxt.pAt<=0&&n.jxt.bAt<=0&&n.jxt.Rxt(.003),n.IAt.Bxt()<=0&&n.IAt.Rxt(.002),n.xAt.Bxt()<=0&&n.xAt.Rxt(.003),i=l(),n.Lxt=i,n.Fxt=i,n.Pxt=0,n.Gxt=0,t._process=3,t.Axt=At.setInterval(function(){try{t.Uxt(n)}catch(t){}},20))},i.prototype.Uxt=function(t){var n,i,r,e,o,u,f,i,e,o,u,r,f,s,e,o,n=this,i=l(),r=i-t.Fxt;if(0!=r){if(e=t.xxt,o=t.kxt,u=t.Dxt,f=t._xt,t.xxt=n.Hxt(r,t.jxt.pAt,t.xxt),t.kxt=n.Hxt(r,t.jxt.bAt,t.kxt),t.Dxt=n.Hxt(r,t.IAt.Bxt(),t.Dxt),t._xt=n.Hxt(r,t.xAt.Bxt(),t._xt),e=(e+t.xxt)/2,o=(o+t.kxt)/2,u=(u+t.Dxt)/2,f=(f+t._xt)/2,t.Fxt=i,i=!1,Mn(e)&&Mn(o)&&Mn(u)&&Mn(f)&&(i=!0),e=r*e,o=r*o,u=r*u,r=r*f,f=1,0<n.Cxt&&(n.Cxt+2*u<0&&(u=-n.Cxt/2+1),0!==n.Cxt)&&(f=(n.Cxt+2*u)/n.Cxt),n.eAt+=u,n.nAt+=r,n.qTt+=e,n.$Tt+=o,n.tAt*=f,n.Cxt+=u,n.dxt=new b(n.dxt.X+e,n.dxt.Y+o),t.Pxt+=e,t.Gxt+=o,i){if(e=X(t.Pxt),o=X(t.Gxt),Mn(e)&&Mn(o))return void n.BIt(!0)}else 1<=S(t.Pxt)&&(e=t.Pxt,t.Pxt-=e),1<=S(t.Gxt)&&(o=t.Gxt,t.Gxt-=o);(s=new Pt).wAt=new b(e,o),s.tW=f,s.CAt=u,s.MAt=r,e=new xt(M,t.xxt,t.kxt,t._xt,t.Dxt),o=new Bt(n.FIt,n.vxt(),s,!0,kn(n.dxt),e),n.mxt(o),(o.gxt||i)&&n.BIt(!0)}},i.prototype.Hxt=function(t,n,i){var n,n;return Mn(i)||(n=i<0?i+n*t:i-n*t)<0&&0<i||0<n&&i<0?0:n},i.prototype.vxt=function(){var t,n,t=this,n=new Pt;return n.CAt=t.eAt,n.MAt=t.nAt,n.tW=t.tAt,n.wAt=new b(t.qTt,t.$Tt),n},i.prototype.zxt=function(t,n,i,r){var e,o,u,f,s,c,a,h,v,v,e=this,o=new Pt,u=new Pt,f=0,s=0,c=0,a=0,h=e.JIt(4)&&e.zIt,v=e.JIt(8)&&e.VIt;return!e.JIt(1)||v||t&&!e.JIt(64)||(o.wAt.X=n.wAt.X,u.wAt.X=i.wAt.X,f=r.Nxt().X),!e.JIt(2)||h||t&&!e.JIt(64)||(o.wAt.Y=n.wAt.Y,u.wAt.Y=i.wAt.Y,s=r.Nxt().Y),!e.JIt(32)||t&&!e.JIt(256)?(o.tW=n.tW,u.tW=1):(o.tW=n.tW,o.CAt=n.CAt,u.tW=i.tW,u.CAt=i.CAt,a=r.CAt()),!e.JIt(16)||t&&!e.JIt(128)||(o.MAt=n.MAt,u.MAt=i.MAt,c=r.Ext()),v=new xt(M,f,s,c,a),new It(o,u,v)},i.prototype.Sxt=function(t){this.KAt&&t&&this.KAt(t)},i.prototype.pxt=function(t){this.JAt&&t&&this.JAt(t)},i.prototype.ixt=function(t){var n,i,n=this;n.XAt&&t&&(i=n.zxt(!1,t.nW,t.nW,t.TAt),t.nW=i.nW,t.TAt=i.TAt,n.XAt(t))},i.prototype.Oxt=function(t){var n,i,n=this;n.$At&&t&&(i=n.zxt(!1,t.nW,t.SAt,t.TAt),t.nW=i.nW,t.SAt=i.SAt,t.TAt=i.TAt,n.$At(t))},i.prototype.mxt=function(t){var n,i,n=this;n.tIt&&t&&(i=n.zxt(t.AAt,t.nW,t.SAt,t.TAt),t.nW=i.nW,t.SAt=i.SAt,t.TAt=i.TAt,n.tIt(t))},Ct=i,yn.prototype.DIt=function(t){var n,i,n=this;n.Vxt++,1<n.Vxt||(i=l(),n.Yxt&&An(t,n.Yxt)&&i-n.Zxt<dt?n.DU++:(n.Yxt=t,n.DU=1),n.Wxt=t,n.Zxt=i)},yn.prototype.RIt=function(){var t=this;t.nxt&&(t.nxt instanceof jt?t.Qxt(t.nxt):t.nxt instanceof Ht&&t.Kxt(t.nxt),t.nxt=M)},yn.prototype.OIt=function(t){var n,i,n=this;n.Vxt--,0<n.Vxt||(i=l(),An(t,n.Wxt)?i-n.Zxt>pt?n.nxt=new Ht(n.Wxt):1<n.DU?(n.DU=0,n.Jxt(new Tt(n.Yxt)),n.Yxt=M):n.nxt=new jt(n.Wxt):n.Yxt=M)},yn.prototype.Xxt=function(){this.Yxt=M},yn.prototype.Qxt=function(t){this.nIt&&t&&this.nIt(t)},yn.prototype.Jxt=function(t){this.eIt&&t&&this.eIt(t)},yn.prototype.Kxt=function(t){this.iIt&&t&&this.iIt(t)},bt=yn,b=En,t.QZ=b,e.prototype.qxt=function(t){var n,i,r,e,o,u,o,n=this;if(0===n.DU)return 0;for(i=0,r=(1+n.DU)*n.DU/2,e=n.DU-1;0<=e;e--)o=0,u=n.$xt(e),0===t?o=u.uxt:1===t?o=u.sxt:2===t?o=u.hAt:3===t&&(o=u.L0t),o=n.tNt(o,u.lxt),i+=o*=e+1;return i/r},e.prototype.tNt=function(t,n){return t/n},e.prototype.$xt=function(t){return this.cAt[this.nNt(t)]},e.prototype.eNt=function(){return this.cAt[this.DU-1]},e.prototype.hxt=function(t){var n,i,r,n=this;for(10===n.DU&&n.iNt(),n.DU++,n.cAt[n.nNt(n.DU-1)]=t,i=20*n.sAt,r=0;r<n.DU;r++)t.lxt-n.cAt[r].lxt>i&&(n.iNt(),r--)},e.prototype.iNt=function(){var t=this;t.ak++,t.ak===t.sAt&&(t.ak=0),t.DU--},e.prototype.Ixt=function(){this.DU=0},e.prototype.nNt=function(t){return(this.ak+t)%this.sAt},Mt=e,Pn.prototype.Nxt=function(){var t=this;return t.fAt||(t.fAt=new b(t.cAt.qxt(0),t.cAt.qxt(1))),t.fAt},Pn.prototype.Ext=function(){var t=this;return I(t.lAt)&&(t.lAt=t.cAt.qxt(3)),t.lAt},Pn.prototype.CAt=function(){var t=this;return I(t.hAt)&&(t.hAt=t.cAt.qxt(2)),t.hAt},xt=Pn,Fn.prototype.Bxt=function(){var t=this,n=t._DesiredExpansion,i=t._DesiredDeceleration,r=t.dAt;return u(n)||0===n?u(i)?t.vAt:i:.5*r*r/n},Fn.prototype.Rxt=function(t){this.vAt=t},yt=Fn,In.prototype.Bxt=function(){var t=this,n=t._DesiredRotation,i=t._DesiredDeceleration,r=t.dAt;return u(n)||0===n?u(i)?t.vAt:i:.5*r*r/n},In.prototype.Rxt=function(t){this.vAt=t},Et=In,On.prototype.rNt=function(){var t=this,n=t._DesiredDisplacement,i=t.yAt,r=t.mAt,e=t.gAt,o=t.Bxt();u(n)||0===n?u(o)||0===o?(t.pAt=0,t.bAt=0):(t.pAt=o*S(r)/i,t.bAt=o*S(e)/i):(t.pAt=.5*i*S(r)/n,t.bAt=.5*i*S(e)/n)},On.prototype.Bxt=function(){var t=this,n=t._DesiredDeceleration;return u(n)&&u(t._DesiredDisplacement)?t.vAt:n},On.prototype.Rxt=function(t){this.vAt=t,this.rNt()},kt=On,Pt=Bn,Nn.prototype.QIt=function(t){for(var n,i,r,n=this.wY,i=0;i<n.length;i++)if((r=n[i])._ID===t)return!0;return!1},Nn.prototype.UIt=function(t){this.wY.push(t)},Nn.prototype.rxt=function(t){for(var n,i,n=this.wY,i=0;i<n.length;i++)if(n[i]._ID===t){n.splice(i,1);break}},Nn.prototype.LIt=function(){return this.wY.length},Nn.prototype.WIt=function(t){return this.wY[t]},Nn.prototype.XIt=function(t){for(var n,i,r,n=this.wY,i=0;i<n.length;i++)if((r=n[i])._ID===t)return r;return M},Nn.prototype.Ixt=function(){var t=this.wY;t.splice(0,t.length)},Ft=Nn,It=Yn,Ot=Sn,t.ManipulationCompletedEventArgs=Ot,Bt=jn,t.ManipulationDeltaEventArgs=Bt,Nt=Hn,Yt=Tn,t.ManipulationStartedEventArgs=Yt,St=Un,t.ManipulationStartingEventArgs=St,jt=Rn,Ht=Dn,Tt=_n,Qn.prototype.oNt=function(t,n){var i=this.fg;return i?t===F.Bf.Xl(i)&&n===F.Bf.ql(i)||F.Bf.$l(i,t,n):(i=c("canvas"),F.Bf.Wl(i,M,this.Mf),F.Bf.$l(i,t,n)),i},Qn.prototype.aNt=function(t,n,i,r){var e,o,u,o,u,f,s,e=this,o=F.Bf.Xl(t),u=F.Bf.ql(t),o=e.oNt(o,u),u=o.getContext("2d"),f=F.Bf.Kl(o),s=F.Bf.Jl(o);F.Lf.Vl(u,1,1),u.drawImage(t,0,0,R(o),U(o),0,0,R(o),U(o)),F.Lf.Vl(u,f,s),e.fg=o,e.uNt=n,e.sNt=i,e.cNt=r},Qn.prototype.fNt=function(t,n,i){var r,e,o,u,f,s,c,i,a,e,h,a,c,v,A,l,w,d,p,g,m,n,C,b,t,r,i,a,r=this,e=r.Mf,h=e.options.rightToLeft,a=F.Bf.Xl(t),c=F.Bf.ql(t),v=ln(e),A=wn(e),l=0<v?1:0,w=0<A?1:0,d=r.sNt,p=qn(e),g=r.uNt,m=e.Fi(),n=n/r.cNt,C=t.getContext("2d"),b=F.Bf.Kl(t),t=F.Bf.Jl(t),r=r.fg;C.save(),C.fillStyle=i,C.fillRect(0,0,a,c),i=e.rowOutlines,a=e.columnOutlines,i&&i._e(e,C,M,!0),a&&a._e(e,C,M,!1),e=(a=(i=(c=h?(o=g.Hy+g.zy,u=d.y+U(d),f=d.x-o-l,s=g.Ay-u-w,p.x-f*n):(o=d.x+R(d),u=d.y+U(d),f=g.Hy-o-l,s=g.Ay-u-w,p.x+R(p)),p.y+U(p)),f*n),s*n),o*=b,u*=t,f*=b,s*=t,c*=b,i*=t,a*=b,e*=t,F.Lf.Vl(C,1,1),C.drawImage(r,o,u,f,s,c,i,a,e),0<v&&(o=g.Hy-l,u=d.y+U(d),f=g.zy+l,s=g.Ay-u-w,c=m.Hy-l,i=p.y+U(p),a=m.zy+l,e=s*n,C.drawImage(r,o*=b,u*=t,f*=b,s*=t,c*=b,i*=t,a*=b,e*=t)),0<A&&(e=(a=(i=(c=h?(o=g.Hy+g.zy,u=g.Ay-w,f=d.x-o-l,s=g.Iy+w,p.x-f*n):(o=d.x+R(d),u=g.Ay-w,f=g.Hy-o-l,s=g.Iy+w,p.x+R(p)),m.Ay-w),f*n),m.Iy+w),C.drawImage(r,o*=b,u*=t,f*=b,s*=t,c*=b,i*=t,a*=b,e*=t)),0<v&&0<A&&(o=g.Hy-l,u=g.Ay-w,f=g.zy+l,s=g.Iy+w,c=m.Hy-l,i=m.Ay-w,a=m.zy+l,e=m.Iy+w,C.drawImage(r,o*=b,u*=t,f*=b,s*=t,c*=b,i*=t,a*=b,e*=t)),F.Lf.Vl(C,b,t),C.restore()},Qn.prototype.$Z=function(){var t,n,i,r,t=this,n=t.Mf,i=n.zoom(),r=n.Dn._7();r&&t.aNt(r.canvas,n.Fi(),qn(n),i)},Qn.prototype.iW=function(t){var n,i,t,r,e,o,o,e,n=this,i=n.Mf;i.endEdit()&&(t=Zn(t,n.cNt),r=i.zoom(),e=i.name(),r!==t)&&(i.ki(F.Events.ViewZooming,o={sheet:i,sheetName:e,oldZoomFactor:r,newZoomFactor:t,cancel:!1}),!0!==o.cancel)&&(i.g8(t=o.newZoomFactor),i.ki(F.Events.UserZooming,{sheet:i,sheetName:e,oldZoomFactor:r,newZoomFactor:t}),i.ki(F.Events.ViewZoomed,{sheet:i,sheetName:e,oldZoomFactor:r,newZoomFactor:t}),i.invalidateLayout(),(e=(o=i.Dn).J())&&n.fNt(e.canvas,t,o.R7(!1)),i.oht&&i.oht(M,t),i.CW)&&i.CW(M)},Qn.prototype.rW=function(t){var n,i,r,t,n,e,n=this,i=n.Mf,r=i.name(),t=Zn(t,n.cNt),n=i.zoom();if(t!==n){if(i.ki(F.Events.ViewZooming,e={sheet:i,sheetName:r,oldZoomFactor:n,newZoomFactor:t,cancel:!1}),!0===e.cancel)return;i.g8(t=e.newZoomFactor),i.ki(F.Events.UserZooming,{sheet:i,sheetName:r,oldZoomFactor:n,newZoomFactor:t}),i.ki(F.Events.ViewZoomed,{sheet:i,sheetName:r,oldZoomFactor:n,newZoomFactor:t})}i.Zw=!0,i.Ww=!0,i.zw()},Ut=Qn,t.ZZ=Ut,T=200,Rt=20,s.prototype.lNt=function(t){var n;this.Mf.my=t,this.B5e=!0},s.prototype.hNt=function(t){var n;this.Mf.ly=t,this.G5e=!0},s.prototype.dNt=function(){var t;this.Mf.invalidateLayout()},s.prototype.yy=function(t,n,i,r,e){var o,u,f,s,c,a,h,v,a,A,l,w,d,p,g,m,A,C,b,M,f,x,y,E,k,k,E,y,k,P,F,h,o=this,u=o.Mf,f=u.options,s,c,a=Ln(u,t,u.Tb,u.ly);if(a&&(h=a.Ky,v=a.Xy,t=a._At,u.Tb=h,!(0<u.My)))if(a=u.ot(),l=(A=u.Fi()).Cy,w=u.Sy(A),d=A.Iy,p=A.Ay,g=A.Ty,m=(a||A).x,A=R(A),f=f.sheetAreaOffset,x=u.Ny,A+=f.left,t<0)o.vNt=0,E=y=void(o.mNt=0),(y=(k=u.dw(1))&&0<k.length?k.findRow(h):y)&&(E=k[k.length-1]).row>=h&&(C=2+f.top,b=l+S(t),0<=(M=j(l+w,E.y+U(E))-b))&&(M-=C,o.hNt(v-U(y)),i.x=m,i.y=b,i.width=A,i.height=M,i.tx=m,i.ty=l,k=x?w:w+d+g,r.x=m,r.y=l+M,r.width=A,r.height=k-M);else if(0<t){if(E=u.vw(-1),k=y=void 0,(P=u.parent&&u.parent.options.scrollByPixel)&&0<v&&(t-=v,v=0),h===E&&0<v){if(0<o.vNt&&0<o.mNt){if(v=k=Gn(y=o.vNt+t,T),(t=k-o.mNt)<=0)return n;if(n&&20<=k)return!0}else{if(T<=v&&(t-=v-199,v=199,t<=0))return n;if(y=Jn(v,T),k=v,n&&20<=k)return!0}o.vNt=y,o.mNt=k}else o.vNt=0,o.mNt=0;t<(F=x?w:w+d)&&(C=2+f.top,b=l,M=w-t,0<wn(u)&&(M-=H),o.hNt(v),!x&&0<g&&(h=j(a.height-d-H,p-H+t),e.x=m,e.y=p-H,e.width=A,e.height=d+H,e.tx=m,e.ty=h),i.x=m,i.y=b,i.width=A,i.height=M+(x?0:j(t,g)-H),i.tx=m,i.ty=b+t,r.x=m,r.y=b,r.width=A,r.height=t+C)}return!1},s.prototype.wy=function(t,n,i,r,e){var o,u,f,s,c,a,h,c,v,A,l,w,d,p,g,m,C,b,M,x,y,E,k,P,F,I,O,B,O,I,N,Y,F,O,o=this,u=o.Mf,f,s,c=zn(u,t,u.Ab,u.my);if(c&&(a=c.iw,h=c.Xy,t=c.EAt,u.Ab=a,!(0<u.My)))if(c=u.ot(),A=(v=u.Fi()).Py,l=u.Gy(v),w=v.zy,d=v.Hy,p=v.Uy,g=(c||v).y,m=U(v),E=u.options.rightToLeft,k=u.options.sheetAreaOffset,P=u.Vy,m+=k.top,t<0)o.gNt=0,I=F=void(o.pNt=0),((F=(O=u.yw(1))&&0<O.length?O.findCol(a):F)||E&&O&&0<O.length)&&(I=O[O.length-1]).col>=a&&(C=2+k.left,b=A+S(t),0<=(M=j(A+l,I.x+R(I))-b))&&(M-=C,B=E?-h:h-(F?R(F):u.nn(a)),o.lNt(B),i.x=b,i.y=g,i.width=M,i.height=m,i.tx=A,i.ty=g,O=P?l:l+w+p,r.x=A+M,r.y=g,r.width=O-M,r.height=m);else if(0<t){if(I=u.ww(-1),(N=u.parent&&u.parent.options.scrollByPixel)&&0<h&&(t-=h,h=0),a===I&&0<h){if(0<o.gNt&&0<o.pNt){if(h=y=Gn(x=o.gNt+t,T),(t=y-o.pNt)<=0)return n;if(n&&20<=y)return!0}else{if(T<=h&&(t-=h-199,h=199,t<=0))return n;if(x=Jn(h,T),y=h,n&&20<=y)return!0}o.gNt=x,o.pNt=y}else o.gNt=0,o.pNt=0;t<(Y=P?l:l+w)&&(C=2+k.left,b=A,E&&(b-=v.Uy),M=l-t,0<ln(u)&&(M-=H),B=E?-(h+u.nn(a)):h,o.lNt(B),F=0,!P&&0<p&&(O=j(c.width-(F=w)-H,d-H+t),e.x=d-H,e.y=g,e.width=F+H,e.height=m,e.tx=O,e.ty=g),i.x=b,i.y=g,i.width=M+(P?0:j(t,p)-H),i.height=m,i.tx=b+t,i.ty=g,r.x=b,r.y=g,r.width=t+C,r.height=m)}return!1},s.prototype.bNt=function(t,n,i,r){var e,o,u,f,s,c,n,a,h,v,A,i,h,l,w,d,p,g,w,d,h,m,C,b,M,x,n,m,C,b,M,x,t,r,l,n,m,C,b,M,x,e=this,o=e.Mf,u=!0,f=!0,s=o.Dn,c=s.J(),A=0!=(2&i),i=0!=(1&i);if(i||A)return h={},l={},w=o.ot(),d=o.Fi(),p=(w||d).y,g=U(d),w=(w||d).x,d=R(d),A&&(u=e.yy(n,r,n={},a={},h),m=h.y,C=R(h),b=U(h),M=h.tx,x=h.ty,I(h=h.x)||s.Ey(h,m,C,b,M,x),s.Ey(n.x,n.y,R(n),U(n),n.tx,n.ty)),i&&(f=e.wy(t,r,h={},v={},l),m=l.y,C=R(l),b=U(l),M=l.tx,x=l.ty,I(n=l.x)||s.Ey(n,m,C,b,M,x),s.Ey(h.x,h.y,R(h),U(h),h.tx,h.ty),A||(a=v)),(t=o.parent)&&!t.options.scrollbarShowMax&&(i&&(o.Zw=!0),A)&&(o.Ww=!0),e.dNt(),r=o.rowOutlines&&!o.rowOutlines.Oy()?1:0,l=o.columnOutlines&&!o.columnOutlines.Oy()?1:0,i&&A?s.D1(c,new F.Rect(a.x,a.y,R(a),U(a)+r),new F.Rect(v.x,v.y,R(v)+l,U(v))):s.D1(c,new F.Rect(a.x,a.y,R(a)+l,U(a)+r)),n=new F.Rect(w,p,d,g),(m=o.getSelections())&&0<m.length&&(C=o.getRangeRect(1,1,m[0]),b=G(n.x+n.width,C.x+C.width),M=G(n.y+n.height,C.y+C.height),n.x=j(n.x,C.x),n.y=j(n.y,C.y),n.width=b-n.x+1,n.height=M-n.y+1),s.O1(n),s.jy(c,n),ti(o,!0),Vn(o,!0),e.yNt(i,A),$n(o,!0),x=o.options.sheetAreaOffset,o.options.rowHeaderVisible||s.q7(c,new F.Rect(w,p,2,g+x.top)),o.options.colHeaderVisible||s.q7(c,new F.Rect(w,p,d+x.left,2)),u&&f},s.prototype.yNt=function(t,n){var i=this.Mf;n&&i.tw(),t&&i.ow(),i.rt.By()},s.prototype.wNt=function(e,o,u){function f(t,n,i,r){return J(.75,t/=i)*r*(n?1:-1)}function t(t,n,i){return t=S(t),q(t/=i)/q(.75)*n}var s=this,c=s.Mf,a=T,n=10,i=20,h=100,v=t(e,10,a),A=t(o,10,a),l=e,w=o,d=0,p=0,g=!1,m=!1;s.H6=At.setInterval(function(){var t,t,n,i,r;g&&m?(c.Jt.Rl(),(t=c.parent)&&!t.options.scrollbarShowMax&&(c.Zw=!0,c.Ww=!0),c.Jt.Bl(),c.ly=0,c.my=0,c.zw(),c.ow(),c.tw(),vn(s.H6),s.H6=M):(A+=20,h<(v+=20)&&h<A?(s.bNt(e-d,o-p,ni(g,m),u),m=g=!0):(h<v&&!g&&(s.bNt(e-d,0,1,u),g=!0),h<A&&!m&&(s.bNt(0,o-p,2,u),m=!0),t=f(v,0<e,10,a),n=f(A,0<o,10,a),i=$(l-t),r=$(w-n),s.bNt(i,r,ni(g,m),u),l=t,w=n,d+=i,p+=r))},20)},s.prototype.Ok=function(t){var n=this,i=n.Mf,r=i.Jt;n.H6&&(r.Bl(),vn(n.H6),n.H6=M),n.B5e=!1,n.G5e=!1,n.LSe=i.my,n.BSe=i.ly,n.gNt=0,n.pNt=0,n.vNt=0,n.mNt=0,n.MNt=i.Tb,n.CNt=i.Ab,t&&r.jl()},s.prototype.a9=function(t,n){var i,r,e,o,u,f,e,s,t,c,i,r,e=this.Mf.parent,o=e.options.scrollbarAppearance===F.ScrollbarAppearance.mobile,u=e._vScrollbar,f=e._hScrollbar,e=e.ib,s=ht(t.X+""),t=ht(t.Y+""),c=ii(s,t);return o&&(0!==t&&(u.qy(F.ScrollbarState.show),e.$y(!0)),0!==s)&&(f.qy(F.ScrollbarState.show),e.$y(!1)),this.bNt(s,t,c,n)},s.prototype.SNt=function(t){var n,i,r,e,o,u,f,s,c,a,h,c,v,A,l,w,l,d,p,g,p,m,n=this,i=n.Mf,r=i.options.rightToLeft,e=n.MNt,o=i.Tb,u=n.CNt,f=i.Ab,s;i.parent&&i.parent.options.scrollByPixel?(i.Jt.Bl(),i.zw(),n.TNt(),n.B5e=M,n.G5e=M,n.LSe=M,n.BSe=M):(a=(c=i.Fi()).Py,h=c.b6,c=c.Cy,v=i.yw(1),l=i.Mw().iw,w=1,v&&0<v.length&&(A=v.findCol(f),f<l&&A&&!r&&A.x+R(A)-a<R(A)/2||r&&h-A.x<R(A)/2?f++:w=-1),l=i.dw(1),p=i.mw().Ky,g=1,l&&0<l.length&&(d=l.findRow(o),o<p&&d&&d.y+U(d)-c<U(d)/2?o++:g=-1),m=p=0,v&&0<v.length&&(A=v.findCol(f))&&(p=r?h-(A.x+A.width):a-A.x),l&&0<l.length&&(m=c-(d=l.findRow(o)).y),o!==e&&i.$A(o,0,e),f!==u&&i.o9(f,0,u),n.wNt(p*=w,m*=g,t))},s.prototype.TNt=function(){var t,n,i,r,e,o,u,f,t=this,n=t.Mf,i=t.MNt,r=n.Tb,e=t.CNt,o=n.Ab,u=n.zoom(),f=!1;i===r&&!t.G5e||(n.ki(F.Events.TopRowChanged,{sheet:n,sheetName:n.name(),oldTopRow:i,newTopRow:r,oldOffset:S(t.BSe/u),newOffset:S(n.ly/u)}),f=!0),e===o&&!t.B5e||(n.ki(F.Events.LeftColumnChanged,{sheet:n,sheetName:n.name(),oldLeftCol:e,newLeftCol:o,oldOffset:S(t.LSe/u),newOffset:S(n.my/u)}),f=!0),f&&n.$Dr({type:"updateTopLeftPosition",leftCol:n.Ab,topRow:n.Tb})},Dt=s,g.prototype.OZ=function(t){var n,i,r,e,o,u,f,s,c,a,h,r,v,A,l,w,n,v,d,p,n=this,i=n.Mf,r=i.Fi(),e=i.options.rightToLeft,o=r.Py,u=r.Cy,f=r.J7,s=r.Uy,c=r.X7,a=r.b6,h=r.Hy,r=r.Ay,v=t.JZ,A=i.Ny,l=i.Vy,w=0,n=n.ANt(v.X,v.Y),v=n.dragInfo,d=n.x,p=n.y;n&&(n.resizeInfo||v&&"corner"===v.side||n.selectionHitInfo)?w|=3:(u<=p&&(A&&p<r||!A&&p<c)&&(w|=2),o<=d&&(l&&(e?d<a:d<h)||!l&&(e?f+s<d:d<f))&&(w|=1),w|=96,i.parent&&(w|=12)),t.KZ=w},g.prototype.BZ=function(t){var n,i,i,r,e,o,u,i,f,s,f,c,s,a,n=this,i={e:t,r:M};g.et(n,"preProcessManipulationStarted",i),i.r||(i=t.JZ,e=(r=n.Mf).parent,o=r.rt,u=r.Dn,f=(i=n.ANt(i.X,i.Y)).dragInfo,s=i.selectionHitInfo,(r.sw=i).resizeInfo?r.endEdit()&&o.gk(i):f&&"corner"===f.side?o.wk&&o.wk(i):s?r.endEdit()&&(f=s.isHeader,c=s.isFirstIndicator,s=s.type,f&&o.A9(i,!0),a=i.hitTestType,i.hitTestType=s,o.F9(i),i.hitTestType=a,si(r,f,c,s),r.INt=!1,u.PD()):(r.pW&&(r.pW().VW=!1),r.INt=!1,u.PD(),1<t.kAt&&e&&e.options.allowUserZoom?(n.jAt=!1,n.YZ.$Z()):(n.jAt=!0,n.OAt.Ok(1===t.kAt))))},g.prototype.FZ=function(t){var n,i,i,r,e,r,o,i,u,f,r,u,n=this,i={e:t,r:M};g.et(n,"preProcessManipulationDelta",i),i.r||(i=t.JZ,e=(r=n.Mf).rt,r=r.sw,o=i.X,i=i.Y,r&&(u=r.dragInfo,f=r.selectionHitInfo,r.resizeInfo?(e.fk={e:t,x:o,y:i},e.y9()):u&&"corner"===u.side?(e.fk={e:t,x:o,y:i},e.Zk&&e.Zk()):f||e.ob?f&&e.Rk&&e.rb&&!0!==e.FI&&(r=f.type,e.fk={e:t,x:o,y:i},3===r?e.Y9():2===r?e.Z9():1===r&&e.W9()):n.jAt?t.gxt=n.OAt.a9(t.SAt.wAt,t.AAt):(u=t.nW.tW,n.YZ.iW(u))))},g.prototype.GZ=function(t){var n,i,i,r,e,o,e,n=this,i={e:t,r:M};g.et(n,"preProcessManipulationCompleted",i),i.r||(r=(i=n.Mf).rt,i.INt=!0,o=(e=i.sw).selectionHitInfo,e.resizeInfo?r.C9():e.dragInfo&&r.Yk?(r.DD&&r.DD(),i.parent.touchToolStrip.xNt()):o||r.ob?(r.X9(),o&&ci(i,o.isHeader,o.isFirstIndicator,o.type),i.Dn.E1()):(i.pW&&(i.pW().VW=!0),n.jAt?n.OAt.SNt(t.AAt):(e=t.nW.tW,n.YZ.rW(e))))},g.prototype.HZ=function(t){var i,n,n,r,e,t,o,o,u,n,f,s,c,a,h,v,A,v,h,A,a,v,n,n,n,l,l,l,l,w,d,l,n,i=this,n={e:t,r:M};if(g.et(i,"preProcessTapped",n),n.r)i.Mf.repaint();else if(n=t.JZ,r=i.Mf,e=r.parent,t=!1,r.Nk=p,i.NNt(),r.Olt&&r.Olt(),(o=r.Ut.pI)&&o.CZ(),o=r.rt,n=(u=i.ANt(n.X,n.Y,!0)).filterButtonHitInfo,f=u.hitTestType,s=u.row,c=u.col,a=u.outlineHitInfo)r.isEditing()||(h=a.what,v=r.rowOutlines,A=r.columnOutlines,"rg"===h||"rgh"===h?v&&v.rpt(r,a):"cg"!==h&&"cgh"!==h||A&&A.rpt(r,a));else if(r.sw=u,n)r.endEdit()&&(v=n.rowFilter)&&v.openFilterDialog(n);else if(!u.resizeInfo)if(r.JA(u.rowViewportIndex<0?-1:s,u.colViewportIndex<0?-1:c)){if(r.kNt&&!o.Yk&&e.touchToolStrip.xNt(),h=r.getActiveRowIndex(),A=r.getActiveColumnIndex(),a=u.cellTypeHitInfo){if(v=vi(r,a,u),a.sheet||(a.sheet=r),i.xk(v,a))if(n=a.sheetArea,!I(n)&&3!==n||s===h&&c===A)r.Dn.PD();else{if(r.suspendPaint(),!r.endEdit())return;if(n={sheet:r,sheetName:r.name(),row:h,col:A,cancel:!1},r.ki(F.Events.LeaveCell,n),!0===n.cancel)return;n=r.Ut.getSelections(),l=r.Ut.getSpan(s,c),l=[(0,F.Ec)(l.row,l.col,l.rowCount,l.colCount)],r.EA(n,l),r.ki(F.Events.FloatingElementSelected,{type:"worksheet"}),l=a.isReservedLocation&&a.isFocusAware,r.t4(s,c,p,p,l?0:1),l={sheet:r,sheetName:r.name(),row:s,col:c},r.ki(F.Events.EnterCell,l),r.ki(F.Events.EnterCellInternal,l),r.jA(n),r.Nk=!0,o.PA&&o.PA(s,c),r.resumePaint(),t=!0}v.processCellAndPaddingMouseDown(a),v.Ve(a)}if(a&&a.isReservedLocation)return!0;a&&(a.cellButtonHitInfo||a.outlineColumnHitInfo)&&(t=!0),r.ki(F.Events.CellClick,{sheet:r,sheetName:r.name(),sheetArea:f,row:u.row,col:u.col});try{if(o.Dk=u,w=r.isEditing(),d=r.endEdit(),r.Oi&&z&&w&&d&&(o.shift=!1),w&&h===r.getActiveRowIndex()&&A===r.getActiveColumnIndex()&&!d)return}finally{o.Dk=M}I(s)||I(c)||(3===f&&o.PA&&o.PA(s,c),ui(r,s,c,f)&&!t?i.DNt=At.setTimeout(function(){var t,n,t={x:u.x,y:u.y,handled:!1},n=e.touchToolStrip;r.ki(F.Events.TouchToolStripOpening,t),t.handled||n.open(u.x,u.y-tt),i.NNt()},420):(r.ki(F.Events.FloatingElementSelected,{type:"worksheet"}),l=r.Ut.getSelections(),o.A9(u),n=r.Ut.getSelections(),r.EA(l,n),o.X9()))}else r.ki(F.Events.CellClick,{sheet:r,sheetName:r.name(),sheetArea:f,row:u.row,col:u.col})},g.prototype.xk=function(t,n){return!(t&&t.activeOnClick&&!t.activeOnClick()&&n.isReservedLocation)},g.prototype._Nt=function(t,n){var i,r,i,t,n,e,o,i=this,r=i.Mf,i=i.ANt(t,n,!0);i&&0<=i.row&&0<=i.col&&0<=i.rowViewportIndex&&0<=i.colViewportIndex&&!i.resizeInfo&&r.JA(i.row,i.col)&&((t=r.isCtrlPressed(i.hitTestType))||r.IA(),n=r.C0(i.row),e=r.S0(i.col),o=!0,r.ui===i.row&&r.ci===i.col||(o=!1),r.O6(i.row,i.col,n,e,o),t?r.zw():r.n4(i.row,i.col,1,1),r.rt.S_(!1,!0),r.f6(r.Dg(),i.row,i.col))},g.prototype.WAt=function(t){var n,i,i,t,r,e,n=this,i={e:t,r:M};g.et(n,"preProcessDoubleTapped",i),!i.r&&(i=n.Mf,t=t.JZ,n.NNt(),r=i.sw)&&(e=!1,3===r.hitTestType?n._Nt(t.X,t.Y):e=i.rt.j_(r),e||i.ki(F.Events.CellDoubleClick,{sheet:i,sheetName:i.name(),sheetArea:r.hitTestType,row:r.row,col:r.col}))},g.prototype.ENt=function(t){var n,i,t,r,r,n=this,i=n.Mf,t=t.JZ,r=n.ANt(t.X,t.Y);i.isEditing()?r.row===i.ui&&r.col===i.ci||i.rt.C_(r):(n._target=r,(r=n.ANt(t.X,t.Y,!0))&&r.cellTypeHitInfo&&r.cellTypeHitInfo.isEditing||i.rt.C_(r))},g.prototype.jNt=function(t){var n,i,n,r,e,e,n=this,i=n.Mf;!i.isEditing()&&(r=!0,r=(!(n=n._target)||!((e=n.cellTypeHitInfo)&&e.isReservedLocation||(e=i.getCellType(n.row,n.col))&&e.isEditing()))&&r)&&i.rt.S_(!0)},g.prototype.ANt=function(t,n,i){var r,e,o,u,f,s,u,f,s,s,u,f,c,a,f,f,f,r,e=this.Mf;return e.Fi(),o={x:t,y:n,rowViewportIndex:M,colViewportIndex:M,row:-1,col:-1,resizeInfo:M,hitTestType:M,outlineHitInfo:M,filterButtonHitInfo:M,dragInfo:M,cellTypeHitInfo:M,selectionHitInfo:M},u=e.rowOutlines,f=e.columnOutlines,(s=!(s=u?u.hitTest(e,t,n):s)&&f?f.hitTest(e,t,n):s)?o.outlineHitInfo=s:(f=u=void 0,u=e.FL(n),f=e.PL(t),o.rowViewportIndex=u,o.colViewportIndex=f,o.row=e.GL(n,u),o.col=e.UL(t,f,n,u,o.row),0<=u&&u<=2&&0<=f&&(s=e.O_(u,f,p,o.row,o.col))&&(o.row=s.row,o.col=s.col),o.hitTestType=e.C6(u,f),a=c=f=u=s=void 0,s=ri(e,o,t,n,10),c=(c=(f=e.IB)&&f.hitTest(o,t,n))||(f=(f=(f=e.tables)&&f.find(o.row,o.col))&&f.IB)&&f.hitTest(o,t,n),e.kNt?(u=oi(e,o,t,n),o.dragInfo=u):s?o.resizeInfo=s:c?o.filterButtonHitInfo=c:i?o.cellTypeHitInfo=e.JL(o,t,n):(a=ei(e,o,t,n),o.selectionHitInfo=a)),o},g.prototype.NNt=function(){var t=this,n=t.DNt;n&&(clearTimeout(n),t.DNt=M)},_t=g,t.TouchEventHandler=_t,(0,F.$e)(_t),Ai.prototype.oW=function(){var t,n,t,t=this,n=t.DZ,t=t.xZ;t.jZ=function(t){return n.OZ(t)},t.RZ=function(t){return n.BZ(t)},t.LZ=function(t){return n.FZ(t)},t.PZ=function(t){return n.GZ(t)},t.UZ=function(t){return n.HZ(t)},t.ZAt=function(t){return n.WAt(t)},t.oIt=function(t){return n.ENt(t)},t.uIt=function(t){return n.jNt(t)}},Ai.prototype.uW=function(){var t=this,n=t.xZ;n&&(t.kZ.aW(n,!1),n.jZ=M,n.RZ=M,n.LZ=M,n.AIt=M,n.PZ=M,n.UZ=M,n.ZAt=M,n.IIt=M,n.oIt=M,n.uIt=M,t.xZ=M)},Ai.prototype.sW=function(t){return this.AZ.sW()},Ai.prototype.cW=function(t){return this.AZ.cW()},Ai.prototype.fW=function(t){return this.AZ.fW()},Zt=Ai,Qt="gc-toolstrip-button",Lt="gc-toolstrip-text",zt="gc-toolstrip-image",Gt="gc-toolstrip-item",Jt="gc-touch-sperate-line",Kt="height",Xt="width",A="px",Vt="button",N(x,hn=P),x.prototype.open=function(t,n){var i,r,e,o,u,f,i=this,r=d(i.Vv);if(r&&(F.hi.F1(M,!0),i.LAt.css({left:t,top:n}),i.$c(),i.Jet=!0,i.if(),!_(i.f$)))for(o in e=i.f$)e.hasOwnProperty(o)&&((f=!(u=e[o]).UAt||u.UAt.call(i))?O("#"+o).show():O("#"+o).hide())},x.prototype.add=function(t){var n,i,r,r;t&&(i=(n=this).f$,t instanceof $t?(r=t.name())&&(i[r]=t,n.ONt(t.RNt(Jt,n.BAt+A))):t instanceof qt&&(r=t.name(),n.getItem(r)||(i[r]=t,n.ONt(t.RNt(zt,n.RAt+A,Lt,Qt)))))},x.prototype.getItem=function(t){return this.f$[t]},x.prototype.getItems=function(){var t,n,i,r,t,n=[],i=this.f$;if(_(i))return M;for(r in i)i.hasOwnProperty(r)&&n.push(i[r]);return n},x.prototype.remove=function(t){var n,i,n=this;return n.getItem(t)?(O("#"+t).parent().remove(),i=n.f$[t],delete n.f$[t],i):M},x.prototype.clear=function(){var t=this;t.LAt&&(t.LAt.find("td."+Gt).remove(),t.f$={})},x.prototype.close=function(){var t,t,n,t=this;lt.cf(),t.LAt&&t.LAt.hide(),t.Jet=!1,t.uf(),(t=d(t.Vv))&&(t.Zg(),0<(n=m(t)).length)&&!t.kNt&&-1===n[0].row&&-1===n[0].col&&t.IA()},x.prototype.imageAreaHeight=function(t){var n=this;return 0===arguments.length?n.RAt:(0<t&&(n.RAt=t,n.LAt.find("span."+zt).css(Kt,t+A)),n)},x.prototype.itemHeight=function(t){var n=this,i=n.LAt.find("button."+Qt);return 0===arguments.length?vt(i.css(Kt)):(0<t&&i.css(Kt,t+A),n)},x.prototype.itemWidth=function(t){var n,i,r,e,n=this,i=n.LAt.find("button."+Qt);return 0===arguments.length?vt(i.css(Xt)):(0<t&&(t<(e=vt(i.css(r="min-width")))&&i.css(r,t+A),i.css(Xt,t+A)),n)},x.prototype.separatorHeight=function(t){var n=this;return 0===arguments.length?n.BAt:(0<t&&(n.BAt=t,n.LAt.find("div."+Jt).css(Kt,t+A)),n)},x.prototype.FAt=function(){var t,n,t,t="table",n=this,t=O(c(t)).css({padding:0,display:t}).attr({cellspacing:0,cellpadding:0});n.BNt=O(c("tr")).appendTo(t),t.appendTo(n.LAt)},x.prototype.L0=function(){var t=this,n=t.LAt;n&&(t.Jet&&(lt.cf(),t.uf()),n.unbind("click"),n.remove(),t.LAt=M)},x.prototype.aY=function(){var r=this;r.LAt.bind("click",function(t){var t,n,i,t,t,t=t.target,n;t.tagName.toLowerCase()===Vt?i=t.id:(t=t.parentElement)&&t.tagName.toLowerCase()===Vt&&(i=t.id),t=r.f$[i],i&&t&&t.tT.call(r)})},x.prototype.ONt=function(t){this.LAt&&t&&O(c("td")).append(t).appendTo(this.BNt).addClass(Gt)},x.prototype.PAt=function(){var t,t,n,i,r,e,t;function o(t){for(var n,i,n=0,i=t+n;B.getElementById(i);)i=t+ ++n;return i}i=(t={0:w+(t="gAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAA")+"A8ElEQVRIS92VwQ3CMAxFe+qZERiHY8dgDI4cYYNOhDhwY4ayQviW4q/Eddu0KRe+9CQ72P8rEpAmhPBT3ENLd76EiPv5HO5hSmK+KYTFsz+04A4G9NZ0hAizn7jTos2MFRYYugFZQlscoFzRZsYKCwwNulAqnZddtJmxwiIZ3oT6WFh4S2tQHwsLb2kN6mNh4S2tQX0sLLwly4IyY4WFZ2gReV/ZhBOQH2ddgKcYwBAc7R/weL0ZgqO6gGPXE1E0JlBdwJx2CUhvkCL63xvw33QKUc0N+B5MIaq5gb5o8kotBszJDShFlkvQ+ZHBvoTmC+fiVfoq/m86"+wt,1:w+t+"BkklEQVRIS7WTUXECQRBEcYCFOIiESAAH/OYPCcQBEogDJCABCUhAwqXf1QzVM0cojko+Xt3ObG/33t7eYhiGf6UU68+vneD5Mu4HpZDgKja+YCYH94NSSHAUg3glZC9k8zgAYwLmhuS6o/tBKUJ8CTGsoveIsin3g1LEAkxzAd/kXbihwxwatGys+EEpEAT5LR6FuDmMb+t+UAoEwVL44h7CvB8lGxrn3A9KkaLAj8pDMD9HL/v0ZgfAQfSAk/WgXAT3g1K4MPCj2AoPhNvRJO4HpejigF1jxtjNy9Ek7gel6GIjfzoP+Ihewf2gFPcWNNL817/c/aAUKXpbfy/FXlzFIM6gOYy3Gp+iz/xBPHeLQGLAMI2PNmYOw1uojZfdCyYNCXexiGcGpiljdp9hsBGjvnvBpCHhRbgBZChjAgj0eXrX7gWThoR992lAMGOOLMfJuIHuBZMGQuE75KN66Cpq14xH2L1g0kixyLNm3I8sNbwJulHfvWDSkJArmou4hlxXeh4AvBEBuZnnbtHfMix+AHqkr6wgQ4Q7"+wt,2:w+t+"A3UlEQVRIS72PwQ3CMAxFOwrjcOyZCTgyAjfWYCJO3JiCCVL/iFSO9W0MDTzpqYob+ztTKeWn0uJIadE6H8/ljXsR96q6tzt4YogH/olPcQ2R8mp3CHRBwO3+6EKkvNodcDkSgyyoAx0iRz/AA/8Op0sdtJuv1Va3Ct8FYHgL8dgUAGxIe41+kRAH6CbdaGW86nFAhnaXLSLEAbqJCbxlUgEZ2DIgFaCbmMBbJhWQgS0DUgG6iQm8ZVIBGTYFsK21oN3F1yrEARnsIM/u8JeAT9S9nrQ4UlocKS2Os0wLtkPMdu9POt0AAAAASUVORK5CYII=",3:w+"UAAAAXCAIAAABrvZPKAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAIdJREFUOE/tzEEKgCAQheEOWLdx351adYc8Qgs3rbuAUC9nkkF0BKNN9CMy0Xx25llf8Edr7d57j/tlP4wTHf4W/b7gsT0vLs7Sz9bFWfM9nrDXE9ITphlVPO512wkkM++FNF86vBfKeKR43rjLe5QwOvxPVPSoipHmkY5RxSMFo7rXY9+eMSdet07b6c/bnwAAAABJRU5ErkJggg=="})[0],r=t[1],e=t[2],t=t[3],(n=this).LNt=new qt(o("wijspread_toolstrip_paste"),f().ToolStrip_PasteText,i,n.FNt),n.PNt=new qt(o("wijspread_toolstrip_cut"),f().ToolStrip_CutText,r,n.GNt),n.UNt=new qt(o("wijspread_toolstrip_copy"),f().ToolStrip_CopyText,e,n.HNt),n.zNt=new qt(o("wijspread_toolstrip_autofill"),f().ToolStrip_AutoFillText,t,n.VNt,n.YNt),n.add(n.LNt),n.add(n.PNt),n.add(n.UNt),n.add(new $t(n.YNt)),n.add(n.zNt)},x.prototype.YNt=function(){var t,n,i,r,t=d(this.Vv);if(!t)return!1;if(0===(n=m(t)).length)return!1;for(i=0;i<n.length;i++)if(-1===(r=n[i]).row&&-1===r.col)return!1;return!0},x.prototype.VNt=function(){var t,n;this.close(),(t=d(this.Vv))&&(n=m(t).length)<=1&&(t.kNt=!0,t.Dn.E1())},x.prototype.xNt=function(){var t=d(this.Vv);t&&(t.kNt=!1,t.Dn.E1())},x.prototype.HNt=function(){var t,n,t=d(this.Vv);t&&((n=li(t))?t.Qy().execute({cmd:"copyFloatingObjects",sheetName:t.name()}):t.Qy().execute({cmd:"copy",sheetName:t.name(),ignoreClipboard:!0})),this.close()},x.prototype.GNt=function(){var t,n,i,t=d(this.Vv);if(t){if(n={r:M},x.et(this,"beforeDoTabCut",n),n.r)return;(i=li(t))?t.Qy().execute({cmd:"cutFloatingObjects",sheetName:t.name()}):t.Qy().execute({cmd:"cut",sheetName:t.name(),ignoreClipboard:!0})}this.close()},x.prototype.FNt=function(){var t,n,i,t=this,n=d(t.Vv);if(n){if(i={r:M},x.et(this,"beforeDoTabPaste",i),i.r)return;n.isPasteFloatingObject&&n.isPasteFloatingObject()?n.Qy().execute({cmd:"pasteFloatingObjects",sheetName:n.name()}):n.isPasteShapes&&n.isPasteShapes()?n.Qy().execute({cmd:"pasteShapes",sheetName:n.name()}):n.Qy().execute({cmd:"paste",sheetName:n.name(),pasteOption:0})}t.close()},x.prototype.WNt=function(){var t=this,n="span."+Lt;O("#"+t.LNt.Zc).find(n).text(f().ToolStrip_PasteText),O("#"+t.PNt.Zc).find(n).text(f().ToolStrip_CutText),O("#"+t.UNt.Zc).find(n).text(f().ToolStrip_CopyText),O("#"+t.zNt.Zc).find(n).text(f().ToolStrip_AutoFillText)},Wt=x,t.TouchToolStrip=Wt,(0,F.$e)(Wt),di.prototype.name=function(t){var n=this;return 0===arguments.length?n.Zc:(O("#"+n.Zc).attr("id",t),O("#"+n.Zc+"Text").attr("id",t+"Text"),O("#"+n.Zc+"Image").attr("id",t+"Image"),n.Zc=t,n)},di.prototype.text=function(t){var n=this;return 0===arguments.length?n._text:(n._text=t,O("#"+n.name()+"Text").text(t),n)},di.prototype.font=function(t){var n,i,n=this,i=O("#"+n.name()+"Text");return 0===arguments.length?n._font:(n._font=t,i.css("font",t),n)},di.prototype.foreColor=function(t){var n,i,n=this,i=O("#"+n.name()+"Text");return 0===arguments.length?n.Oft||i.css("color"):(i.css("color",t),n)},di.prototype.image=function(t){var n=this;return 0===arguments.length?n.GAt:(n.GAt=t,O("#"+n.name()+"Image").css("background-image","url("+t+")"),n)},di.prototype.RNt=function(t,n,i,r){var e,o,u,f,s,t,n,e,u,e=this,o=e.name(),u=e.font(),f=e.text(),s=O(c("span"));return s.attr("id",o+"Image"),s.addClass(t),s.css({"background-image":"url("+e.image()+")","background-repeat":"no-repeat",display:"block",height:n,"background-position-x":"50%"}),(t=O(c("span"))).attr("id",o+"Text"),t.addClass(i),t.css("font",u),t.text(f),(e=60)<(n=wi(u,f,i))&&(e=n),(u=O(c(Vt))).attr("type",Vt),u.attr("id",o),u.addClass(r+" gc-toolstrip-button-style ui-state-default ui-widget btn btn-default"),u.css({"box-sizing":"content-box",border:"0px",padding:"4px",margin:"3px",width:e+A}),u.append(s),u.append(t),u[0]},qt=di,t.TouchToolStripItem=qt,pi.prototype.name=function(){return this.Zc},pi.prototype.RNt=function(t,n){var i=O(c("div"));return i.attr("id",this.name()),i.addClass(t),i.css({width:"1px",height:n,display:"inline-block;","background-color":"#CCC","margin-left":"5px","margin-right":"5px",opacity:.6}),i[0]},$t=pi,t.TouchToolStripSeparator=$t,y.prototype.NIt=function(){this.QNt=2,this.jS.Oi=!0},y.prototype.qAt=function(){this.QNt=0,this.KNt=l()},y.prototype.xIt=function(){return 1===this.QNt},y.prototype.jIt=function(){return 1===this.QNt},y.prototype._It=function(){return 1===this.QNt},y.prototype.sW=function(){var t=this;if(2===t.QNt)return!0;if(t.KNt){if(l()-t.KNt<=200)return t.JNt++,!0;t.KNt=0,t.JNt=0}return t.QNt=1,t.jS.Oi=!1},y.prototype.cW=function(){var t=this;return t.JNt?(t.JNt--,!0):2===t.QNt||(t.QNt=0,!1)},y.prototype.fW=function(){return 2===this.QNt},tn=y,t.IZ=tn,nn=gi,t.NZ=nn,mi.prototype.XNt=function(t,n){var i,r,e,o,r,e,i=t,r=i.touches,e=i.targetTouches,o=i.changedTouches;!1===i.isPrimary||r&&1<=r.length&&e&&1<=e.length&&(r[0].clientX!==e[0].clientX||r[0].clientY!==e[0].clientY)||(a(t),r=I(o)?i:o[0],(e=B.createEvent("MouseEvents")).initMouseEvent(n,!0,!0,At,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,M),t.target.dispatchEvent(e))},mi.prototype.lIt=function(t){var n,n,n=t.pointerType;n&&n!==t[v]&&n!==h||(n=t.data).Vb||(n.Vb=!0,n.qNt=!1,n.XNt(t,"mouseover"),n.XNt(t,"mousemove"),n.XNt(t,"mousedown"))},mi.prototype.iE=function(t){var n,n,n=t.pointerType;n&&n!==t[v]&&n!==h||(n=t.data).Vb&&(n.qNt=!0,n.XNt(t,"mousemove"))},mi.prototype._up=function(t){var n,n,n=t.pointerType;n&&n!==t[v]&&n!==h||(n=t.data).Vb&&(n.XNt(t,"mouseup"),n.XNt(t,"mouseout"),n.qNt||n.XNt(t,"click"),n.Vb=!1)},mi.prototype.$Nt=function(t,n,i){var r,e,e,o,u,f,s,c,a,h,i,v,n,r=this,e=i.charAt(0),e=it+(i="."!==e?"."+i:i),o=rt+i,u=et+i,f=ot+i,s=ut+i,c=ft+i,a=st+i,h=ct+i,i=at+i,v=F.mt.m0();n?v?(n=t.style,I(n.msTouchAction)||(n.msTouchAction=nt),I(n.touchAction)||(n.touchAction=nt),O(t).bind(e,r,r.lIt).bind(f,r,r.lIt),O(B).bind(o,r,r.iE).bind(s,r,r.iE).bind(u,r,r._up).bind(c,r,r._up)):O(t).bind(a,r,r.lIt).bind(h,r,r.iE).bind(i,r,r._up):v?(O(t).unbind(e).unbind(f),O(B).unbind(o).unbind(s).unbind(u).unbind(c)):O(t).unbind(a).unbind(h).unbind(i)},rn=mi,t.QAt=rn,en="newSheet",on="tab",un="allSheets",E.prototype.BZ=function(t){var n,i,r,t,e,o,u,u,f,s,u,t,s,t,s,c,a,u,h,v,n,i,r=this,t=t.JZ,e=r.w2,o=e.im(),u=d(e.Vv);for(e.Og&&e.Rg(u,!1),u="resize",(s=(f=e.hitTest(t.X,t.Y)).element)===u?(e.Bg=!0,e.Lg=t.X):s!==on&&s!==en&&""!==s||(u=e.fg,t=F.Bf.Xl(u),s=F.Bf.ql(u),s=(t=r.oNt(t,s)).getContext("2d"),c=F.Bf.Kl(t),a=F.Bf.Jl(t),F.Lf.Vl(s,1,1),s.drawImage(u,0,0,R(t),U(t),0,0,R(t),U(t)),F.Lf.Vl(s,c,a),r.fg=t,r.t6t=e.om,r.n6t=e.tm(),r.e6t=e.Xv(),r.Rv=e.Jv()),r.i6t=e.N2(-1),u=e.Ym(e.Zm()),r.r6t=-1===u?e.om:u,v=h=0;v<r.t6t;v++)n=null!=(n=e.a7(v))?n:0,i=null!=(i=e.aXe(v))?i:0,h+=o?n:i;r._Re=h},E.prototype.FZ=function(t){var n,i,r,e,o,u,n,f,s,c,f,a,f,u,s,a,c,r,h,t,v,v,s,u,a,c,s,A,l,w,d,o,n,o,p,g,n,i,i=this,r=t.JZ.X,e=i.w2,o=e.im(),u=e.Vv,n=null==(n=(0,F.jf)(u))?void 0:n.options.rightToLeft;e.Bg?(f=r-e.Lg,s=u.options,c=u._vp.clientWidth,s.tabStripRatio=u.Jg()+f/c,f=n?0:e.rm()/c,a=n?1-e.rm()/c:1,u.Jg()<f?(s.tabStripRatio=f,e.Lg=e.rm()):u.Jg()>=a?(s.tabStripRatio=a,e.Lg=c):e.Lg=r):(f=i.fg,u=i.t6t,f&&!I(u)&&(s=i.i6t,a=i.r6t,c=i.Rv,r=i.n6t,h=i.e6t,t=o?t.nW.wAt.X:t.nW.wAt.Y,v=i.o6t(t,u),e.om=v.om,v=v._size,(0<t&&u===s&&e.om===s||t<0&&u===a&&e.om===a)&&(v=0),0<t&&v+c<t?t=v+c:t<0&&t<v-c&&(t=v-c),0!==t)&&(u=(s=e.fg).getContext("2d"),a=F.Bf.Kl(s),c=F.Bf.Jl(s),u.save(),u.clearRect(0,0,F.Bf.Xl(s),F.Bf.ql(s)),s=e.ot(),e.wm(u,s),o?(d=w=l=A=void 0,n?(d=U(s),n=o=void(l=0),0<t?(0<(w=h-(o=(A=r)+t))&&(F.Lf.Vl(u,1,1),u.drawImage(f,A*a,l,w*a,d*c,o*a,l,w*a,d*c),F.Lf.Vl(u,a,c)),n=h-r<=t?0:t-v,A=r,0<(w=v)&&(F.Lf.Yl(u,n,0),e.Z2(u,new F.Rect(A,l,w,d)),F.Lf.Yl(u,-n,0))):t<0&&(0<(w=h-(A=(o=r)+S(t)))&&(F.Lf.Vl(u,1,1),u.drawImage(f,A*a,l,w*a,d*c,o*a,l,w*a,d*c),F.Lf.Vl(u,a,c)),n=t-v,h-r<=S(t)&&(n=0),A=h-(w=S(v)),0<w)&&(F.Lf.Yl(u,n,0),e.Z2(u,new F.Rect(A,l,w,d)),F.Lf.Yl(u,-n,0)),F.Lf.Vl(u,1,1),A=0,w=r):(o=r-i._Re+t,F.Lf.Yl(u,o,0),e.Z2(u,void 0,!0),F.Lf.Yl(u,-o,0),F.Lf.Vl(u,1,1),l=A=0,w=r,d=U(s)),u.drawImage(f,A*a,l,w*a,d*c,A*a,l,w*a,d*c),p=F.I.fl(""),2007<(g=ht(p.zIndex))&&(A=h,w=s.x+R(s)-e.rm()-A,u.drawImage(f,A*a,l,w*a,d*c,A*a,l,w*a,d*c)),A=R(s)-e.rm(),w=e.rm(),u.drawImage(f,A*a,l,w*a,d*c,A*a,l,w*a,d*c)):(w=R(s),i=n=d=l=void(A=0),0<t?(0<(d=h-(n=(l=r)+t))&&(F.Lf.Vl(u,1,1),u.drawImage(f,A*a,l*c,w*a,d*c,A*a,n*c,w*a,d*c),F.Lf.Vl(u,a,c)),i=h-r<=t?0:t-v,l=r,0<(d=v)&&(F.Lf.Yl(u,0,i),e.Z2(u,new F.Rect(A,l,w,d)),F.Lf.Yl(u,0,-i))):t<0&&(0<(d=h-(l=(n=r)+S(t)))&&(F.Lf.Vl(u,1,1),u.drawImage(f,A*a,l*c,w*a,d*c,A*a,n*c,w*a,d*c),F.Lf.Vl(u,a,c)),i=t-v,h-r<=S(t)&&(i=0),l=h-(d=S(v)),0<d)&&(F.Lf.Yl(u,0,i),e.Z2(u,new F.Rect(A,l,w,d)),F.Lf.Yl(u,0,-i)),F.Lf.Vl(u,1,1),u.drawImage(f,A*a,(l=0)*c,w*a,(d=r)*c,A*a,l*c,w*a,d*c),p=F.I.fl(""),2007<(g=ht(p.zIndex))&&(l=h,d=s.y+U(s)-e.rm()-l,u.drawImage(f,A*a,l*c,w*a,d*c,A*a,l*c,w*a,d*c)),l=U(s)-e.rm(),d=e.rm(),u.drawImage(f,A*a,l*c,w*a,d*c,A*a,l*c,w*a,d*c)),F.Lf.Vl(u,a,c),u.restore()))},E.prototype.GZ=function(t){var n=this.w2;n.Bg?(n.Bg=!1,n.Vv.Xg()):n.repaint()},E.prototype.HZ=function(t){var n,i,r,e,o,r,u,o,n=this.w2,i=n.Vv,r=t.JZ,e=d(i);n.Og&&n.Rg(e,!1),o=["first","prevArrow","nextArrow","last","","prevButton","nextButton"],u=(r=n.hitTest(r.X,r.Y)).element,i.Bp=!0;try{0<=o.indexOf(u)?n.Pg(r.index,!0):u===on?n.Gg(r.index,r.position):u===en?n.Hg(r.position):u===un&&this.zg(t)}finally{i.Bp=!1,(o=d(i))!==e&&(o.Oi=!0,o.Zg())}},E.prototype.WAt=function(t){return this.w2.E2(t.JZ.X,t.JZ.Y)},E.prototype.oNt=function(t,n){var i=this.fg;return i?t===F.Bf.Xl(i)&&n===F.Bf.ql(i)||F.Bf.$l(i,t,n):(i=c("canvas"),F.Bf.Wl(i,this.w2.Vv),F.Bf.$l(i,t,n)),i},E.prototype.o6t=function(t,n){var i,r,e,o,u,f,i,s,c,a,i=this,r=i.w2,e=i.i6t,o=i.r6t,u=r.im(),f,i=d(r.Vv),s,c=n,a=0;if((null==i?void 0:i.options.rightToLeft)&&u){if(0<t){for(;c<=o&&!(t<a);)a+=r.a7(c),c++;o<c&&(c=o)}else if(t<0&&-1!==o){for(;e<=c&&!(a<t);)a-=r.a7(c),c--;c<e&&(c=e)}}else if(0<t){for(;e<=c&&!(t<a);)a+=u?r.a7(c):r.aXe(c),c--;c<e&&(c=e)}else if(t<0&&-1!==o){for(;c<=o&&!(a<t);)a-=u?r.a7(c):r.aXe(c),c++;o<c&&(c=o)}return{om:c,_size:a}},E.prototype.zg=function(t){var n,i,n=this.w2,i=gn(n.getCanvas());n.zg({pageX:t.JZ.X+i.I0,pageY:t.JZ.Y+i.A0})},fn=E,Ci.prototype.oW=function(){var t=this,n=t.kZ;n&&n.aW(t.xZ,!0)},Ci.prototype.uW=function(){var t=this,n=t.kZ;n&&n.aW(t.xZ,!1)},Ci.prototype.sW=function(t){return this.AZ.sW()},Ci.prototype.cW=function(t){return this.AZ.cW()},Ci.prototype.fW=function(t){return this.AZ.fW()},sn=Ci,F.g7.prototype.PD=function(){var t,n,i,r,t=this,n=t.Mf,i=m(n),r=i.length;n.My<=0&&0<r&&t.E1(i[r-1],p,p,!0)},F.Worksheet.ch(h,{init:function(){this.kNt=!1,this.INt=!0},setHost:function(t){var n,i,i,t,n=this,i=n.parent,i=i&&i.kZ||new mt,t=new Zt(t[0],n,i);t.oW(),n.dW=t},dispose:function(t){var n=this;n.dW&&n.dW.uW(),!1!==t.clearCache&&(n.dW=M)},startEdit:function(){this.Oi&&this.Dn.PD()},paintAdornment:function(t){var n,t,n=this,t=t.ctx;n.Oi&&(n.isActualProtected()||Mi(n,t),n.kNt?Fi(n,t):Pi(n,n.INt,t))},preProcessMouseDown:function(t){var n,i,n=t.e,i=this.dW;(r||i.sW(n))&&(a(n),t.r=!0)},preProcessMouseMove:function(t){var n,i,n=t.e,i=this.dW;(r||i.fW(n))&&(a(n),t.r=!0)},preProcessMouseUp:function(t){var n,i,n=t.e,i=this.dW;(r||i.cW(n))&&(a(n),t.r=!0)},preProcessMouseDbClick:function(t){(r||this.Oi)&&(t.r=!0)},preProcessMouseOut:function(t){r&&(t.r=!0)},preProcessMouseWheel:function(t){r&&(t.r=!0)}}),F.Workbook.ch(h,{init:function(){this.kZ=new mt},setHost:function(){var t=this;t.touchToolStrip=new Wt(t,t.j2())},dispose:function(){var t=this,n=t.kZ,i=t.touchToolStrip;n&&n.L0(),i&&(i.L0(),t.touchToolStrip=M)},onCultureChanged:function(){var t=this.touchToolStrip;t&&t.WNt()}}),F.Hv.ch(h,{setHost:function(){var t,n,t=this,n=new sn(t.fg,t,t.Vv.kZ);n.oW(),t.dW=n},dispose:function(){var t=this,n=t.dW;n&&(n.uW(),t.dW=M)},preProcessMouseDown:function(t){var n=this.dW,i=t.e;(r||n.sW(i))&&(a(i),t.r=!1)},preProcessMouseMove:function(t){var n=this.dW,i=t.e;(r||n.fW(i))&&(a(i),t.r=!1)},preProcessMouseUp:function(t){var n=this.dW,i=t.e;(r||n.cW(i))&&(a(i),t.r=!1)},preProcessMouseDbClick:function(t){var n=d(this.Vv);(r||n&&n.Oi)&&(t.r=!1)},preProcessMouseOut:function(t){r&&(t.r=!1)}}),cn=".gcScrollbar",F.YM.ch(h,{initEvents:function(t){var n;(this.Hb=new rn).$Nt(t,!0,cn)},dispose:function(t){var n=this.Hb;n&&n.$Nt(t,!1,cn)}})},"./dist/plugins/touch/touch.res.en.js":function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.ToolStrip_AutoFillText=n.ToolStrip_CopyText=n.ToolStrip_CutText=n.ToolStrip_PasteText=void 0,n.ToolStrip_PasteText="Paste",n.ToolStrip_CutText="Cut",n.ToolStrip_CopyText="Copy",n.ToolStrip_AutoFillText="AutoFill"},Common:function(t){t.exports=n.Spread},Core:function(t){t.exports=n.Spread.Sheets}},r={},t=e("./dist/plugins/touch/touch.entry.js"),(((n=void 0===n?{}:n).Spread=n.Spread||{}).Sheets=n.Spread.Sheets||{}).Touch=t}()});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapecity-software/spread-sheets-touch",
3
- "version": "18.0.4",
3
+ "version": "18.0.6",
4
4
  "main": "index.js",
5
5
  "description":"SpreadJS touch module",
6
6
  "scripts": {},
@@ -16,8 +16,8 @@
16
16
  "spreadjs"
17
17
  ],
18
18
  "dependencies": {
19
- "@grapecity-software/spread-common": "18.0.4",
20
- "@grapecity-software/spread-sheets-core": "18.0.4"
19
+ "@grapecity-software/spread-common": "18.0.6",
20
+ "@grapecity-software/spread-sheets-core": "18.0.6"
21
21
  },
22
22
  "author": {
23
23
  "email": "info.xa@grapecity.com",