bfg-common 1.1.106 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/minify.js +126 -51
- package/package.json +4 -2
- package/plugins/spice-console/spice.console.ts +3 -113
- package/public/spice-console-minify/run.min.js +68 -96
- package/public/spice-console-minify/application/WorkerProcess.min.js +0 -1
- package/public/spice-console-minify/application/WorkerProcess_back.min.js +0 -1
- package/public/spice-console-minify/application/WorkerProcess_meta.min.js +0 -1
- package/public/spice-console-minify/application/WorkerProcess_reverse.min.js +0 -1
- package/public/spice-console-minify/application/agent.min.js +0 -1
- package/public/spice-console-minify/application/application.min.js +0 -1
- package/public/spice-console-minify/application/checkActivity.min.js +0 -1
- package/public/spice-console-minify/application/clientgui.min.js +0 -1
- package/public/spice-console-minify/application/clipboard/clipboarddataparser.min.js +0 -1
- package/public/spice-console-minify/application/clipboard/local/localClipboard.min.js +0 -1
- package/public/spice-console-minify/application/clipboard.min.js +0 -1
- package/public/spice-console-minify/application/codec.min.js +0 -1
- package/public/spice-console-minify/application/imagecache.min.js +0 -1
- package/public/spice-console-minify/application/inputmanager.min.js +0 -1
- package/public/spice-console-minify/application/packetfactory.min.js +0 -1
- package/public/spice-console-minify/application/packetfilter.min.js +0 -1
- package/public/spice-console-minify/application/packetprocess.min.js +0 -1
- package/public/spice-console-minify/application/rasteroperation.min.js +0 -1
- package/public/spice-console-minify/application/spiceconnection.min.js +0 -1
- package/public/spice-console-minify/application/stream.min.js +0 -1
- package/public/spice-console-minify/application/virtualmouse.min.js +0 -1
- package/public/spice-console-minify/keymaps/keyevent.min.js +0 -1
- package/public/spice-console-minify/keymaps/keymap.min.js +0 -1
- package/public/spice-console-minify/keymaps/keymapes.min.js +0 -1
- package/public/spice-console-minify/keymaps/keymapesObj.min.js +0 -1
- package/public/spice-console-minify/keymaps/keymapus.min.js +0 -1
- package/public/spice-console-minify/keymaps/scanCodeObjModifier.min.js +0 -1
- package/public/spice-console-minify/keymaps/scanCodeObjProvider.min.js +0 -1
- package/public/spice-console-minify/lib/AsyncConsumer.min.js +0 -1
- package/public/spice-console-minify/lib/AsyncWorker.min.js +0 -1
- package/public/spice-console-minify/lib/CollisionDetector.min.js +0 -1
- package/public/spice-console-minify/lib/DataLogger.min.js +0 -1
- package/public/spice-console-minify/lib/GenericObjectPool.min.js +0 -1
- package/public/spice-console-minify/lib/GlobalPool.min.js +0 -1
- package/public/spice-console-minify/lib/ImageUncompressor.min.js +0 -1
- package/public/spice-console-minify/lib/IntegrationBenchmark.min.js +0 -1
- package/public/spice-console-minify/lib/PacketWorkerIdentifier.min.js +0 -1
- package/public/spice-console-minify/lib/SyncAsyncHandler.min.js +0 -1
- package/public/spice-console-minify/lib/base64.min.js +0 -1
- package/public/spice-console-minify/lib/biginteger.min.js +0 -1
- package/public/spice-console-minify/lib/bowser.min.js +0 -1
- package/public/spice-console-minify/lib/decoder/dixie.min.js +0 -5
- package/public/spice-console-minify/lib/decoder/jmuxer.min.js +0 -1
- package/public/spice-console-minify/lib/displayRouter.min.js +0 -1
- package/public/spice-console-minify/lib/encrypt.min.js +0 -1
- package/public/spice-console-minify/lib/flipper.min.js +0 -1
- package/public/spice-console-minify/lib/graphic.min.js +0 -1
- package/public/spice-console-minify/lib/graphicdebug.min.js +0 -1
- package/public/spice-console-minify/lib/images/bitmap.min.js +0 -1
- package/public/spice-console-minify/lib/images/jsquic_family.min.js +0 -1
- package/public/spice-console-minify/lib/images/jsquic_rgba.min.js +0 -1
- package/public/spice-console-minify/lib/images/jsquic_uncompress.min.js +0 -1
- package/public/spice-console-minify/lib/images/lz.min.js +0 -1
- package/public/spice-console-minify/lib/images/png.min.js +0 -1
- package/public/spice-console-minify/lib/jgestures.min.js +0 -25
- package/public/spice-console-minify/lib/jquery-2.0.3.min.js +0 -25
- package/public/spice-console-minify/lib/jquery-mousewheel.min.js +0 -12
- package/public/spice-console-minify/lib/jquery-visibility.min.js +0 -2
- package/public/spice-console-minify/lib/jsbn.min.js +0 -1
- package/public/spice-console-minify/lib/jsbn2.min.js +0 -1
- package/public/spice-console-minify/lib/lodash.4.0.0.min.js +0 -6
- package/public/spice-console-minify/lib/modernizr.min.js +0 -1
- package/public/spice-console-minify/lib/pixastic.min.js +0 -1
- package/public/spice-console-minify/lib/prettyprint.min.js +0 -1
- package/public/spice-console-minify/lib/prng4.min.js +0 -1
- package/public/spice-console-minify/lib/queue.min.js +0 -1
- package/public/spice-console-minify/lib/rasterEngine.min.js +0 -1
- package/public/spice-console-minify/lib/rng.min.js +0 -1
- package/public/spice-console-minify/lib/runqueue.min.js +0 -1
- package/public/spice-console-minify/lib/sha1.min.js +0 -1
- package/public/spice-console-minify/lib/stuckkeyshandler.min.js +0 -1
- package/public/spice-console-minify/lib/timelapsedetector.min.js +0 -1
- package/public/spice-console-minify/lib/utils.min.js +0 -1
- package/public/spice-console-minify/lib/virtualjoystick.min.js +0 -1
- package/public/spice-console-minify/network/busconnection.min.js +0 -1
- package/public/spice-console-minify/network/clusternodechooser.min.js +0 -1
- package/public/spice-console-minify/network/connectioncontrol.min.js +0 -1
- package/public/spice-console-minify/network/packetcontroller.min.js +0 -1
- package/public/spice-console-minify/network/packetextractor.min.js +0 -1
- package/public/spice-console-minify/network/packetlinkfactory.min.js +0 -1
- package/public/spice-console-minify/network/packetreassembler.min.js +0 -1
- package/public/spice-console-minify/network/reassemblerfactory.min.js +0 -1
- package/public/spice-console-minify/network/sizedefiner.min.js +0 -1
- package/public/spice-console-minify/network/socket.min.js +0 -1
- package/public/spice-console-minify/network/socketqueue.min.js +0 -1
- package/public/spice-console-minify/network/spicechannel.min.js +0 -1
- package/public/spice-console-minify/network/websocketwrapper.min.js +0 -1
- package/public/spice-console-minify/process/busprocess.min.js +0 -1
- package/public/spice-console-minify/process/cursorprocess.min.js +0 -1
- package/public/spice-console-minify/process/displaypreprocess.min.js +0 -1
- package/public/spice-console-minify/process/displayprocess.min.js +0 -1
- package/public/spice-console-minify/process/inputprocess.min.js +0 -1
- package/public/spice-console-minify/process/mainprocess.min.js +0 -1
- package/public/spice-console-minify/process/playbackprocess.min.js +0 -1
- package/public/spice-console-minify/spiceobjects/generated/protocol.min.js +0 -1
- package/public/spice-console-minify/spiceobjects/spiceobjects.min.js +0 -1
- package/public/spice-console-minify/swcanvas/swcanvas.min.js +0 -1
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* lodash 4.0.0 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
|
|
4
|
-
* Build: `lodash -o ./dist/lodash.js`
|
|
5
|
-
*/
|
|
6
|
-
(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r?r.length:0){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t){for(var r=-1,e=n.length;++r<e&&!1!==t(n[r],r,n););return n}function u(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return!1;return!0}function o(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function i(n,t){return!!n.length&&-1<g(n,t,0)}function f(n,t,r){for(var e=-1,u=n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function s(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n,t,r){for(var e=-1,u=n.length;++e<u;){var o=n[e],i=t(o);if(null!=i&&(f===M?i==i:r(i,f)))var f=i,c=o}return c}function _(n,t,r,e){var u;return r(n,(function(n,r,o){return t(n,r,o)?(u=e?r:n,!1):void 0})),u}function v(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function g(n,t,r){if(t!=t)return S(n,r);--r;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function d(n,t,r,e,u){return u(n,(function(n,u,o){r=e?(e=!1,n):t(r,n,u,o)})),r}function y(n,t){for(var r,e=-1,u=n.length;++e<u;){var o=t(n[e]);o!==M&&(r=r===M?o:r+o)}return r}function b(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function x(n,t){return c(t,(function(t){return[t,n[t]]}))}function j(n){return function(t){return n(t)}}function m(n,t){return c(t,(function(t){return n[t]}))}function w(n,t){for(var r=-1,e=n.length;++r<e&&-1<g(t,n[r],0););return r}function A(n,t){for(var r=n.length;r--&&-1<g(t,n[r],0););return r}function O(n){return n&&n.Object===Object?n:null}function E(n,t){if(n!==t){var r=null===n,e=n===M,u=n==n,o=null===t,i=t===M,f=t==t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(t>n&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function k(n){return Sn[n]}function I(n){return Wn[n]}function R(n){return"\\"+zn[n]}function S(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!=u)return t}return-1}function W(n){var t=!1;if(null!=n&&"function"!=typeof n.toString)try{t=!!(n+"")}catch(n){}return t}function C(n,t){return(n="number"==typeof n||vn.test(n)?+n:-1)>-1&&0==n%1&&(null==t?9007199254740991:t)>n}function U(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function z(n){var t=-1,r=Array(n.size);return n.forEach((function(n,e){r[++t]=[e,n]})),r}function B(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]="__lodash_placeholder__",o[++u]=r);return o}function L(n){var t=-1,r=Array(n.size);return n.forEach((function(n){r[++t]=n})),r}function $(n){if(!n||!wn.test(n))return n.length;for(var t=mn.lastIndex=0;mn.test(n);)t++;return t}function F(n){return Cn[n]}var M,N=1/0,Z=NaN,D=/\b__p\+='';/g,q=/\b(__p\+=)''\+/g,P=/(__e\(.*?\)|\b__t\))\+'';/g,T=/&(?:amp|lt|gt|quot|#39|#96);/g,K=/[&<>"'`]/g,G=RegExp(T.source),V=RegExp(K.source),J=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,nn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,tn=/[\\^$.*+?()[\]{}|]/g,rn=RegExp(tn.source),en=/^\s+|\s+$/g,un=/^\s+/,on=/\s+$/,fn=/\\(\\)?/g,cn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,an=/\w*$/,ln=/^0x/i,sn=/^[-+]0x[0-9a-f]+$/i,hn=/^0b[01]+$/i,pn=/^\[object .+?Constructor\]$/,_n=/^0o[0-7]+$/i,vn=/^(?:0|[1-9]\d*)$/,gn=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,dn=/($^)/,yn=/['\n\r\u2028\u2029\\]/g,bn="[\\ufe0e\\ufe0f]?(?:\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:\\ud83c[\\udffb-\\udfff])?)*",xn="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+bn,jn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe23]","g"),mn=RegExp("(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe23]?|[\\u0300-\\u036f\\ufe20-\\ufe23]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])"+bn,"g"),wn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\ufe0e\\ufe0f]"),An=/[a-zA-Z0-9]+/g,On=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+|\\d+(?:(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2018\\u2019\\u201c\\u201d \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+)?",xn].join("|"),"g"),En=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,kn="Array Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Reflect RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),In={};In["[object Float32Array]"]=In["[object Float64Array]"]=In["[object Int8Array]"]=In["[object Int16Array]"]=In["[object Int32Array]"]=In["[object Uint8Array]"]=In["[object Uint8ClampedArray]"]=In["[object Uint16Array]"]=In["[object Uint32Array]"]=!0,In["[object Arguments]"]=In["[object Array]"]=In["[object ArrayBuffer]"]=In["[object Boolean]"]=In["[object Date]"]=In["[object Error]"]=In["[object Function]"]=In["[object Map]"]=In["[object Number]"]=In["[object Object]"]=In["[object RegExp]"]=In["[object Set]"]=In["[object String]"]=In["[object WeakMap]"]=!1;var Rn={};Rn["[object Arguments]"]=Rn["[object Array]"]=Rn["[object ArrayBuffer]"]=Rn["[object Boolean]"]=Rn["[object Date]"]=Rn["[object Float32Array]"]=Rn["[object Float64Array]"]=Rn["[object Int8Array]"]=Rn["[object Int16Array]"]=Rn["[object Int32Array]"]=Rn["[object Map]"]=Rn["[object Number]"]=Rn["[object Object]"]=Rn["[object RegExp]"]=Rn["[object Set]"]=Rn["[object String]"]=Rn["[object Symbol]"]=Rn["[object Uint8Array]"]=Rn["[object Uint8ClampedArray]"]=Rn["[object Uint16Array]"]=Rn["[object Uint32Array]"]=!0,Rn["[object Error]"]=Rn["[object Function]"]=Rn["[object WeakMap]"]=!1;var Sn={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Wn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Cn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Un={function:!0,object:!0},zn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Bn=parseFloat,Ln=parseInt,$n=Un[typeof exports]&&exports&&!exports.nodeType?exports:null,Fn=Un[typeof module]&&module&&!module.nodeType?module:null,Mn=O(Un[typeof self]&&self),Nn=O(Un[typeof window]&&window),Zn=Fn&&Fn.exports===$n?$n:null,Dn=O(Un[typeof this]&&this),qn=O($n&&Fn&&"object"==typeof global&&global)||Nn!==(Dn&&Dn.window)&&Nn||Mn||Dn||Function("return this")(),Pn=function O(vn){function bn(n){if(ee(n)&&!xo(n)&&!(n instanceof Wn)){if(n instanceof Sn)return n;if(Pe.call(n,"__wrapped__"))return kr(n)}return new Sn(n)}function xn(){}function Sn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=M}function Wn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Cn(){}function Un(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function zn(n){var t=-1,r=n?n.length:0;for(this.__data__=new Un;++t<r;)this.push(n[t])}function $n(n,t){var r=n.__data__;return br(t)?(r=r.__data__,"__lodash_hash_undefined__"===("string"==typeof t?r.string:r.hash)[t]):r.has(t)}function Fn(n){var t=-1,r=n?n.length:0;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function Mn(n,t){var r=Zn(n,t);return!(0>r)&&(r==n.length-1?n.pop():iu.call(n,r,1),!0)}function Nn(n,t){var r=Zn(n,t);return 0>r?M:n[r][1]}function Zn(n,t){for(var r=n.length;r--;)if(Gr(n[r][0],t))return r;return-1}function Dn(n,t,r){var e=Zn(n,t);0>e?n.push([t,r]):n[e][1]=r}function Tn(n,t,r,e){return n===M||Gr(n,De[r])&&!Pe.call(e,r)?t:n}function Kn(n,t,r){(r!==M&&!Gr(n[t],r)||"number"==typeof t&&r===M&&!(t in n))&&(n[t]=r)}function Gn(n,t,r){var e=n[t];(!Gr(e,r)||Gr(e,De[t])&&!Pe.call(n,t)||r===M&&!(t in n))&&(n[t]=r)}function Vn(n,t){return n&&Zt(t,je(t),n)}function Jn(n,t){for(var r=-1,e=null==n,u=t.length,o=Array(u);++r<u;)o[r]=e?M:ye(n,t[r]);return o}function Yn(n,t,r){return n==n&&(r!==M&&(n=n>r?r:n),t!==M&&(n=t>n?t:n)),n}function Hn(n,t,r,u,o,i){var f;if(r&&(f=o?r(n,u,o,i):r(n)),f!==M)return f;if(!re(n))return n;if(u=xo(n)){if(f=function(n){var t=n.length,r=n.constructor(t);return t&&"string"==typeof n[0]&&Pe.call(n,"index")&&(r.index=n.index,r.input=n.input),r}(n),!t)return Nt(n,f)}else{var c=pr(n),a="[object Function]"==c||"[object GeneratorFunction]"==c;if("[object Object]"!=c&&"[object Arguments]"!=c&&(!a||o))return Rn[c]?vr(n,c,t):o?n:{};if(W(n))return o?n:{};if(f=function(n){return n=n.constructor,Iu(Xr(n)?n.prototype:M)}(a?{}:n),!t)return qt(n,Vn(f,n))}return i||(i=new Fn),(o=i.get(n))?o:(i.set(n,f),(u?e:et)(n,(function(e,u){Gn(f,u,Hn(e,t,r,u,n,i))})),u?f:qt(n,f))}function Qn(n,t,r){if("function"!=typeof n)throw new Ne("Expected a function");return ou((function(){n.apply(M,r)}),t)}function Xn(n,t,r,e){var u=-1,o=i,a=!0,l=n.length,s=[],h=t.length;if(!l)return s;r&&(t=c(t,j(r))),e?(o=f,a=!1):t.length>=200&&(o=$n,a=!1,t=new zn(t));n:for(;++u<l;){var p=n[u],_=r?r(p):p;if(a&&_==_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else o(t,_,e)||s.push(p)}return s}function nt(n,t){var r=!0;return Ru(n,(function(n,e,u){return r=!!t(n,e,u)})),r}function tt(n,t){var r=[];return Ru(n,(function(n,e,u){t(n,e,u)&&r.push(n)})),r}function rt(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++u<o;){var i=n[u];Hr(i)&&(r||xo(i)||Jr(i))?t?rt(i,t,r,e):a(e,i):r||(e[e.length]=i)}return e}function et(n,t){return n&&Wu(n,t,je)}function ut(n,t){return n&&Cu(n,t,je)}function ot(n,t){return o(t,(function(t){return Xr(n[t])}))}function it(n,t){for(var r=0,e=(t=yr(t,n)?[t+""]:Ct(t)).length;null!=n&&e>r;)n=n[t[r++]];return r&&r==e?n:M}function ft(n,t){return Pe.call(n,t)||"object"==typeof n&&t in n&&null===tu(n)}function ct(n,t){return t in Object(n)}function at(n,t,r){for(var e=r?f:i,u=n.length,o=u,a=Array(u),l=[];o--;){var s=n[o];o&&t&&(s=c(s,j(t))),a[o]=r||!t&&120>s.length?M:new zn(o&&s)}var h=-1,p=(s=n[0]).length,_=a[0];n:for(;++h<p;){var v=s[h],g=t?t(v):v;if(_?!$n(_,g):!e(l,g,r)){for(o=u;--o;){var d=a[o];if(d?!$n(d,g):!e(n[o],g,r))continue n}_&&_.push(g),l.push(v)}}return l}function lt(n,t,e){return yr(t,n)||(n=wr(n,t=Ct(t)),t=Wr(t)),null==(t=null==n?n:n[t])?M:r(t,n,e)}function st(n,t,r,e,u){if(n===t)n=!0;else if(null==n||null==t||!re(n)&&!ee(t))n=n!=n&&t!=t;else n:{var o=xo(n),i=xo(t),f="[object Array]",c="[object Array]";o||("[object Arguments]"==(f=pr(n))?f="[object Object]":"[object Object]"!=f&&(o=le(n))),i||("[object Arguments]"==(c=pr(t))?c="[object Object]":"[object Object]"!=c&&le(t));var a="[object Object]"==f&&!W(n);i="[object Object]"==c&&!W(t);if(!(c=f==c)||o||a){if(!(2&e)&&(f=a&&Pe.call(n,"__wrapped__"),i=i&&Pe.call(t,"__wrapped__"),f||i)){n=st(f?n.value():n,i?t.value():t,r,e,u);break n}c?(u||(u=new Fn),n=(o?fr:cr)(n,t,st,r,e,u)):n=!1}else n=function(n,t,r,e,u,o){switch(r){case"[object ArrayBuffer]":if(n.byteLength!=t.byteLength||!e(new Qe(n),new Qe(t)))break;return!0;case"[object Boolean]":case"[object Date]":return+n==+t;case"[object Error]":return n.name==t.name&&n.message==t.message;case"[object Number]":return n!=+n?t!=+t:n==+t;case"[object RegExp]":case"[object String]":return n==t+"";case"[object Map]":var i=z;case"[object Set]":return i||(i=L),(2&o||n.size==t.size)&&e(i(n),i(t),u,1|o);case"[object Symbol]":return!!Ye&&Ou.call(n)==Ou.call(t)}return!1}(n,t,f,st,r,e)}return n}function ht(n,t,r,e){var u=r.length,o=u,i=!e;if(null==n)return!o;for(n=Object(n);u--;){var f=r[u];if(i&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<o;){var c=(f=r[u])[0],a=n[c],l=f[1];if(i&&f[2]){if(a===M&&!(c in n))return!1}else if(f=new Fn,(c=e?e(a,l,c,n,t,f):M)===M?!st(l,a,e,3,f):!c)return!1}return!0}function pt(n){var t=typeof n;return"function"==t?n:null==n?Re:"object"==t?xo(n)?dt(n[0],n[1]):gt(n):ze(n)}function _t(n){n=null==n?n:Object(n);var t,r=[];for(t in n)r.push(t);return r}function vt(n,t){var r=-1,e=Yr(n)?Array(n.length):[];return Ru(n,(function(n,u,o){e[++r]=t(n,u,o)})),e}function gt(n){var t=sr(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null!=n&&(n[r]===e&&(e!==M||r in Object(n)))}}return function(r){return r===n||ht(r,n,t)}}function dt(n,t){return function(r){var e=ye(r,n);return e===M&&e===t?xe(r,n):st(t,e,M,3)}}function yt(n,t,r,u){if(n!==t){var o=xo(t)||le(t)?M:me(t);e(o||t,(function(e,i){if(o&&(e=t[i=e]),re(e)){u||(u=new Fn);var f=i,c=u,a=n[f],l=t[f];if(s=c.get(l)||c.get(a))Kn(n,f,s);else{var s,h=(s=r?r(a,l,f+"",n,t,c):M)===M;h&&(s=l,xo(l)||le(l)?s=xo(a)?a:Hr(a)?Nt(a):Hn(l):ie(l)||Jr(l)?s=Jr(a)?ge(a):re(a)?a:Hn(l):h=Xr(l)),c.set(l,s),h&&yt(s,l,r,c),Kn(n,f,s)}}else(f=r?r(n[i],e,i+"",n,t,u):M)===M&&(f=e),Kn(n,i,f)}))}}function bt(n,t,r){var e=-1,u=lr();return t=c(t.length?t:Array(1),(function(n){return u(n)})),n=vt(n,(function(n){return{a:c(t,(function(t){return t(n)})),b:++e,c:n}})),function(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}(n,(function(n,t){var e;n:{e=-1;for(var u=n.a,o=t.a,i=u.length,f=r.length;++e<i;){var c=E(u[e],o[e]);if(c){e=f>e?c*("desc"==r[e]?-1:1):c;break n}}e=n.b-t.b}return e}))}function xt(n,t){return n=Object(n),l(t,(function(t,r){return r in n&&(t[r]=n[r]),t}),{})}function jt(n,t){var r={};return function(n,t){null==n||Wu(n,t,me)}(n,(function(n,e){t(n)&&(r[e]=n)})),r}function mt(n){return function(t){return null==t?M:t[n]}}function wt(n,t,r){var e=-1,u=t.length,o=n;for(r&&(o=c(n,(function(n){return r(n)})));++e<u;){var i=0,f=t[e];for(f=r?r(f):f;-1<(i=g(o,f,i));)o!==n&&iu.call(o,i,1),iu.call(n,i,1)}return n}function At(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(e==r||u!=o){var o=u;if(C(u))iu.call(n,u,1);else if(yr(u,n))delete n[u];else{var i=wr(n,u=Ct(u));null!=i&&delete i[Wr(u)]}}}}function Ot(n,t){return n+cu(vu()*(t-n+1))}function Et(n,t,r,e){for(var u=-1,o=(t=yr(t,n)?[t+""]:Ct(t)).length,i=o-1,f=n;null!=f&&++u<o;){var c=t[u];if(re(f)){var a=r;if(u!=i){var l=f[c];(a=e?e(l,c,f):M)===M&&(a=null==l?C(t[u+1])?[]:{}:l)}Gn(f,c,a)}f=f[c]}return n}function kt(n,t,r){var e=-1,u=n.length;for(0>t&&(t=-t>u?0:u+t),0>(r=r>u?u:r)&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Array(u);++e<u;)r[e]=n[e+t];return r}function It(n,t){var r;return Ru(n,(function(n,e,u){return!(r=t(n,e,u))})),!!r}function Rt(n,t,r){var e=0,u=n?n.length:e;if("number"==typeof t&&t==t&&2147483647>=u){for(;u>e;){var o=e+u>>>1,i=n[o];(r?t>=i:t>i)&&null!==i?e=o+1:u=o}return u}return St(n,t,Re,r)}function St(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!=t,f=null===t,c=t===M;o>u;){var a=cu((u+o)/2),l=r(n[a]),s=l!==M,h=l==l;(i?h||e:f?h&&s&&(e||null!=l):c?h&&(e||s):null!=l&&(e?t>=l:t>l))?u=a+1:o=a}return pu(o,4294967294)}function Wt(n,t){for(var r=0,e=n.length,u=n[0],o=t?t(u):u,i=o,f=0,c=[u];++r<e;)u=n[r],Gr(o=t?t(u):u,i)||(i=o,c[++f]=u);return c}function Ct(n){return xo(n)?n:Ar(n)}function Ut(n,t,r){var e=-1,u=i,o=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(o<200)l=t?[]:a;else{if(u=t?null:zu(n))return L(u);c=!1,u=$n,l=new zn}n:for(;++e<o;){var s=n[e],h=t?t(s):s;if(c&&h==h){for(var p=l.length;p--;)if(l[p]===h)continue n;t&&l.push(h),a.push(s)}else u(l,h,r)||(l!==a&&l.push(h),a.push(s))}return a}function zt(n,t,r,e){for(var u=n.length,o=e?u:-1;(e?o--:++o<u)&&t(n[o],o,n););return r?kt(n,e?0:o,e?o+1:u):kt(n,e?o+1:0,e?u:o)}function Bt(n,t){var r=n;return r instanceof Wn&&(r=r.value()),l(t,(function(n,t){return t.func.apply(t.thisArg,a([n],t.args))}),r)}function Lt(n,t,r){for(var e=-1,u=n.length;++e<u;)var o=o?a(Xn(o,n[e],t,r),Xn(n[e],o,t,r)):n[e];return o&&o.length?Ut(o,t,r):[]}function $t(n){var t=new n.constructor(n.byteLength);return new Qe(t).set(new Qe(n)),t}function Ft(n,t,r){for(var e=r.length,u=-1,o=hu(n.length-e,0),i=-1,f=t.length,c=Array(f+o);++i<f;)c[i]=t[i];for(;++u<e;)c[r[u]]=n[u];for(;o--;)c[i++]=n[u++];return c}function Mt(n,t,r){for(var e=-1,u=r.length,o=-1,i=hu(n.length-u,0),f=-1,c=t.length,a=Array(i+c);++o<i;)a[o]=n[o];for(i=o;++f<c;)a[i+f]=t[f];for(;++e<u;)a[i+r[e]]=n[o++];return a}function Nt(n,t){var r=-1,e=n.length;for(t||(t=Array(e));++r<e;)t[r]=n[r];return t}function Zt(n,t,r){return Dt(n,t,r)}function Dt(n,t,r,e){r||(r={});for(var u=-1,o=t.length;++u<o;){var i=t[u];Gn(r,i,e?e(r[i],n[i],i,r,n):n[i])}return r}function qt(n,t){return Zt(n,$u(n),t)}function Pt(n,t){return function(r,e){var u=t?t():{};if(e=lr(e),xo(r))for(var o=-1,i=r.length;++o<i;){var f=r[o];n(u,f,e(f),r)}else Ru(r,(function(t,r,o){n(u,t,e(t),o)}));return u}}function Tt(n){return Kr((function(t,r){var e=-1,u=r.length,o=u>1?r[u-1]:M,i=u>2?r[2]:M;o="function"==typeof o?(u--,o):M;for(i&&dr(r[0],r[1],i)&&(o=3>u?M:o,u=1),t=Object(t);++e<u;)(i=r[e])&&n(t,i,o);return t}))}function Kt(n,t){return function(r,e){if(null==r)return r;if(!Yr(r))return n(r,e);for(var u=r.length,o=t?u:-1,i=Object(r);(t?o--:++o<u)&&!1!==e(i[o],o,i););return r}}function Gt(n){return function(t,r,e){for(var u=-1,o=Object(t),i=(e=e(t)).length;i--;){var f=e[n?i:++u];if(!1===r(o[f],f,o))break}return t}}function Vt(n){return function(t){t=de(t);var r=wn.test(t)?t.match(mn):M,e=r?r[0]:t.charAt(0);return t=r?r.slice(1).join(""):t.slice(1),e[n]()+t}}function Jt(n){return function(t){return l(Ie(Ee(t)),n,"")}}function Yt(n){return function(){switch((t=arguments).length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var t,r=Iu(n.prototype);return re(t=n.apply(r,t))?t:r}}function Ht(n,t,e){var u=Yt(n);return function o(){for(var i=arguments.length,f=i,c=Array(i),a=this&&this!==qn&&this instanceof o?u:n,l=o.placeholder;f--;)c[f]=arguments[f];return i-=(f=3>i&&c[0]!==l&&c[i-1]!==l?[]:B(c,l)).length,e>i?ur(n,t,Xt,l,M,c,f,M,M,e-i):r(a,this,c)}}function Qt(n){return Kr((function(t){var r=(t=rt(t)).length,e=r,u=Sn.prototype.thru;for(n&&t.reverse();e--;){if("function"!=typeof(i=t[e]))throw new Ne("Expected a function");if(u&&!o&&"wrapper"==ar(i))var o=new Sn([],!0)}for(e=o?e:r;++e<r;){var i,f="wrapper"==(u=ar(i=t[e]))?Bu(i):M;o=f&&xr(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?o[ar(f[0])].apply(o,f[3]):1==i.length&&xr(i)?o[u]():o.thru(i)}return function(){var n=(u=arguments)[0];if(o&&1==u.length&&xo(n)&&n.length>=200)return o.plant(n).value();for(var e=0,u=r?t[e].apply(this,u):n;++e<r;)u=t[e].call(this,u);return u}}))}function Xt(n,t,r,e,u,o,i,f,c,a){var l=128&t,s=1&t,h=2&t,p=8&t,_=16&t,v=512&t,g=h?M:Yt(n);return function d(){for(var y=x=arguments.length,b=Array(x);y--;)b[y]=arguments[y];if(e&&(b=Ft(b,e,u)),o&&(b=Mt(b,o,i)),p||_){var x=x-(j=B(b,y=d.placeholder)).length;if(a>x)return ur(n,t,Xt,y,r,b,j,f,c,a-x)}if(x=s?r:this,y=h?x[n]:n,f)for(var j=b.length,m=pu(f.length,j),w=Nt(b);m--;){var A=f[m];b[m]=C(A,j)?w[A]:M}else v&&b.length>1&&b.reverse();return l&&b.length>c&&(b.length=c),this&&this!==qn&&this instanceof d&&(y=g||Yt(y)),y.apply(x,b)}}function nr(n){return Kr((function(t){return t=c(rt(t),lr()),Kr((function(e){var u=this;return n(t,(function(n){return r(n,u,e)}))}))}))}function tr(n,t,r){return t=pe(t),n=$(n),t&&t>n?(n=ke(r=r===M?" ":r+"",fu((t-=n)/$(r))),wn.test(r)?n.match(mn).slice(0,t).join(""):n.slice(0,t)):""}function rr(n,t,e,u){var o=1&t,i=Yt(n);return function t(){for(var f=-1,c=arguments.length,a=-1,l=u.length,s=Array(l+c),h=this&&this!==qn&&this instanceof t?i:n;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++f];return r(h,o?e:this,s)}}function er(n){return function(t,r,e){e&&"number"!=typeof e&&dr(t,r,e)&&(r=e=M),t=(t=ve(t))==t?t:0,r===M?(r=t,t=0):r=ve(r)||0,e=e===M?r>t?1:-1:ve(e)||0;var u=-1;r=hu(fu((r-t)/(e||1)),0);for(var o=Array(r);r--;)o[n?r:++u]=t,t+=e;return o}}function ur(n,t,r,e,u,o,i,f,c,a){var l=8&t;return f=f?Nt(f):M,4&(t=(t|(l?32:64))&~(l?64:32))||(t&=-4),t=[n,t,u,l?o:M,l?i:M,o=l?M:o,i=l?M:i,f,c,a],r=r.apply(M,t),xr(n)&&Fu(r,t),r.placeholder=e,r}function or(n){var t=Fe[n];return function(n,r){if(n=ve(n),r=pe(r)){var e=(de(n)+"e").split("e");return+((e=(de(e=t(e[0]+"e"+(+e[1]+r)))+"e").split("e"))[0]+"e"+(+e[1]-r))}return t(n)}}function ir(n,t,r,e,u,o,i,f){var c=2&t;if(!c&&"function"!=typeof n)throw new Ne("Expected a function");var a=e?e.length:0;if(a||(t&=-97,e=u=M),i=i===M?i:hu(pe(i),0),f=f===M?f:pe(f),a-=u?u.length:0,64&t){var l=e,s=u;e=u=M}var h=c?M:Bu(n);return o=[n,t,r,e,u,l,s,o,i,f],h&&(t=(r=o[1])|(n=h[1]),e=128==n&&8==r||128==n&&256==r&&h[8]>=o[7].length||384==n&&h[8]>=h[7].length&&8==r,131>t||e)&&(1&n&&(o[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=o[3],o[3]=e?Ft(e,r,h[4]):Nt(r),o[4]=e?B(o[3],"__lodash_placeholder__"):Nt(h[4])),(r=h[5])&&(e=o[5],o[5]=e?Mt(e,r,h[6]):Nt(r),o[6]=e?B(o[5],"__lodash_placeholder__"):Nt(h[6])),(r=h[7])&&(o[7]=Nt(r)),128&n&&(o[8]=null==o[8]?h[8]:pu(o[8],h[8])),null==o[9]&&(o[9]=h[9]),o[0]=h[0],o[1]=t),n=o[0],t=o[1],r=o[2],e=o[3],u=o[4],!(f=o[9]=null==o[9]?c?0:n.length:hu(o[9]-a,0))&&24&t&&(t&=-25),(h?Uu:Fu)(t&&1!=t?8==t||16==t?Ht(n,t,f):32!=t&&33!=t||u.length?Xt.apply(M,o):rr(n,t,r,e):function(n,t,r){var e=1&t,u=Yt(n);return function t(){return(this&&this!==qn&&this instanceof t?u:n).apply(e?r:this,arguments)}}(n,t,r),o)}function fr(n,t,r,e,u,o){var i=-1,f=2&u,c=1&u,a=n.length,l=t.length;if(!(a==l||f&&l>a))return!1;if(l=o.get(n))return l==t;for(l=!0,o.set(n,t);++i<a;){var s=n[i],p=t[i];if(e)var _=f?e(p,s,i,t,n,o):e(s,p,i,n,t,o);if(_!==M){if(_)continue;l=!1;break}if(c){if(!h(t,(function(n){return s===n||r(s,n,e,u,o)}))){l=!1;break}}else if(s!==p&&!r(s,p,e,u,o)){l=!1;break}}return o.delete(n),l}function cr(n,t,r,e,u,o){var i=2&u,f=1&u,c=je(n),a=c.length,l=je(t);if(a!=l.length&&!i)return!1;for(var s=a;s--;){var h=c[s];if(!(i?h in t:ft(t,h))||!f&&h!=l[s])return!1}if(h=o.get(n))return h==t;for(f=!0,o.set(n,t),l=i;++s<a;){var p=n[h=c[s]],_=t[h];if(e)var v=i?e(_,p,h,t,n,o):e(p,_,h,n,t,o);if(v===M?p!==_&&!r(p,_,e,u,o):!v){f=!1;break}l||(l="constructor"==h)}return f&&!l&&((r=n.constructor)!=(e=t.constructor)&&"constructor"in n&&"constructor"in t&&!("function"==typeof r&&r instanceof r&&"function"==typeof e&&e instanceof e)&&(f=!1)),o.delete(n),f}function ar(n){for(var t=n.name+"",r=ku[t],e=r?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}function lr(){var n=(n=bn.iteratee||Se)===Se?pt:n;return arguments.length?n(arguments[0],arguments[1]):n}function sr(n){for(var t=(n=we(n)).length;t--;){var r=n[t][1];n[t][2]=r==r&&!re(r)}return n}function hr(n,t){var r=null==n?M:n[t];return ue(r)?r:M}function pr(n){return Ge.call(n)}function _r(n,t,r){if(null==n)return!1;var e=r(n,t);return e||yr(t)||null!=(n=wr(n,t=Ct(t)))&&(e=r(n,t=Wr(t))),e||te(n&&n.length)&&C(t,n.length)&&(xo(n)||ce(n)||Jr(n))}function vr(r,e,u){var o=r.constructor;switch(e){case"[object ArrayBuffer]":return $t(r);case"[object Boolean]":case"[object Date]":return new o(+r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return e=r.buffer,new r.constructor(u?$t(e):e,r.byteOffset,r.length);case"[object Map]":return u=r.constructor,l(z(r),n,new u);case"[object Number]":case"[object String]":return new o(r);case"[object RegExp]":return(u=new r.constructor(r.source,an.exec(r))).lastIndex=r.lastIndex,u;case"[object Set]":return u=r.constructor,l(L(r),t,new u);case"[object Symbol]":return Ye?Object(Ou.call(r)):{}}}function gr(n){var t=n?n.length:M;return te(t)&&(xo(n)||ce(n)||Jr(n))?b(t,String):null}function dr(n,t,r){if(!re(r))return!1;var e=typeof t;return!!("number"==e?Yr(r)&&C(t,r.length):"string"==e&&t in r)&&Gr(r[t],n)}function yr(n,t){return"number"==typeof n||!xo(n)&&(X.test(n)||!Q.test(n)||null!=t&&n in Object(t))}function br(n){var t=typeof n;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!==n||null==n}function xr(n){var t=ar(n),r=bn[t];return"function"==typeof r&&t in Wn.prototype&&(n===r||!!(t=Bu(r))&&n===t[0])}function jr(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||De)}function mr(n,t,r,e,u,o){return re(n)&&re(t)&&(o.set(t,n),yt(n,t,mr,o)),n===M?Hn(t):n}function wr(n,t){return 1==t.length?n:ye(n,kt(t,0,-1))}function Ar(n){var t=[];return de(n).replace(nn,(function(n,r,e,u){t.push(e?u.replace(fn,"$1"):r||n)})),t}function Or(n){return Hr(n)?n:[]}function Er(n){return"function"==typeof n?n:Re}function kr(n){if(n instanceof Wn)return n.clone();var t=new Sn(n.__wrapped__,n.__chain__);return t.__actions__=Nt(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function Ir(n,t,r){var e=n?n.length:0;return e?kt(n,0>(t=r||t===M?1:pe(t))?0:t,e):[]}function Rr(n,t,r){var e=n?n.length:0;return e?kt(n,0,0>(t=e-(t=r||t===M?1:pe(t)))?0:t):[]}function Sr(n){return n?n[0]:M}function Wr(n){var t=n?n.length:0;return t?n[t-1]:M}function Cr(n,t){return n&&n.length&&t&&t.length?wt(n,t):n}function Ur(n){return n?gu.call(n):n}function zr(n){if(!n||!n.length)return[];var t=0;return n=o(n,(function(n){return Hr(n)?(t=hu(n.length,t),!0):void 0})),b(t,(function(t){return c(n,mt(t))}))}function Br(n,t){if(!n||!n.length)return[];var e=zr(n);return null==t?e:c(e,(function(n){return r(t,M,n)}))}function Lr(n){return(n=bn(n)).__chain__=!0,n}function $r(n,t){return t(n)}function Fr(n,t){return"function"==typeof t&&xo(n)?e(n,t):Ru(n,Er(t))}function Mr(n,t){var r;if("function"==typeof t&&xo(n)){for(r=n.length;r--&&!1!==t(n[r],r,n););r=n}else r=Su(n,Er(t));return r}function Nr(n,t){var r=-1,e=he(n),u=(o=e.length)-1;for(t=Yn(pe(t),0,o);++r<t;){var o,i=e[o=Ot(r,u)];e[o]=e[r],e[r]=i}return e.length=t,e}function Zr(n){if(null==n)return 0;if(Yr(n)){var t=n.length;return t&&ce(n)?$(n):t}return je(n).length}function Dr(n,t,r){return t=r?M:t,t=n&&null==t?n.length:t,ir(n,128,M,M,M,M,t)}function qr(n,t){var r;if("function"!=typeof t)throw new Ne("Expected a function");return n=pe(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=M),r}}function Pr(n,t,r){function e(){p&&Xe(p),a&&Xe(a),v=0,c=a=h=p=_=M}function u(t,r){r&&Xe(r),a=p=_=M,t&&(v=lo(),l=n.apply(h,c),p||a||(c=h=M))}function o(){var n=t-(lo()-s);0>=n||n>t?u(_,a):p=ou(o,n)}function i(){u(y,p)}function f(){if(c=arguments,s=lo(),h=this,_=y&&(p||!g),!1===d)var r=g&&!p;else{a||g||(v=s);var e=d-(s-v),u=0>=e||e>d;u?(a&&(a=Xe(a)),v=s,l=n.apply(h,c)):a||(a=ou(i,e))}return u&&p?p=Xe(p):p||t===d||(p=ou(o,t)),r&&(u=!0,l=n.apply(h,c)),!u||p||a||(c=h=M),l}var c,a,l,s,h,p,_,v=0,g=!1,d=!1,y=!0;if("function"!=typeof n)throw new Ne("Expected a function");return t=ve(t)||0,re(r)&&(g=!!r.leading,d="maxWait"in r&&hu(ve(r.maxWait)||0,t),y="trailing"in r?!!r.trailing:y),f.cancel=e,f.flush=function(){return(p&&_||a&&y)&&(l=n.apply(h,c)),e(),l},f}function Tr(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)}if("function"!=typeof n||t&&"function"!=typeof t)throw new Ne("Expected a function");return r.cache=new Tr.Cache,r}function Kr(n,t){if("function"!=typeof n)throw new Ne("Expected a function");return t=hu(t===M?n.length-1:pe(t),0),function(){for(var e=arguments,u=-1,o=hu(e.length-t,0),i=Array(o);++u<o;)i[u]=e[t+u];switch(t){case 0:return n.call(this,i);case 1:return n.call(this,e[0],i);case 2:return n.call(this,e[0],e[1],i)}for(o=Array(t+1),u=-1;++u<t;)o[u]=e[u];return o[t]=i,r(n,this,o)}}function Gr(n,t){return n===t||n!=n&&t!=t}function Vr(n,t){return n>t}function Jr(n){return Hr(n)&&Pe.call(n,"callee")&&(!uu.call(n,"callee")||"[object Arguments]"==Ge.call(n))}function Yr(n){return null!=n&&!("function"==typeof n&&Xr(n))&&te(Lu(n))}function Hr(n){return ee(n)&&Yr(n)}function Qr(n){return ee(n)&&"string"==typeof n.message&&"[object Error]"==Ge.call(n)}function Xr(n){return"[object Function]"==(n=re(n)?Ge.call(n):"")||"[object GeneratorFunction]"==n}function ne(n){return"number"==typeof n&&n==pe(n)}function te(n){return"number"==typeof n&&n>-1&&0==n%1&&9007199254740991>=n}function re(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function ee(n){return!!n&&"object"==typeof n}function ue(n){return null!=n&&(Xr(n)?Je.test(qe.call(n)):ee(n)&&(W(n)?Je:pn).test(n))}function oe(n){return"number"==typeof n||ee(n)&&"[object Number]"==Ge.call(n)}function ie(n){if(!ee(n)||"[object Object]"!=Ge.call(n)||W(n))return!1;var t=De;return"function"==typeof n.constructor&&(t=tu(n)),null===t||"function"==typeof(n=t.constructor)&&n instanceof n&&qe.call(n)==Ke}function fe(n){return re(n)&&"[object RegExp]"==Ge.call(n)}function ce(n){return"string"==typeof n||!xo(n)&&ee(n)&&"[object String]"==Ge.call(n)}function ae(n){return"symbol"==typeof n||ee(n)&&"[object Symbol]"==Ge.call(n)}function le(n){return ee(n)&&te(n.length)&&!!In[Ge.call(n)]}function se(n,t){return t>n}function he(n){if(!n)return[];if(Yr(n))return ce(n)?n.match(mn):Nt(n);if(eu&&n[eu])return U(n[eu]());var t=pr(n);return("[object Map]"==t?z:"[object Set]"==t?L:Ae)(n)}function pe(n){if(!n)return 0===n?n:0;if((n=ve(n))===N||n===-N)return 17976931348623157e292*(0>n?-1:1);var t=n%1;return n==n?t?n-t:n:0}function _e(n){return n?Yn(pe(n),0,4294967295):0}function ve(n){if(re(n)&&(n=re(n=Xr(n.valueOf)?n.valueOf():n)?n+"":n),"string"!=typeof n)return 0===n?n:+n;n=n.replace(en,"");var t=hn.test(n);return t||_n.test(n)?Ln(n.slice(2),t?2:8):sn.test(n)?Z:+n}function ge(n){return Zt(n,me(n))}function de(n){if("string"==typeof n)return n;if(null==n)return"";if(ae(n))return Ye?Eu.call(n):"";var t=n+"";return"0"==t&&1/n==-N?"-0":t}function ye(n,t,r){return(n=null==n?M:it(n,t))===M?r:n}function be(n,t){return _r(n,t,ft)}function xe(n,t){return _r(n,t,ct)}function je(n){var t=jr(n);if(!t&&!Yr(n))return su(Object(n));var r,e,u=!!(e=gr(n)),o=(e=e||[]).length;for(r in n)!ft(n,r)||u&&("length"==r||C(r,o))||t&&"constructor"==r||e.push(r);return e}function me(n){for(var t,r=-1,e=jr(n),u=_t(n),o=u.length,i=!!(t=gr(n)),f=(t=t||[]).length;++r<o;){var c=u[r];i&&("length"==c||C(c,f))||"constructor"==c&&(e||!Pe.call(n,c))||t.push(c)}return t}function we(n){return x(n,je(n))}function Ae(n){return n?m(n,je(n)):[]}function Oe(n){return $o(de(n).toLowerCase())}function Ee(n){return(n=de(n))&&n.replace(gn,k).replace(jn,"")}function ke(n,t){n=de(n),t=pe(t);var r="";if(!n||1>t||t>9007199254740991)return r;do{t%2&&(r+=n),t=cu(t/2),n+=n}while(t);return r}function Ie(n,t,r){return n=de(n),(t=r?M:t)===M&&(t=En.test(n)?On:An),n.match(t)||[]}function Re(n){return n}function Se(n){return ee(n)&&!xo(n)?We(n):pt(n)}function We(n){return gt(Hn(n,!0))}function Ce(n,t,r){var u=je(t),o=ot(t,u);null!=r||re(t)&&(o.length||!u.length)||(r=t,t=n,n=this,o=ot(t,je(t)));var i=!re(r)||!("chain"in r)||r.chain,f=Xr(n);return e(o,(function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__);return(r.__actions__=Nt(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})})),n}function Ue(){}function ze(n){return yr(n)?mt(n):function(n){return function(t){return it(t,n)}}(n)}function Be(n){return n&&n.length?y(n,Re):M}var Le=(vn=vn?Pn.defaults({},vn,Pn.pick(qn,kn)):qn).Date,$e=vn.Error,Fe=vn.Math,Me=vn.RegExp,Ne=vn.TypeError,Ze=vn.Array.prototype,De=vn.Object.prototype,qe=vn.Function.prototype.toString,Pe=De.hasOwnProperty,Te=0,Ke=qe.call(Object),Ge=De.toString,Ve=qn._,Je=Me("^"+qe.call(Pe).replace(tn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ye=vn.Symbol,He=vn.f,Qe=vn.Uint8Array,Xe=vn.clearTimeout,nu=He?He.g:M,tu=Object.getPrototypeOf,ru=Object.getOwnPropertySymbols,eu="symbol"==typeof(eu=Ye&&Ye.iterator)?eu:M,uu=De.propertyIsEnumerable,ou=vn.setTimeout,iu=Ze.splice,fu=Fe.ceil,cu=Fe.floor,au=vn.isFinite,lu=Ze.join,su=Object.keys,hu=Fe.max,pu=Fe.min,_u=vn.parseInt,vu=Fe.random,gu=Ze.reverse,du=hr(vn,"Map"),yu=hr(vn,"Set"),bu=hr(vn,"WeakMap"),xu=hr(Object,"create"),ju=bu&&new bu,mu=du?qe.call(du):"",wu=yu?qe.call(yu):"",Au=Ye?Ye.prototype:M,Ou=Ye?Au.valueOf:M,Eu=Ye?Au.toString:M,ku={};bn.templateSettings={escape:J,evaluate:Y,interpolate:H,variable:"",imports:{_:bn}};var Iu=function(){function n(){}return function(t){if(re(t)){n.prototype=t;var r=new n;n.prototype=M}return r||{}}}(),Ru=Kt(et),Su=Kt(ut,!0),Wu=Gt(),Cu=Gt(!0);nu&&!uu.call({valueOf:1},"valueOf")&&(_t=function(n){return U(nu(n))});var Uu=ju?function(n,t){return ju.set(n,t),n}:Re,zu=yu&&2===new yu([1,2]).size?function(n){return new yu(n)}:Ue,Bu=ju?function(n){return ju.get(n)}:Ue,Lu=mt("length"),$u=ru||function(){return[]};(du&&"[object Map]"!=pr(new du)||yu&&"[object Set]"!=pr(new yu))&&(pr=function(n){var t=Ge.call(n);if(n="function"==typeof(n="[object Object]"==t?n.constructor:null)?qe.call(n):""){if(n==mu)return"[object Map]";if(n==wu)return"[object Set]"}return t});var Fu=function(){var n=0,t=0;return function(r,e){var u=lo(),o=16-(u-t);if(t=u,o>0){if(150<=++n)return r}else n=0;return Uu(r,e)}}(),Mu=Kr((function(n,t){t=rt(t);for(var r=xo(n)?n:[Object(n)],e=t,u=-1,o=r.length,i=-1,f=e.length,c=Array(o+f);++u<o;)c[u]=r[u];for(;++i<f;)c[u++]=e[i];return c})),Nu=Kr((function(n,t){return Hr(n)?Xn(n,rt(t,!1,!0)):[]})),Zu=Kr((function(n,t){var r=Wr(t);return Hr(r)&&(r=M),Hr(n)?Xn(n,rt(t,!1,!0),lr(r)):[]})),Du=Kr((function(n,t){var r=Wr(t);return Hr(r)&&(r=M),Hr(n)?Xn(n,rt(t,!1,!0),M,r):[]})),qu=Kr((function(n){var t=c(n,Or);return t.length&&t[0]===n[0]?at(t):[]})),Pu=Kr((function(n){var t=Wr(n),r=c(n,Or);return t===Wr(r)?t=M:r.pop(),r.length&&r[0]===n[0]?at(r,lr(t)):[]})),Tu=Kr((function(n){var t=Wr(n),r=c(n,Or);return t===Wr(r)?t=M:r.pop(),r.length&&r[0]===n[0]?at(r,M,t):[]})),Ku=Kr(Cr),Gu=Kr((function(n,t){var r=Jn(n,t=c(rt(t),String));return At(n,t.sort(E)),r})),Vu=Kr((function(n){return Ut(rt(n,!1,!0))})),Ju=Kr((function(n){var t=Wr(n);return Hr(t)&&(t=M),Ut(rt(n,!1,!0),lr(t))})),Yu=Kr((function(n){var t=Wr(n);return Hr(t)&&(t=M),Ut(rt(n,!1,!0),M,t)})),Hu=Kr((function(n,t){return Hr(n)?Xn(n,t):[]})),Qu=Kr((function(n){return Lt(o(n,Hr))})),Xu=Kr((function(n){var t=Wr(n);return Hr(t)&&(t=M),Lt(o(n,Hr),lr(t))})),no=Kr((function(n){var t=Wr(n);return Hr(t)&&(t=M),Lt(o(n,Hr),M,t)})),to=Kr(zr),ro=Kr((function(n){var t="function"==typeof(t=(t=n.length)>1?n[t-1]:M)?(n.pop(),t):M;return Br(n,t)})),eo=Kr((function(n){function t(t){return Jn(t,n)}var r=(n=rt(n)).length,e=r?n[0]:0,u=this.__wrapped__;return 1>=r&&!this.__actions__.length&&u instanceof Wn&&C(e)?((u=u.slice(e,+e+(r?1:0))).__actions__.push({func:$r,args:[t],thisArg:M}),new Sn(u,this.__chain__).thru((function(n){return r&&!n.length&&n.push(M),n}))):this.thru(t)})),uo=Pt((function(n,t,r){Pe.call(n,r)?++n[r]:n[r]=1})),oo=Pt((function(n,t,r){Pe.call(n,r)?n[r].push(t):n[r]=[t]})),io=Kr((function(n,t,e){var u=-1,o="function"==typeof t,i=yr(t),f=Yr(n)?Array(n.length):[];return Ru(n,(function(n){var c=o?t:i&&null!=n?n[t]:M;f[++u]=c?r(c,n,e):lt(n,t,e)})),f})),fo=Pt((function(n,t,r){n[r]=t})),co=Pt((function(n,t,r){n[r?0:1].push(t)}),(function(){return[[],[]]})),ao=Kr((function(n,t){if(null==n)return[];var r=t.length;return r>1&&dr(n,t[0],t[1])?t=[]:r>2&&dr(t[0],t[1],t[2])&&(t.length=1),bt(n,rt(t),[])})),lo=Le.now,so=Kr((function(n,t,r){var e=1;if(r.length){var u=B(r,so.placeholder);e=32|e}return ir(n,e,t,r,u)})),ho=Kr((function(n,t,r){var e=3;if(r.length){var u=B(r,ho.placeholder);e=32|e}return ir(t,e,n,r,u)})),po=Kr((function(n,t){return Qn(n,1,t)})),_o=Kr((function(n,t,r){return Qn(n,ve(t)||0,r)})),vo=Kr((function(n,t){var e=(t=c(rt(t),lr())).length;return Kr((function(u){for(var o=-1,i=pu(u.length,e);++o<i;)u[o]=t[o].call(this,u[o]);return r(n,this,u)}))})),go=Kr((function(n,t){var r=B(t,go.placeholder);return ir(n,32,M,t,r)})),yo=Kr((function(n,t){var r=B(t,yo.placeholder);return ir(n,64,M,t,r)})),bo=Kr((function(n,t){return ir(n,256,M,M,M,rt(t))})),xo=Array.isArray,jo=Tt((function(n,t){Zt(t,je(t),n)})),mo=Tt((function(n,t){Zt(t,me(t),n)})),wo=Tt((function(n,t,r){Dt(t,me(t),n,r)})),Ao=Tt((function(n,t,r){Dt(t,je(t),n,r)})),Oo=Kr((function(n,t){return Jn(n,rt(t))})),Eo=Kr((function(n){return n.push(M,Tn),r(wo,M,n)})),ko=Kr((function(n){return n.push(M,mr),r(So,M,n)})),Io=Kr(lt),Ro=Tt((function(n,t){yt(n,t)})),So=Tt((function(n,t,r){yt(n,t,r)})),Wo=Kr((function(n,t){return null==n?{}:(t=c(rt(t),String),xt(n,Xn(me(n),t)))})),Co=Kr((function(n,t){return null==n?{}:xt(n,rt(t))})),Uo=Jt((function(n,t,r){return t=t.toLowerCase(),n+(r?Oe(t):t)})),zo=Jt((function(n,t,r){return n+(r?"-":"")+t.toLowerCase()})),Bo=Jt((function(n,t,r){return n+(r?" ":"")+t.toLowerCase()})),Lo=Vt("toLowerCase"),$o=Vt("toUpperCase"),Fo=Jt((function(n,t,r){return n+(r?"_":"")+t.toLowerCase()})),Mo=Jt((function(n,t,r){return n+(r?" ":"")+Oe(t)})),No=Jt((function(n,t,r){return n+(r?" ":"")+t.toUpperCase()})),Zo=Kr((function(n,t){try{return r(n,M,t)}catch(n){return Qr(n)?n:new $e(n)}})),Do=Kr((function(n,t){return e(rt(t),(function(t){n[t]=so(n[t],n)})),n})),qo=Qt(),Po=Qt(!0),To=Kr((function(n,t){return function(r){return lt(r,n,t)}})),Ko=Kr((function(n,t){return function(r){return lt(n,r,t)}})),Go=nr(c),Vo=nr(u),Jo=nr(h),Yo=er(),Ho=er(!0),Qo=or("ceil"),Xo=or("floor"),ni=or("round");return bn.prototype=xn.prototype,Sn.prototype=Iu(xn.prototype),Sn.prototype.constructor=Sn,Wn.prototype=Iu(xn.prototype),Wn.prototype.constructor=Wn,Cn.prototype=xu?xu(null):De,Un.prototype.clear=function(){this.__data__={hash:new Cn,map:du?new du:[],string:new Cn}},Un.prototype.delete=function(n){var t=this.__data__;return br(n)?(t="string"==typeof n?t.string:t.hash,n=(xu?t[n]!==M:Pe.call(t,n))&&delete t[n]):n=du?t.map.delete(n):Mn(t.map,n),n},Un.prototype.get=function(n){var t=this.__data__;return br(n)?(t="string"==typeof n?t.string:t.hash,xu?n="__lodash_hash_undefined__"===(n=t[n])?M:n:n=Pe.call(t,n)?t[n]:M):n=du?t.map.get(n):Nn(t.map,n),n},Un.prototype.has=function(n){var t=this.__data__;return br(n)?(t="string"==typeof n?t.string:t.hash,n=xu?t[n]!==M:Pe.call(t,n)):n=du?t.map.has(n):-1<Zn(t.map,n),n},Un.prototype.set=function(n,t){var r=this.__data__;return br(n)?("string"==typeof n?r.string:r.hash)[n]=xu&&t===M?"__lodash_hash_undefined__":t:du?r.map.set(n,t):Dn(r.map,n,t),this},zn.prototype.push=function(n){var t=this.__data__;br(n)?(t=t.__data__,("string"==typeof n?t.string:t.hash)[n]="__lodash_hash_undefined__"):t.set(n,"__lodash_hash_undefined__")},Fn.prototype.clear=function(){this.__data__={array:[],map:null}},Fn.prototype.delete=function(n){var t=this.__data__,r=t.array;return r?Mn(r,n):t.map.delete(n)},Fn.prototype.get=function(n){var t=this.__data__,r=t.array;return r?Nn(r,n):t.map.get(n)},Fn.prototype.has=function(n){var t=this.__data__,r=t.array;return r?-1<Zn(r,n):t.map.has(n)},Fn.prototype.set=function(n,t){var r=this.__data__,e=r.array;return e&&(199>e.length?Dn(e,n,t):(r.array=null,r.map=new Un(e))),(r=r.map)&&r.set(n,t),this},Tr.Cache=Un,bn.after=function(n,t){if("function"!=typeof t)throw new Ne("Expected a function");return n=pe(n),function(){return 1>--n?t.apply(this,arguments):void 0}},bn.ary=Dr,bn.assign=jo,bn.assignIn=mo,bn.assignInWith=wo,bn.assignWith=Ao,bn.at=Oo,bn.before=qr,bn.bind=so,bn.bindAll=Do,bn.bindKey=ho,bn.chain=Lr,bn.chunk=function(n,t){t=hu(pe(t),0);var r=n?n.length:0;if(!r||1>t)return[];for(var e=0,u=-1,o=Array(fu(r/t));r>e;)o[++u]=kt(n,e,e+=t);return o},bn.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){var o=n[t];o&&(u[++e]=o)}return u},bn.concat=Mu,bn.cond=function(n){var t=n?n.length:0,e=lr();return n=t?c(n,(function(n){if("function"!=typeof n[1])throw new Ne("Expected a function");return[e(n[0]),n[1]]})):[],Kr((function(e){for(var u=-1;++u<t;){var o=n[u];if(r(o[0],this,e))return r(o[1],this,e)}}))},bn.conforms=function(n){return function(n){var t=je(n),r=t.length;return function(e){if(null==e)return!r;for(var u=r;u--;){var o=t[u],i=n[o],f=e[o];if(f===M&&!(o in Object(e))||!i(f))return!1}return!0}}(Hn(n,!0))},bn.constant=function(n){return function(){return n}},bn.countBy=uo,bn.create=function(n,t){var r=Iu(n);return t?Vn(r,t):r},bn.curry=function n(t,r,e){return(t=ir(t,8,M,M,M,M,M,r=e?M:r)).placeholder=n.placeholder,t},bn.curryRight=function n(t,r,e){return(t=ir(t,16,M,M,M,M,M,r=e?M:r)).placeholder=n.placeholder,t},bn.debounce=Pr,bn.defaults=Eo,bn.defaultsDeep=ko,bn.defer=po,bn.delay=_o,bn.difference=Nu,bn.differenceBy=Zu,bn.differenceWith=Du,bn.drop=Ir,bn.dropRight=Rr,bn.dropRightWhile=function(n,t){return n&&n.length?zt(n,lr(t,3),!0,!0):[]},bn.dropWhile=function(n,t){return n&&n.length?zt(n,lr(t,3),!0):[]},bn.fill=function(n,t,r,e){var u=n?n.length:0;if(!u)return[];for(r&&"number"!=typeof r&&dr(n,t,r)&&(r=0,e=u),u=n.length,0>(r=pe(r))&&(r=-r>u?0:u+r),0>(e=e===M||e>u?u:pe(e))&&(e+=u),e=r>e?0:_e(e);e>r;)n[r++]=t;return n},bn.filter=function(n,t){return(xo(n)?o:tt)(n,lr(t,3))},bn.flatMap=function(n,t){return n&&n.length?rt(c(n,lr(t,3))):[]},bn.flatten=function(n){return n&&n.length?rt(n):[]},bn.flattenDeep=function(n){return n&&n.length?rt(n,!0):[]},bn.flip=function(n){return ir(n,512)},bn.flow=qo,bn.flowRight=Po,bn.fromPairs=function(n){for(var t=-1,r=n?n.length:0,e={};++t<r;){var u=n[t];Et(e,u[0],u[1])}return e},bn.functions=function(n){return null==n?[]:ot(n,je(n))},bn.functionsIn=function(n){return null==n?[]:ot(n,me(n))},bn.groupBy=oo,bn.initial=function(n){return Rr(n,1)},bn.intersection=qu,bn.intersectionBy=Pu,bn.intersectionWith=Tu,bn.invert=function(n,t,r){return l(je(n),(function(e,u){var o=n[u];return t&&!r?Pe.call(e,o)?e[o].push(u):e[o]=[u]:e[o]=u,e}),{})},bn.invokeMap=io,bn.iteratee=Se,bn.keyBy=fo,bn.keys=je,bn.keysIn=me,bn.map=function(n,t){return(xo(n)?c:vt)(n,lr(t,3))},bn.mapKeys=function(n,t){var r={};return t=lr(t,3),et(n,(function(n,e,u){r[t(n,e,u)]=n})),r},bn.mapValues=function(n,t){var r={};return t=lr(t,3),et(n,(function(n,e,u){r[e]=t(n,e,u)})),r},bn.matches=We,bn.matchesProperty=function(n,t){return dt(n,Hn(t,!0))},bn.memoize=Tr,bn.merge=Ro,bn.mergeWith=So,bn.method=To,bn.methodOf=Ko,bn.mixin=Ce,bn.negate=function(n){if("function"!=typeof n)throw new Ne("Expected a function");return function(){return!n.apply(this,arguments)}},bn.nthArg=function(n){return n=pe(n),function(){return arguments[n]}},bn.omit=Wo,bn.omitBy=function(n,t){return t=lr(t),jt(n,(function(n){return!t(n)}))},bn.once=function(n){return qr(2,n)},bn.orderBy=function(n,t,r,e){return null==n?[]:(xo(t)||(t=null==t?[]:[t]),xo(r=e?M:r)||(r=null==r?[]:[r]),bt(n,t,r))},bn.over=Go,bn.overArgs=vo,bn.overEvery=Vo,bn.overSome=Jo,bn.partial=go,bn.partialRight=yo,bn.partition=co,bn.pick=Co,bn.pickBy=function(n,t){return null==n?{}:jt(n,lr(t))},bn.property=ze,bn.propertyOf=function(n){return function(t){return null==n?M:it(n,t)}},bn.pull=Ku,bn.pullAll=Cr,bn.pullAllBy=function(n,t,r){return n&&n.length&&t&&t.length?wt(n,t,lr(r)):n},bn.pullAt=Gu,bn.range=Yo,bn.rangeRight=Ho,bn.rearg=bo,bn.reject=function(n,t){var r=xo(n)?o:tt;return t=lr(t,3),r(n,(function(n,r,e){return!t(n,r,e)}))},bn.remove=function(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],o=n.length;for(t=lr(t,3);++e<o;){var i=n[e];t(i,e,n)&&(r.push(i),u.push(e))}return At(n,u),r},bn.rest=Kr,bn.reverse=Ur,bn.sampleSize=Nr,bn.set=function(n,t,r){return null==n?n:Et(n,t,r)},bn.setWith=function(n,t,r,e){return e="function"==typeof e?e:M,null==n?n:Et(n,t,r,e)},bn.shuffle=function(n){return Nr(n,4294967295)},bn.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&"number"!=typeof r&&dr(n,t,r)?(t=0,r=e):(t=null==t?0:pe(t),r=r===M?e:pe(r)),kt(n,t,r)):[]},bn.sortBy=ao,bn.sortedUniq=function(n){return n&&n.length?Wt(n):[]},bn.sortedUniqBy=function(n,t){return n&&n.length?Wt(n,lr(t)):[]},bn.split=function(n,t,r){return de(n).split(t,r)},bn.spread=function(n){if("function"!=typeof n)throw new Ne("Expected a function");return function(t){return r(n,this,t)}},bn.tail=function(n){return Ir(n,1)},bn.take=function(n,t,r){return n&&n.length?kt(n,0,0>(t=r||t===M?1:pe(t))?0:t):[]},bn.takeRight=function(n,t,r){var e=n?n.length:0;return e?kt(n,0>(t=e-(t=r||t===M?1:pe(t)))?0:t,e):[]},bn.takeRightWhile=function(n,t){return n&&n.length?zt(n,lr(t,3),!1,!0):[]},bn.takeWhile=function(n,t){return n&&n.length?zt(n,lr(t,3)):[]},bn.tap=function(n,t){return t(n),n},bn.throttle=function(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new Ne("Expected a function");return re(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),Pr(n,t,{leading:e,maxWait:t,trailing:u})},bn.thru=$r,bn.toArray=he,bn.toPairs=we,bn.toPairsIn=function(n){return x(n,me(n))},bn.toPath=function(n){return xo(n)?c(n,String):Ar(n)},bn.toPlainObject=ge,bn.transform=function(n,t,r){var u=xo(n)||le(n);if(t=lr(t,4),null==r)if(u||re(n)){var o=n.constructor;r=u?xo(n)?new o:[]:Iu(Xr(o)?o.prototype:M)}else r={};return(u?e:et)(n,(function(n,e,u){return t(r,n,e,u)})),r},bn.unary=function(n){return Dr(n,1)},bn.union=Vu,bn.unionBy=Ju,bn.unionWith=Yu,bn.uniq=function(n){return n&&n.length?Ut(n):[]},bn.uniqBy=function(n,t){return n&&n.length?Ut(n,lr(t)):[]},bn.uniqWith=function(n,t){return n&&n.length?Ut(n,M,t):[]},bn.unset=function(n,t){var r,e;null==n?r=!0:(r=wr(r=n,e=yr(e=t,r)?[e+""]:Ct(e)),e=Wr(e),r=null==r||!be(r,e)||delete r[e]);return r},bn.unzip=zr,bn.unzipWith=Br,bn.values=Ae,bn.valuesIn=function(n){return null==n?m(n,me(n)):[]},bn.without=Hu,bn.words=Ie,bn.wrap=function(n,t){return go(t=null==t?Re:t,n)},bn.xor=Qu,bn.xorBy=Xu,bn.xorWith=no,bn.zip=to,bn.zipObject=function(n,t){for(var r=-1,e=n?n.length:0,u=t?t.length:0,o={};++r<e;)Et(o,n[r],u>r?t[r]:M);return o},bn.zipWith=ro,bn.each=Fr,bn.eachRight=Mr,bn.extend=mo,bn.extendWith=wo,Ce(bn,bn),bn.add=function(n,t){var r;return n!==M&&(r=n),t!==M&&(r=r===M?t:r+t),r},bn.attempt=Zo,bn.camelCase=Uo,bn.capitalize=Oe,bn.ceil=Qo,bn.clamp=function(n,t,r){return r===M&&(r=t,t=M),r!==M&&(r=(r=ve(r))==r?r:0),t!==M&&(t=(t=ve(t))==t?t:0),Yn(ve(n),t,r)},bn.clone=function(n){return Hn(n)},bn.cloneDeep=function(n){return Hn(n,!0)},bn.cloneDeepWith=function(n,t){return Hn(n,!0,t)},bn.cloneWith=function(n,t){return Hn(n,!1,t)},bn.deburr=Ee,bn.endsWith=function(n,t,r){t="string"==typeof t?t:t+"";var e=(n=de(n)).length;return r=r===M?e:Yn(pe(r),0,e),(r-=t.length)>=0&&n.indexOf(t,r)==r},bn.eq=Gr,bn.escape=function(n){return(n=de(n))&&V.test(n)?n.replace(K,I):n},bn.escapeRegExp=function(n){return(n=de(n))&&rn.test(n)?n.replace(tn,"\\$&"):n},bn.every=function(n,t,r){var e=xo(n)?u:nt;return r&&dr(n,t,r)&&(t=M),e(n,lr(t,3))},bn.find=function(n,t){if(t=lr(t,3),xo(n)){var r=v(n,t);return r>-1?n[r]:M}return _(n,t,Ru)},bn.findIndex=function(n,t){return n&&n.length?v(n,lr(t,3)):-1},bn.findKey=function(n,t){return _(n,lr(t,3),et,!0)},bn.findLast=function(n,t){if(t=lr(t,3),xo(n)){var r=v(n,t,!0);return r>-1?n[r]:M}return _(n,t,Su)},bn.findLastIndex=function(n,t){return n&&n.length?v(n,lr(t,3),!0):-1},bn.findLastKey=function(n,t){return _(n,lr(t,3),ut,!0)},bn.floor=Xo,bn.forEach=Fr,bn.forEachRight=Mr,bn.forIn=function(n,t){return null==n?n:Wu(n,Er(t),me)},bn.forInRight=function(n,t){return null==n?n:Cu(n,Er(t),me)},bn.forOwn=function(n,t){return n&&et(n,Er(t))},bn.forOwnRight=function(n,t){return n&&ut(n,Er(t))},bn.get=ye,bn.gt=Vr,bn.gte=function(n,t){return n>=t},bn.has=be,bn.hasIn=xe,bn.head=Sr,bn.identity=Re,bn.includes=function(n,t,r,e){return n=Yr(n)?n:Ae(n),r=r&&!e?pe(r):0,e=n.length,0>r&&(r=hu(e+r,0)),ce(n)?e>=r&&-1<n.indexOf(t,r):!!e&&-1<g(n,t,r)},bn.indexOf=function(n,t,r){var e=n?n.length:0;return e?(0>(r=pe(r))&&(r=hu(e+r,0)),g(n,t,r)):-1},bn.inRange=function(n,t,r){return t=ve(t)||0,r===M?(r=t,t=0):r=ve(r)||0,(n=ve(n))>=pu(t,r)&&n<hu(t,r)},bn.invoke=Io,bn.isArguments=Jr,bn.isArray=xo,bn.isArrayLike=Yr,bn.isArrayLikeObject=Hr,bn.isBoolean=function(n){return!0===n||!1===n||ee(n)&&"[object Boolean]"==Ge.call(n)},bn.isDate=function(n){return ee(n)&&"[object Date]"==Ge.call(n)},bn.isElement=function(n){return!!n&&1===n.nodeType&&ee(n)&&!ie(n)},bn.isEmpty=function(n){return!ee(n)||Xr(n.splice)?!Zr(n):!je(n).length},bn.isEqual=function(n,t){return st(n,t)},bn.isEqualWith=function(n,t,r){var e=(r="function"==typeof r?r:M)?r(n,t):M;return e===M?st(n,t,r):!!e},bn.isError=Qr,bn.isFinite=function(n){return"number"==typeof n&&au(n)},bn.isFunction=Xr,bn.isInteger=ne,bn.isLength=te,bn.isMatch=function(n,t){return n===t||ht(n,t,sr(t))},bn.isMatchWith=function(n,t,r){return r="function"==typeof r?r:M,ht(n,t,sr(t),r)},bn.isNaN=function(n){return oe(n)&&n!=+n},bn.isNative=ue,bn.isNil=function(n){return null==n},bn.isNull=function(n){return null===n},bn.isNumber=oe,bn.isObject=re,bn.isObjectLike=ee,bn.isPlainObject=ie,bn.isRegExp=fe,bn.isSafeInteger=function(n){return ne(n)&&n>=-9007199254740991&&9007199254740991>=n},bn.isString=ce,bn.isSymbol=ae,bn.isTypedArray=le,bn.isUndefined=function(n){return n===M},bn.join=function(n,t){return n?lu.call(n,t):""},bn.kebabCase=zo,bn.last=Wr,bn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(r!==M&&(u=(0>(u=pe(r))?hu(e+u,0):pu(u,e-1))+1),t!=t)return S(n,u,!0);for(;u--;)if(n[u]===t)return u;return-1},bn.lowerCase=Bo,bn.lowerFirst=Lo,bn.lt=se,bn.lte=function(n,t){return t>=n},bn.max=function(n){return n&&n.length?p(n,Re,Vr):M},bn.maxBy=function(n,t){return n&&n.length?p(n,lr(t),Vr):M},bn.mean=function(n){return Be(n)/(n?n.length:0)},bn.min=function(n){return n&&n.length?p(n,Re,se):M},bn.minBy=function(n,t){return n&&n.length?p(n,lr(t),se):M},bn.noConflict=function(){return qn._=Ve,this},bn.noop=Ue,bn.now=lo,bn.pad=function(n,t,r){n=de(n),t=pe(t);var e=$(n);return t&&t>e?(t=cu(e=(t-e)/2),e=fu(e),tr("",t,r)+n+tr("",e,r)):n},bn.padEnd=function(n,t,r){return(n=de(n))+tr(n,t,r)},bn.padStart=function(n,t,r){return tr(n=de(n),t,r)+n},bn.parseInt=function(n,t,r){return r||null==t?t=0:t&&(t=+t),n=de(n).replace(en,""),_u(n,t||(ln.test(n)?16:10))},bn.random=function(n,t,r){if(r&&"boolean"!=typeof r&&dr(n,t,r)&&(t=r=M),r===M&&("boolean"==typeof t?(r=t,t=M):"boolean"==typeof n&&(r=n,n=M)),n===M&&t===M?(n=0,t=1):(n=ve(n)||0,t===M?(t=n,n=0):t=ve(t)||0),n>t){var e=n;n=t,t=e}return r||n%1||t%1?(r=vu(),pu(n+r*(t-n+Bn("1e-"+((r+"").length-1))),t)):Ot(n,t)},bn.reduce=function(n,t,r){var e=xo(n)?l:d,u=3>arguments.length;return e(n,lr(t,4),r,u,Ru)},bn.reduceRight=function(n,t,r){var e=xo(n)?s:d,u=3>arguments.length;return e(n,lr(t,4),r,u,Su)},bn.repeat=ke,bn.replace=function(){var n=arguments,t=de(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},bn.result=function(n,t,r){if(yr(t,n))e=null==n?M:n[t];else{var e=ye(n,t=Ct(t));n=wr(n,t)}return e===M&&(e=r),Xr(e)?e.call(n):e},bn.round=ni,bn.runInContext=O,bn.sample=function(n){var t=(n=Yr(n)?n:Ae(n)).length;return t>0?n[Ot(0,t-1)]:M},bn.size=Zr,bn.snakeCase=Fo,bn.some=function(n,t,r){var e=xo(n)?h:It;return r&&dr(n,t,r)&&(t=M),e(n,lr(t,3))},bn.sortedIndex=function(n,t){return Rt(n,t)},bn.sortedIndexBy=function(n,t,r){return St(n,t,lr(r))},bn.sortedIndexOf=function(n,t){var r=n?n.length:0;if(r){var e=Rt(n,t);if(r>e&&Gr(n[e],t))return e}return-1},bn.sortedLastIndex=function(n,t){return Rt(n,t,!0)},bn.sortedLastIndexBy=function(n,t,r){return St(n,t,lr(r),!0)},bn.sortedLastIndexOf=function(n,t){if(n&&n.length){var r=Rt(n,t,!0)-1;if(Gr(n[r],t))return r}return-1},bn.startCase=Mo,bn.startsWith=function(n,t,r){return n=de(n),r=Yn(pe(r),0,n.length),n.lastIndexOf(t,r)==r},bn.subtract=function(n,t){var r;return n!==M&&(r=n),t!==M&&(r=r===M?t:r-t),r},bn.sum=Be,bn.sumBy=function(n,t){return n&&n.length?y(n,lr(t)):M},bn.template=function(n,t,r){var e=bn.templateSettings;r&&dr(n,t,r)&&(t=M),n=de(n),t=wo({},t,e,Tn);var u,o,i=je(r=wo({},t.imports,e.imports,Tn)),f=m(r,i),c=0;r=t.interpolate||dn;var a="__p+='";r=Me((t.escape||dn).source+"|"+r.source+"|"+(r===H?cn:dn).source+"|"+(t.evaluate||dn).source+"|$","g");var l="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,(function(t,r,e,i,f,l){return e||(e=i),a+=n.slice(c,l).replace(yn,R),r&&(u=!0,a+="'+__e("+r+")+'"),f&&(o=!0,a+="';"+f+";\n__p+='"),e&&(a+="'+((__t=("+e+"))==null?'':__t)+'"),c=l+t.length,t})),a+="';",(t=t.variable)||(a="with(obj){"+a+"}"),a=(o?a.replace(D,""):a).replace(q,"$1").replace(P,"$1;"),a="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(u?",__e=_.escape":"")+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+a+"return __p}",(t=Zo((function(){return Function(i,l+"return "+a).apply(M,f)}))).source=a,Qr(t))throw t;return t},bn.times=function(n,t){if(1>(n=pe(n))||n>9007199254740991)return[];var r=4294967295,e=pu(n,4294967295);for(n-=4294967295,e=b(e,t=Er(t));++r<n;)t(r);return e},bn.toInteger=pe,bn.toLength=_e,bn.toLower=function(n){return de(n).toLowerCase()},bn.toNumber=ve,bn.toSafeInteger=function(n){return Yn(pe(n),-9007199254740991,9007199254740991)},bn.toString=de,bn.toUpper=function(n){return de(n).toUpperCase()},bn.trim=function(n,t,r){return(n=de(n))?r||t===M?n.replace(en,""):(t+="")?(n=n.match(mn),t=t.match(mn),n.slice(w(n,t),A(n,t)+1).join("")):n:n},bn.trimEnd=function(n,t,r){return(n=de(n))?r||t===M?n.replace(on,""):(t+="")?(n=n.match(mn)).slice(0,A(n,t.match(mn))+1).join(""):n:n},bn.trimStart=function(n,t,r){return(n=de(n))?r||t===M?n.replace(un,""):(t+="")?(n=n.match(mn)).slice(w(n,t.match(mn))).join(""):n:n},bn.truncate=function(n,t){var r=30,e="...";if(re(t)){var u="separator"in t?t.separator:u;r="length"in t?pe(t.length):r,e="omission"in t?de(t.omission):e}var o=(n=de(n)).length;if(wn.test(n)){var i=n.match(mn);o=i.length}if(r>=o)return n;if(1>(o=r-$(e)))return e;if(r=i?i.slice(0,o).join(""):n.slice(0,o),u===M)return r+e;if(i&&(o+=r.length-o),fe(u)){if(n.slice(o).search(u)){var f=r;for(u.global||(u=Me(u.source,de(an.exec(u))+"g")),u.lastIndex=0;i=u.exec(f);)var c=i.index;r=r.slice(0,c===M?o:c)}}else n.indexOf(u,o)!=o&&((u=r.lastIndexOf(u))>-1&&(r=r.slice(0,u)));return r+e},bn.unescape=function(n){return(n=de(n))&&G.test(n)?n.replace(T,F):n},bn.uniqueId=function(n){var t=++Te;return de(n)+t},bn.upperCase=No,bn.upperFirst=$o,bn.first=Sr,Ce(bn,function(){var n={};return et(bn,(function(t,r){Pe.call(bn.prototype,r)||(n[r]=t)})),n}(),{chain:!1}),bn.VERSION="4.0.0",e("bind bindKey curry curryRight partial partialRight".split(" "),(function(n){bn[n].placeholder=bn})),e(["drop","take"],(function(n,t){Wn.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new Wn(this);r=r===M?1:hu(pe(r),0);var u=this.clone();return e?u.__takeCount__=pu(r,u.__takeCount__):u.__views__.push({size:pu(r,4294967295),type:n+(0>u.__dir__?"Right":"")}),u},Wn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),e(["filter","map","takeWhile"],(function(n,t){var r=t+1,e=1==r||3==r;Wn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:lr(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}})),e(["head","last"],(function(n,t){var r="take"+(t?"Right":"");Wn.prototype[n]=function(){return this[r](1).value()[0]}})),e(["initial","tail"],(function(n,t){var r="drop"+(t?"":"Right");Wn.prototype[n]=function(){return this.__filtered__?new Wn(this):this[r](1)}})),Wn.prototype.compact=function(){return this.filter(Re)},Wn.prototype.find=function(n){return this.filter(n).head()},Wn.prototype.findLast=function(n){return this.reverse().find(n)},Wn.prototype.invokeMap=Kr((function(n,t){return"function"==typeof n?new Wn(this):this.map((function(r){return lt(r,n,t)}))})),Wn.prototype.reject=function(n){return n=lr(n,3),this.filter((function(t){return!n(t)}))},Wn.prototype.slice=function(n,t){n=pe(n);var r=this;return r.__filtered__&&(n>0||0>t)?new Wn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==M&&(r=0>(t=pe(t))?r.dropRight(-t):r.take(t-n)),r)},Wn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Wn.prototype.toArray=function(){return this.take(4294967295)},et(Wn.prototype,(function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=bn[e?"take"+("last"==t?"Right":""):t],o=e||/^find/.test(t);u&&(bn.prototype[t]=function(){function t(n){return n=u.apply(bn,a([n],f)),e&&h?n[0]:n}var i=this.__wrapped__,f=e?[1]:arguments,c=i instanceof Wn,l=f[0],s=c||xo(i);s&&r&&"function"==typeof l&&1!=l.length&&(c=s=!1);var h=this.__chain__,p=!!this.__actions__.length;l=o&&!h,c=c&&!p;return!o&&s?(i=c?i:new Wn(this),(i=n.apply(i,f)).__actions__.push({func:$r,args:[t],thisArg:M}),new Sn(i,h)):l&&c?n.apply(this,f):(i=this.thru(t),l?e?i.value()[0]:i.value():i)})})),e("pop push shift sort splice unshift".split(" "),(function(n){var t=Ze[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);bn.prototype[n]=function(){var n=arguments;return e&&!this.__chain__?t.apply(this.value(),n):this[r]((function(r){return t.apply(r,n)}))}})),et(Wn.prototype,(function(n,t){var r=bn[t];if(r){var e=r.name+"";(ku[e]||(ku[e]=[])).push({name:t,func:r})}})),ku[Xt(M,2).name]=[{name:"wrapper",func:M}],Wn.prototype.clone=function(){var n=new Wn(this.__wrapped__);return n.__actions__=Nt(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Nt(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Nt(this.__views__),n},Wn.prototype.reverse=function(){if(this.__filtered__){var n=new Wn(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},Wn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=xo(t),u=0>r,o=e?t.length:0;n=o;for(var i=this.__views__,f=0,c=-1,a=i.length;++c<a;){var l=i[c],s=l.size;switch(l.type){case"drop":f+=s;break;case"dropRight":n-=s;break;case"take":n=pu(n,f+s);break;case"takeRight":f=hu(f,n-s)}}if(i=(n={start:f,end:n}).start,n=(f=n.end)-i,u=u?f:i-1,f=(i=this.__iteratees__).length,c=0,a=pu(n,this.__takeCount__),!e||200>o||o==n&&a==n)return Bt(t,this.__actions__);e=[];n:for(;n--&&a>c;){for(o=-1,l=t[u+=r];++o<f;){s=(h=i[o]).type;var h=(0,h.iteratee)(l);if(2==s)l=h;else if(!h){if(1==s)continue n;break n}}e[c++]=l}return e},bn.prototype.at=eo,bn.prototype.chain=function(){return Lr(this)},bn.prototype.commit=function(){return new Sn(this.value(),this.__chain__)},bn.prototype.flatMap=function(n){return this.map(n).flatten()},bn.prototype.next=function(){this.__values__===M&&(this.__values__=he(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?M:this.__values__[this.__index__++]}},bn.prototype.plant=function(n){for(var t,r=this;r instanceof xn;){var e=kr(r);e.__index__=0,e.__values__=M,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t},bn.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Wn?(this.__actions__.length&&(n=new Wn(this)),(n=n.reverse()).__actions__.push({func:$r,args:[Ur],thisArg:M}),new Sn(n,this.__chain__)):this.thru(Ur)},bn.prototype.toJSON=bn.prototype.valueOf=bn.prototype.value=function(){return Bt(this.__wrapped__,this.__actions__)},eu&&(bn.prototype[eu]=function(){return this}),bn}();(Nn||Mn||{})._=Pn,"function"==typeof define&&"object"==typeof define.amd&&define.amd?define((function(){return Pn})):$n&&Fn?(Zn&&((Fn.exports=Pn)._=Pn),$n._=Pn):qn._=Pn}).call(this);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
window.Modernizr=function(e,t,n){function r(e){f.cssText=e}function o(e,t){return typeof e===t}var i,a,c={},l=t.documentElement,s="modernizr",u=t.createElement(s),f=u.style,d=" -webkit- -moz- -o- -ms- ".split(" "),p="Webkit Moz O ms",h=p.split(" "),m=p.toLowerCase().split(" "),y={},v=[],g=v.slice,b=function(e,n,r,o){var i,a,c,u=t.createElement("div"),f=t.body,d=f||t.createElement("body");if(parseInt(r,10))for(;r--;)(c=t.createElement("div")).id=o?o[r]:s+(r+1),u.appendChild(c);return i=["­",'<style id="s',s,'">',e,"</style>"].join(""),u.id=s,(f?u:d).innerHTML+=i,d.appendChild(u),f||(d.style.background="",l.appendChild(d)),a=n(u,e),f?u.parentNode.removeChild(u):d.parentNode.removeChild(d),!!a},E={}.hasOwnProperty;for(var C in a=o(E,"undefined")||o(E.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return E.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=g.call(arguments,1),r=function(){if(this instanceof r){var o=function(){};o.prototype=t.prototype;var i=new o,a=t.apply(i,n.concat(g.call(arguments)));return Object(a)===a?a:i}return t.apply(e,n.concat(g.call(arguments)))};return r}),y.canvas=function(){var e=t.createElement("canvas");return!!e.getContext&&!!e.getContext("2d")},y.webgl=function(){return!!e.WebGLRenderingContext},y.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:b(["@media (",d.join("touch-enabled),("),s,")","{#modernizr{top:9px;position:absolute}}"].join(""),(function(e){n=9===e.offsetTop})),n},y.websockets=function(){return"WebSocket"in e||"MozWebSocket"in e},y)a(y,C)&&(i=C.toLowerCase(),c[i]=y[C](),v.push((c[i]?"":"no-")+i));return c.addTest=function(e,t){if("object"==typeof e)for(var r in e)a(e,r)&&c.addTest(r,e[r]);else{if(e=e.toLowerCase(),c[e]!==n)return c;t="function"==typeof t?t():t,l.className+=" "+(t?"":"no-")+e,c[e]=t}return c},r(""),u=null,function(e,t){function n(){var e=h.elements;return"string"==typeof e?e.split(" "):e}function r(e){var t=p[e[f]];return t||(t={},d++,e[f]=d,p[d]=t),t}function o(e,n,o){return n||(n=t),c?n.createElement(e):(o||(o=r(n)),(i=o.cache[e]?o.cache[e].cloneNode():u.test(e)?(o.cache[e]=o.createElem(e)).cloneNode():o.createElem(e)).canHaveChildren&&!s.test(e)?o.frag.appendChild(i):i);var i}function i(e){e||(e=t);var i=r(e);return h.shivCSS&&!a&&!i.hasCSS&&(i.hasCSS=!!function(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}(e,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),c||function(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return h.shivMethods?o(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+n().join().replace(/\w+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(h,t.frag)}(e,i),e}var a,c,l=e.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,f="_html5shiv",d=0,p={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",a="hidden"in e,c=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return void 0===e.cloneNode||void 0===e.createDocumentFragment||void 0===e.createElement}()}catch(e){a=!0,c=!0}}();var h={elements:l.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!1!==l.shivCSS,supportsUnknownElements:c,shivMethods:!1!==l.shivMethods,type:"default",shivDocument:i,createElement:o,createDocumentFragment:function(e,o){if(e||(e=t),c)return e.createDocumentFragment();for(var i=(o=o||r(e)).frag.cloneNode(),a=0,l=n(),s=l.length;a<s;a++)i.createElement(l[a]);return i}};e.html5=h,i(t)}(this,t),c._version="2.6.0",c._prefixes=d,c._domPrefixes=m,c._cssomPrefixes=h,c.testStyles=b,l.className=l.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+" js "+v.join(" "),c}(this,this.document),function(e,t,n){function r(e){return"[object Function]"==y.call(e)}function o(e){return"string"==typeof e}function i(){}function a(e){return!e||"loaded"==e||"complete"==e||"uninitialized"==e}function c(){var e=v.shift();g=1,e?e.t?h((function(){("c"==e.t?d.injectCss:d.injectJs)(e.s,0,e.a,e.x,e.e,1)}),0):(e(),c()):g=0}function l(e,n,r,o,i,l,s){function u(t){if(!p&&a(f.readyState)&&(b.r=p=1,!g&&c(),f.onload=f.onreadystatechange=null,t))for(var r in"img"!=e&&h((function(){C.removeChild(f)}),50),k[n])k[n].hasOwnProperty(r)&&k[n][r].onload()}s=s||d.errorTimeout;var f={},p=0,y=0,b={t:r,s:n,e:i,a:l,x:s};1===k[n]&&(y=1,k[n]=[],f=t.createElement(e)),"object"==e?f.data=n:(f.src=n,f.type=e),f.width=f.height="0",f.onerror=f.onload=f.onreadystatechange=function(){u.call(this,y)},v.splice(o,0,b),"img"!=e&&(y||2===k[n]?(C.insertBefore(f,E?null:m),h(u,s)):k[n].push(f))}function s(e,t,n,r,i){return g=0,t=t||"j",o(e)?l("c"==t?S:w,e,t,this.i++,n,r,i):(v.splice(this.i++,0,e),1==v.length&&c()),this}function u(){var e=d;return e.loader={load:s,i:0},e}var f,d,p=t.documentElement,h=e.setTimeout,m=t.getElementsByTagName("script")[0],y={}.toString,v=[],g=0,b="MozAppearance"in p.style,E=b&&!!t.createRange().compareNode,C=E?p:m.parentNode,w=(p=e.opera&&"[object Opera]"==y.call(e.opera),p=!!t.attachEvent&&!p,b?"object":p?"script":"img"),S=p?"script":w,j=Array.isArray||function(e){return"[object Array]"==y.call(e)},x=[],k={},T={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}};d=function(e){function t(e,t,n,o,i){var a=function(e){e=e.split("!");var t,n,r,o=x.length,i=e.pop(),a=e.length;for(i={url:i,origUrl:i,prefixes:e},n=0;n<a;n++)r=e[n].split("="),(t=T[r.shift()])&&(i=t(i,r));for(n=0;n<o;n++)i=x[n](i);return i}(e),l=a.autoCallback;a.url.split(".").pop().split("?").shift(),a.bypass||(t&&(t=r(t)?t:t[e]||t[o]||t[e.split("/").pop().split("?")[0]]||c),a.instead?a.instead(e,t,n,o,i):(k[a.url]?a.noexec=!0:k[a.url]=1,n.load(a.url,a.forceCSS||!a.forceJS&&"css"==a.url.split(".").pop().split("?").shift()?"c":undefined,a.noexec,a.attrs,a.timeout),(r(t)||r(l))&&n.load((function(){u(),t&&t(a.origUrl,i,o),l&&l(a.origUrl,i,o),k[a.url]=2}))))}function n(e,n){function a(e,i){if(e){if(o(e))i||(f=function(){var e=[].slice.call(arguments);d.apply(this,e),p()}),t(e,f,n,0,s);else if(Object(e)===e)for(l in c=function(){var t,n=0;for(t in e)e.hasOwnProperty(t)&&n++;return n}(),e)e.hasOwnProperty(l)&&(!i&&! --c&&(r(f)?f=function(){var e=[].slice.call(arguments);d.apply(this,e),p()}:f[l]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),p()}}(d[l])),t(e[l],f,n,l,s))}else!i&&p()}var c,l,s=!!e.test,u=e.load||e.both,f=e.callback||i,d=f,p=e.complete||i;a(s?e.yep:e.nope,!!u),u&&a(u)}var a,l,s=this.yepnope.loader;if(o(e))t(e,0,s,0);else if(j(e))for(a=0;a<e.length;a++)o(l=e[a])?t(l,0,s,0):j(l)?d(l):Object(l)===l&&n(l,s);else Object(e)===e&&n(e,s)},d.addPrefix=function(e,t){T[e]=t},d.addFilter=function(e){x.push(e)},d.errorTimeout=1e4,null==t.readyState&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",f=function(){t.removeEventListener("DOMContentLoaded",f,0),t.readyState="complete"},0)),e.yepnope=u(),e.yepnope.executeStack=c,e.yepnope.injectJs=function(e,n,r,o,l,s){var u,f,p=t.createElement("script");o=o||d.errorTimeout;for(f in p.src=e,r)p.setAttribute(f,r[f]);n=s?c:n||i,p.onreadystatechange=p.onload=function(){!u&&a(p.readyState)&&(u=1,n(),p.onload=p.onreadystatechange=null)},h((function(){u||(u=1,n(1))}),o),l?p.onload():m.parentNode.insertBefore(p,m)},e.yepnope.injectCss=function(e,n,r,o,a,l){var s;o=t.createElement("link"),n=l?c:n||i;for(s in o.href=e,o.rel="stylesheet",o.type="text/css",r)o.setAttribute(s,r[s]);a||(m.parentNode.insertBefore(o,m),h(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("websocketsbinary",(function(){var e,t="https:"==location.protocol?"wss":"ws";if("WebSocket"in window){if(e="binaryType"in WebSocket.prototype)return e;try{return!!new WebSocket(t+"://.").binaryType}catch(e){}}return!1}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Pixastic=function(){function t(t,a,e){var r=new Array;null==a&&(a=document),null==e&&(e="*");var n=a.getElementsByTagName(e),s=n.length,o=new RegExp("(^|\\s)"+t+"(\\s|$)");for(i=0,j=0;i<s;i++)o.test(n[i].className)&&(r[j]=n[i],j++);return r}function a(t,a){if(Pixastic.debug){try{switch(a){case"warn":console.warn("Pixastic:",t);break;case"error":console.error("Pixastic:",t);break;default:console.log("Pixastic:",t)}}catch(t){}1}}"undefined"!=typeof pixastic_parseonload&&pixastic_parseonload&&function(t){var a=!1,e=function(){a||(a=!0,t())};document.write('<script defer src="//:" id="__onload_ie_pixastic__"><\/script>');var i=document.getElementById("__onload_ie_pixastic__");i.onreadystatechange=function(){"complete"==i.readyState&&(i.parentNode.removeChild(i),e())},document.addEventListener&&document.addEventListener("DOMContentLoaded",e,!1),function(t,a,e){t.addEventListener?t.addEventListener(a,e,!1):t.attachEvent&&t.attachEvent("on"+a,e)}(window,"load",e)}((function(){for(var a=t("pixastic",null,"img"),e=t("pixastic",null,"canvas"),i=a.concat(e),r=0;r<i.length;r++)!function(){for(var t=i[r],a=[],e=t.className.split(" "),n=0;n<e.length;n++){var s=e[n];if("pixastic-"==s.substring(0,9)){var o=s.substring(9);""!=o&&a.push(o)}}if(a.length)if("img"==t.tagName.toLowerCase()){var c=new Image;if(c.src=t.src,c.complete)for(var h=0;h<a.length;h++){var l=Pixastic.applyAction(t,t,a[h],null);l&&(t=l)}else c.onload=function(){for(var e=0;e<a.length;e++){var i=Pixastic.applyAction(t,t,a[e],null);i&&(t=i)}}}else setTimeout((function(){for(var e=0;e<a.length;e++){var i=Pixastic.applyAction(t,t,a[e],null);i&&(t=i)}}),1)}()}));var e=function(){var t=document.createElement("canvas"),a=!1;try{a=!("function"!=typeof t.getContext||!t.getContext("2d"))}catch(t){}return function(){return a}}(),r=function(){var t,a=document.createElement("canvas"),e=!1;try{"function"==typeof a.getContext&&(t=a.getContext("2d"))&&(e="function"==typeof t.getImageData)}catch(t){}return function(){return e}}(),n=function(){var t=!1,a=document.createElement("canvas");if(e()&&r()){a.width=a.height=1;var i=a.getContext("2d");i.fillStyle="rgb(255,0,0)",i.fillRect(0,0,1,1);var n=document.createElement("canvas");n.width=n.height=1;var s=n.getContext("2d");s.fillStyle="rgb(0,0,255)",s.fillRect(0,0,1,1),i.globalAlpha=.5,i.drawImage(n,0,0);var o=i.getImageData(0,0,1,1).data;t=255!=o[2]}return function(){return t}}();return{parseOnLoad:!1,debug:!1,applyAction:function(t,e,i,r){r=r||{};var n,s,o="canvas"==t.tagName.toLowerCase();if(o&&Pixastic.Client.isIE())return Pixastic.debug&&a("Tried to process a canvas element but browser is IE."),!1;var c=!1;Pixastic.Client.hasCanvas()&&(c=!!r.resultCanvas,s=(n=r.resultCanvas||document.createElement("canvas")).getContext("2d"));var h=t.offsetWidth,l=t.offsetHeight;if(o&&(h=t.width,l=t.height),0==h||0==l){if(null!=t.parentNode)return void(Pixastic.debug&&a("Image has 0 width and/or height."));var p=t.style.position,g=t.style.left;t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),h=t.offsetWidth,l=t.offsetHeight,document.body.removeChild(t),t.style.position=p,t.style.left=g}if(i.indexOf("(")>-1){var v=i;i=v.substr(0,v.indexOf("("));var d=v.match(/\((.*?)\)/);if(d[1]){d=d[1].split(";");for(var u=0;u<d.length;u++)if(thisArg=d[u].split("="),2==thisArg.length)if("rect"==thisArg[0]){var f=thisArg[1].split(",");r[thisArg[0]]={left:parseInt(f[0],10)||0,top:parseInt(f[1],10)||0,width:parseInt(f[2],10)||0,height:parseInt(f[3],10)||0}}else r[thisArg[0]]=thisArg[1]}}r.rect?(r.rect.left=Math.round(r.rect.left),r.rect.top=Math.round(r.rect.top),r.rect.width=Math.round(r.rect.width),r.rect.height=Math.round(r.rect.height)):r.rect={left:0,top:0,width:h,height:l};var m=!1;if(Pixastic.Actions[i]&&"function"==typeof Pixastic.Actions[i].process&&(m=!0),!m)return Pixastic.debug&&a('Invalid action "'+i+'". Maybe file not included?'),!1;if(!Pixastic.Actions[i].checkSupport())return Pixastic.debug&&a('Action "'+i+'" not supported by this browser.'),!1;Pixastic.Client.hasCanvas()?(n!==t&&(n.width=h,n.height=l),c||(n.style.width=h+"px",n.style.height=l+"px"),s.drawImage(e,0,0,h,l),t.__pixastic_org_image?(n.__pixastic_org_image=t.__pixastic_org_image,n.__pixastic_org_width=t.__pixastic_org_width,n.__pixastic_org_height=t.__pixastic_org_height):(n.__pixastic_org_image=t,n.__pixastic_org_width=h,n.__pixastic_org_height=l)):Pixastic.Client.isIE()&&void 0===t.__pixastic_org_style&&(t.__pixastic_org_style=t.style.cssText);var x={image:t,canvas:n,width:h,height:l,useData:!0,options:r};return!!Pixastic.Actions[i].process(x)&&(Pixastic.Client.hasCanvas()?(x.useData&&Pixastic.Client.hasCanvasImageData()&&(n.getContext("2d").putImageData(x.canvasData,r.rect.left,r.rect.top),n.getContext("2d").fillRect(0,0,0,0)),r.leaveDOM||(n.title=t.title,n.imgsrc=t.imgsrc,o||(n.alt=t.alt),o||(n.imgsrc=t.src),n.className=t.className,n.style.cssText=t.style.cssText,n.name=t.name,n.tabIndex=t.tabIndex,n.id=t.id,t.parentNode&&t.parentNode.replaceChild&&t.parentNode.replaceChild(n,t)),r.resultCanvas=n,n):t)},prepareData:function(t,a){var e=t.canvas.getContext("2d"),i=t.options.rect,r=e.getImageData(i.left,i.top,i.width,i.height),n=r.data;return a||(t.canvasData=r),n},process:function(t,a,e,i){if("img"==t.tagName.toLowerCase()){var r=new Image;if(r.src=t.src,r.complete){var n=Pixastic.applyAction(t,r,a,e);return i&&i(n),n}r.onload=function(){var n=Pixastic.applyAction(t,r,a,e);i&&i(n)}}if("canvas"==t.tagName.toLowerCase()){n=Pixastic.applyAction(t,t,a,e);return i&&i(n),n}},revert:function(t){if(Pixastic.Client.hasCanvas()){if("canvas"==t.tagName.toLowerCase()&&t.__pixastic_org_image)return t.width=t.__pixastic_org_width,t.height=t.__pixastic_org_height,t.getContext("2d").drawImage(t.__pixastic_org_image,0,0),t.parentNode&&t.parentNode.replaceChild&&t.parentNode.replaceChild(t.__pixastic_org_image,t),t}else Pixastic.Client.isIE()&&void 0!==t.__pixastic_org_style&&(t.style.cssText=t.__pixastic_org_style)},Client:{hasCanvas:e,hasCanvasImageData:r,hasGlobalAlpha:n,isIE:function(){return!!document.all&&!!window.attachEvent&&!window.opera}},Actions:{}}}();"undefined"!=typeof jQuery&&jQuery&&jQuery.fn&&(jQuery.fn.pixastic=function(t,a){var e=[];return this.each((function(){if("img"!=this.tagName.toLowerCase()||this.complete){var i=Pixastic.process(this,t,a);i&&e.push(i)}})),e.length>0?jQuery(e):this}),Pixastic.Actions.blend={process:function(t){var a=parseFloat(t.options.amount),e=(t.options.mode||"normal").toLowerCase(),i=t.options.image;if(a=Math.max(0,Math.min(1,a)),!i)return!1;if(Pixastic.Client.hasCanvasImageData()){var r=t.options.rect,n=Pixastic.prepareData(t),s=r.width,o=r.height;t.useData=!1;var c=document.createElement("canvas");c.width=t.canvas.width,c.height=t.canvas.height;var h=c.getContext("2d");h.drawImage(i,0,0);var l,p,g,v,d,u,f,m,x,C,w,P,I,D,M={canvas:c,options:t.options},b=Pixastic.prepareData(M),y=M.canvasData,_=4*(S=s*o),k=!1;switch(e){case"normal":break;case"multiply":for(;S--;)b[_-=4]=n[_]*b[_]/255,b[l=_+1]=n[l]*b[l]/255,b[p=_+2]=n[p]*b[p]/255;k=!0;break;case"lighten":for(;S--;)(g=n[_-=4])>b[_]&&(b[_]=g),(v=n[l=_+1])>b[l]&&(b[l]=v),(d=n[p=_+2])>b[p]&&(b[p]=d);k=!0;break;case"darken":for(;S--;)(g=n[_-=4])<b[_]&&(b[_]=g),(v=n[l=_+1])<b[l]&&(b[l]=v),(d=n[p=_+2])<b[p]&&(b[p]=d);k=!0;break;case"darkercolor":for(;S--;).3*(g=n[_-=4])+.59*(v=n[l=_+1])+.11*(d=n[p=_+2])<=.3*b[_]+.59*b[l]+.11*b[p]&&(b[_]=g,b[l]=v,b[p]=d);k=!0;break;case"lightercolor":for(;S--;).3*(g=n[_-=4])+.59*(v=n[l=_+1])+.11*(d=n[p=_+2])>.3*b[_]+.59*b[l]+.11*b[p]&&(b[_]=g,b[l]=v,b[p]=d);k=!0;break;case"lineardodge":for(;S--;)(x=n[_-=4]+b[_])>255?b[_]=255:b[_]=x,(C=n[l=_+1]+b[l])>255?b[l]=255:b[l]=C,(w=n[p=_+2]+b[p])>255?b[p]=255:b[p]=w;k=!0;break;case"linearburn":for(;S--;)(x=n[_-=4]+b[_])<255?b[_]=0:b[_]=x-255,(C=n[l=_+1]+b[l])<255?b[l]=0:b[l]=C-255,(w=n[p=_+2]+b[p])<255?b[p]=0:b[p]=w-255;k=!0;break;case"difference":for(;S--;)(x=n[_-=4]-b[_])<0?b[_]=-x:b[_]=x,(C=n[l=_+1]-b[l])<0?b[l]=-C:b[l]=C,(w=n[p=_+2]-b[p])<0?b[p]=-w:b[p]=w;k=!0;break;case"screen":for(;S--;)b[_-=4]=255-((255-b[_])*(255-n[_])>>8),b[l=_+1]=255-((255-b[l])*(255-n[l])>>8),b[p=_+2]=255-((255-b[p])*(255-n[p])>>8);k=!0;break;case"exclusion":for(var A=2/255;S--;)b[_-=4]=(g=n[_])-(g*A-1)*b[_],b[l=_+1]=(v=n[l])-(v*A-1)*b[l],b[p=_+2]=(d=n[p])-(d*A-1)*b[p];k=!0;break;case"overlay":for(A=2/255;S--;)(g=n[_-=4])<128?b[_]=b[_]*g*A:b[_]=255-(255-b[_])*(255-g)*A,(v=n[l=_+1])<128?b[l]=b[l]*v*A:b[l]=255-(255-b[l])*(255-v)*A,(d=n[p=_+2])<128?b[p]=b[p]*d*A:b[p]=255-(255-b[p])*(255-d)*A;k=!0;break;case"softlight":for(A=2/255;S--;)(g=n[_-=4])<128?b[_]=(64+(b[_]>>1))*g*A:b[_]=255-(191-(b[_]>>1))*(255-g)*A,(v=n[l=_+1])<128?b[l]=(64+(b[l]>>1))*v*A:b[l]=255-(191-(b[l]>>1))*(255-v)*A,(d=n[p=_+2])<128?b[p]=(64+(b[p]>>1))*d*A:b[p]=255-(191-(b[p]>>1))*(255-d)*A;k=!0;break;case"hardlight":for(A=2/255;S--;)(u=b[_-=4])<128?b[_]=n[_]*u*A:b[_]=255-(255-n[_])*(255-u)*A,(f=b[l=_+1])<128?b[l]=n[l]*f*A:b[l]=255-(255-n[l])*(255-f)*A,(m=b[p=_+2])<128?b[p]=n[p]*m*A:b[p]=255-(255-n[p])*(255-m)*A;k=!0;break;case"colordodge":for(;S--;)(x=(n[_-=4]<<8)/(255-(u=b[_])))>255||255==u?b[_]=255:b[_]=x,(C=(n[l=_+1]<<8)/(255-(f=b[l])))>255||255==f?b[l]=255:b[l]=C,(w=(n[p=_+2]<<8)/(255-(m=b[p])))>255||255==m?b[p]=255:b[p]=w;k=!0;break;case"colorburn":for(;S--;)(x=255-(255-n[_-=4]<<8)/b[_])<0||0==b[_]?b[_]=0:b[_]=x,(C=255-(255-n[l=_+1]<<8)/b[l])<0||0==b[l]?b[l]=0:b[l]=C,(w=255-(255-n[p=_+2]<<8)/b[p])<0||0==b[p]?b[p]=0:b[p]=w;k=!0;break;case"linearlight":for(;S--;)(x=2*(u=b[_-=4])+n[_]-256)<0||u<128&&x<0?b[_]=0:b[_]=x>255?255:x,(C=2*(f=b[l=_+1])+n[l]-256)<0||f<128&&C<0?b[l]=0:b[l]=C>255?255:C,(w=2*(m=b[p=_+2])+n[p]-256)<0||m<128&&w<0?b[p]=0:b[p]=w>255?255:w;k=!0;break;case"vividlight":for(;S--;)(u=b[_-=4])<128?u?(x=255-(255-n[_]<<8)/(2*u))<0?b[_]=0:b[_]=x:b[_]=0:(x=P=2*u-256)<255?(x=(n[_]<<8)/(255-P))>255?b[_]=255:b[_]=x:b[_]=x<0?0:x,(f=b[l=_+1])<128?f?(C=255-(255-n[l]<<8)/(2*f))<0?b[l]=0:b[l]=C:b[l]=0:(C=I=2*f-256)<255?(C=(n[l]<<8)/(255-I))>255?b[l]=255:b[l]=C:b[l]=C<0?0:C,(m=b[p=_+2])<128?m?(w=255-(255-n[p]<<8)/(2*m))<0?b[p]=0:b[p]=w:b[p]=0:(w=D=2*m-256)<255?(w=(n[p]<<8)/(255-D))>255?b[p]=255:b[p]=w:b[p]=w<0?0:w;k=!0;break;case"pinlight":for(;S--;)(u=b[_-=4])<128?(g=n[_])<(P=2*u)?b[_]=g:b[_]=P:(g=n[_])>(P=2*u-256)?b[_]=g:b[_]=P,(f=b[l=_+1])<128?(v=n[l])<(I=2*f)?b[l]=v:b[l]=I:(v=n[l])>(I=2*f-256)?b[l]=v:b[l]=I,(u=b[p=_+2])<128?(g=n[p])<(P=2*u)?b[p]=g:b[p]=P:(g=n[p])>(P=2*u-256)?b[p]=g:b[p]=P;k=!0;break;case"hardmix":for(;S--;)(u=b[_-=4])<128?255-(255-n[_]<<8)/(2*u)<128||0==u?b[_]=0:b[_]=255:(P=2*u-256)<255&&(n[_]<<8)/(255-P)<128?b[_]=0:b[_]=255,(f=b[l=_+1])<128?255-(255-n[l]<<8)/(2*f)<128||0==f?b[l]=0:b[l]=255:(I=2*f-256)<255&&(n[l]<<8)/(255-I)<128?b[l]=0:b[l]=255,(m=b[p=_+2])<128?255-(255-n[p]<<8)/(2*m)<128||0==m?b[p]=0:b[p]=255:(D=2*m-256)<255&&(n[p]<<8)/(255-D)<128?b[p]=0:b[p]=255;k=!0}if(k&&h.putImageData(y,0,0),1==a||Pixastic.Client.hasGlobalAlpha()){var E=t.canvas.getContext("2d");E.save(),E.globalAlpha=a,E.drawImage(c,0,0,r.width,r.height,r.left,r.top,r.width,r.height),E.globalAlpha=1,E.restore()}else{for(var S=s*o,F=a,L=1-a;S--;){var N=n[_=4*S]*L+b[_]*F>>0,R=n[_+1]*L+b[_+1]*F>>0,T=n[_+2]*L+b[_+2]*F>>0;n[_]=N,n[_+1]=R,n[_+2]=T}t.useData=!0}return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.blur={process:function(t){if(void 0===t.options.fixMargin&&(t.options.fixMargin=!0),Pixastic.Client.hasCanvasImageData()){for(var a=Pixastic.prepareData(t),e=Pixastic.prepareData(t,!0),i=[[0,1,0],[1,2,1],[0,1,0]],r=0,n=0;n<3;n++)for(var s=0;s<3;s++)r+=i[n][s];r=1/(2*r);var o=t.options.rect,c=o.width,h=o.height,l=4*c,p=h;do{var g=(p-1)*l,v=(1==p?0:p-2)*c*4,d=(p==h?p-1:p)*c*4,u=c;do{var f=g+(4*u-4),m=v+4*(1==u?0:u-2),x=d+4*(u==c?u-1:u);a[f]=(2*(e[m]+e[f-4]+e[f+4]+e[x])+4*e[f])*r,a[f+1]=(2*(e[m+1]+e[f-3]+e[f+5]+e[x+1])+4*e[f+1])*r,a[f+2]=(2*(e[m+2]+e[f-2]+e[f+6]+e[x+2])+4*e[f+2])*r}while(--u)}while(--p);return!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" progid:DXImageTransform.Microsoft.Blur(pixelradius=1.5)",t.options.fixMargin&&(t.image.style.marginLeft=(parseInt(t.image.style.marginLeft,10)||0)-2+"px",t.image.style.marginTop=(parseInt(t.image.style.marginTop,10)||0)-2+"px"),!0},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()||Pixastic.Client.isIE()}},Pixastic.Actions.blurfast={process:function(t){var a=parseFloat(t.options.amount)||0,e=!(!t.options.clear||"false"==t.options.clear);if(a=Math.max(0,Math.min(5,a)),Pixastic.Client.hasCanvas()){var i=t.options.rect,r=t.canvas.getContext("2d");r.save(),r.beginPath(),r.rect(i.left,i.top,i.width,i.height),r.clip();var n=Math.round(t.width/2),s=Math.round(t.height/2),o=document.createElement("canvas");o.width=n,o.height=s;e=!1;for(var c=Math.round(20*a),h=o.getContext("2d"),l=0;l<c;l++){var p=Math.max(1,Math.round(n-l)),g=Math.max(1,Math.round(s-l));h.clearRect(0,0,n,s),h.drawImage(t.canvas,0,0,t.width,t.height,0,0,p,g),e&&r.clearRect(i.left,i.top,i.width,i.height),r.drawImage(o,0,0,p,g,0,0,t.width,t.height)}return r.restore(),t.useData=!1,!0}if(Pixastic.Client.isIE()){var v=10*a;return t.image.style.filter+=" progid:DXImageTransform.Microsoft.Blur(pixelradius="+v+")",t.options.fixMargin,t.image.style.marginLeft=(parseInt(t.image.style.marginLeft,10)||0)-Math.round(v)+"px",t.image.style.marginTop=(parseInt(t.image.style.marginTop,10)||0)-Math.round(v)+"px",!0}},checkSupport:function(){return Pixastic.Client.hasCanvas()||Pixastic.Client.isIE()}},Pixastic.Actions.brightness={process:function(t){var a=parseInt(t.options.brightness,10)||0,e=parseFloat(t.options.contrast)||0,i=!(!t.options.legacy||"false"==t.options.legacy);if(i)a=Math.min(150,Math.max(-150,a));else var r=1+Math.min(150,Math.max(-150,a))/150;if(e=Math.max(0,e+1),Pixastic.Client.hasCanvasImageData()){var n,s,o,c,h,l,p,g=Pixastic.prepareData(t),v=t.options.rect,d=v.width*v.height,u=4*d;for(1!=e?i?(o=e,c=(a-128)*e+128):(o=r*e,c=128*-e+128):i?(o=1,c=a):(o=r,c=0);d--;)(h=g[u-=4]*o+c)>255?g[u]=255:g[u]=h<0?0:h,(l=g[n=u+1]*o+c)>255?g[n]=255:g[n]=l<0?0:l,(p=g[s=u+2]*o+c)>255?g[s]=255:g[s]=p<0?0:p;return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.coloradjust={process:function(t){var a=parseFloat(t.options.red)||0,e=parseFloat(t.options.green)||0,i=parseFloat(t.options.blue)||0;if(a=Math.round(255*a),e=Math.round(255*e),i=Math.round(255*i),Pixastic.Client.hasCanvasImageData()){for(var r,n,s,o,c,h=Pixastic.prepareData(t),l=t.options.rect,p=l.width*l.height,g=4*p;p--;)g-=4,a&&((s=h[g]+a)<0?h[g]=0:h[g]=s>255?255:s),e&&((o=h[r=g+1]+e)<0?h[r]=0:h[r]=o>255?255:o),i&&((c=h[n=g+2]+i)<0?h[n]=0:h[n]=c>255?255:c);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.colorhistogram={array256:function(t){arr=[];for(var a=0;a<256;a++)arr[a]=t;return arr},process:function(t){"object"!=typeof t.options.returnValue&&(t.options.returnValue={rvals:[],gvals:[],bvals:[]});var a=!!t.options.paint,e=t.options.returnValue;if("array"!=typeof e.values&&(e.rvals=[],e.gvals=[],e.bvals=[]),Pixastic.Client.hasCanvasImageData()){var i=Pixastic.prepareData(t);t.useData=!1;for(var r=this.array256(0),n=this.array256(0),s=this.array256(0),o=t.options.rect,c=o.width*o.height,h=4*c;c--;)r[i[h-=4]]++,n[i[h+1]]++,s[i[h+2]]++;if(e.rvals=r,e.gvals=n,e.bvals=s,a)for(var l=t.canvas.getContext("2d"),p=[r,n,s],g=0;g<3;g++){for(var v=(g+1)*t.height/3,d=0,u=0;u<256;u++)p[g][u]>d&&(d=p[g][u]);var f=t.height/3/d,m=t.width/256;0==g?l.fillStyle="rgba(255,0,0,0.5)":1==g?l.fillStyle="rgba(0,255,0,0.5)":2==g&&(l.fillStyle="rgba(0,0,255,0.5)");for(u=0;u<256;u++)l.fillRect(u*m,t.height-f*p[g][u]-t.height+v,m,p[g][u]*f)}return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.crop={process:function(t){if(Pixastic.Client.hasCanvas()){var a=t.options.rect,e=a.width,i=a.height,r=a.top,n=a.left;void 0!==t.options.left&&(n=parseInt(t.options.left,10)),void 0!==t.options.top&&(r=parseInt(t.options.top,10)),void 0!==t.options.height&&(e=parseInt(t.options.width,10)),void 0!==t.options.height&&(i=parseInt(t.options.height,10)),n<0&&(n=0),n>t.width-1&&(n=t.width-1),r<0&&(r=0),r>t.height-1&&(r=t.height-1),e<1&&(e=1),n+e>t.width&&(e=t.width-n),i<1&&(i=1),r+i>t.height&&(i=t.height-r);var s=document.createElement("canvas");return s.width=t.width,s.height=t.height,s.getContext("2d").drawImage(t.canvas,0,0),t.canvas.width=e,t.canvas.height=i,t.canvas.getContext("2d").clearRect(0,0,e,i),t.canvas.getContext("2d").drawImage(s,n,r,e,i,0,0,e,i),t.useData=!1,!0}},checkSupport:function(){return Pixastic.Client.hasCanvas()}},Pixastic.Actions.desaturate={process:function(t){var a=!(!t.options.average||"false"==t.options.average);if(Pixastic.Client.hasCanvasImageData()){var e,i,r=Pixastic.prepareData(t),n=t.options.rect,s=n.width*n.height,o=4*s;if(a)for(;s--;)r[o-=4]=r[e=o+1]=r[i=o+2]=(r[o]+r[e]+r[i])/3;else for(;s--;)r[o-=4]=r[e=o+1]=r[i=o+2]=.3*r[o]+.59*r[e]+.11*r[i];return!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" gray",!0},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()||Pixastic.Client.isIE()}},Pixastic.Actions.edges={process:function(t){var a=!(!t.options.mono||"false"==t.options.mono),e=!(!t.options.invert||"false"==t.options.invert);if(Pixastic.Client.hasCanvasImageData()){var i=Pixastic.prepareData(t),r=Pixastic.prepareData(t,!0),n=-1/8;weight=-8;var s=t.options.rect,o=s.width,c=s.height,h=4*o,l=c;do{var p=(l-1)*h,g=(1==l?0:l-2)*o*4,v=(l==c?l-1:l)*o*4,d=o;do{var u=p+(4*d-4),f=g+4*(1==d?0:d-2),m=v+4*(d==o?d-1:d),x=((r[f-4]+r[f]+r[f+4]+r[u-4]+r[u+4]+r[m-4]+r[m]+r[m+4])*n+r[u])*weight,C=((r[f-3]+r[f+1]+r[f+5]+r[u-3]+r[u+5]+r[m-3]+r[m+1]+r[m+5])*n+r[u+1])*weight,w=((r[f-2]+r[f+2]+r[f+6]+r[u-2]+r[u+6]+r[m-2]+r[m+2]+r[m+6])*n+r[u+2])*weight;if(a){var P=.3*x+.59*C+.11*w||0;e&&(P=255-P),P<0&&(P=0),P>255&&(P=255),x=C=w=P}else e&&(x=255-x,C=255-C,w=255-w),x<0&&(x=0),C<0&&(C=0),w<0&&(w=0),x>255&&(x=255),C>255&&(C=255),w>255&&(w=255);i[u]=x,i[u+1]=C,i[u+2]=w}while(--d)}while(--l);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.edges2={process:function(t){if(Pixastic.Client.hasCanvasImageData()){for(var a=Pixastic.prepareData(t),e=Pixastic.prepareData(t,!0),i=t.options.rect,r=i.width,n=4*r,s=n+4,o=i.height-1,c=r-1,h=1;h<o;++h){for(var l=s-4,p=l-n,g=l+n,v=-e[p]-e[l]-e[g],d=-e[++p]-e[++l]-e[++g],u=-e[++p]-e[++l]-e[++g],f=e[p+=2],m=e[++p],x=e[++p],C=e[l+=2],w=e[++l],P=e[++l],I=e[g+=2],D=e[++g],M=e[++g],b=-f-C-I,y=-m-w-D,_=-x-P-M,k=1;k<c;++k){g=(l=s+4)+n;var A=127+v-f- -8*C-I,E=127+d-m- -8*w-D,S=127+u-x- -8*P-M;v=b,d=y,u=_,f=e[p=l-n],m=e[++p],x=e[++p],C=e[l],w=e[++l],P=e[++l],(A+=b=-f-C-(I=e[g]))>255&&(A=255),(E+=y=-m-w-(D=e[++g]))>255&&(E=255),(S+=_=-x-P-(M=e[++g]))>255&&(S=255),A<0&&(A=0),E<0&&(E=0),S<0&&(S=0),a[s]=A,a[++s]=E,a[++s]=S,s+=2}s+=8}return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.emboss={process:function(t){var a=parseFloat(t.options.strength)||1,e=void 0!==t.options.greyLevel?parseInt(t.options.greyLevel):180,i=t.options.direction||"topleft",r=!(!t.options.blend||"false"==t.options.blend),n=0,s=0;switch(i){case"topleft":n=-1,s=-1;break;case"top":n=-1,s=0;break;case"topright":n=-1,s=1;break;case"right":n=0,s=1;break;case"bottomright":n=1,s=1;break;case"bottom":n=1,s=0;break;case"bottomleft":n=1,s=-1;break;case"left":n=0,s=-1}if(Pixastic.Client.hasCanvasImageData()){var o=Pixastic.prepareData(t),c=Pixastic.prepareData(t,!0),h=(t.options.invertAlpha,t.options.rect),l=h.width,p=h.height,g=4*l,v=p;do{var d=(v-1)*g,u=n;v+u<1&&(u=0),v+u>p&&(u=0);var f=(v-1+u)*l*4,m=l;do{var x=d+4*(m-1),C=s;m+C<1&&(C=0),m+C>l&&(C=0);var w=f+4*(m-1+C),P=c[x]-c[w],I=c[x+1]-c[w+1],D=c[x+2]-c[w+2],M=P,b=M>0?M:-M;if((I>0?I:-I)>b&&(M=I),(D>0?D:-D)>b&&(M=D),M*=a,r){var y=o[x]+M,_=o[x+1]+M,k=o[x+2]+M;o[x]=y>255?255:y<0?0:y,o[x+1]=_>255?255:_<0?0:_,o[x+2]=k>255?255:k<0?0:k}else{var A=e-M;A<0?A=0:A>255&&(A=255),o[x]=o[x+1]=o[x+2]=A}}while(--m)}while(--v);return!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" progid:DXImageTransform.Microsoft.emboss()",!0},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()||Pixastic.Client.isIE()}},Pixastic.Actions.flip={process:function(t){var a=t.options.rect,e=document.createElement("canvas");e.width=a.width,e.height=a.height,e.getContext("2d").drawImage(t.image,a.left,a.top,a.width,a.height,0,0,a.width,a.height);var i=t.canvas.getContext("2d");return i.clearRect(a.left,a.top,a.width,a.height),"horizontal"==t.options.axis?(i.scale(-1,1),i.drawImage(e,-a.left-a.width,a.top,a.width,a.height)):(i.scale(1,-1),i.drawImage(e,a.left,-a.top-a.height,a.width,a.height)),t.useData=!1,!0},checkSupport:function(){return Pixastic.Client.hasCanvas()}},Pixastic.Actions.fliph={process:function(t){if(Pixastic.Client.hasCanvas()){var a=t.options.rect,e=document.createElement("canvas");e.width=a.width,e.height=a.height,e.getContext("2d").drawImage(t.image,a.left,a.top,a.width,a.height,0,0,a.width,a.height);var i=t.canvas.getContext("2d");return i.clearRect(a.left,a.top,a.width,a.height),i.scale(-1,1),i.drawImage(e,-a.left-a.width,a.top,a.width,a.height),t.useData=!1,!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" fliph",!0},checkSupport:function(){return Pixastic.Client.hasCanvas()||Pixastic.Client.isIE()}},Pixastic.Actions.flipv={process:function(t){if(Pixastic.Client.hasCanvas()){var a=t.options.rect,e=document.createElement("canvas");e.width=a.width,e.height=a.height,e.getContext("2d").drawImage(t.image,a.left,a.top,a.width,a.height,0,0,a.width,a.height);var i=t.canvas.getContext("2d");return i.clearRect(a.left,a.top,a.width,a.height),i.scale(1,-1),i.drawImage(e,a.left,-a.top-a.height,a.width,a.height),t.useData=!1,!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" flipv",!0},checkSupport:function(){return Pixastic.Client.hasCanvas()||Pixastic.Client.isIE()}},Pixastic.Actions.glow={process:function(t){var a=parseFloat(t.options.amount)||0,e=parseFloat(t.options.radius)||0;if(a=Math.min(1,Math.max(0,a)),e=Math.min(5,Math.max(0,e)),Pixastic.Client.hasCanvasImageData()){var i=t.options.rect,r=document.createElement("canvas");r.width=t.width,r.height=t.height;var n=r.getContext("2d");n.drawImage(t.canvas,0,0);var s=Math.round(t.width/2),o=Math.round(t.height/2),c=document.createElement("canvas");c.width=s,c.height=o;for(var h=Math.round(20*e),l=c.getContext("2d"),p=0;p<h;p++){var g=Math.max(1,Math.round(s-p)),v=Math.max(1,Math.round(o-p));l.clearRect(0,0,s,o),l.drawImage(r,0,0,t.width,t.height,0,0,g,v),n.clearRect(0,0,t.width,t.height),n.drawImage(c,0,0,g,v,0,0,t.width,t.height)}for(var d=Pixastic.prepareData(t),u=Pixastic.prepareData({canvas:r,options:t.options}),f=i.width*i.height,m=4*f,x=m+1,C=m+2;f--;)(d[m-=4]+=a*u[m])>255&&(d[m]=255),(d[x-=4]+=a*u[x])>255&&(d[x]=255),(d[C-=4]+=a*u[C])>255&&(d[C]=255);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.histogram={process:function(t){var a=!(!t.options.average||"false"==t.options.average),e=!(!t.options.paint||"false"==t.options.paint),i=t.options.color||"rgba(255,255,255,0.5)",r=[];"object"!=typeof t.options.returnValue&&(t.options.returnValue={values:[]});var n=t.options.returnValue;if("array"!=typeof n.values&&(n.values=[]),r=n.values,Pixastic.Client.hasCanvasImageData()){var s=Pixastic.prepareData(t);t.useData=!1;for(var o=0;o<256;o++)r[o]=0;var c=t.options.rect,h=c.width*c.height,l=4*h,p=Math.round;if(a)for(;h--;)r[p((s[l-=4]+s[l+1]+s[l+2])/3)]++;else for(;h--;)r[p(.3*s[l-=4]+.59*s[l+1]+.11*s[l+2])]++;if(e){var g=0;for(o=0;o<256;o++)r[o]>g&&(g=r[o]);var v=t.height/g,d=t.width/256,u=t.canvas.getContext("2d");u.fillStyle=i;for(o=0;o<256;o++)u.fillRect(o*d,t.height-v*r[o],d,r[o]*v)}return n.values=r,!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.hsl={process:function(t){var a=parseInt(t.options.hue,10)||0,e=(parseInt(t.options.saturation,10)||0)/100,i=(parseInt(t.options.lightness,10)||0)/100;if(e<0)var r=1+e;else r=1+2*e;var n=6*(a=a%360/360),s=255*i,o=1+i,c=1-i;if(Pixastic.Client.hasCanvasImageData()){for(var h=Pixastic.prepareData(t),l=t.options.rect,p=l.width*l.height,g=4*p,v=g+1,d=g+2;p--;){var u=h[g-=4],f=h[v=g+1],m=h[d=g+2];if(0!=a||0!=e){var x=u;f>x&&(x=f),m>x&&(x=m);var C=u;f<C&&(C=f),m<C&&(C=m);var w=x-C,P=(C+x)/510;if(P>0&&w>0){if(P<=.5){(D=w/(x+C)*r)>1&&(D=1);var I=P*(1+D)}else{var D;(D=w/(510-x-C)*r)>1&&(D=1);I=P+D-P*D}if(u==x)if(f==C)var M=5+(x-m)/w+n;else M=1-(x-f)/w+n;else if(f==x)if(m==C)M=1+(x-u)/w+n;else M=3-(x-m)/w+n;else if(u==C)M=3+(x-f)/w+n;else M=5-(x-u)/w+n;M<0&&(M+=6),M>=6&&(M-=6);var b=P+P-I,y=M>>0;0==y?(u=255*I,f=255*(b+(I-b)*(M-y)),m=255*b):1==y?(u=255*(I-(I-b)*(M-y)),f=255*I,m=255*b):2==y?(u=255*b,f=255*I,m=255*(b+(I-b)*(M-y))):3==y?(u=255*b,f=255*(I-(I-b)*(M-y)),m=255*I):4==y?(u=255*(b+(I-b)*(M-y)),f=255*b,m=255*I):5==y&&(u=255*I,f=255*b,m=255*(I-(I-b)*(M-y)))}}i<0?(u*=o,f*=o,m*=o):i>0&&(u=u*c+s,f=f*c+s,m=m*c+s),h[g]=u<0?0:u>255?255:u,h[v]=f<0?0:f>255?255:f,h[d]=m<0?0:m>255?255:m}return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.invert={process:function(t){if(Pixastic.Client.hasCanvasImageData()){for(var a=Pixastic.prepareData(t),e=!!t.options.invertAlpha,i=t.options.rect,r=i.width*i.height,n=4*r,s=n+1,o=n+2,c=n+3;r--;)a[n-=4]=255-a[n],a[s-=4]=255-a[s],a[o-=4]=255-a[o],e&&(a[c-=4]=255-a[c]);return!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" invert",!0},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()||Pixastic.Client.isIE()}},Pixastic.Actions.laplace={process:function(t){var a=!(!t.options.invert||"false"==t.options.invert),e=parseFloat(t.options.edgeStrength)||0,i=parseInt(t.options.greyLevel)||0;if(e=-e,Pixastic.Client.hasCanvasImageData()){var r=Pixastic.prepareData(t),n=Pixastic.prepareData(t,!0),s=1/8,o=t.options.rect,c=o.width,h=o.height,l=4*c,p=h;do{var g=(p-1)*l,v=(1==p?0:p-2)*c*4,d=(p==h?p-1:p)*c*4,u=c;do{var f=g+(4*u-4),m=v+4*(1==u?0:u-2),x=d+4*(u==c?u-1:u),C=((-n[m-4]-n[m]-n[m+4]-n[f-4]-n[f+4]-n[x-4]-n[x]-n[x+4]+8*n[f])*s+(-n[m-3]-n[m+1]-n[m+5]-n[f-3]-n[f+5]-n[x-3]-n[x+1]-n[x+5]+8*n[f+1])*s+(-n[m-2]-n[m+2]-n[m+6]-n[f-2]-n[f+6]-n[x-2]-n[x+2]-n[x+6]+8*n[f+2])*s)/3+i;0!=e&&(C>127?C+=(C+1-128)*e:C<127&&(C-=(C+1)*e)),a&&(C=255-C),C<0&&(C=0),C>255&&(C=255),r[f]=r[f+1]=r[f+2]=C}while(--u)}while(--p);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.lighten={process:function(t){var a=parseFloat(t.options.amount)||0;if(a=Math.max(-1,Math.min(1,a)),Pixastic.Client.hasCanvasImageData()){for(var e=Pixastic.prepareData(t),i=t.options.rect,r=i.width*i.height,n=4*r,s=n+1,o=n+2,c=a+1;r--;)(e[n-=4]=e[n]*c)>255&&(e[n]=255),(e[s-=4]=e[s]*c)>255&&(e[s]=255),(e[o-=4]=e[o]*c)>255&&(e[o]=255);return!0}if(Pixastic.Client.isIE()){var h=t.image;return a<0?(h.style.filter+=" light()",h.filters[h.filters.length-1].addAmbient(255,255,255,100*-a)):a>0&&(h.style.filter+=" light()",h.filters[h.filters.length-1].addAmbient(255,255,255,100),h.filters[h.filters.length-1].addAmbient(255,255,255,100*a)),!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()||Pixastic.Client.isIE()}},Pixastic.Actions.mosaic={process:function(t){var a=Math.max(1,parseInt(t.options.blockSize,10));if(Pixastic.Client.hasCanvasImageData()){var e=t.options.rect,i=e.width,r=e.height,n=r,s=t.canvas.getContext("2d"),o=document.createElement("canvas");o.width=o.height=1;var c=o.getContext("2d"),h=document.createElement("canvas");h.width=i,h.height=r,h.getContext("2d").drawImage(t.canvas,e.left,e.top,i,r,0,0,i,r);for(n=0;n<r;n+=a)for(var l=0;l<i;l+=a){var p=a,g=a;p+l>i&&(p=i-l),g+n>r&&(g=r-n),c.drawImage(h,l,n,p,g,0,0,1,1);var v=c.getImageData(0,0,1,1).data;s.fillStyle="rgb("+v[0]+","+v[1]+","+v[2]+")",s.fillRect(e.left+l,e.top+n,a,a)}return t.useData=!1,!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.noise={process:function(t){var a=0,e=0,i=!1;void 0!==t.options.amount&&(a=parseFloat(t.options.amount)||0),void 0!==t.options.strength&&(e=parseFloat(t.options.strength)||0),void 0!==t.options.mono&&(i=!(!t.options.mono||"false"==t.options.mono)),a=Math.max(0,Math.min(1,a));var r=128*(e=Math.max(0,Math.min(1,e))),n=r/2;if(Pixastic.Client.hasCanvasImageData()){var s=Pixastic.prepareData(t),o=t.options.rect,c=o.width,h=4*c,l=o.height,p=Math.random;do{var g=(l-1)*h,v=c;do{var d=g+4*(v-1);if(p()<a){if(i)var u=-n+p()*r,f=s[d]+u,m=s[d+1]+u,x=s[d+2]+u;else f=s[d]-n+p()*r,m=s[d+1]-n+p()*r,x=s[d+2]-n+p()*r;f<0&&(f=0),m<0&&(m=0),x<0&&(x=0),f>255&&(f=255),m>255&&(m=255),x>255&&(x=255),s[d]=f,s[d+1]=m,s[d+2]=x}}while(--v)}while(--l);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.posterize={process:function(t){var a=256;if(void 0!==t.options.levels&&(a=parseInt(t.options.levels,10)||1),Pixastic.Client.hasCanvasImageData()){var e=Pixastic.prepareData(t),i=256/(a=Math.max(2,Math.min(256,a))),r=256/(a-1),n=t.options.rect,s=n.width,o=4*s,c=n.height;do{var h=(c-1)*o,l=s;do{var p=h+4*(l-1),g=r*(e[p]/i>>0),v=r*(e[p+1]/i>>0),d=r*(e[p+2]/i>>0);g>255&&(g=255),v>255&&(v=255),d>255&&(d=255),e[p]=g,e[p+1]=v,e[p+2]=d}while(--l)}while(--c);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.pointillize={process:function(t){var a=Math.max(1,parseInt(t.options.radius,10)),e=Math.min(5,Math.max(0,parseFloat(t.options.density)||0)),i=Math.max(0,parseFloat(t.options.noise)||0),r=!(!t.options.transparent||"false"==t.options.transparent);if(Pixastic.Client.hasCanvasImageData()){var n=t.options.rect,s=n.width,o=n.height,c=o,h=t.canvas.getContext("2d"),l=t.canvas.width,p=t.canvas.height,g=document.createElement("canvas");g.width=g.height=1;var v=g.getContext("2d"),d=document.createElement("canvas");d.width=s,d.height=o,d.getContext("2d").drawImage(t.canvas,n.left,n.top,s,o,0,0,s,o);var u=2*a;r&&h.clearRect(n.left,n.top,n.width,n.height);var f=a*i,m=1/e;for(c=0;c<o+a;c+=u*m)for(var x=0;x<s+a;x+=u*m){rndX=i?x+(2*Math.random()-1)*f>>0:x,rndY=i?c+(2*Math.random()-1)*f>>0:c;var C=rndX-a,w=rndY-a;C<0&&(C=0),w<0&&(w=0);var P=rndX+n.left,I=rndY+n.top;P<0&&(P=0),P>l&&(P=l),I<0&&(I=0),I>p&&(I=p);var D=u,M=u;D+C>s&&(D=s-C),M+w>o&&(M=o-w),D<1&&(D=1),M<1&&(M=1),v.drawImage(d,C,w,D,M,0,0,1,1);var b=v.getImageData(0,0,1,1).data;h.fillStyle="rgb("+b[0]+","+b[1]+","+b[2]+")",h.beginPath(),h.arc(P,I,a,0,2*Math.PI,!0),h.closePath(),h.fill()}return t.useData=!1,!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.removenoise={process:function(t){if(Pixastic.Client.hasCanvasImageData()){var a=Pixastic.prepareData(t),e=t.options.rect,i=e.width,r=e.height,n=4*i,s=r;do{var o=(s-1)*n,c=(1==s?0:s-2)*i*4,h=(s==r?s-1:s)*i*4,l=i;do{var p,g,v,d,u,f,m=o+(4*l-4),x=c+4*(1==l?0:l-2),C=h+4*(l==i?l-1:l);p=g=a[x];var w=a[m-4],P=a[m+4],I=a[C];w<p&&(p=w),P<p&&(p=P),I<p&&(p=I),w>g&&(g=w),P>g&&(g=P),I>g&&(g=I),v=d=a[x+1];var D=a[m-3],M=a[m+5],b=a[C+1];D<v&&(v=D),M<v&&(v=M),b<v&&(v=b),D>d&&(d=D),M>d&&(d=M),b>d&&(d=b),u=f=a[x+2];var y=a[m-2],_=a[m+6],k=a[C+2];y<u&&(u=y),_<u&&(u=_),k<u&&(u=k),y>f&&(f=y),_>f&&(f=_),k>f&&(f=k),a[m]>g?a[m]=g:a[m]<p&&(a[m]=p),a[m+1]>d?a[m+1]=d:a[m+1]<v&&(a[m+1]=v),a[m+2]>f?a[m+2]=f:a[m+2]<u&&(a[m+2]=u)}while(--l)}while(--s);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.resize={process:function(t){if(Pixastic.Client.hasCanvas()){var a=parseInt(t.options.width,10),e=parseInt(t.options.height,10),i=t.canvas;a<1&&(a=1),a<2&&(a=2);var r=document.createElement("canvas");return r.width=a,r.height=e,r.getContext("2d").drawImage(i,0,0,a,e),i.width=a,i.height=e,i.getContext("2d").drawImage(r,0,0),t.useData=!1,!0}},checkSupport:function(){return Pixastic.Client.hasCanvas()}},Pixastic.Actions.rotate={process:function(t){if(Pixastic.Client.hasCanvas()){var a=t.canvas,e=t.width,i=t.height,r=document.createElement("canvas");r.width=e,r.height=i,r.getContext("2d").drawImage(a,0,0,e,i);var n=-parseFloat(t.options.angle)*Math.PI/180,s=n;s>.5*Math.PI&&(s=Math.PI-s),s<.5*-Math.PI&&(s=-Math.PI-s);var o=Math.sqrt(e*e+i*i),c=Math.abs(s)-Math.abs(Math.atan2(i,e)),h=Math.abs(s)+Math.abs(Math.atan2(i,e)),l=Math.abs(Math.cos(c)*o),p=Math.abs(Math.sin(h)*o);a.width=l,a.height=p;var g=a.getContext("2d");return g.translate(l/2,p/2),g.rotate(n),g.drawImage(r,-e/2,-i/2),t.useData=!1,!0}},checkSupport:function(){return Pixastic.Client.hasCanvas()}},Pixastic.Actions.sepia={process:function(t){var a=parseInt(t.options.mode,10)||0;if(a<0&&(a=0),a>1&&(a=1),Pixastic.Client.hasCanvasImageData()){var e=Pixastic.prepareData(t),i=t.options.rect,r=i.width,n=4*r,s=i.height;do{var o=(s-1)*n,c=r;do{var h=o+4*(c-1);if(a)var l=.299*e[h]+.587*e[h+1]+.114*e[h+2],p=l+39,g=l+14,v=l-36;else{var d=e[h],u=e[h+1],f=e[h+2];p=.393*d+.769*u+.189*f,g=.349*d+.686*u+.168*f,v=.272*d+.534*u+.131*f}p<0&&(p=0),p>255&&(p=255),g<0&&(g=0),g>255&&(g=255),v<0&&(v=0),v>255&&(v=255),e[h]=p,e[h+1]=g,e[h+2]=v}while(--c)}while(--s);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.sharpen={process:function(t){var a=0;if(void 0!==t.options.amount&&(a=parseFloat(t.options.amount)||0),a<0&&(a=0),a>1&&(a=1),Pixastic.Client.hasCanvasImageData()){for(var e=Pixastic.prepareData(t),i=Pixastic.prepareData(t,!0),r=15,n=1+3*a,s=[[0,-n,0],[-n,r,-n],[0,-n,0]],o=0,c=0;c<3;c++)for(var h=0;h<3;h++)o+=s[c][h];o=1/o;var l=t.options.rect,p=l.width,g=l.height;r*=o,n*=o;var v=4*p,d=g;do{var u=(d-1)*v,f=(1==d?0:d-2)*v,m=(d==g?d-1:d)*v,x=p;do{var C=u+(4*x-4),w=f+4*(1==x?0:x-2),P=m+4*(x==p?x-1:x),I=(-i[w]-i[C-4]-i[C+4]-i[P])*n+i[C]*r,D=(-i[w+1]-i[C-3]-i[C+5]-i[P+1])*n+i[C+1]*r,M=(-i[w+2]-i[C-2]-i[C+6]-i[P+2])*n+i[C+2]*r;I<0&&(I=0),D<0&&(D=0),M<0&&(M=0),I>255&&(I=255),D>255&&(D=255),M>255&&(M=255),e[C]=I,e[C+1]=D,e[C+2]=M}while(--x)}while(--d);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.solarize={process:function(t){!t.options.average||t.options.average;if(Pixastic.Client.hasCanvasImageData()){var a=Pixastic.prepareData(t),e=t.options.rect,i=e.width,r=4*i,n=e.height;do{var s=(n-1)*r,o=i;do{var c=s+4*(o-1),h=a[c],l=a[c+1],p=a[c+2];h>127&&(h=255-h),l>127&&(l=255-l),p>127&&(p=255-p),a[c]=h,a[c+1]=l,a[c+2]=p}while(--o)}while(--n);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.unsharpmask={process:function(t){var a=parseFloat(t.options.amount)||0,e=parseFloat(t.options.radius)||0,i=parseFloat(t.options.threshold)||0;a=Math.min(500,Math.max(0,a))/2,e=Math.min(5,Math.max(0,e))/10,i=Math.min(255,Math.max(0,i));var r=- --i;if(a*=.016,a++,Pixastic.Client.hasCanvasImageData()){var n=t.options.rect,s=document.createElement("canvas");s.width=t.width,s.height=t.height;var o=s.getContext("2d");o.drawImage(t.canvas,0,0);var c=Math.round(t.width/2),h=Math.round(t.height/2),l=document.createElement("canvas");l.width=c,l.height=h;for(var p=Math.round(20*e),g=l.getContext("2d"),v=0;v<p;v++){var d=Math.max(1,Math.round(c-v)),u=Math.max(1,Math.round(h-v));g.clearRect(0,0,c,h),g.drawImage(s,0,0,t.width,t.height,0,0,d,u),o.clearRect(0,0,t.width,t.height),o.drawImage(l,0,0,d,u,0,0,t.width,t.height)}var f=Pixastic.prepareData(t),m=Pixastic.prepareData({canvas:s,options:t.options}),x=n.width,C=4*x,w=n.height;do{var P=(w-1)*C,I=x;do{var D=P+(4*I-4),M=f[D]-m[D];if(M>i||M<r){var b=m[D];b=a*M+b,f[D]=b>255?255:b<0?0:b}var y=f[D+1]-m[D+1];if(y>i||y<r){var _=m[D+1];_=a*y+_,f[D+1]=_>255?255:_<0?0:_}var k=f[D+2]-m[D+2];if(k>i||k<r){var A=m[D+2];A=a*k+A,f[D+2]=A>255?255:A<0?0:A}}while(--I)}while(--w);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var prettyPrint=function(){var e={el:function(t,n){var o,r=document.createElement(t);if((n=e.merge({},n))&&n.style){n.style;e.applyCSS(r,n.style),delete n.style}for(o in n)n.hasOwnProperty(o)&&(r[o]=n[o]);return r},applyCSS:function(e,t){for(var n in t)if(t.hasOwnProperty(n))try{e.style[n]=t[n]}catch(e){}},txt:function(e){return document.createTextNode(e)},row:function(t,n,o){o=o||"td";var r,a=e.count(t,null)+1,d=e.el("tr"),i={style:e.getStyles(o,n),colSpan:a,onmouseover:function(){var t=this.parentNode.childNodes;e.forEach(t,(function(t){"td"===t.nodeName.toLowerCase()&&e.applyCSS(t,e.getStyles("td_hover",n))}))},onmouseout:function(){var t=this.parentNode.childNodes;e.forEach(t,(function(t){"td"===t.nodeName.toLowerCase()&&e.applyCSS(t,e.getStyles("td",n))}))}};return e.forEach(t,(function(t){null!==t&&(r=e.el(o,i),t.nodeType?r.appendChild(t):r.innerHTML=e.shorten(t.toString()),d.appendChild(r))})),d},hRow:function(t,n){return e.row(t,n,"th")},table:function(t,n){t=t||[];var o={thead:{style:e.getStyles("thead",n)},tbody:{style:e.getStyles("tbody",n)},table:{style:e.getStyles("table",n)}},r=e.el("table",o.table),a=e.el("thead",o.thead),d=e.el("tbody",o.tbody);return t.length&&(r.appendChild(a),a.appendChild(e.hRow(t,n))),r.appendChild(d),{node:r,tbody:d,thead:a,appendChild:function(e){this.tbody.appendChild(e)},addRow:function(t,o,r){return this.appendChild(e.row.call(e,t,o||n,r)),this}}},shorten:function(e){return(e=e.replace(/^\s\s*|\s\s*$|\n/g,"")).length>40?e.substring(0,39)+"...":e},htmlentities:function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},merge:function(t,n){for(var o in"object"!=typeof t&&(t={}),n)if(n.hasOwnProperty(o)){var r=n[o];if("object"==typeof r){t[o]=e.merge(t[o],r);continue}t[o]=r}for(var a=2,d=arguments.length;a<d;a++)e.merge(t,arguments[a]);return t},count:function(e,t){for(var n=0,o=0,r=e.length;o<r;o++)e[o]===t&&n++;return n},thead:function(e){return e.getElementsByTagName("thead")[0]},forEach:function(e,t,n){n||(n=t);for(var o=e.length,r=-1;++r<o&&!1!==n(e[r],r,e););return!0},type:function(e){try{if(null===e)return"null";if(void 0===e)return"undefined";var t=Object.prototype.toString.call(e).match(/\s(.+?)\]/)[1].toLowerCase();return e.nodeType?1===e.nodeType?"domelement":"domnode":/^(string|number|array|regexp|function|date|boolean)$/.test(t)?t:"object"==typeof e?e.jquery&&"string"==typeof e.jquery?"jquery":"object":e===window||e===document?"object":"default"}catch(e){return"default"}},within:function(e){return{is:function(t){for(var n in e)if(e[n]===t)return n;return""}}},common:{circRef:function(n,o,r){return e.expander("[POINTS BACK TO <strong>"+o+"</strong>]","Click to show this item anyway",(function(){this.parentNode.appendChild(t(n,{maxDepth:1}))}))},depthReached:function(n,o){return e.expander("[DEPTH REACHED]","Click to show this item anyway",(function(){try{this.parentNode.appendChild(t(n,{maxDepth:1}))}catch(t){this.parentNode.appendChild(e.table(["ERROR OCCURED DURING OBJECT RETRIEVAL"],"error").addRow([t.message]).node)}}))}},getStyles:function(n,o){return o=t.settings.styles[o]||{},e.merge({},t.settings.styles.default[n],o[n])},expander:function(t,n,o){return e.el("a",{innerHTML:e.shorten(t)+' <b style="visibility:hidden;">[+]</b>',title:n,onmouseover:function(){this.getElementsByTagName("b")[0].style.visibility="visible"},onmouseout:function(){this.getElementsByTagName("b")[0].style.visibility="hidden"},onclick:function(){return this.style.display="none",o.call(this),!1},style:{cursor:"pointer"}})},stringify:function(t){var n,o=e.type(t),r=!0;if("array"===o)return n="[",e.forEach(t,(function(t,o){n+=(0===o?"":", ")+e.stringify(t)})),n+"]";if("object"==typeof t){for(var a in n="{",t)t.hasOwnProperty(a)&&(n+=(r?"":", ")+a+":"+e.stringify(t[a]),r=!1);return n+"}"}return"regexp"===o?"/"+t.source+"/":"string"===o?'"'+t.replace(/"/g,'\\"')+'"':t.toString()},headerGradient:function(){var e=document.createElement("canvas");if(!e.getContext)return"";var t=e.getContext("2d");e.height=30,e.width=1;var n=t.createLinearGradient(0,0,0,30);return n.addColorStop(0,"rgba(0,0,0,0)"),n.addColorStop(1,"rgba(0,0,0,0.25)"),t.fillStyle=n,t.fillRect(0,0,1,30),"url("+(e.toDataURL&&e.toDataURL()||"")+")"}()},t=function(n,o){o=o||{};var r=e.merge({},t.config,o),a=e.el("div"),d=(t.config,{}),i=!1;t.settings=r;var l={string:function(t){return e.txt('"'+e.shorten(t.replace(/"/g,'\\"'))+'"')},number:function(t){return e.txt(t)},regexp:function(t){var n=e.table(["RegExp",null],"regexp"),o=e.table(),a=e.expander("/"+t.source+"/","Click to show more",(function(){this.parentNode.appendChild(n.node)}));return o.addRow(["g",t.global]).addRow(["i",t.ignoreCase]).addRow(["m",t.multiline]),n.addRow(["source","/"+t.source+"/"]).addRow(["flags",o.node]).addRow(["lastIndex",t.lastIndex]),r.expanded?n.node:a},domelement:function(t,n){var o=e.table(["DOMElement",null],"domelement"),a=t.nodeName||"";return o.addRow(["tag","<"+a.toLowerCase()+">"]),e.forEach(["id","className","innerHTML","src","href"],(function(n){t[n]&&o.addRow([n,e.htmlentities(t[n])])})),r.expanded?o.node:e.expander("DOMElement ("+a.toLowerCase()+")","Click to show more",(function(){this.parentNode.appendChild(o.node)}))},domnode:function(t){var n=e.table(["DOMNode",null],"domelement"),o=e.htmlentities((t.data||"UNDEFINED").replace(/\n/g,"\\n"));return n.addRow(["nodeType",t.nodeType+" ("+t.nodeName+")"]).addRow(["data",o]),r.expanded?n.node:e.expander("DOMNode","Click to show more",(function(){this.parentNode.appendChild(n.node)}))},jquery:function(e,t,n){return l.array(e,t,n,!0)},object:function(t,n,o){var a=e.within(d).is(t);if(a)return e.common.circRef(t,a,r);if(d[o||"TOP"]=t,n===r.maxDepth)return e.common.depthReached(t,r);var c=e.table(["Object",null],"object"),u=!0;for(var s in t)if(!t.hasOwnProperty||t.hasOwnProperty(s)){var p=t[s],h=e.type(p);u=!1;try{c.addRow([s,l[h](p,n+1,s)],h)}catch(e){window.console&&window.console.log&&console.log(e.message)}}u?c.addRow(["<small>[empty]</small>"]):c.thead.appendChild(e.hRow(["key","value"],"colHeader"));var f=r.expanded||i?c.node:e.expander(e.stringify(t),"Click to show more",(function(){this.parentNode.appendChild(c.node)}));return i=!0,f},array:function(t,n,o,a){var i=e.within(d).is(t);if(i)return e.common.circRef(t,i);if(d[o||"TOP"]=t,n===r.maxDepth)return e.common.depthReached(t);var c=a?"jQuery":"Array",u=e.table([c+"("+t.length+")",null],a?"jquery":c.toLowerCase()),s=!0,p=0;return a&&u.addRow(["selector",t.selector]),e.forEach(t,(function(o,a){if(r.maxArray>=0&&++p>r.maxArray)return u.addRow([a+".."+(t.length-1),l[e.type(o)]("...",n+1,a)]),!1;s=!1,u.addRow([a,l[e.type(o)](o,n+1,a)])})),a||(s?u.addRow(["<small>[empty]</small>"]):u.thead.appendChild(e.hRow(["index","value"],"colHeader"))),r.expanded?u.node:e.expander(e.stringify(t),"Click to show more",(function(){this.parentNode.appendChild(u.node)}))},function:function(t,n,o){var a=e.within(d).is(t);if(a)return e.common.circRef(t,a);d[o||"TOP"]=t;var i=e.table(["Function",null],"function"),l=(e.table(["Arguments"]),t.toString().match(/\((.+?)\)/)),c=t.toString().match(/\(.*?\)\s+?\{?([\S\s]+)/)[1].replace(/\}?$/,"");return i.addRow(["arguments",l?l[1].replace(/[^\w_,\s]/g,""):"<small>[none/native]</small>"]).addRow(["body",c]),r.expanded?i.node:e.expander("function(){...}","Click to see more about this function.",(function(){this.parentNode.appendChild(i.node)}))},date:function(t){var n=e.table(["Date",null],"date"),o=t.toString().split(/\s/);return n.addRow(["Time",o[4]]).addRow(["Date",o.slice(0,4).join("-")]),r.expanded?n.node:e.expander("Date (timestamp): "+ +t,"Click to see a little more info about this date",(function(){this.parentNode.appendChild(n.node)}))},boolean:function(t){return e.txt(t.toString().toUpperCase())},undefined:function(){return e.txt("UNDEFINED")},null:function(){return e.txt("NULL")},default:function(){return e.txt("prettyPrint: TypeNotFound Error")}};return a.appendChild(l[r.forceObject?"object":e.type(n)](n,0)),a};return t.config={expanded:!0,forceObject:!1,maxDepth:3,maxArray:-1,styles:{array:{th:{backgroundColor:"#6DBD2A",color:"white"}},function:{th:{backgroundColor:"#D82525"}},regexp:{th:{backgroundColor:"#E2F3FB",color:"#000"}},object:{th:{backgroundColor:"#1F96CF"}},jquery:{th:{backgroundColor:"#FBF315"}},error:{th:{backgroundColor:"red",color:"yellow"}},domelement:{th:{backgroundColor:"#F3801E"}},date:{th:{backgroundColor:"#A725D8"}},colHeader:{th:{backgroundColor:"#EEE",color:"#000",textTransform:"uppercase"}},default:{table:{borderCollapse:"collapse",width:"100%"},td:{padding:"5px",fontSize:"12px",backgroundColor:"#FFF",color:"#222",border:"1px solid #000",verticalAlign:"top",fontFamily:'"Consolas","Lucida Console",Courier,mono',whiteSpace:"nowrap"},td_hover:{},th:{padding:"5px",fontSize:"12px",backgroundColor:"#222",color:"#EEE",textAlign:"left",border:"1px solid #000",verticalAlign:"top",fontFamily:'"Consolas","Lucida Console",Courier,mono',backgroundImage:e.headerGradient,backgroundRepeat:"repeat-x"}}}},t}();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function Arcfour(){this.i=0,this.j=0,this.S=new Array}function ARC4init(i){var t,s,h;for(t=0;t<256;++t)this.S[t]=t;for(s=0,t=0;t<256;++t)s=s+this.S[t]+i[t%i.length]&255,h=this.S[t],this.S[t]=this.S[s],this.S[s]=h;this.i=0,this.j=0}function ARC4next(){var i;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,i=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=i,this.S[i+this.S[this.i]&255]}function prng_newstate(){return new Arcfour}Arcfour.prototype.init=ARC4init,Arcfour.prototype.next=ARC4next;var rng_psize=256;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Uint8Array.prototype.toJSArray=function(){if(1==this.length)return[this[0]];for(var t=this.length,i=new Array(t),s=0;s<t;s++)i[s]=this[s];return i},wdi.FixedQueue=$.spcExtend(wdi.DomainObject,{q:null,size:10485760,grow:10485760,woffset:0,roffset:0,init:function(t){this.q=new Uint8Array(this.size)},setData:function(t){this.woffset=t.length,this.roffset=0,this.q.set(t)},shift:function(t){if(this.roffset+t>this.woffset)throw"Not enough queue to read";var i=this.q.subarray(this.roffset,this.roffset+t);return this.roffset=this.roffset+t,this.woffset==this.roffset&&(this.woffset=0,this.roffset=0),i},push:function(t){if(this.woffset+t.byteLength>this.size){var i=this.q;this.size+=this.grow,this.q=new Uint8Array(this.size),this.q.set(i)}this.q.set(t,this.woffset),this.woffset+=t.byteLength},getLength:function(){return this.woffset-this.roffset}}),wdi.Queue=$.spcExtend(wdi.DomainObject,{q:null,raw:!1,init:function(t){t.raw&&(this.raw=t.raw),this.q=new Uint8Array(0)},getData:function(){return this.toJSArray(this.q)},setData:function(t){this.q=new Uint8Array(t.length),this.q.set(t)},shift:function(){var t=arguments[0]||this.getLength();if(t===this.q.length){var i=this.q;this.q=new Uint8Array(0)}else{i=this.q.subarray(0,t);this.q=this.q.subarray(t)}return this.toJSArray(i)},peek:function(t,i){var s=null;return s=0!=t||i?this.q.subarray(t,i):this.q,this.toJSArray(s)},push:function(t){if("string"==typeof t){var i=t.length;(e=new Uint8Array(this.q.length+i)).set(this.q);for(var s=0;s<i;s++)e[s+this.q.length]=t[s];this.q=e}else{var e;if(0===this.getLength())this.q=new Uint8Array(t.length),this.q.set(t);else(e=new Uint8Array(t.length+this.q.length)).set(this.q),e.set(t,this.q.length),this.q=e}},getLength:function(){return this.q.length},toJSArray:function(t){return this.raw?t:t.toJSArray()}}),wdi.ViewQueue=$.spcExtend(wdi.DomainObject,{q:null,at:null,init:function(){this.q=new Uint8Array,this.at=0},getData:function(){return this.toJSArray(this.q.subarray(this.at))},getDataOffset:function(t){return this.toJSArray(this.q.subarray(t))},getRawData:function(){return this.q.subarray(this.at)},getRawDataOffset:function(t){return this.q.subarray(t)},setData:function(t){this.q=new Uint8Array(t.length),this.q.set(t),this.at=0},shift:function(t){var i=t||this.getLength();i>this.getLength()&&(i=this.getLength());var s=this.q.subarray(0+this.at,i+this.at);return this.at+=i,this.toJSArray(s)},eatBytes:function(t){this.at+=t},getByte:function(t){return this.q[t+this.at]},peek:function(t,i){var s=null;return 0!=t||i?(i&&(i+=this.at),s=this.q.subarray(t+this.at,i)):s=this.q,this.toJSArray(s)},push:function(t){if("string"==typeof t){var i=t.length;(e=new Uint8Array(this.q.length+i)).set(this.q);for(var s=0;s<i;s++)e[s+this.q.length]=t[s];this.q=e}else{var e;if(0===this.getLength())this.q=new Uint8Array(t.length),this.q.set(t);else(e=new Uint8Array(t.length+this.q.length)).set(this.q),e.set(t,this.q.length),this.q=e}},getLength:function(){return this.q.length-this.at},getPosition:function(){return this.at},toJSArray:function(t){return 1==t.length?[t[0]]:t.toJSArray()}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.RasterEngine=$.spcExtend(wdi.EventObject.prototype,{init:function(e){this.time=Date.now(),this.clientGui=e.clientGui,this.codecH264=wdi.CodecH264,this.codecVp8=wdi.CodecVp8,this.codecH265=wdi.CodecH265},dispose:function(){this.clientGui=null},drawCanvas:function(e){return wdi.Debug.log("rasterEngine",this.time),this.clientGui.drawCanvas(e)},removeCanvas:function(e){return this.clientGui.removeCanvas(e)},invalList:function(e){var t=e.args.items,i=null;for(var a in t)i=t[a],wdi.ImageCache.delImage(i.id)},handleStreamCreate:function(e){var t=e.args;switch(t.computedBox=wdi.graphics.getBoxFromSrcArea(t.rect),wdi.Stream.addStream(e.args.id,t),console.log("%chandleStreamCreate","color:rgb(100,255,100)"),t.codec){case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_H264:this.handleH264StreamCreate(t.id);break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_VP8:this.handleVp8StreamCreate(t.id);break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_VP9:break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_H265:this.handleH265StreamCreate(t.id)}wdi.graphicDebug&&wdi.graphicDebug.handleStreamInfo()},handleVp8StreamCreate:function(e){this.codecVp8.create(e)},handleH265StreamCreate:async function(e){const t=wdi.Stream.getStream(e),i=this.clientGui.getContext(t.surface_id),a=t.computedBox;this.codecH265.create(e,i,a)},handleH264StreamCreate:function(e){this.codecH264.create(e)},handleStreamData:function(e){switch(wdi.Stream.getStream(e.args.id).codec){case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_H264:this.handleH264Stream(e);break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_VP8:this.handleVp8Stream(e);break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_VP9:break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_H265:this.handleH265Stream(e);break;default:this.handleMjpegStream(e)}},handleStreamClip:function(e){wdi.Stream.clip(e.args.id,e.args.clip),wdi.Stream.startTransition(e.args.id),console.log("%chandleStreamClip","color:rgb(100,100,255)")},handleStreamDataSized:function(e){},handleStreamActiveReport:function(e){},handleStreamDestroy:function(e){wdi.Stream.deleteStream(e.args.surface_id),this.codecH264.destroy(e.args.surface_id),this.codecVp8.destroy(),this.codecH265.destroy(),wdi.graphicDebug&&wdi.graphicDebug.handleStreamInfo(),console.log("%chandleStreamDestroy","color:rgb(255,100,100)")},handleMjpegStream:function(e){var t,i=e.args.data,a=wdi.Stream.getStream(e.args.id),r=this.clientGui.getContext(a.surface_id),d=wdi.GlobalPool.create("Image");wdi.ExecutionControl.sync=!0,d.onload=function(){URL.revokeObjectURL(t);var e=a.computedBox;if(!a.flags&wdi.SpiceStreamFlags.SPICE_STREAM_FLAGS_TOP_DOWN){var i=e.x+this.width/2,d=e.y+this.height/2;r.save(),r.translate(i,d),r.rotate(Math.PI),r.scale(-1,1),r.drawImage(this,e.x-i,e.y-d,e.width,e.height),r.restore()}else r.drawImage(this,e.x,e.y,e.width,e.height)},d.onerror=function(){URL.revokeObjectURL(t)},t=wdi.SpiceObject.bytesToURI(i),d.src=t},handleH264Stream:function(e){var t=e.args.data,i=wdi.Stream.getStream(e.args.id);if(this.codecH264.isReady[i.id]){var a=this.clientGui.getContext(i.surface_id);wdi.ExecutionControl.sync=!0,wdi.Stream.endTransition(e.args.id),this.codecH264.loadedVideo[i.id]=()=>{var e=i.computedBox;if(!i.flags&wdi.SpiceStreamFlags.SPICE_STREAM_FLAGS_TOP_DOWN){var t=e.x+this.codecH264.video[i.id].width/2,r=e.y+this.codecH264.video[i.id].height/2;a.save(),a.translate(t,r),a.rotate(Math.PI),a.scale(-1,1),a.drawImage(this.codecH264.video[i.id],e.x-t,e.y-r,e.width,e.height),a.restore()}else{if(!this.codecH264.video[i.id]||!this.codecH264.loadedVideo[i.id])return;if(i.transiting)return void requestAnimationFrame(this.codecH264.loadedVideo[i.id]);a.drawImage(this.codecH264.video[i.id],e.x,e.y,e.width,e.height),requestAnimationFrame(this.codecH264.loadedVideo[i.id])}},this.codecH264.feed(i.id,t)}else this.codecH264.addQueue(i.id,t)},handleH265Stream:function(e){const t=e.args.data,i=wdi.Stream.getStream(e.args.id),a=i.computedBox;this.codecH265.isReady[i.id]?(this.codecH265.configed[i.id]||this.codecH265.setConfig(i.id,a),this.codecH265.decode(i.id,t)):this.codecH265.addQueue(i.id,t)},handleVp8Stream:function(e){var t=e.args.data,i=wdi.Stream.getStream(e.args.id),a=this.clientGui.getContext(i.surface_id),r=i.computedBox;this.codecVp8.feed(i.id,t,a,r)},drawRop3:function(e){var t=wdi.graphics.getBoxFromSrcArea(e.args.base.box),i=this.clientGui.getContext(e.args.base.surface_id),a=i.getImageData(t.x,t.y,t.width,t.height),r=this.clientGui,d=e.args.brush,s=e.args.rop_descriptor,g=wdi.graphics.getBoxFromSrcArea(e.args.src_area);wdi.graphics.getImageFromSpice(e.args.src_image.imageDescriptor,e.args.src_image.data,this.clientGui,(function(e){if(e){var c=e.getContext("2d").getImageData(g.x,g.y,g.width,g.height),o=c.data,h=wdi.graphics.getNewTmpCanvas(t.width,t.height),n=h.getContext("2d"),w={width:t.width,height:t.height,x:0,y:0};wdi.graphics.setBrush(r,n,d,w,wdi.SpiceRopd.SPICE_ROPD_OP_PUT);var l=n.getImageData(0,0,t.width,t.height),p=l.data,m=a.data,u=(n=(h=wdi.graphics.getNewTmpCanvas(t.width,t.height)).getContext("2d")).createImageData(t.width,t.height),S=u.data;c.width!=l.width||c.width!=a.width||c.height!=l.height||(c.height,a.height);for(var f=m.length,C=wdi.Rop3[s],_=0;_<f;_+=4)S[_]=255&C(p[_],o[_],m[_]),S[_+1]=255&C(p[_+1],o[_+1],m[_+1]),S[_+2]=255&C(p[_+2],o[_+2],m[_+2]),S[_+3]=255;n.putImageData(u,0,0),this.drawClip(h,t,i)}else wdi.Debug.log("Unable to get image!")}),this)},drawInvers:function(e){var t=e.args.base,i=wdi.graphics.getBoxFromSrcArea(t.box),a=t.surface_id,r=this.clientGui.getContext(a),d=wdi.graphics.getRect(i,r.canvas),s=wdi.RasterOperation.process(wdi.SpiceRopd.SPICE_ROPD_OP_INVERS,null,d);r.drawImage(s,i.x,i.y,i.width,i.height)},drawStroke:function(e){var t,i,a,r,d=e.args,s=this.clientGui.getContext(e.args.base.surface_id),g=d.brush.color.html_color,c=d.path.num_segments;d.attr.flags&wdi.SpiceLineFlags.SPICE_LINE_FLAGS_STYLED&&wdi.Debug.log("SPICE_LINE_FLAGS_STYLED");for(var o=0;o<c;o++){if((r=d.path.segments[o]).flags&wdi.SpicePathFlags.SPICE_PATH_BEGIN&&(s.beginPath(),s.moveTo(r.points[0].x,r.points[0].y),s.strokeStyle=g,s.lineWidth=1),r.flags&wdi.SpicePathFlags.SPICE_PATH_BEZIER){if((t=r.points.length)%3==0)for(a=0;a<t;a+=3)s.bezierCurveTo(r.points[a].x,r.points[a].y,r.points[a+1].x,r.points[a+1].y,r.points[a+2].x,r.points[a+2].y)}else for(t=r.points.length,a=0;a<t;a++)0==a&&(i=r.points[a]),s.lineTo(r.points[a].x+.5,r.points[a].y+.5);r.flags&wdi.SpicePathFlags.SPICE_PATH_END&&(r.flags&wdi.SpicePathFlags.SPICE_PATH_CLOSE&&s.lineTo(i.x+.5,i.y+.5),s.stroke(),s.closePath())}},drawImage:function(e){var t=e.args,i=t.base,a=i.surface_id,r=t.rop_descriptor,d=(t.scale_mode,wdi.graphics.getBoxFromSrcArea(t.src_area)),s=wdi.graphics.getBoxFromSrcArea(i.box);window.vdiLoadTest&&void 0===window.firstImage&&(window.firstImage=!0),wdi.graphics.getImageFromSpice(t.image.imageDescriptor,t.image.data,this.clientGui,(function(e){if(e){var t;if(window.firstImage)t=e.getContext?e.getContext("2d").getImageData(0,0,e.width,e.height).data.buffer.slice(0):e.data.buffer.slice(0),window.firstImageData=t,window.firstImage=!1;var i=!1;if(d.width!==s.width&&d.height!==s.height){i=!0,e=wdi.graphics.getRect(d,e),e=wdi.graphics.getImageFromData(e);var g=wdi.graphics.getNewTmpCanvas(s.width,s.height);g.getContext("2d").drawImage(e,0,0,d.width,d.height,0,0,s.width,s.height),e=g}if(r!==wdi.SpiceRopd.SPICE_ROPD_OP_PUT){i||(e=wdi.graphics.getRect(d,e));var c=wdi.graphics.getRect(s,this.clientGui.getCanvas(a));e=wdi.RasterOperation.process(r,e,c)}var o=this.clientGui.getContext(a);e instanceof ImageData?i?o.putImageData(e,s.x,s.y,0,0,s.width,s.height):o.putImageData(e,s.x,s.y,d.x,d.y,d.width,d.height):i?o.drawImage(e,s.x,s.y,s.width,s.height):o.drawImage(e,d.x,d.y,d.width,d.height,s.x,s.y,s.width,s.height)}else wdi.Debug.log("Unable to get image!")}),this,{opaque:!0,brush:t.brush,raw:!1})},drawClip:function(e,t,i){i.drawImage(e,t.x,t.y,t.width,t.height)},drawFill:function(e){var t=e.args,i=this.clientGui.getContext(t.base.surface_id),a=wdi.graphics.getBoxFromSrcArea(t.base.box),r=t.brush,d=t.rop_descriptor;wdi.graphics.setBrush(this.clientGui,i,r,a,d)},drawCopyBits:function(e){var t=e.args.base,i=t.surface_id,a=e.args.src_position,r=this.clientGui.getContext(i),d=t.box,s=d.right-d.left,g=d.bottom-d.top;r.drawImage(r.canvas,a.x,a.y,s,g,t.box.left,t.box.top,s,g)},drawBlend:function(e){var t=e.args.image.imageDescriptor,i=e.args.base,a=e.args.image.data,r=e.args.base.surface_id,d=e.args.rop_descriptor;e.args.flags;wdi.graphics.getImageFromSpice(t,a,this.clientGui,(function(t){if(t){var a=wdi.graphics.getBoxFromSrcArea(e.args.src_area);t=wdi.graphics.getRect(a,t);var s=wdi.graphics.getBoxFromSrcArea(i.box),g=wdi.graphics.getRect(s,this.clientGui.getCanvas(r)),c=wdi.RasterOperation.process(d,t,g);this.clientGui.getCanvas(r).getContext("2d").drawImage(c,s.x,s.y,s.width,s.height)}else wdi.Debug.log("There is no image on Blend")}),this)},drawAlphaBlend:function(e){var t=e.args.image.imageDescriptor,i=e.args.base,a=e.args.image.data,r=e.args.base.surface_id,d=e.args.alpha_flags,s=e.args.alpha;wdi.graphics.getImageFromSpice(t,a,this.clientGui,(function(t){t||wdi.Debug.log("There is no image on drawAlphaBlend");var a=wdi.graphics.getBoxFromSrcArea(e.args.src_area);t=wdi.graphics.getRect(a,t);var g=wdi.graphics.getBoxFromSrcArea(i.box),c=wdi.graphics.getRect(g,this.clientGui.getCanvas(r));if(a.width!==g.width&&a.height!==g.height){var o=wdi.graphics.getNewTmpCanvas(g.width,g.height);o.getContext("2d").drawImage(t,0,0,a.width,a.height,0,0,g.width,g.height),t=o}for(var h,n,w,l,p,m,u,S=wdi.graphics.getDataFromImage(t).data,f=wdi.graphics.getDataFromImage(c).data,C=S.length-1,_=wdi.graphics.getNewTmpCanvas(g.width,g.height),x=_.getContext("2d").createImageData(g.width,g.height),I=x.data,v=0;v<C;v+=4)h=S[v],w=S[v+1],p=S[v+2],u=d||255===s?S[v+3]:s,n=f[v],l=f[v+1],m=f[v+2],u>30&&255===s?(I[v]=n*(255-u)/255+h&255,I[v+1]=l*(255-u)/255+w&255,I[v+2]=m*(255-u)/255+p&255):(I[v]=(h*u+n*(255-u))/255&255,I[v+1]=(w*u+l*(255-u))/255&255,I[v+2]=(p*u+m*(255-u))/255&255),I[v+3]=255;_.getContext("2d").putImageData(x,0,0),this.drawClip(_,g,this.clientGui.getContext(r))}),this)},drawWhiteness:function(e){var t=e.args.base,i=this.clientGui.getContext(t.surface_id),a=wdi.graphics.getBoxFromSrcArea(t.box);i.fillStyle="white",i.fillRect(a.x,a.y,a.width,a.height)},drawBlackness:function(e){var t=e.args.base,i=this.clientGui.getContext(t.surface_id),a=wdi.graphics.getBoxFromSrcArea(t.box);i.fillStyle="black",i.fillRect(a.x,a.y,a.width,a.height)},drawTransparent:function(e){var t=e.args.base,i=t.surface_id,a=wdi.graphics.getBoxFromSrcArea(e.args.src_area),r=wdi.graphics.getBoxFromSrcArea(t.box),d=this.clientGui.getContext(i).getImageData(r.x,r.y,r.width,r.height);wdi.graphics.getImageFromSpice(e.args.image.imageDescriptor,e.args.image.data,this.clientGui,(function(t){if(t){t=wdi.graphics.getRect(a,t);for(var s=wdi.graphics.getDataFromImage(t).data,g=d.data,c=s.length-1,o=this.clientGui.getContext(i).createImageData(r.width,r.height),h=e.args.transparent_true_color;c>0;)o.data[c]=255,s[c-1]===h.b&&s[c-2]===h.g&&s[c-3]===h.r?(o.data[c-1]=g[c-1],o.data[c-2]=g[c-2],o.data[c-3]=g[c-3]):(o.data[c-1]=s[c-1],o.data[c-2]=s[c-2],o.data[c-3]=s[c-3]),c-=4;var n=wdi.graphics.getImageFromData(o);this.drawClip(n,r,this.clientGui.getContext(i))}else wdi.Debug.log("Unable to get image!")}),this)},drawText:function(e){var t=this.clientGui.getContext(e.args.base.surface_id),i=(e.args.base.box,e.args.base.clip),a=e.args,r=a.glyph_string,d=1===r.flags?1:2*r.flags;0!==a.back_mode&&wdi.graphics.drawBackText(this.clientGui,t,a),wdi.graphics.drawString(t,r,d,a.fore_brush,i.type,this)},invalPalettes:function(e){wdi.ImageCache.clearPalettes()},handleReset:function(e){}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var rng_state,rng_pool,rng_pptr;function rng_seed_int(r){rng_pool[rng_pptr++]^=255&r,rng_pool[rng_pptr++]^=r>>8&255,rng_pool[rng_pptr++]^=r>>16&255,rng_pool[rng_pptr++]^=r>>24&255,rng_pptr>=rng_psize&&(rng_pptr-=rng_psize)}function rng_seed_time(){rng_seed_int((new Date).getTime())}if(null==rng_pool){var t;if(rng_pool=new Array,rng_pptr=0,"Netscape"==navigator.appName&&navigator.appVersion<"5"&&window.crypto){var z=window.crypto.random(32);for(t=0;t<z.length;++t)rng_pool[rng_pptr++]=255&z.charCodeAt(t)}for(;rng_pptr<rng_psize;)t=Math.floor(65536*Math.random()),rng_pool[rng_pptr++]=t>>>8,rng_pool[rng_pptr++]=255&t;rng_pptr=0,rng_seed_time()}function rng_get_byte(){if(null==rng_state){for(rng_seed_time(),(rng_state=prng_newstate()).init(rng_pool),rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}function rng_get_bytes(r){var n;for(n=0;n<r.length;++n)r[n]=rng_get_byte()}function SecureRandom(){}SecureRandom.prototype.nextBytes=rng_get_bytes;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.RunQueue=$.spcExtend(wdi.DomainObject,{tasks:null,isRunning:!1,init:function(){this.tasks=[]},getTasksLength:function(){return this.tasks.length},add:function(n,s,i,t){return this.tasks.push({fn:n,scope:s,fnFinish:i,params:t}),this},clear:function(){return wdi.Debug.log("runqueue clear"),this.tasks=[],this},_process:function(){wdi.ExecutionControl.sync=!0;var n,s=this;this.isRunning=!0;var i=this.tasks.shift();if(i){n={end:function(){i.fnFinish&&i.fnFinish.call(i.scope),s._process()}};try{i.fn.call(i.scope,n,i.params)}catch(s){wdi.Debug.error(s.message),n.end()}return this}this.isRunning=!1},process:function(){this.isRunning||this._process()}}),wdi.ExecutionControl={currentProxy:null,sync:!0,runQ:new wdi.RunQueue};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function sha1Hash(r){for(var t=[1518500249,1859775393,2400959708,3395469782],o=(r+=String.fromCharCode(128)).length/4+2,e=Math.ceil(o/16),a=new Array(e),n=0;n<e;n++){a[n]=new Array(16);for(var h=0;h<16;h++)a[n][h]=r.charCodeAt(64*n+4*h)<<24|r.charCodeAt(64*n+4*h+1)<<16|r.charCodeAt(64*n+4*h+2)<<8|r.charCodeAt(64*n+4*h+3)}a[e-1][14]=8*(r.length-1)/Math.pow(2,32),a[e-1][14]=Math.floor(a[e-1][14]),a[e-1][15]=8*(r.length-1)&4294967295;var c,u,i,s,S,A=1732584193,H=4023233417,l=2562383102,v=271733878,x=3285377520,C=new Array(80);for(n=0;n<e;n++){for(var d=0;d<16;d++)C[d]=a[n][d];for(d=16;d<80;d++)C[d]=ROTL(C[d-3]^C[d-8]^C[d-14]^C[d-16],1);c=A,u=H,i=l,s=v,S=x;for(d=0;d<80;d++){var g=Math.floor(d/20),w=ROTL(c,5)+f(g,u,i,s)+S+t[g]+C[d]&4294967295;S=s,s=i,i=ROTL(u,30),u=c,c=w}A=A+c&4294967295,H=H+u&4294967295,l=l+i&4294967295,v=v+s&4294967295,x=x+S&4294967295}return A.toHexStr()+H.toHexStr()+l.toHexStr()+v.toHexStr()+x.toHexStr()}function f(r,t,o,e){switch(r){case 0:return t&o^~t&e;case 1:case 3:return t^o^e;case 2:return t&o^t&e^o&e}}function ROTL(r,t){return r<<t|r>>>32-t}Number.prototype.toHexStr=function(){for(var r="",t=7;t>=0;t--)r+=(this>>>4*t&15).toString(16);return r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.StuckKeysHandler=$.spcExtend(wdi.EventObject.prototype,{ctrlTimeoutId:null,altTimeoutId:null,shiftTimeoutId:null,shiftKeyPressed:!1,ctrlKeyPressed:!1,altKeyPressed:!1,dispose:function(){wdi.Debug.log("Disposing StuckKeysHandler"),clearTimeout(this.ctrlTimeoutId),clearTimeout(this.altTimeoutId),clearTimeout(this.shiftTimeoutId),this.ctrlTimeoutId=null,this.altTimeoutId=null,this.shiftTimeoutId=null,this.shiftKeyPressed=!1,this.ctrlKeyPressed=!1,this.altKeyPressed=!1},handleStuckKeys:function(e){if(e)switch(e.keyCode){case 16:this._handleKey("shiftTimeoutId",e.type,16);break;case 17:this._handleKey("ctrlTimeoutId",e.type,17);break;case 18:this._handleKey("altTimeoutId",e.type,18)}},releaseAllKeys:function(){var e;for(e=0;e<300;e++)this.releaseKeyPressed(e)},_handleKey:function(e,s,t){"keydown"===s?this[e]=this._configureTimeout(t):"keyup"===s&&clearTimeout(this[e])},_configureTimeout:function(e){var s=this;return setTimeout((function(){s.releaseKeyPressed(e)}),wdi.StuckKeysHandler.defaultTimeout)},releaseKeyPressed:function(e){var s=window.jQuery.Event("keyup");s.which=e,s.keyCode=e,s.charCode=0,s.generated=!0,this.fire("inputStuck",["keyup",[s]])},checkSpecialKey:function(e,s){switch(s){case 16:this.shiftKeyPressed="keydown"===e;break;case 17:this.ctrlKeyPressed="keydown"===e;break;case 18:this.altKeyPressed="keydown"===e}},releaseSpecialKeysPressed:function(){this.shiftKeyPressed&&(this.releaseKeyPressed(16),this.shiftKeyPressed=!1),this.ctrlKeyPressed&&(this.releaseKeyPressed(17),this.ctrlKeyPressed=!1),this.altKeyPressed&&(this.releaseKeyPressed(18),this.altKeyPressed=!1)}}),wdi.StuckKeysHandler.defaultTimeout=2e3;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.TimeLapseDetector=$.spcExtend(wdi.EventObject.prototype,{lastTime:null,init:function(t){this.superInit()},dispose:function(){this.lastTime=null},startTimer:function(){var t=this;this.lastTime=Date.now(),window.setInterval((function(){var e=Date.now(),i=e-t.lastTime;i>=t.constructor.maxIntervalAllowed&&t.fire("timeLapseDetected",i),t.lastTime=e}),wdi.TimeLapseDetector.defaultInterval)},getLastTime:function(){return this.lastTime},setLastTime:function(t){return this.lastTime=t,this}}),wdi.TimeLapseDetector.defaultInterval=5e3,wdi.TimeLapseDetector.maxIntervalAllowed=3*wdi.TimeLapseDetector.defaultInterval;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"undefined"!=typeof module&&module.exports&&(jQuery=$={isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isPlainObject:function(e){var t;if(!e||"object"!==jQuery.type(e)||e.nodeType||jQuery.isWindow(e))return!1;if(e.constructor&&!core_hasOwn.call(e,"constructor")&&!core_hasOwn.call(e.constructor.prototype,"isPrototypeOf"))return!1;for(t in e);return void 0===t||core_hasOwn.call(e,t)},extend:function(){var e,t,n,i,s,o,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[1]||{},a=2),l===a&&(r=this,--a);a<l;a++)if(null!=(e=arguments[a]))for(t in e)n=r[t],r!==(i=e[t])&&(c&&i&&(this.isPlainObject(i)||(s=this.isArray(i)))?(s?(s=!1,o=n&&this.isArray(n)?n:[]):o=n&&this.isPlainObject(n)?n:{},r[t]=this.extend(c,o,i)):void 0!==i&&(r[t]=i));return r}}),$.extend({spcExtend:function(e){var t=function(e){void 0!==this.init&&this.init(e||{})};t.prototype.superInit=e.init;var n=[];n.push(t.prototype);for(var i=arguments.length,s=0;s<i;s++)n.push(arguments[s]);return $.extend.apply($,n),t}}),$.extend(String.prototype,{lpad:function(e,t){for(var n=this;n.length<t;)n=e+n;return n},rpad:function(e,t){for(var n=this;n.length<t;)n+=e;return n}}),wdi={},wdi.DomainObject={},wdi.RawMessage=$.spcExtend(wdi.DomainObject,{status:null,data:null,init:function(e){this.status=e.status,this.data=e.data}}),wdi.RawSpiceMessage=$.spcExtend(wdi.DomainObject,{header:null,body:null,channel:null,set:function(e,t,n){this.header=e,this.body=t,this.channel=n}}),wdi.SpiceMessage=$.spcExtend(wdi.DomainObject,{messageType:null,args:null,channel:null,init:function(e){this.channel=e.channel,this.messageType=e.messageType,this.args=e.args}}),wdi.EventObject=$.spcExtend(wdi.DomainObject,{events:null,init:function(){this.eyeEvents={}},getListenersLength:function(e){return null==this.eyeEvents[e]&&(this.eyeEvents[e]=[]),this.eyeEvents[e].length},addListener:function(e,t,n){n=n||this,null==this.eyeEvents[e]&&(this.eyeEvents[e]=[]),this.eyeEvents[e].push({fn:t,scope:n})},removeEvent:function(e){this.eyeEvents[e]=void 0},clearEvents:function(){this.eyeEvents={}},fire:function(e,t){var n=this.eyeEvents[e];if(n)for(var i=n.length;i--;)n[i].fn.call(n[i].scope,t)}}),wdi.CHANNEL_STATUS={disconnected:-1,idle:0,establishing:1,established:2},wdi.Debug={debug:!0,log:function(e){this.debug&&console.log.apply(console,Array.prototype.slice.call(arguments))},warn:function(e){console.warn.apply(console,Array.prototype.slice.call(arguments))},info:function(e){this.debug&&console.info.apply(console,Array.prototype.slice.call(arguments))},error:function(e){console.error.apply(console,Array.prototype.slice.call(arguments))}},wdi.Utils={generateWebSocketUrl:function(e,t,n,i,s,o,r,a){return url=i&&s?CONSOLE.wsUrl:e+"://"+t+":"+n+"/websockify/destInfoToken/"+r+"/type/"+o,url}},wdi.postMessageW3CCompilant="undefined"!=typeof window&&window.bowser&&!(window.bowser.msie&&window.bowser.version>=10),wdi.Exception=$.spcExtend(wdi.DomainObject,{errorCode:null,message:null,init:function(e){this.message=e.message||"",this.errorCode=e.errorCode||0}});try{new ImageData(1,1)}catch(e){"undefined"!=typeof window&&(window.ImageData=function(e,t,n){var i=document.createElement("canvas").getContext("2d").createImageData(t,n);return i.data.set(e),i})}wdi.bppMask=[],wdi.bppMask[1]=[128,64,32,16,8,4,2,1],wdi.bppMask[4]=[240,15],wdi.bppMask[8]=[255],wdi.SeamlessIntegration=!0,wdi.Debug.debug=!1,wdi.exceptionHandling=!0,wdi.IntegrationBenchmarkEnabled=!1,wdi.useWorkers=!0,wdi.logOperations=!1;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var VirtualJoystick=function(t){t=t||{},this._container=t.container||document.body,this._stickEl=t.stickElement||this._buildJoystickStick(),this._baseEl=t.baseElement||this._buildJoystickBase(),this._mouseLeft=t.mouseLeft||this._buildJoystickButton(),this._mouseSupport="mouseSupport"in t&&t.mouseSupport,this._range=t.range||60,this._timer=null,this._callback="callback"in t&&t.callback,this._callbackcontext="callbackcontext"in t?t.callbackcontext:this,this._callbackButton="callbackbutton"in t&&t.callbackbutton,this._referenceItem=t.referenceItem,this._container.style.position="relative",this._container.appendChild(this._baseEl),this._container.appendChild(this._mouseLeft),this._baseEl.style.position="absolute",this._baseEl.style.display="block",this._mouseLeft.style.position="absolute",this._mouseLeft.style.display="block";var e=$(this._referenceItem),s=e.height()-e.offset().top-130;this._baseEl.style.top=s+"px",this._baseEl.style.left="20px",this._container.appendChild(this._stickEl),this._stickEl.style.position="absolute",this._stickEl.style.display="none",this._mouseLeft.style.top=s+20+"px",this._mouseLeft.style.right="20px",this._pressed=!1,this._baseX=0,this._baseY=0,this._stickX=0,this._stickY=0,__bind=function(t,e){return function(){return t.apply(e,arguments)}},this._$onTouchStart=__bind(this._onTouchStart,this),this._$onTouchEnd=__bind(this._onTouchEnd,this),this._$onTouchMove=__bind(this._onTouchMove,this),this._$onTouchStartButton=__bind(this._onTouchStartButton,this),this._$onTouchEndButton=__bind(this._onTouchEndButton,this),this._baseEl.addEventListener("touchstart",this._$onTouchStart,!1),this._mouseLeft.addEventListener("touchstart",this._$onTouchStartButton,!1),this._mouseLeft.addEventListener("touchend",this._$onTouchEndButton,!1),this._container.addEventListener("touchend",this._$onTouchEnd,!1),this._container.addEventListener("touchmove",this._$onTouchMove,!1),this._mouseSupport&&(this._$onMouseDown=__bind(this._onMouseDown,this),this._$onMouseUp=__bind(this._onMouseUp,this),this._$onMouseMove=__bind(this._onMouseMove,this),this._$onMouseDownButton=__bind(this._onMouseDownButton,this),this._$onMouseUpButton=__bind(this._onMouseUpButton,this),this._baseEl.addEventListener("mousedown",this._$onMouseDown,!1),this._container.addEventListener("mouseup",this._$onMouseUp,!1),this._mouseLeft.addEventListener("mousedown",this._$onTouchStartButton,!1),this._mouseLeft.addEventListener("mouseup",this._$onTouchEndButton,!1),this._container.addEventListener("mousemove",this._$onMouseMove,!1))};VirtualJoystick.prototype.destroy=function(){this._container.removeChild(this._baseEl),this._container.removeChild(this._stickEl),this._mouseLeft.removeEventListener("touchstart",this._$onTouchStartButton,!1),this._mouseLeft.removeEventListener("touchend",this._$onTouchEndButton,!1),this._container.removeChild(this._mouseLeft),this._container.removeEventListener("touchstart",this._$onTouchStart,!1),this._container.removeEventListener("touchend",this._$onTouchEnd,!1),this._container.removeEventListener("touchmove",this._$onTouchMove,!1),this._mouseSupport&&(this._container.removeEventListener("mouseup",this._$onMouseUp,!1),this._container.removeEventListener("mousedown",this._$onMouseDown,!1),this._container.removeEventListener("mousemove",this._$onMouseMove,!1))},VirtualJoystick.touchScreenAvailable=function(){return"createTouch"in document},VirtualJoystick.prototype.deltaX=function(){return this._stickX-this._baseX},VirtualJoystick.prototype.deltaY=function(){return this._stickY-this._baseY},VirtualJoystick.prototype.up=function(){if(!1===this._pressed)return!1;var t=this.deltaX(),e=this.deltaY();return!(e>=0)&&!(Math.abs(e)<this._range&&Math.abs(e)<Math.abs(t))},VirtualJoystick.prototype.down=function(){if(!1===this._pressed)return!1;var t=this.deltaX(),e=this.deltaY();return!(e<=0)&&!(Math.abs(e)<this._range&&Math.abs(e)<Math.abs(t))},VirtualJoystick.prototype.right=function(){if(!1===this._pressed)return!1;var t=this.deltaX(),e=this.deltaY();return!(t<=0)&&!(Math.abs(t)<this._range&&Math.abs(e)>Math.abs(t))},VirtualJoystick.prototype.left=function(){if(!1===this._pressed)return!1;var t=this.deltaX(),e=this.deltaY();return!(t>=0)&&!(Math.abs(t)<this._range&&Math.abs(e)>Math.abs(t))},VirtualJoystick.prototype._onUp=function(){this._pressed=!1,this._stickEl.style.display="none",this._baseX=this._baseY=0,this._stickX=this._stickY=0,this._eraseInterval()},VirtualJoystick.prototype._onDown=function(t,e){this._pressed=!0,this._stickX=t,this._stickY=e,this._stickEl.style.display="",this._stickEl.style.left=this._stickX-this._stickEl.width/2+"px",this._stickEl.style.top=this._stickY-this._stickEl.height/2+"px",this._startInterval()},VirtualJoystick.prototype._onMove=function(t,e){!0===this._pressed&&(this._stickX=t,this._stickY=e,this._stickEl.style.left=t-this._stickEl.width/2+"px",this._stickEl.style.top=e-this._stickEl.height/2+"px",this._startInterval())},VirtualJoystick.prototype._startInterval=function(t,e){this._eraseInterval();var s=$(this._baseEl).offset().left+$(this._baseEl).width()/2,i=$(this._stickEl).offset().left+$(this._stickEl).width()/2;this.offsetX=parseInt((i-s)/5);var o=$(this._baseEl).offset().top+$(this._baseEl).height()/2,n=$(this._stickEl).offset().top+$(this._stickEl).height()/2;this.offsetY=parseInt((n-o)/5),this.offsetX>15&&(this.offsetX=15),this.offsetY>15&&(this.offsetY=15);var h=this;this._timer=setInterval((function(){h._callback&&h._callback.call(h._callbackcontext,[h.offsetX,h.offsetY])}),10)},VirtualJoystick.prototype._eraseInterval=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},VirtualJoystick.prototype._onMouseUp=function(t){return this._onUp()},VirtualJoystick.prototype._onMouseDown=function(t){var e=t.pageX,s=t.pageY;return this._onDown(e,s)},VirtualJoystick.prototype._onMouseMove=function(t){var e=t.pageX,s=t.pageY;return this._onMove(e,s)},VirtualJoystick.prototype._onTouchStart=function(t){if(1==t.touches.length){t.preventDefault();var e=t.touches[0].pageX,s=t.touches[0].pageY;return this._onDown(e,s)}},VirtualJoystick.prototype._onTouchEnd=function(t){return t.preventDefault(),this._onUp()},VirtualJoystick.prototype._onTouchMove=function(t){if(!t.touches||1==t.touches.length){t.preventDefault();var e=t.touches[0].pageX,s=t.touches[0].pageY;return this._onMove(e,s)}},VirtualJoystick.prototype._onTouchStartButton=function(t){t.touches&&1!=t.touches.length||(t.preventDefault(),this._callbackButton.call(this._callbackcontext,["down"]))},VirtualJoystick.prototype._onTouchEndButton=function(t){t.preventDefault(),this._callbackButton.call(this._callbackcontext,["up"])},VirtualJoystick.prototype._buildJoystickBase=function(){var t=document.createElement("canvas");t.style.zIndex=2,t.width=126,t.height=126;var e=t.getContext("2d");return e.beginPath(),e.strokeStyle="cyan",e.lineWidth=6,e.arc(t.width/2,t.width/2,40,0,2*Math.PI,!0),e.stroke(),e.beginPath(),e.strokeStyle="cyan",e.lineWidth=2,e.arc(t.width/2,t.width/2,60,0,2*Math.PI,!0),e.stroke(),t},VirtualJoystick.prototype._buildJoystickStick=function(){var t=document.createElement("canvas");t.style.zIndex=2,t.width=86,t.height=86;var e=t.getContext("2d");return e.beginPath(),e.strokeStyle="cyan",e.lineWidth=6,e.arc(t.width/2,t.width/2,40,0,2*Math.PI,!0),e.stroke(),t},VirtualJoystick.prototype._buildJoystickButton=function(){var t=document.createElement("canvas");t.style.zIndex=2,t.width=86,t.height=86;var e=t.getContext("2d");return e.beginPath(),e.strokeStyle="green",e.lineWidth=6,e.arc(t.width/2,t.width/2,40,0,2*Math.PI,!0),e.stroke(),t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.BusConnection=$.spcExtend(wdi.EventObject.prototype,{ws:null,subscriptions:[],_busUser:null,_busPass:null,queue:"",binary:!1,init:function(s){this.superInit(),this.ws=s.websocket||new wdi.WebSocketWrapper,this.clusterNodeChooser=s.clusterNodeChooser||new wdi.ClusterNodeChooser,this.binary=s.binary||!1},connect:function(s){s.useBus?(this._vdiBusToken=s.vdiBusToken,s.busHostList||(wdi.Debug.warn("Deprecated: using old busHost & busPort params"),s.busHostList=[{host:s.busHost,port:s.busPort}]),this.clusterNodeChooser.setNodeList(s.busHostList),Modernizr.websocketsbinary&&(this.binary=!0),this._busUser=s.busUser,this._busPass=s.busPass,this._websockifyProtocol=s.protocol,this._websockifyHost=s.host,this._websockifyPort=s.port,this.subscriptions=s.busSubscriptions,this._connectToNextHost()):wdi.Debug.warn("Not using the bus")},_connectToNextHost:function(){var s=this.clusterNodeChooser.getAnother(),t=wdi.Utils.generateWebSocketUrl(this._websockifyProtocol,this._websockifyHost,this._websockifyPort,s.host,s.port,"raw",this._vdiBusToken),e="base64";this.binary&&(e="binary"),this.ws.connect(t,e),wdi.Debug.log("BusConnection: using protocol: "+e),this.binary&&this.ws.setBinaryType("arraybuffer"),this.setListeners()},disconnect:function(){this.ws.close(),this.queue="",this.subscriptions=[]},setListeners:function(){var s=this;this.ws.onOpen((function(t){s._send("CONNECT\nlogin:"+s._busUser+"\npasscode:"+s._busPass+"\n\n\0")})),this.ws.onMessage((function(t){var e,n;s.binary?(e=String.fromCharCode.apply(null,new Uint8Array(t.data)),e=decodeURIComponent(escape(e))):e=Base64.decodeStr(t.data);var i=e.split("\0");if(1==i.length)s.queue+=i[0];else{for(var o=0;o<i.length-1;o++)e=s.queue+i[o],n=s.parseMessage(e),s.fire("busMessage",n),s.queue="";s.queue=i[i.length-1]}})),this.ws.onClose((function(t){wdi.Debug.log("BusConnection CLOSED! connecting again in 1 second"),s.fire("error",t)})),this.ws.onError((function(s){wdi.Debug.error("BusConnection ERROR:",s)}))},parseMessage:function(s){try{var t=s.split("\n\n"),e=t[0].trim(),n=t[1].replace(/\x00/,"").trim();n=0!=n.length?JSON.parse(n):null;var i=(t=e.split("\n")).shift();e="{";for(var o=t.length,r=0;r<o;r++){var u=t[r].split(":")[0];e+='"'+u+'":"'+t[r].replace(u+":","")+'"',r!=o-1&&(e+=",")}return e+="}",{verb:i,header:JSON.parse(e),body:n}}catch(s){return wdi.Debug.error("Error parsing Bus Info: ",s),{verb:"ERROR"}}},setSubscriptions:function(){for(var s=this.subscriptions.length,t=0;t<s;t++)this.subscribe(this.subscriptions[t])},send:function(s){var t=this.subscriptions[0];this._send("SEND\ndestination:"+t+"\ncontent-type:text/plain\n\n"+JSON.stringify(s)+"\0")},subscribe:function(s){this._send("SUBSCRIBE\ndestination:"+s+"\n\n\0")},_send:function(s){this.binary?this.ws.send(s):this.ws.send(Base64.encodeStr(s))}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.ClusterNodeChooser=$.spcExtend(wdi.EventObject.prototype,{init:function(t){},setNodeList:function(t){this._nodeList=this._shuffle(t),this._nodeListLength=this._nodeList.length,this._currentIndex=0},getAnother:function(){return this._nodeList[this._currentIndex++%this._nodeListLength]},_shuffle:function(t){for(var e,n,i=t.length;i>0;)n=Math.floor(Math.random()*i),e=t[--i],t[i]=t[n],t[n]=e;return t}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.ConnectionControl=$.spcExtend(wdi.EventObject.prototype,{socket:null,pendingTimeToConnectionLost:null,previousTimeOut:null,init:function(t){this.superInit(),this.socket=t.socket||new wdi.Socket},connect:function(t){var n=wdi.Utils.generateWebSocketUrl(t.protocol,t.host,t.port,null,null,"raw",t.heartbeatToken);this.socket.connect(n),this.pendingTimeToConnectionLost=t.heartbeatTimeout,wdi.Debug.log("ConnectionControl: connected"),this.setListeners()},disconnect:function(){wdi.Debug.log("Connection Control disconnect"),this.previousTimeOut&&clearTimeout(this.previousTimeOut),this.socket.disconnect(),this.socket=null,this.pendingTimeToConnectionLost=null,this.previousTimeOut=null},setListeners:function(){var t=this;this.socket.setOnMessageCallback((function(n){wdi.Debug.log("ConectionControl: beat"),clearTimeout(t.previousTimeOut),t.previousTimeOut=setTimeout((function(){wdi.Debug.log("ConnectionControl: firing connectionLost event"),t.fire("connectionLost",n)}),t.pendingTimeToConnectionLost)}))}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.PacketController=$.spcExtend(wdi.EventObject.prototype,{sizeDefiner:null,packetExtractor:null,init:function(t){this.superInit(),this.sizeDefiner=t.sizeDefiner,this.packetExtractor=t.packetExtractor},dispose:function(){wdi.Debug.log("PacketTroller dispose"),this.clearEvents(),this.packetExtractor.dispose(),this.packetExtractor=null,this.sizeDefiner=null},getNextPacket:function(t){var e=this;wdi.logOperations&&wdi.DataLogger.setNetworkTimeStart();var i=this.sizeDefiner.getSize(t);this.packetExtractor.getBytes(i,(function(t){var i=this.sizeDefiner.getStatus();this.execute(new wdi.RawMessage({status:i,data:t})),e.getNextPacket(t)}),this)},execute:function(t){try{this.fire("chunkComplete",t)}catch(t){console.error("PacketTroller: ",t)}}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.PacketExtractor=$.spcExtend(wdi.EventObject.prototype,{socketQ:null,numBytes:null,callback:null,scope:null,init:function(t){this.superInit(),this.socketQ=t.socketQ,this.setListener()},dispose:function(){this.clearEvents(),this.socketQ.disconnect(),this.socketQ=null,this.numBytes=null,this.callback=null,this.scope=null},setListener:function(){this.socketQ.addListener("message",(function(){wdi.logOperations&&wdi.DataLogger.setNetworkTimeStart(),this.getBytes(this.numBytes,this.callback,this.scope)}),this)},getBytes:function(t,s,e){var i,n=this.socketQ.rQ.getLength();(this.numBytes=t,this.callback=s,this.scope=e,null!==t&&n>=t)?(i=t?this.socketQ.rQ.shift(t):new Uint8Array(0),this.numBytes=null,this.callback=null,this.scope=null,s.call(e,i)):wdi.logOperations&&wdi.DataLogger.logNetworkTime()}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.PacketLinkFactory={extract:function(e,i){switch(e.type){case wdi.SpiceVars.SPICE_MSG_SET_ACK:return(new wdi.RedSetAck).demarshall(i);case wdi.SpiceVars.SPICE_MSG_PING:return(new wdi.RedPing).demarshall(i,e.size);case wdi.SpiceVars.SPICE_MSG_MIGRATE:return(new wdi.RedMigrate).demarshall(i);case wdi.SpiceVars.SPICE_MSG_MIGRATE_DATA:return(new wdi.RedMigrateData).demarshall(i,e.size);case wdi.SpiceVars.SPICE_MSG_WAIT_FOR_CHANNELS:return(new wdi.RedWaitForChannels).demarshall(i);case wdi.SpiceVars.SPICE_MSG_DISCONNECTING:return(new wdi.RedDisconnect).demarshall(i);case wdi.SpiceVars.SPICE_MSG_NOTIFY:return(new wdi.RedNotify).demarshall(i);case wdi.SpiceVars.SPICE_MSG_MAIN_MOUSE_MODE:return(new wdi.SpiceMouseMode).demarshall(i)}}},wdi.PacketLinkProcess={process:function(e,i,a){switch(e.type){case wdi.SpiceVars.SPICE_MSG_SET_ACK:var r=wdi.SpiceObject.numberTo32(i.generation);a.setAckWindow(i.window),a.sendObject(r,wdi.SpiceVars.SPICE_MSGC_ACK_SYNC);break;case wdi.SpiceVars.SPICE_MSG_PING:r=new wdi.RedPing({id:i.id,time:i.time}).marshall();a.sendObject(r,wdi.SpiceVars.SPICE_MSGC_PONG);break;case wdi.SpiceVars.SPICE_MSG_MAIN_MOUSE_MODE:a.fire("mouseMode",i.current_mode);break;case wdi.SpiceVars.SPICE_MSG_NOTIFY:a.fire("notify")}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.PacketReassembler=$.spcExtend(wdi.EventObject.prototype,{packetController:null,currentHeader:null,statusToString:null,sizeDefinerConstant:null,init:function(t){this.superInit(),this.packetController=t.packetController,this.sizeDefinerConstant=wdi.SizeDefiner.prototype,this.statusToString=[],this.statusToString[this.sizeDefinerConstant.STATUS_REPLY_BODY]="reply",this.statusToString[this.sizeDefinerConstant.STATUS_ERROR_CODE]="errorCode",this.statusToString[this.sizeDefinerConstant.STATUS_BODY]="spicePacket",this.setListeners()},dispose:function(){wdi.Debug.log("packetReassembler dispose"),this.clearEvents(),this.packetController.dispose(),this.packetController=null,this.currentHeader=null,this.statusToString=null,this.sizeDefinerConstant=null},start:function(){this.packetController.getNextPacket()},setListeners:function(){this.packetController.addListener("chunkComplete",(function(t){var e=t,s=e.status;switch(s){case this.sizeDefinerConstant.STATUS_HEADER:case this.sizeDefinerConstant.STATUS_REPLY:this.currentHeader=e;break;case this.sizeDefinerConstant.STATUS_REPLY_BODY:case this.sizeDefinerConstant.STATUS_BODY:var i=new Uint8Array(e.data.length+this.currentHeader.data.length);i.set(this.currentHeader.data),i.set(e.data,this.currentHeader.data.length),e.data=i,e.status=this.statusToString[s],this.fire("packetComplete",e);break;default:e.status=this.statusToString[s],this.fire("packetComplete",e)}}),this)}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.ReassemblerFactory={getPacketReassembler:function(e){var t=this.getPacketExtractor(e),r=this.getSizeDefiner(),n=this.getPacketController(t,r);return new wdi.PacketReassembler({packetController:n})},getPacketExtractor:function(e){return new wdi.PacketExtractor({socketQ:e})},getSizeDefiner:function(){return new wdi.SizeDefiner},getPacketController:function(e,t){return new wdi.PacketController({packetExtractor:e,sizeDefiner:t})}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.SizeDefiner=$.spcExtend(wdi.DomainObject,{ERROR_CODE_SIZE:4,status:null,STATUS_READY:0,STATUS_REPLY:1,STATUS_REPLY_BODY:2,STATUS_ERROR_CODE:3,STATUS_MESSAGE:4,STATUS_HEADER:5,STATUS_BODY:6,isHeader:!1,init:function(t){this.status=this.STATUS_READY},getSize:function(t){return this.STATUS_READY===this.status?(this.status++,wdi.SpiceLinkHeader.prototype.objectSize):this.STATUS_REPLY===this.status?(this.status++,this.getReplyBodySize(t)):this.STATUS_REPLY_BODY===this.status?(this.status++,this.ERROR_CODE_SIZE):this.STATUS_ERROR_CODE===this.status?(this.status++,this.isHeader=!0,6):this.isHeader?(this.isHeader=!1,this.getBodySizeFromArrayHeader(t)):(this.isHeader=!0,6)},getReplyBodySize:function(t){var e=wdi.GlobalPool.create("ViewQueue");e.setData(t);var i=(new wdi.SpiceLinkHeader).demarshall(e);return wdi.GlobalPool.discard("ViewQueue",e),i.size},getBodySizeFromArrayHeader:function(t){var e=wdi.GlobalPool.create("ViewQueue");e.setData(t);var i=(new wdi.SpiceDataHeader).demarshall(e);return wdi.GlobalPool.discard("ViewQueue",e),i.size},getStatus:function(){return this.status===this.STATUS_MESSAGE&&this.isHeader?this.STATUS_HEADER:this.status!==this.STATUS_MESSAGE||this.isHeader?this.status:this.STATUS_BODY}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.socketStatus={idle:0,prepared:1,connected:2,disconnected:3,failed:4},wdi.Socket=$.spcExtend(wdi.EventObject.prototype,{websocket:null,status:wdi.socketStatus.idle,binary:!1,connect:function(t){var e=this,s="base64";Modernizr.websocketsbinary&&(s="binary",this.binary=!0),this.websocket=new WebSocket(t,s),wdi.Debug.log("Socket: using protocol: "+s),this.binary&&(this.websocket.binaryType="arraybuffer"),this.status=wdi.socketStatus.prepared,this.websocket.onopen=function(){e.status=wdi.socketStatus.connected,e.fire("open")},this.websocket.onmessage=function(t){e.fire("message",t.data)},this.websocket.onclose=function(t){e.status=wdi.socketStatus.disconnected,console.warn("Spice Web Client: ",t.code,t.reason),e.disconnect(),e.fire("close",t)},this.websocket.onerror=function(t){e.status=wdi.socketStatus.failed,e.fire("error",t)}},setOnMessageCallback:function(t){this.websocket.onmessage=t},send:function(t){try{this.websocket.send(this.encode_message(t))}catch(t){this.status=wdi.socketStatus.failed,this.fire("error",t)}},disconnect:function(){this.websocket&&(this.websocket.onopen=function(){},this.websocket.onmessage=function(){},this.websocket.onclose=function(){},this.websocket.onerror=function(){},this.websocket.close(),this.status=wdi.socketStatus.idle,this.binary=!1,this.websocket=null)},setStatus:function(t){this.status=t,this.fire("status",t)},getStatus:function(){return this.status},encode_message:function(t){if(!this.binary)return Base64.encode(t);var e=t.length,s=new ArrayBuffer(e),n=new Uint8Array(s);return n.set(t),n}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.SocketQueue=$.spcExtend(wdi.EventObject.prototype,{rQ:null,sQ:null,socket:null,init:function(t){this.superInit(),this.socket=t.socket||new wdi.Socket,this.rQ=t.rQ||new wdi.FixedQueue,this.sQ=t.sQ||new wdi.Queue,this.setup()},setup:function(){this.socket.addListener("open",(function(){this.fire("open")}),this),this.socket.addListener("message",(function(t){this.rQ.push(new Uint8Array(t)),this.fire("message")}),this),this.socket.addListener("close",(function(t){this.fire("close",t)}),this),this.socket.addListener("error",(function(t){this.fire("error",t)}),this)},getStatus:function(){return this.socket.getStatus()},connect:function(t){this.socket.connect(t)},disconnect:function(){wdi.Debug.log("socket Queue disconnect"),this.socket&&(this.socket.clearEvents(),this.socket.disconnect()),this.rQ=null,this.sQ=null,this.socket=null},send:function(t,s){if(void 0===s)var e=!0;else e=s;this.sQ&&0===this.sQ.getLength()&&e?this.socket.send(t):this.sQ&&(this.sQ.push(t),e&&this.flush())},flush:function(){var t=this.sQ.shift();this.socket.send(t)}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.SpiceChannel=$.spcExtend(wdi.EventObject.prototype,{counter:0,ackWindow:0,connectionId:0,socketQ:null,packetReassembler:null,channel:1,codec:wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_MJPEG,proxy:null,token:null,init:function(e){this.superInit(),this.socketQ=e.socketQ||new wdi.SocketQueue,this.packetReassembler=e.packetReassembler||wdi.ReassemblerFactory.getPacketReassembler(this.socketQ),this.setListeners(),this.ackWindow=0},startHandshakeTimeout:function(){var e=this;this.handshakeTimeout=window.setTimeout((function(){var i=new Error("Handshake timeout");i.code=4200,wdi.Debug.error("Handshake timeout reached, raising error"),e.fire("error",i)}),5e3)},cancelHandshakeTimeout:function(){clearTimeout(this.handshakeTimeout)},setListeners:function(){var e,i=this;this.packetReassembler.addListener("packetComplete",(function(t){var s=t;if("spicePacket"===s.status){wdi.Debug.log("packetComplete spicePacket"),i.cancelHandshakeTimeout(),wdi.logOperations&&(wdi.DataLogger.logNetworkTime(),e=Date.now());var a=this.getRawSpiceMessage(s.data);a&&(wdi.logOperations&&a.channel===wdi.SpiceVars.SPICE_CHANNEL_DISPLAY&&wdi.DataLogger.setStartTime(e),this.fire("message",a))}else if("reply"===s.status){wdi.Debug.log("packetComplete reply");var n=this.getRedLinkReplyBytes(s.data);this.send(n)}else if("errorCode"===s.status){wdi.Debug.log("packetComplete errorCode"),(n=this.getErrorCodeBytes(s.data))&&(this.send(n),this.channel===wdi.SpiceVars.SPICE_CHANNEL_DISPLAY&&this.changeCodec(this.codec)),this.fire("channelConnected")}}),this),this.socketQ.addListener("open",(function(){var e=this.getRedLinkMessBytes();this.send(e),this.proxy&&this.proxy.end()}),this),this.socketQ.addListener("close",(function(e){1===this.channel&&this.fire("error",e),this.socketQ.disconnect()}),this),this.socketQ.addListener("error",(function(e){this.fire("error",e),this.socketQ.disconnect()}),this)},changeCodec:function(e){this.sendObject([...wdi.SpiceObject.numberTo16(2),...wdi.SpiceObject.numberTo16(e),...wdi.SpiceObject.numberTo16(3)],wdi.SpiceVars.SPICE_MSGC_DISPLAY_PREFERRED_VIDEO_CODEC_TYPE),wdi.currentCodec=e,console.log(`codec changed: ${e}`)},connect:function(e,i,t,s){var a=wdi.Utils.generateWebSocketUrl(e.protocol,e.host,e.port,e.vmHost,e.vmPort,"spice",e.vmInfoToken,e.vmid);this.channel=i,this.connectionId=t||0,this.socketQ.connect(a),this.startHandshakeTimeout(),this.proxy=s,this.token=e.token,this.packetReassembler.start()},disconnect:function(){wdi.Debug.log("spicechannel disconnect"),this.counter=0,this.ackWindow=0,this.connectionId=0,this.socketQ.disconnect(),this.socketQ=null,this.packetReassembler.dispose(),this.packetReassembler=null,this.channel=1,this.proxy=null,this.token=null},send:function(e,i){this.socketQ.send(e,i)},sendObject:function(e,i,t){for(var s=0;s<e.length;s+=2048){var a=e.slice(s,s+2048),n=new wdi.SpiceDataHeader({type:i,size:a.length}).marshall();n=n.concat(a),this.send(n,t)}},arrayOfNumberToUint32:function(e){let i=0;for(let t of e)i|=1<<t;return i},setAckWindow:function(e){this.ackWindow=e,this.counter=0},getRawSpiceMessage:function(e){var i=wdi.GlobalPool.create("ViewQueue"),t=wdi.GlobalPool.create("ViewQueue"),s=new Uint8Array(e,0,wdi.SpiceDataHeader.prototype.objectSize);i.setData(s);var a=(new wdi.SpiceDataHeader).demarshall(i);wdi.GlobalPool.discard("ViewQueue",i);var n=e.subarray(wdi.SpiceDataHeader.prototype.objectSize);if(t.setData(n),this.counter++,this.ackWindow&&this.counter===this.ackWindow){this.counter=0;var c=new wdi.SpiceDataHeader({type:wdi.SpiceVars.SPICE_MSGC_ACK,size:0}).marshall();this.send(c)}var o=wdi.PacketLinkFactory.extract(a,t)||!1;if(o)return wdi.PacketLinkProcess.process(a,o,this),wdi.GlobalPool.discard("ViewQueue",t),!1;var r=wdi.GlobalPool.create("RawSpiceMessage");return r.set(a,t,this.channel),r},getRedLinkReplyBytes:function(e){if(this.token){var i=new wdi.ViewQueue;i.setData(e),i.eatBytes(wdi.SpiceLinkHeader.prototype.objectSize);var t=(new wdi.SpiceLinkReply).demarshall(i);return wdi.SpiceObject.stringHexToBytes(RSA_public_encrypt(this.token,t.pub_key))}return wdi.SpiceObject.stringToBytesPadding("",128)},getRedLinkMessBytes:function(){var e=new wdi.SpiceLinkHeader({magic:1363428690,major_version:2,minor_version:2,size:26}).marshall(),i=new wdi.SpiceLinkMess({connection_id:this.connectionId,channel_type:this.channel,caps_offset:18,num_common_caps:1,num_channel_caps:1,common_caps:1<<wdi.SpiceVars.SPICE_COMMON_CAP_MINI_HEADER,channel_caps:this.arrayOfNumberToUint32([wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_SIZED_STREAM,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_STREAM_REPORT,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_MONITORS_CONFIG,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_MULTI_CODEC,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_CODEC_MJPEG,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_CODEC_VP8,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_CODEC_H264,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_CODEC_VP9,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_CODEC_H265,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_LZ4_COMPRESSION,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_PREF_COMPRESSION])}).marshall();return e.concat(i)},getErrorCodeBytes:function(e){var i=wdi.GlobalPool.create("ViewQueue");i.setData(e);var t=wdi.SpiceObject.bytesToInt32NoAllocate(i);if(wdi.GlobalPool.discard("ViewQueue",i),0!==t)throw new wdi.Exception({message:"Server refused client",errorCode:2});if(this.channel===wdi.SpiceVars.SPICE_CHANNEL_DISPLAY){var s=new wdi.SpiceDataHeader({type:wdi.SpiceVars.SPICE_MSGC_DISPLAY_INIT,size:14}).marshall(),a=new wdi.SpiceCDisplayInit({pixmap_cache_id:1,pixmap_cache_size:1,glz_dictionary_id:0,glz_dictionary_window_size:0}).marshall();return s.concat(a)}if(this.channel==wdi.SpiceVars.SPICE_CHANNEL_MAIN)return new wdi.SpiceDataHeader({type:wdi.SpiceVars.SPICE_MSGC_MAIN_ATTACH_CHANNELS,size:0}).marshall()}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.WebSocketWrapper=$.spcExtend({},{ws:{},onopen:null,onmessage:null,onclose:null,onerror:null,init:function(){},connect:function(n,o){this.ws=new WebSocket(n,o)},onOpen:function(n){this.ws.onopen=n},onMessage:function(n){this.ws.onmessage=n},onClose:function(n){this.ws.onclose=n},onError:function(n){this.ws.onerror=n},setBinaryType:function(n){this.ws.binaryType=n},close:function(){this.ws&&this.ws.close&&(this.ws.close(),this.ws.onopen=function(){},this.ws.onmessage=function(){},this.ws.onclose=function(){},this.ws.onerror=function(){},this.onopen=function(){},this.onmessage=function(){},this.onclose=function(){},this.onerror=function(){})},send:function(n){this.ws.send(n)}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.BUS_TYPES={file:0,print:1,launchApplication:2,windowManagement:3,menu:5,networkDriveManagement:6,clipboard:9,generic:99,killApplicationDoNotUseInProductionEver:34423423},wdi.BusProcess=$.spcExtend(wdi.EventObject.prototype,{busConnection:null,clientGui:null,init:function(e){this.superInit(),this.clientGui=e.clientGui,this.busConnection=e.busConnection},dispose:function(){this.clientGui=null,this.busConnection=null},process:function(e){switch(e.verb){case"CONNECTED":this.busConnection.setSubscriptions(),this.fire("busConnected");break;case"MESSAGE":this.parseMessage(e.body);break;case"ERROR":console.error("Bus error");break;default:wdi.Debug.warn("Not implemented Stomp Verb: "+e.verb)}},parseMessage:function(e){switch(parseInt(e.type)){case wdi.BUS_TYPES.launchApplication:this.parseLaunchApplicationMessage(e);break;case wdi.BUS_TYPES.killApplicationDoNotUseInProductionEver:break;case wdi.BUS_TYPES.windowManagement:this.parseWindowManagementMessage(e);break;case wdi.BUS_TYPES.menu:this.handleMenuMessage(e);break;case wdi.BUS_TYPES.networkDriveManagement:this._handleNetworkDriveMessage(e);break;case wdi.BUS_TYPES.clipboard:this.handleClipboardMessage(e);break;default:this.fire("defaultTypeEvent",e)}},_handleNetworkDriveMessage:function(e){"reMountNetworkDrive"!=e.event&&this.fire("networkDriveResponse",e)},getMenu:function(){this.busConnection.send({type:wdi.BUS_TYPES.menu,value:!1,event:"request"})},handleMenuMessage:function(e){"response"==e.event&&this.fire("menuResponse",e)},handleClipboardMessage:function(e){"selectedText"!==e.event&&"copiedText"!==e.event||this.fire(e.event,e)},parseWindowManagementMessage:function(e){switch(e.event){case"windowList":case"windowCreated":case"windowClosed":case"windowMoved":case"windowResized":case"windowFocused":case"windowMinimized":case"windowRestored":case"windowMaximized":this.fire(e.event,e.value);break;default:wdi.Debug.info("Event '"+e.event+"' not implemented.")}},closeWindow:function(e){this.busConnection.send(this._constructWindowManagementMessage({event:"closeWindow",hwnd:e}))},moveWindow:function(e,n,t){this.busConnection.send(this._constructWindowManagementMessage({event:"moveWindow",hwnd:e,left:n,top:t}))},minimizeWindow:function(e){this.busConnection.send(this._constructWindowManagementMessage({event:"minimizeWindow",hwnd:e}))},maximizeWindow:function(e){this.busConnection.send(this._constructWindowManagementMessage({event:"maximizeWindow",hwnd:e}))},restoreWindow:function(e){this.busConnection.send(this._constructWindowManagementMessage({event:"restoreWindow",hwnd:e}))},focusWindow:function(e){this.busConnection.send(this._constructWindowManagementMessage({event:"focusWindow",hwnd:e}))},resizeWindow:function(e,n,t){this.busConnection.send(this._constructWindowManagementMessage({event:"resizeWindow",hwnd:e,width:n,height:t}))},requestWindowList:function(){this.busConnection.send(this._constructWindowManagementMessage({event:"getWindowList"}))},executeCommand:function(e){this.busConnection.send({type:wdi.BUS_TYPES.launchApplication,application:e})},refreshFileSystem:function(e){this.busConnection.send({type:wdi.BUS_TYPES.file,event:"refreshFileSystem",value:{}})},_constructGenericMessage:function(e,n){return{type:wdi.BUS_TYPES.generic,event:e,value:n||{}}},_constructWindowManagementMessage:function(e){if(void 0===e.event)throw new Error("You should pass an 'event' attribute in the object");var n={type:wdi.BUS_TYPES.windowManagement,event:e.event,value:{}};for(var t in e)"event"!=t&&e.hasOwnProperty(t)&&(n.value[t]=e[t]);return n},reMountNetworkDrive:function(e,n,t){this.busConnection.send({type:wdi.BUS_TYPES.networkDriveManagement,event:"reMountNetworkDrive",host:e,username:n,password:t})},parseLaunchApplicationMessage:function(e){switch(e.event){case"applicationLauncherWrongAppPathError":this.fire("wrongPathError",e);break;case"applicationLaunchedSuccessfully":this.fire("applicationLaunchedSuccessfully",e);break;default:wdi.Debug.info("Event '"+e.event+"' not implemented.")}},sendGenericMessage:function(e,n){this.busConnection.send(this._constructGenericMessage(e,n))}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.CursorProcess=$.spcExtend(wdi.EventObject.prototype,{imageData:null,process:function(r){switch(r.messageType){case wdi.SpiceVars.SPICE_MSG_CURSOR_INIT:case wdi.SpiceVars.SPICE_MSG_CURSOR_SET:var e=this.extractCursor(r);e&&(wdi.VirtualMouse.setHotspot(0,0),wdi.VirtualMouse.setMouse(e.data,e.header.hot_spot_x,e.header.hot_spot_y));break;case wdi.SpiceVars.SPICE_MSG_CURSOR_HIDE:wdi.VirtualMouse.hideMouse()}},dispose:function(){this.clearEvents(),this.imageData=null},_toUrl:function(r){var e=$("<canvas/>").attr({width:r.width,height:r.height})[0];return e.getContext("2d").putImageData(r,0,0),e.toDataURL("image/png")},extractCursor:function(r){var e=r.args.cursor.flags,s=r.args.position,a=r.args.visible;if(1&e)return null;var i=null;if(e&wdi.SpiceCursorFlags.SPICE_CURSOR_FLAGS_FROM_CACHE)i=wdi.ImageCache.getCursorFrom(r.args.cursor);else switch(r.args.cursor.header.type){case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_ALPHA:i=this._toUrl(wdi.graphics.argbToImageData(r.args.cursor.data,r.args.cursor.header.width,r.args.cursor.header.height));break;case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_MONO:i=this._toUrl(wdi.graphics.monoToImageData(r.args.cursor.data,r.args.cursor.header.width,r.args.cursor.header.height));break;case 8:i=wdi.SpiceObject.bytesToString(r.args.cursor.data);case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_COLOR4:case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_COLOR8:case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_COLOR16:case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_COLOR24:case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_COLOR32:case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_ENUM_END:}return i?(e&wdi.SpiceCursorFlags.SPICE_CURSOR_FLAGS_CACHE_ME&&wdi.ImageCache.addCursor(r.args.cursor,i),{data:i,position:s,visible:a,header:r.args.cursor.header}):null}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.DisplayPreProcess=$.spcExtend(wdi.EventObject.prototype,{displayProcess:null,queued:[],inProcess:[],idleConsumers:[],consumers:[],init:function(s){this.idleConsumers=[],this.superInit(),this.displayProcess=s.displayProcess||new wdi.DisplayProcess({clientGui:s.clientGui,disableMessageBuffering:s.disableMessageBuffering}),this.clientGui=s.clientGui,null!=s.numConsumers&&null!=s.numConsumers||(s.numConsumers=4);for(var e=s.numConsumers,i=0;i<e;i++){var n=new wdi.AsyncConsumer;this.consumers.push(n),this.idleConsumers.push(n),n.addListener("done",this.onConsumerDone,this)}},onConsumerDone:function(s){for(var e=this.inProcess[0],i=null;e&&1===e.state;){i=this.inProcess.shift();try{this.displayProcess.process(i.message)}catch(s){wdi.Debug.error("DisplayPreProcess error: ",s)}e=this.inProcess[0]}this.idleConsumers.push(s),this.queued.length>0&&this.executeConsumer()},process:function(s){this.addTask(s),this.executeConsumer()},addTask:function(s){this.queued.push({message:s,clientGui:this.clientGui})},getNextTask:function(){for(var s=this.queued.shift();void 0===s&&0!=this.queued.length;)s=this.queued.shift();return void 0!==s&&(s.state=0,this.inProcess.push(s),s)},executeConsumer:function(){if(this.idleConsumers.length>0){wdi.Debug.log("DisplayPreProcess: available workers: "+this.idleConsumers.length),wdi.Debug.log("DisplaypreProcess: pending tasks: "+this.queued.length);var s=this.idleConsumers.shift(),e=this.getNextTask();e&&s.consume(e)}},dispose:function(){wdi.Debug.log("displaypreprocess dispose ################ idleConsumers: ",this.idleConsumers.length),this.clearEvents(),this.clientGui=null,this.queued=[],this.inProcess=[],this.idleConsumers=[],this.displayProcess.dispose(),this.displayProcess=null,this.consumers.forEach((function(s){s.clearEvents(),s.dispose()})),this.consumers=[]}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.DisplayProcess=$.spcExtend(wdi.EventObject.prototype,{runQ:null,packetFilter:null,init:function(i){this.runQ=i.runQ||wdi.ExecutionControl.runQ,this.packetFilter=i.packetFilter||wdi.PacketFilter,this.clientGui=i.clientGui,this.displayRouter=i.displayRouter||new wdi.DisplayRouter({clientGui:this.clientGui}),this.started=!1,this.waitingMessages=[],this.packetWorkerIdentifier=i.packetWorkerIdentifier||new wdi.PacketWorkerIdentifier,this.disableMessageBuffering=i.disableMessageBuffering},dispose:function(){wdi.Debug.log("Disposing DisplayProcess"),clearInterval(this.timer),this.timer=null,this.runQ=null,this.packetFilter.dispose(),this.packetFilter=null,this.clientGui=null,this.displayRouter.dispose(),this.displayRouter=null,this.packetWorkerIdentifier.dispose(),this.packetWorkerIdentifier=null,this.started=!1,this.waitingMessages=[]},process:function(i){if(this.disableMessageBuffering)this._process(i);else{var e=this;this.waitingMessages.push(i),this.started||(this.timer=setInterval((function(){e.flush()}),50),this.started=!0)}},flush:function(){if(0!==this.waitingMessages.length){var i,e=0;this.removeRedundantDraws();for(var t=this.waitingMessages.length;e<t;)i=this.waitingMessages[e],this._process(i),e++;this.waitingMessages=[]}},removeRedundantDraws:function(){if(!(this.waitingMessages.length<2)){for(var i,e,t,s,r,n,a,o,l,c,h=this.waitingMessages.length,u={},p=[],d=!1;h--;)if(r=(e=(i=this.waitingMessages[h]).args).base,s=e.rop_descriptor,d=!1,r){if(r.surface_id,a=r.box,n=r.surface_id,t=this.packetWorkerIdentifier.getImageProperties(i),u[n]||(u[n]=[]),(!t||t&&!(t.descriptor.flags&wdi.SpiceImageFlags.SPICE_IMAGE_FLAGS_CACHE_ME))&&0===n)for(l=0;l<u[n].length;l++)if((o=u[n][l]).bottom>=a.bottom&&o.top<=a.top&&o.left<=a.left&&o.right>=a.right){d=!0,p.push(h);break}if(!d&&i.messageType===wdi.SpiceVars.SPICE_MSG_DISPLAY_COPY_BITS)break;!d&&e.getMessageProperty("overWriteScreenArea",!1)&&0==r.clip.type&&s==wdi.SpiceRopd.SPICE_ROPD_OP_PUT&&u[n].push(r.box)}for(c=0;c<p.length;c++)this.waitingMessages.splice(p[c],1)}},_process:function(i){wdi.logOperations&&wdi.DataLogger.log(i,0,null,!0,"","_decode"),this.runQ.add((function(e){this.packetFilter.filter(i,(function(i){wdi.ExecutionControl.currentProxy=e,this.displayRouter.processPacket(i),this.postProcess()}),this,this.clientGui),wdi.ExecutionControl.sync&&e.end()}),this,(function(){this.processEnd(i,this.clientGui)})),this.runQ.process()},processEnd:function(i,e){this.packetFilter.notifyEnd(i,e)},postProcess:function(){}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.InputProcess=$.spcExtend(wdi.EventObject.prototype,{clientGui:null,spiceConnection:null,capsLockPressed:!1,numLockPressed:!1,shiftPressed:!1,init:function(e){this.superInit(),this.clientGui=e.clientGui,this.spiceConnection=e.spiceConnection},dispose:function(){this.clearEvents(),this.clientGui=null,this.spiceConnection=null},process:function(e){if(e.messageType===wdi.SpiceVars.SPICE_MSG_INPUTS_MOUSE_MOTION_ACK)this.clientGui.motion_ack()},send:function(e,s){var i,n,c;if("mousemove"==s)i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_MOUSE_POSITION,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.RedcMousePosition({x:e[1][0]+wdi.VirtualMouse.hotspot.x,y:e[1][1]+wdi.VirtualMouse.hotspot.y,buttons_state:e[1][2],display_id:0})}),this.spiceConnection.send(i);else if("mousedown"==s)i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_MOUSE_PRESS,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.RedcMousePress({button_id:e[1]+1,buttons_state:1<<e[1]})}),this.spiceConnection.send(i);else if("mouseup"==s)i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_MOUSE_RELEASE,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.RedcMousePress({button_id:e[1]+1,buttons_state:0})}),this.spiceConnection.send(i);else if("keydown"==s||"keypress"==s){n=wdi.Keymap.getScanCodes(e[1][0]);const t=e[1][0].originalEvent;if("keydown"==s&&20!==e[1][0].keyCode&&(!wdi.Keymap.isVirtualKeyboard&&t&&t.getModifierState&&wdi.Keymap.capsLock!==t.getModifierState("CapsLock")||wdi.Keymap.isVirtualKeyboard&&wdi.Keymap.isVirtualCapsLockOn!==wdi.Keymap.capsLock)){const e=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_DOWN,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode([58,0,0])});this.capsLockPressed=!0,this.spiceConnection.send(e)}if("keydown"==s&&t&&t.getModifierState&&144!==e[1][0].keyCode&&wdi.Keymap.numLock!==t.getModifierState("NumLock")){const e=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_DOWN,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode([69,0,0])});this.numLockPressed=!0,this.spiceConnection.send(e)}for(console.log(1),c=0;c<n.length;c++)i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_DOWN,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode(n[c])}),n[0]&&42===n[0][0]&&(this.shiftPressed=!0),this.spiceConnection.send(i)}else if("keyup"==s){if((n=wdi.Keymap.getScanCodes(e[1][0]))&&n[0]&&199===n[0][0]&&0===n[0][1]&&0===n[0][2]&&(n=[[224,199,0,0]]),this.capsLockPressed){const e=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_UP,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode([186,0,0])});this.spiceConnection.send(e),this.capsLockPressed=!1}if(this.numLockPressed){const e=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_UP,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode([197,0,0])});this.spiceConnection.send(e),this.numLockPressed=!1}for(n[0]&&142===n[0][0]&&(this.shiftPressed=!1),console.log(3),c=0;c<n.length;c++)i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_UP,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode(n[c])}),this.spiceConnection.send(i);this.clientGui.inputManager.input.val("_")}else"joystick"==s&&(i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_MOUSE_MOTION,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.RedcMouseMotion({x:e[1][0],y:e[1][1],buttons_state:0})}),this.spiceConnection.send(i))},isKeyboardShortcut:function(e,s){if("keydown"===e){var i=s.keyCode;return wdi.Keymap.controlPressed(i,e,s),wdi.Keymap.handledByCtrlKeyCode(e,i,!0)}}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.MainProcess=$.spcExtend(wdi.EventObject.prototype,{init:function(e){this.superInit(),this.app=e.app,this.spiceConnection=e.app.spiceConnection,this.agent=e.app.agent},dispose:function(){this.clearEvents(),this.app=null,this.spiceConnection=null,this.agent=null},process:function(e){var i=this.spiceConnection.channels[wdi.SpiceVars.SPICE_CHANNEL_MAIN];switch(e.messageType){case wdi.SpiceVars.SPICE_MSG_MAIN_INIT:i.connectionId=e.args.session_id,i.fire("connectionId",i.connectionId),1==e.args.agent_connected&&i.fire("initAgent",e.args.agent_tokens),1==e.args.current_mouse_mode&&i.fire("mouseMode",e.args.current_mouse_mode),this.changeMouseMode();break;case wdi.SpiceVars.SPICE_MSG_MAIN_AGENT_DATA:var s=e.args;this.agent.onAgentData(s);break;case wdi.SpiceVars.SPICE_MSG_MAIN_AGENT_CONNECTED:i.fire("initAgent",e.args.agent_tokens),this.changeMouseMode();break;case wdi.SpiceVars.SPICE_MSG_MAIN_MULTI_MEDIA_TIME:this.app.multimediaTime=e.args.multimedia_time;break;case wdi.SpiceVars.SPICE_MSG_MAIN_CHANNELS_LIST:i.fire("channelListAvailable",e.args.channels)}},changeMouseMode:function(){var e=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_MAIN_MOUSE_MODE_REQUEST,channel:wdi.SpiceVars.SPICE_CHANNEL_MAIN,args:new wdi.SpiceMouseModeRequest({request_mode:2})});this.spiceConnection.send(e)}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
wdi.PlaybackProcess=$.spcExtend(wdi.EventObject.prototype,{_lastApp:null,started:!1,minBuffSize:32768,frequency:null,channels:null,audioContext:null,startTime:null,hasAudioSupport:!0,typedBuffer:null,position:null,init:function(t){this.app=t.app,this.audioContext=this.getAudioContext(),this.audioContext?this.hasAudioSupport=!0:(this.hasAudioSupport=!1,wdi.Debug.warn("The client browser does not support Web Audio API")),this.startTime=0,this.typedBuffer=new ArrayBuffer(34688),this.position=0},dispose:function(){this.clearEvents(),this._lastApp=null,this.started=!1,this.frequency=null,this.channels=null,this.audioContext=null,this.startTime=null,this.hasAudioSupport=!0,this.typedBuffer=null,this.position=null},getAudioContext:function(){try{return new AudioContext}catch(t){}try{return new webkitAudioContext}catch(t){}return!1},process:function(t){if(this.hasAudioSupport)switch(t.messageType){case wdi.SpiceVars.SPICE_MSG_PLAYBACK_MODE:break;case wdi.SpiceVars.SPICE_MSG_PLAYBACK_START:var e=t.args;this.channels=e.channels,this.frequency=e.frequency;break;case wdi.SpiceVars.SPICE_MSG_PLAYBACK_STOP:this.startTime=0;e=t.args;this.flush();break;case wdi.SpiceVars.SPICE_MSG_PLAYBACK_DATA:e=t.args;var i=t.args.multimedia_time;new Uint8Array(this.typedBuffer).set(e.data,this.position),this.position+=e.data.length,this._lastApp=this.app,this.position>=this.minBuffSize&&this.flush(i)}},flush:function(t){this.position>0&&(this.started&&this.playSound(this.typedBuffer,t),this.position=0,this.typedBuffer=new ArrayBuffer(34688))},playSound:function(t,e){if(2==this.channels)return this.playSoundStereo(t,e);for(var i=new Int16Array(t),s=new Array(this.channels),n=0;n<this.channels;n++)s[n]=new Float32Array(i.length/2);var a=0;for(n=0;n<i.length;){for(var r=0;r<this.channels;r++)s[r][a]=i[n++]/32768;a++}var h=this.audioContext.createBufferSource(),o=this.audioContext.createBuffer(this.channels,a,this.frequency);for(n=0;n<this.channels;n++)o.getChannelData(n).set(s[n]);this._play(h,o,e)},playSoundStereo:function(t,e){for(var i=new Int16Array(t),s=new Float32Array(i.length/2),n=new Float32Array(i.length/2),a=0,r=this.audioContext,h=i.length,o=0;o<h;)s[a]=i[o++]/32768,n[a]=i[o++]/32768,a++;var u=r.createBufferSource(),l=r.createBuffer(2,a,this.frequency);l.getChannelData(0).set(s),l.getChannelData(1).set(n),this._play(u,l,e)},_play:function(t,e,i){var s=0;i&&((s=i-(Date.now()-this.app.lastMultimediaTime+this.app.multimediaTime))<0&&(s=0));t.buffer=e,t.connect(this.audioContext.destination),t.start(this.startTime+s),this.startTime+=e.duration},startAudio:function(){this.started=!0,this.flush()}});
|