made with requirebin
Created
April 25, 2014 15:14
-
-
Save peutetre/11293105 to your computer and use it in GitHub Desktop.
requirebin sketch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Zanimo = require('zanimo'); | |
var prefix = require('vendor-prefix'); | |
var elt = document.createElement('div'); | |
elt.style.height = '100px'; | |
elt.style.width = '800px'; | |
elt.style.position = 'absolute'; | |
elt.style.top = '50px'; | |
elt.style.left = '50px'; | |
var txt = "Navigator: " + navigator.userAgent + '<br>'; | |
txt += "Setting a transition on an element with a timing function: cubic-bezier(.17,.67,.83,.67) <br>"; | |
Zanimo(elt, 'transform', 'translate3d(20px, 40px, 30px)', 200, 'cubic-bezier(.17,.67,.83,.67)').then(function (el) { | |
txt += "Then echo the transition style attribute: " + el.style[prefix.dash('transition')]; | |
el.innerHTML = txt; | |
document.body.appendChild(el); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require=function e(t,n,r){function o(u,c){if(!n[u]){if(!t[u]){var s="function"==typeof require&&require;if(!c&&s)return s(u,!0);if(i)return i(u,!0);throw Error("Cannot find module '"+u+"'")}var a=n[u]={exports:{}};t[u][0].call(a.exports,function(n){var e=t[u][1][n];return o(e?e:n)},a,a.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;r.length>u;u++)o(r[u]);return o}({1:[function(t,n){var e=n.exports={};e.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(n){var e=[];return window.addEventListener("message",function(t){var n=t.source;if((n===window||null===n)&&"process-tick"===t.data&&(t.stopPropagation(),e.length>0)){var r=e.shift();r()}},!0),function(t){e.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.binding=function(){throw Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(){throw Error("process.chdir is not supported")}},{}],2:[function(t,n,e){(function(t){(function(t){if("function"==typeof bootstrap)bootstrap("promise",t);else if("object"==typeof e)n.exports=t();else if("function"==typeof define&&define.amd)define(t);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeQ=t}else Q=t()})(function(){"use strict";function n(t){return function(){return W.apply(t,arguments)}}function e(t){return t===Object(t)}function r(t){return"[object StopIteration]"===en(t)||t instanceof $}function o(t,n){if(Z&&n.stack&&"object"==typeof t&&null!==t&&t.stack&&-1===t.stack.indexOf(rn)){for(var e=[],r=n;r;r=r.source)r.stack&&e.unshift(r.stack);e.unshift(t.stack);var o=e.join("\n"+rn+"\n");t.stack=i(o)}}function i(t){for(var n=t.split("\n"),e=[],r=0;n.length>r;++r){var o=n[r];s(o)||u(o)||!o||e.push(o)}return e.join("\n")}function u(t){return-1!==t.indexOf("(module.js:")||-1!==t.indexOf("(node.js:")}function c(t){var n=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(t);if(n)return[n[1],Number(n[2])];var e=/at ([^ ]+):(\d+):(?:\d+)$/.exec(t);if(e)return[e[1],Number(e[2])];var r=/.*@(.+):(\d+)$/.exec(t);return r?[r[1],Number(r[2])]:void 0}function s(t){var n=c(t);if(!n)return!1;var e=n[0],r=n[1];return e===Q&&r>=V&&sn>=r}function a(){if(Z)try{throw Error()}catch(t){var n=t.stack.split("\n"),e=n[0].indexOf("@")>0?n[1]:n[2],r=c(e);if(!r)return;return Q=r[0],r[1]}}function f(t,n,e){return function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(n+" is deprecated, use "+e+" instead.",Error("").stack),t.apply(t,arguments)}}function p(t){return g(t)?t:w(t)?z(t):O(t)}function l(){function t(t){n=t,i.source=t,G(e,function(n,e){H(function(){t.promiseDispatch.apply(t,e)})},void 0),e=void 0,r=void 0}var n,e=[],r=[],o=Y(l.prototype),i=Y(y.prototype);if(i.promiseDispatch=function(t,o,i){var u=J(arguments);e?(e.push(u),"when"===o&&i[1]&&r.push(i[1])):H(function(){n.promiseDispatch.apply(n,u)})},i.valueOf=function(){if(e)return i;var t=m(n);return g(t)&&(n=t),t},i.inspect=function(){return n?n.inspect():{state:"pending"}},p.longStackSupport&&Z)try{throw Error()}catch(u){i.stack=u.stack.substring(u.stack.indexOf("\n")+1)}return o.promise=i,o.resolve=function(e){n||t(p(e))},o.fulfill=function(e){n||t(O(e))},o.reject=function(e){n||t(T(e))},o.notify=function(t){n||G(r,function(n,e){H(function(){e(t)})},void 0)},o}function d(t){if("function"!=typeof t)throw new TypeError("resolver must be a function.");var n=l();try{t(n.resolve,n.reject,n.notify)}catch(e){n.reject(e)}return n.promise}function h(t){return d(function(n,e){for(var r=0,o=t.length;o>r;r++)p(t[r]).then(n,e)})}function y(t,n,e){void 0===n&&(n=function(t){return T(Error("Promise does not support operation: "+t))}),void 0===e&&(e=function(){return{state:"unknown"}});var r=Y(y.prototype);if(r.promiseDispatch=function(e,o,i){var u;try{u=t[o]?t[o].apply(r,i):n.call(r,o,i)}catch(c){u=T(c)}e&&e(u)},r.inspect=e,e){var o=e();"rejected"===o.state&&(r.exception=o.reason),r.valueOf=function(){var t=e();return"pending"===t.state||"rejected"===t.state?r:t.value}}return r}function v(t,n,e,r){return p(t).then(n,e,r)}function m(t){if(g(t)){var n=t.inspect();if("fulfilled"===n.state)return n.value}return t}function g(t){return e(t)&&"function"==typeof t.promiseDispatch&&"function"==typeof t.inspect}function w(t){return e(t)&&"function"==typeof t.then}function j(t){return g(t)&&"pending"===t.inspect().state}function k(t){return!g(t)||"fulfilled"===t.inspect().state}function b(t){return g(t)&&"rejected"===t.inspect().state}function x(){on.length=0,un.length=0,cn||(cn=!0)}function R(t,n){cn&&(un.push(t),n&&n.stack!==void 0?on.push(n.stack):on.push("(no stack) "+n))}function E(t){if(cn){var n=K(un,t);-1!==n&&(un.splice(n,1),on.splice(n,1))}}function T(t){var n=y({when:function(n){return n&&E(this),n?n(t):this}},function(){return this},function(){return{state:"rejected",reason:t}});return R(n,t),n}function O(t){return y({when:function(){return t},get:function(n){return t[n]},set:function(n,e){t[n]=e},"delete":function(n){delete t[n]},post:function(n,e){return null===n||void 0===n?t.apply(void 0,e):t[n].apply(t,e)},apply:function(n,e){return t.apply(n,e)},keys:function(){return nn(t)}},void 0,function(){return{state:"fulfilled",value:t}})}function z(t){var n=l();return H(function(){try{t.then(n.resolve,n.reject,n.notify)}catch(e){n.reject(e)}}),n.promise}function N(t){return y({isDef:function(){}},function(n,e){return C(t,n,e)},function(){return p(t).inspect()})}function _(t,n,e){return p(t).spread(n,e)}function q(t){return function(){function n(t,n){var u;if("undefined"==typeof StopIteration){try{u=e[t](n)}catch(c){return T(c)}return u.done?u.value:v(u.value,o,i)}try{u=e[t](n)}catch(c){return r(c)?c.value:T(c)}return v(u,o,i)}var e=t.apply(this,arguments),o=n.bind(n,"next"),i=n.bind(n,"throw");return o()}}function S(t){p.done(p.async(t)())}function P(t){throw new $(t)}function A(t){return function(){return _([this,D(arguments)],function(n,e){return t.apply(n,e)})}}function C(t,n,e){return p(t).dispatch(n,e)}function D(t){return v(t,function(t){var n=0,e=l();return G(t,function(r,o,i){var u;g(o)&&"fulfilled"===(u=o.inspect()).state?t[i]=u.value:(++n,v(o,function(r){t[i]=r,0===--n&&e.resolve(t)},e.reject,function(t){e.notify({index:i,value:t})}))},void 0),0===n&&e.resolve(t),e.promise})}function F(t){return v(t,function(t){return t=X(t,p),v(D(X(t,function(t){return v(t,B,B)})),function(){return t})})}function M(t){return p(t).allSettled()}function I(t,n){return p(t).then(void 0,void 0,n)}function U(t,n){return p(t).nodeify(n)}var Z=!1;try{throw Error()}catch(L){Z=!!L.stack}var Q,$,V=a(),B=function(){},H=function(){function n(){for(;e.next;){e=e.next;var t=e.task;e.task=void 0;var r=e.domain;r&&(e.domain=void 0,r.enter());try{t()}catch(i){if(u)throw r&&r.exit(),setTimeout(n,0),r&&r.enter(),i;setTimeout(function(){throw i},0)}r&&r.exit()}o=!1}var e={task:void 0,next:null},r=e,o=!1,i=void 0,u=!1;if(H=function(n){r=r.next={task:n,domain:u&&t.domain,next:null},o||(o=!0,i())},t!==void 0&&t.nextTick)u=!0,i=function(){t.nextTick(n)};else if("function"==typeof setImmediate)i="undefined"!=typeof window?setImmediate.bind(window,n):function(){setImmediate(n)};else if("undefined"!=typeof MessageChannel){var c=new MessageChannel;c.port1.onmessage=function(){i=s,c.port1.onmessage=n,n()};var s=function(){c.port2.postMessage(0)};i=function(){setTimeout(n,0),s()}}else i=function(){setTimeout(n,0)};return H}(),W=Function.call,J=n(Array.prototype.slice),G=n(Array.prototype.reduce||function(t,n){var e=0,r=this.length;if(1===arguments.length)for(;;){if(e in this){n=this[e++];break}if(++e>=r)throw new TypeError}for(;r>e;e++)e in this&&(n=t(n,this[e],e));return n}),K=n(Array.prototype.indexOf||function(t){for(var n=0;this.length>n;n++)if(this[n]===t)return n;return-1}),X=n(Array.prototype.map||function(t,n){var e=this,r=[];return G(e,function(o,i,u){r.push(t.call(n,i,u,e))},void 0),r}),Y=Object.create||function(t){function n(){}return n.prototype=t,new n},tn=n(Object.prototype.hasOwnProperty),nn=Object.keys||function(t){var n=[];for(var e in t)tn(t,e)&&n.push(e);return n},en=n(Object.prototype.toString);$="undefined"!=typeof ReturnValue?ReturnValue:function(t){this.value=t};var rn="From previous event:";p.resolve=p,p.nextTick=H,p.longStackSupport=!1,p.defer=l,l.prototype.makeNodeResolver=function(){var t=this;return function(n,e){n?t.reject(n):arguments.length>2?t.resolve(J(arguments,1)):t.resolve(e)}},p.Promise=d,p.promise=d,d.race=h,d.all=D,d.reject=T,d.resolve=p,p.passByCopy=function(t){return t},y.prototype.passByCopy=function(){return this},p.join=function(t,n){return p(t).join(n)},y.prototype.join=function(t){return p([this,t]).spread(function(t,n){if(t===n)return t;throw Error("Can't join: not the same: "+t+" "+n)})},p.race=h,y.prototype.race=function(){return this.then(p.race)},p.makePromise=y,y.prototype.toString=function(){return"[object Promise]"},y.prototype.then=function(t,n,e){function r(n){try{return"function"==typeof t?t(n):n}catch(e){return T(e)}}function i(t){if("function"==typeof n){o(t,c);try{return n(t)}catch(e){return T(e)}}return T(t)}function u(t){return"function"==typeof e?e(t):t}var c=this,s=l(),a=!1;return H(function(){c.promiseDispatch(function(t){a||(a=!0,s.resolve(r(t)))},"when",[function(t){a||(a=!0,s.resolve(i(t)))}])}),c.promiseDispatch(void 0,"when",[void 0,function(t){var n,e=!1;try{n=u(t)}catch(r){if(e=!0,!p.onerror)throw r;p.onerror(r)}e||s.notify(n)}]),s.promise},p.when=v,y.prototype.thenResolve=function(t){return this.then(function(){return t})},p.thenResolve=function(t,n){return p(t).thenResolve(n)},y.prototype.thenReject=function(t){return this.then(function(){throw t})},p.thenReject=function(t,n){return p(t).thenReject(n)},p.nearer=m,p.isPromise=g,p.isPromiseAlike=w,p.isPending=j,y.prototype.isPending=function(){return"pending"===this.inspect().state},p.isFulfilled=k,y.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},p.isRejected=b,y.prototype.isRejected=function(){return"rejected"===this.inspect().state};var on=[],un=[],cn=!0;p.resetUnhandledRejections=x,p.getUnhandledReasons=function(){return on.slice()},p.stopUnhandledRejectionTracking=function(){x(),cn=!1},x(),p.reject=T,p.fulfill=O,p.master=N,p.spread=_,y.prototype.spread=function(t,n){return this.all().then(function(n){return t.apply(void 0,n)},n)},p.async=q,p.spawn=S,p["return"]=P,p.promised=A,p.dispatch=C,y.prototype.dispatch=function(t,n){var e=this,r=l();return H(function(){e.promiseDispatch(r.resolve,t,n)}),r.promise},p.get=function(t,n){return p(t).dispatch("get",[n])},y.prototype.get=function(t){return this.dispatch("get",[t])},p.set=function(t,n,e){return p(t).dispatch("set",[n,e])},y.prototype.set=function(t,n){return this.dispatch("set",[t,n])},p.del=p["delete"]=function(t,n){return p(t).dispatch("delete",[n])},y.prototype.del=y.prototype["delete"]=function(t){return this.dispatch("delete",[t])},p.mapply=p.post=function(t,n,e){return p(t).dispatch("post",[n,e])},y.prototype.mapply=y.prototype.post=function(t,n){return this.dispatch("post",[t,n])},p.send=p.mcall=p.invoke=function(t,n){return p(t).dispatch("post",[n,J(arguments,2)])},y.prototype.send=y.prototype.mcall=y.prototype.invoke=function(t){return this.dispatch("post",[t,J(arguments,1)])},p.fapply=function(t,n){return p(t).dispatch("apply",[void 0,n])},y.prototype.fapply=function(t){return this.dispatch("apply",[void 0,t])},p["try"]=p.fcall=function(t){return p(t).dispatch("apply",[void 0,J(arguments,1)])},y.prototype.fcall=function(){return this.dispatch("apply",[void 0,J(arguments)])},p.fbind=function(t){var n=p(t),e=J(arguments,1);return function(){return n.dispatch("apply",[this,e.concat(J(arguments))])}},y.prototype.fbind=function(){var t=this,n=J(arguments);return function(){return t.dispatch("apply",[this,n.concat(J(arguments))])}},p.keys=function(t){return p(t).dispatch("keys",[])},y.prototype.keys=function(){return this.dispatch("keys",[])},p.all=D,y.prototype.all=function(){return D(this)},p.allResolved=f(F,"allResolved","allSettled"),y.prototype.allResolved=function(){return F(this)},p.allSettled=M,y.prototype.allSettled=function(){return this.then(function(t){return D(X(t,function(t){function n(){return t.inspect()}return t=p(t),t.then(n,n)}))})},p.fail=p["catch"]=function(t,n){return p(t).then(void 0,n)},y.prototype.fail=y.prototype["catch"]=function(t){return this.then(void 0,t)},p.progress=I,y.prototype.progress=function(t){return this.then(void 0,void 0,t)},p.fin=p["finally"]=function(t,n){return p(t)["finally"](n)},y.prototype.fin=y.prototype["finally"]=function(t){return t=p(t),this.then(function(n){return t.fcall().then(function(){return n})},function(n){return t.fcall().then(function(){throw n})})},p.done=function(t,n,e,r){return p(t).done(n,e,r)},y.prototype.done=function(n,e,r){var i=function(t){H(function(){if(o(t,u),!p.onerror)throw t;p.onerror(t)})},u=n||e||r?this.then(n,e,r):this;"object"==typeof t&&t&&t.domain&&(i=t.domain.bind(i)),u.then(void 0,i)},p.timeout=function(t,n,e){return p(t).timeout(n,e)},y.prototype.timeout=function(t,n){var e=l(),r=setTimeout(function(){e.reject(Error(n||"Timed out after "+t+" ms"))},t);return this.then(function(t){clearTimeout(r),e.resolve(t)},function(t){clearTimeout(r),e.reject(t)},e.notify),e.promise},p.delay=function(t,n){return void 0===n&&(n=t,t=void 0),p(t).delay(n)},y.prototype.delay=function(t){return this.then(function(n){var e=l();return setTimeout(function(){e.resolve(n)},t),e.promise})},p.nfapply=function(t,n){return p(t).nfapply(n)},y.prototype.nfapply=function(t){var n=l(),e=J(t);return e.push(n.makeNodeResolver()),this.fapply(e).fail(n.reject),n.promise},p.nfcall=function(t){var n=J(arguments,1);return p(t).nfapply(n)},y.prototype.nfcall=function(){var t=J(arguments),n=l();return t.push(n.makeNodeResolver()),this.fapply(t).fail(n.reject),n.promise},p.nfbind=p.denodeify=function(t){var n=J(arguments,1);return function(){var e=n.concat(J(arguments)),r=l();return e.push(r.makeNodeResolver()),p(t).fapply(e).fail(r.reject),r.promise}},y.prototype.nfbind=y.prototype.denodeify=function(){var t=J(arguments);return t.unshift(this),p.denodeify.apply(void 0,t)},p.nbind=function(t,n){var e=J(arguments,2);return function(){function r(){return t.apply(n,arguments)}var o=e.concat(J(arguments)),i=l();return o.push(i.makeNodeResolver()),p(r).fapply(o).fail(i.reject),i.promise}},y.prototype.nbind=function(){var t=J(arguments,0);return t.unshift(this),p.nbind.apply(void 0,t)},p.nmapply=p.npost=function(t,n,e){return p(t).npost(n,e)},y.prototype.nmapply=y.prototype.npost=function(t,n){var e=J(n||[]),r=l();return e.push(r.makeNodeResolver()),this.dispatch("post",[t,e]).fail(r.reject),r.promise},p.nsend=p.nmcall=p.ninvoke=function(t,n){var e=J(arguments,2),r=l();return e.push(r.makeNodeResolver()),p(t).dispatch("post",[n,e]).fail(r.reject),r.promise},y.prototype.nsend=y.prototype.nmcall=y.prototype.ninvoke=function(t){var n=J(arguments,1),e=l();return n.push(e.makeNodeResolver()),this.dispatch("post",[t,n]).fail(e.reject),e.promise},p.nodeify=U,y.prototype.nodeify=function(t){return t?(this.then(function(n){H(function(){t(null,n)})},function(n){H(function(){t(n)})}),void 0):this};var sn=a();return p})}).call(this,t("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":1}],3:[function(t,n,e){(function(t){(function(t){if("function"==typeof bootstrap)bootstrap("promise",t);else if("object"==typeof e)n.exports=t();else if("function"==typeof define&&define.amd)define(t);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeQ=t}else Q=t()})(function(){"use strict";function n(t){return function(){return G.apply(t,arguments)}}function e(t){return t===Object(t)}function r(t){return"[object StopIteration]"===on(t)||t instanceof B}function o(t,n){if(Q&&n.stack&&"object"==typeof t&&null!==t&&t.stack&&-1===t.stack.indexOf(cn)){for(var e=[],r=n;r;r=r.source)r.stack&&e.unshift(r.stack);e.unshift(t.stack);var o=e.join("\n"+cn+"\n");t.stack=i(o)}}function i(t){for(var n=t.split("\n"),e=[],r=0;n.length>r;++r){var o=n[r];s(o)||u(o)||!o||e.push(o)}return e.join("\n")}function u(t){return-1!==t.indexOf("(module.js:")||-1!==t.indexOf("(node.js:")}function c(t){var n=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(t);if(n)return[n[1],Number(n[2])];var e=/at ([^ ]+):(\d+):(?:\d+)$/.exec(t);if(e)return[e[1],Number(e[2])];var r=/.*@(.+):(\d+)$/.exec(t);return r?[r[1],Number(r[2])]:void 0}function s(t){var n=c(t);if(!n)return!1;var e=n[0],r=n[1];return e===V&&r>=H&&ln>=r}function a(){if(Q)try{throw Error()}catch(t){var n=t.stack.split("\n"),e=n[0].indexOf("@")>0?n[1]:n[2],r=c(e);if(!r)return;return V=r[0],r[1]}}function f(t,n,e){return function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(n+" is deprecated, use "+e+" instead.",Error("").stack),t.apply(t,arguments)}}function p(t){return g(t)?t:w(t)?_(t):N(t)}function l(){function t(t){n=t,i.source=t,X(e,function(n,e){J(function(){t.promiseDispatch.apply(t,e)})},void 0),e=void 0,r=void 0}var n,e=[],r=[],o=nn(l.prototype),i=nn(y.prototype);if(i.promiseDispatch=function(t,o,i){var u=K(arguments);e?(e.push(u),"when"===o&&i[1]&&r.push(i[1])):J(function(){n.promiseDispatch.apply(n,u)})},i.valueOf=function(){if(e)return i;var t=m(n);return g(t)&&(n=t),t},i.inspect=function(){return n?n.inspect():{state:"pending"}},p.longStackSupport&&Q)try{throw Error()}catch(u){i.stack=u.stack.substring(u.stack.indexOf("\n")+1)}return o.promise=i,o.resolve=function(e){n||t(p(e))},o.fulfill=function(e){n||t(N(e))},o.reject=function(e){n||t(z(e))},o.notify=function(t){n||X(r,function(n,e){J(function(){e(t)})},void 0)},o}function d(t){if("function"!=typeof t)throw new TypeError("resolver must be a function.");var n=l();try{t(n.resolve,n.reject,n.notify)}catch(e){n.reject(e)}return n.promise}function h(t){return d(function(n,e){for(var r=0,o=t.length;o>r;r++)p(t[r]).then(n,e)})}function y(t,n,e){void 0===n&&(n=function(t){return z(Error("Promise does not support operation: "+t))}),void 0===e&&(e=function(){return{state:"unknown"}});var r=nn(y.prototype);if(r.promiseDispatch=function(e,o,i){var u;try{u=t[o]?t[o].apply(r,i):n.call(r,o,i)}catch(c){u=z(c)}e&&e(u)},r.inspect=e,e){var o=e();"rejected"===o.state&&(r.exception=o.reason),r.valueOf=function(){var t=e();return"pending"===t.state||"rejected"===t.state?r:t.value}}return r}function v(t,n,e,r){return p(t).then(n,e,r)}function m(t){if(g(t)){var n=t.inspect();if("fulfilled"===n.state)return n.value}return t}function g(t){return e(t)&&"function"==typeof t.promiseDispatch&&"function"==typeof t.inspect}function w(t){return e(t)&&"function"==typeof t.then}function j(t){return g(t)&&"pending"===t.inspect().state}function k(t){return!g(t)||"fulfilled"===t.inspect().state}function b(t){return g(t)&&"rejected"===t.inspect().state}function x(){!fn&&"undefined"!=typeof window&&window.console&&console.warn("[Q] Unhandled rejection reasons (should be empty):",sn),fn=!0}function R(){for(var t=0;sn.length>t;t++){var n=sn[t];console.warn("Unhandled rejection reason:",n)}}function E(){sn.length=0,an.length=0,fn=!1,pn||(pn=!0,t!==void 0&&t.on&&t.on("exit",R))}function T(t,n){pn&&(an.push(t),n&&n.stack!==void 0?sn.push(n.stack):sn.push("(no stack) "+n),x())}function O(t){if(pn){var n=Y(an,t);-1!==n&&(an.splice(n,1),sn.splice(n,1))}}function z(t){var n=y({when:function(n){return n&&O(this),n?n(t):this}},function(){return this},function(){return{state:"rejected",reason:t}});return T(n,t),n}function N(t){return y({when:function(){return t},get:function(n){return t[n]},set:function(n,e){t[n]=e},"delete":function(n){delete t[n]},post:function(n,e){return null===n||void 0===n?t.apply(void 0,e):t[n].apply(t,e)},apply:function(n,e){return t.apply(n,e)},keys:function(){return rn(t)}},void 0,function(){return{state:"fulfilled",value:t}})}function _(t){var n=l();return J(function(){try{t.then(n.resolve,n.reject,n.notify)}catch(e){n.reject(e)}}),n.promise}function q(t){return y({isDef:function(){}},function(n,e){return F(t,n,e)},function(){return p(t).inspect()})}function S(t,n,e){return p(t).spread(n,e)}function P(t){return function(){function n(t,n){var u;if(un){try{u=e[t](n)}catch(c){return z(c)}return u.done?u.value:v(u.value,o,i)}try{u=e[t](n)}catch(c){return r(c)?c.value:z(c)}return v(u,o,i)}var e=t.apply(this,arguments),o=n.bind(n,"next"),i=n.bind(n,"throw");return o()}}function A(t){p.done(p.async(t)())}function C(t){throw new B(t)}function D(t){return function(){return S([this,M(arguments)],function(n,e){return t.apply(n,e)})}}function F(t,n,e){return p(t).dispatch(n,e)}function M(t){return v(t,function(t){var n=0,e=l();return X(t,function(r,o,i){var u;g(o)&&"fulfilled"===(u=o.inspect()).state?t[i]=u.value:(++n,v(o,function(r){t[i]=r,0===--n&&e.resolve(t)},e.reject,function(t){e.notify({index:i,value:t})}))},void 0),0===n&&e.resolve(t),e.promise})}function I(t){return v(t,function(t){return t=tn(t,p),v(M(tn(t,function(t){return v(t,W,W)})),function(){return t})})}function U(t){return p(t).allSettled()}function Z(t,n){return p(t).then(void 0,void 0,n)}function L(t,n){return p(t).nodeify(n)}var Q=!1;try{throw Error()}catch($){Q=!!$.stack}var V,B,H=a(),W=function(){},J=function(){function n(){for(;e.next;){e=e.next;var t=e.task;e.task=void 0;var r=e.domain;r&&(e.domain=void 0,r.enter());try{t()}catch(i){if(u)throw r&&r.exit(),setTimeout(n,0),r&&r.enter(),i;setTimeout(function(){throw i},0)}r&&r.exit()}o=!1}var e={task:void 0,next:null},r=e,o=!1,i=void 0,u=!1;if(J=function(n){r=r.next={task:n,domain:u&&t.domain,next:null},o||(o=!0,i())},t!==void 0&&t.nextTick)u=!0,i=function(){t.nextTick(n)};else if("function"==typeof setImmediate)i="undefined"!=typeof window?setImmediate.bind(window,n):function(){setImmediate(n)};else if("undefined"!=typeof MessageChannel){var c=new MessageChannel;c.port1.onmessage=function(){i=s,c.port1.onmessage=n,n()};var s=function(){c.port2.postMessage(0)};i=function(){setTimeout(n,0),s()}}else i=function(){setTimeout(n,0)};return J}(),G=Function.call,K=n(Array.prototype.slice),X=n(Array.prototype.reduce||function(t,n){var e=0,r=this.length;if(1===arguments.length)for(;;){if(e in this){n=this[e++];break}if(++e>=r)throw new TypeError}for(;r>e;e++)e in this&&(n=t(n,this[e],e));return n}),Y=n(Array.prototype.indexOf||function(t){for(var n=0;this.length>n;n++)if(this[n]===t)return n;return-1}),tn=n(Array.prototype.map||function(t,n){var e=this,r=[];return X(e,function(o,i,u){r.push(t.call(n,i,u,e))},void 0),r}),nn=Object.create||function(t){function n(){}return n.prototype=t,new n},en=n(Object.prototype.hasOwnProperty),rn=Object.keys||function(t){var n=[];for(var e in t)en(t,e)&&n.push(e);return n},on=n(Object.prototype.toString);B="undefined"!=typeof ReturnValue?ReturnValue:function(t){this.value=t};var un;try{Function("(function* (){ yield 1; })"),un=!0}catch($){un=!1}var cn="From previous event:";p.resolve=p,p.nextTick=J,p.longStackSupport=!1,p.defer=l,l.prototype.makeNodeResolver=function(){var t=this;return function(n,e){n?t.reject(n):arguments.length>2?t.resolve(K(arguments,1)):t.resolve(e)}},p.promise=d,p.passByCopy=function(t){return t},y.prototype.passByCopy=function(){return this},p.join=function(t,n){return p(t).join(n)},y.prototype.join=function(t){return p([this,t]).spread(function(t,n){if(t===n)return t;throw Error("Can't join: not the same: "+t+" "+n)})},p.race=h,y.prototype.race=function(){return this.then(p.race)},p.makePromise=y,y.prototype.toString=function(){return"[object Promise]"},y.prototype.then=function(t,n,e){function r(n){try{return"function"==typeof t?t(n):n}catch(e){return z(e)}}function i(t){if("function"==typeof n){o(t,c);try{return n(t)}catch(e){return z(e)}}return z(t)}function u(t){return"function"==typeof e?e(t):t}var c=this,s=l(),a=!1;return J(function(){c.promiseDispatch(function(t){a||(a=!0,s.resolve(r(t)))},"when",[function(t){a||(a=!0,s.resolve(i(t)))}])}),c.promiseDispatch(void 0,"when",[void 0,function(t){var n,e=!1;try{n=u(t)}catch(r){if(e=!0,!p.onerror)throw r;p.onerror(r)}e||s.notify(n)}]),s.promise},p.when=v,y.prototype.thenResolve=function(t){return this.then(function(){return t})},p.thenResolve=function(t,n){return p(t).thenResolve(n)},y.prototype.thenReject=function(t){return this.then(function(){throw t})},p.thenReject=function(t,n){return p(t).thenReject(n)},p.nearer=m,p.isPromise=g,p.isPromiseAlike=w,p.isPending=j,y.prototype.isPending=function(){return"pending"===this.inspect().state},p.isFulfilled=k,y.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},p.isRejected=b,y.prototype.isRejected=function(){return"rejected"===this.inspect().state};var sn=[],an=[],fn=!1,pn=!0;p.resetUnhandledRejections=E,p.getUnhandledReasons=function(){return sn.slice()},p.stopUnhandledRejectionTracking=function(){E(),t!==void 0&&t.on&&t.removeListener("exit",R),pn=!1},E(),p.reject=z,p.fulfill=N,p.master=q,p.spread=S,y.prototype.spread=function(t,n){return this.all().then(function(n){return t.apply(void 0,n)},n)},p.async=P,p.spawn=A,p["return"]=C,p.promised=D,p.dispatch=F,y.prototype.dispatch=function(t,n){var e=this,r=l();return J(function(){e.promiseDispatch(r.resolve,t,n)}),r.promise},p.get=function(t,n){return p(t).dispatch("get",[n])},y.prototype.get=function(t){return this.dispatch("get",[t])},p.set=function(t,n,e){return p(t).dispatch("set",[n,e])},y.prototype.set=function(t,n){return this.dispatch("set",[t,n])},p.del=p["delete"]=function(t,n){return p(t).dispatch("delete",[n])},y.prototype.del=y.prototype["delete"]=function(t){return this.dispatch("delete",[t])},p.mapply=p.post=function(t,n,e){return p(t).dispatch("post",[n,e])},y.prototype.mapply=y.prototype.post=function(t,n){return this.dispatch("post",[t,n])},p.send=p.mcall=p.invoke=function(t,n){return p(t).dispatch("post",[n,K(arguments,2)])},y.prototype.send=y.prototype.mcall=y.prototype.invoke=function(t){return this.dispatch("post",[t,K(arguments,1)])},p.fapply=function(t,n){return p(t).dispatch("apply",[void 0,n])},y.prototype.fapply=function(t){return this.dispatch("apply",[void 0,t])},p["try"]=p.fcall=function(t){return p(t).dispatch("apply",[void 0,K(arguments,1)])},y.prototype.fcall=function(){return this.dispatch("apply",[void 0,K(arguments)])},p.fbind=function(t){var n=p(t),e=K(arguments,1);return function(){return n.dispatch("apply",[this,e.concat(K(arguments))])}},y.prototype.fbind=function(){var t=this,n=K(arguments);return function(){return t.dispatch("apply",[this,n.concat(K(arguments))])}},p.keys=function(t){return p(t).dispatch("keys",[])},y.prototype.keys=function(){return this.dispatch("keys",[])},p.all=M,y.prototype.all=function(){return M(this)},p.allResolved=f(I,"allResolved","allSettled"),y.prototype.allResolved=function(){return I(this)},p.allSettled=U,y.prototype.allSettled=function(){return this.then(function(t){return M(tn(t,function(t){function n(){return t.inspect()}return t=p(t),t.then(n,n)}))})},p.fail=p["catch"]=function(t,n){return p(t).then(void 0,n)},y.prototype.fail=y.prototype["catch"]=function(t){return this.then(void 0,t)},p.progress=Z,y.prototype.progress=function(t){return this.then(void 0,void 0,t)},p.fin=p["finally"]=function(t,n){return p(t)["finally"](n)},y.prototype.fin=y.prototype["finally"]=function(t){return t=p(t),this.then(function(n){return t.fcall().then(function(){return n})},function(n){return t.fcall().then(function(){throw n})})},p.done=function(t,n,e,r){return p(t).done(n,e,r)},y.prototype.done=function(n,e,r){var i=function(t){J(function(){if(o(t,u),!p.onerror)throw t;p.onerror(t)})},u=n||e||r?this.then(n,e,r):this;"object"==typeof t&&t&&t.domain&&(i=t.domain.bind(i)),u.then(void 0,i)},p.timeout=function(t,n,e){return p(t).timeout(n,e)},y.prototype.timeout=function(t,n){var e=l(),r=setTimeout(function(){e.reject(Error(n||"Timed out after "+t+" ms"))},t);return this.then(function(t){clearTimeout(r),e.resolve(t)},function(t){clearTimeout(r),e.reject(t)},e.notify),e.promise},p.delay=function(t,n){return void 0===n&&(n=t,t=void 0),p(t).delay(n)},y.prototype.delay=function(t){return this.then(function(n){var e=l();return setTimeout(function(){e.resolve(n)},t),e.promise})},p.nfapply=function(t,n){return p(t).nfapply(n)},y.prototype.nfapply=function(t){var n=l(),e=K(t);return e.push(n.makeNodeResolver()),this.fapply(e).fail(n.reject),n.promise},p.nfcall=function(t){var n=K(arguments,1);return p(t).nfapply(n)},y.prototype.nfcall=function(){var t=K(arguments),n=l();return t.push(n.makeNodeResolver()),this.fapply(t).fail(n.reject),n.promise},p.nfbind=p.denodeify=function(t){var n=K(arguments,1);return function(){var e=n.concat(K(arguments)),r=l();return e.push(r.makeNodeResolver()),p(t).fapply(e).fail(r.reject),r.promise}},y.prototype.nfbind=y.prototype.denodeify=function(){var t=K(arguments);return t.unshift(this),p.denodeify.apply(void 0,t)},p.nbind=function(t,n){var e=K(arguments,2);return function(){function r(){return t.apply(n,arguments)}var o=e.concat(K(arguments)),i=l();return o.push(i.makeNodeResolver()),p(r).fapply(o).fail(i.reject),i.promise}},y.prototype.nbind=function(){var t=K(arguments,0);return t.unshift(this),p.nbind.apply(void 0,t)},p.nmapply=p.npost=function(t,n,e){return p(t).npost(n,e)},y.prototype.nmapply=y.prototype.npost=function(t,n){var e=K(n||[]),r=l();return e.push(r.makeNodeResolver()),this.dispatch("post",[t,e]).fail(r.reject),r.promise},p.nsend=p.nmcall=p.ninvoke=function(t,n){var e=K(arguments,2),r=l();return e.push(r.makeNodeResolver()),p(t).dispatch("post",[n,e]).fail(r.reject),r.promise},y.prototype.nsend=y.prototype.nmcall=y.prototype.ninvoke=function(t){var n=K(arguments,1),e=l();return n.push(e.makeNodeResolver()),this.dispatch("post",[t,n]).fail(e.reject),e.promise},p.nodeify=L,y.prototype.nodeify=function(t){return t?(this.then(function(n){J(function(){t(null,n)})},function(n){J(function(){t(n)})}),void 0):this};var ln=a();return p})}).call(this,t("/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"/home/admin/browserify-cdn/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":1}],4:[function(t,n,e){(function(t){"object"==typeof e?n.exports=t():window.QanimationFrame=t()})(function(){"use strict";var n=window.Q||t("q"),e=function(){return window.requestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}(),r=function(t){var r=n.defer();return e(function(){try{r.resolve(t())}catch(n){r.reject(n)}}),r.promise};return r})},{q:3}],5:[function(t,n){"use strict";function e(t){return t in a?a[t]:a[t]=r(t)}function r(t){var n,e=t.replace(/-([a-z])/g,function(t,n){return n.toUpperCase()}),r=c.length;if(void 0!==u[e])return e;for(e=o(t);r--;)if(n=c[r]+e,void 0!==u[n])return n;throw Error("unable to prefix "+t)}function o(t){return t.charAt(0).toUpperCase()+t.slice(1)}function i(t){var n=e(t),r=/([A-Z])/g;return r.test(n)&&(n=(s.test(n)?"-":"")+n.replace(r,"-$1")),n.toLowerCase()}var u=document.createElement("p").style,c="O ms Moz webkit".split(" "),s=/^(o|ms|moz|webkit)/,a={};n.exports=e,n.exports.dash=i},{}],hQPOJ8:[function(t,n){"use strict";var e=t("q"),r=t("qanimationframe"),o=t("vendor-prefix"),i=t("../src/normalize-transform-value"),u=t("../src/transition-shorthand-property"),c=o("transition"),s="WebkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",a=function(t){try{return t&&t.nodeType}catch(n){return!1}},f=function(t,n,e,r,i){var s=t.style[c];n=o.dash(n),t.style[c]=s?s+", "+u(n,r,i):u(n,r,i),t.style[o(n)]=e},p=function(t,n){t.style[c]=t.style[c].split(",").filter(function(t){return!t.match(n) | |
}).join(",")},l=function(t,n,e){return r(function(){return t.style[o.dash(n)]=e,t})},d=function(t,n,e){return t._zanimo&&t._zanimo.hasOwnProperty(n)&&(t._zanimo[n].defer.reject(Error("Zanimo transition with transform="+t._zanimo[n].value+" stopped by transform="+e)),t._zanimo[n].cb()),l(t,n,e)},h=function(t,n,u,c,a){var l,d=o.dash(n),h=e.defer(),y=function(e){l&&(clearTimeout(l),l=null),p(t,n),t.removeEventListener(s,v),e&&delete t._zanimo[n]},v=function(n){o(n.propertyName)===o(d)&&(y(!0),h.resolve(t))};return t.addEventListener(s,v),r(function(){f(t,n,u,c,a),l=setTimeout(function(){var e=t.style.getPropertyValue(d),r=i(e),o=i(u);y(!0),r===o?h.resolve(t):h.reject(Error("Zanimo transition: with "+n+" = "+o+", DOM value="+r))},c+20),t._zanimo=t._zanimo||{},t._zanimo[n]&&(t._zanimo[n].defer.reject(Error("Zanimo transition with "+n+"="+t._zanimo[n].value+" stopped by transition with "+n+"="+u)),t._zanimo[n].cb()),t._zanimo[n]={cb:y,value:u,defer:h}}),h.promise},y=function(t,n,r,i,u){var c=arguments,s=arguments.length;if(0===s||2===s||s>5)return e.reject(Error("Zanimo invalid arguments"));if(e.isPromise(t))return t.then(function(t){return y.apply(this,[t].concat(Array.prototype.slice.call(c,1)))});if(!a(t))return e.reject(Error("Zanimo require an HTMLElement, or a promise of an HTMLElement"));if(1===s)return e(t);try{o.dash(n)}catch(f){return e.reject(Error("Zanimo transition: "+n+" is not supported!"))}return 3===s?d(t,n,r):window.isNaN(parseInt(i,10))?e.reject(Error("Zanimo transition: duration must be an integer!")):h(t,n,r,i,u)};y.f=function(){var t=Array.prototype.slice.call(arguments);return function(n){return y.apply(this,[n].concat(t))}},n.exports=y},{"../src/normalize-transform-value":8,"../src/transition-shorthand-property":9,q:2,qanimationframe:4,"vendor-prefix":5}],zanimo:[function(t,n){n.exports=t("hQPOJ8")},{}],8:[function(t,n){"use strict";var e=/(\(.+?\))/g,r=/ +/g,o="",i=" ",u=/^0px$/g,c="0",s=function(t){var n=t.substr(1,t.length-2).split(","),e=[];return n.forEach(function(t){e.push(t.replace(r,o).replace(u,c))}),"("+e.join(",")+")"};n.exports=function(t){return null===t||void 0===t?o:window.isNaN(t)?t.replace(r,i).replace(e,s):""+t}},{}],9:[function(t,n){"use strict";var e=t("vendor-prefix"),r=t("./normalize-transform-value"),o=e.dash("transition"),i=document.createElement("div"),u="opacity 100ms linear 0s",c=r(u),s=function s(t,n,e){return t+" "+n+"ms "+(e||"linear")};i.style[o]=c,r(i.style[o])===c&&(s=function(t,n,e){return t+" "+n+"ms "+(e||"linear")+" 0s"}),n.exports=s},{"./normalize-transform-value":8,"vendor-prefix":5}]},{},[]),require=function e(t,n,r){function o(u,c){if(!n[u]){if(!t[u]){var s="function"==typeof require&&require;if(!c&&s)return s(u,!0);if(i)return i(u,!0);throw Error("Cannot find module '"+u+"'")}var a=n[u]={exports:{}};t[u][0].call(a.exports,function(n){var e=t[u][1][n];return o(e?e:n)},a,a.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;r.length>u;u++)o(r[u]);return o}({VW9Eis:[function(t,n){"use strict";function e(t){return t in a?a[t]:a[t]=r(t)}function r(t){var n,e=t.replace(/-([a-z])/g,function(t,n){return n.toUpperCase()}),r=c.length;if(void 0!==u[e])return e;for(e=o(t);r--;)if(n=c[r]+e,void 0!==u[n])return n;throw Error("unable to prefix "+t)}function o(t){return t.charAt(0).toUpperCase()+t.slice(1)}function i(t){var n=e(t),r=/([A-Z])/g;return r.test(n)&&(n=(s.test(n)?"-":"")+n.replace(r,"-$1")),n.toLowerCase()}var u=document.createElement("p").style,c="O ms Moz webkit".split(" "),s=/^(o|ms|moz|webkit)/,a={};n.exports=e,n.exports.dash=i},{}],"vendor-prefix":[function(t,n){n.exports=t("VW9Eis")},{}]},{},[]);var Zanimo=require("zanimo"),prefix=require("vendor-prefix"),elt=document.createElement("div");elt.style.height="100px",elt.style.width="800px",elt.style.position="absolute",elt.style.top="50px",elt.style.left="50px";var txt="Navigator: "+navigator.userAgent+"<br>";txt+="Setting a transition on an element with a timing function: cubic-bezier(.17,.67,.83,.67) <br>",Zanimo(elt,"transform","translate3d(20px, 40px, 30px)",200,"cubic-bezier(.17,.67,.83,.67)").then(function(t){txt+="Then echo the transition style attribute: "+t.style[prefix.dash("transition")],t.innerHTML=txt,document.body.appendChild(t)}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "requirebin-sketch", | |
"version": "1.0.0", | |
"dependencies": { | |
"zanimo": "1.1.0", | |
"vendor-prefix": "0.1.0" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; } | |
body, html { height: 100%; width: 100%; }</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment