lib/har/viewer/scripts/preview/ref.js in har-0.0.9 vs lib/har/viewer/scripts/preview/ref.js in har-0.1.0
- old
+ new
@@ -1,5 +2 @@
-require.def("preview/ref",["core/lib"],function(x){return{resolveJson:function(i,f){function m(d,p,e,j,a){var n,b;e=q in d?d[q]:e;if(e!==undefined)e=(r+e).replace(s,"$2$3");a=a||d;if(e!==undefined){if(y)d.__id=e;if(f.schemas&&!(d instanceof Array)&&(b=e.match(/^(.+\/)[^\.\[]*$/)))j=f.schemas[b[1]];if(g[e]&&d instanceof Array==g[e]instanceof Array){a=g[e];delete a.$ref;n=true}else if(b=j&&j.prototype){t.prototype=b;a=new t}g[e]=a;if(u)u[e]=f.time}j=j&&j.properties;var z=d.length;for(var c in d){if(c==
-z)break;if(d.hasOwnProperty(c)){b=d[c];var h=j&&j[c];if(h&&h.format=="date-time"&&typeof b=="string")b=x.fromISOString(b);else if(typeof b=="object"&&b&&!(b instanceof Date))if(k=b.$ref){delete d[c];var l=k.replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);if(k=l[1]=="$"||l[1]=="this"||l[1]==""?i:g[(r+l[1]).replace(s,"$2$3")])l[3]&&l[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(C,D,v,E,A){k=k&&k[v?v.replace(/[\"\'\\]/,""):A]});if(k)b=k;else if(p){b=m(b,false,b.$ref,
-h);b._loadObject=f.loader}else{var w;w||o.push(a);w=true}}else p||(b=m(b,o==d,e&&B(e,c),h,a!=d&&typeof a[c]=="object"&&a[c]));d[c]=b;if(a!=d&&!a.__isDirty){h=a[c];a[c]=b;n&&b!==h&&!a._loadObject&&!(b instanceof Date&&h instanceof Date&&b.getTime()==h.getTime())&&!(typeof b=="function"&&typeof h=="function"&&b.toString()==h.toString())&&g.onUpdate&&g.onUpdate(a,c,h,b)}}}if(n)for(c in a){if(!a.__isDirty&&a.hasOwnProperty(c)&&!d.hasOwnProperty(c)&&c!="__id"&&c!="__clientId"&&!(a instanceof Array&&isNaN(c))){g.onUpdate&&
-c!="_loadObject"&&c!="_idAttr"&&g.onUpdate(a,c,a[c],undefined);for(delete a[c];a instanceof Array&&a.length&&a[a.length-1]===undefined;)a.length--}}else g.onLoad&&g.onLoad(a);return a}f=f||{};var q=f.idAttribute||"id",r=f.idPrefix||"",y=f.assignAbsoluteIds,g=f.index||{},u=f.timeStamps,k,o=[],s=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,B=this._addProp,t=function(){};if(i&&typeof i=="object"){i=m(i,false,f.defaultId);m(o,false)}return i},_addProp:function(i,f){return i+(i.match(/#/)?i.length==
-1?"":".":"#")+f}}});
+require.def("preview/ref",["core/lib"],function(a){var b={resolveJson:function(b,c){function n(o,p,q,r,s){var t,u,v=d in o?o[d]:q;v!==undefined&&(v=(e+v).replace(k,"$2$3"));var w=s||o;if(v!==undefined){f&&(o.__id=v),c.schemas&&!(o instanceof Array)&&(u=v.match(/^(.+\/)[^\.\[]*$/))&&(r=c.schemas[u[1]]);if(g[v]&&o instanceof Array==g[v]instanceof Array)w=g[v],delete w.$ref,t=!0;else{var x=r&&r.prototype;x&&(m.prototype=x,w=new m)}g[v]=w,h&&(h[v]=c.time)}var y=r&&r.properties,z=o.length;for(var A in o){if(A==z)break;if(o.hasOwnProperty(A)){u=o[A];var B=y&&y[A];if(B&&B.format=="date-time"&&typeof u=="string")u=a.fromISOString(u);else if(typeof u=="object"&&u&&!(u instanceof Date)){i=u.$ref;if(i){delete o[A];var C=i.replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/);if(i=C[1]=="$"||C[1]=="this"||C[1]==""?b:g[(e+C[1]).replace(k,"$2$3")])C[3]&&C[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(a,b,c,d,e){i=i&&i[c?c.replace(/[\"\'\\]/,""):e]});if(i)u=i;else if(p)u=n(u,!1,u.$ref,B),u._loadObject=c.loader;else{var D;D||j.push(w),D=!0}}else p||(u=n(u,j==o,v&&l(v,A),B,w!=o&&typeof w[A]=="object"&&w[A]))}o[A]=u;if(w!=o&&!w.__isDirty){var E=w[A];w[A]=u,t&&u!==E&&!w._loadObject&&!(u instanceof Date&&E instanceof Date&&u.getTime()==E.getTime())&&(typeof u!="function"||typeof E!="function"||u.toString()!=E.toString())&&g.onUpdate&&g.onUpdate(w,A,E,u)}}}if(t){for(A in w)if(!w.__isDirty&&w.hasOwnProperty(A)&&!o.hasOwnProperty(A)&&A!="__id"&&A!="__clientId"&&!(w instanceof Array&&isNaN(A))){g.onUpdate&&A!="_loadObject"&&A!="_idAttr"&&g.onUpdate(w,A,w[A],undefined),delete w[A];while(w instanceof Array&&w.length&&w[w.length-1]===undefined)w.length--}}else g.onLoad&&g.onLoad(w);return w}c=c||{};var d=c.idAttribute||"id",e=c.idPrefix||"",f=c.assignAbsoluteIds,g=c.index||{},h=c.timeStamps,i,j=[],k=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,l=this._addProp,m=function(){};b&&typeof b=="object"&&(b=n(b,!1,c.defaultId),n(j,!1));return b},_addProp:function(a,b){return a+(a.match(/#/)?a.length==1?"":".":"#")+b}};return b})
\ No newline at end of file