PageSourceSearch

https://www.homezero.md/_next/static/chunks/1mmgngbpjzwtz.js

js homezero.md collected 2026-10-02 02:02:19 UTC 9,212 bytes, 2 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,883394,13413,e=>{"use strict";e.i(790798);var t=e.i(88218),r=e.i(1737),s=e.i(614001),i=e.i(803697);function n(e,t){if("u"<typeof Convex||void 0===Convex.syscall)throw Error("The Convex database and auth objects are being used outside of a Convex backend. Did you mean to use `useQuery` or `useMutation` to call a Convex function?");return JSON.parse(Convex.syscall(e,JSON.stringify(t)))}async function a(e,r){let s;if("u"<typeof Convex||void 0===Convex.asyncSyscall)throw Error("The Convex database and auth objects are being used outside of a Convex backend. Did you mean to use `useQuery` or `useMutation` to call a Convex function?");try{s=await Convex.asyncSyscall(e,JSON.stringify(r))}catch(e){if(void 0!==e.data){let r=new i.ConvexError(e.message);throw r.data=(0,t.jsonToConvex)(e.data),r}throw Error(e.message)}return JSON.parse(s)}e.i(202082);var o=e.i(39197);function l(e,t,r,s){if(void 0===e)throw TypeError(`Must provide arg ${t} \`${s}\` to \`${r}\``)}var d=Object.defineProperty,u=(e,t,r)=>{let s;return(s="symbol"!=typeof t?t+"":t)in e?d(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r};class c{constructor(){u(this,"_isExpression"),u(this,"_value")}}var h=Object.defineProperty;class m extends c{constructor(e){super(),((e,t,r)=>{let s;return(s="symbol"!=typeof t?t+"":t)in e?h(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r})(this,"inner"),this.inner=e}serialize(){return this.inner}}function v(e){return e instanceof m?e.serialize():{$literal:(0,t.convexOrUndefinedToJson)(e)}}let y={eq:(e,t)=>new m({$eq:[v(e),v(t)]}),neq:(e,t)=>new m({$neq:[v(e),v(t)]}),lt:(e,t)=>new m({$lt:[v(e),v(t)]}),lte:(e,t)=>new m({$lte:[v(e),v(t)]}),gt:(e,t)=>new m({$gt:[v(e),v(t)]}),gte:(e,t)=>new m({$gte:[v(e),v(t)]}),add:(e,t)=>new m({$add:[v(e),v(t)]}),sub:(e,t)=>new m({$sub:[v(e),v(t)]}),mul:(e,t)=>
1new m({$mul:[v(e),v(t)]}),div:(e,t)=>new m({$div:[v(e),v(t)]}),mod:(e,t)=>new m({$mod:[v(e),v(t)]}),neg:e=>new m({$neg:v(e)}),and:(...e)=>new m({$and:e.map(v)}),or:(...e)=>new m({$or:e.map(v)}),not:e=>new m({$not:v(e)}),field:e=>new m({$field:e})};var p=Object.defineProperty,f=(e,t,r)=>{let s;return(s="symbol"!=typeof t?t+"":t)in e?p(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r};function b(e){throw Error("consumed"===e?"This query is closed and can't emit any more values.":"This query has been chained with another operator and can't be reused.")}class x{constructor(e){f(this,"state"),f(this,"tableNameForErrorMessages"),this.state={type:"preparing",query:e},"FullTableScan"===e.source.type?this.tableNameForErrorMessages=e.source.tableName:this.tableNameForErrorMessages=e.source.indexName.split(".")[0]}takeQuery(){if("preparing"!==this.state.type)throw Error("A query can only be chained once and can't be chained after iteration begins.");let e=this.state.query;return this.state={type:"closed"},e}startQuery(){if("executing"===this.state.type)throw Error("Iteration can only begin on a query once.");("closed"===this.state.type||"consumed"===this.state.type)&&b(this.state.type);let{queryId:e}=n("1.0/queryStream",{query:this.state.query,version:s.version});return this.state={type:"executing",queryId:e},e}closeQuery(){"executing"===this.state.type&&n("1.0/queryCleanup",{queryId:this.state.queryId}),this.state={type:"consumed"}}order(e){l(e,1,"order","order");let t=this.takeQuery();if("Search"===t.source.type)throw Error("Search queries must always be in relevance order. Can not set order manually.");if(null!==t.source.order)throw Error("Queries may only specify order at most once");return t.source.order=e,new x(t)}filter(e){l(e,1,"filter","predicate");let t=this.takeQuery();if(t.operators.length>=256)throw Error("Can't construct query with more than 256 operators");return t.operators.push({filter:v(e(y))}),new x(t)}limit(e){l(e,1,"limit","n");let t=this.takeQuery();return t.operators.push({limit:e}),new x(t)}[Symbol.asyncIterator](){return this.startQuery(),this}async next(){("closed"===this.state.type||"consumed"===this.state.type)&&b(this.state.type);let e="preparing"===this.state.type?this.startQuery():this.state.queryId,{value:r,done:s}=await a("1.0/queryStreamNext",{queryId:e});return s&&this.closeQuery(),{value:(0,t.jsonToConvex)(r),done:s}}return(){return this.closeQuery(),Promise.resolve({done:!0,value:void 0})}async paginate(e){if(l(e,1,"paginate","options"),"number"!=typeof e?.numItems||e.numItems<0)throw Error(`\`options.numItems\` must be a positive number. Received \`${e?.numItems}\`.`);let r=this.takeQuery(),i=e.numItems,n=e.cursor,o=e?.endCursor??null,d=e.maximumRowsRead??null,{page:u,isDone:c,continueCursor:h,splitCursor:m,pageStatus:v}=await a("1.0/queryPage",{query:r,cursor:n,endCursor:o,pageSize:i,maximumRowsRead:d,maximumBytesRead:e.maximumBytesRead,version:s.version});return{page:u.map(e=>(0,t.jsonToConvex)(e)),isDone:c,continueCursor:h,splitCursor:m,pageStatus:v}}async collect(){let e=[];for await(let t of this)e.push(t);return e}async take(e){l(e,1,"take","n");if(!Number.isInteger(e)||e<0)throw TypeError("Arg 1 `n` to `take` must be a non-negative integer");return this.limit(e).collect()}async first(){let e=await this.take(1);return 0===e.length?null:e[0]}async unique(){let e=await this.take(2);if(0===e.length)return null;if(2===e.length)throw Error(`unique() query returned more than one result from table ${this.tableNameForErrorMessages}:
2 [${e[0]._id}, ${e[1]._id}, ...]`);return e[0]}}r.v.object({numItems:r.v.number(),cursor:r.v.union(r.v.string(),r.v.null()),endCursor:r.v.optional(r.v.union(r.v.string(),r.v.null())),id:r.v.optional(r.v.number()),maximumRowsRead:r.v.optional(r.v.number()),maximumBytesRead:r.v.optional(r.v.number())});var g=e.i(162849),w=Object.defineProperty;Symbol("var.requestId"),Symbol("var.ip"),Symbol("var.userAgent"),Symbol("var.now");var I=Object.defineProperty,$=(e,t,r)=>{let s;return(s="symbol"!=typeof t?t+"":t)in e?I(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r};class C{constructor(e){$(this,"indexes"),$(this,"stagedDbIndexes"),$(this,"searchIndexes"),$(this,"stagedSearchIndexes"),$(this,"vectorIndexes"),$(this,"stagedVectorIndexes"),$(this,"validator"),this.indexes=[],this.stagedDbIndexes=[],this.searchIndexes=[],this.stagedSearchIndexes=[],this.vectorIndexes=[],this.stagedVectorIndexes=[],this.validator=e}" indexes"(){return this.indexes}index(e,t){return Array.isArray(t)?this.indexes.push({indexDescriptor:e,fields:t}):t.staged?this.stagedDbIndexes.push({indexDescriptor:e,fields:t.fields}):this.indexes.push({indexDescriptor:e,fields:t.fields}),this}searchIndex(e,t){return t.staged?this.stagedSearchIndexes.push({indexDescriptor:e,searchField:t.searchField,filterFields:t.filterFields||[]}):this.searchIndexes.push({indexDescriptor:e,searchField:t.searchField,filterFields:t.filterFields||[]}),this}
2vectorIndex(e,t){return t.staged?this.stagedVectorIndexes.push({indexDescriptor:e,vectorField:t.vectorField,dimensions:t.dimensions,filterFields:t.filterFields||[]}):this.vectorIndexes.push({indexDescriptor:e,vectorField:t.vectorField,dimensions:t.dimensions,filterFields:t.filterFields||[]}),this}self(){return this}export(){let e=this.validator.json;if("object"!=typeof e)throw Error("Invalid validator: please make sure that the parameter of `defineTable` is valid (see https://docs.convex.dev/database/schemas)");return{indexes:this.indexes,stagedDbIndexes:this.stagedDbIndexes,searchIndexes:this.searchIndexes,stagedSearchIndexes:this.stagedSearchIndexes,vectorIndexes:this.vectorIndexes,stagedVectorIndexes:this.stagedVectorIndexes,documentType:e}}}function q(e){return new C((0,r.isValidator)(e)?e:r.v.object(e))}new class e{constructor(e,t){$(this,"tables"),$(this,"strictTableNameTypes"),$(this,"schemaValidation"),this.tables=e,this.schemaValidation=t?.schemaValidation===void 0||t.schemaValidation}export(){return JSON.stringify({tables:Object.entries(this.tables).map(([e,t])=>{let{indexes:r,stagedDbIndexes:s,searchIndexes:i,stagedSearchIndexes:n,vectorIndexes:a,stagedVectorIndexes:o,documentType:l}=t.export();return{tableName:e,indexes:r,stagedDbIndexes:s,searchIndexes:i,stagedSearchIndexes:n,vectorIndexes:a,stagedVectorIndexes:o,documentType:l}}),schemaValidation:this.schemaValidation})}}({_scheduled_functions:q({name:r.v.string(),args:r.v.array(r.v.any()),scheduledTime:r.v.float64(),completedTime:r.v.optional(r.v.float64()),state:r.v.union(r.v.object({kind:r.v.literal("pending")}),r.v.object({kind:r.v.literal("inProgress")}),r.v.object({kind:r.v.literal("success")}),r.v.object({kind:r.v.literal("failed"),error:r.v.string()}),r.v.object({kind:r.v.literal("canceled")}))}),_storage:q({sha256:r.v.string(),size:r.v.float64(),contentType:r.v.optional(r.v.string())})},void 0),e.s([],13413);let j=g.anyApi;g.anyApi,function e(t,r){return new Proxy({},{get(s,i){if("string"==typeof i)return e(t,[...r,i]);if(i===o.toReferencePath){if(r.length<1){let e=[t,...r].join(".");throw Error(`API path is expected to be of the form \`${t}.childComponent.functionName\`. Found: \`${e}\``)}return"_reference/childComponent/"+r.join("/")}}})}("components",[]),e.s(["api",0,j],883394)}]);

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.