-
Notifications
You must be signed in to change notification settings - Fork 0
/
hzCropper.min.js
1 lines (1 loc) · 6.72 KB
/
hzCropper.min.js
1
eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([6-9g-mo-wzA-Z]|[12]\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(k($){\'use strict\';p $1S=$(document),1w=\'.l-j\',2k=\'2l.t 2m.t\',1T=\'mousemove.t touchmove.t\',1U=\'mouseup.t mouseleave.t touchend.t touchleave.t touchcancel.t\',1x=\'2l.t click.t 2m.t\',19=\'l\',2n=19+\'.1V\',2o=19+\'.1W\',2p=19+\'.1X\',2q=/^(lt|tc|V|rc|W|bc|S|lc|1Y|1y)$/,pint=parseInt,G=parseFloat,14=15.14,1z=15.1z,1A=15.1A,pi=15.PI,1Z=15.1Z,21=15.21;k 1e(n){z 1B n===\'number\'}k isUndefined(n){z 1B n===\'undefined\'}k 1f(n){z 1B n===\'k\'}k 2r(n){z 1B n===\'string\'}k 22(H,T){p 17=[];9(!!1e(T)){17.X(T)}z 17.slice.2s(H,17)}k 1C(fn,2t){p 17=22(2u,2);z k(){z fn.2s(2t,17.concat(22(2u)))}}k 2v(U){p I=[];I.X(\'g:\'+U.$h.g()+\'v\');I.X(\'8:\'+U.$h.8()+\'v\');I.X(\'r:\'+U.$h.B(\'r\'));I.X(\'1g:\'+U.$h.B(\'1g\'));I.X(\'q:\'+M(U.$h,\'q\')+\'v\');I.X(\'1h:\'+24(1i(U.$h)));U.$h.B({position:\'static\',1g:0,1h:\'25\'});z I}k M(h,2w){p I=h.B(2w);z 2x(I)}k 2x(1D){p 2y=1D.indexOf(\'v\')>-1?G(1D.N(\'v\')[0]):G(1D);z 2y}k 1i(h){p u=h.B(\'1h\')===\'25\'?\'2z(1, 0, 0, 1, 0, 0)\':h.B(\'1h\');u=u.26(\'2z\',\'\');u=u.26(\'(\',\'\');u=u.26(\')\',\'\');u=u.N(\',\');z 2A(u[0],u[1],u[2],u[3],u[4],u[5])}k 2A(a,b,c,d,e,f){p Y=0;p aa=14(P*1z(a)/pi),bb=14(P*1A(b)/pi),cc=14(P*1z(c)/pi),dd=14(P*1A(d)/pi);9(aa===bb||-aa===bb){Y=dd}A 9(-aa+bb===P){Y=P+cc}A 9(aa+bb===P){Y=1l-cc||1l-dd}z Y>=1l?0:Y}k 24(1m){1m=1m===\'25\'?0:1m;z\'rotateZ(\'+1m+\'Y)\'}k docUnbing(){9($(\'.l-j\').1E===0){$1S.Z(1T).Z(1U).Z(1x)}}$.fn.l=k(7){p 6=C;setTimeout(k(){z new l(6,7)},0)};p l=k(h,7){p 6=C;6.h=h;6.$h=$(6.h);9(!!2r(7)&&(7==="1F"||7==="1G")){2B(7){D\'1F\':6.1F();E;D\'1G\':6.1G();E}z}6.7=7||{};6.7.J=!1e(6.7.J)?1:6.7.J;6.7.29=6.7.29===18?18:1H;6.7.10=!1e(6.7.10)?20:6.7.10;6.7.1n=!1e(6.7.1n)?20:6.7.1n;6.7.1o=6.7.1o===18;6.7.1I=1f(6.7.1I)?6.7.1I:k(){};6.7.1J=1f(6.7.1J)?6.7.1J:k(){};6.7.1p=1f(6.7.1p)?6.7.1p:k(){};6.7.1K=1f(6.7.1K)?6.7.1K:k(){};6.w={};6.1L=1H;6.m={g:0,8:0,r:0,q:0,u:0};6.2C();6.2D();6.7.1J.1q(6.h[0]);9(!!6.7.1o){p H={J:6.7.J};$.2E(H,6.m);6.7.1p.1q(6.h[0],H)}};l.prototype={2C:k(){p 6=C;p 2F=\'<s F="l-1r" K-t="1Y"><s F="l-Q 1y" K-t="1y"></s><s F="l-Q lt" K-t="lt"></s><s F="l-Q tc" K-t="tc"></s><s F="l-Q V" K-t="V"></s><s F="l-Q S" K-t="S"></s><s F="l-Q lc" K-t="lc"></s><s F="l-Q rc" K-t="rc"></s><s F="l-Q bc" K-t="bc"></s><s F="l-Q W" K-t="W"></s></s>\',2G=6.7.1o?\'1s\':\'\';6.m.g=M(6.$h,\'g\');6.m.8=M(6.$h,\'8\');6.m.r=M(6.$h,\'r\');6.m.q=M(6.$h,\'q\');6.m.q=M(6.$h,\'q\');6.m.1g=M(6.$h,\'1g\');9(6.7.1o){$(1w).2a(\'1s\')}9(6.$h.1t(\'.l-j\').1E===0&&6.$h.1t(\'.l-1u\').1E===0){6.$h.j(\'<s F="l-j \'+2G+\'" I="\'+2v(6).join(\';\')+\'"></s>\').j(\'<s F="l-1u"></s>\')}6.$h.2H(\'l\',\'l\');6.w.$j=6.$h.1t(\'.l-j\');6.w.$1u=6.w.$j.1M(\'.l-1u\');9(6.w.$j.1M(\'.l-1r\').1E===0){6.w.$j.append(2F)}6.w.$1r=6.w.$j.1M(\'.l-1r\')},2D:k(){p 6=C;6.w.$j.on(2k,$.1C(6.1V,6)).on(1x,k(e){e.stopPropagation();p 2I=C;9(6.i){$(1w).2a(\'1s\');$(2I).addClass(\'1s\');p H={J:6.7.J,g:G(6.w.$j.B(\'g\').N(\'v\')[0]),8:G(6.w.$j.B(\'8\').N(\'v\')[0]),q:G(6.w.$j.B(\'q\').N(\'v\')[0]),r:G(6.w.$j.B(\'r\').N(\'v\')[0]),u:1i(6.w.$j)};6.7.1p.1q(6.h[0],H)}});$1S.on(1T,(6._dragmove=1C(6.1W,6))).on(1U,(6._dragend=1C(6.1X,6))).on(1x,k(e){9(!6.i&&!!6.7.29){$(1w).2a(\'1s\');6.7.1K.1q(6.h[0])}})},1V:k(R){p 6=C;p e=R,O=e.O,i,1N;i=i||$(e.target).2H(\'K-t\');9(!!2q.test(i)){R.2b();1N=$.2c(2n,{O:O,i:i});6.$h.2d(1N);9(!!1N.2e()){z}6.i=i;6.1O=e.2J;6.1P=e.2K}},1W:k(R){p 6=C;p e=R,O=e.O,i=6.i,1Q;9(!!i){R.2b();1Q=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=0}E;D\'S\':g-=o.x;r+=o.x;8+=o.y;9(g<0&&8<0){i=\'V\';8=0;g=0}A 9(g<0){i=\'W\';g=0}A 9(8<0){i=\'S\';8=0}E;D\'lc\':g-=o.x;r+=o.x;9(g<0){i=\'rc\';g=0}E;D\'1y\':9(o.x&&o.y){p 2i=0,2j=0,cx=g/2,cy=8/2,ox,oy,L;T=$j.T();2i=6.1O-T.r;2j=6.1P-T.q;ox=2i-cx;oy=2j-cy;L=21(1Z(ox/oy))/(2*pi)*1l;9(ox<0&&oy<0){L=-L}A 9(ox<0&&oy>0){L=-(P-L)}A 9(ox>0&&oy<0){L=L}A 9(ox>0&&oy>0){L=P-L}u=L}E}9(2h){m.g=g;m.8=8;m.r=r;m.q=q;m.u=u;6.i=i;6.2O()}6.1O=6.2f;6.1P=6.2g},2O:k(){p 6=C;p 2P=6.2P,7=6.7,$j=6.w.$j,m=6.m;m.g=m.g<=7.1n?7.1n:m.g;m.8=m.8<=7.10?7.10:m.8;$j.B({g:m.g+\'v\',8:m.8+\'v\',q:m.q+\'v\',r:m.r+\'v\',1h:24(m.u)});6.$h.B({g:m.g+\'v\',8:m.8+\'v\',q:m.q+\'v\',r:m.r+\'v\'})},1F:k(){p 6=C;6.$h.removeAttr(\'l\');6.$h.Z(19);6.$h.1t(\'.l-j\').Z().1M(\'.l-1r\').2Q();6.$h.2R(\'.l-1u\').2R(\'.l-j\')},1G:k(){p 6=C;6.$h.Z().1t(\'.l-j\').Z().2Q()}}}(window.jQuery));',[],178,'||||||that|options|height|if|||||||width|element|dragType|wrap|function|hzCropper|cropBox||range|var|top|left|div|drap|rotate|px|dom|||return|else|css|this|case|break|class|pfloat|obj|style|index|hz|angle|getStyleNun|split|originalEvent|180|handle|event|lb|offset|data|rt|rb|push|deg|off|minHeight||||round|Math||args|true|event_drag|||||isNumber|isFunction|margin|transform|getRotateStyle|||360|degree|minWidth|isSelect|onSelect|call|inner|active|closest|contain||wrap_class|event_mouse_select|rotates|asin|acos|typeof|proxy|num|length|destroy|removes|false|result|ready|noChoice|isDrap|find|dragStartEvent|startX|startY|dragMoveEvent|dragEndEvent|doc|event_mouse_move|event_mouse_up|dragstart|dragmove|dragend|move|abs||atan|toArray||getRotateValue|none|replace|||atuoOut|removeClass|preventDefault|Event|trigger|isDefaultPrevented|endX|endY|renderable|mouseX|mouseY|event_mouse_down|mousedown|touchstart|event_drag_start|event_drag_move|event_drag_end|regexp_drap_types|isString|apply|context|arguments|getStyle|type|removePx|numns|matrix|getRotateNum|switch|setHtml|addListeners|extend|html|className|attr|_this|pageX|pageY|change|||renderCropBox|container|remove|unwrap'.split('|'),0,{}))