From 9453b1e4ec0844dd13c8e19cbcce02172e6cb5d6 Mon Sep 17 00:00:00 2001 From: JackPu Date: Sat, 4 Mar 2017 21:56:10 +0800 Subject: [PATCH] update new logo --- README-ZH.md | 1 - package.json | 2 +- react-core-image-upload.js | 6 +++--- src/components/footer.js | 8 ++++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README-ZH.md b/README-ZH.md index c36bd71..6f0978d 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -11,7 +11,6 @@ [English Doc]('./README.md') - ### 快速开始 使用 npm ```bash diff --git a/package.json b/package.json index e99d6e6..80125c2 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "babel-preset-react": "^6.16.0", "browserify": "^13.1.0", "enzyme": "^2.5.1", - "eslint": "^3.16.1", + "eslint": "^3.17.0", "eslint-config-airbnb": "^14.1.0", "eslint-plugin-import": "^2.2.0", "eslint-plugin-jsx-a11y": "^4.0.0", diff --git a/react-core-image-upload.js b/react-core-image-upload.js index 9ae3494..68c3c2a 100644 --- a/react-core-image-upload.js +++ b/react-core-image-upload.js @@ -1,5 +1,5 @@ !function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(1),n(75),t.exports=n(76)},function(t,e,n){(function(t){function e(t,e){return"info"===h&&"info"===t?console.log(e):["info","warning"].indexOf(h)>=0&&"warning"===t?console.warn(e):["info","warning","error"].indexOf(h)>=0&&"error"===t?console.error(e):void 0}function o(){c?(e("info","[WDS] App hot update..."),window.postMessage("webpackHotUpdate"+u,"*")):(e("info","[WDS] App updated. Reloading..."),window.location.reload())}var r,i=n(2),s=n(8),a=n(10);r=i.parse(t.substr(1));var c=!1,l=!0,u="",h="info",p={hot:function(){c=!0,e("info","[WDS] Hot Module Replacement enabled.")},invalid:function(){e("info","[WDS] App updated. Recompiling...")},hash:function(t){u=t},"still-ok":function(){e("info","[WDS] Nothing changed.")},"log-level":function(t){h=t},ok:function(){return l?l=!1:void o()},warnings:function(t){e("info","[WDS] Warnings while compiling.");for(var n=0;n",'"',"`"," ","\r","\n","\t"],g=["{","}","|","\\","^","`"].concat(m),v=["'"].concat(g),b=["%","/","?",";","#"].concat(v),y=["/","?","#"],x=255,E=/^[a-z0-9A-Z_-]{0,63}$/,w=/^([a-z0-9A-Z_-]{0,63})(.*)$/,A={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},T={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},R=n(5);o.prototype.parse=function(t,e,n){if(!c(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t;o=o.trim();var r=f.exec(o);if(r){r=r[0];var i=r.toLowerCase();this.protocol=i,o=o.substr(r.length)}if(n||r||o.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===o.substr(0,2);!s||r&&S[r]||(o=o.substr(2),this.slashes=!0)}if(!S[r]&&(s||r&&!T[r])){for(var a=-1,l=0;l127?"x":C[k];if(!I.match(E)){var D=g.slice(0,l),N=g.slice(l+1),U=C.match(w);U&&(D.push(U[1]),N.unshift(U[2])),N.length&&(o="/"+N.join(".")+o),this.hostname=D.join(".");break}}}if(this.hostname.length>x?this.hostname="":this.hostname=this.hostname.toLowerCase(),!m){for(var L=this.hostname.split("."),M=[],l=0;l0)&&n.host.split("@");g&&(n.auth=g.shift(),n.host=n.hostname=g.shift())}return n.search=t.search,n.query=t.query,u(n.pathname)&&u(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!d.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var v=d.slice(-1)[0],b=(n.host||t.host)&&("."===v||".."===v)||""===v,y=0,x=d.length;x>=0;x--)v=d[x],"."==v?d.splice(x,1):".."===v?(d.splice(x,1),y++):y&&(d.splice(x,1),y--);if(!p&&!f)for(;y--;y)d.unshift("..");!p||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),b&&"/"!==d.join("/").substr(-1)&&d.push("");var E=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(m){n.hostname=n.host=E?"":d.length?d.shift():"";var g=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");g&&(n.auth=g.shift(),n.host=n.hostname=g.shift())}return p=p||n.host&&d.length,p&&!E&&d.unshift(""),d.length?n.pathname=d.join("/"):(n.pathname=null,n.path=null),u(n.pathname)&&u(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=d.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){var o;(function(t,r){!function(i){function s(t){throw RangeError(D[t])}function a(t,e){for(var n=t.length,o=[];n--;)o[n]=e(t[n]);return o}function c(t,e){var n=t.split("@"),o="";n.length>1&&(o=n[0]+"@",t=n[1]),t=t.replace(j,".");var r=t.split("."),i=a(r,e).join(".");return o+i}function l(t){for(var e,n,o=[],r=0,i=t.length;r=55296&&e<=56319&&r65535&&(t-=65536,e+=L(t>>>10&1023|55296),t=56320|1023&t),e+=L(t)}).join("")}function h(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:E}function p(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,n){var o=0;for(t=n?U(t/T):t>>1,t+=U(t/e);t>N*A>>1;o+=E)t=U(t/N);return U(o+(N+1)*t/(t+S))}function d(t){var e,n,o,r,i,a,c,l,p,d,m=[],g=t.length,v=0,b=O,y=R;for(n=t.lastIndexOf(C),n<0&&(n=0),o=0;o=128&&s("not-basic"),m.push(t.charCodeAt(o));for(r=n>0?n+1:0;r=g&&s("invalid-input"),l=h(t.charCodeAt(r++)),(l>=E||l>U((x-v)/a))&&s("overflow"),v+=l*a,p=c<=y?w:c>=y+A?A:c-y,!(lU(x/d)&&s("overflow"),a*=d;e=m.length+1,y=f(v-i,e,0==i),U(v/e)>x-b&&s("overflow"),b+=U(v/e),v%=e,m.splice(v++,0,b)}return u(m)}function m(t){var e,n,o,r,i,a,c,u,h,d,m,g,v,b,y,S=[];for(t=l(t),g=t.length,e=O,n=0,i=R,a=0;a=e&&mU((x-n)/v)&&s("overflow"),n+=(c-e)*v,e=c,a=0;ax&&s("overflow"),m==e){for(u=n,h=E;d=h<=i?w:h>=i+A?A:h-i,!(u= 0x80 (not a basic code point)","invalid-input":"Invalid input"},N=E-w,U=Math.floor,L=String.fromCharCode;y={version:"1.3.2",ucs2:{decode:l,encode:u},decode:d,encode:m,toASCII:v,toUnicode:g},o=function(){return y}.call(e,n,e,t),!(void 0!==o&&(t.exports=o))}(this)}).call(e,n(4)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){"use strict";e.decode=e.parse=n(6),e.encode=e.stringify=n(7)},function(t,e){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,o,r){e=e||"&",o=o||"=";var i={};if("string"!=typeof t||0===t.length)return i;var s=/\+/g;t=t.split(e);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var c=t.length;a>0&&c>a&&(c=a);for(var l=0;l=0?(u=d.substr(0,m),h=d.substr(m+1)):(u=d,h=""),p=decodeURIComponent(u),f=decodeURIComponent(h),n(i,p)?Array.isArray(i[p])?i[p].push(f):i[p]=[i[p],f]:i[p]=f}return i}},function(t,e){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,o,r){return e=e||"&",o=o||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(r){var i=encodeURIComponent(n(r))+o;return Array.isArray(t[r])?t[r].map(function(t){return i+encodeURIComponent(n(t))}).join(e):i+encodeURIComponent(n(t[r]))}).join(e):r?encodeURIComponent(n(r))+o+encodeURIComponent(n(t)):""}},function(t,e,n){"use strict";var o=n(9)();t.exports=function(t){return"string"==typeof t?t.replace(o,""):t}},function(t,e){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g}},function(t,e,n){function o(t,e){s=new r(t),s.onopen=function(){i=0},s.onclose=function(){if(0===i&&e.close(),s=null,i<=10){var n=1e3*Math.pow(2,i)+100*Math.random();i+=1,setTimeout(function(){o(t,e)},n)}},s.onmessage=function(t){var n=JSON.parse(t.data);e[n.type]&&e[n.type](n.data)}}var r=n(11),i=0,s=null;t.exports=o},function(t,e,n){(function(e){"use strict";var o=n(12);t.exports=n(59)(o),"_sockjs_onload"in e&&setTimeout(e._sockjs_onload,1)}).call(e,function(){return this}())},function(t,e,n){"use strict";t.exports=[n(13),n(30),n(40),n(42),n(45)(n(42)),n(52),n(45)(n(52)),n(54),n(55),n(45)(n(54)),n(56)]},function(t,e,n){(function(e){"use strict";function o(t,e,n){if(!o.enabled())throw new Error("Transport created when disabled");a.call(this),l("constructor",t);var s=this,u=i.addPath(t,"/websocket");u="https"===u.slice(0,5)?"wss"+u.slice(5):"ws"+u.slice(4),this.url=u,this.ws=new c(this.url,[],n),this.ws.onmessage=function(t){l("message event",t.data),s.emit("message",t.data)},this.unloadRef=r.unloadAdd(function(){l("unload"),s.ws.close()}),this.ws.onclose=function(t){l("close event",t.code,t.reason),s.emit("close",t.code,t.reason),s._cleanup()},this.ws.onerror=function(t){l("error event",t),s.emit("close",1006,"WebSocket connection broken"),s._cleanup()}}var r=n(15),i=n(18),s=n(26),a=n(27).EventEmitter,c=n(29),l=function(){};"production"!==e.env.NODE_ENV&&(l=n(23)("sockjs-client:websocket")),s(o,a),o.prototype.send=function(t){var e="["+t+"]";l("send",e),this.ws.send(e)},o.prototype.close=function(){l("close"),this.ws&&this.ws.close(),this._cleanup()},o.prototype._cleanup=function(){l("_cleanup");var t=this.ws;t&&(t.onmessage=t.onclose=t.onerror=null),r.unloadDel(this.unloadRef),this.unloadRef=this.ws=null,this.removeAllListeners()},o.enabled=function(){return l("enabled"),!!c},o.transportName="websocket",o.roundTrips=2,t.exports=o}).call(e,n(14))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function r(t){if(u===setTimeout)return setTimeout(t,0);if((u===n||!u)&&setTimeout)return u=setTimeout,setTimeout(t,0);try{return u(t,0)}catch(e){try{return u.call(null,t,0)}catch(e){return u.call(this,t,0)}}}function i(t){if(h===clearTimeout)return clearTimeout(t);if((h===o||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){m&&f&&(m=!1,f.length?d=f.concat(d):g=-1,d.length&&a())}function a(){if(!m){var t=r(s);m=!0;for(var e=d.length;e;){for(f=d,d=[];++g1)for(var n=1;n=31}function r(){var t=arguments,n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return t;var o="color: "+this.color;t=[t[0],o,"color: inherit"].concat(Array.prototype.slice.call(t,1));var r=0,i=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(r++,"%c"===t&&(i=r))}),t.splice(i,0,o),t}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(n){}}function a(){var t;try{t=e.storage.debug}catch(n){}return t}function c(){try{return window.localStorage}catch(t){}}e=t.exports=n(24),e.log=i,e.formatArgs=r,e.save=s,e.load=a,e.useColors=o,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){return JSON.stringify(t)},e.enable(a())},function(t,e,n){function o(){return e.colors[u++%e.colors.length]}function r(t){function n(){}function r(){var t=r,n=+new Date,i=n-(l||n);t.diff=i,t.prev=l,t.curr=n,l=n,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=o());var s=Array.prototype.slice.call(arguments);s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(n,o){if("%%"===n)return n;a++;var r=e.formatters[o];if("function"==typeof r){var i=s[a];n=r.call(t,i),s.splice(a,1),a--}return n}),"function"==typeof e.formatArgs&&(s=e.formatArgs.apply(t,s));var c=r.log||e.log||console.log.bind(console);c.apply(t,s)}n.enabled=!1,r.enabled=!0;var i=e.enabled(t)?r:n;return i.namespace=t,i}function i(t){e.save(t);for(var n=(t||"").split(/[\s,]+/),o=n.length,r=0;r1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),o=(e[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return n*u;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"hrs":case"hr":case"h":return n*c;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}}}function o(t){return t>=l?Math.round(t/l)+"d":t>=c?Math.round(t/c)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function r(t){return i(t,l,"day")||i(t,c,"hour")||i(t,a,"minute")||i(t,s,"second")||t+" ms"}function i(t,e,n){if(!(t1?this._listeners[t]=n.slice(0,o).concat(n.slice(o+1)):delete this._listeners[t]):void 0}},n.prototype.dispatchEvent=function(){var t=arguments[0],e=t.type,n=1===arguments.length?[t]:Array.apply(null,arguments);if(this["on"+e]&&this["on"+e].apply(this,n),e in this._listeners)for(var o=this._listeners[e],r=0;r0){var e="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,e,function(e){t.sendStop=null,e?(s("error",e),t.emit("close",e.code||1006,"Sending error: "+e),t._cleanup()):t.sendScheduleWait()}),this.sendBuffer=[]}},o.prototype._cleanup=function(){s("_cleanup"),this.removeAllListeners()},o.prototype.stop=function(){s("stop"),this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},t.exports=o}).call(e,n(14))},function(t,e,n){(function(e){"use strict";function o(t,e,n){s(e),i.call(this),this.Receiver=t,this.receiveUrl=e,this.AjaxObject=n,this._scheduleReceiver()}var r=n(26),i=n(27).EventEmitter,s=function(){};"production"!==e.env.NODE_ENV&&(s=n(23)("sockjs-client:polling")),r(o,i),o.prototype._scheduleReceiver=function(){s("_scheduleReceiver");var t=this,e=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);e.on("message",function(e){s("message",e),t.emit("message",e)}),e.once("close",function(n,o){s("close",n,o,t.pollIsClosing),t.poll=e=null,t.pollIsClosing||("network"===o?t._scheduleReceiver():(t.emit("close",n||1006,o),t.removeAllListeners()))})},o.prototype.abort=function(){s("abort"),this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},t.exports=o}).call(e,n(14))},function(t,e,n){(function(e){"use strict";function o(t,e){s(t),i.call(this);var n=this;this.bufferPosition=0,this.xo=new e("POST",t,null), this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(t,e){s("finish",t,e),n._chunkHandler(t,e),n.xo=null;var o=200===t?"network":"permanent";s("close",o),n.emit("close",null,o),n._cleanup()})}var r=n(26),i=n(27).EventEmitter,s=function(){};"production"!==e.env.NODE_ENV&&(s=n(23)("sockjs-client:receiver:xhr")),r(o,i),o.prototype._chunkHandler=function(t,e){if(s("_chunkHandler",t),200===t&&e)for(var n=-1;;this.bufferPosition+=n+1){var o=e.slice(this.bufferPosition);if(n=o.indexOf("\n"),n===-1)break;var r=o.slice(0,n);r&&(s("message",r),this.emit("message",r))}},o.prototype._cleanup=function(){s("_cleanup"),this.removeAllListeners()},o.prototype.abort=function(){s("abort"),this.xo&&(this.xo.close(),s("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()},t.exports=o}).call(e,n(14))},function(t,e,n){"use strict";function o(t,e,n,o){i.call(this,t,e,n,o)}var r=n(26),i=n(37);r(o,i),o.enabled=i.enabled&&i.supportsCORS,t.exports=o},function(t,e,n){(function(e,o){"use strict";function r(t,e,n,o){u(t,e);var r=this;i.call(this),setTimeout(function(){r._start(t,e,n,o)},0)}var i=n(27).EventEmitter,s=n(26),a=n(15),c=n(18),l=e.XMLHttpRequest,u=function(){};"production"!==o.env.NODE_ENV&&(u=n(23)("sockjs-client:browser:xhr")),s(r,i),r.prototype._start=function(t,e,n,o){var i=this;try{this.xhr=new l}catch(s){}if(!this.xhr)return u("no xhr"),this.emit("finish",0,"no xhr support"),void this._cleanup();e=c.addQuery(e,"t="+ +new Date),this.unloadRef=a.unloadAdd(function(){u("unload cleanup"),i._cleanup(!0)});try{this.xhr.open(t,e,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){u("xhr timeout"),i.emit("finish",0,""),i._cleanup(!1)})}catch(h){return u("exception",h),this.emit("finish",0,""),void this._cleanup(!1)}if(o&&o.noCredentials||!r.supportsCORS||(u("withCredentials"),this.xhr.withCredentials="true"),o&&o.headers)for(var p in o.headers)this.xhr.setRequestHeader(p,o.headers[p]);this.xhr.onreadystatechange=function(){if(i.xhr){var t,e,n=i.xhr;switch(u("readyState",n.readyState),n.readyState){case 3:try{e=n.status,t=n.responseText}catch(o){}u("status",e),1223===e&&(e=204),200===e&&t&&t.length>0&&(u("chunk"),i.emit("chunk",e,t));break;case 4:e=n.status,u("status",e),1223===e&&(e=204),12005!==e&&12029!==e||(e=0),u("finish",e,n.responseText),i.emit("finish",e,n.responseText),i._cleanup(!1)}}};try{i.xhr.send(n)}catch(h){i.emit("finish",0,""),i._cleanup(!1)}},r.prototype._cleanup=function(t){if(u("cleanup"),this.xhr){if(this.removeAllListeners(),a.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),t)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},r.prototype.close=function(){u("close"),this._cleanup(!0)},r.enabled=!!l;var h=["Active"].concat("Object").join("X");!r.enabled&&h in e&&(u("overriding xmlhttprequest"),l=function(){try{return new e[h]("Microsoft.XMLHTTP")}catch(t){return null}},r.enabled=!!new l);var p=!1;try{p="withCredentials"in new l}catch(f){}r.supportsCORS=p,t.exports=r}).call(e,function(){return this}(),n(14))},function(t,e,n){"use strict";function o(t,e,n){i.call(this,t,e,n,{noCredentials:!0})}var r=n(26),i=n(37);r(o,i),o.enabled=i.enabled,t.exports=o},function(t,e){(function(e){"use strict";t.exports={isOpera:function(){return e.navigator&&/opera/i.test(e.navigator.userAgent)},isKonqueror:function(){return e.navigator&&/konqueror/i.test(e.navigator.userAgent)},hasDomain:function(){if(!e.document)return!0;try{return!!e.document.domain}catch(t){return!1}}}}).call(e,function(){return this}())},function(t,e,n){"use strict";function o(t){if(!a.enabled)throw new Error("Transport created when disabled");i.call(this,t,"/xhr_streaming",s,a)}var r=n(26),i=n(31),s=n(35),a=n(41);r(o,i),o.enabled=function(t){return!t.cookie_needed&&!t.nullOrigin&&(a.enabled&&t.sameScheme)},o.transportName="xdr-streaming",o.roundTrips=2,t.exports=o},function(t,e,n){(function(e,o){"use strict";function r(t,e,n){u(t,e);var o=this;i.call(this),setTimeout(function(){o._start(t,e,n)},0)}var i=n(27).EventEmitter,s=n(26),a=n(15),c=n(39),l=n(18),u=function(){};"production"!==e.env.NODE_ENV&&(u=n(23)("sockjs-client:sender:xdr")),s(r,i),r.prototype._start=function(t,e,n){u("_start");var r=this,i=new o.XDomainRequest;e=l.addQuery(e,"t="+ +new Date),i.onerror=function(){u("onerror"),r._error()},i.ontimeout=function(){u("ontimeout"),r._error()},i.onprogress=function(){u("progress",i.responseText),r.emit("chunk",200,i.responseText)},i.onload=function(){u("load"),r.emit("finish",200,i.responseText),r._cleanup(!1)},this.xdr=i,this.unloadRef=a.unloadAdd(function(){r._cleanup(!0)});try{this.xdr.open(t,e),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(n)}catch(s){this._error()}},r.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},r.prototype._cleanup=function(t){if(u("cleanup",t),this.xdr){if(this.removeAllListeners(),a.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,t)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},r.prototype.close=function(){u("close"),this._cleanup(!0)},r.enabled=!(!o.XDomainRequest||!c.hasDomain()),t.exports=r}).call(e,n(14),function(){return this}())},function(t,e,n){"use strict";function o(t){if(!o.enabled())throw new Error("Transport created when disabled");i.call(this,t,"/eventsource",s,a)}var r=n(26),i=n(31),s=n(43),a=n(36),c=n(44);r(o,i),o.enabled=function(){return!!c},o.transportName="eventsource",o.roundTrips=2,t.exports=o},function(t,e,n){(function(e){"use strict";function o(t){a(t),i.call(this);var e=this,n=this.es=new s(t);n.onmessage=function(t){a("message",t.data),e.emit("message",decodeURI(t.data))},n.onerror=function(t){a("error",n.readyState,t);var o=2!==n.readyState?"network":"permanent";e._cleanup(),e._close(o)}}var r=n(26),i=n(27).EventEmitter,s=n(44),a=function(){};"production"!==e.env.NODE_ENV&&(a=n(23)("sockjs-client:receiver:eventsource")),r(o,i),o.prototype.abort=function(){a("abort"),this._cleanup(),this._close("user")},o.prototype._cleanup=function(){a("cleanup");var t=this.es;t&&(t.onmessage=t.onerror=null,t.close(),this.es=null)},o.prototype._close=function(t){a("close",t);var e=this;setTimeout(function(){e.emit("close",null,t),e.removeAllListeners()},200)},t.exports=o}).call(e,n(14))},function(t,e){(function(e){t.exports=e.EventSource}).call(e,function(){return this}())},function(t,e,n){(function(e){"use strict";var o=n(26),r=n(46),i=n(51);t.exports=function(t){function n(e,n){r.call(this,t.transportName,e,n)}return o(n,r),n.enabled=function(n,o){if(!e.document)return!1;var s=i.extend({},o);return s.sameOrigin=!0,t.enabled(s)&&r.enabled()},n.transportName="iframe-"+t.transportName,n.needBody=!0,n.roundTrips=r.roundTrips+t.roundTrips-1,n.facadeTransport=t,n}}).call(e,function(){return this}())},function(t,e,n){(function(e){"use strict";function o(t,e,n){if(!o.enabled())throw new Error("Transport created when disabled");s.call(this);var r=this;this.origin=c.getOrigin(n),this.baseUrl=n,this.transUrl=e,this.transport=t,this.windowId=h.string(8);var i=c.addPath(n,"/iframe.html")+"#"+this.windowId;p(t,e,i),this.iframeObj=l.createIframe(i,function(t){p("err callback"),r.emit("close",1006,"Unable to load an iframe ("+t+")"),r.close()}),this.onmessageCallback=this._message.bind(this),u.attachEvent("message",this.onmessageCallback)}var r=n(26),i=n(47),s=n(27).EventEmitter,a=n(49),c=n(18),l=n(50),u=n(15),h=n(16),p=function(){};"production"!==e.env.NODE_ENV&&(p=n(23)("sockjs-client:transport:iframe")),r(o,s),o.prototype.close=function(){if(p("close"),this.removeAllListeners(),this.iframeObj){u.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(t){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},o.prototype._message=function(t){if(p("message",t.data),!c.isOriginEqual(t.origin,this.origin))return void p("not same origin",t.origin,this.origin);var e;try{e=i.parse(t.data)}catch(n){return void p("bad json",t.data)}if(e.windowId!==this.windowId)return void p("mismatched window id",e.windowId,this.windowId);switch(e.type){case"s":this.iframeObj.loaded(),this.postMessage("s",i.stringify([a,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",e.data);break;case"c":var o;try{o=i.parse(e.data)}catch(n){return void p("bad json",e.data)}this.emit("close",o[0],o[1]),this.close()}},o.prototype.postMessage=function(t,e){p("postMessage",t,e),this.iframeObj.post(i.stringify({windowId:this.windowId,type:t,data:e||""}),this.origin)},o.prototype.send=function(t){p("send",t),this.postMessage("m",t)},o.enabled=function(){return l.iframeEnabled},o.transportName="iframe",o.roundTrips=2,t.exports=o}).call(e,n(14))},function(t,e,n){var o;(function(t,r){(function(){function i(t,e){function n(t){if(n[t]!==g)return n[t];var i;if("bug-string-char-index"==t)i="a"!="a"[0];else if("json"==t)i=n("json-stringify")&&n("json-parse");else{var s,a='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var l=e.stringify,u="function"==typeof l&&y;if(u){(s=function(){return 1}).toJSON=s;try{u="0"===l(0)&&"0"===l(new o)&&'""'==l(new r)&&l(b)===g&&l(g)===g&&l()===g&&"1"===l(s)&&"[1]"==l([s])&&"[null]"==l([g])&&"null"==l(null)&&"[null,null,null]"==l([g,b,null])&&l({a:[s,!0,!1,null,"\0\b\n\f\r\t"]})==a&&"1"===l(null,s)&&"[\n 1,\n 2\n]"==l([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==l(new c((-864e13)))&&'"+275760-09-13T00:00:00.000Z"'==l(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==l(new c((-621987552e5)))&&'"1969-12-31T23:59:59.999Z"'==l(new c((-1)))}catch(h){u=!1}}i=u}if("json-parse"==t){var p=e.parse;if("function"==typeof p)try{if(0===p("0")&&!p(!1)){s=p(a);var f=5==s.a.length&&1===s.a[0];if(f){try{f=!p('"\t"')}catch(h){}if(f)try{f=1!==p("01")}catch(h){}if(f)try{f=1!==p("1.")}catch(h){}}}}catch(h){f=!1}i=f}}return n[t]=!!i}t||(t=l.Object()),e||(e=l.Object());var o=t.Number||l.Number,r=t.String||l.String,s=t.Object||l.Object,c=t.Date||l.Date,u=t.SyntaxError||l.SyntaxError,h=t.TypeError||l.TypeError,p=t.Math||l.Math,f=t.JSON||l.JSON;"object"==typeof f&&f&&(e.stringify=f.stringify,e.parse=f.parse);var d,m,g,v=s.prototype,b=v.toString,y=new c((-0xc782b5b800cec));try{y=y.getUTCFullYear()==-109252&&0===y.getUTCMonth()&&1===y.getUTCDate()&&10==y.getUTCHours()&&37==y.getUTCMinutes()&&6==y.getUTCSeconds()&&708==y.getUTCMilliseconds()}catch(x){}if(!n("json")){var E="[object Function]",w="[object Date]",A="[object Number]",S="[object String]",T="[object Array]",R="[object Boolean]",O=n("bug-string-char-index");if(!y)var C=p.floor,I=[0,31,59,90,120,151,181,212,243,273,304,334],k=function(t,e){return I[e]+365*(t-1970)+C((t-1969+(e=+(e>1)))/4)-C((t-1901+e)/100)+C((t-1601+e)/400)};if((d=v.hasOwnProperty)||(d=function(t){var e,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=b?d=function(t){var e=this.__proto__,n=t in(this.__proto__=null,this);return this.__proto__=e,n}:(e=n.constructor,d=function(t){var n=(this.constructor||e).prototype;return t in this&&!(t in n&&this[t]===n[t])}),n=null,d.call(this,t)}),m=function(t,e){var n,o,r,i=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,o=new n;for(r in o)d.call(o,r)&&i++;return n=o=null,i?m=2==i?function(t,e){var n,o={},r=b.call(t)==E;for(n in t)r&&"prototype"==n||d.call(o,n)||!(o[n]=1)||!d.call(t,n)||e(n)}:function(t,e){var n,o,r=b.call(t)==E;for(n in t)r&&"prototype"==n||!d.call(t,n)||(o="constructor"===n)||e(n);(o||d.call(t,n="constructor"))&&e(n)}:(o=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(t,e){var n,r,i=b.call(t)==E,s=!i&&"function"!=typeof t.constructor&&a[typeof t.hasOwnProperty]&&t.hasOwnProperty||d;for(n in t)i&&"prototype"==n||!s.call(t,n)||e(n);for(r=o.length;n=o[--r];s.call(t,n)&&e(n));}),m(t,e)},!n("json-stringify")){var j={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},D="000000",N=function(t,e){return(D+(e||0)).slice(-t)},U="\\u00",L=function(t){for(var e='"',n=0,o=t.length,r=!O||o>10,i=r&&(O?t.split(""):t);n-1/0&&a<1/0){if(k){for(p=C(a/864e5),l=C(p/365.2425)+1970-1;k(l+1,0)<=p;l++);for(u=C((p-k(l,0))/30.42);k(l,u+1)<=p;u++);p=1+p-k(l,u),f=(a%864e5+864e5)%864e5,v=C(f/36e5)%24,y=C(f/6e4)%60,x=C(f/1e3)%60,E=f%1e3}else l=a.getUTCFullYear(),u=a.getUTCMonth(),p=a.getUTCDate(),v=a.getUTCHours(),y=a.getUTCMinutes(),x=a.getUTCSeconds(),E=a.getUTCMilliseconds();a=(l<=0||l>=1e4?(l<0?"-":"+")+N(6,l<0?-l:l):N(4,l))+"-"+N(2,u+1)+"-"+N(2,p)+"T"+N(2,v)+":"+N(2,y)+":"+N(2,x)+"."+N(3,E)+"Z"}else a=null;if(n&&(a=n.call(e,t,a)),null===a)return"null";if(c=b.call(a),c==R)return""+a;if(c==A)return a>-1/0&&a<1/0?""+a:"null";if(c==S)return L(""+a);if("object"==typeof a){for(D=s.length;D--;)if(s[D]===a)throw h();if(s.push(a),O=[],U=i,i+=r,c==T){for(j=0,D=a.length;j0)for(o="",n>10&&(n=10);o.length=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70||Q();t+=Z("0x"+i.slice(e,J));break;default:Q()}else{if(34==r)break;for(r=i.charCodeAt(J),e=J;r>=32&&92!=r&&34!=r;)r=i.charCodeAt(++J);t+=i.slice(e,J)}if(34==i.charCodeAt(J))return J++,t;Q();default:if(e=J,45==r&&(o=!0,r=i.charCodeAt(++J)),r>=48&&r<=57){for(48==r&&(r=i.charCodeAt(J+1),r>=48&&r<=57)&&Q(),o=!1;J=48&&r<=57);J++);if(46==i.charCodeAt(J)){for(n=++J;n=48&&r<=57);n++);n==J&&Q(),J=n}if(r=i.charCodeAt(J),101==r||69==r){for(r=i.charCodeAt(++J),43!=r&&45!=r||J++,n=J;n=48&&r<=57);n++);n==J&&Q(),J=n}return+i.slice(e,J)}if(o&&Q(),"true"==i.slice(J,J+4))return J+=4,!0;if("false"==i.slice(J,J+5))return J+=5,!1;if("null"==i.slice(J,J+4))return J+=4,null;Q()}return"$"},Y=function(t){var e,n;if("$"==t&&Q(),"string"==typeof t){if("@"==(O?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=W(),"]"!=t;n||(n=!0))n&&(","==t?(t=W(),"]"==t&&Q()):Q()),","==t&&Q(),e.push(Y(t));return e}if("{"==t){for(e={};t=W(),"}"!=t;n||(n=!0))n&&(","==t?(t=W(),"}"==t&&Q()):Q()),","!=t&&"string"==typeof t&&"@"==(O?t.charAt(0):t[0])&&":"==W()||Q(),e[t.slice(1)]=Y(W());return e}Q()}return t},H=function(t,e,n){var o=G(t,e,n);o===g?delete t[e]:t[e]=o},G=function(t,e,n){var o,r=t[e];if("object"==typeof r&&r)if(b.call(r)==T)for(o=r.length;o--;)H(r,o,n);else m(r,function(t){H(r,t,n)});return n.call(t,e,r)};e.parse=function(t,e){var n,o;return J=0,X=""+t,n=Y(W()),"$"!=W()&&Q(),J=X=null,e&&b.call(e)==E?G((o={},o[""]=n,o),"",e):n}}}return e.runInContext=i,e}var s=n(48),a={"function":!0,object:!0},c=a[typeof e]&&e&&!e.nodeType&&e,l=a[typeof window]&&window||this,u=c&&a[typeof t]&&t&&!t.nodeType&&"object"==typeof r&&r;if(!u||u.global!==u&&u.window!==u&&u.self!==u||(l=u),c&&!s)i(l,c);else{var h=l.JSON,p=l.JSON3,f=!1,d=i(l,l.JSON3={noConflict:function(){return f||(f=!0,l.JSON=h,l.JSON3=p,h=p=null),d}});l.JSON={parse:d.parse,stringify:d.stringify}}s&&(o=function(){return d}.call(e,n,e,t),!(void 0!==o&&(t.exports=o)))}).call(this)}).call(e,n(4)(t),function(){return this}())},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e){t.exports="1.1.1"},function(t,e,n){(function(e,o){"use strict";var r=n(15),i=n(47),s=n(39),a=function(){};"production"!==e.env.NODE_ENV&&(a=n(23)("sockjs-client:utils:iframe")),t.exports={WPrefix:"_jp",currentWindowId:null,polluteGlobalNamespace:function(){t.exports.WPrefix in o||(o[t.exports.WPrefix]={})},postMessage:function(e,n){o.parent!==o?o.parent.postMessage(i.stringify({windowId:t.exports.currentWindowId,type:e,data:n||""}),"*"):a("Cannot postMessage, no parent window.",e,n)},createIframe:function(t,e){var n,i,s=o.document.createElement("iframe"),c=function(){a("unattach"),clearTimeout(n);try{s.onload=null}catch(t){}s.onerror=null},l=function(){a("cleanup"),s&&(c(),setTimeout(function(){s&&s.parentNode.removeChild(s),s=null},0),r.unloadDel(i))},u=function(t){a("onerror",t),s&&(l(),e(t))},h=function(t,e){a("post",t,e);try{setTimeout(function(){s&&s.contentWindow&&s.contentWindow.postMessage(t,e)},0)}catch(n){}};return s.src=t,s.style.display="none",s.style.position="absolute",s.onerror=function(){u("onerror")},s.onload=function(){a("onload"),clearTimeout(n),n=setTimeout(function(){u("onload timeout")},2e3)},o.document.body.appendChild(s),n=setTimeout(function(){u("timeout")},15e3),i=r.unloadAdd(l),{post:h,cleanup:l,loaded:c}},createHtmlfile:function(e,n){var i,s,c,l=["Active"].concat("Object").join("X"),u=new o[l]("htmlfile"),h=function(){clearTimeout(i),c.onerror=null},p=function(){u&&(h(),r.unloadDel(s),c.parentNode.removeChild(c),c=u=null,CollectGarbage())},f=function(t){a("onerror",t),u&&(p(),n(t))},d=function(t,e){try{setTimeout(function(){c&&c.contentWindow&&c.contentWindow.postMessage(t,e)},0)}catch(n){}};u.open(),u.write(''),u.close(),u.parentWindow[t.exports.WPrefix]=o[t.exports.WPrefix];var m=u.createElement("div");return u.body.appendChild(m),c=u.createElement("iframe"),m.appendChild(c),c.src=e,c.onerror=function(){f("onerror")},i=setTimeout(function(){f("timeout")},15e3),s=r.unloadAdd(p),{post:d,cleanup:p,loaded:h}}},t.exports.iframeEnabled=!1,o.document&&(t.exports.iframeEnabled=("function"==typeof o.postMessage||"object"==typeof o.postMessage)&&!s.isKonqueror())}).call(e,n(14),function(){return this}())},function(t,e){"use strict";t.exports={isObject:function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},extend:function(t){if(!this.isObject(t))return t;for(var e,n,o=1,r=arguments.length;o')}catch(e){var n=o.document.createElement("iframe");return n.name=t,n}}function i(){c("createForm"),l=o.document.createElement("form"),l.style.display="none",l.style.position="absolute",l.method="POST",l.enctype="application/x-www-form-urlencoded",l.acceptCharset="UTF-8",u=o.document.createElement("textarea"),u.name="d",l.appendChild(u),o.document.body.appendChild(l)}var s=n(16),a=n(18),c=function(){};"production"!==e.env.NODE_ENV&&(c=n(23)("sockjs-client:sender:jsonp"));var l,u;t.exports=function(t,e,n){c(t,e),l||i();var o="a"+s.string(8);l.target=o,l.action=a.addQuery(a.addPath(t,"/jsonp_send"),"i="+o);var h=r(o);h.id=o,h.style.display="none",l.appendChild(h);try{u.value=e}catch(p){}l.submit();var f=function(t){c("completed",o,t),h.onerror&&(h.onreadystatechange=h.onerror=h.onload=null,setTimeout(function(){c("cleaning up",o),h.parentNode.removeChild(h),h=null},500),u.value="",n(t))};return h.onerror=function(){c("onerror",o),f()},h.onload=function(){c("onload",o),f()},h.onreadystatechange=function(t){c("onreadystatechange",o,h.readyState,t),"complete"===h.readyState&&f()},function(){c("aborted",o),f(new Error("Aborted"))}}}).call(e,n(14),function(){return this}())},function(t,e,n){(function(e,o){"use strict";function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");b.call(this),this.readyState=r.CONNECTING,this.extensions="",this.protocol="",n=n||{},n.protocols_whitelist&&g.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=n.transports,this._transportOptions=n.transportOptions||{};var o=n.sessionId||8;if("function"==typeof o)this._generateSessionId=o;else{if("number"!=typeof o)throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._generateSessionId=function(){return l.string(o)}}this._server=n.server||l.numberString(1e3);var i=new s(t);if(!i.host||!i.protocol)throw new SyntaxError("The URL '"+t+"' is invalid");if(i.hash)throw new SyntaxError("The URL must not contain a fragment");if("http:"!==i.protocol&&"https:"!==i.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+i.protocol+"' is not allowed.");var a="https:"===i.protocol;if("https"===y.protocol&&!a)throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");e?Array.isArray(e)||(e=[e]):e=[];var c=e.sort();c.forEach(function(t,e){if(!t)throw new SyntaxError("The protocols entry '"+t+"' is invalid.");if(e=3e3&&t<=4999}n(60);var s=n(19),a=n(26),c=n(47),l=n(16),u=n(61),h=n(18),p=n(15),f=n(62),d=n(51),m=n(39),g=n(63),v=n(64),b=n(28),y=n(65),x=n(66),E=n(67),w=n(68),A=function(){};"production"!==e.env.NODE_ENV&&(A=n(23)("sockjs-client:main"));var S;a(r,b),r.prototype.close=function(t,e){if(t&&!i(t))throw new Error("InvalidAccessError: Invalid code");if(e&&e.length>123)throw new SyntaxError("reason argument has an invalid length");if(this.readyState!==r.CLOSING&&this.readyState!==r.CLOSED){var n=!0;this._close(t||1e3,e||"Normal closure",n)}},r.prototype.send=function(t){if("string"!=typeof t&&(t=""+t),this.readyState===r.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===r.OPEN&&this._transport.send(u.quote(t))},r.version=n(49),r.CONNECTING=0,r.OPEN=1,r.CLOSING=2,r.CLOSED=3,r.prototype._receiveInfo=function(t,e){if(A("_receiveInfo",e),this._ir=null,!t)return void this._close(1002,"Cannot connect to server");this._rto=this.countRTO(e),this._transUrl=t.base_url?t.base_url:this.url,t=d.extend(t,this._urlInfo),A("info",t);var n=S.filterToEnabled(this._transportsWhitelist,t);this._transports=n.main,A(this._transports.length+" enabled transports"),this._connect()},r.prototype._connect=function(){for(var t=this._transports.shift();t;t=this._transports.shift()){if(A("attempt",t.transportName),t.needBody&&(!o.document.body||"undefined"!=typeof o.document.readyState&&"complete"!==o.document.readyState&&"interactive"!==o.document.readyState))return A("waiting for body"),this._transports.unshift(t),void p.attachEvent("load",this._connect.bind(this));var e=this._rto*t.roundTrips||5e3;this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),e),A("using timeout",e);var n=h.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),r=this._transportOptions[t.transportName];A("transport url",n);var i=new t(n,this._transUrl,r);return i.on("message",this._transportMessage.bind(this)),i.once("close",this._transportClose.bind(this)),i.transportName=t.transportName,void(this._transport=i)}this._close(2e3,"All transports failed",!1)},r.prototype._transportTimeout=function(){A("_transportTimeout"),this.readyState===r.CONNECTING&&this._transportClose(2007,"Transport timed out")},r.prototype._transportMessage=function(t){A("_transportMessage",t);var e,n=this,o=t.slice(0,1),r=t.slice(1);switch(o){case"o":return void this._open();case"h":return this.dispatchEvent(new v("heartbeat")),void A("heartbeat",this.transport)}if(r)try{e=c.parse(r)}catch(i){A("bad json",r)}if("undefined"==typeof e)return void A("empty payload",r);switch(o){case"a":Array.isArray(e)&&e.forEach(function(t){A("message",n.transport,t),n.dispatchEvent(new E(t))});break;case"m":A("message",this.transport,e),this.dispatchEvent(new E(e));break;case"c":Array.isArray(e)&&2===e.length&&this._close(e[0],e[1],!0)}},r.prototype._transportClose=function(t,e){return A("_transportClose",this.transport,t,e),this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),i(t)||2e3===t||this.readyState!==r.CONNECTING?void this._close(t,e):void this._connect()},r.prototype._open=function(){A("_open",this._transport.transportName,this.readyState),this.readyState===r.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=r.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new v("open")),A("connected",this.transport)):this._close(1006,"Server lost session")},r.prototype._close=function(t,e,n){A("_close",this.transport,t,e,n,this.readyState);var o=!1;if(this._ir&&(o=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===r.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=r.CLOSING,setTimeout(function(){this.readyState=r.CLOSED,o&&this.dispatchEvent(new v("error"));var i=new x("close");i.wasClean=n||!1,i.code=t||1e3,i.reason=e,this.dispatchEvent(i),this.onmessage=this.onclose=this.onerror=null,A("disconnected")}.bind(this),0)},r.prototype.countRTO=function(t){return t>100?4*t:300+t},t.exports=function(t){return S=f(t),n(73)(r,t),r}}).call(e,n(14),function(){return this}())},function(t,e){"use strict"; -function n(t){var e=+t;return e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function o(t){return t>>>0}function r(){}var i,s=Array.prototype,a=Object.prototype,c=Function.prototype,l=String.prototype,u=s.slice,h=a.toString,p=function(t){return"[object Function]"===a.toString.call(t)},f=function(t){return"[object Array]"===h.call(t)},d=function(t){return"[object String]"===h.call(t)},m=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}();i=m?function(t,e,n,o){!o&&e in t||Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(t,e,n,o){!o&&e in t||(t[e]=n)};var g=function(t,e,n){for(var o in e)a.hasOwnProperty.call(e,o)&&i(t,o,e[o],n)},v=function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return Object(t)};g(c,{bind:function(t){var e=this;if(!p(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n=u.call(arguments,1),o=function(){if(this instanceof c){var o=e.apply(this,n.concat(u.call(arguments)));return Object(o)===o?o:this}return e.apply(t,n.concat(u.call(arguments)))},i=Math.max(0,e.length-n.length),s=[],a=0;a>>0;if(!p(t))throw new TypeError;for(;++r>>0;if(!o)return-1;var r=0;for(arguments.length>1&&(r=n(arguments[1])),r=r>=0?r:Math.max(0,o+r);r1?!function(){var t=void 0===/()??/.exec("")[1];l.split=function(e,n){var r=this;if(void 0===e&&0===n)return[];if("[object RegExp]"!==h.call(e))return w.call(this,e,n);var i,a,c,l,u=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),f=0;for(e=new RegExp(e.source,p+"g"),r+="",t||(i=new RegExp("^"+e.source+"$(?!\\s)",p)),n=void 0===n?-1>>>0:o(n);(a=e.exec(r))&&(c=a.index+a[0].length,!(c>f&&(u.push(r.slice(f,a.index)),!t&&a.length>1&&a[0].replace(i,function(){for(var t=1;t1&&a.index=n)));)e.lastIndex===a.index&&e.lastIndex++;return f===r.length?!l&&e.test("")||u.push(""):u.push(r.slice(f)),u.length>n?u.slice(0,n):u}}():"0".split(void 0,0).length&&(l.split=function(t,e){return void 0===t&&0===e?[]:w.call(this,t,e)});var A="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff",S="​",T="["+A+"]",R=new RegExp("^"+T+T+"*"),O=new RegExp(T+T+"*$"),C=l.trim&&(A.trim()||!S.trim());g(l,{trim:function(){if(void 0===this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(R,"").replace(O,"")}},C);var I=l.substr,k="".substr&&"b"!=="0b".substr(-1);g(l,{substr:function(t,e){return I.call(this,t<0&&(t=this.length+t)<0?0:t,e)}},k)},function(t,e,n){"use strict";var o,r=n(47),i=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,s=function(t){var e,n={},o=[];for(e=0;e<65536;e++)o.push(String.fromCharCode(e));return t.lastIndex=0,o.join("").replace(t,function(t){return n[t]="\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4),""}),t.lastIndex=0,n};t.exports={quote:function(t){var e=r.stringify(t);return i.lastIndex=0,i.test(e)?(o||(o=s(i)),e.replace(i,function(t){return o[t]})):e}}},function(t,e,n){(function(e){"use strict";var o=function(){};"production"!==e.env.NODE_ENV&&(o=n(23)("sockjs-client:utils:transport")),t.exports=function(t){return{filterToEnabled:function(e,n){var r={main:[],facade:[]};return e?"string"==typeof e&&(e=[e]):e=[],t.forEach(function(t){if(t)return"websocket"===t.transportName&&n.websocket===!1?void o("disabled from server","websocket"):e.length&&e.indexOf(t.transportName)===-1?void o("not in whitelist",t.transportName):void(t.enabled(n)?(o("enabled",t.transportName),r.main.push(t),t.facadeTransport&&r.facade.push(t.facadeTransport)):o("disabled",t.transportName))}),r}}}}).call(e,n(14))},function(t,e){(function(e){"use strict";var n={};["log","debug","warn"].forEach(function(t){var o;try{o=e.console&&e.console[t]&&e.console[t].apply}catch(r){}n[t]=o?function(){return e.console[t].apply(e.console,arguments)}:"log"===t?function(){}:n.log}),t.exports=n}).call(e,function(){return this}())},function(t,e){"use strict";function n(t){this.type=t}n.prototype.initEvent=function(t,e,n){return this.type=t,this.bubbles=e,this.cancelable=n,this.timeStamp=+new Date,this},n.prototype.stopPropagation=function(){},n.prototype.preventDefault=function(){},n.CAPTURING_PHASE=1,n.AT_TARGET=2,n.BUBBLING_PHASE=3,t.exports=n},function(t,e){(function(e){"use strict";t.exports=e.location||{origin:"http://localhost:80",protocol:"http",host:"localhost",port:80,href:"http://localhost/",hash:""}}).call(e,function(){return this}())},function(t,e,n){"use strict";function o(){i.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}var r=n(26),i=n(64);r(o,i),t.exports=o},function(t,e,n){"use strict";function o(t){i.call(this),this.initEvent("message",!1,!1),this.data=t}var r=n(26),i=n(64);r(o,i),t.exports=o},function(t,e,n){(function(e){"use strict";function o(t,e){f(t);var n=this;r.call(this),setTimeout(function(){n.doXhr(t,e)},0)}var r=n(27).EventEmitter,i=n(26),s=n(18),a=n(41),c=n(36),l=n(38),u=n(69),h=n(70),p=n(72),f=function(){};"production"!==e.env.NODE_ENV&&(f=n(23)("sockjs-client:info-receiver")),i(o,r),o._getReceiver=function(t,e,n){return n.sameOrigin?new p(e,l):c.enabled?new p(e,c):a.enabled&&n.sameScheme?new p(e,a):h.enabled()?new h(t,e):new p(e,u)},o.prototype.doXhr=function(t,e){var n=this,r=s.addPath(t,"/info");f("doXhr",r),this.xo=o._getReceiver(t,r,e),this.timeoutRef=setTimeout(function(){f("timeout"),n._cleanup(!1),n.emit("finish")},o.timeout),this.xo.once("finish",function(t,e){f("finish",t,e),n._cleanup(!0),n.emit("finish",t,e)})},o.prototype._cleanup=function(t){f("_cleanup"),clearTimeout(this.timeoutRef),this.timeoutRef=null,!t&&this.xo&&this.xo.close(),this.xo=null},o.prototype.close=function(){f("close"),this.removeAllListeners(),this._cleanup(!1)},o.timeout=8e3,t.exports=o}).call(e,n(14))},function(t,e,n){"use strict";function o(){var t=this;r.call(this),this.to=setTimeout(function(){t.emit("finish",200,"{}")},o.timeout)}var r=n(27).EventEmitter,i=n(26);i(o,r),o.prototype.close=function(){clearTimeout(this.to)},o.timeout=2e3,t.exports=o},function(t,e,n){(function(e,o){"use strict";function r(t,e){var n=this;i.call(this);var r=function(){var o=n.ifr=new l(u.transportName,e,t);o.once("message",function(t){if(t){var e;try{e=a.parse(t)}catch(o){return h("bad json",t),n.emit("finish"),void n.close()}var r=e[0],i=e[1];n.emit("finish",r,i)}n.close()}),o.once("close",function(){n.emit("finish"),n.close()})};o.document.body?r():c.attachEvent("load",r)}var i=n(27).EventEmitter,s=n(26),a=n(47),c=n(15),l=n(46),u=n(71),h=function(){};"production"!==e.env.NODE_ENV&&(h=n(23)("sockjs-client:info-iframe")),s(r,i),r.enabled=function(){return l.enabled()},r.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},t.exports=r}).call(e,n(14),function(){return this}())},function(t,e,n){"use strict";function o(t){var e=this;i.call(this),this.ir=new c(t,a),this.ir.once("finish",function(t,n){e.ir=null,e.emit("message",s.stringify([t,n]))})}var r=n(26),i=n(27).EventEmitter,s=n(47),a=n(38),c=n(72);r(o,i),o.transportName="iframe-info-receiver",o.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},t.exports=o},function(t,e,n){(function(e){"use strict";function o(t,e){r.call(this);var n=this,o=+new Date;this.xo=new e("GET",t),this.xo.once("finish",function(t,e){var r,i;if(200===t){if(i=+new Date-o,e)try{r=s.parse(e)}catch(l){c("bad json",e)}a.isObject(r)||(r={})}n.emit("finish",r,i),n.removeAllListeners()})}var r=n(27).EventEmitter,i=n(26),s=n(47),a=n(51),c=function(){};"production"!==e.env.NODE_ENV&&(c=n(23)("sockjs-client:info-ajax")),i(o,r),o.prototype.close=function(){this.removeAllListeners(),this.xo.close()},t.exports=o}).call(e,n(14))},function(t,e,n){(function(e){"use strict";var o=n(18),r=n(15),i=n(47),s=n(74),a=n(71),c=n(50),l=n(65),u=function(){};"production"!==e.env.NODE_ENV&&(u=n(23)("sockjs-client:iframe-bootstrap")),t.exports=function(t,e){var n={};e.forEach(function(t){t.facadeTransport&&(n[t.facadeTransport.transportName]=t.facadeTransport)}),n[a.transportName]=a;var h;t.bootstrap_iframe=function(){var e;c.currentWindowId=l.hash.slice(1);var a=function(r){if(r.source===parent&&("undefined"==typeof h&&(h=r.origin),r.origin===h)){var a;try{a=i.parse(r.data)}catch(p){return void u("bad json",r.data)}if(a.windowId===c.currentWindowId)switch(a.type){case"s":var f;try{f=i.parse(a.data)}catch(p){u("bad json",a.data);break}var d=f[0],m=f[1],g=f[2],v=f[3];if(u(d,m,g,v),d!==t.version)throw new Error('Incompatible SockJS! Main site uses: "'+d+'", the iframe: "'+t.version+'".');if(!o.isOriginEqual(g,l.href)||!o.isOriginEqual(v,l.href))throw new Error("Can't connect to different domain from within an iframe. ("+l.href+", "+g+", "+v+")");e=new s(new n[m](g,v));break;case"m":e._send(a.data);break;case"c":e&&e._close(),e=null}}};r.attachEvent("message",a),c.postMessage("s")}}}).call(e,n(14))},function(t,e,n){"use strict";function o(t){this._transport=t,t.on("message",this._transportMessage.bind(this)),t.on("close",this._transportClose.bind(this))}var r=n(47),i=n(50);o.prototype._transportClose=function(t,e){i.postMessage("c",r.stringify([t,e]))},o.prototype._transportMessage=function(t){i.postMessage("t",t)},o.prototype._send=function(t){this._transport.send(t)},o.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},t.exports=o},function(t,e,n){throw new Error("[HMR] Hot Module Replacement is disabled.")},function(t,e,n){(function(e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}var r=n(77),i=o(r),s=n(78),a=o(s),c=n(79),l=o(c);a["default"].render(i["default"].createElement(l["default"],null),document.getElementById("app")),function(){if("production"!==e.env.NODE_ENV){if("undefined"==typeof __REACT_HOT_LOADER__)return;if("function"==typeof t.exports)return void __REACT_HOT_LOADER__.register(t.exports,"module.exports","/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/index.js");for(var n in t.exports)if(Object.prototype.hasOwnProperty.call(t.exports,n)){var o=void 0;try{o=t.exports[n]}catch(r){continue}__REACT_HOT_LOADER__.register(o,n,"/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/index.js")}}}()}).call(e,n(14))},function(t,e){t.exports=React},function(t,e){t.exports=ReactDOM},function(t,e,n){(function(o){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var n=0;n1){var r=new RegExp("^["+o.join("|")+"]+$","i");if(!r.test(n))return this.props.errorHandle("TYPE ERROR")}if(t.target.files[0].size>this.props.maxFileSize){var i;return i=parseInt(this.maxFileSize/1024/1024)>0?(this.maxFileSize/1024/1024).toFixed(2)+"MB":parseInt(this.maxFileSize/1024)>0?(this.maxFileSize/1024).toFixed(2)+"kB":options.maxFileSize.toFixed(2)+"Byte",void this.props.errorHandle("FILE IS TOO LARGER THAN THE MAX VALUE "+i)}return this.files=t.target.files,this.props.crop?void this.__showImage():(this.props.imageChanged(this.files[0]),void this.tryAjaxUpload())}},{key:"__showImage",value:function(){document.body.style.overflow="hidden",this.setState({hasImage:!0}),this.__readFiles()}},{key:"__readFiles",value:function(){var t=new FileReader,e=this;t.onload=function(t){var n=t.target.result;e.__initImage(n)},t.readAsDataURL(this.files[0])}},{key:"__initImage",value:function(t){var e=new Image,n=this;e.src=t,e.onload=function(){n.setState({image:{src:t,width:e.naturalWidth,height:e.naturalHeight}}),n.__reseyLayout(),n.__initCropBox()}}},{key:"__initCropBox",value:function(){var t=this.__find(".select-recorte"),e=this.__find(".g-crop-image-principal"),n=parseInt(e.style.width),o=parseInt(e.style.height),r=this.props.cropRatio.split(":")[0],i=this.props.cropRatio.split(":")[1],s=n/100*80,a=s/r*i;t.style.cssText="width:"+s+"px;height: "+a+"px;left:"+(n-s)/2+"px;top:"+(o-a)/2+"px;",a>o&&(a=o/100*80,s=a*r/i,t.style.cssText="width:"+s+"px;height:"+a+"px;left:"+(n-s)/2+"px;top:"+(o-a)/2+"px")}},{key:"__reseyLayout",value:function(){var t=window.innerHeight-80,e=window.innerWidth-60,n=this.state.image.width,o=this.state.image.height,r=n/o,i=e/t,s=this.__find(".g-crop-image-principal");r>i?(this.setState({image:{src:this.state.image.src,width:e,height:e/r}}),s.style.cssText="width:"+e+"px;height:"+e/r+"px;margin-top:"+(t-e/r)/2+"px"):(this.setState({image:{src:this.state.image.src,width:t*r,height:t}}),s.style.cssText="width:"+t*r+"px;height:"+t+"px;margin-left:"+(e-t*r)/2+"px;"),this.imgChangeRatio=n/this.state.image.width}},{key:"doCrop",value:function(t){var e=t.target;e.value=e.value+"...",e.disabled=!0,"object"!==c(this.data)&&(this.data={});var n=this.__find(".select-recorte");this.data.request="crop",this.data.toCropImgX=parseInt(window.getComputedStyle(n).left)*this.imgChangeRatio,this.data.toCropImgY=parseInt(window.getComputedStyle(n).top)*this.imgChangeRatio,this.data.toCropImgW=parseInt(window.getComputedStyle(n).width)*this.imgChangeRatio,this.data.toCropImgH=parseInt(window.getComputedStyle(n).height)*this.imgChangeRatio,this.tryAjaxUpload(function(){e.value=e.value.replace("...",""),e.disabled=!1})}},{key:"cancel",value:function(){this.files="",this.setState({hasImage:!1}),this.__find("input").value="",document.body.removeAttribute("style")}},{key:"tryAjaxUpload",value:function(t){for(var e=this,n=new FormData,o=0;o0&&h.append(u,o[u].files[0]):o[u]instanceof Blob?h.append(u,o[u],o.name):h.append(u,o[u]));o=h}if(a.open(t,e,!0),l&&("responseType"in a?a.responseType=l:a.overrideMimeType("text/plain; charset=x-user-defined")),n)for(u in n)a.setRequestHeader(u,n[u]);return a.send(o),a},function(){if("production"!==e.env.NODE_ENV){if("undefined"==typeof __REACT_HOT_LOADER__)return;if("function"==typeof t.exports)return void __REACT_HOT_LOADER__.register(t.exports,"module.exports","/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/xhr.js");for(var n in t.exports)if(Object.prototype.hasOwnProperty.call(t.exports,n)){var o=void 0;try{o=t.exports[n]}catch(r){continue}__REACT_HOT_LOADER__.register(o,n,"/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/xhr.js")}}}()}).call(e,n(14))},function(t,e,n){(function(o){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;nthis.splitY?parseInt(a)<=i/2+n&&(parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=window.getComputedStyle(e).width),this.el.style.width=this.coor.w+(h?t.changedTouches[0].clientX:t.clientX)-this.coor.x+"px",this.el.style.height=parseInt(this.el.offsetWidth)*(this.splitY/this.splitX)+"px",n>o?parseInt(this.el.offsetWidth)>=parseInt(window.getComputedStyle(e).height)&&(this.el.style.height=window.getComputedStyle(e).height,this.el.style.width=parseInt(window.getComputedStyle(e).height)*(this.splitX/this.splitY)+"px"):n=n&&(this.el.style.width=window.getComputedStyle(e).width,this.el.style.height=n*(this.splitY/this.splitX)+"px"):parseInt(this.el.offsetHeight)>=n&&(this.el.style.width=n,this.el.style.height=n*(this.splitY/this.splitX)+"px")):this.splitXo?parseInt(this.el.offsetHeight)>=o&&(this.el.style.height=o,this.el.style.width=o*(this.splitX/this.splitY)+"px"):n=n&&(this.el.style.width=n,this.el.style.height=n*(this.splitY/this.splitX)+"px"):parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=n,this.el.style.height=n*(this.splitY/this.splitX)+"px")):parseInt(a)<=i/2+n&&(this.el.style.width=this.coor.w+(h?t.changedTouches[0].clientX:t.clientX)-this.coor.x+"px",this.el.style.height=this.el.style.width,n>o?parseInt(this.el.offsetHeight)>=o&&(this.el.style.height=o,this.el.style.width=o):n=n&&(this.el.style.width=n,this.el.style.height=n):parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=this.el.style.height=n))}}},{key:"stopDrag",value:function(){this.el=null,h&&(document.removeEventListener("touchmove",l,!1),document.removeEventListener("touchend",u,!1)),document.removeEventListener("mousemove",l,!1),document.removeEventListener("mouseup",u,!1)}}]),t}();e["default"]=d,function(){if("production"!==o.env.NODE_ENV){if("undefined"==typeof __REACT_HOT_LOADER__)return;if("function"==typeof t.exports)return void __REACT_HOT_LOADER__.register(t.exports,"module.exports","/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/resize.js");for(var e in t.exports)if(Object.prototype.hasOwnProperty.call(t.exports,e)){var n=void 0;try{n=t.exports[e]}catch(r){continue}__REACT_HOT_LOADER__.register(n,e,"/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/resize.js")}}}()}).call(e,n(14))},function(t,e,n){(function(e){"use strict";t.exports={isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},function(){if("production"!==e.env.NODE_ENV){if("undefined"==typeof __REACT_HOT_LOADER__)return;if("function"==typeof t.exports)return void __REACT_HOT_LOADER__.register(t.exports,"module.exports","/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/helper.js");for(var n in t.exports)if(Object.prototype.hasOwnProperty.call(t.exports,n)){var o=void 0;try{o=t.exports[n]}catch(r){continue}__REACT_HOT_LOADER__.register(o,n,"/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/helper.js")}}}()}).call(e,n(14))},function(t,e,n){(function(o){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n=this.coor.maxLeft&&(o=this.coor.maxLeft),r<=0&&(r=0),r>=this.coor.maxTop&&(r=this.coor.maxTop),this.el.style.left=o+"px",this.el.style.top=r+"px"}}},{key:"stopMove",value:function(){return this.el=null,l?(document.removeEventListener("touchmove",u,!1),void document.removeEventListener("touchend",h,!1)):(document.removeEventListener("mousemove",u,!1),void document.removeEventListener("mouseup",h,!1))}}]),t}();e["default"]=p,function(){if("production"!==o.env.NODE_ENV){if("undefined"==typeof __REACT_HOT_LOADER__)return;if("function"==typeof t.exports)return void __REACT_HOT_LOADER__.register(t.exports,"module.exports","/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/drag.js");for(var e in t.exports)if(Object.prototype.hasOwnProperty.call(t.exports,e)){var n=void 0;try{n=t.exports[e]}catch(r){continue}__REACT_HOT_LOADER__.register(n,e,"/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/drag.js")}}}()}).call(e,n(14))},function(t,e,n){var o=n(88);"string"==typeof o&&(o=[[t.id,o,""]]);n(90)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(89)(),e.push([t.id,".g-core-image-upload-btn{position:relative;overflow:hidden}.g-core-image-upload-form{position:absolute;left:0;right:0;top:0;bottom:0;opacity:0}.g-core-image-upload-container{position:absolute;background:#111;z-index:900}.g-core-image-upload-modal{position:absolute;left:0;right:0;width:100%;height:100%;border:1px solid #ccc;z-index:899}.dropped{border:4px solid #ea6153}.g-core-image-corp-container{z-index:1900;position:fixed;left:0;right:0;top:0;bottom:0;background:rgba(0,0,0,.9);color:#f1f1f1}.g-core-image-corp-container .image-aside{overflow:hidden;position:absolute;right:30px;left:30px;top:60px;bottom:20px;text-align:center}.g-core-image-corp-container .image-aside img{max-width:100%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.g-core-image-corp-container .info-aside{position:absolute;left:0;right:0;top:0;height:40px;padding-left:10px;padding-right:10px;background:#fefefe;color:#777}.g-core-image-corp-container .info-aside .image-corp-preview{position:relative;overflow:hidden;text-align:center;border:2px solid #ccc}.g-core-image-corp-container .info-aside .image-corp-preview.circled{border-radius:160px}.g-core-image-corp-container .info-aside .image-corp-preview img{width:100%}.g-core-image-corp-container .btn-groups{text-align:right;margin:5px 0 0}.g-core-image-corp-container .btn{display:inline-block;padding:0 15px;height:32px;margin-left:15px;background:#fff;border:1px solid #ccc;border-radius:2px;font-size:13px;color:#222;line-height:32px;transition:all .1s ease-in}.g-core-image-corp-container .btn:hover{border:1px solid #777;box-shadow:0 1px 3px rgba(0,0,0,.05)},.g-core-image-corp-container .btn:active{background:#ddd}.g-core-image-corp-container .btn:disabled{background:#eee!important;border-color:#ccc;cursor:not-allowed}.g-core-image-corp-container .btn-upload{background:#2d2d2d;border-color:#3d3d3d;color:#fff}.g-core-image-corp-container .btn-upload:hover{background:#222;border-color:#222;box-shadow:0 1px 3px rgba(0,0,0,.05)}.g-core-image-corp-container .g-crop-image-box,.g-core-image-corp-container .g-crop-image-box .g-crop-image-principal{position:relative}.g-core-image-corp-container .g-crop-image-box .select-recorte{position:absolute;background:#fff;opacity:.25;border:1px solid #0074d9;cursor:move}.g-core-image-corp-container .g-resize{z-index:90;position:absolute;bottom:0;right:0;width:10px;height:10px;cursor:se-resize}.g-core-image-corp-container .g-resize:after{content:'';display:block;position:absolute;background:#0074d9;width:4px;height:4px;right:0;bottom:0}.g-core-image-corp-container .g-e-resize{cursor:e-resize;position:absolute;width:7px;right:-5px;top:0;height:100%}.g-core-image-corp-container .g-s-resize{position:absolute;cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&y.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",i(t,e),e}function c(t){var e=document.createElement("link");return e.rel="stylesheet",i(t,e),e}function l(t,e){var n,o,r;if(e.singleton){var i=b++;n=v||(v=a(e)),o=u.bind(null,n,i,!1),r=u.bind(null,n,i,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=c(e),o=p.bind(null,n),r=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(e),o=h.bind(null,n),r=function(){s(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}function u(t,e,n,o){var r=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=x(e,r);else{var i=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(i,s[e]):t.appendChild(i)}}function h(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function p(t,e){var n=e.css,o=e.sourceMap;o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var r=new Blob([n],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(r),i&&URL.revokeObjectURL(i)}var f={},d=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},m=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=d(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,b=0,y=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=m()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=r(t);return o(n,e),function(t){for(var i=[],s=0;s0||-1)*Math.floor(Math.abs(e))),e}function o(t){return t>>>0}function r(){}var i,s=Array.prototype,a=Object.prototype,c=Function.prototype,l=String.prototype,u=s.slice,h=a.toString,p=function(t){return"[object Function]"===a.toString.call(t)},f=function(t){return"[object Array]"===h.call(t)},d=function(t){return"[object String]"===h.call(t)},m=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}();i=m?function(t,e,n,o){!o&&e in t||Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(t,e,n,o){!o&&e in t||(t[e]=n)};var g=function(t,e,n){for(var o in e)a.hasOwnProperty.call(e,o)&&i(t,o,e[o],n)},v=function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return Object(t)};g(c,{bind:function(t){var e=this;if(!p(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n=u.call(arguments,1),o=function(){if(this instanceof c){var o=e.apply(this,n.concat(u.call(arguments)));return Object(o)===o?o:this}return e.apply(t,n.concat(u.call(arguments)))},i=Math.max(0,e.length-n.length),s=[],a=0;a>>0;if(!p(t))throw new TypeError;for(;++r>>0;if(!o)return-1;var r=0;for(arguments.length>1&&(r=n(arguments[1])),r=r>=0?r:Math.max(0,o+r);r1?!function(){var t=void 0===/()??/.exec("")[1];l.split=function(e,n){var r=this;if(void 0===e&&0===n)return[];if("[object RegExp]"!==h.call(e))return w.call(this,e,n);var i,a,c,l,u=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),f=0;for(e=new RegExp(e.source,p+"g"),r+="",t||(i=new RegExp("^"+e.source+"$(?!\\s)",p)),n=void 0===n?-1>>>0:o(n);(a=e.exec(r))&&(c=a.index+a[0].length,!(c>f&&(u.push(r.slice(f,a.index)),!t&&a.length>1&&a[0].replace(i,function(){for(var t=1;t1&&a.index=n)));)e.lastIndex===a.index&&e.lastIndex++;return f===r.length?!l&&e.test("")||u.push(""):u.push(r.slice(f)),u.length>n?u.slice(0,n):u}}():"0".split(void 0,0).length&&(l.split=function(t,e){return void 0===t&&0===e?[]:w.call(this,t,e)});var A="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff",S="​",T="["+A+"]",R=new RegExp("^"+T+T+"*"),O=new RegExp(T+T+"*$"),C=l.trim&&(A.trim()||!S.trim());g(l,{trim:function(){if(void 0===this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(R,"").replace(O,"")}},C);var I=l.substr,k="".substr&&"b"!=="0b".substr(-1);g(l,{substr:function(t,e){return I.call(this,t<0&&(t=this.length+t)<0?0:t,e)}},k)},function(t,e,n){"use strict";var o,r=n(47),i=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,s=function(t){var e,n={},o=[];for(e=0;e<65536;e++)o.push(String.fromCharCode(e));return t.lastIndex=0,o.join("").replace(t,function(t){return n[t]="\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4),""}),t.lastIndex=0,n};t.exports={quote:function(t){var e=r.stringify(t);return i.lastIndex=0,i.test(e)?(o||(o=s(i)),e.replace(i,function(t){return o[t]})):e}}},function(t,e,n){(function(e){"use strict";var o=function(){};"production"!==e.env.NODE_ENV&&(o=n(23)("sockjs-client:utils:transport")),t.exports=function(t){return{filterToEnabled:function(e,n){var r={main:[],facade:[]};return e?"string"==typeof e&&(e=[e]):e=[],t.forEach(function(t){if(t)return"websocket"===t.transportName&&n.websocket===!1?void o("disabled from server","websocket"):e.length&&e.indexOf(t.transportName)===-1?void o("not in whitelist",t.transportName):void(t.enabled(n)?(o("enabled",t.transportName),r.main.push(t),t.facadeTransport&&r.facade.push(t.facadeTransport)):o("disabled",t.transportName))}),r}}}}).call(e,n(14))},function(t,e){(function(e){"use strict";var n={};["log","debug","warn"].forEach(function(t){var o;try{o=e.console&&e.console[t]&&e.console[t].apply}catch(r){}n[t]=o?function(){return e.console[t].apply(e.console,arguments)}:"log"===t?function(){}:n.log}),t.exports=n}).call(e,function(){return this}())},function(t,e){"use strict";function n(t){this.type=t}n.prototype.initEvent=function(t,e,n){return this.type=t,this.bubbles=e,this.cancelable=n,this.timeStamp=+new Date,this},n.prototype.stopPropagation=function(){},n.prototype.preventDefault=function(){},n.CAPTURING_PHASE=1,n.AT_TARGET=2,n.BUBBLING_PHASE=3,t.exports=n},function(t,e){(function(e){"use strict";t.exports=e.location||{origin:"http://localhost:80",protocol:"http",host:"localhost",port:80,href:"http://localhost/",hash:""}}).call(e,function(){return this}())},function(t,e,n){"use strict";function o(){i.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}var r=n(26),i=n(64);r(o,i),t.exports=o},function(t,e,n){"use strict";function o(t){i.call(this),this.initEvent("message",!1,!1),this.data=t}var r=n(26),i=n(64);r(o,i),t.exports=o},function(t,e,n){(function(e){"use strict";function o(t,e){f(t);var n=this;r.call(this),setTimeout(function(){n.doXhr(t,e)},0)}var r=n(27).EventEmitter,i=n(26),s=n(18),a=n(41),c=n(36),l=n(38),u=n(69),h=n(70),p=n(72),f=function(){};"production"!==e.env.NODE_ENV&&(f=n(23)("sockjs-client:info-receiver")),i(o,r),o._getReceiver=function(t,e,n){return n.sameOrigin?new p(e,l):c.enabled?new p(e,c):a.enabled&&n.sameScheme?new p(e,a):h.enabled()?new h(t,e):new p(e,u)},o.prototype.doXhr=function(t,e){var n=this,r=s.addPath(t,"/info");f("doXhr",r),this.xo=o._getReceiver(t,r,e),this.timeoutRef=setTimeout(function(){f("timeout"),n._cleanup(!1),n.emit("finish")},o.timeout),this.xo.once("finish",function(t,e){f("finish",t,e),n._cleanup(!0),n.emit("finish",t,e)})},o.prototype._cleanup=function(t){f("_cleanup"),clearTimeout(this.timeoutRef),this.timeoutRef=null,!t&&this.xo&&this.xo.close(),this.xo=null},o.prototype.close=function(){f("close"),this.removeAllListeners(),this._cleanup(!1)},o.timeout=8e3,t.exports=o}).call(e,n(14))},function(t,e,n){"use strict";function o(){var t=this;r.call(this),this.to=setTimeout(function(){t.emit("finish",200,"{}")},o.timeout)}var r=n(27).EventEmitter,i=n(26);i(o,r),o.prototype.close=function(){clearTimeout(this.to)},o.timeout=2e3,t.exports=o},function(t,e,n){(function(e,o){"use strict";function r(t,e){var n=this;i.call(this);var r=function(){var o=n.ifr=new l(u.transportName,e,t);o.once("message",function(t){if(t){var e;try{e=a.parse(t)}catch(o){return h("bad json",t),n.emit("finish"),void n.close()}var r=e[0],i=e[1];n.emit("finish",r,i)}n.close()}),o.once("close",function(){n.emit("finish"),n.close()})};o.document.body?r():c.attachEvent("load",r)}var i=n(27).EventEmitter,s=n(26),a=n(47),c=n(15),l=n(46),u=n(71),h=function(){};"production"!==e.env.NODE_ENV&&(h=n(23)("sockjs-client:info-iframe")),s(r,i),r.enabled=function(){return l.enabled()},r.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},t.exports=r}).call(e,n(14),function(){return this}())},function(t,e,n){"use strict";function o(t){var e=this;i.call(this),this.ir=new c(t,a),this.ir.once("finish",function(t,n){e.ir=null,e.emit("message",s.stringify([t,n]))})}var r=n(26),i=n(27).EventEmitter,s=n(47),a=n(38),c=n(72);r(o,i),o.transportName="iframe-info-receiver",o.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},t.exports=o},function(t,e,n){(function(e){"use strict";function o(t,e){r.call(this);var n=this,o=+new Date;this.xo=new e("GET",t),this.xo.once("finish",function(t,e){var r,i;if(200===t){if(i=+new Date-o,e)try{r=s.parse(e)}catch(l){c("bad json",e)}a.isObject(r)||(r={})}n.emit("finish",r,i),n.removeAllListeners()})}var r=n(27).EventEmitter,i=n(26),s=n(47),a=n(51),c=function(){};"production"!==e.env.NODE_ENV&&(c=n(23)("sockjs-client:info-ajax")),i(o,r),o.prototype.close=function(){this.removeAllListeners(),this.xo.close()},t.exports=o}).call(e,n(14))},function(t,e,n){(function(e){"use strict";var o=n(18),r=n(15),i=n(47),s=n(74),a=n(71),c=n(50),l=n(65),u=function(){};"production"!==e.env.NODE_ENV&&(u=n(23)("sockjs-client:iframe-bootstrap")),t.exports=function(t,e){var n={};e.forEach(function(t){t.facadeTransport&&(n[t.facadeTransport.transportName]=t.facadeTransport)}),n[a.transportName]=a;var h;t.bootstrap_iframe=function(){var e;c.currentWindowId=l.hash.slice(1);var a=function(r){if(r.source===parent&&("undefined"==typeof h&&(h=r.origin),r.origin===h)){var a;try{a=i.parse(r.data)}catch(p){return void u("bad json",r.data)}if(a.windowId===c.currentWindowId)switch(a.type){case"s":var f;try{f=i.parse(a.data)}catch(p){u("bad json",a.data);break}var d=f[0],m=f[1],g=f[2],v=f[3];if(u(d,m,g,v),d!==t.version)throw new Error('Incompatible SockJS! Main site uses: "'+d+'", the iframe: "'+t.version+'".');if(!o.isOriginEqual(g,l.href)||!o.isOriginEqual(v,l.href))throw new Error("Can't connect to different domain from within an iframe. ("+l.href+", "+g+", "+v+")");e=new s(new n[m](g,v));break;case"m":e._send(a.data);break;case"c":e&&e._close(),e=null}}};r.attachEvent("message",a),c.postMessage("s")}}}).call(e,n(14))},function(t,e,n){"use strict";function o(t){this._transport=t,t.on("message",this._transportMessage.bind(this)),t.on("close",this._transportClose.bind(this))}var r=n(47),i=n(50);o.prototype._transportClose=function(t,e){i.postMessage("c",r.stringify([t,e]))},o.prototype._transportMessage=function(t){i.postMessage("t",t)},o.prototype._send=function(t){this._transport.send(t)},o.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},t.exports=o},function(t,e,n){throw new Error("[HMR] Hot Module Replacement is disabled.")},function(t,e,n){(function(e){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}var r=n(77),i=o(r),s=n(78),a=o(s),c=n(79),l=o(c);a["default"].render(i["default"].createElement(l["default"],null),document.getElementById("app")),function(){if("production"!==e.env.NODE_ENV){if("undefined"==typeof __REACT_HOT_LOADER__)return;if("function"==typeof t.exports)return void __REACT_HOT_LOADER__.register(t.exports,"module.exports","/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/index.js");for(var n in t.exports)if(Object.prototype.hasOwnProperty.call(t.exports,n)){var o=void 0;try{o=t.exports[n]}catch(r){continue}__REACT_HOT_LOADER__.register(o,n,"/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/index.js")}}}()}).call(e,n(14))},function(t,e){t.exports=React},function(t,e){t.exports=ReactDOM},function(t,e,n){(function(o){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var n=0;n1){var r=new RegExp("^["+o.join("|")+"]+$","i");if(!r.test(n))return this.props.errorHandle("TYPE ERROR")}if(t.target.files[0].size>this.props.maxFileSize){var i;return i=parseInt(this.maxFileSize/1024/1024)>0?(this.maxFileSize/1024/1024).toFixed(2)+"MB":parseInt(this.maxFileSize/1024)>0?(this.maxFileSize/1024).toFixed(2)+"kB":options.maxFileSize.toFixed(2)+"Byte",void this.props.errorHandle("FILE IS TOO LARGER THAN THE MAX VALUE "+i)}return this.files=t.target.files,this.props.crop?void this.__showImage():(this.props.imageChanged(this.files[0]),void this.tryAjaxUpload())}},{key:"__showImage",value:function(){document.body.style.overflow="hidden",this.setState({hasImage:!0}),this.__readFiles()}},{key:"__readFiles",value:function(){var t=new FileReader,e=this;t.onload=function(t){var n=t.target.result;e.__initImage(n)},t.readAsDataURL(this.files[0])}},{key:"__initImage",value:function(t){var e=new Image,n=this;e.src=t,e.onload=function(){n.setState({image:{src:t,width:e.naturalWidth,height:e.naturalHeight}}),n.__reseyLayout(),n.__initCropBox()}}},{key:"__initCropBox",value:function(){var t=this.__find(".select-recorte"),e=this.__find(".g-crop-image-principal"),n=parseInt(e.style.width),o=parseInt(e.style.height),r=this.props.cropRatio.split(":")[0],i=this.props.cropRatio.split(":")[1],s=n/100*80,a=s/r*i;t.style.cssText="width:"+s+"px;height: "+a+"px;left:"+(n-s)/2+"px;top:"+(o-a)/2+"px;",a>o&&(a=o/100*80,s=a*r/i,t.style.cssText="width:"+s+"px;height:"+a+"px;left:"+(n-s)/2+"px;top:"+(o-a)/2+"px")}},{key:"__reseyLayout",value:function(){var t=window.innerHeight-80,e=window.innerWidth-60,n=this.state.image.width,o=this.state.image.height,r=n/o,i=e/t,s=this.__find(".g-crop-image-principal");r>i?(this.setState({image:{src:this.state.image.src,width:e,height:e/r}}),s.style.cssText="width:"+e+"px;height:"+e/r+"px;margin-top:"+(t-e/r)/2+"px"):(this.setState({image:{src:this.state.image.src,width:t*r,height:t}}),s.style.cssText="width:"+t*r+"px;height:"+t+"px;margin-left:"+(e-t*r)/2+"px;"),this.imgChangeRatio=n/this.state.image.width}},{key:"doCrop",value:function(t){var e=t.target;e.value=e.value+"...",e.disabled=!0,"object"!==c(this.data)&&(this.data={});var n=this.__find(".select-recorte");this.data.request="crop",this.data.toCropImgX=parseInt(window.getComputedStyle(n).left)*this.imgChangeRatio,this.data.toCropImgY=parseInt(window.getComputedStyle(n).top)*this.imgChangeRatio,this.data.toCropImgW=parseInt(window.getComputedStyle(n).width)*this.imgChangeRatio,this.data.toCropImgH=parseInt(window.getComputedStyle(n).height)*this.imgChangeRatio,this.tryAjaxUpload(function(){e.value=e.value.replace("...",""),e.disabled=!1})}},{key:"cancel",value:function(){this.files="",this.setState({hasImage:!1}),this.__find("input").value="",document.body.removeAttribute("style")}},{key:"tryAjaxUpload",value:function(t){for(var e=this,n=new FormData,o=0;o0&&h.append(u,o[u].files[0]):o[u]instanceof Blob?h.append(u,o[u],o.name):h.append(u,o[u]));o=h}if(a.open(t,e,!0),l&&("responseType"in a?a.responseType=l:a.overrideMimeType("text/plain; charset=x-user-defined")),n)for(u in n)a.setRequestHeader(u,n[u]);return a.send(o),a},function(){if("production"!==e.env.NODE_ENV){if("undefined"==typeof __REACT_HOT_LOADER__)return;if("function"==typeof t.exports)return void __REACT_HOT_LOADER__.register(t.exports,"module.exports","/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/xhr.js");for(var n in t.exports)if(Object.prototype.hasOwnProperty.call(t.exports,n)){var o=void 0;try{o=t.exports[n]}catch(r){continue}__REACT_HOT_LOADER__.register(o,n,"/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/xhr.js")}}}()}).call(e,n(14))},function(t,e,n){(function(o){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;nthis.splitY?parseInt(a)<=i/2+n&&(parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=window.getComputedStyle(e).width),this.el.style.width=this.coor.w+(h?t.changedTouches[0].clientX:t.clientX)-this.coor.x+"px",this.el.style.height=parseInt(this.el.offsetWidth)*(this.splitY/this.splitX)+"px",n>o?parseInt(this.el.offsetWidth)>=parseInt(window.getComputedStyle(e).height)&&(this.el.style.height=window.getComputedStyle(e).height,this.el.style.width=parseInt(window.getComputedStyle(e).height)*(this.splitX/this.splitY)+"px"):n=n&&(this.el.style.width=window.getComputedStyle(e).width,this.el.style.height=n*(this.splitY/this.splitX)+"px"):parseInt(this.el.offsetHeight)>=n&&(this.el.style.width=n,this.el.style.height=n*(this.splitY/this.splitX)+"px")):this.splitXo?parseInt(this.el.offsetHeight)>=o&&(this.el.style.height=o,this.el.style.width=o*(this.splitX/this.splitY)+"px"):n=n&&(this.el.style.width=n,this.el.style.height=n*(this.splitY/this.splitX)+"px"):parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=n,this.el.style.height=n*(this.splitY/this.splitX)+"px")):parseInt(a)<=i/2+n&&(this.el.style.width=this.coor.w+(h?t.changedTouches[0].clientX:t.clientX)-this.coor.x+"px",this.el.style.height=this.el.style.width,n>o?parseInt(this.el.offsetHeight)>=o&&(this.el.style.height=o,this.el.style.width=o):n=n&&(this.el.style.width=n,this.el.style.height=n):parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=this.el.style.height=n))}}},{key:"stopDrag",value:function(){this.el=null,h&&(document.removeEventListener("touchmove",l,!1),document.removeEventListener("touchend",u,!1)),document.removeEventListener("mousemove",l,!1),document.removeEventListener("mouseup",u,!1)}}]),t}();e["default"]=d,function(){if("production"!==o.env.NODE_ENV){if("undefined"==typeof __REACT_HOT_LOADER__)return;if("function"==typeof t.exports)return void __REACT_HOT_LOADER__.register(t.exports,"module.exports","/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/resize.js");for(var e in t.exports)if(Object.prototype.hasOwnProperty.call(t.exports,e)){var n=void 0;try{n=t.exports[e]}catch(r){continue}__REACT_HOT_LOADER__.register(n,e,"/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/resize.js")}}}()}).call(e,n(14))},function(t,e,n){(function(e){"use strict";t.exports={isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},function(){if("production"!==e.env.NODE_ENV){if("undefined"==typeof __REACT_HOT_LOADER__)return;if("function"==typeof t.exports)return void __REACT_HOT_LOADER__.register(t.exports,"module.exports","/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/helper.js");for(var n in t.exports)if(Object.prototype.hasOwnProperty.call(t.exports,n)){var o=void 0;try{o=t.exports[n]}catch(r){continue}__REACT_HOT_LOADER__.register(o,n,"/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/helper.js")}}}()}).call(e,n(14))},function(t,e,n){(function(o){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n=this.coor.maxLeft&&(o=this.coor.maxLeft),r<=0&&(r=0),r>=this.coor.maxTop&&(r=this.coor.maxTop),this.el.style.left=o+"px",this.el.style.top=r+"px"}}},{key:"stopMove",value:function(){return this.el=null,l?(document.removeEventListener("touchmove",u,!1),void document.removeEventListener("touchend",h,!1)):(document.removeEventListener("mousemove",u,!1),void document.removeEventListener("mouseup",h,!1))}}]),t}();e["default"]=p,function(){if("production"!==o.env.NODE_ENV){if("undefined"==typeof __REACT_HOT_LOADER__)return;if("function"==typeof t.exports)return void __REACT_HOT_LOADER__.register(t.exports,"module.exports","/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/drag.js");for(var e in t.exports)if(Object.prototype.hasOwnProperty.call(t.exports,e)){var n=void 0;try{n=t.exports[e]}catch(r){continue}__REACT_HOT_LOADER__.register(n,e,"/Applications/XAMPP/xamppfiles/htdocs/code/react-core-image-upload/src/lib/drag.js")}}}()}).call(e,n(14))},function(t,e,n){var o=n(88);"string"==typeof o&&(o=[[t.id,o,""]]);n(90)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(89)(),e.push([t.id,".g-core-image-upload-btn{position:relative;overflow:hidden}.g-core-image-upload-form{position:absolute;left:0;right:0;top:0;bottom:0;opacity:0}.g-core-image-upload-container{position:absolute;background:#111;z-index:900}.g-core-image-upload-modal{position:absolute;left:0;right:0;width:100%;height:100%;border:1px solid #ccc;z-index:899}.dropped{border:4px solid #ea6153}.g-core-image-corp-container{z-index:1900;position:fixed;left:0;right:0;top:0;bottom:0;background:rgba(0,0,0,.9);color:#f1f1f1}.g-core-image-corp-container .image-aside{overflow:hidden;position:absolute;right:30px;left:30px;top:60px;bottom:20px;text-align:center}.g-core-image-corp-container .image-aside img{max-width:100%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.g-core-image-corp-container .info-aside{position:absolute;left:0;right:0;top:0;height:40px;padding-left:10px;padding-right:10px;background:#fefefe;color:#777}.g-core-image-corp-container .info-aside .image-corp-preview{position:relative;overflow:hidden;text-align:center;border:2px solid #ccc}.g-core-image-corp-container .info-aside .image-corp-preview.circled{border-radius:160px}.g-core-image-corp-container .info-aside .image-corp-preview img{width:100%}.g-core-image-corp-container .btn-groups{text-align:right;margin:5px 0 0}.g-core-image-corp-container .btn{display:inline-block;padding:0 15px;height:32px;margin-left:15px;background:#fff;border:1px solid #ccc;border-radius:2px;font-size:13px;color:#222;line-height:32px;transition:all .1s ease-in}.g-core-image-corp-container .btn:hover{border:1px solid #777;box-shadow:0 1px 3px rgba(0,0,0,.05)},.g-core-image-corp-container .btn:active{background:#ddd}.g-core-image-corp-container .btn:disabled{background:#eee!important;border-color:#ccc;cursor:not-allowed}.g-core-image-corp-container .btn-upload{background:#2d2d2d;border-color:#3d3d3d;color:#fff}.g-core-image-corp-container .btn-upload:hover{background:#222;border-color:#222;box-shadow:0 1px 3px rgba(0,0,0,.05)}.g-core-image-corp-container .g-crop-image-box,.g-core-image-corp-container .g-crop-image-box .g-crop-image-principal{position:relative}.g-core-image-corp-container .g-crop-image-box .select-recorte{position:absolute;background:#fff;opacity:.55;border:2px dashed rgba(0,0,0,.8);cursor:move}.g-core-image-corp-container .g-resize{z-index:90;position:absolute;bottom:0;right:0;width:20px;height:20px;cursor:se-resize}.g-core-image-corp-container .g-resize:after{content:'';display:block;position:absolute;background:rgba(0,0,0,.8);width:5px;height:5px;right:0;bottom:0}.g-core-image-corp-container .g-e-resize{cursor:e-resize;position:absolute;width:7px;right:-5px;top:0;height:100%}.g-core-image-corp-container .g-s-resize{position:absolute;cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&y.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",i(t,e),e}function c(t){var e=document.createElement("link");return e.rel="stylesheet",i(t,e),e}function l(t,e){var n,o,r;if(e.singleton){var i=b++;n=v||(v=a(e)),o=u.bind(null,n,i,!1),r=u.bind(null,n,i,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=c(e),o=p.bind(null,n),r=function(){s(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(e),o=h.bind(null,n),r=function(){s(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}function u(t,e,n,o){var r=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=x(e,r);else{var i=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(i,s[e]):t.appendChild(i)}}function h(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function p(t,e){var n=e.css,o=e.sourceMap;o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var r=new Blob([n],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(r),i&&URL.revokeObjectURL(i)}var f={},d=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},m=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=d(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,b=0,y=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=m()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=r(t);return o(n,e),function(t){for(var i=[],s=0;s