PageSourceSearch

https://cdn.app.uniswap.org/assets/timestamp_pb-C0LRQrzF.js

js uniswap.org collected 2026-10-09 21:50:51 UTC 2,293 bytes, 1 lines download raw bytes

vendor: 2,293 bytes, line 1
1import{a,o as m,t as r}from"./proto3-CZsCbJxx.js";var i=class n extends m{constructor(e){super(),this.seconds=a.zero,this.nanos=0,r.util.initPartial(e,this)}fromJson(e,o){if(typeof e!="string")throw new Error(`cannot decode google.protobuf.Timestamp from JSON: ${r.json.debug(e)}`);const t=e.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!t)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const s=Date.parse(t[1]+"-"+t[2]+"-"+t[3]+"T"+t[4]+":"+t[5]+":"+t[6]+(t[8]?t[8]:"Z"));if(Number.isNaN(s))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(s<Date.parse("0001-01-01T00:00:00Z")||s>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=a.parse(s/1e3),this.nanos=0,t[7]&&(this.nanos=parseInt("1"+t[7]+"0".repeat(9-t[7].length))-1e9),this}toJson(e){const o=Number(this.seconds)*1e3;if(o<Date.parse("0001-01-01T00:00:00Z")||o>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let t="Z";if(this.nanos>0){const s=(this.nanos+1e9).toString().substring(1);s.substring(3)==="000000"?t="."+s.substring(0,3)+"Z":s.substring(6)==="000"?t="."+s.substring(0,6)+"Z":t="."+s+"Z"}return new Date(o).toISOString().replace(".000Z",t)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return n.fromDate(new Date)}static fromDate(e){const o=e.getTime();return new n({seconds:a.parse(Math.floor(o/1e3)),nanos:o%1e3*1e6})}static fromBinary(e,o){return new n().fromBinary(e,o)}static fromJson(e,o){return new n().fromJson(e,o)}static fromJsonString(e,o){return new n().fromJsonString(e,o)}static equals(e,o){return r.util.equals(n,e,o)}};i.runtime=r;i.typeName="google.protobuf.Timestamp";i.fields=r.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);export{i as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.