UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

1 lines 26.1 kB
module.exports=function(o){function r(t){if(e[t])return e[t].exports;var d=e[t]={exports:{},id:t,loaded:!1};return o[t].call(d.exports,d,d.exports,r),d.loaded=!0,d.exports}var e={};return r.m=o,r.c=e,r.p="",r(0)}({0:function(o,r,e){o.exports=e(1104)},3:function(o,r){o.exports=function(){throw Error("define cannot be used indirect")}},1002:function(o,r){o.exports=require("./kendo.drawing")},1062:function(o,r){o.exports=require("./kendo.dataviz.core")},1104:function(o,r,e){var t,d,a;!function(s,define){d=[e(1062),e(1002)],t=s,a="function"==typeof t?t.apply(r,d):t,!(void 0!==a&&(o.exports=a))}(function(){return function(o,r){function e(o){return parseInt(o,2)}function t(o,r){var e=(+o).toString(2);return e.length<r&&(e=Array(r-e.length+1).join(0)+e),e}function d(o,r){for(var e=[],t=0;t<o.length;)e.push(o.substring(t,t+r)),t+=r;return e}function a(o,r,e,t){for(var d=0;d<o.length;d++)o[d][e][t]=r}function s(o,r,e,t){for(var d=0;d<Bo.length;d++)o[d][e][t]=Bo[d](e,t)?1^r:parseInt(r,10)}function n(){var o,r;for(r=1;r<255;r++)o=2*so[r-1],o>255&&(o=285^o),so[r]=o,ao[o]=r;o=2*so[r-1]^285,so[r]=o,so[-1]=0}function l(){var o,r,e,t=68;for(o=2;o<=t;o++)r=no[o-1],e=[o,0],no[o]=k(r,e)}function u(o,e){var t=[],d=o.length-1;do t[d]=so[(o[d]+e)%255],d--;while(o[d]!==r);return t}function C(o,r){return parseInt(o.charAt(r),10)}function c(o,r,e,t,d){r[o][t]=(r[o][t]<<1^d)%128,r[o][t]==fo&&(e[o]+=40)}function w(o,r,e,t,d,a){e[o][a]==t?d[o][a]++:(e[o][a]=t,d[o][a]>=5&&(r[o]+=3+d[o][a]-5),d[o][a]=1)}function g(o,r){var e=Math.floor(o/r*100),t=e%5,d=Math.abs(e-t-50),a=Math.abs(e+5-t-50),s=10*Math.min(d/5,a/5);return s}var i,p,h,f,B,D,k,P,M,v,L,m,Q,_,E,H,S,A,x,I,R,T,O,V,U,b,y,F,N,z,Z,G,K,W,j=window.kendo,q=o.extend,$=j.drawing,X=j.dataviz,J=j.ui.Widget,Y=X.Box2D,oo="0000",ro="numeric",eo="alphanumeric",to="byte",ao={1:0},so={0:1},no=[[1,0],[1,25,0]],lo={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},uo=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],Co=[1,0,1,1,1],co=[1,0,1],wo={L:"01",M:"00",Q:"11",H:"10"},go="101010000010010",io="10100110111",po="1111100100101",ho=["11101100","00010001"],fo=93,Bo=[function(o,r){return(o+r)%2===0},function(o){return o%2===0},function(o,r){return r%3===0},function(o,r){return(o+r)%3===0},function(o,r){return(Math.floor(o/2)+Math.floor(r/3))%2===0},function(o,r){return o*r%2+o*r%3===0},function(o,r){return(o*r%2+o*r%3)%2===0},function(o,r){return((o+r)%2+o*r%3)%2===0}],Do=/^\d+/,ko="A-Z0-9 $%*+./:-",Po="A-Z $%*+./:-",Mo=RegExp("^["+Po+"]+"),vo=RegExp("^["+ko+"]+"),Lo=RegExp("^[^"+ko+"]+"),mo=8,Qo=5,_o=8,Eo=17,Ho=9,So=16,Ao=Math.round,xo=j.Class.extend({getVersionIndex:function(o){return o<10?0:o>26?2:1},getBitsCharacterCount:function(o){var r=this;return r.bitsInCharacterCount[r.getVersionIndex(o||40)]},getModeCountString:function(o,r){var e=this;return e.modeIndicator+t(o,e.getBitsCharacterCount(r))},encode:function(){},getStringBitsLength:function(){},getValue:function(){},modeIndicator:"",bitsInCharacterCount:[]}),Io={};Io[ro]=xo.extend({bitsInCharacterCount:[10,12,14],modeIndicator:"0001",getValue:function(o){return parseInt(o,10)},encode:function(o,r){var e,a=this,s=d(o,3),n=a.getModeCountString(o.length,r);for(e=0;e<s.length-1;e++)n+=t(s[e],10);return n+t(s[e],1+3*s[e].length)},getStringBitsLength:function(o,r){var e=o%3;return 4+this.getBitsCharacterCount(r)+10*Math.floor(o/3)+3*e+(0===e?0:1)}}),Io[eo]=xo.extend({characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010",getValue:function(o){return this.characters[o]},encode:function(o,r){var e,a,s=this,n=d(o,2),l=s.getModeCountString(o.length,r);for(a=0;a<n.length-1;a++)e=45*s.getValue(n[a].charAt(0))+s.getValue(n[a].charAt(1)),l+=t(e,11);return e=2==n[a].length?45*s.getValue(n[a].charAt(0))+s.getValue(n[a].charAt(1)):s.getValue(n[a].charAt(0)),l+t(e,1+5*n[a].length)},getStringBitsLength:function(o,r){return 4+this.getBitsCharacterCount(r)+11*Math.floor(o/2)+6*(o%2)}}),Io[to]=xo.extend({bitsInCharacterCount:[8,16,16],modeIndicator:"0100",getValue:function(o){var r=o.charCodeAt(0);if(r<=127||160<=r&&r<=255)return r;throw Error("Unsupported character: "+o)},encode:function(o,r){var e,d=this,a=d.getModeCountString(o.length,r);for(e=0;e<o.length;e++)a+=t(d.getValue(o.charAt(e)),8);return a},getStringBitsLength:function(o,r){return 4+this.getBitsCharacterCount(r)+8*o}}),i={};for(p in Io)i[p]=new Io[p];h=function(o){var e=this,t=o.length-1,d=o.length-1,a=d,s=-1,n=0;e.move=function(){t+=s*n,n^=1,d=a-n},e.getNextCell=function(){for(;o[t][d]!==r;)e.move(),(t<0||t>=o.length)&&(s=-s,a-=8!=a?2:3,d=a,t=s<0?o.length-1:0);return{row:t,column:d}},e.getNextRemainderCell=function(){if(e.move(),o[t][d]===r)return{row:t,column:d}}},f=function(o,r){var e,t,d,a,n,l,u=new h(o[0]);for(a=0;a<r.length;a++)for(e=r[a],t=0;e.length>0;){for(n=0;n<e.length;n++)for(l=0;l<8;l++)d=u.getNextCell(),s(o,e[n][t].charAt(l),d.row,d.column);for(t++;e[0]&&t==e[0].length;)e.splice(0,1)}for(;d=u.getNextRemainderCell();)s(o,0,d.row,d.column)},B=function(o,r){for(var e=8*r,t=0,d=0;o.length<e&&t<oo.length;)o+=oo.charAt(t++);for(o.length%8!==0&&(o+=Array(9-o.length%8).join("0"));o.length<e;)o+=ho[d],d^=1;return o},D=function(o,r){var e,t=[],d=o.length-2;for(e=d;e>=0;e--)t[e]=o[e]^r[e];return t},k=function(o,e){var t,d,a=[];for(t=0;t<o.length;t++)for(d=0;d<e.length;d++)a[t+d]=a[t+d]===r?(o[t]+(e[d]>=0?e[d]:0))%255:ao[so[a[t+d]]^so[(o[t]+e[d])%255]];return a},n(),l(),P=function(o,r){var e,d,a=no[r-1],s=Array(r).concat(o),n=Array(s.length-a.length).concat(a),l=o.length,C=[];for(d=0;d<l;d++)e=u(n,ao[s[s.length-1]]),n.splice(0,1),s=D(e,s);for(d=s.length-1;d>=0;d--)C[r-1-d]=t(s[d],8);return C},M=function(o,r){var t,d,a,s,n,l,u,C,c=0,w=[],g=[],i=r.groups;for(l=0;l<i.length;l++)for(a=i[l][0],u=0;u<a;u++){for(d=i[l][1],t=[],s=[],C=1;C<=d;C++)n=o.substring(c,c+8),t.push(n),s[d-C]=e(n),c+=8;w.push(t),g.push(P(s,r.errorCodewordsPerBlock))}return[w,g]},v=function(o,r,e,t,d){var a,s,n=Do.exec(o),l=n?n[0]:"",u=Mo.exec(o),C=u?u[0]:"",c=vo.exec(o),w=c?c[0]:"";return l&&(l.length>=r||o.length==l.length||l.length>=e&&!vo.test(o.charAt(l.length)))?(a=ro,s=l):w&&(o.length==w.length||w.length>=t||d==eo)?(a=eo,s=l||C):(a=to,s=w?w+Lo.exec(o.substring(w.length))[0]:Lo.exec(o)[0]),{mode:a,modeString:s}},L=function(o){var r,e,t=[],d=0;for(t.push(v(o,mo,Qo,_o,r)),r=t[0].mode,o=o.substr(t[0].modeString.length);o.length>0;)e=v(o,Eo,Ho,So,r),e.mode!=r?(r=e.mode,t.push(e),d++):t[d].modeString+=e.modeString,o=o.substr(e.modeString.length);return t},m=function(o){var r,e,t=0;for(e=0;e<o.length;e++)r=i[o[e].mode],t+=r.getStringBitsLength(o[e].modeString.length);return Math.ceil(t/8)},Q=function(o,r){var e=0,t=uo.length-1,d=Math.floor(uo.length/2);do o<uo[d][r].totalDataCodewords?t=d:e=d,d=e+Math.floor((t-e)/2);while(t-e>1);return o<=uo[e][r].totalDataCodewords?d+1:t+1},_=function(o,r){var e,t,d="";for(t=0;t<o.length;t++)e=i[o[t].mode],d+=e.encode(o[t].modeString,r);return d},E=function(o){var r,t,d=e(o),a="";if(0===d)return"101010000010010";for(r=H(e(o),io,15),t=0;t<r.length;t++)a+=r.charAt(t)^go.charAt(t);return a},H=function(o,r,d){var a=e(r),s=r.length-1,n=o<<s,l=d-s,u=t(o,l),C=S(n,a);return C=u+t(C,s)},S=function(o,r){var e=r.toString(2).length,t=o.toString(2).length;do o^=r<<t-e,t=o.toString(2).length;while(t>=e);return o},A=function(o){var r,e,t=[],d=17+4*o;for(r=0;r<Bo.length;r++)for(t[r]=Array(d),e=0;e<d;e++)t[r][e]=Array(d);return t},x=function(o,r){var e,t,d=o[0],s=0,n=r.length;for(e=0,t=8;e<=8;e++)6!==e&&a(o,C(r,n-1-s++),e,t);for(e=8,t=7;t>=0;t--)6!==t&&a(o,C(r,n-1-s++),e,t);for(s=0,t=d.length-1,e=8;t>=d.length-8;t--)a(o,C(r,n-1-s++),e,t);for(a(o,1,d.length-8,8),e=d.length-7,t=8;e<d.length;e++)a(o,C(r,n-1-s++),e,t)},I=function(o){return H(o,po,18)},R=function(o,r){var e,t,d,s,n=o[0],l=n.length,u=0,c=l-11,w=l-11,g=0;for(s=0;s<r.length;s++)e=Math.floor(s/3),t=s%3,d=C(r,r.length-s-1),a(o,d,u+e,c+t),a(o,d,w+t,g+e)},T=function(o,r,e,t){var d,s,n,l=r.length+2,u=r.length+1;for(s=0;s<r.length;s++)for(n=s;n<l-s;n++)d=r[s],a(o,d,e+n,t+s),a(o,d,e+s,t+n),a(o,d,e+u-n,t+u-s),a(o,d,e+u-s,t+u-n)},O=function(o,r,e,t){var d=e,s=t,n=o[0];do a(o,0,d,t),a(o,0,e,s),d+=r[0],s+=r[1];while(d>=0&&d<n.length)},V=function(o){var r=o[0].length;T(o,Co,0,0),O(o,[-1,-1],7,7),T(o,Co,r-7,0),O(o,[1,-1],r-8,7),T(o,Co,0,r-7),O(o,[-1,1],7,r-8)},U=function(o,e){var t,d,a,s,n,l,u,C,c;if(!(e<2)){for(t=o[0],d=t.length,a=Math.floor(e/7),s=[6],u=0,(n=lo[e])?l=(d-13-n)/a:n=l=(d-13)/(a+1),s.push(s[u++]+n);s[u]+l<d;)s.push(s[u++]+l);for(C=0;C<s.length;C++)for(c=0;c<s.length;c++)t[s[C]][s[c]]===r&&T(o,co,s[C]-2,s[c]-2)}},b=function(o){var r,e=6,t=6,d=1,s=o[0].length;for(r=8;r<s-8;r++)a(o,d,e,r),a(o,d,r,t),d^=1},y=function(o){var r,e,t,d,a,s,n,l=[],u=[],C=[],i=[],p=[],h=0,f=1,B=o[0].length;for(e=0;e<o.length;e++)l[e]=0,C[e]=0,p[e]=[0,0],i[e]=[0,0],u[e]=[];for(e=0;e<B;e++)for(t=0;t<B;t++)for(d=0;d<o.length;d++)r=o[d],C[d]+=parseInt(r[e][t],10),u[d][h]===r[e][t]&&e+1<B&&t-1>=0&&r[e+1][t]==u[d][h]&&r[e+1][t-1]==u[d][h]&&(l[d]+=3),c(d,i,l,h,r[e][t]),c(d,i,l,f,r[t][e]),w(d,l,u,r[e][t],p,h),w(d,l,u,r[t][e],p,f);for(a=B*B,n=Number.MAX_VALUE,e=0;e<l.length;e++)l[e]+=g(C[e],a),l[e]<n&&(n=l[e],s=e);return s},F=function(o,r){this.dataString=o,this.version=r},N=function(){this.getEncodingResult=function(o,r){var e=L(o),t=m(e),d=Q(t,r),a=_(e,d);return new F(a,d)}},z=function(){this.mode=i[this.encodingMode]},z.fn=z.prototype={encodingMode:to,utfBOM:"111011111011101110111111",initialModeCountStringLength:20,getEncodingResult:function(o,r){var e=this,t=e.encode(o),d=e.getDataCodewordsCount(t),a=Q(d,r),s=e.mode.getModeCountString(t.length/8,a)+t;return new F(s,a)},getDataCodewordsCount:function(o){var r=this,e=o.length,t=Math.ceil((r.initialModeCountStringLength+e)/8);return t},encode:function(o){var r,e=this,t=e.utfBOM;for(r=0;r<o.length;r++)t+=e.encodeCharacter(o.charCodeAt(r));return t},encodeCharacter:function(o){var r,e,d=this.getBytesCount(o),a=d-1,s="";if(1==d)s=t(o,8);else{for(r=8-d,e=0;e<a;e++)s=t(o>>6*e&63|128,8)+s;s=(o>>6*a|255>>r<<r).toString(2)+s}return s},getBytesCount:function(o){var r,e=this.ranges;for(r=0;r<e.length;r++)if(o<e[r])return r+1},ranges:[128,2048,65536,2097152,67108864]},Z=function(o){return o&&o.toLowerCase().indexOf("utf_8")>=0?new z:new N},G=function(o,r,e){var d,a,s,n=new Z(e),l=n.getEncodingResult(o,r),u=l.version,C=uo[u-1][r],c=B(l.dataString,C.totalDataCodewords),w=M(c,C),g=A(u);return V(g),U(g,u),b(g),u>=7&&R(g,t(0,18)),x(g,t(0,15)),f(g,w),d=y(g),a=g[d],u>=7&&R([a],I(u)),s=wo[r]+t(d,3),x([a],E(s)),a},K={DEFAULT_SIZE:200,QUIET_ZONE_LENGTH:4,DEFAULT_ERROR_CORRECTION_LEVEL:"L",DEFAULT_BACKGROUND:"#fff",DEFAULT_DARK_MODULE_COLOR:"#000",MIN_BASE_UNIT_SIZE:1},W=J.extend({init:function(r,e){var t=this;J.fn.init.call(t,r,e),t.element=o(r),t.wrapper=t.element,t.element.addClass("k-qrcode"),t.surfaceWrap=o("<div />").css("position","relative").appendTo(this.element),t.surface=$.Surface.create(t.surfaceWrap,{type:t.options.renderAs}),t.setOptions(e)},redraw:function(){var o=this._getSize();this.surfaceWrap.css({width:o,height:o}),this.surface.clear(),this.createVisual(),this.surface.draw(this.visual)},getSize:function(){return j.dimensions(this.element)},_resize:function(){this.redraw()},createVisual:function(){this.visual=this._render()},exportVisual:function(){return this._render()},_render:function(){var o,r,e,t,d,a,s,n=this,l=n._value,u=n.options.border||{},C=n.options.padding||0,c=u.width||0;return u.width=c,s=new $.Group,l&&(e=G(l,n.options.errorCorrection,n.options.encoding),t=n._getSize(),a=t-2*(c+C),o=n._calculateBaseUnit(a,e.length),d=e.length*o,r=c+C+(a-d)/2,s.append(n._renderBackground(t,u)),s.append(n._renderMatrix(e,o,r))),s},_getSize:function(){var o,r,e,t=this;return t.options.size?o=parseInt(t.options.size,10):(r=t.element,e=Math.min(r.width(),r.height()),o=e>0?e:K.DEFAULT_SIZE),o},_calculateBaseUnit:function(o,r){var e=Math.floor(o/r);if(e<K.MIN_BASE_UNIT_SIZE)throw Error("Insufficient size.");return e*r>=o&&e-1>=K.MIN_BASE_UNIT_SIZE&&e--,e},_renderMatrix:function(o,r,e){var t,d,a,s,n,l,u,C,c=new $.MultiPath({fill:{color:this.options.color},stroke:null});for(t=0;t<o.length;t++)for(d=e+t*r,a=0;a<o.length;){for(;0===o[t][a]&&a<o.length;)a++;if(a<o.length){for(s=a;1==o[t][a];)a++;n=Ao(e+s*r),l=Ao(d),u=Ao(e+a*r),C=Ao(d+r),c.moveTo(n,l).lineTo(n,C).lineTo(u,C).lineTo(u,l).close()}}return c},_renderBackground:function(o,r){var e=new Y(0,0,o,o).unpad(r.width/2);return $.Path.fromRect(e.toRect(),{fill:{color:this.options.background},stroke:{color:r.color,width:r.width}})},setOptions:function(o){var e=this;o=o||{},e.options=q(e.options,o),o.value!==r&&(e._value=e.options.value+""),e.redraw()},value:function(o){var e=this;return o===r?e._value:(e._value=o+"",e.redraw(),r)},options:{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:K.DEFAULT_ERROR_CORRECTION_LEVEL,background:K.DEFAULT_BACKGROUND,color:K.DEFAULT_DARK_MODULE_COLOR,size:"",padding:0,border:{color:"",width:0}}}),X.ExportMixin.extend(W.fn),X.ui.plugin(W),j.deepExtend(X,{QRCode:W,QRCodeDefaults:K,QRCodeFunctions:{FreeCellVisitor:h,fillData:f,padDataString:B,generateErrorCodewords:P,xorPolynomials:D,getBlocks:M,multiplyPolynomials:k,chooseMode:v,getModes:L,getDataCodewordsCount:m,getVersion:Q,getDataString:_,encodeFormatInformation:E,encodeBCH:H,dividePolynomials:S,initMatrices:A,addFormatInformation:x,encodeVersionInformation:I,addVersionInformation:R,addCentricPattern:T,addFinderSeparator:O,addFinderPatterns:V,addAlignmentPatterns:U,addTimingFunctions:b,scoreMaskMatrixes:y,encodeData:G,UTF8Encoder:z},QRCodeFields:{modes:i,powersOfTwo:ao,powersOfTwoResult:so,generatorPolynomials:no}})}(window.kendo.jQuery),window.kendo},e(3))}});