//>>built
define("dojox/uuid/generateTimeBasedUuid",["dojo/_base/lang","./_base"],function(h){dojox.uuid.generateTimeBasedUuid=function(d){return dojox.uuid.generateTimeBasedUuid._generator.generateUuidString(d)};dojox.uuid.generateTimeBasedUuid.isValidNode=function(d){var g=parseInt(d,16);return h.isString(d)&&12==d.length&&isFinite(g)};dojox.uuid.generateTimeBasedUuid.setNode=function(d){dojox.uuid.assert(null===d||this.isValidNode(d));this._uniformNode=d};dojox.uuid.generateTimeBasedUuid.getNode=function(){return this._uniformNode};
dojox.uuid.generateTimeBasedUuid._generator=new function(){function d(a){a[2]+=a[3]>>>16;a[3]&=65535;a[1]+=a[2]>>>16;a[2]&=65535;a[0]+=a[1]>>>16;a[1]&=65535;dojox.uuid.assert(0===a[0]>>>16)}function g(a){var c=[0,0,0,0];c[3]=a%65536;a-=c[3];a/=65536;c[2]=a%65536;a-=c[2];a/=65536;c[1]=a%65536;a-=c[1];c[0]=a/65536;return c}function k(a,c){dojox.uuid.assert(h.isArray(a));dojox.uuid.assert(h.isArray(c));dojox.uuid.assert(4==a.length);dojox.uuid.assert(4==c.length);var b=!1;0!==a[0]*c[0]&&(b=!0);0!==a[0]*
c[1]&&(b=!0);0!==a[0]*c[2]&&(b=!0);0!==a[1]*c[0]&&(b=!0);0!==a[1]*c[1]&&(b=!0);0!==a[2]*c[0]&&(b=!0);dojox.uuid.assert(!b);b=[0,0,0,0];b[0]+=a[0]*c[3];d(b);b[0]+=a[1]*c[2];d(b);b[0]+=a[2]*c[1];d(b);b[0]+=a[3]*c[0];d(b);b[1]+=a[1]*c[3];d(b);b[1]+=a[2]*c[2];d(b);b[1]+=a[3]*c[1];d(b);b[2]+=a[2]*c[3];d(b);b[2]+=a[3]*c[2];d(b);b[3]+=a[3]*c[3];d(b);return b}function j(a,c){for(;a.length<c;)a="0"+a;return a}this.GREGORIAN_CHANGE_OFFSET_IN_HOURS=3394248;var l=null,m=null,n=null,i=0,o=null,p=null;this.generateUuidString=
function(a){if(a)dojox.uuid.assert(dojox.uuid.generateTimeBasedUuid.isValidNode(a));else if(dojox.uuid.generateTimeBasedUuid._uniformNode)a=dojox.uuid.generateTimeBasedUuid._uniformNode;else{if(!l){for(var a=(32768|Math.floor(Math.random()%1*Math.pow(2,15))).toString(16),c=Math.floor(Math.random()%1*Math.pow(2,32)).toString(16);8>c.length;)c="0"+c;l=a+c}a=l}m||(m=(32768|Math.floor(Math.random()%1*Math.pow(2,14))).toString(16));var c=new Date,b=g(c.valueOf());if(!o){var e=g(3600),f=g(dojox.uuid.generateTimeBasedUuid._generator.GREGORIAN_CHANGE_OFFSET_IN_HOURS),
e=k(f,e),f=g(1E3);o=k(e,f);p=g(1E4)}e=o;dojox.uuid.assert(h.isArray(e));dojox.uuid.assert(h.isArray(b));dojox.uuid.assert(4==e.length);dojox.uuid.assert(4==b.length);f=[0,0,0,0];f[3]=e[3]+b[3];f[2]=e[2]+b[2];f[1]=e[1]+b[1];f[0]=e[0]+b[0];d(f);b=k(f,p);if(c.valueOf()==n){if(b[3]+=i,d(b),i+=1,1E4==i)for(;c.valueOf()==n;)c=new Date}else n=c.valueOf(),i=1;c=b[2].toString(16);e=b[3].toString(16);c=j(c,4)+j(e,4);e=b[1].toString(16);e=j(e,4);b=b[0].toString(16);b=j(b,3);a=c+"-"+e+"-1"+b+"-"+m+"-"+a;return a=
a.toLowerCase()}};return dojox.uuid.generateTimeBasedUuid});