@webitel/api-services 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +42 -26
- package/src/api/clients/_shared/generatePermissionsApi.ts +4 -3
- package/src/api/clients/agents/agentChats.ts +5 -7
- package/src/api/clients/agents/agents.ts +4 -3
- package/src/api/clients/buckets/buckets.ts +4 -3
- package/src/api/clients/calendars/calendars.ts +4 -3
- package/src/api/clients/caseCloseReasonGroups/caseCloseReasonGroups.ts +4 -3
- package/src/api/clients/caseCloseReasons/caseCloseReasons.ts +4 -3
- package/src/api/clients/casePriorities/casePriorities.ts +4 -3
- package/src/api/clients/caseServiceCatalogs/serviceCatalogs.ts +9 -9
- package/src/api/clients/caseServices/services.ts +4 -3
- package/src/api/clients/caseSources/caseSources.ts +8 -12
- package/src/api/clients/caseStatusConditions/caseStatusConditions.ts +6 -5
- package/src/api/clients/caseStatuses/caseStatuses.ts +4 -3
- package/src/api/clients/catalog/catalog.ts +2 -5
- package/src/api/clients/chatGateways/chatGateways.ts +2 -2
- package/src/api/clients/communications/communications.ts +9 -7
- package/src/api/clients/configurations/configurations.ts +4 -3
- package/src/api/clients/contactGroups/contactGroups.ts +4 -3
- package/src/api/clients/flows/flow.ts +4 -3
- package/src/api/clients/gateways/gateways.ts +4 -3
- package/src/api/clients/history/transcript/callTranscript.ts +79 -0
- package/src/api/clients/index.ts +34 -68
- package/src/api/clients/labels/labels.ts +4 -3
- package/src/api/clients/lists/blacklists.ts +4 -3
- package/src/api/clients/media/media.ts +4 -3
- package/src/api/clients/object/object.ts +4 -3
- package/src/api/clients/queues/queues.ts +5 -4
- package/src/api/clients/quickReplies/quickReplies.ts +8 -12
- package/src/api/clients/roles/roles.ts +4 -3
- package/src/api/clients/skills/skills.ts +4 -3
- package/src/api/clients/slaConditions/slaConditions.ts +4 -3
- package/src/api/clients/slas/slas.ts +4 -3
- package/src/api/clients/teams/teams.ts +4 -3
- package/src/api/clients/users/users.ts +4 -3
- package/src/api/clients/wtTypes/index.ts +2 -0
- package/src/api/clients/wtTypes/sysTypes/sysTypes.ts +2 -1
- package/src/api/clients/wtTypes/typeExtensions/typeExtensions.ts +3 -2
- package/src/api/clients//321/201ontacts/contactChatMessagesHistory.ts +5 -7
- package/src/api/clients//321/201ontacts/contacts.ts +5 -4
- package/src/api/clients//321/201ontacts/enums/ContactsSearchMode.ts +1 -3
- package/src/api/clients//321/201ontacts/index.ts +3 -5
- package/src/api/defaults/index.ts +4 -11
- package/src/api/interceptors/request/index.ts +1 -1
- package/src/api/interceptors/response/index.ts +1 -1
- package/src/api/transformers/camelToSnake/camelToSnake.transformer.ts +1 -1
- package/src/api/transformers/notify/notify.transformer.ts +3 -3
- package/src/api/transformers/snakeToCamel/snakeToCamel.transformer.ts +1 -1
- package/src/api/transformers/starToSearch/starToSearch.transformer.ts +2 -4
- package/src/config/config.ts +13 -0
- package/src/gen/_docs/.nojekyll +1 -0
- package/src/gen/_docs/html/assets/hierarchy.js +1 -1
- package/src/gen/_docs/html/assets/highlight.css +101 -76
- package/src/gen/_docs/html/assets/icons.js +20 -17
- package/src/gen/_docs/html/assets/main.js +2503 -6
- package/src/gen/_docs/html/assets/navigation.js +2 -1
- package/src/gen/_docs/html/assets/search.js +2 -1
- package/src/gen/_docs/html/assets/style.css +1623 -1634
- package/src/index.ts +2 -2
- package/src/utils/api/caseConverters.ts +77 -0
- package/src/utils/api/index.ts +1 -0
- package/src/utils/gen/index.ts +19 -1
- package/src/utils/index.ts +1 -20
- package/types/api/clients/caseStatusConditions/caseStatusConditions.d.ts +2 -1
- package/types/api/clients/history/transcript/callTranscript.d.ts +11 -0
- package/types/api/clients/index.d.ts +31 -33
- package/types/api/clients/media/media.d.ts +2 -2
- package/types/api/clients/wtTypes/index.d.ts +2 -0
- package/types/api/clients/wtTypes/typeExtensions/typeExtensions.d.ts +1 -1
- package/types/api/clients//321/201ontacts/enums/ContactsSearchMode.d.ts +1 -2
- package/types/api/clients//321/201ontacts/index.d.ts +3 -4
- package/types/api/defaults/index.d.ts +4 -5
- package/types/api/interceptors/request/index.d.ts +1 -1
- package/types/api/interceptors/response/index.d.ts +1 -1
- package/types/config/config.d.ts +7 -0
- package/types/gen/_models/casesCaseCustom.d.ts +12 -0
- package/types/gen/_models/casesInputCaseCustom.d.ts +12 -0
- package/types/gen/_models/casesInputCreateCaseCustom.d.ts +12 -0
- package/types/gen/_models/engineTriggerObjectType.d.ts +1 -0
- package/types/gen/_models/fileServiceSearchFilesChannelItem.d.ts +2 -0
- package/types/gen/_models/protobufNullValue.d.ts +18 -0
- package/types/gen/_models/storageUploadFileChannel.d.ts +2 -0
- package/types/gen/file-policies-service/file-policies-service.zod.gen.d.ts +18 -0
- package/types/gen/file-service/file-service.api.gen.d.ts +3 -1
- package/types/gen/file-service/file-service.msw.api.gen.d.ts +3 -1
- package/types/gen/file-service/file-service.zod.gen.d.ts +18 -0
- package/types/gen/trigger-service/trigger-service.zod.gen.d.ts +9 -0
- package/types/index.d.ts +2 -2
- package/types/utils/api/caseConverters.d.ts +9 -0
- package/types/utils/api/index.d.ts +1 -0
- package/types/utils/index.d.ts +1 -7
- package/types/gen/_models/googleRpcStatus.d.ts +0 -12
- package/types/gen/_models/webitelCasesStatus.d.ts +0 -16
|
@@ -1,9 +1,2506 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r<n;r++){for(var i=this._stack[r],s=[],o=0;o<e.length;o++){var a=i(e[o],o,e);if(!(a==null||a===""))if(Array.isArray(a))for(var c=0;c<a.length;c++)s.push(a[c]);else s.push(a)}e=s}return e},t.Pipeline.prototype.runString=function(e,n){var r=new t.Token(e,n);return this.run([r]).map(function(i){return i.toString()})},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})};t.Vector=function(e){this._magnitude=0,this.elements=e||[]},t.Vector.prototype.positionForIndex=function(e){if(this.elements.length==0)return 0;for(var n=0,r=this.elements.length/2,i=r-n,s=Math.floor(i/2),o=this.elements[s*2];i>1&&(o<e&&(n=s),o>e&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(o<e)return(s+1)*2},t.Vector.prototype.insert=function(e,n){this.upsert(e,n,function(){throw"duplicate index"})},t.Vector.prototype.upsert=function(e,n,r){this._magnitude=0;var i=this.positionForIndex(e);this.elements[i]==e?this.elements[i+1]=r(this.elements[i+1],n):this.elements.splice(i,0,e,n)},t.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,n=this.elements.length,r=1;r<n;r+=2){var i=this.elements[r];e+=i*i}return this._magnitude=Math.sqrt(e)},t.Vector.prototype.dot=function(e){for(var n=0,r=this.elements,i=e.elements,s=r.length,o=i.length,a=0,c=0,l=0,d=0;l<s&&d<o;)a=r[l],c=i[d],a<c?l+=2:a>c?d+=2:a==c&&(n+=r[l+1]*i[d+1],l+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n<this.elements.length;n+=2,r++)e[r]=this.elements[n];return e},t.Vector.prototype.toJSON=function(){return this.elements};t.stemmer=function(){var e={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},n={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},r="[^aeiou]",i="[aeiouy]",s=r+"[^aeiouy]*",o=i+"[aeiou]*",a="^("+s+")?"+o+s,c="^("+s+")?"+o+s+"("+o+")?$",l="^("+s+")?"+o+s+o+s,d="^("+s+")?"+i,f=new RegExp(a),p=new RegExp(l),v=new RegExp(c),x=new RegExp(d),w=/^(.+?)(ss|i)es$/,m=/^(.+?)([^s])s$/,g=/^(.+?)eed$/,T=/^(.+?)(ed|ing)$/,L=/.$/,C=/(at|bl|iz)$/,O=new RegExp("([^aeiouylsz])\\1$"),j=new RegExp("^"+s+i+"[^aeiouwxy]$"),N=/^(.+?[^aeiou])y$/,q=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,W=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,B=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,z=/^(.+?)(s|t)(ion)$/,_=/^(.+?)e$/,U=/ll$/,J=new RegExp("^"+s+i+"[^aeiouwxy]$"),V=function(u){var y,P,k,h,E,Q,H;if(u.length<3)return u;if(k=u.substr(0,1),k=="y"&&(u=k.toUpperCase()+u.substr(1)),h=w,E=m,h.test(u)?u=u.replace(h,"$1$2"):E.test(u)&&(u=u.replace(E,"$1$2")),h=g,E=T,h.test(u)){var b=h.exec(u);h=f,h.test(b[1])&&(h=L,u=u.replace(h,""))}else if(E.test(u)){var b=E.exec(u);y=b[1],E=x,E.test(y)&&(u=y,E=C,Q=O,H=j,E.test(u)?u=u+"e":Q.test(u)?(h=L,u=u.replace(h,"")):H.test(u)&&(u=u+"e"))}if(h=N,h.test(u)){var b=h.exec(u);y=b[1],u=y+"i"}if(h=q,h.test(u)){var b=h.exec(u);y=b[1],P=b[2],h=f,h.test(y)&&(u=y+e[P])}if(h=W,h.test(u)){var b=h.exec(u);y=b[1],P=b[2],h=f,h.test(y)&&(u=y+n[P])}if(h=B,E=z,h.test(u)){var b=h.exec(u);y=b[1],h=p,h.test(y)&&(u=y)}else if(E.test(u)){var b=E.exec(u);y=b[1]+b[2],E=p,E.test(y)&&(u=y)}if(h=_,h.test(u)){var b=h.exec(u);y=b[1],h=p,E=v,Q=J,(h.test(y)||E.test(y)&&!Q.test(y))&&(u=y)}return h=U,E=p,h.test(u)&&E.test(u)&&(h=L,u=u.replace(h,"")),k=="y"&&(u=k.toLowerCase()+u.substr(1)),u};return function(A){return A.update(V)}}(),t.Pipeline.registerFunction(t.stemmer,"stemmer");t.generateStopWordFilter=function(e){var n=e.reduce(function(r,i){return r[i]=i,r},{});return function(r){if(r&&n[r.toString()]!==r.toString())return r}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter");t.trimmer=function(e){return e.update(function(n){return n.replace(/^\W+/,"").replace(/\W+$/,"")})},t.Pipeline.registerFunction(t.trimmer,"trimmer");t.TokenSet=function(){this.final=!1,this.edges={},this.id=t.TokenSet._nextId,t.TokenSet._nextId+=1},t.TokenSet._nextId=1,t.TokenSet.fromArray=function(e){for(var n=new t.TokenSet.Builder,r=0,i=e.length;r<i;r++)n.insert(e[r]);return n.finish(),n.root},t.TokenSet.fromClause=function(e){return"editDistance"in e?t.TokenSet.fromFuzzyString(e.term,e.editDistance):t.TokenSet.fromString(e.term)},t.TokenSet.fromFuzzyString=function(e,n){for(var r=new t.TokenSet,i=[{node:r,editsRemaining:n,str:e}];i.length;){var s=i.pop();if(s.str.length>0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var c=s.node.edges["*"];else{var c=new t.TokenSet;s.node.edges["*"]=c}if(s.str.length==0&&(c.final=!0),i.push({node:c,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}s.str.length==1&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),f=s.str.charAt(1),p;f in s.node.edges?p=s.node.edges[f]:(p=new t.TokenSet,s.node.edges[f]=p),s.str.length==1&&(p.final=!0),i.push({node:p,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i<s;i++){var o=e[i],a=i==s-1;if(o=="*")n.edges[o]=n,n.final=a;else{var c=new t.TokenSet;c.final=a,n.edges[o]=c,n=c}}return r},t.TokenSet.prototype.toArray=function(){for(var e=[],n=[{prefix:"",node:this}];n.length;){var r=n.pop(),i=Object.keys(r.node.edges),s=i.length;r.node.final&&(r.prefix.charAt(0),e.push(r.prefix));for(var o=0;o<s;o++){var a=i[o];n.push({prefix:r.prefix.concat(a),node:r.node.edges[a]})}}return e},t.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",n=Object.keys(this.edges).sort(),r=n.length,i=0;i<r;i++){var s=n[i],o=this.edges[s];e=e+s+o.id}return e},t.TokenSet.prototype.intersect=function(e){for(var n=new t.TokenSet,r=void 0,i=[{qNode:e,output:n,node:this}];i.length;){r=i.pop();for(var s=Object.keys(r.qNode.edges),o=s.length,a=Object.keys(r.node.edges),c=a.length,l=0;l<o;l++)for(var d=s[l],f=0;f<c;f++){var p=a[f];if(p==d||d=="*"){var v=r.node.edges[p],x=r.qNode.edges[d],w=v.final&&x.final,m=void 0;p in r.output.edges?(m=r.output.edges[p],m.final=m.final||w):(m=new t.TokenSet,m.final=w,r.output.edges[p]=m),i.push({qNode:x,output:m,node:v})}}}return n},t.TokenSet.Builder=function(){this.previousWord="",this.root=new t.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},t.TokenSet.Builder.prototype.insert=function(e){var n,r=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<e.length&&i<this.previousWord.length&&e[i]==this.previousWord[i];i++)r++;this.minimize(r),this.uncheckedNodes.length==0?n=this.root:n=this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(var i=r;i<e.length;i++){var s=new t.TokenSet,o=e[i];n.edges[o]=s,this.uncheckedNodes.push({parent:n,char:o,child:s}),n=s}n.final=!0,this.previousWord=e},t.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},t.TokenSet.Builder.prototype.minimize=function(e){for(var n=this.uncheckedNodes.length-1;n>=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),c=0;c<this.fields.length;c++)i[this.fields[c]]=new t.Vector;e.call(n,n);for(var c=0;c<n.clauses.length;c++){var l=n.clauses[c],d=null,f=t.Set.empty;l.usePipeline?d=this.pipeline.runString(l.term,{fields:l.fields}):d=[l.term];for(var p=0;p<d.length;p++){var v=d[p];l.term=v;var x=t.TokenSet.fromClause(l),w=this.tokenSet.intersect(x).toArray();if(w.length===0&&l.presence===t.Query.presence.REQUIRED){for(var m=0;m<l.fields.length;m++){var g=l.fields[m];o[g]=t.Set.empty}break}for(var T=0;T<w.length;T++)for(var L=w[T],C=this.invertedIndex[L],O=C._index,m=0;m<l.fields.length;m++){var g=l.fields[m],j=C[g],N=Object.keys(j),q=L+"/"+g,W=new t.Set(N);if(l.presence==t.Query.presence.REQUIRED&&(f=f.union(W),o[g]===void 0&&(o[g]=t.Set.complete)),l.presence==t.Query.presence.PROHIBITED){a[g]===void 0&&(a[g]=t.Set.empty),a[g]=a[g].union(W);continue}if(i[g].upsert(O,l.boost,function(Ue,Je){return Ue+Je}),!s[q]){for(var B=0;B<N.length;B++){var z=N[B],_=new t.FieldRef(z,g),U=j[z],J;(J=r[_])===void 0?r[_]=new t.MatchData(L,g,U):J.add(L,g,U)}s[q]=!0}}}if(l.presence===t.Query.presence.REQUIRED)for(var m=0;m<l.fields.length;m++){var g=l.fields[m];o[g]=o[g].intersect(f)}}for(var V=t.Set.complete,A=t.Set.empty,c=0;c<this.fields.length;c++){var g=this.fields[c];o[g]&&(V=V.intersect(o[g])),a[g]&&(A=A.union(a[g]))}var u=Object.keys(r),y=[],P=Object.create(null);if(n.isNegated()){u=Object.keys(this.fieldVectors);for(var c=0;c<u.length;c++){var _=u[c],k=t.FieldRef.fromString(_);r[_]=new t.MatchData}}for(var c=0;c<u.length;c++){var k=t.FieldRef.fromString(u[c]),h=k.docRef;if(V.contains(h)&&!A.contains(h)){var E=this.fieldVectors[k],Q=i[k.fieldName].similarity(E),H;if((H=P[h])!==void 0)H.score+=Q,H.matchData.combine(r[k]);else{var b={ref:h,score:Q,matchData:r[k]};P[h]=b,y.push(b)}}}return y.sort(function(We,ze){return ze.score-We.score})},t.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map(function(r){return[r,this.invertedIndex[r]]},this),n=Object.keys(this.fieldVectors).map(function(r){return[r,this.fieldVectors[r].toJSON()]},this);return{version:t.version,fields:this.fields,fieldVectors:n,invertedIndex:e,pipeline:this.pipeline.toJSON()}},t.Index.load=function(e){var n={},r={},i=e.fieldVectors,s=Object.create(null),o=e.invertedIndex,a=new t.TokenSet.Builder,c=t.Pipeline.load(e.pipeline);e.version!=t.version&&t.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+t.version+"' does not match serialized index '"+e.version+"'");for(var l=0;l<i.length;l++){var d=i[l],f=d[0],p=d[1];r[f]=new t.Vector(p)}for(var l=0;l<o.length;l++){var d=o[l],v=d[0],x=d[1];a.insert(v),s[v]=x}return a.finish(),n.fields=e.fields,n.fieldVectors=r,n.invertedIndex=s,n.tokenSet=a.root,n.pipeline=c,new t.Index(n)};t.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=t.tokenizer,this.pipeline=new t.Pipeline,this.searchPipeline=new t.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},t.Builder.prototype.ref=function(e){this._ref=e},t.Builder.prototype.field=function(e,n){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=n||{}},t.Builder.prototype.b=function(e){e<0?this._b=0:e>1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s<i.length;s++){var o=i[s],a=this._fields[o].extractor,c=a?a(e):e[o],l=this.tokenizer(c,{fields:[o]}),d=this.pipeline.run(l),f=new t.FieldRef(r,o),p=Object.create(null);this.fieldTermFrequencies[f]=p,this.fieldLengths[f]=0,this.fieldLengths[f]+=d.length;for(var v=0;v<d.length;v++){var x=d[v];if(p[x]==null&&(p[x]=0),p[x]+=1,this.invertedIndex[x]==null){var w=Object.create(null);w._index=this.termIndex,this.termIndex+=1;for(var m=0;m<i.length;m++)w[i[m]]=Object.create(null);this.invertedIndex[x]=w}this.invertedIndex[x][o][r]==null&&(this.invertedIndex[x][o][r]=Object.create(null));for(var g=0;g<this.metadataWhitelist.length;g++){var T=this.metadataWhitelist[g],L=x.metadata[T];this.invertedIndex[x][o][r][T]==null&&(this.invertedIndex[x][o][r][T]=[]),this.invertedIndex[x][o][r][T].push(L)}}}},t.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),n=e.length,r={},i={},s=0;s<n;s++){var o=t.FieldRef.fromString(e[s]),a=o.fieldName;i[a]||(i[a]=0),i[a]+=1,r[a]||(r[a]=0),r[a]+=this.fieldLengths[o]}for(var c=Object.keys(this._fields),s=0;s<c.length;s++){var l=c[s];r[l]=r[l]/i[l]}this.averageFieldLength=r},t.Builder.prototype.createFieldVectors=function(){for(var e={},n=Object.keys(this.fieldTermFrequencies),r=n.length,i=Object.create(null),s=0;s<r;s++){for(var o=t.FieldRef.fromString(n[s]),a=o.fieldName,c=this.fieldLengths[o],l=new t.Vector,d=this.fieldTermFrequencies[o],f=Object.keys(d),p=f.length,v=this._fields[a].boost||1,x=this._documents[o.docRef].boost||1,w=0;w<p;w++){var m=f[w],g=d[m],T=this.invertedIndex[m]._index,L,C,O;i[m]===void 0?(L=t.idf(this.invertedIndex[m],this.documentCount),i[m]=L):L=i[m],C=L*((this._k1+1)*g)/(this._k1*(1-this._b+this._b*(c/this.averageFieldLength[a]))+g),C*=v,C*=x,O=Math.round(C*1e3)/1e3,l.insert(T,O)}e[o]=l}this.fieldVectors=e},t.Builder.prototype.createTokenSet=function(){this.tokenSet=t.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},t.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new t.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},t.Builder.prototype.use=function(e){var n=Array.prototype.slice.call(arguments,1);n.unshift(this),e.apply(this,n)},t.MatchData=function(e,n,r){for(var i=Object.create(null),s=Object.keys(r||{}),o=0;o<s.length;o++){var a=s[o];i[a]=r[a].slice()}this.metadata=Object.create(null),e!==void 0&&(this.metadata[e]=Object.create(null),this.metadata[e][n]=i)},t.MatchData.prototype.combine=function(e){for(var n=Object.keys(e.metadata),r=0;r<n.length;r++){var i=n[r],s=Object.keys(e.metadata[i]);this.metadata[i]==null&&(this.metadata[i]=Object.create(null));for(var o=0;o<s.length;o++){var a=s[o],c=Object.keys(e.metadata[i][a]);this.metadata[i][a]==null&&(this.metadata[i][a]=Object.create(null));for(var l=0;l<c.length;l++){var d=c[l];this.metadata[i][a][d]==null?this.metadata[i][a][d]=e.metadata[i][a][d]:this.metadata[i][a][d]=this.metadata[i][a][d].concat(e.metadata[i][a][d])}}}},t.MatchData.prototype.add=function(e,n,r){if(!(e in this.metadata)){this.metadata[e]=Object.create(null),this.metadata[e][n]=r;return}if(!(n in this.metadata[e])){this.metadata[e][n]=r;return}for(var i=Object.keys(r),s=0;s<i.length;s++){var o=i[s];o in this.metadata[e][n]?this.metadata[e][n][o]=this.metadata[e][n][o].concat(r[o]):this.metadata[e][n][o]=r[o]}},t.Query=function(e){this.clauses=[],this.allFields=e},t.Query.wildcard=new String("*"),t.Query.wildcard.NONE=0,t.Query.wildcard.LEADING=1,t.Query.wildcard.TRAILING=2,t.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},t.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=t.Query.wildcard.NONE),e.wildcard&t.Query.wildcard.LEADING&&e.term.charAt(0)!=t.Query.wildcard&&(e.term="*"+e.term),e.wildcard&t.Query.wildcard.TRAILING&&e.term.slice(-1)!=t.Query.wildcard&&(e.term=""+e.term+"*"),"presence"in e||(e.presence=t.Query.presence.OPTIONAL),this.clauses.push(e),this},t.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=t.Query.presence.PROHIBITED)return!1;return!0},t.Query.prototype.term=function(e,n){if(Array.isArray(e))return e.forEach(function(i){this.term(i,t.utils.clone(n))},this),this;var r=n||{};return r.term=e.toString(),this.clause(r),this},t.QueryParseError=function(e,n,r){this.name="QueryParseError",this.message=e,this.start=n,this.end=r},t.QueryParseError.prototype=new Error,t.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},t.QueryLexer.prototype.run=function(){for(var e=t.QueryLexer.lexText;e;)e=e(this)},t.QueryLexer.prototype.sliceString=function(){for(var e=[],n=this.start,r=this.pos,i=0;i<this.escapeCharPositions.length;i++)r=this.escapeCharPositions[i],e.push(this.str.slice(n,r)),n=r+1;return e.push(this.str.slice(n,this.pos)),this.escapeCharPositions.length=0,e.join("")},t.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},t.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},t.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos<this.length},t.QueryLexer.EOS="EOS",t.QueryLexer.FIELD="FIELD",t.QueryLexer.TERM="TERM",t.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",t.QueryLexer.BOOST="BOOST",t.QueryLexer.PRESENCE="PRESENCE",t.QueryLexer.lexField=function(e){return e.backup(),e.emit(t.QueryLexer.FIELD),e.ignore(),t.QueryLexer.lexText},t.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof me=="object"?ge.exports=n():e.lunr=n()}(this,function(){return t})})()});var M,G={getItem(){return null},setItem(){}},K;try{K=localStorage,M=K}catch{K=G,M=G}var S={getItem:t=>M.getItem(t),setItem:(t,e)=>M.setItem(t,e),disableWritingLocalStorage(){M=G},disable(){localStorage.clear(),M=G},enable(){M=K}};window.TypeDoc||={disableWritingLocalStorage(){S.disableWritingLocalStorage()},disableLocalStorage:()=>{S.disable()},enableLocalStorage:()=>{S.enable()}};window.translations||={copy:"Copy",copied:"Copied!",normally_hidden:"This member is normally hidden due to your filter settings.",hierarchy_expand:"Expand",hierarchy_collapse:"Collapse",search_index_not_available:"The search index is not available",search_no_results_found_for_0:"No results found for {0}",folder:"Folder",kind_1:"Project",kind_2:"Module",kind_4:"Namespace",kind_8:"Enumeration",kind_16:"Enumeration Member",kind_32:"Variable",kind_64:"Function",kind_128:"Class",kind_256:"Interface",kind_512:"Constructor",kind_1024:"Property",kind_2048:"Method",kind_4096:"Call Signature",kind_8192:"Index Signature",kind_16384:"Constructor Signature",kind_32768:"Parameter",kind_65536:"Type Literal",kind_131072:"Type Parameter",kind_262144:"Accessor",kind_524288:"Get Signature",kind_1048576:"Set Signature",kind_2097152:"Type Alias",kind_4194304:"Reference",kind_8388608:"Document"};var pe=[];function X(t,e){pe.push({selector:e,constructor:t})}var Z=class{alwaysVisibleMember=null;constructor(){this.createComponents(document.body),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible()),document.body.style.display||(this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}createComponents(e){pe.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}showPage(){document.body.style.display&&(document.body.style.removeProperty("display"),this.ensureFocusedElementVisible(),this.updateIndexVisibility(),this.scrollToHash())}scrollToHash(){if(location.hash){let e=document.getElementById(location.hash.substring(1));if(!e)return;e.scrollIntoView({behavior:"instant",block:"start"})}}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e&&!rt(e)){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r,document.querySelector(".col-sidebar").scrollTop=r}}updateIndexVisibility(){let e=document.querySelector(".tsd-index-content"),n=e?.open;e&&(e.open=!0),document.querySelectorAll(".tsd-index-section").forEach(r=>{r.style.display="block";let i=Array.from(r.querySelectorAll(".tsd-index-link")).every(s=>s.offsetParent==null);r.style.display=i?"none":"block"}),e&&(e.open=n)}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(!n)return;let r=n.offsetParent==null,i=n;for(;i!==document.body;)i instanceof HTMLDetailsElement&&(i.open=!0),i=i.parentElement;if(n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let s=document.createElement("p");s.classList.add("warning"),s.textContent=window.translations.normally_hidden,n.prepend(s)}r&&e.scrollIntoView()}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent=window.translations.copied,e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent=window.translations.copy},100)},1e3)})})}};function rt(t){let e=t.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-n>=0)}var fe=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var Ie=nt(ye(),1);async function R(t){let e=Uint8Array.from(atob(t),s=>s.charCodeAt(0)),r=new Blob([e]).stream().pipeThrough(new DecompressionStream("deflate")),i=await new Response(r).text();return JSON.parse(i)}var Y="closing",ae="tsd-overlay";function it(){let t=Math.abs(window.innerWidth-document.documentElement.clientWidth);document.body.style.overflow="hidden",document.body.style.paddingRight=`${t}px`}function st(){document.body.style.removeProperty("overflow"),document.body.style.removeProperty("padding-right")}function xe(t,e){t.addEventListener("animationend",()=>{t.classList.contains(Y)&&(t.classList.remove(Y),document.getElementById(ae)?.remove(),t.close(),st())}),t.addEventListener("cancel",n=>{n.preventDefault(),ve(t)}),e?.closeOnClick&&document.addEventListener("click",n=>{t.open&&!t.contains(n.target)&&ve(t)},!0)}function Ee(t){if(t.open)return;let e=document.createElement("div");e.id=ae,document.body.appendChild(e),t.showModal(),it()}function ve(t){if(!t.open)return;document.getElementById(ae)?.classList.add(Y),t.classList.add(Y)}var I=class{el;app;constructor(e){this.el=e.el,this.app=e.app}};var be=document.head.appendChild(document.createElement("style"));be.dataset.for="filters";var le={};function we(t){for(let e of t.split(/\s+/))if(le.hasOwnProperty(e)&&!le[e])return!0;return!1}var ee=class extends I{key;value;constructor(e){super(e),this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),be.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }
|
|
5
|
-
|
|
6
|
-
${Ce(c.parent,i)}.</span>${f}`);let p=document.createElement("li");p.id=`tsd-search:${Le}-${a}`,p.role="option",p.ariaSelected="false",p.classList.value=c.classes??"";let v=document.createElement("a");v.tabIndex=-1,v.href=r.base+c.url,v.innerHTML=d+`<span class="text">${f}</span>`,p.append(v),t.appendChild(p)}}function Te(t,e,n,r){let i;if(r===1?i=n?.nextElementSibling||t.firstElementChild:i=n?.previousElementSibling||t.lastElementChild,i!==n){if(!i||i.role!=="option"){console.error("Option missing");return}i.ariaSelected="true",i.scrollIntoView({behavior:"smooth",block:"nearest"}),e.setAttribute("aria-activedescendant",i.id),n?.setAttribute("aria-selected","false")}}function ke(t){let e=t.getAttribute("aria-activedescendant");(e?document.getElementById(e):null)?.setAttribute("aria-selected","false"),t.setAttribute("aria-activedescendant","")}function Ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(te(t.substring(s,o)),`<mark>${te(t.substring(o,o+r.length))}</mark>`),s=o+r.length,o=n.indexOf(r,s);return i.push(te(t.substring(s))),i.join("")}var lt={"&":"&","<":"<",">":">","'":"'",'"':"""};function te(t){return t.replace(/[&<>"'"]/g,e=>lt[e])}function Pe(t,e){t.innerHTML=e?`<div>${e}</div>`:""}var ct=["button","checkbox","file","hidden","image","radio","range","reset","submit"];function ut(){let t=document.activeElement;return t?t.isContentEditable||t.tagName==="TEXTAREA"||t.tagName==="SEARCH"?!0:t.tagName==="INPUT"&&!ct.includes(t.type):!1}var D="mousedown",Me="mousemove",$="mouseup",ne={x:0,y:0},Qe=!1,ce=!1,dt=!1,F=!1,Oe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(Oe?"is-mobile":"not-mobile");Oe&&"ontouchstart"in document.documentElement&&(dt=!0,D="touchstart",Me="touchmove",$="touchend");document.addEventListener(D,t=>{ce=!0,F=!1;let e=D=="touchstart"?t.targetTouches[0]:t;ne.y=e.pageY||0,ne.x=e.pageX||0});document.addEventListener(Me,t=>{if(ce&&!F){let e=D=="touchstart"?t.targetTouches[0]:t,n=ne.x-(e.pageX||0),r=ne.y-(e.pageY||0);F=Math.sqrt(n*n+r*r)>10}});document.addEventListener($,()=>{ce=!1});document.addEventListener("click",t=>{Qe&&(t.preventDefault(),t.stopImmediatePropagation(),Qe=!1)});var re=class extends I{active;className;constructor(e){super(e),this.className=this.el.dataset.toggle||"",this.el.addEventListener($,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(D,n=>this.onDocumentPointerDown(n)),document.addEventListener($,n=>this.onDocumentPointerUp(n))}setActive(e){if(this.active==e)return;this.active=e,document.documentElement.classList.toggle("has-"+this.className,e),this.el.classList.toggle("active",e);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(e){F||(this.setActive(!0),e.preventDefault())}onDocumentPointerDown(e){if(this.active){if(e.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(e){if(!F&&this.active&&e.target.closest(".col-sidebar")){let n=e.target.closest("a");if(n){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substring(0,r.indexOf("#"))),n.href.substring(0,r.length)==r&&setTimeout(()=>this.setActive(!1),250)}}}};var ue=new Map,de=class{open;accordions=[];key;constructor(e,n){this.key=e,this.open=n}add(e){this.accordions.push(e),e.open=this.open,e.addEventListener("toggle",()=>{this.toggle(e.open)})}toggle(e){for(let n of this.accordions)n.open=e;S.setItem(this.key,e.toString())}},ie=class extends I{constructor(e){super(e);let n=this.el.querySelector("summary"),r=n.querySelector("a");r&&r.addEventListener("click",()=>{location.assign(r.href)});let i=`tsd-accordion-${n.dataset.key??n.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`,s;if(ue.has(i))s=ue.get(i);else{let o=S.getItem(i),a=o?o==="true":this.el.open;s=new de(i,a),ue.set(i,s)}s.add(this.el)}};function He(t){let e=S.getItem("tsd-theme")||"os";t.value=e,Ae(e),t.addEventListener("change",()=>{S.setItem("tsd-theme",t.value),Ae(t.value)})}function Ae(t){document.documentElement.dataset.theme=t}var se;function Ne(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",Re),Re())}async function Re(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let e=await R(window.navigationData);se=document.documentElement.dataset.base,se.endsWith("/")||(se+="/"),t.innerHTML="";for(let n of e)Be(n,t,[]);window.app.createComponents(t),window.app.showPage(),window.app.ensureActivePageVisible()}function Be(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-accordion`:"tsd-accordion";let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.dataset.key=i.join("$"),o.innerHTML='<svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>',De(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let c=a.appendChild(document.createElement("ul"));c.className="tsd-nested-navigation";for(let l of t.children)Be(l,c,i)}else De(t,r,t.class)}function De(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));if(r.href=se+t.path,n&&(r.className=n),location.pathname===r.pathname&&!r.href.includes("#")&&(r.classList.add("current"),r.ariaCurrent="page"),t.kind){let i=window.translations[`kind_${t.kind}`].replaceAll('"',""");r.innerHTML=`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon" aria-label="${i}"><use href="#icon-${t.icon||t.kind}"></use></svg>`}r.appendChild(Fe(t.text,document.createElement("span")))}else{let r=e.appendChild(document.createElement("span")),i=window.translations.folder.replaceAll('"',""");r.innerHTML=`<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon" aria-label="${i}"><use href="#icon-folder"></use></svg>`,r.appendChild(Fe(t.text,document.createElement("span")))}}function Fe(t,e){let n=t.split(/(?<=[^A-Z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|(?<=[_-])(?=[^_-])/);for(let r=0;r<n.length;++r)r!==0&&e.appendChild(document.createElement("wbr")),e.appendChild(document.createTextNode(n[r]));return e}var oe=document.documentElement.dataset.base;oe.endsWith("/")||(oe+="/");function $e(){document.querySelector(".tsd-full-hierarchy")?ht():document.querySelector(".tsd-hierarchy")&&pt()}function ht(){document.addEventListener("click",r=>{let i=r.target;for(;i.parentElement&&i.parentElement.tagName!="LI";)i=i.parentElement;i.dataset.dropdown&&(i.dataset.dropdown=String(i.dataset.dropdown!=="true"))});let t=new Map,e=new Set;for(let r of document.querySelectorAll(".tsd-full-hierarchy [data-refl]")){let i=r.querySelector("ul");t.has(r.dataset.refl)?e.add(r.dataset.refl):i&&t.set(r.dataset.refl,i)}for(let r of e)n(r);function n(r){let i=t.get(r).cloneNode(!0);i.querySelectorAll("[id]").forEach(s=>{s.removeAttribute("id")}),i.querySelectorAll("[data-dropdown]").forEach(s=>{s.dataset.dropdown="false"});for(let s of document.querySelectorAll(`[data-refl="${r}"]`)){let o=gt(),a=s.querySelector("ul");s.insertBefore(o,a),o.dataset.dropdown=String(!!a),a||s.appendChild(i.cloneNode(!0))}}}function pt(){let t=document.getElementById("tsd-hierarchy-script");t&&(t.addEventListener("load",Ve),Ve())}async function Ve(){let t=document.querySelector(".tsd-panel.tsd-hierarchy:has(h4 a)");if(!t||!window.hierarchyData)return;let e=+t.dataset.refl,n=await R(window.hierarchyData),r=t.querySelector("ul"),i=document.createElement("ul");if(i.classList.add("tsd-hierarchy"),ft(i,n,e),r.querySelectorAll("li").length==i.querySelectorAll("li").length)return;let s=document.createElement("span");s.classList.add("tsd-hierarchy-toggle"),s.textContent=window.translations.hierarchy_expand,t.querySelector("h4 a")?.insertAdjacentElement("afterend",s),s.insertAdjacentText("beforebegin",", "),s.addEventListener("click",()=>{s.textContent===window.translations.hierarchy_expand?(r.insertAdjacentElement("afterend",i),r.remove(),s.textContent=window.translations.hierarchy_collapse):(i.insertAdjacentElement("afterend",r),i.remove(),s.textContent=window.translations.hierarchy_expand)})}function ft(t,e,n){let r=e.roots.filter(i=>mt(e,i,n));for(let i of r)t.appendChild(je(e,i,n))}function je(t,e,n,r=new Set){if(r.has(e))return;r.add(e);let i=t.reflections[e],s=document.createElement("li");if(s.classList.add("tsd-hierarchy-item"),e===n){let o=s.appendChild(document.createElement("span"));o.textContent=i.name,o.classList.add("tsd-hierarchy-target")}else{for(let a of i.uniqueNameParents||[]){let c=t.reflections[a],l=s.appendChild(document.createElement("a"));l.textContent=c.name,l.href=oe+c.url,l.className=c.class+" tsd-signature-type",s.append(document.createTextNode("."))}let o=s.appendChild(document.createElement("a"));o.textContent=t.reflections[e].name,o.href=oe+i.url,o.className=i.class+" tsd-signature-type"}if(i.children){let o=s.appendChild(document.createElement("ul"));o.classList.add("tsd-hierarchy");for(let a of i.children){let c=je(t,a,n,r);c&&o.appendChild(c)}}return r.delete(e),s}function mt(t,e,n){if(e===n)return!0;let r=new Set,i=[t.reflections[e]];for(;i.length;){let s=i.pop();if(!r.has(s)){r.add(s);for(let o of s.children||[]){if(o===n)return!0;i.push(t.reflections[o])}}}return!1}function gt(){let t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","20"),t.setAttribute("height","20"),t.setAttribute("viewBox","0 0 24 24"),t.setAttribute("fill","none"),t.innerHTML='<use href="#icon-chevronDown"></use>',t}X(re,"a[data-toggle]");X(ie,".tsd-accordion");X(ee,".tsd-filter-item input[type=checkbox]");var qe=document.getElementById("tsd-theme");qe&&He(qe);var yt=new Z;Object.defineProperty(window,"app",{value:yt});_e();Ne();$e();"virtualKeyboard"in navigator&&(navigator.virtualKeyboard.overlaysContent=!0);})();
|
|
1
|
+
window.translations = {
|
|
2
|
+
copy: 'Copy',
|
|
3
|
+
copied: 'Copied!',
|
|
4
|
+
normally_hidden:
|
|
5
|
+
'This member is normally hidden due to your filter settings.',
|
|
6
|
+
hierarchy_expand: 'Expand',
|
|
7
|
+
hierarchy_collapse: 'Collapse',
|
|
8
|
+
folder: 'Folder',
|
|
9
|
+
search_index_not_available: 'The search index is not available',
|
|
10
|
+
search_no_results_found_for_0: 'No results found for {0}',
|
|
11
|
+
kind_1: 'Project',
|
|
12
|
+
kind_2: 'Module',
|
|
13
|
+
kind_4: 'Namespace',
|
|
14
|
+
kind_8: 'Enumeration',
|
|
15
|
+
kind_16: 'Enumeration Member',
|
|
16
|
+
kind_32: 'Variable',
|
|
17
|
+
kind_64: 'Function',
|
|
18
|
+
kind_128: 'Class',
|
|
19
|
+
kind_256: 'Interface',
|
|
20
|
+
kind_512: 'Constructor',
|
|
21
|
+
kind_1024: 'Property',
|
|
22
|
+
kind_2048: 'Method',
|
|
23
|
+
kind_4096: 'Call Signature',
|
|
24
|
+
kind_8192: 'Index Signature',
|
|
25
|
+
kind_16384: 'Constructor Signature',
|
|
26
|
+
kind_32768: 'Parameter',
|
|
27
|
+
kind_65536: 'Type Literal',
|
|
28
|
+
kind_131072: 'Type Parameter',
|
|
29
|
+
kind_262144: 'Accessor',
|
|
30
|
+
kind_524288: 'Get Signature',
|
|
31
|
+
kind_1048576: 'Set Signature',
|
|
32
|
+
kind_2097152: 'Type Alias',
|
|
33
|
+
kind_4194304: 'Reference',
|
|
34
|
+
kind_8388608: 'Document',
|
|
35
|
+
};
|
|
36
|
+
('use strict');
|
|
37
|
+
(() => {
|
|
38
|
+
var Ke = Object.create;
|
|
39
|
+
var he = Object.defineProperty;
|
|
40
|
+
var Ge = Object.getOwnPropertyDescriptor;
|
|
41
|
+
var Ze = Object.getOwnPropertyNames;
|
|
42
|
+
var Xe = Object.getPrototypeOf;
|
|
43
|
+
var Ye = Object.prototype.hasOwnProperty;
|
|
44
|
+
var et = (t, e) => () => (
|
|
45
|
+
e || t((e = { exports: {} }).exports, e), e.exports
|
|
46
|
+
);
|
|
47
|
+
var tt = (t, e, n, r) => {
|
|
48
|
+
if ((e && typeof e === 'object') || typeof e === 'function')
|
|
49
|
+
for (const i of Ze(e))
|
|
50
|
+
!Ye.call(t, i) &&
|
|
51
|
+
i !== n &&
|
|
52
|
+
he(t, i, {
|
|
53
|
+
get: () => e[i],
|
|
54
|
+
enumerable: !(r = Ge(e, i)) || r.enumerable,
|
|
55
|
+
});
|
|
56
|
+
return t;
|
|
57
|
+
};
|
|
58
|
+
var nt = (t, e, n) => (
|
|
59
|
+
(n = t != null ? Ke(Xe(t)) : {}),
|
|
60
|
+
tt(
|
|
61
|
+
e || !t || !t.__esModule
|
|
62
|
+
? he(n, 'default', { value: t, enumerable: !0 })
|
|
63
|
+
: n,
|
|
64
|
+
t,
|
|
65
|
+
)
|
|
66
|
+
);
|
|
67
|
+
var ye = et((me, ge) => {
|
|
68
|
+
(function () {
|
|
69
|
+
var t = (e) => {
|
|
70
|
+
var n = new t.Builder();
|
|
71
|
+
return (
|
|
72
|
+
n.pipeline.add(t.trimmer, t.stopWordFilter, t.stemmer),
|
|
73
|
+
n.searchPipeline.add(t.stemmer),
|
|
74
|
+
e.call(n, n),
|
|
75
|
+
n.build()
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
t.version = '2.3.9';
|
|
79
|
+
(t.utils = {}),
|
|
80
|
+
(t.utils.warn = ((e) => (n) => {
|
|
81
|
+
e.console && console.warn && console.warn(n);
|
|
82
|
+
})(this)),
|
|
83
|
+
(t.utils.asString = (e) => (e == null ? '' : e.toString())),
|
|
84
|
+
(t.utils.clone = (e) => {
|
|
85
|
+
if (e == null) return e;
|
|
86
|
+
for (
|
|
87
|
+
var n = Object.create(null), r = Object.keys(e), i = 0;
|
|
88
|
+
i < r.length;
|
|
89
|
+
i++
|
|
90
|
+
) {
|
|
91
|
+
var s = r[i];
|
|
92
|
+
var o = e[s];
|
|
93
|
+
if (Array.isArray(o)) {
|
|
94
|
+
n[s] = o.slice();
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
if (
|
|
98
|
+
typeof o === 'string' ||
|
|
99
|
+
typeof o === 'number' ||
|
|
100
|
+
typeof o === 'boolean'
|
|
101
|
+
) {
|
|
102
|
+
n[s] = o;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
throw new TypeError(
|
|
106
|
+
'clone is not deep and does not support nested objects',
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
return n;
|
|
110
|
+
}),
|
|
111
|
+
(t.FieldRef = function (e, n, r) {
|
|
112
|
+
(this.docRef = e), (this.fieldName = n), (this._stringValue = r);
|
|
113
|
+
}),
|
|
114
|
+
(t.FieldRef.joiner = '/'),
|
|
115
|
+
(t.FieldRef.fromString = (e) => {
|
|
116
|
+
var n = e.indexOf(t.FieldRef.joiner);
|
|
117
|
+
if (n === -1) throw 'malformed field ref string';
|
|
118
|
+
var r = e.slice(0, n);
|
|
119
|
+
var i = e.slice(n + 1);
|
|
120
|
+
return new t.FieldRef(i, r, e);
|
|
121
|
+
}),
|
|
122
|
+
(t.FieldRef.prototype.toString = function () {
|
|
123
|
+
return (
|
|
124
|
+
this._stringValue == null &&
|
|
125
|
+
(this._stringValue =
|
|
126
|
+
this.fieldName + t.FieldRef.joiner + this.docRef),
|
|
127
|
+
this._stringValue
|
|
128
|
+
);
|
|
129
|
+
});
|
|
130
|
+
(t.Set = function (e) {
|
|
131
|
+
if (((this.elements = Object.create(null)), e)) {
|
|
132
|
+
this.length = e.length;
|
|
133
|
+
for (var n = 0; n < this.length; n++) this.elements[e[n]] = !0;
|
|
134
|
+
} else this.length = 0;
|
|
135
|
+
}),
|
|
136
|
+
(t.Set.complete = {
|
|
137
|
+
intersect: (e) => e,
|
|
138
|
+
union: function () {
|
|
139
|
+
return this;
|
|
140
|
+
},
|
|
141
|
+
contains: () => !0,
|
|
142
|
+
}),
|
|
143
|
+
(t.Set.empty = {
|
|
144
|
+
intersect: function () {
|
|
145
|
+
return this;
|
|
146
|
+
},
|
|
147
|
+
union: (e) => e,
|
|
148
|
+
contains: () => !1,
|
|
149
|
+
}),
|
|
150
|
+
(t.Set.prototype.contains = function (e) {
|
|
151
|
+
return !!this.elements[e];
|
|
152
|
+
}),
|
|
153
|
+
(t.Set.prototype.intersect = function (e) {
|
|
154
|
+
var n;
|
|
155
|
+
var r;
|
|
156
|
+
var i;
|
|
157
|
+
var s = [];
|
|
158
|
+
if (e === t.Set.complete) return this;
|
|
159
|
+
if (e === t.Set.empty) return e;
|
|
160
|
+
this.length < e.length
|
|
161
|
+
? ((n = this), (r = e))
|
|
162
|
+
: ((n = e), (r = this)),
|
|
163
|
+
(i = Object.keys(n.elements));
|
|
164
|
+
for (var o = 0; o < i.length; o++) {
|
|
165
|
+
var a = i[o];
|
|
166
|
+
a in r.elements && s.push(a);
|
|
167
|
+
}
|
|
168
|
+
return new t.Set(s);
|
|
169
|
+
}),
|
|
170
|
+
(t.Set.prototype.union = function (e) {
|
|
171
|
+
return e === t.Set.complete
|
|
172
|
+
? t.Set.complete
|
|
173
|
+
: e === t.Set.empty
|
|
174
|
+
? this
|
|
175
|
+
: new t.Set(
|
|
176
|
+
Object.keys(this.elements).concat(Object.keys(e.elements)),
|
|
177
|
+
);
|
|
178
|
+
}),
|
|
179
|
+
(t.idf = (e, n) => {
|
|
180
|
+
var r = 0;
|
|
181
|
+
for (var i in e) i !== '_index' && (r += Object.keys(e[i]).length);
|
|
182
|
+
var s = (n - r + 0.5) / (r + 0.5);
|
|
183
|
+
return Math.log(1 + Math.abs(s));
|
|
184
|
+
}),
|
|
185
|
+
(t.Token = function (e, n) {
|
|
186
|
+
(this.str = e || ''), (this.metadata = n || {});
|
|
187
|
+
}),
|
|
188
|
+
(t.Token.prototype.toString = function () {
|
|
189
|
+
return this.str;
|
|
190
|
+
}),
|
|
191
|
+
(t.Token.prototype.update = function (e) {
|
|
192
|
+
return (this.str = e(this.str, this.metadata)), this;
|
|
193
|
+
}),
|
|
194
|
+
(t.Token.prototype.clone = function (e) {
|
|
195
|
+
return (
|
|
196
|
+
(e = e || ((n) => n)),
|
|
197
|
+
new t.Token(e(this.str, this.metadata), this.metadata)
|
|
198
|
+
);
|
|
199
|
+
});
|
|
200
|
+
(t.tokenizer = (e, n) => {
|
|
201
|
+
if (e == null || e == null) return [];
|
|
202
|
+
if (Array.isArray(e))
|
|
203
|
+
return e.map(
|
|
204
|
+
(f) =>
|
|
205
|
+
new t.Token(t.utils.asString(f).toLowerCase(), t.utils.clone(n)),
|
|
206
|
+
);
|
|
207
|
+
for (
|
|
208
|
+
var r = e.toString().toLowerCase(),
|
|
209
|
+
i = r.length,
|
|
210
|
+
s = [],
|
|
211
|
+
o = 0,
|
|
212
|
+
a = 0;
|
|
213
|
+
o <= i;
|
|
214
|
+
o++
|
|
215
|
+
) {
|
|
216
|
+
var c = r.charAt(o);
|
|
217
|
+
var l = o - a;
|
|
218
|
+
if (c.match(t.tokenizer.separator) || o === i) {
|
|
219
|
+
if (l > 0) {
|
|
220
|
+
var d = t.utils.clone(n) || {};
|
|
221
|
+
(d.position = [a, l]),
|
|
222
|
+
(d.index = s.length),
|
|
223
|
+
s.push(new t.Token(r.slice(a, o), d));
|
|
224
|
+
}
|
|
225
|
+
a = o + 1;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return s;
|
|
229
|
+
}),
|
|
230
|
+
(t.tokenizer.separator = /[\s-]+/);
|
|
231
|
+
(t.Pipeline = function () {
|
|
232
|
+
this._stack = [];
|
|
233
|
+
}),
|
|
234
|
+
(t.Pipeline.registeredFunctions = Object.create(null)),
|
|
235
|
+
(t.Pipeline.registerFunction = function (e, n) {
|
|
236
|
+
n in this.registeredFunctions &&
|
|
237
|
+
t.utils.warn(`Overwriting existing registered function: ${n}`),
|
|
238
|
+
(e.label = n),
|
|
239
|
+
(t.Pipeline.registeredFunctions[e.label] = e);
|
|
240
|
+
}),
|
|
241
|
+
(t.Pipeline.warnIfFunctionNotRegistered = function (e) {
|
|
242
|
+
var n = e.label && e.label in this.registeredFunctions;
|
|
243
|
+
n ||
|
|
244
|
+
t.utils.warn(
|
|
245
|
+
`Function is not registered with pipeline. This may cause problems when serialising the index.
|
|
246
|
+
`,
|
|
247
|
+
e,
|
|
248
|
+
);
|
|
249
|
+
}),
|
|
250
|
+
(t.Pipeline.load = (e) => {
|
|
251
|
+
var n = new t.Pipeline();
|
|
252
|
+
return (
|
|
253
|
+
e.forEach((r) => {
|
|
254
|
+
var i = t.Pipeline.registeredFunctions[r];
|
|
255
|
+
if (i) n.add(i);
|
|
256
|
+
else throw new Error(`Cannot load unregistered function: ${r}`);
|
|
257
|
+
}),
|
|
258
|
+
n
|
|
259
|
+
);
|
|
260
|
+
}),
|
|
261
|
+
(t.Pipeline.prototype.add = function () {
|
|
262
|
+
var e = Array.prototype.slice.call(arguments);
|
|
263
|
+
e.forEach(function (n) {
|
|
264
|
+
t.Pipeline.warnIfFunctionNotRegistered(n), this._stack.push(n);
|
|
265
|
+
}, this);
|
|
266
|
+
}),
|
|
267
|
+
(t.Pipeline.prototype.after = function (e, n) {
|
|
268
|
+
t.Pipeline.warnIfFunctionNotRegistered(n);
|
|
269
|
+
var r = this._stack.indexOf(e);
|
|
270
|
+
if (r === -1) throw new Error('Cannot find existingFn');
|
|
271
|
+
(r = r + 1), this._stack.splice(r, 0, n);
|
|
272
|
+
}),
|
|
273
|
+
(t.Pipeline.prototype.before = function (e, n) {
|
|
274
|
+
t.Pipeline.warnIfFunctionNotRegistered(n);
|
|
275
|
+
var r = this._stack.indexOf(e);
|
|
276
|
+
if (r === -1) throw new Error('Cannot find existingFn');
|
|
277
|
+
this._stack.splice(r, 0, n);
|
|
278
|
+
}),
|
|
279
|
+
(t.Pipeline.prototype.remove = function (e) {
|
|
280
|
+
var n = this._stack.indexOf(e);
|
|
281
|
+
n !== -1 && this._stack.splice(n, 1);
|
|
282
|
+
}),
|
|
283
|
+
(t.Pipeline.prototype.run = function (e) {
|
|
284
|
+
for (var n = this._stack.length, r = 0; r < n; r++) {
|
|
285
|
+
for (var i = this._stack[r], s = [], o = 0; o < e.length; o++) {
|
|
286
|
+
var a = i(e[o], o, e);
|
|
287
|
+
if (!(a == null || a === ''))
|
|
288
|
+
if (Array.isArray(a))
|
|
289
|
+
for (var c = 0; c < a.length; c++) s.push(a[c]);
|
|
290
|
+
else s.push(a);
|
|
291
|
+
}
|
|
292
|
+
e = s;
|
|
293
|
+
}
|
|
294
|
+
return e;
|
|
295
|
+
}),
|
|
296
|
+
(t.Pipeline.prototype.runString = function (e, n) {
|
|
297
|
+
var r = new t.Token(e, n);
|
|
298
|
+
return this.run([r]).map((i) => i.toString());
|
|
299
|
+
}),
|
|
300
|
+
(t.Pipeline.prototype.reset = function () {
|
|
301
|
+
this._stack = [];
|
|
302
|
+
}),
|
|
303
|
+
(t.Pipeline.prototype.toJSON = function () {
|
|
304
|
+
return this._stack.map(
|
|
305
|
+
(e) => (t.Pipeline.warnIfFunctionNotRegistered(e), e.label),
|
|
306
|
+
);
|
|
307
|
+
});
|
|
308
|
+
(t.Vector = function (e) {
|
|
309
|
+
(this._magnitude = 0), (this.elements = e || []);
|
|
310
|
+
}),
|
|
311
|
+
(t.Vector.prototype.positionForIndex = function (e) {
|
|
312
|
+
if (this.elements.length === 0) return 0;
|
|
313
|
+
for (
|
|
314
|
+
var n = 0,
|
|
315
|
+
r = this.elements.length / 2,
|
|
316
|
+
i = r - n,
|
|
317
|
+
s = Math.floor(i / 2),
|
|
318
|
+
o = this.elements[s * 2];
|
|
319
|
+
i > 1 && (o < e && (n = s), o > e && (r = s), o !== e);
|
|
320
|
+
)
|
|
321
|
+
(i = r - n),
|
|
322
|
+
(s = n + Math.floor(i / 2)),
|
|
323
|
+
(o = this.elements[s * 2]);
|
|
324
|
+
if (o === e || o > e) return s * 2;
|
|
325
|
+
if (o < e) return (s + 1) * 2;
|
|
326
|
+
}),
|
|
327
|
+
(t.Vector.prototype.insert = function (e, n) {
|
|
328
|
+
this.upsert(e, n, () => {
|
|
329
|
+
throw 'duplicate index';
|
|
330
|
+
});
|
|
331
|
+
}),
|
|
332
|
+
(t.Vector.prototype.upsert = function (e, n, r) {
|
|
333
|
+
this._magnitude = 0;
|
|
334
|
+
var i = this.positionForIndex(e);
|
|
335
|
+
this.elements[i] === e
|
|
336
|
+
? (this.elements[i + 1] = r(this.elements[i + 1], n))
|
|
337
|
+
: this.elements.splice(i, 0, e, n);
|
|
338
|
+
}),
|
|
339
|
+
(t.Vector.prototype.magnitude = function () {
|
|
340
|
+
if (this._magnitude) return this._magnitude;
|
|
341
|
+
for (var e = 0, n = this.elements.length, r = 1; r < n; r += 2) {
|
|
342
|
+
var i = this.elements[r];
|
|
343
|
+
e += i * i;
|
|
344
|
+
}
|
|
345
|
+
return (this._magnitude = Math.sqrt(e));
|
|
346
|
+
}),
|
|
347
|
+
(t.Vector.prototype.dot = function (e) {
|
|
348
|
+
for (
|
|
349
|
+
var n = 0,
|
|
350
|
+
r = this.elements,
|
|
351
|
+
i = e.elements,
|
|
352
|
+
s = r.length,
|
|
353
|
+
o = i.length,
|
|
354
|
+
a = 0,
|
|
355
|
+
c = 0,
|
|
356
|
+
l = 0,
|
|
357
|
+
d = 0;
|
|
358
|
+
l < s && d < o;
|
|
359
|
+
)
|
|
360
|
+
(a = r[l]),
|
|
361
|
+
(c = i[d]),
|
|
362
|
+
a < c
|
|
363
|
+
? (l += 2)
|
|
364
|
+
: a > c
|
|
365
|
+
? (d += 2)
|
|
366
|
+
: a === c && ((n += r[l + 1] * i[d + 1]), (l += 2), (d += 2));
|
|
367
|
+
return n;
|
|
368
|
+
}),
|
|
369
|
+
(t.Vector.prototype.similarity = function (e) {
|
|
370
|
+
return this.dot(e) / this.magnitude() || 0;
|
|
371
|
+
}),
|
|
372
|
+
(t.Vector.prototype.toArray = function () {
|
|
373
|
+
for (
|
|
374
|
+
var e = new Array(this.elements.length / 2), n = 1, r = 0;
|
|
375
|
+
n < this.elements.length;
|
|
376
|
+
n += 2, r++
|
|
377
|
+
)
|
|
378
|
+
e[r] = this.elements[n];
|
|
379
|
+
return e;
|
|
380
|
+
}),
|
|
381
|
+
(t.Vector.prototype.toJSON = function () {
|
|
382
|
+
return this.elements;
|
|
383
|
+
});
|
|
384
|
+
(t.stemmer = (() => {
|
|
385
|
+
var e = {
|
|
386
|
+
ational: 'ate',
|
|
387
|
+
tional: 'tion',
|
|
388
|
+
enci: 'ence',
|
|
389
|
+
anci: 'ance',
|
|
390
|
+
izer: 'ize',
|
|
391
|
+
bli: 'ble',
|
|
392
|
+
alli: 'al',
|
|
393
|
+
entli: 'ent',
|
|
394
|
+
eli: 'e',
|
|
395
|
+
ousli: 'ous',
|
|
396
|
+
ization: 'ize',
|
|
397
|
+
ation: 'ate',
|
|
398
|
+
ator: 'ate',
|
|
399
|
+
alism: 'al',
|
|
400
|
+
iveness: 'ive',
|
|
401
|
+
fulness: 'ful',
|
|
402
|
+
ousness: 'ous',
|
|
403
|
+
aliti: 'al',
|
|
404
|
+
iviti: 'ive',
|
|
405
|
+
biliti: 'ble',
|
|
406
|
+
logi: 'log',
|
|
407
|
+
};
|
|
408
|
+
var n = {
|
|
409
|
+
icate: 'ic',
|
|
410
|
+
ative: '',
|
|
411
|
+
alize: 'al',
|
|
412
|
+
iciti: 'ic',
|
|
413
|
+
ical: 'ic',
|
|
414
|
+
ful: '',
|
|
415
|
+
ness: '',
|
|
416
|
+
};
|
|
417
|
+
var r = '[^aeiou]';
|
|
418
|
+
var i = '[aeiouy]';
|
|
419
|
+
var s = `${r}[^aeiouy]*`;
|
|
420
|
+
var o = `${i}[aeiou]*`;
|
|
421
|
+
var a = `^(${s})?${o}${s}`;
|
|
422
|
+
var c = `^(${s})?${o}${s}(${o})?$`;
|
|
423
|
+
var l = `^(${s})?${o}${s}${o}${s}`;
|
|
424
|
+
var d = `^(${s})?${i}`;
|
|
425
|
+
var f = new RegExp(a);
|
|
426
|
+
var p = new RegExp(l);
|
|
427
|
+
var v = new RegExp(c);
|
|
428
|
+
var x = new RegExp(d);
|
|
429
|
+
var w = /^(.+?)(ss|i)es$/;
|
|
430
|
+
var m = /^(.+?)([^s])s$/;
|
|
431
|
+
var g = /^(.+?)eed$/;
|
|
432
|
+
var T = /^(.+?)(ed|ing)$/;
|
|
433
|
+
var L = /.$/;
|
|
434
|
+
var C = /(at|bl|iz)$/;
|
|
435
|
+
var O = /([^aeiouylsz])\1$/;
|
|
436
|
+
var j = new RegExp(`^${s}${i}[^aeiouwxy]$`);
|
|
437
|
+
var N = /^(.+?[^aeiou])y$/;
|
|
438
|
+
var q =
|
|
439
|
+
/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
|
|
440
|
+
var W = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
|
|
441
|
+
var B =
|
|
442
|
+
/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
|
|
443
|
+
var z = /^(.+?)(s|t)(ion)$/;
|
|
444
|
+
var _ = /^(.+?)e$/;
|
|
445
|
+
var U = /ll$/;
|
|
446
|
+
var J = new RegExp(`^${s}${i}[^aeiouwxy]$`);
|
|
447
|
+
var V = (u) => {
|
|
448
|
+
var y;
|
|
449
|
+
var P;
|
|
450
|
+
var k;
|
|
451
|
+
var h;
|
|
452
|
+
var E;
|
|
453
|
+
var Q;
|
|
454
|
+
var H;
|
|
455
|
+
if (u.length < 3) return u;
|
|
456
|
+
if (
|
|
457
|
+
((k = u.substr(0, 1)),
|
|
458
|
+
k === 'y' && (u = k.toUpperCase() + u.substr(1)),
|
|
459
|
+
(h = w),
|
|
460
|
+
(E = m),
|
|
461
|
+
h.test(u)
|
|
462
|
+
? (u = u.replace(h, '$1$2'))
|
|
463
|
+
: E.test(u) && (u = u.replace(E, '$1$2')),
|
|
464
|
+
(h = g),
|
|
465
|
+
(E = T),
|
|
466
|
+
h.test(u))
|
|
467
|
+
) {
|
|
468
|
+
var b = h.exec(u);
|
|
469
|
+
(h = f), h.test(b[1]) && ((h = L), (u = u.replace(h, '')));
|
|
470
|
+
} else if (E.test(u)) {
|
|
471
|
+
var b = E.exec(u);
|
|
472
|
+
(y = b[1]),
|
|
473
|
+
(E = x),
|
|
474
|
+
E.test(y) &&
|
|
475
|
+
((u = y),
|
|
476
|
+
(E = C),
|
|
477
|
+
(Q = O),
|
|
478
|
+
(H = j),
|
|
479
|
+
E.test(u)
|
|
480
|
+
? (u = `${u}e`)
|
|
481
|
+
: Q.test(u)
|
|
482
|
+
? ((h = L), (u = u.replace(h, '')))
|
|
483
|
+
: H.test(u) && (u = `${u}e`));
|
|
484
|
+
}
|
|
485
|
+
if (((h = N), h.test(u))) {
|
|
486
|
+
var b = h.exec(u);
|
|
487
|
+
(y = b[1]), (u = `${y}i`);
|
|
488
|
+
}
|
|
489
|
+
if (((h = q), h.test(u))) {
|
|
490
|
+
var b = h.exec(u);
|
|
491
|
+
(y = b[1]), (P = b[2]), (h = f), h.test(y) && (u = y + e[P]);
|
|
492
|
+
}
|
|
493
|
+
if (((h = W), h.test(u))) {
|
|
494
|
+
var b = h.exec(u);
|
|
495
|
+
(y = b[1]), (P = b[2]), (h = f), h.test(y) && (u = y + n[P]);
|
|
496
|
+
}
|
|
497
|
+
if (((h = B), (E = z), h.test(u))) {
|
|
498
|
+
var b = h.exec(u);
|
|
499
|
+
(y = b[1]), (h = p), h.test(y) && (u = y);
|
|
500
|
+
} else if (E.test(u)) {
|
|
501
|
+
var b = E.exec(u);
|
|
502
|
+
(y = b[1] + b[2]), (E = p), E.test(y) && (u = y);
|
|
503
|
+
}
|
|
504
|
+
if (((h = _), h.test(u))) {
|
|
505
|
+
var b = h.exec(u);
|
|
506
|
+
(y = b[1]),
|
|
507
|
+
(h = p),
|
|
508
|
+
(E = v),
|
|
509
|
+
(Q = J),
|
|
510
|
+
(h.test(y) || (E.test(y) && !Q.test(y))) && (u = y);
|
|
511
|
+
}
|
|
512
|
+
return (
|
|
513
|
+
(h = U),
|
|
514
|
+
(E = p),
|
|
515
|
+
h.test(u) && E.test(u) && ((h = L), (u = u.replace(h, ''))),
|
|
516
|
+
k === 'y' && (u = k.toLowerCase() + u.substr(1)),
|
|
517
|
+
u
|
|
518
|
+
);
|
|
519
|
+
};
|
|
520
|
+
return (A) => A.update(V);
|
|
521
|
+
})()),
|
|
522
|
+
t.Pipeline.registerFunction(t.stemmer, 'stemmer');
|
|
523
|
+
(t.generateStopWordFilter = (e) => {
|
|
524
|
+
var n = e.reduce((r, i) => ((r[i] = i), r), {});
|
|
525
|
+
return (r) => {
|
|
526
|
+
if (r && n[r.toString()] !== r.toString()) return r;
|
|
527
|
+
};
|
|
528
|
+
}),
|
|
529
|
+
(t.stopWordFilter = t.generateStopWordFilter([
|
|
530
|
+
'a',
|
|
531
|
+
'able',
|
|
532
|
+
'about',
|
|
533
|
+
'across',
|
|
534
|
+
'after',
|
|
535
|
+
'all',
|
|
536
|
+
'almost',
|
|
537
|
+
'also',
|
|
538
|
+
'am',
|
|
539
|
+
'among',
|
|
540
|
+
'an',
|
|
541
|
+
'and',
|
|
542
|
+
'any',
|
|
543
|
+
'are',
|
|
544
|
+
'as',
|
|
545
|
+
'at',
|
|
546
|
+
'be',
|
|
547
|
+
'because',
|
|
548
|
+
'been',
|
|
549
|
+
'but',
|
|
550
|
+
'by',
|
|
551
|
+
'can',
|
|
552
|
+
'cannot',
|
|
553
|
+
'could',
|
|
554
|
+
'dear',
|
|
555
|
+
'did',
|
|
556
|
+
'do',
|
|
557
|
+
'does',
|
|
558
|
+
'either',
|
|
559
|
+
'else',
|
|
560
|
+
'ever',
|
|
561
|
+
'every',
|
|
562
|
+
'for',
|
|
563
|
+
'from',
|
|
564
|
+
'get',
|
|
565
|
+
'got',
|
|
566
|
+
'had',
|
|
567
|
+
'has',
|
|
568
|
+
'have',
|
|
569
|
+
'he',
|
|
570
|
+
'her',
|
|
571
|
+
'hers',
|
|
572
|
+
'him',
|
|
573
|
+
'his',
|
|
574
|
+
'how',
|
|
575
|
+
'however',
|
|
576
|
+
'i',
|
|
577
|
+
'if',
|
|
578
|
+
'in',
|
|
579
|
+
'into',
|
|
580
|
+
'is',
|
|
581
|
+
'it',
|
|
582
|
+
'its',
|
|
583
|
+
'just',
|
|
584
|
+
'least',
|
|
585
|
+
'let',
|
|
586
|
+
'like',
|
|
587
|
+
'likely',
|
|
588
|
+
'may',
|
|
589
|
+
'me',
|
|
590
|
+
'might',
|
|
591
|
+
'most',
|
|
592
|
+
'must',
|
|
593
|
+
'my',
|
|
594
|
+
'neither',
|
|
595
|
+
'no',
|
|
596
|
+
'nor',
|
|
597
|
+
'not',
|
|
598
|
+
'of',
|
|
599
|
+
'off',
|
|
600
|
+
'often',
|
|
601
|
+
'on',
|
|
602
|
+
'only',
|
|
603
|
+
'or',
|
|
604
|
+
'other',
|
|
605
|
+
'our',
|
|
606
|
+
'own',
|
|
607
|
+
'rather',
|
|
608
|
+
'said',
|
|
609
|
+
'say',
|
|
610
|
+
'says',
|
|
611
|
+
'she',
|
|
612
|
+
'should',
|
|
613
|
+
'since',
|
|
614
|
+
'so',
|
|
615
|
+
'some',
|
|
616
|
+
'than',
|
|
617
|
+
'that',
|
|
618
|
+
'the',
|
|
619
|
+
'their',
|
|
620
|
+
'them',
|
|
621
|
+
'then',
|
|
622
|
+
'there',
|
|
623
|
+
'these',
|
|
624
|
+
'they',
|
|
625
|
+
'this',
|
|
626
|
+
'tis',
|
|
627
|
+
'to',
|
|
628
|
+
'too',
|
|
629
|
+
'twas',
|
|
630
|
+
'us',
|
|
631
|
+
'wants',
|
|
632
|
+
'was',
|
|
633
|
+
'we',
|
|
634
|
+
'were',
|
|
635
|
+
'what',
|
|
636
|
+
'when',
|
|
637
|
+
'where',
|
|
638
|
+
'which',
|
|
639
|
+
'while',
|
|
640
|
+
'who',
|
|
641
|
+
'whom',
|
|
642
|
+
'why',
|
|
643
|
+
'will',
|
|
644
|
+
'with',
|
|
645
|
+
'would',
|
|
646
|
+
'yet',
|
|
647
|
+
'you',
|
|
648
|
+
'your',
|
|
649
|
+
])),
|
|
650
|
+
t.Pipeline.registerFunction(t.stopWordFilter, 'stopWordFilter');
|
|
651
|
+
(t.trimmer = (e) =>
|
|
652
|
+
e.update((n) => n.replace(/^\W+/, '').replace(/\W+$/, ''))),
|
|
653
|
+
t.Pipeline.registerFunction(t.trimmer, 'trimmer');
|
|
654
|
+
(t.TokenSet = function () {
|
|
655
|
+
(this.final = !1),
|
|
656
|
+
(this.edges = {}),
|
|
657
|
+
(this.id = t.TokenSet._nextId),
|
|
658
|
+
(t.TokenSet._nextId += 1);
|
|
659
|
+
}),
|
|
660
|
+
(t.TokenSet._nextId = 1),
|
|
661
|
+
(t.TokenSet.fromArray = (e) => {
|
|
662
|
+
for (
|
|
663
|
+
var n = new t.TokenSet.Builder(), r = 0, i = e.length;
|
|
664
|
+
r < i;
|
|
665
|
+
r++
|
|
666
|
+
)
|
|
667
|
+
n.insert(e[r]);
|
|
668
|
+
return n.finish(), n.root;
|
|
669
|
+
}),
|
|
670
|
+
(t.TokenSet.fromClause = (e) =>
|
|
671
|
+
'editDistance' in e
|
|
672
|
+
? t.TokenSet.fromFuzzyString(e.term, e.editDistance)
|
|
673
|
+
: t.TokenSet.fromString(e.term)),
|
|
674
|
+
(t.TokenSet.fromFuzzyString = (e, n) => {
|
|
675
|
+
for (
|
|
676
|
+
var r = new t.TokenSet(),
|
|
677
|
+
i = [{ node: r, editsRemaining: n, str: e }];
|
|
678
|
+
i.length;
|
|
679
|
+
) {
|
|
680
|
+
var s = i.pop();
|
|
681
|
+
if (s.str.length > 0) {
|
|
682
|
+
var o = s.str.charAt(0);
|
|
683
|
+
var a;
|
|
684
|
+
o in s.node.edges
|
|
685
|
+
? (a = s.node.edges[o])
|
|
686
|
+
: ((a = new t.TokenSet()), (s.node.edges[o] = a)),
|
|
687
|
+
s.str.length === 1 && (a.final = !0),
|
|
688
|
+
i.push({
|
|
689
|
+
node: a,
|
|
690
|
+
editsRemaining: s.editsRemaining,
|
|
691
|
+
str: s.str.slice(1),
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
if (s.editsRemaining !== 0) {
|
|
695
|
+
if ('*' in s.node.edges) var _c = s.node.edges['*'];
|
|
696
|
+
else {
|
|
697
|
+
var c = new t.TokenSet();
|
|
698
|
+
s.node.edges['*'] = c;
|
|
699
|
+
}
|
|
700
|
+
if (
|
|
701
|
+
(s.str.length === 0 && (c.final = !0),
|
|
702
|
+
i.push({
|
|
703
|
+
node: c,
|
|
704
|
+
editsRemaining: s.editsRemaining - 1,
|
|
705
|
+
str: s.str,
|
|
706
|
+
}),
|
|
707
|
+
s.str.length > 1 &&
|
|
708
|
+
i.push({
|
|
709
|
+
node: s.node,
|
|
710
|
+
editsRemaining: s.editsRemaining - 1,
|
|
711
|
+
str: s.str.slice(1),
|
|
712
|
+
}),
|
|
713
|
+
s.str.length === 1 && (s.node.final = !0),
|
|
714
|
+
s.str.length >= 1)
|
|
715
|
+
) {
|
|
716
|
+
if ('*' in s.node.edges) var _l = s.node.edges['*'];
|
|
717
|
+
else {
|
|
718
|
+
var l = new t.TokenSet();
|
|
719
|
+
s.node.edges['*'] = l;
|
|
720
|
+
}
|
|
721
|
+
s.str.length === 1 && (l.final = !0),
|
|
722
|
+
i.push({
|
|
723
|
+
node: l,
|
|
724
|
+
editsRemaining: s.editsRemaining - 1,
|
|
725
|
+
str: s.str.slice(1),
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
if (s.str.length > 1) {
|
|
729
|
+
var d = s.str.charAt(0);
|
|
730
|
+
var f = s.str.charAt(1);
|
|
731
|
+
var p;
|
|
732
|
+
f in s.node.edges
|
|
733
|
+
? (p = s.node.edges[f])
|
|
734
|
+
: ((p = new t.TokenSet()), (s.node.edges[f] = p)),
|
|
735
|
+
s.str.length === 1 && (p.final = !0),
|
|
736
|
+
i.push({
|
|
737
|
+
node: p,
|
|
738
|
+
editsRemaining: s.editsRemaining - 1,
|
|
739
|
+
str: d + s.str.slice(2),
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
return r;
|
|
745
|
+
}),
|
|
746
|
+
(t.TokenSet.fromString = (e) => {
|
|
747
|
+
for (
|
|
748
|
+
var n = new t.TokenSet(), r = n, i = 0, s = e.length;
|
|
749
|
+
i < s;
|
|
750
|
+
i++
|
|
751
|
+
) {
|
|
752
|
+
var o = e[i];
|
|
753
|
+
var a = i === s - 1;
|
|
754
|
+
if (o === '*') (n.edges[o] = n), (n.final = a);
|
|
755
|
+
else {
|
|
756
|
+
var c = new t.TokenSet();
|
|
757
|
+
(c.final = a), (n.edges[o] = c), (n = c);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
return r;
|
|
761
|
+
}),
|
|
762
|
+
(t.TokenSet.prototype.toArray = function () {
|
|
763
|
+
for (var e = [], n = [{ prefix: '', node: this }]; n.length; ) {
|
|
764
|
+
var r = n.pop();
|
|
765
|
+
var i = Object.keys(r.node.edges);
|
|
766
|
+
var s = i.length;
|
|
767
|
+
r.node.final && (r.prefix.charAt(0), e.push(r.prefix));
|
|
768
|
+
for (var o = 0; o < s; o++) {
|
|
769
|
+
var a = i[o];
|
|
770
|
+
n.push({ prefix: r.prefix.concat(a), node: r.node.edges[a] });
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
return e;
|
|
774
|
+
}),
|
|
775
|
+
(t.TokenSet.prototype.toString = function () {
|
|
776
|
+
if (this._str) return this._str;
|
|
777
|
+
for (
|
|
778
|
+
var e = this.final ? '1' : '0',
|
|
779
|
+
n = Object.keys(this.edges).sort(),
|
|
780
|
+
r = n.length,
|
|
781
|
+
i = 0;
|
|
782
|
+
i < r;
|
|
783
|
+
i++
|
|
784
|
+
) {
|
|
785
|
+
var s = n[i];
|
|
786
|
+
var o = this.edges[s];
|
|
787
|
+
e = e + s + o.id;
|
|
788
|
+
}
|
|
789
|
+
return e;
|
|
790
|
+
}),
|
|
791
|
+
(t.TokenSet.prototype.intersect = function (e) {
|
|
792
|
+
for (
|
|
793
|
+
var n = new t.TokenSet(),
|
|
794
|
+
r = void 0,
|
|
795
|
+
i = [{ qNode: e, output: n, node: this }];
|
|
796
|
+
i.length;
|
|
797
|
+
) {
|
|
798
|
+
r = i.pop();
|
|
799
|
+
for (
|
|
800
|
+
var s = Object.keys(r.qNode.edges),
|
|
801
|
+
o = s.length,
|
|
802
|
+
a = Object.keys(r.node.edges),
|
|
803
|
+
c = a.length,
|
|
804
|
+
l = 0;
|
|
805
|
+
l < o;
|
|
806
|
+
l++
|
|
807
|
+
)
|
|
808
|
+
for (var d = s[l], f = 0; f < c; f++) {
|
|
809
|
+
var p = a[f];
|
|
810
|
+
if (p === d || d === '*') {
|
|
811
|
+
var v = r.node.edges[p];
|
|
812
|
+
var x = r.qNode.edges[d];
|
|
813
|
+
var w = v.final && x.final;
|
|
814
|
+
var m = void 0;
|
|
815
|
+
p in r.output.edges
|
|
816
|
+
? ((m = r.output.edges[p]), (m.final = m.final || w))
|
|
817
|
+
: ((m = new t.TokenSet()),
|
|
818
|
+
(m.final = w),
|
|
819
|
+
(r.output.edges[p] = m)),
|
|
820
|
+
i.push({ qNode: x, output: m, node: v });
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
return n;
|
|
825
|
+
}),
|
|
826
|
+
(t.TokenSet.Builder = function () {
|
|
827
|
+
(this.previousWord = ''),
|
|
828
|
+
(this.root = new t.TokenSet()),
|
|
829
|
+
(this.uncheckedNodes = []),
|
|
830
|
+
(this.minimizedNodes = {});
|
|
831
|
+
}),
|
|
832
|
+
(t.TokenSet.Builder.prototype.insert = function (e) {
|
|
833
|
+
var n;
|
|
834
|
+
var r = 0;
|
|
835
|
+
if (e < this.previousWord)
|
|
836
|
+
throw new Error('Out of order word insertion');
|
|
837
|
+
for (
|
|
838
|
+
var i = 0;
|
|
839
|
+
i < e.length &&
|
|
840
|
+
i < this.previousWord.length &&
|
|
841
|
+
e[i] === this.previousWord[i];
|
|
842
|
+
i++
|
|
843
|
+
)
|
|
844
|
+
r++;
|
|
845
|
+
this.minimize(r),
|
|
846
|
+
this.uncheckedNodes.length === 0
|
|
847
|
+
? (n = this.root)
|
|
848
|
+
: (n = this.uncheckedNodes[this.uncheckedNodes.length - 1].child);
|
|
849
|
+
for (var i = r; i < e.length; i++) {
|
|
850
|
+
var s = new t.TokenSet();
|
|
851
|
+
var o = e[i];
|
|
852
|
+
(n.edges[o] = s),
|
|
853
|
+
this.uncheckedNodes.push({ parent: n, char: o, child: s }),
|
|
854
|
+
(n = s);
|
|
855
|
+
}
|
|
856
|
+
(n.final = !0), (this.previousWord = e);
|
|
857
|
+
}),
|
|
858
|
+
(t.TokenSet.Builder.prototype.finish = function () {
|
|
859
|
+
this.minimize(0);
|
|
860
|
+
}),
|
|
861
|
+
(t.TokenSet.Builder.prototype.minimize = function (e) {
|
|
862
|
+
for (var n = this.uncheckedNodes.length - 1; n >= e; n--) {
|
|
863
|
+
var r = this.uncheckedNodes[n];
|
|
864
|
+
var i = r.child.toString();
|
|
865
|
+
i in this.minimizedNodes
|
|
866
|
+
? (r.parent.edges[r.char] = this.minimizedNodes[i])
|
|
867
|
+
: ((r.child._str = i), (this.minimizedNodes[i] = r.child)),
|
|
868
|
+
this.uncheckedNodes.pop();
|
|
869
|
+
}
|
|
870
|
+
});
|
|
871
|
+
(t.Index = function (e) {
|
|
872
|
+
(this.invertedIndex = e.invertedIndex),
|
|
873
|
+
(this.fieldVectors = e.fieldVectors),
|
|
874
|
+
(this.tokenSet = e.tokenSet),
|
|
875
|
+
(this.fields = e.fields),
|
|
876
|
+
(this.pipeline = e.pipeline);
|
|
877
|
+
}),
|
|
878
|
+
(t.Index.prototype.search = function (e) {
|
|
879
|
+
return this.query((n) => {
|
|
880
|
+
var r = new t.QueryParser(e, n);
|
|
881
|
+
r.parse();
|
|
882
|
+
});
|
|
883
|
+
}),
|
|
884
|
+
(t.Index.prototype.query = function (e) {
|
|
885
|
+
for (
|
|
886
|
+
var n = new t.Query(this.fields),
|
|
887
|
+
r = Object.create(null),
|
|
888
|
+
i = Object.create(null),
|
|
889
|
+
s = Object.create(null),
|
|
890
|
+
o = Object.create(null),
|
|
891
|
+
a = Object.create(null),
|
|
892
|
+
c = 0;
|
|
893
|
+
c < this.fields.length;
|
|
894
|
+
c++
|
|
895
|
+
)
|
|
896
|
+
i[this.fields[c]] = new t.Vector();
|
|
897
|
+
e.call(n, n);
|
|
898
|
+
for (var c = 0; c < n.clauses.length; c++) {
|
|
899
|
+
var l = n.clauses[c];
|
|
900
|
+
var d = null;
|
|
901
|
+
var f = t.Set.empty;
|
|
902
|
+
l.usePipeline
|
|
903
|
+
? (d = this.pipeline.runString(l.term, { fields: l.fields }))
|
|
904
|
+
: (d = [l.term]);
|
|
905
|
+
for (var p = 0; p < d.length; p++) {
|
|
906
|
+
var v = d[p];
|
|
907
|
+
l.term = v;
|
|
908
|
+
var x = t.TokenSet.fromClause(l);
|
|
909
|
+
var w = this.tokenSet.intersect(x).toArray();
|
|
910
|
+
if (w.length === 0 && l.presence === t.Query.presence.REQUIRED) {
|
|
911
|
+
for (var m = 0; m < l.fields.length; m++) {
|
|
912
|
+
var g = l.fields[m];
|
|
913
|
+
o[g] = t.Set.empty;
|
|
914
|
+
}
|
|
915
|
+
break;
|
|
916
|
+
}
|
|
917
|
+
for (var T = 0; T < w.length; T++)
|
|
918
|
+
for (
|
|
919
|
+
var L = w[T], C = this.invertedIndex[L], O = C._index, m = 0;
|
|
920
|
+
m < l.fields.length;
|
|
921
|
+
m++
|
|
922
|
+
) {
|
|
923
|
+
var g = l.fields[m];
|
|
924
|
+
var j = C[g];
|
|
925
|
+
var N = Object.keys(j);
|
|
926
|
+
var q = `${L}/${g}`;
|
|
927
|
+
var W = new t.Set(N);
|
|
928
|
+
if (
|
|
929
|
+
(l.presence === t.Query.presence.REQUIRED &&
|
|
930
|
+
((f = f.union(W)),
|
|
931
|
+
o[g] === void 0 && (o[g] = t.Set.complete)),
|
|
932
|
+
l.presence === t.Query.presence.PROHIBITED)
|
|
933
|
+
) {
|
|
934
|
+
a[g] === void 0 && (a[g] = t.Set.empty),
|
|
935
|
+
(a[g] = a[g].union(W));
|
|
936
|
+
continue;
|
|
937
|
+
}
|
|
938
|
+
if ((i[g].upsert(O, l.boost, (Ue, Je) => Ue + Je), !s[q])) {
|
|
939
|
+
for (var B = 0; B < N.length; B++) {
|
|
940
|
+
var z = N[B];
|
|
941
|
+
var _ = new t.FieldRef(z, g);
|
|
942
|
+
var U = j[z];
|
|
943
|
+
var J;
|
|
944
|
+
(J = r[_]) === void 0
|
|
945
|
+
? (r[_] = new t.MatchData(L, g, U))
|
|
946
|
+
: J.add(L, g, U);
|
|
947
|
+
}
|
|
948
|
+
s[q] = !0;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
if (l.presence === t.Query.presence.REQUIRED)
|
|
953
|
+
for (var m = 0; m < l.fields.length; m++) {
|
|
954
|
+
var g = l.fields[m];
|
|
955
|
+
o[g] = o[g].intersect(f);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
for (
|
|
959
|
+
var V = t.Set.complete, A = t.Set.empty, c = 0;
|
|
960
|
+
c < this.fields.length;
|
|
961
|
+
c++
|
|
962
|
+
) {
|
|
963
|
+
var g = this.fields[c];
|
|
964
|
+
o[g] && (V = V.intersect(o[g])), a[g] && (A = A.union(a[g]));
|
|
965
|
+
}
|
|
966
|
+
var u = Object.keys(r);
|
|
967
|
+
var y = [];
|
|
968
|
+
var P = Object.create(null);
|
|
969
|
+
if (n.isNegated()) {
|
|
970
|
+
u = Object.keys(this.fieldVectors);
|
|
971
|
+
for (var c = 0; c < u.length; c++) {
|
|
972
|
+
var _ = u[c];
|
|
973
|
+
var _k = t.FieldRef.fromString(_);
|
|
974
|
+
r[_] = new t.MatchData();
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
for (var c = 0; c < u.length; c++) {
|
|
978
|
+
var k = t.FieldRef.fromString(u[c]);
|
|
979
|
+
var h = k.docRef;
|
|
980
|
+
if (V.contains(h) && !A.contains(h)) {
|
|
981
|
+
var E = this.fieldVectors[k];
|
|
982
|
+
var Q = i[k.fieldName].similarity(E);
|
|
983
|
+
var H;
|
|
984
|
+
if ((H = P[h]) !== void 0)
|
|
985
|
+
(H.score += Q), H.matchData.combine(r[k]);
|
|
986
|
+
else {
|
|
987
|
+
var b = { ref: h, score: Q, matchData: r[k] };
|
|
988
|
+
(P[h] = b), y.push(b);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
return y.sort((We, ze) => ze.score - We.score);
|
|
993
|
+
}),
|
|
994
|
+
(t.Index.prototype.toJSON = function () {
|
|
995
|
+
var e = Object.keys(this.invertedIndex)
|
|
996
|
+
.sort()
|
|
997
|
+
.map(function (r) {
|
|
998
|
+
return [r, this.invertedIndex[r]];
|
|
999
|
+
}, this);
|
|
1000
|
+
var n = Object.keys(this.fieldVectors).map(function (r) {
|
|
1001
|
+
return [r, this.fieldVectors[r].toJSON()];
|
|
1002
|
+
}, this);
|
|
1003
|
+
return {
|
|
1004
|
+
version: t.version,
|
|
1005
|
+
fields: this.fields,
|
|
1006
|
+
fieldVectors: n,
|
|
1007
|
+
invertedIndex: e,
|
|
1008
|
+
pipeline: this.pipeline.toJSON(),
|
|
1009
|
+
};
|
|
1010
|
+
}),
|
|
1011
|
+
(t.Index.load = (e) => {
|
|
1012
|
+
var n = {};
|
|
1013
|
+
var r = {};
|
|
1014
|
+
var i = e.fieldVectors;
|
|
1015
|
+
var s = Object.create(null);
|
|
1016
|
+
var o = e.invertedIndex;
|
|
1017
|
+
var a = new t.TokenSet.Builder();
|
|
1018
|
+
var c = t.Pipeline.load(e.pipeline);
|
|
1019
|
+
e.version !== t.version &&
|
|
1020
|
+
t.utils.warn(
|
|
1021
|
+
`Version mismatch when loading serialised index. Current version of lunr '${t.version}' does not match serialized index '${e.version}'`,
|
|
1022
|
+
);
|
|
1023
|
+
for (var l = 0; l < i.length; l++) {
|
|
1024
|
+
var d = i[l];
|
|
1025
|
+
var f = d[0];
|
|
1026
|
+
var p = d[1];
|
|
1027
|
+
r[f] = new t.Vector(p);
|
|
1028
|
+
}
|
|
1029
|
+
for (var l = 0; l < o.length; l++) {
|
|
1030
|
+
var d = o[l];
|
|
1031
|
+
var v = d[0];
|
|
1032
|
+
var x = d[1];
|
|
1033
|
+
a.insert(v), (s[v] = x);
|
|
1034
|
+
}
|
|
1035
|
+
return (
|
|
1036
|
+
a.finish(),
|
|
1037
|
+
(n.fields = e.fields),
|
|
1038
|
+
(n.fieldVectors = r),
|
|
1039
|
+
(n.invertedIndex = s),
|
|
1040
|
+
(n.tokenSet = a.root),
|
|
1041
|
+
(n.pipeline = c),
|
|
1042
|
+
new t.Index(n)
|
|
1043
|
+
);
|
|
1044
|
+
});
|
|
1045
|
+
(t.Builder = function () {
|
|
1046
|
+
(this._ref = 'id'),
|
|
1047
|
+
(this._fields = Object.create(null)),
|
|
1048
|
+
(this._documents = Object.create(null)),
|
|
1049
|
+
(this.invertedIndex = Object.create(null)),
|
|
1050
|
+
(this.fieldTermFrequencies = {}),
|
|
1051
|
+
(this.fieldLengths = {}),
|
|
1052
|
+
(this.tokenizer = t.tokenizer),
|
|
1053
|
+
(this.pipeline = new t.Pipeline()),
|
|
1054
|
+
(this.searchPipeline = new t.Pipeline()),
|
|
1055
|
+
(this.documentCount = 0),
|
|
1056
|
+
(this._b = 0.75),
|
|
1057
|
+
(this._k1 = 1.2),
|
|
1058
|
+
(this.termIndex = 0),
|
|
1059
|
+
(this.metadataWhitelist = []);
|
|
1060
|
+
}),
|
|
1061
|
+
(t.Builder.prototype.ref = function (e) {
|
|
1062
|
+
this._ref = e;
|
|
1063
|
+
}),
|
|
1064
|
+
(t.Builder.prototype.field = function (e, n) {
|
|
1065
|
+
if (/\//.test(e))
|
|
1066
|
+
throw new RangeError(`Field '${e}' contains illegal character '/'`);
|
|
1067
|
+
this._fields[e] = n || {};
|
|
1068
|
+
}),
|
|
1069
|
+
(t.Builder.prototype.b = function (e) {
|
|
1070
|
+
e < 0 ? (this._b = 0) : e > 1 ? (this._b = 1) : (this._b = e);
|
|
1071
|
+
}),
|
|
1072
|
+
(t.Builder.prototype.k1 = function (e) {
|
|
1073
|
+
this._k1 = e;
|
|
1074
|
+
}),
|
|
1075
|
+
(t.Builder.prototype.add = function (e, n) {
|
|
1076
|
+
var r = e[this._ref];
|
|
1077
|
+
var i = Object.keys(this._fields);
|
|
1078
|
+
(this._documents[r] = n || {}), (this.documentCount += 1);
|
|
1079
|
+
for (var s = 0; s < i.length; s++) {
|
|
1080
|
+
var o = i[s];
|
|
1081
|
+
var a = this._fields[o].extractor;
|
|
1082
|
+
var c = a ? a(e) : e[o];
|
|
1083
|
+
var l = this.tokenizer(c, { fields: [o] });
|
|
1084
|
+
var d = this.pipeline.run(l);
|
|
1085
|
+
var f = new t.FieldRef(r, o);
|
|
1086
|
+
var p = Object.create(null);
|
|
1087
|
+
(this.fieldTermFrequencies[f] = p),
|
|
1088
|
+
(this.fieldLengths[f] = 0),
|
|
1089
|
+
(this.fieldLengths[f] += d.length);
|
|
1090
|
+
for (var v = 0; v < d.length; v++) {
|
|
1091
|
+
var x = d[v];
|
|
1092
|
+
if (
|
|
1093
|
+
(p[x] == null && (p[x] = 0),
|
|
1094
|
+
(p[x] += 1),
|
|
1095
|
+
this.invertedIndex[x] == null)
|
|
1096
|
+
) {
|
|
1097
|
+
var w = Object.create(null);
|
|
1098
|
+
(w._index = this.termIndex), (this.termIndex += 1);
|
|
1099
|
+
for (var m = 0; m < i.length; m++)
|
|
1100
|
+
w[i[m]] = Object.create(null);
|
|
1101
|
+
this.invertedIndex[x] = w;
|
|
1102
|
+
}
|
|
1103
|
+
this.invertedIndex[x][o][r] == null &&
|
|
1104
|
+
(this.invertedIndex[x][o][r] = Object.create(null));
|
|
1105
|
+
for (var g = 0; g < this.metadataWhitelist.length; g++) {
|
|
1106
|
+
var T = this.metadataWhitelist[g];
|
|
1107
|
+
var L = x.metadata[T];
|
|
1108
|
+
this.invertedIndex[x][o][r][T] == null &&
|
|
1109
|
+
(this.invertedIndex[x][o][r][T] = []),
|
|
1110
|
+
this.invertedIndex[x][o][r][T].push(L);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
}),
|
|
1115
|
+
(t.Builder.prototype.calculateAverageFieldLengths = function () {
|
|
1116
|
+
for (
|
|
1117
|
+
var e = Object.keys(this.fieldLengths),
|
|
1118
|
+
n = e.length,
|
|
1119
|
+
r = {},
|
|
1120
|
+
i = {},
|
|
1121
|
+
s = 0;
|
|
1122
|
+
s < n;
|
|
1123
|
+
s++
|
|
1124
|
+
) {
|
|
1125
|
+
var o = t.FieldRef.fromString(e[s]);
|
|
1126
|
+
var a = o.fieldName;
|
|
1127
|
+
i[a] || (i[a] = 0),
|
|
1128
|
+
(i[a] += 1),
|
|
1129
|
+
r[a] || (r[a] = 0),
|
|
1130
|
+
(r[a] += this.fieldLengths[o]);
|
|
1131
|
+
}
|
|
1132
|
+
for (var c = Object.keys(this._fields), s = 0; s < c.length; s++) {
|
|
1133
|
+
var l = c[s];
|
|
1134
|
+
r[l] = r[l] / i[l];
|
|
1135
|
+
}
|
|
1136
|
+
this.averageFieldLength = r;
|
|
1137
|
+
}),
|
|
1138
|
+
(t.Builder.prototype.createFieldVectors = function () {
|
|
1139
|
+
for (
|
|
1140
|
+
var e = {},
|
|
1141
|
+
n = Object.keys(this.fieldTermFrequencies),
|
|
1142
|
+
r = n.length,
|
|
1143
|
+
i = Object.create(null),
|
|
1144
|
+
s = 0;
|
|
1145
|
+
s < r;
|
|
1146
|
+
s++
|
|
1147
|
+
) {
|
|
1148
|
+
for (
|
|
1149
|
+
var o = t.FieldRef.fromString(n[s]),
|
|
1150
|
+
a = o.fieldName,
|
|
1151
|
+
c = this.fieldLengths[o],
|
|
1152
|
+
l = new t.Vector(),
|
|
1153
|
+
d = this.fieldTermFrequencies[o],
|
|
1154
|
+
f = Object.keys(d),
|
|
1155
|
+
p = f.length,
|
|
1156
|
+
v = this._fields[a].boost || 1,
|
|
1157
|
+
x = this._documents[o.docRef].boost || 1,
|
|
1158
|
+
w = 0;
|
|
1159
|
+
w < p;
|
|
1160
|
+
w++
|
|
1161
|
+
) {
|
|
1162
|
+
var m = f[w];
|
|
1163
|
+
var g = d[m];
|
|
1164
|
+
var T = this.invertedIndex[m]._index;
|
|
1165
|
+
var L;
|
|
1166
|
+
var C;
|
|
1167
|
+
var O;
|
|
1168
|
+
i[m] === void 0
|
|
1169
|
+
? ((L = t.idf(this.invertedIndex[m], this.documentCount)),
|
|
1170
|
+
(i[m] = L))
|
|
1171
|
+
: (L = i[m]),
|
|
1172
|
+
(C =
|
|
1173
|
+
(L * ((this._k1 + 1) * g)) /
|
|
1174
|
+
(this._k1 *
|
|
1175
|
+
(1 - this._b + this._b * (c / this.averageFieldLength[a])) +
|
|
1176
|
+
g)),
|
|
1177
|
+
(C *= v),
|
|
1178
|
+
(C *= x),
|
|
1179
|
+
(O = Math.round(C * 1e3) / 1e3),
|
|
1180
|
+
l.insert(T, O);
|
|
1181
|
+
}
|
|
1182
|
+
e[o] = l;
|
|
1183
|
+
}
|
|
1184
|
+
this.fieldVectors = e;
|
|
1185
|
+
}),
|
|
1186
|
+
(t.Builder.prototype.createTokenSet = function () {
|
|
1187
|
+
this.tokenSet = t.TokenSet.fromArray(
|
|
1188
|
+
Object.keys(this.invertedIndex).sort(),
|
|
1189
|
+
);
|
|
1190
|
+
}),
|
|
1191
|
+
(t.Builder.prototype.build = function () {
|
|
1192
|
+
return (
|
|
1193
|
+
this.calculateAverageFieldLengths(),
|
|
1194
|
+
this.createFieldVectors(),
|
|
1195
|
+
this.createTokenSet(),
|
|
1196
|
+
new t.Index({
|
|
1197
|
+
invertedIndex: this.invertedIndex,
|
|
1198
|
+
fieldVectors: this.fieldVectors,
|
|
1199
|
+
tokenSet: this.tokenSet,
|
|
1200
|
+
fields: Object.keys(this._fields),
|
|
1201
|
+
pipeline: this.searchPipeline,
|
|
1202
|
+
})
|
|
1203
|
+
);
|
|
1204
|
+
}),
|
|
1205
|
+
(t.Builder.prototype.use = function (e) {
|
|
1206
|
+
var n = Array.prototype.slice.call(arguments, 1);
|
|
1207
|
+
n.unshift(this), e.apply(this, n);
|
|
1208
|
+
}),
|
|
1209
|
+
(t.MatchData = function (e, n, r) {
|
|
1210
|
+
for (
|
|
1211
|
+
var i = Object.create(null), s = Object.keys(r || {}), o = 0;
|
|
1212
|
+
o < s.length;
|
|
1213
|
+
o++
|
|
1214
|
+
) {
|
|
1215
|
+
var a = s[o];
|
|
1216
|
+
i[a] = r[a].slice();
|
|
1217
|
+
}
|
|
1218
|
+
(this.metadata = Object.create(null)),
|
|
1219
|
+
e !== void 0 &&
|
|
1220
|
+
((this.metadata[e] = Object.create(null)),
|
|
1221
|
+
(this.metadata[e][n] = i));
|
|
1222
|
+
}),
|
|
1223
|
+
(t.MatchData.prototype.combine = function (e) {
|
|
1224
|
+
for (var n = Object.keys(e.metadata), r = 0; r < n.length; r++) {
|
|
1225
|
+
var i = n[r];
|
|
1226
|
+
var s = Object.keys(e.metadata[i]);
|
|
1227
|
+
this.metadata[i] == null &&
|
|
1228
|
+
(this.metadata[i] = Object.create(null));
|
|
1229
|
+
for (var o = 0; o < s.length; o++) {
|
|
1230
|
+
var a = s[o];
|
|
1231
|
+
var c = Object.keys(e.metadata[i][a]);
|
|
1232
|
+
this.metadata[i][a] == null &&
|
|
1233
|
+
(this.metadata[i][a] = Object.create(null));
|
|
1234
|
+
for (var l = 0; l < c.length; l++) {
|
|
1235
|
+
var d = c[l];
|
|
1236
|
+
this.metadata[i][a][d] == null
|
|
1237
|
+
? (this.metadata[i][a][d] = e.metadata[i][a][d])
|
|
1238
|
+
: (this.metadata[i][a][d] = this.metadata[i][a][d].concat(
|
|
1239
|
+
e.metadata[i][a][d],
|
|
1240
|
+
));
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
}),
|
|
1245
|
+
(t.MatchData.prototype.add = function (e, n, r) {
|
|
1246
|
+
if (!(e in this.metadata)) {
|
|
1247
|
+
(this.metadata[e] = Object.create(null)), (this.metadata[e][n] = r);
|
|
1248
|
+
return;
|
|
1249
|
+
}
|
|
1250
|
+
if (!(n in this.metadata[e])) {
|
|
1251
|
+
this.metadata[e][n] = r;
|
|
1252
|
+
return;
|
|
1253
|
+
}
|
|
1254
|
+
for (var i = Object.keys(r), s = 0; s < i.length; s++) {
|
|
1255
|
+
var o = i[s];
|
|
1256
|
+
o in this.metadata[e][n]
|
|
1257
|
+
? (this.metadata[e][n][o] = this.metadata[e][n][o].concat(r[o]))
|
|
1258
|
+
: (this.metadata[e][n][o] = r[o]);
|
|
1259
|
+
}
|
|
1260
|
+
}),
|
|
1261
|
+
(t.Query = function (e) {
|
|
1262
|
+
(this.clauses = []), (this.allFields = e);
|
|
1263
|
+
}),
|
|
1264
|
+
(t.Query.wildcard = new String('*')),
|
|
1265
|
+
(t.Query.wildcard.NONE = 0),
|
|
1266
|
+
(t.Query.wildcard.LEADING = 1),
|
|
1267
|
+
(t.Query.wildcard.TRAILING = 2),
|
|
1268
|
+
(t.Query.presence = { OPTIONAL: 1, REQUIRED: 2, PROHIBITED: 3 }),
|
|
1269
|
+
(t.Query.prototype.clause = function (e) {
|
|
1270
|
+
return (
|
|
1271
|
+
'fields' in e || (e.fields = this.allFields),
|
|
1272
|
+
'boost' in e || (e.boost = 1),
|
|
1273
|
+
'usePipeline' in e || (e.usePipeline = !0),
|
|
1274
|
+
'wildcard' in e || (e.wildcard = t.Query.wildcard.NONE),
|
|
1275
|
+
e.wildcard & t.Query.wildcard.LEADING &&
|
|
1276
|
+
e.term.charAt(0) !== t.Query.wildcard &&
|
|
1277
|
+
(e.term = `*${e.term}`),
|
|
1278
|
+
e.wildcard & t.Query.wildcard.TRAILING &&
|
|
1279
|
+
e.term.slice(-1) !== t.Query.wildcard &&
|
|
1280
|
+
(e.term = `${e.term}*`),
|
|
1281
|
+
'presence' in e || (e.presence = t.Query.presence.OPTIONAL),
|
|
1282
|
+
this.clauses.push(e),
|
|
1283
|
+
this
|
|
1284
|
+
);
|
|
1285
|
+
}),
|
|
1286
|
+
(t.Query.prototype.isNegated = function () {
|
|
1287
|
+
for (var e = 0; e < this.clauses.length; e++)
|
|
1288
|
+
if (this.clauses[e].presence !== t.Query.presence.PROHIBITED)
|
|
1289
|
+
return !1;
|
|
1290
|
+
return !0;
|
|
1291
|
+
}),
|
|
1292
|
+
(t.Query.prototype.term = function (e, n) {
|
|
1293
|
+
if (Array.isArray(e))
|
|
1294
|
+
return (
|
|
1295
|
+
e.forEach(function (i) {
|
|
1296
|
+
this.term(i, t.utils.clone(n));
|
|
1297
|
+
}, this),
|
|
1298
|
+
this
|
|
1299
|
+
);
|
|
1300
|
+
var r = n || {};
|
|
1301
|
+
return (r.term = e.toString()), this.clause(r), this;
|
|
1302
|
+
}),
|
|
1303
|
+
(t.QueryParseError = function (e, n, r) {
|
|
1304
|
+
(this.name = 'QueryParseError'),
|
|
1305
|
+
(this.message = e),
|
|
1306
|
+
(this.start = n),
|
|
1307
|
+
(this.end = r);
|
|
1308
|
+
}),
|
|
1309
|
+
(t.QueryParseError.prototype = new Error()),
|
|
1310
|
+
(t.QueryLexer = function (e) {
|
|
1311
|
+
(this.lexemes = []),
|
|
1312
|
+
(this.str = e),
|
|
1313
|
+
(this.length = e.length),
|
|
1314
|
+
(this.pos = 0),
|
|
1315
|
+
(this.start = 0),
|
|
1316
|
+
(this.escapeCharPositions = []);
|
|
1317
|
+
}),
|
|
1318
|
+
(t.QueryLexer.prototype.run = function () {
|
|
1319
|
+
for (var e = t.QueryLexer.lexText; e; ) e = e(this);
|
|
1320
|
+
}),
|
|
1321
|
+
(t.QueryLexer.prototype.sliceString = function () {
|
|
1322
|
+
for (
|
|
1323
|
+
var e = [], n = this.start, r = this.pos, i = 0;
|
|
1324
|
+
i < this.escapeCharPositions.length;
|
|
1325
|
+
i++
|
|
1326
|
+
)
|
|
1327
|
+
(r = this.escapeCharPositions[i]),
|
|
1328
|
+
e.push(this.str.slice(n, r)),
|
|
1329
|
+
(n = r + 1);
|
|
1330
|
+
return (
|
|
1331
|
+
e.push(this.str.slice(n, this.pos)),
|
|
1332
|
+
(this.escapeCharPositions.length = 0),
|
|
1333
|
+
e.join('')
|
|
1334
|
+
);
|
|
1335
|
+
}),
|
|
1336
|
+
(t.QueryLexer.prototype.emit = function (e) {
|
|
1337
|
+
this.lexemes.push({
|
|
1338
|
+
type: e,
|
|
1339
|
+
str: this.sliceString(),
|
|
1340
|
+
start: this.start,
|
|
1341
|
+
end: this.pos,
|
|
1342
|
+
}),
|
|
1343
|
+
(this.start = this.pos);
|
|
1344
|
+
}),
|
|
1345
|
+
(t.QueryLexer.prototype.escapeCharacter = function () {
|
|
1346
|
+
this.escapeCharPositions.push(this.pos - 1), (this.pos += 1);
|
|
1347
|
+
}),
|
|
1348
|
+
(t.QueryLexer.prototype.next = function () {
|
|
1349
|
+
if (this.pos >= this.length) return t.QueryLexer.EOS;
|
|
1350
|
+
var e = this.str.charAt(this.pos);
|
|
1351
|
+
return (this.pos += 1), e;
|
|
1352
|
+
}),
|
|
1353
|
+
(t.QueryLexer.prototype.width = function () {
|
|
1354
|
+
return this.pos - this.start;
|
|
1355
|
+
}),
|
|
1356
|
+
(t.QueryLexer.prototype.ignore = function () {
|
|
1357
|
+
this.start === this.pos && (this.pos += 1), (this.start = this.pos);
|
|
1358
|
+
}),
|
|
1359
|
+
(t.QueryLexer.prototype.backup = function () {
|
|
1360
|
+
this.pos -= 1;
|
|
1361
|
+
}),
|
|
1362
|
+
(t.QueryLexer.prototype.acceptDigitRun = function () {
|
|
1363
|
+
var e;
|
|
1364
|
+
var n;
|
|
1365
|
+
do (e = this.next()), (n = e.charCodeAt(0));
|
|
1366
|
+
while (n > 47 && n < 58);
|
|
1367
|
+
e !== t.QueryLexer.EOS && this.backup();
|
|
1368
|
+
}),
|
|
1369
|
+
(t.QueryLexer.prototype.more = function () {
|
|
1370
|
+
return this.pos < this.length;
|
|
1371
|
+
}),
|
|
1372
|
+
(t.QueryLexer.EOS = 'EOS'),
|
|
1373
|
+
(t.QueryLexer.FIELD = 'FIELD'),
|
|
1374
|
+
(t.QueryLexer.TERM = 'TERM'),
|
|
1375
|
+
(t.QueryLexer.EDIT_DISTANCE = 'EDIT_DISTANCE'),
|
|
1376
|
+
(t.QueryLexer.BOOST = 'BOOST'),
|
|
1377
|
+
(t.QueryLexer.PRESENCE = 'PRESENCE'),
|
|
1378
|
+
(t.QueryLexer.lexField = (e) => (
|
|
1379
|
+
e.backup(),
|
|
1380
|
+
e.emit(t.QueryLexer.FIELD),
|
|
1381
|
+
e.ignore(),
|
|
1382
|
+
t.QueryLexer.lexText
|
|
1383
|
+
)),
|
|
1384
|
+
(t.QueryLexer.lexTerm = (e) => {
|
|
1385
|
+
if (
|
|
1386
|
+
(e.width() > 1 && (e.backup(), e.emit(t.QueryLexer.TERM)),
|
|
1387
|
+
e.ignore(),
|
|
1388
|
+
e.more())
|
|
1389
|
+
)
|
|
1390
|
+
return t.QueryLexer.lexText;
|
|
1391
|
+
}),
|
|
1392
|
+
(t.QueryLexer.lexEditDistance = (e) => (
|
|
1393
|
+
e.ignore(),
|
|
1394
|
+
e.acceptDigitRun(),
|
|
1395
|
+
e.emit(t.QueryLexer.EDIT_DISTANCE),
|
|
1396
|
+
t.QueryLexer.lexText
|
|
1397
|
+
)),
|
|
1398
|
+
(t.QueryLexer.lexBoost = (e) => (
|
|
1399
|
+
e.ignore(),
|
|
1400
|
+
e.acceptDigitRun(),
|
|
1401
|
+
e.emit(t.QueryLexer.BOOST),
|
|
1402
|
+
t.QueryLexer.lexText
|
|
1403
|
+
)),
|
|
1404
|
+
(t.QueryLexer.lexEOS = (e) => {
|
|
1405
|
+
e.width() > 0 && e.emit(t.QueryLexer.TERM);
|
|
1406
|
+
}),
|
|
1407
|
+
(t.QueryLexer.termSeparator = t.tokenizer.separator),
|
|
1408
|
+
(t.QueryLexer.lexText = (e) => {
|
|
1409
|
+
for (;;) {
|
|
1410
|
+
var n = e.next();
|
|
1411
|
+
if (n === t.QueryLexer.EOS) return t.QueryLexer.lexEOS;
|
|
1412
|
+
if (n.charCodeAt(0) === 92) {
|
|
1413
|
+
e.escapeCharacter();
|
|
1414
|
+
continue;
|
|
1415
|
+
}
|
|
1416
|
+
if (n === ':') return t.QueryLexer.lexField;
|
|
1417
|
+
if (n === '~')
|
|
1418
|
+
return (
|
|
1419
|
+
e.backup(),
|
|
1420
|
+
e.width() > 0 && e.emit(t.QueryLexer.TERM),
|
|
1421
|
+
t.QueryLexer.lexEditDistance
|
|
1422
|
+
);
|
|
1423
|
+
if (n === '^')
|
|
1424
|
+
return (
|
|
1425
|
+
e.backup(),
|
|
1426
|
+
e.width() > 0 && e.emit(t.QueryLexer.TERM),
|
|
1427
|
+
t.QueryLexer.lexBoost
|
|
1428
|
+
);
|
|
1429
|
+
if (
|
|
1430
|
+
(n === '+' && e.width() === 1) ||
|
|
1431
|
+
(n === '-' && e.width() === 1)
|
|
1432
|
+
)
|
|
1433
|
+
return e.emit(t.QueryLexer.PRESENCE), t.QueryLexer.lexText;
|
|
1434
|
+
if (n.match(t.QueryLexer.termSeparator))
|
|
1435
|
+
return t.QueryLexer.lexTerm;
|
|
1436
|
+
}
|
|
1437
|
+
}),
|
|
1438
|
+
(t.QueryParser = function (e, n) {
|
|
1439
|
+
(this.lexer = new t.QueryLexer(e)),
|
|
1440
|
+
(this.query = n),
|
|
1441
|
+
(this.currentClause = {}),
|
|
1442
|
+
(this.lexemeIdx = 0);
|
|
1443
|
+
}),
|
|
1444
|
+
(t.QueryParser.prototype.parse = function () {
|
|
1445
|
+
this.lexer.run(), (this.lexemes = this.lexer.lexemes);
|
|
1446
|
+
for (var e = t.QueryParser.parseClause; e; ) e = e(this);
|
|
1447
|
+
return this.query;
|
|
1448
|
+
}),
|
|
1449
|
+
(t.QueryParser.prototype.peekLexeme = function () {
|
|
1450
|
+
return this.lexemes[this.lexemeIdx];
|
|
1451
|
+
}),
|
|
1452
|
+
(t.QueryParser.prototype.consumeLexeme = function () {
|
|
1453
|
+
var e = this.peekLexeme();
|
|
1454
|
+
return (this.lexemeIdx += 1), e;
|
|
1455
|
+
}),
|
|
1456
|
+
(t.QueryParser.prototype.nextClause = function () {
|
|
1457
|
+
var e = this.currentClause;
|
|
1458
|
+
this.query.clause(e), (this.currentClause = {});
|
|
1459
|
+
}),
|
|
1460
|
+
(t.QueryParser.parseClause = (e) => {
|
|
1461
|
+
var n = e.peekLexeme();
|
|
1462
|
+
if (n != null)
|
|
1463
|
+
switch (n.type) {
|
|
1464
|
+
case t.QueryLexer.PRESENCE:
|
|
1465
|
+
return t.QueryParser.parsePresence;
|
|
1466
|
+
case t.QueryLexer.FIELD:
|
|
1467
|
+
return t.QueryParser.parseField;
|
|
1468
|
+
case t.QueryLexer.TERM:
|
|
1469
|
+
return t.QueryParser.parseTerm;
|
|
1470
|
+
default: {
|
|
1471
|
+
var r = `expected either a field or a term, found ${n.type}`;
|
|
1472
|
+
throw (
|
|
1473
|
+
(n.str.length >= 1 && (r += ` with value '${n.str}'`),
|
|
1474
|
+
new t.QueryParseError(r, n.start, n.end))
|
|
1475
|
+
);
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
}),
|
|
1479
|
+
(t.QueryParser.parsePresence = (e) => {
|
|
1480
|
+
var n = e.consumeLexeme();
|
|
1481
|
+
if (n != null) {
|
|
1482
|
+
switch (n.str) {
|
|
1483
|
+
case '-':
|
|
1484
|
+
e.currentClause.presence = t.Query.presence.PROHIBITED;
|
|
1485
|
+
break;
|
|
1486
|
+
case '+':
|
|
1487
|
+
e.currentClause.presence = t.Query.presence.REQUIRED;
|
|
1488
|
+
break;
|
|
1489
|
+
default: {
|
|
1490
|
+
var r = `unrecognised presence operator'${n.str}'`;
|
|
1491
|
+
throw new t.QueryParseError(r, n.start, n.end);
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
var i = e.peekLexeme();
|
|
1495
|
+
if (i == null) {
|
|
1496
|
+
var r = 'expecting term or field, found nothing';
|
|
1497
|
+
throw new t.QueryParseError(r, n.start, n.end);
|
|
1498
|
+
}
|
|
1499
|
+
switch (i.type) {
|
|
1500
|
+
case t.QueryLexer.FIELD:
|
|
1501
|
+
return t.QueryParser.parseField;
|
|
1502
|
+
case t.QueryLexer.TERM:
|
|
1503
|
+
return t.QueryParser.parseTerm;
|
|
1504
|
+
default: {
|
|
1505
|
+
var r = `expecting term or field, found '${i.type}'`;
|
|
1506
|
+
throw new t.QueryParseError(r, i.start, i.end);
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
}),
|
|
1511
|
+
(t.QueryParser.parseField = (e) => {
|
|
1512
|
+
var n = e.consumeLexeme();
|
|
1513
|
+
if (n != null) {
|
|
1514
|
+
if (e.query.allFields.indexOf(n.str) === -1) {
|
|
1515
|
+
var r = e.query.allFields.map((o) => `'${o}'`).join(', ');
|
|
1516
|
+
var i = `unrecognised field '${n.str}', possible fields: ${r}`;
|
|
1517
|
+
throw new t.QueryParseError(i, n.start, n.end);
|
|
1518
|
+
}
|
|
1519
|
+
e.currentClause.fields = [n.str];
|
|
1520
|
+
var s = e.peekLexeme();
|
|
1521
|
+
if (s == null) {
|
|
1522
|
+
var i = 'expecting term, found nothing';
|
|
1523
|
+
throw new t.QueryParseError(i, n.start, n.end);
|
|
1524
|
+
}
|
|
1525
|
+
switch (s.type) {
|
|
1526
|
+
case t.QueryLexer.TERM:
|
|
1527
|
+
return t.QueryParser.parseTerm;
|
|
1528
|
+
default: {
|
|
1529
|
+
var i = `expecting term, found '${s.type}'`;
|
|
1530
|
+
throw new t.QueryParseError(i, s.start, s.end);
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
}),
|
|
1535
|
+
(t.QueryParser.parseTerm = (e) => {
|
|
1536
|
+
var n = e.consumeLexeme();
|
|
1537
|
+
if (n != null) {
|
|
1538
|
+
(e.currentClause.term = n.str.toLowerCase()),
|
|
1539
|
+
n.str.indexOf('*') !== -1 && (e.currentClause.usePipeline = !1);
|
|
1540
|
+
var r = e.peekLexeme();
|
|
1541
|
+
if (r == null) {
|
|
1542
|
+
e.nextClause();
|
|
1543
|
+
return;
|
|
1544
|
+
}
|
|
1545
|
+
switch (r.type) {
|
|
1546
|
+
case t.QueryLexer.TERM:
|
|
1547
|
+
return e.nextClause(), t.QueryParser.parseTerm;
|
|
1548
|
+
case t.QueryLexer.FIELD:
|
|
1549
|
+
return e.nextClause(), t.QueryParser.parseField;
|
|
1550
|
+
case t.QueryLexer.EDIT_DISTANCE:
|
|
1551
|
+
return t.QueryParser.parseEditDistance;
|
|
1552
|
+
case t.QueryLexer.BOOST:
|
|
1553
|
+
return t.QueryParser.parseBoost;
|
|
1554
|
+
case t.QueryLexer.PRESENCE:
|
|
1555
|
+
return e.nextClause(), t.QueryParser.parsePresence;
|
|
1556
|
+
default: {
|
|
1557
|
+
var i = `Unexpected lexeme type '${r.type}'`;
|
|
1558
|
+
throw new t.QueryParseError(i, r.start, r.end);
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
}),
|
|
1563
|
+
(t.QueryParser.parseEditDistance = (e) => {
|
|
1564
|
+
var n = e.consumeLexeme();
|
|
1565
|
+
if (n != null) {
|
|
1566
|
+
var r = Number.parseInt(n.str, 10);
|
|
1567
|
+
if (Number.isNaN(r)) {
|
|
1568
|
+
var i = 'edit distance must be numeric';
|
|
1569
|
+
throw new t.QueryParseError(i, n.start, n.end);
|
|
1570
|
+
}
|
|
1571
|
+
e.currentClause.editDistance = r;
|
|
1572
|
+
var s = e.peekLexeme();
|
|
1573
|
+
if (s == null) {
|
|
1574
|
+
e.nextClause();
|
|
1575
|
+
return;
|
|
1576
|
+
}
|
|
1577
|
+
switch (s.type) {
|
|
1578
|
+
case t.QueryLexer.TERM:
|
|
1579
|
+
return e.nextClause(), t.QueryParser.parseTerm;
|
|
1580
|
+
case t.QueryLexer.FIELD:
|
|
1581
|
+
return e.nextClause(), t.QueryParser.parseField;
|
|
1582
|
+
case t.QueryLexer.EDIT_DISTANCE:
|
|
1583
|
+
return t.QueryParser.parseEditDistance;
|
|
1584
|
+
case t.QueryLexer.BOOST:
|
|
1585
|
+
return t.QueryParser.parseBoost;
|
|
1586
|
+
case t.QueryLexer.PRESENCE:
|
|
1587
|
+
return e.nextClause(), t.QueryParser.parsePresence;
|
|
1588
|
+
default: {
|
|
1589
|
+
var i = `Unexpected lexeme type '${s.type}'`;
|
|
1590
|
+
throw new t.QueryParseError(i, s.start, s.end);
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
}),
|
|
1595
|
+
(t.QueryParser.parseBoost = (e) => {
|
|
1596
|
+
var n = e.consumeLexeme();
|
|
1597
|
+
if (n != null) {
|
|
1598
|
+
var r = Number.parseInt(n.str, 10);
|
|
1599
|
+
if (Number.isNaN(r)) {
|
|
1600
|
+
var i = 'boost must be numeric';
|
|
1601
|
+
throw new t.QueryParseError(i, n.start, n.end);
|
|
1602
|
+
}
|
|
1603
|
+
e.currentClause.boost = r;
|
|
1604
|
+
var s = e.peekLexeme();
|
|
1605
|
+
if (s == null) {
|
|
1606
|
+
e.nextClause();
|
|
1607
|
+
return;
|
|
1608
|
+
}
|
|
1609
|
+
switch (s.type) {
|
|
1610
|
+
case t.QueryLexer.TERM:
|
|
1611
|
+
return e.nextClause(), t.QueryParser.parseTerm;
|
|
1612
|
+
case t.QueryLexer.FIELD:
|
|
1613
|
+
return e.nextClause(), t.QueryParser.parseField;
|
|
1614
|
+
case t.QueryLexer.EDIT_DISTANCE:
|
|
1615
|
+
return t.QueryParser.parseEditDistance;
|
|
1616
|
+
case t.QueryLexer.BOOST:
|
|
1617
|
+
return t.QueryParser.parseBoost;
|
|
1618
|
+
case t.QueryLexer.PRESENCE:
|
|
1619
|
+
return e.nextClause(), t.QueryParser.parsePresence;
|
|
1620
|
+
default: {
|
|
1621
|
+
var i = `Unexpected lexeme type '${s.type}'`;
|
|
1622
|
+
throw new t.QueryParseError(i, s.start, s.end);
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
}),
|
|
1627
|
+
((e, n) => {
|
|
1628
|
+
typeof define === 'function' && define.amd
|
|
1629
|
+
? define(n)
|
|
1630
|
+
: typeof me === 'object'
|
|
1631
|
+
? (ge.exports = n())
|
|
1632
|
+
: (e.lunr = n());
|
|
1633
|
+
})(this, () => t);
|
|
1634
|
+
})();
|
|
1635
|
+
});
|
|
1636
|
+
var M;
|
|
1637
|
+
var G = {
|
|
1638
|
+
getItem() {
|
|
1639
|
+
return null;
|
|
1640
|
+
},
|
|
1641
|
+
setItem() {},
|
|
1642
|
+
};
|
|
1643
|
+
var K;
|
|
1644
|
+
try {
|
|
1645
|
+
(K = localStorage), (M = K);
|
|
1646
|
+
} catch {
|
|
1647
|
+
(K = G), (M = G);
|
|
1648
|
+
}
|
|
1649
|
+
var S = {
|
|
1650
|
+
getItem: (t) => M.getItem(t),
|
|
1651
|
+
setItem: (t, e) => M.setItem(t, e),
|
|
1652
|
+
disableWritingLocalStorage() {
|
|
1653
|
+
M = G;
|
|
1654
|
+
},
|
|
1655
|
+
disable() {
|
|
1656
|
+
localStorage.clear(), (M = G);
|
|
1657
|
+
},
|
|
1658
|
+
enable() {
|
|
1659
|
+
M = K;
|
|
1660
|
+
},
|
|
1661
|
+
};
|
|
1662
|
+
window.TypeDoc ||= {
|
|
1663
|
+
disableWritingLocalStorage() {
|
|
1664
|
+
S.disableWritingLocalStorage();
|
|
1665
|
+
},
|
|
1666
|
+
disableLocalStorage: () => {
|
|
1667
|
+
S.disable();
|
|
1668
|
+
},
|
|
1669
|
+
enableLocalStorage: () => {
|
|
1670
|
+
S.enable();
|
|
1671
|
+
},
|
|
1672
|
+
};
|
|
1673
|
+
window.translations ||= {
|
|
1674
|
+
copy: 'Copy',
|
|
1675
|
+
copied: 'Copied!',
|
|
1676
|
+
normally_hidden:
|
|
1677
|
+
'This member is normally hidden due to your filter settings.',
|
|
1678
|
+
hierarchy_expand: 'Expand',
|
|
1679
|
+
hierarchy_collapse: 'Collapse',
|
|
1680
|
+
search_index_not_available: 'The search index is not available',
|
|
1681
|
+
search_no_results_found_for_0: 'No results found for {0}',
|
|
1682
|
+
folder: 'Folder',
|
|
1683
|
+
kind_1: 'Project',
|
|
1684
|
+
kind_2: 'Module',
|
|
1685
|
+
kind_4: 'Namespace',
|
|
1686
|
+
kind_8: 'Enumeration',
|
|
1687
|
+
kind_16: 'Enumeration Member',
|
|
1688
|
+
kind_32: 'Variable',
|
|
1689
|
+
kind_64: 'Function',
|
|
1690
|
+
kind_128: 'Class',
|
|
1691
|
+
kind_256: 'Interface',
|
|
1692
|
+
kind_512: 'Constructor',
|
|
1693
|
+
kind_1024: 'Property',
|
|
1694
|
+
kind_2048: 'Method',
|
|
1695
|
+
kind_4096: 'Call Signature',
|
|
1696
|
+
kind_8192: 'Index Signature',
|
|
1697
|
+
kind_16384: 'Constructor Signature',
|
|
1698
|
+
kind_32768: 'Parameter',
|
|
1699
|
+
kind_65536: 'Type Literal',
|
|
1700
|
+
kind_131072: 'Type Parameter',
|
|
1701
|
+
kind_262144: 'Accessor',
|
|
1702
|
+
kind_524288: 'Get Signature',
|
|
1703
|
+
kind_1048576: 'Set Signature',
|
|
1704
|
+
kind_2097152: 'Type Alias',
|
|
1705
|
+
kind_4194304: 'Reference',
|
|
1706
|
+
kind_8388608: 'Document',
|
|
1707
|
+
};
|
|
1708
|
+
var pe = [];
|
|
1709
|
+
function X(t, e) {
|
|
1710
|
+
pe.push({ selector: e, constructor: t });
|
|
1711
|
+
}
|
|
1712
|
+
var Z = class {
|
|
1713
|
+
alwaysVisibleMember = null;
|
|
1714
|
+
constructor() {
|
|
1715
|
+
this.createComponents(document.body),
|
|
1716
|
+
this.ensureFocusedElementVisible(),
|
|
1717
|
+
this.listenForCodeCopies(),
|
|
1718
|
+
window.addEventListener('hashchange', () =>
|
|
1719
|
+
this.ensureFocusedElementVisible(),
|
|
1720
|
+
),
|
|
1721
|
+
document.body.style.display ||
|
|
1722
|
+
(this.ensureFocusedElementVisible(),
|
|
1723
|
+
this.updateIndexVisibility(),
|
|
1724
|
+
this.scrollToHash());
|
|
1725
|
+
}
|
|
1726
|
+
createComponents(e) {
|
|
1727
|
+
pe.forEach((n) => {
|
|
1728
|
+
e.querySelectorAll(n.selector).forEach((r) => {
|
|
1729
|
+
r.dataset.hasInstance ||
|
|
1730
|
+
(new n.constructor({ el: r, app: this }),
|
|
1731
|
+
(r.dataset.hasInstance = String(!0)));
|
|
1732
|
+
});
|
|
1733
|
+
});
|
|
1734
|
+
}
|
|
1735
|
+
filterChanged() {
|
|
1736
|
+
this.ensureFocusedElementVisible();
|
|
1737
|
+
}
|
|
1738
|
+
showPage() {
|
|
1739
|
+
document.body.style.display &&
|
|
1740
|
+
(document.body.style.removeProperty('display'),
|
|
1741
|
+
this.ensureFocusedElementVisible(),
|
|
1742
|
+
this.updateIndexVisibility(),
|
|
1743
|
+
this.scrollToHash());
|
|
1744
|
+
}
|
|
1745
|
+
scrollToHash() {
|
|
1746
|
+
if (location.hash) {
|
|
1747
|
+
const e = document.getElementById(location.hash.substring(1));
|
|
1748
|
+
if (!e) return;
|
|
1749
|
+
e.scrollIntoView({ behavior: 'instant', block: 'start' });
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
ensureActivePageVisible() {
|
|
1753
|
+
const e = document.querySelector('.tsd-navigation .current');
|
|
1754
|
+
let n = e?.parentElement;
|
|
1755
|
+
for (; n && !n.classList.contains('.tsd-navigation'); )
|
|
1756
|
+
n instanceof HTMLDetailsElement && (n.open = !0), (n = n.parentElement);
|
|
1757
|
+
if (e && !rt(e)) {
|
|
1758
|
+
const r =
|
|
1759
|
+
e.getBoundingClientRect().top -
|
|
1760
|
+
document.documentElement.clientHeight / 4;
|
|
1761
|
+
(document.querySelector('.site-menu').scrollTop = r),
|
|
1762
|
+
(document.querySelector('.col-sidebar').scrollTop = r);
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1765
|
+
updateIndexVisibility() {
|
|
1766
|
+
const e = document.querySelector('.tsd-index-content');
|
|
1767
|
+
const n = e?.open;
|
|
1768
|
+
e && (e.open = !0),
|
|
1769
|
+
document.querySelectorAll('.tsd-index-section').forEach((r) => {
|
|
1770
|
+
r.style.display = 'block';
|
|
1771
|
+
const i = Array.from(r.querySelectorAll('.tsd-index-link')).every(
|
|
1772
|
+
(s) => s.offsetParent == null,
|
|
1773
|
+
);
|
|
1774
|
+
r.style.display = i ? 'none' : 'block';
|
|
1775
|
+
}),
|
|
1776
|
+
e && (e.open = n);
|
|
1777
|
+
}
|
|
1778
|
+
ensureFocusedElementVisible() {
|
|
1779
|
+
if (
|
|
1780
|
+
(this.alwaysVisibleMember &&
|
|
1781
|
+
(this.alwaysVisibleMember.classList.remove('always-visible'),
|
|
1782
|
+
this.alwaysVisibleMember.firstElementChild.remove(),
|
|
1783
|
+
(this.alwaysVisibleMember = null)),
|
|
1784
|
+
!location.hash)
|
|
1785
|
+
)
|
|
1786
|
+
return;
|
|
1787
|
+
const e = document.getElementById(location.hash.substring(1));
|
|
1788
|
+
if (!e) return;
|
|
1789
|
+
let n = e.parentElement;
|
|
1790
|
+
for (; n && n.tagName !== 'SECTION'; ) n = n.parentElement;
|
|
1791
|
+
if (!n) return;
|
|
1792
|
+
const r = n.offsetParent == null;
|
|
1793
|
+
let i = n;
|
|
1794
|
+
for (; i !== document.body; )
|
|
1795
|
+
i instanceof HTMLDetailsElement && (i.open = !0), (i = i.parentElement);
|
|
1796
|
+
if (n.offsetParent == null) {
|
|
1797
|
+
(this.alwaysVisibleMember = n), n.classList.add('always-visible');
|
|
1798
|
+
const s = document.createElement('p');
|
|
1799
|
+
s.classList.add('warning'),
|
|
1800
|
+
(s.textContent = window.translations.normally_hidden),
|
|
1801
|
+
n.prepend(s);
|
|
1802
|
+
}
|
|
1803
|
+
r && e.scrollIntoView();
|
|
1804
|
+
}
|
|
1805
|
+
listenForCodeCopies() {
|
|
1806
|
+
document.querySelectorAll('pre > button').forEach((e) => {
|
|
1807
|
+
let n;
|
|
1808
|
+
e.addEventListener('click', () => {
|
|
1809
|
+
e.previousElementSibling instanceof HTMLElement &&
|
|
1810
|
+
navigator.clipboard.writeText(
|
|
1811
|
+
e.previousElementSibling.innerText.trim(),
|
|
1812
|
+
),
|
|
1813
|
+
(e.textContent = window.translations.copied),
|
|
1814
|
+
e.classList.add('visible'),
|
|
1815
|
+
clearTimeout(n),
|
|
1816
|
+
(n = setTimeout(() => {
|
|
1817
|
+
e.classList.remove('visible'),
|
|
1818
|
+
(n = setTimeout(() => {
|
|
1819
|
+
e.textContent = window.translations.copy;
|
|
1820
|
+
}, 100));
|
|
1821
|
+
}, 1e3));
|
|
1822
|
+
});
|
|
1823
|
+
});
|
|
1824
|
+
}
|
|
1825
|
+
};
|
|
1826
|
+
function rt(t) {
|
|
1827
|
+
const e = t.getBoundingClientRect();
|
|
1828
|
+
const n = Math.max(
|
|
1829
|
+
document.documentElement.clientHeight,
|
|
1830
|
+
window.innerHeight,
|
|
1831
|
+
);
|
|
1832
|
+
return !(e.bottom < 0 || e.top - n >= 0);
|
|
1833
|
+
}
|
|
1834
|
+
var fe = (t, e = 100) => {
|
|
1835
|
+
let n;
|
|
1836
|
+
return () => {
|
|
1837
|
+
clearTimeout(n), (n = setTimeout(() => t(), e));
|
|
1838
|
+
};
|
|
1839
|
+
};
|
|
1840
|
+
var Ie = nt(ye(), 1);
|
|
1841
|
+
async function R(t) {
|
|
1842
|
+
const e = Uint8Array.from(atob(t), (s) => s.charCodeAt(0));
|
|
1843
|
+
const r = new Blob([e])
|
|
1844
|
+
.stream()
|
|
1845
|
+
.pipeThrough(new DecompressionStream('deflate'));
|
|
1846
|
+
const i = await new Response(r).text();
|
|
1847
|
+
return JSON.parse(i);
|
|
1848
|
+
}
|
|
1849
|
+
var Y = 'closing';
|
|
1850
|
+
var ae = 'tsd-overlay';
|
|
1851
|
+
function it() {
|
|
1852
|
+
const t = Math.abs(
|
|
1853
|
+
window.innerWidth - document.documentElement.clientWidth,
|
|
1854
|
+
);
|
|
1855
|
+
(document.body.style.overflow = 'hidden'),
|
|
1856
|
+
(document.body.style.paddingRight = `${t}px`);
|
|
1857
|
+
}
|
|
1858
|
+
function st() {
|
|
1859
|
+
document.body.style.removeProperty('overflow'),
|
|
1860
|
+
document.body.style.removeProperty('padding-right');
|
|
1861
|
+
}
|
|
1862
|
+
function xe(t, e) {
|
|
1863
|
+
t.addEventListener('animationend', () => {
|
|
1864
|
+
t.classList.contains(Y) &&
|
|
1865
|
+
(t.classList.remove(Y),
|
|
1866
|
+
document.getElementById(ae)?.remove(),
|
|
1867
|
+
t.close(),
|
|
1868
|
+
st());
|
|
1869
|
+
}),
|
|
1870
|
+
t.addEventListener('cancel', (n) => {
|
|
1871
|
+
n.preventDefault(), ve(t);
|
|
1872
|
+
}),
|
|
1873
|
+
e?.closeOnClick &&
|
|
1874
|
+
document.addEventListener(
|
|
1875
|
+
'click',
|
|
1876
|
+
(n) => {
|
|
1877
|
+
t.open && !t.contains(n.target) && ve(t);
|
|
1878
|
+
},
|
|
1879
|
+
!0,
|
|
1880
|
+
);
|
|
1881
|
+
}
|
|
1882
|
+
function Ee(t) {
|
|
1883
|
+
if (t.open) return;
|
|
1884
|
+
const e = document.createElement('div');
|
|
1885
|
+
(e.id = ae), document.body.appendChild(e), t.showModal(), it();
|
|
1886
|
+
}
|
|
1887
|
+
function ve(t) {
|
|
1888
|
+
if (!t.open) return;
|
|
1889
|
+
document.getElementById(ae)?.classList.add(Y), t.classList.add(Y);
|
|
1890
|
+
}
|
|
1891
|
+
var I = class {
|
|
1892
|
+
el;
|
|
1893
|
+
app;
|
|
1894
|
+
constructor(e) {
|
|
1895
|
+
(this.el = e.el), (this.app = e.app);
|
|
1896
|
+
}
|
|
1897
|
+
};
|
|
1898
|
+
var be = document.head.appendChild(document.createElement('style'));
|
|
1899
|
+
be.dataset.for = 'filters';
|
|
1900
|
+
var le = {};
|
|
1901
|
+
function we(t) {
|
|
1902
|
+
for (const e of t.split(/\s+/))
|
|
1903
|
+
if (Object.hasOwn(le, e) && !le[e]) return !0;
|
|
1904
|
+
return !1;
|
|
1905
|
+
}
|
|
1906
|
+
var ee = class extends I {
|
|
1907
|
+
key;
|
|
1908
|
+
value;
|
|
1909
|
+
constructor(e) {
|
|
1910
|
+
super(e),
|
|
1911
|
+
(this.key = `filter-${this.el.name}`),
|
|
1912
|
+
(this.value = this.el.checked),
|
|
1913
|
+
this.el.addEventListener('change', () => {
|
|
1914
|
+
this.setLocalStorage(this.el.checked);
|
|
1915
|
+
}),
|
|
1916
|
+
this.setLocalStorage(this.fromLocalStorage()),
|
|
1917
|
+
(be.innerHTML += `html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }
|
|
1918
|
+
`),
|
|
1919
|
+
this.app.updateIndexVisibility();
|
|
1920
|
+
}
|
|
1921
|
+
fromLocalStorage() {
|
|
1922
|
+
const e = S.getItem(this.key);
|
|
1923
|
+
return e ? e === 'true' : this.el.checked;
|
|
1924
|
+
}
|
|
1925
|
+
setLocalStorage(e) {
|
|
1926
|
+
S.setItem(this.key, e.toString()),
|
|
1927
|
+
(this.value = e),
|
|
1928
|
+
this.handleValueChange();
|
|
1929
|
+
}
|
|
1930
|
+
handleValueChange() {
|
|
1931
|
+
(this.el.checked = this.value),
|
|
1932
|
+
document.documentElement.classList.toggle(this.key, this.value),
|
|
1933
|
+
(le[`tsd-is-${this.el.name}`] = this.value),
|
|
1934
|
+
this.app.filterChanged(),
|
|
1935
|
+
this.app.updateIndexVisibility();
|
|
1936
|
+
}
|
|
1937
|
+
};
|
|
1938
|
+
var Le = 0;
|
|
1939
|
+
async function Se(t, e) {
|
|
1940
|
+
if (!window.searchData) return;
|
|
1941
|
+
const n = await R(window.searchData);
|
|
1942
|
+
(t.data = n), (t.index = Ie.Index.load(n.index)), (e.innerHTML = '');
|
|
1943
|
+
}
|
|
1944
|
+
function _e() {
|
|
1945
|
+
const t = document.getElementById('tsd-search-trigger');
|
|
1946
|
+
const e = document.getElementById('tsd-search');
|
|
1947
|
+
const n = document.getElementById('tsd-search-input');
|
|
1948
|
+
const r = document.getElementById('tsd-search-results');
|
|
1949
|
+
const i = document.getElementById('tsd-search-script');
|
|
1950
|
+
const s = document.getElementById('tsd-search-status');
|
|
1951
|
+
if (!(t && e && n && r && i && s))
|
|
1952
|
+
throw new Error('Search controls missing');
|
|
1953
|
+
const o = { base: document.documentElement.dataset.base };
|
|
1954
|
+
o.base.endsWith('/') || (o.base += '/'),
|
|
1955
|
+
i.addEventListener('error', () => {
|
|
1956
|
+
const a = window.translations.search_index_not_available;
|
|
1957
|
+
Pe(s, a);
|
|
1958
|
+
}),
|
|
1959
|
+
i.addEventListener('load', () => {
|
|
1960
|
+
Se(o, s);
|
|
1961
|
+
}),
|
|
1962
|
+
Se(o, s),
|
|
1963
|
+
ot({ trigger: t, searchEl: e, results: r, field: n, status: s }, o);
|
|
1964
|
+
}
|
|
1965
|
+
function ot(t, e) {
|
|
1966
|
+
const { field: n, results: r, searchEl: i, status: s, trigger: o } = t;
|
|
1967
|
+
xe(i, { closeOnClick: !0 });
|
|
1968
|
+
function a() {
|
|
1969
|
+
Ee(i), n.setSelectionRange(0, n.value.length);
|
|
1970
|
+
}
|
|
1971
|
+
o.addEventListener('click', a),
|
|
1972
|
+
n.addEventListener(
|
|
1973
|
+
'input',
|
|
1974
|
+
fe(() => {
|
|
1975
|
+
at(r, n, s, e);
|
|
1976
|
+
}, 200),
|
|
1977
|
+
),
|
|
1978
|
+
n.addEventListener('keydown', (l) => {
|
|
1979
|
+
if (r.childElementCount === 0 || l.ctrlKey || l.metaKey || l.altKey)
|
|
1980
|
+
return;
|
|
1981
|
+
const d = n.getAttribute('aria-activedescendant');
|
|
1982
|
+
const f = d ? document.getElementById(d) : null;
|
|
1983
|
+
if (f) {
|
|
1984
|
+
let p = !1;
|
|
1985
|
+
let v = !1;
|
|
1986
|
+
switch (l.key) {
|
|
1987
|
+
case 'Home':
|
|
1988
|
+
case 'End':
|
|
1989
|
+
case 'ArrowLeft':
|
|
1990
|
+
case 'ArrowRight':
|
|
1991
|
+
v = !0;
|
|
1992
|
+
break;
|
|
1993
|
+
case 'ArrowDown':
|
|
1994
|
+
case 'ArrowUp':
|
|
1995
|
+
p = l.shiftKey;
|
|
1996
|
+
break;
|
|
1997
|
+
}
|
|
1998
|
+
(p || v) && ke(n);
|
|
1999
|
+
}
|
|
2000
|
+
if (!l.shiftKey)
|
|
2001
|
+
switch (l.key) {
|
|
2002
|
+
case 'Enter':
|
|
2003
|
+
f?.querySelector('a')?.click();
|
|
2004
|
+
break;
|
|
2005
|
+
case 'ArrowUp':
|
|
2006
|
+
Te(r, n, f, -1), l.preventDefault();
|
|
2007
|
+
break;
|
|
2008
|
+
case 'ArrowDown':
|
|
2009
|
+
Te(r, n, f, 1), l.preventDefault();
|
|
2010
|
+
break;
|
|
2011
|
+
}
|
|
2012
|
+
});
|
|
2013
|
+
function c() {
|
|
2014
|
+
ke(n);
|
|
2015
|
+
}
|
|
2016
|
+
n.addEventListener('change', c),
|
|
2017
|
+
n.addEventListener('blur', c),
|
|
2018
|
+
n.addEventListener('click', c),
|
|
2019
|
+
document.body.addEventListener('keydown', (l) => {
|
|
2020
|
+
if (l.altKey || l.metaKey || l.shiftKey) return;
|
|
2021
|
+
const d = l.ctrlKey && l.key === 'k';
|
|
2022
|
+
const f = !l.ctrlKey && !ut() && l.key === '/';
|
|
2023
|
+
(d || f) && (l.preventDefault(), a());
|
|
2024
|
+
});
|
|
2025
|
+
}
|
|
2026
|
+
function at(t, e, n, r) {
|
|
2027
|
+
if (!r.index || !r.data) return;
|
|
2028
|
+
(t.innerHTML = ''), (n.innerHTML = ''), (Le += 1);
|
|
2029
|
+
const i = e.value.trim();
|
|
2030
|
+
let s;
|
|
2031
|
+
if (i) {
|
|
2032
|
+
const a = i
|
|
2033
|
+
.split(' ')
|
|
2034
|
+
.map((c) => (c.length ? `*${c}*` : ''))
|
|
2035
|
+
.join(' ');
|
|
2036
|
+
s = r.index.search(a).filter(({ ref: c }) => {
|
|
2037
|
+
const l = r.data.rows[Number(c)].classes;
|
|
2038
|
+
return !l || !we(l);
|
|
2039
|
+
});
|
|
2040
|
+
} else s = [];
|
|
2041
|
+
if (s.length === 0 && i) {
|
|
2042
|
+
const a = window.translations.search_no_results_found_for_0.replace(
|
|
2043
|
+
'{0}',
|
|
2044
|
+
` "<strong>${te(i)}</strong>" `,
|
|
2045
|
+
);
|
|
2046
|
+
Pe(n, a);
|
|
2047
|
+
return;
|
|
2048
|
+
}
|
|
2049
|
+
for (let a = 0; a < s.length; a++) {
|
|
2050
|
+
const c = s[a];
|
|
2051
|
+
const l = r.data.rows[Number(c.ref)];
|
|
2052
|
+
let d = 1;
|
|
2053
|
+
l.name.toLowerCase().startsWith(i.toLowerCase()) &&
|
|
2054
|
+
(d *= 10 / (1 + Math.abs(l.name.length - i.length))),
|
|
2055
|
+
(c.score *= d);
|
|
2056
|
+
}
|
|
2057
|
+
s.sort((a, c) => c.score - a.score);
|
|
2058
|
+
const o = Math.min(10, s.length);
|
|
2059
|
+
for (let a = 0; a < o; a++) {
|
|
2060
|
+
const c = r.data.rows[Number(s[a].ref)];
|
|
2061
|
+
const d = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon" aria-label="${window.translations[`kind_${c.kind}`].replaceAll('"', '"')}"><use href="#icon-${c.icon || c.kind}"></use></svg>`;
|
|
2062
|
+
let f = Ce(c.name, i);
|
|
2063
|
+
globalThis.DEBUG_SEARCH_WEIGHTS &&
|
|
2064
|
+
(f += ` (score: ${s[a].score.toFixed(2)})`),
|
|
2065
|
+
c.parent &&
|
|
2066
|
+
(f = `<span class="parent">
|
|
2067
|
+
${Ce(c.parent, i)}.</span>${f}`);
|
|
2068
|
+
const p = document.createElement('li');
|
|
2069
|
+
(p.id = `tsd-search:${Le}-${a}`),
|
|
2070
|
+
(p.role = 'option'),
|
|
2071
|
+
(p.ariaSelected = 'false'),
|
|
2072
|
+
(p.classList.value = c.classes ?? '');
|
|
2073
|
+
const v = document.createElement('a');
|
|
2074
|
+
(v.tabIndex = -1),
|
|
2075
|
+
(v.href = r.base + c.url),
|
|
2076
|
+
(v.innerHTML = `${d}<span class="text">${f}</span>`),
|
|
2077
|
+
p.append(v),
|
|
2078
|
+
t.appendChild(p);
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
function Te(t, e, n, r) {
|
|
2082
|
+
let i;
|
|
2083
|
+
if (
|
|
2084
|
+
(r === 1
|
|
2085
|
+
? (i = n?.nextElementSibling || t.firstElementChild)
|
|
2086
|
+
: (i = n?.previousElementSibling || t.lastElementChild),
|
|
2087
|
+
i !== n)
|
|
2088
|
+
) {
|
|
2089
|
+
if (!i || i.role !== 'option') {
|
|
2090
|
+
console.error('Option missing');
|
|
2091
|
+
return;
|
|
2092
|
+
}
|
|
2093
|
+
(i.ariaSelected = 'true'),
|
|
2094
|
+
i.scrollIntoView({ behavior: 'smooth', block: 'nearest' }),
|
|
2095
|
+
e.setAttribute('aria-activedescendant', i.id),
|
|
2096
|
+
n?.setAttribute('aria-selected', 'false');
|
|
2097
|
+
}
|
|
2098
|
+
}
|
|
2099
|
+
function ke(t) {
|
|
2100
|
+
const e = t.getAttribute('aria-activedescendant');
|
|
2101
|
+
(e ? document.getElementById(e) : null)?.setAttribute(
|
|
2102
|
+
'aria-selected',
|
|
2103
|
+
'false',
|
|
2104
|
+
),
|
|
2105
|
+
t.setAttribute('aria-activedescendant', '');
|
|
2106
|
+
}
|
|
2107
|
+
function Ce(t, e) {
|
|
2108
|
+
if (e === '') return t;
|
|
2109
|
+
const n = t.toLocaleLowerCase();
|
|
2110
|
+
const r = e.toLocaleLowerCase();
|
|
2111
|
+
const i = [];
|
|
2112
|
+
let s = 0;
|
|
2113
|
+
let o = n.indexOf(r);
|
|
2114
|
+
for (; o !== -1; )
|
|
2115
|
+
i.push(
|
|
2116
|
+
te(t.substring(s, o)),
|
|
2117
|
+
`<mark>${te(t.substring(o, o + r.length))}</mark>`,
|
|
2118
|
+
),
|
|
2119
|
+
(s = o + r.length),
|
|
2120
|
+
(o = n.indexOf(r, s));
|
|
2121
|
+
return i.push(te(t.substring(s))), i.join('');
|
|
2122
|
+
}
|
|
2123
|
+
var lt = {
|
|
2124
|
+
'&': '&',
|
|
2125
|
+
'<': '<',
|
|
2126
|
+
'>': '>',
|
|
2127
|
+
"'": ''',
|
|
2128
|
+
'"': '"',
|
|
2129
|
+
};
|
|
2130
|
+
function te(t) {
|
|
2131
|
+
return t.replace(/[&<>"'"]/g, (e) => lt[e]);
|
|
2132
|
+
}
|
|
2133
|
+
function Pe(t, e) {
|
|
2134
|
+
t.innerHTML = e ? `<div>${e}</div>` : '';
|
|
2135
|
+
}
|
|
2136
|
+
var ct = [
|
|
2137
|
+
'button',
|
|
2138
|
+
'checkbox',
|
|
2139
|
+
'file',
|
|
2140
|
+
'hidden',
|
|
2141
|
+
'image',
|
|
2142
|
+
'radio',
|
|
2143
|
+
'range',
|
|
2144
|
+
'reset',
|
|
2145
|
+
'submit',
|
|
2146
|
+
];
|
|
2147
|
+
function ut() {
|
|
2148
|
+
const t = document.activeElement;
|
|
2149
|
+
return t
|
|
2150
|
+
? t.isContentEditable ||
|
|
2151
|
+
t.tagName === 'TEXTAREA' ||
|
|
2152
|
+
t.tagName === 'SEARCH'
|
|
2153
|
+
? !0
|
|
2154
|
+
: t.tagName === 'INPUT' && !ct.includes(t.type)
|
|
2155
|
+
: !1;
|
|
2156
|
+
}
|
|
2157
|
+
var D = 'mousedown';
|
|
2158
|
+
var Me = 'mousemove';
|
|
2159
|
+
var $ = 'mouseup';
|
|
2160
|
+
var ne = { x: 0, y: 0 };
|
|
2161
|
+
var Qe = !1;
|
|
2162
|
+
var ce = !1;
|
|
2163
|
+
var _dt = !1;
|
|
2164
|
+
var F = !1;
|
|
2165
|
+
var Oe =
|
|
2166
|
+
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
2167
|
+
navigator.userAgent,
|
|
2168
|
+
);
|
|
2169
|
+
document.documentElement.classList.add(Oe ? 'is-mobile' : 'not-mobile');
|
|
2170
|
+
Oe &&
|
|
2171
|
+
'ontouchstart' in document.documentElement &&
|
|
2172
|
+
((_dt = !0), (D = 'touchstart'), (Me = 'touchmove'), ($ = 'touchend'));
|
|
2173
|
+
document.addEventListener(D, (t) => {
|
|
2174
|
+
(ce = !0), (F = !1);
|
|
2175
|
+
const e = D === 'touchstart' ? t.targetTouches[0] : t;
|
|
2176
|
+
(ne.y = e.pageY || 0), (ne.x = e.pageX || 0);
|
|
2177
|
+
});
|
|
2178
|
+
document.addEventListener(Me, (t) => {
|
|
2179
|
+
if (ce && !F) {
|
|
2180
|
+
const e = D === 'touchstart' ? t.targetTouches[0] : t;
|
|
2181
|
+
const n = ne.x - (e.pageX || 0);
|
|
2182
|
+
const r = ne.y - (e.pageY || 0);
|
|
2183
|
+
F = Math.sqrt(n * n + r * r) > 10;
|
|
2184
|
+
}
|
|
2185
|
+
});
|
|
2186
|
+
document.addEventListener($, () => {
|
|
2187
|
+
ce = !1;
|
|
2188
|
+
});
|
|
2189
|
+
document.addEventListener('click', (t) => {
|
|
2190
|
+
Qe && (t.preventDefault(), t.stopImmediatePropagation(), (Qe = !1));
|
|
2191
|
+
});
|
|
2192
|
+
var re = class extends I {
|
|
2193
|
+
active;
|
|
2194
|
+
className;
|
|
2195
|
+
constructor(e) {
|
|
2196
|
+
super(e),
|
|
2197
|
+
(this.className = this.el.dataset.toggle || ''),
|
|
2198
|
+
this.el.addEventListener($, (n) => this.onPointerUp(n)),
|
|
2199
|
+
this.el.addEventListener('click', (n) => n.preventDefault()),
|
|
2200
|
+
document.addEventListener(D, (n) => this.onDocumentPointerDown(n)),
|
|
2201
|
+
document.addEventListener($, (n) => this.onDocumentPointerUp(n));
|
|
2202
|
+
}
|
|
2203
|
+
setActive(e) {
|
|
2204
|
+
if (this.active === e) return;
|
|
2205
|
+
(this.active = e),
|
|
2206
|
+
document.documentElement.classList.toggle(`has-${this.className}`, e),
|
|
2207
|
+
this.el.classList.toggle('active', e);
|
|
2208
|
+
const n = (this.active ? 'to-has-' : 'from-has-') + this.className;
|
|
2209
|
+
document.documentElement.classList.add(n),
|
|
2210
|
+
setTimeout(() => document.documentElement.classList.remove(n), 500);
|
|
2211
|
+
}
|
|
2212
|
+
onPointerUp(e) {
|
|
2213
|
+
F || (this.setActive(!0), e.preventDefault());
|
|
2214
|
+
}
|
|
2215
|
+
onDocumentPointerDown(e) {
|
|
2216
|
+
if (this.active) {
|
|
2217
|
+
if (e.target.closest('.col-sidebar, .tsd-filter-group')) return;
|
|
2218
|
+
this.setActive(!1);
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
onDocumentPointerUp(e) {
|
|
2222
|
+
if (!F && this.active && e.target.closest('.col-sidebar')) {
|
|
2223
|
+
const n = e.target.closest('a');
|
|
2224
|
+
if (n) {
|
|
2225
|
+
let r = window.location.href;
|
|
2226
|
+
r.indexOf('#') !== -1 && (r = r.substring(0, r.indexOf('#'))),
|
|
2227
|
+
n.href.substring(0, r.length) === r &&
|
|
2228
|
+
setTimeout(() => this.setActive(!1), 250);
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
};
|
|
2233
|
+
var ue = new Map();
|
|
2234
|
+
var de = class {
|
|
2235
|
+
open;
|
|
2236
|
+
accordions = [];
|
|
2237
|
+
key;
|
|
2238
|
+
constructor(e, n) {
|
|
2239
|
+
(this.key = e), (this.open = n);
|
|
2240
|
+
}
|
|
2241
|
+
add(e) {
|
|
2242
|
+
this.accordions.push(e),
|
|
2243
|
+
(e.open = this.open),
|
|
2244
|
+
e.addEventListener('toggle', () => {
|
|
2245
|
+
this.toggle(e.open);
|
|
2246
|
+
});
|
|
2247
|
+
}
|
|
2248
|
+
toggle(e) {
|
|
2249
|
+
for (const n of this.accordions) n.open = e;
|
|
2250
|
+
S.setItem(this.key, e.toString());
|
|
2251
|
+
}
|
|
2252
|
+
};
|
|
2253
|
+
var ie = class extends I {
|
|
2254
|
+
constructor(e) {
|
|
2255
|
+
super(e);
|
|
2256
|
+
const n = this.el.querySelector('summary');
|
|
2257
|
+
const r = n.querySelector('a');
|
|
2258
|
+
r?.addEventListener('click', () => {
|
|
2259
|
+
location.assign(r.href);
|
|
2260
|
+
});
|
|
2261
|
+
const i = `tsd-accordion-${n.dataset.key ?? n.textContent.trim().replace(/\s+/g, '-').toLowerCase()}`;
|
|
2262
|
+
let s;
|
|
2263
|
+
if (ue.has(i)) s = ue.get(i);
|
|
2264
|
+
else {
|
|
2265
|
+
const o = S.getItem(i);
|
|
2266
|
+
const a = o ? o === 'true' : this.el.open;
|
|
2267
|
+
(s = new de(i, a)), ue.set(i, s);
|
|
2268
|
+
}
|
|
2269
|
+
s.add(this.el);
|
|
2270
|
+
}
|
|
2271
|
+
};
|
|
2272
|
+
function He(t) {
|
|
2273
|
+
const e = S.getItem('tsd-theme') || 'os';
|
|
2274
|
+
(t.value = e),
|
|
2275
|
+
Ae(e),
|
|
2276
|
+
t.addEventListener('change', () => {
|
|
2277
|
+
S.setItem('tsd-theme', t.value), Ae(t.value);
|
|
2278
|
+
});
|
|
2279
|
+
}
|
|
2280
|
+
function Ae(t) {
|
|
2281
|
+
document.documentElement.dataset.theme = t;
|
|
2282
|
+
}
|
|
2283
|
+
var se;
|
|
2284
|
+
function Ne() {
|
|
2285
|
+
const t = document.getElementById('tsd-nav-script');
|
|
2286
|
+
t && (t.addEventListener('load', Re), Re());
|
|
2287
|
+
}
|
|
2288
|
+
async function Re() {
|
|
2289
|
+
const t = document.getElementById('tsd-nav-container');
|
|
2290
|
+
if (!t || !window.navigationData) return;
|
|
2291
|
+
const e = await R(window.navigationData);
|
|
2292
|
+
(se = document.documentElement.dataset.base),
|
|
2293
|
+
se.endsWith('/') || (se += '/'),
|
|
2294
|
+
(t.innerHTML = '');
|
|
2295
|
+
for (const n of e) Be(n, t, []);
|
|
2296
|
+
window.app.createComponents(t),
|
|
2297
|
+
window.app.showPage(),
|
|
2298
|
+
window.app.ensureActivePageVisible();
|
|
2299
|
+
}
|
|
2300
|
+
function Be(t, e, n) {
|
|
2301
|
+
const r = e.appendChild(document.createElement('li'));
|
|
2302
|
+
if (t.children) {
|
|
2303
|
+
const i = [...n, t.text];
|
|
2304
|
+
const s = r.appendChild(document.createElement('details'));
|
|
2305
|
+
s.className = t.class ? `${t.class} tsd-accordion` : 'tsd-accordion';
|
|
2306
|
+
const o = s.appendChild(document.createElement('summary'));
|
|
2307
|
+
(o.className = 'tsd-accordion-summary'),
|
|
2308
|
+
(o.dataset.key = i.join('$')),
|
|
2309
|
+
(o.innerHTML =
|
|
2310
|
+
'<svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>'),
|
|
2311
|
+
De(t, o);
|
|
2312
|
+
const a = s.appendChild(document.createElement('div'));
|
|
2313
|
+
a.className = 'tsd-accordion-details';
|
|
2314
|
+
const c = a.appendChild(document.createElement('ul'));
|
|
2315
|
+
c.className = 'tsd-nested-navigation';
|
|
2316
|
+
for (const l of t.children) Be(l, c, i);
|
|
2317
|
+
} else De(t, r, t.class);
|
|
2318
|
+
}
|
|
2319
|
+
function De(t, e, n) {
|
|
2320
|
+
if (t.path) {
|
|
2321
|
+
const r = e.appendChild(document.createElement('a'));
|
|
2322
|
+
if (
|
|
2323
|
+
((r.href = se + t.path),
|
|
2324
|
+
n && (r.className = n),
|
|
2325
|
+
location.pathname === r.pathname &&
|
|
2326
|
+
!r.href.includes('#') &&
|
|
2327
|
+
(r.classList.add('current'), (r.ariaCurrent = 'page')),
|
|
2328
|
+
t.kind)
|
|
2329
|
+
) {
|
|
2330
|
+
const i = window.translations[`kind_${t.kind}`].replaceAll(
|
|
2331
|
+
'"',
|
|
2332
|
+
'"',
|
|
2333
|
+
);
|
|
2334
|
+
r.innerHTML = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon" aria-label="${i}"><use href="#icon-${t.icon || t.kind}"></use></svg>`;
|
|
2335
|
+
}
|
|
2336
|
+
r.appendChild(Fe(t.text, document.createElement('span')));
|
|
2337
|
+
} else {
|
|
2338
|
+
const r = e.appendChild(document.createElement('span'));
|
|
2339
|
+
const i = window.translations.folder.replaceAll('"', '"');
|
|
2340
|
+
(r.innerHTML = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon" aria-label="${i}"><use href="#icon-folder"></use></svg>`),
|
|
2341
|
+
r.appendChild(Fe(t.text, document.createElement('span')));
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
function Fe(t, e) {
|
|
2345
|
+
const n = t.split(
|
|
2346
|
+
/(?<=[^A-Z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|(?<=[_-])(?=[^_-])/,
|
|
2347
|
+
);
|
|
2348
|
+
for (let r = 0; r < n.length; ++r)
|
|
2349
|
+
r !== 0 && e.appendChild(document.createElement('wbr')),
|
|
2350
|
+
e.appendChild(document.createTextNode(n[r]));
|
|
2351
|
+
return e;
|
|
2352
|
+
}
|
|
2353
|
+
var oe = document.documentElement.dataset.base;
|
|
2354
|
+
oe.endsWith('/') || (oe += '/');
|
|
2355
|
+
function $e() {
|
|
2356
|
+
document.querySelector('.tsd-full-hierarchy')
|
|
2357
|
+
? ht()
|
|
2358
|
+
: document.querySelector('.tsd-hierarchy') && pt();
|
|
2359
|
+
}
|
|
2360
|
+
function ht() {
|
|
2361
|
+
document.addEventListener('click', (r) => {
|
|
2362
|
+
let i = r.target;
|
|
2363
|
+
for (; i.parentElement && i.parentElement.tagName !== 'LI'; )
|
|
2364
|
+
i = i.parentElement;
|
|
2365
|
+
i.dataset.dropdown &&
|
|
2366
|
+
(i.dataset.dropdown = String(i.dataset.dropdown !== 'true'));
|
|
2367
|
+
});
|
|
2368
|
+
const t = new Map();
|
|
2369
|
+
const e = new Set();
|
|
2370
|
+
for (const r of document.querySelectorAll(
|
|
2371
|
+
'.tsd-full-hierarchy [data-refl]',
|
|
2372
|
+
)) {
|
|
2373
|
+
const i = r.querySelector('ul');
|
|
2374
|
+
t.has(r.dataset.refl)
|
|
2375
|
+
? e.add(r.dataset.refl)
|
|
2376
|
+
: i && t.set(r.dataset.refl, i);
|
|
2377
|
+
}
|
|
2378
|
+
for (const r of e) n(r);
|
|
2379
|
+
function n(r) {
|
|
2380
|
+
const i = t.get(r).cloneNode(!0);
|
|
2381
|
+
i.querySelectorAll('[id]').forEach((s) => {
|
|
2382
|
+
s.removeAttribute('id');
|
|
2383
|
+
}),
|
|
2384
|
+
i.querySelectorAll('[data-dropdown]').forEach((s) => {
|
|
2385
|
+
s.dataset.dropdown = 'false';
|
|
2386
|
+
});
|
|
2387
|
+
for (const s of document.querySelectorAll(`[data-refl="${r}"]`)) {
|
|
2388
|
+
const o = gt();
|
|
2389
|
+
const a = s.querySelector('ul');
|
|
2390
|
+
s.insertBefore(o, a),
|
|
2391
|
+
(o.dataset.dropdown = String(!!a)),
|
|
2392
|
+
a || s.appendChild(i.cloneNode(!0));
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
function pt() {
|
|
2397
|
+
const t = document.getElementById('tsd-hierarchy-script');
|
|
2398
|
+
t && (t.addEventListener('load', Ve), Ve());
|
|
2399
|
+
}
|
|
2400
|
+
async function Ve() {
|
|
2401
|
+
const t = document.querySelector('.tsd-panel.tsd-hierarchy:has(h4 a)');
|
|
2402
|
+
if (!t || !window.hierarchyData) return;
|
|
2403
|
+
const e = +t.dataset.refl;
|
|
2404
|
+
const n = await R(window.hierarchyData);
|
|
2405
|
+
const r = t.querySelector('ul');
|
|
2406
|
+
const i = document.createElement('ul');
|
|
2407
|
+
if (
|
|
2408
|
+
(i.classList.add('tsd-hierarchy'),
|
|
2409
|
+
ft(i, n, e),
|
|
2410
|
+
r.querySelectorAll('li').length === i.querySelectorAll('li').length)
|
|
2411
|
+
)
|
|
2412
|
+
return;
|
|
2413
|
+
const s = document.createElement('span');
|
|
2414
|
+
s.classList.add('tsd-hierarchy-toggle'),
|
|
2415
|
+
(s.textContent = window.translations.hierarchy_expand),
|
|
2416
|
+
t.querySelector('h4 a')?.insertAdjacentElement('afterend', s),
|
|
2417
|
+
s.insertAdjacentText('beforebegin', ', '),
|
|
2418
|
+
s.addEventListener('click', () => {
|
|
2419
|
+
s.textContent === window.translations.hierarchy_expand
|
|
2420
|
+
? (r.insertAdjacentElement('afterend', i),
|
|
2421
|
+
r.remove(),
|
|
2422
|
+
(s.textContent = window.translations.hierarchy_collapse))
|
|
2423
|
+
: (i.insertAdjacentElement('afterend', r),
|
|
2424
|
+
i.remove(),
|
|
2425
|
+
(s.textContent = window.translations.hierarchy_expand));
|
|
2426
|
+
});
|
|
2427
|
+
}
|
|
2428
|
+
function ft(t, e, n) {
|
|
2429
|
+
const r = e.roots.filter((i) => mt(e, i, n));
|
|
2430
|
+
for (const i of r) t.appendChild(je(e, i, n));
|
|
2431
|
+
}
|
|
2432
|
+
function je(t, e, n, r = new Set()) {
|
|
2433
|
+
if (r.has(e)) return;
|
|
2434
|
+
r.add(e);
|
|
2435
|
+
const i = t.reflections[e];
|
|
2436
|
+
const s = document.createElement('li');
|
|
2437
|
+
if ((s.classList.add('tsd-hierarchy-item'), e === n)) {
|
|
2438
|
+
const o = s.appendChild(document.createElement('span'));
|
|
2439
|
+
(o.textContent = i.name), o.classList.add('tsd-hierarchy-target');
|
|
2440
|
+
} else {
|
|
2441
|
+
for (const a of i.uniqueNameParents || []) {
|
|
2442
|
+
const c = t.reflections[a];
|
|
2443
|
+
const l = s.appendChild(document.createElement('a'));
|
|
2444
|
+
(l.textContent = c.name),
|
|
2445
|
+
(l.href = oe + c.url),
|
|
2446
|
+
(l.className = `${c.class} tsd-signature-type`),
|
|
2447
|
+
s.append(document.createTextNode('.'));
|
|
2448
|
+
}
|
|
2449
|
+
const o = s.appendChild(document.createElement('a'));
|
|
2450
|
+
(o.textContent = t.reflections[e].name),
|
|
2451
|
+
(o.href = oe + i.url),
|
|
2452
|
+
(o.className = `${i.class} tsd-signature-type`);
|
|
2453
|
+
}
|
|
2454
|
+
if (i.children) {
|
|
2455
|
+
const o = s.appendChild(document.createElement('ul'));
|
|
2456
|
+
o.classList.add('tsd-hierarchy');
|
|
2457
|
+
for (const a of i.children) {
|
|
2458
|
+
const c = je(t, a, n, r);
|
|
2459
|
+
c && o.appendChild(c);
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
return r.delete(e), s;
|
|
2463
|
+
}
|
|
2464
|
+
function mt(t, e, n) {
|
|
2465
|
+
if (e === n) return !0;
|
|
2466
|
+
const r = new Set();
|
|
2467
|
+
const i = [t.reflections[e]];
|
|
2468
|
+
for (; i.length; ) {
|
|
2469
|
+
const s = i.pop();
|
|
2470
|
+
if (!r.has(s)) {
|
|
2471
|
+
r.add(s);
|
|
2472
|
+
for (const o of s.children || []) {
|
|
2473
|
+
if (o === n) return !0;
|
|
2474
|
+
i.push(t.reflections[o]);
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
return !1;
|
|
2479
|
+
}
|
|
2480
|
+
function gt() {
|
|
2481
|
+
const t = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
2482
|
+
return (
|
|
2483
|
+
t.setAttribute('width', '20'),
|
|
2484
|
+
t.setAttribute('height', '20'),
|
|
2485
|
+
t.setAttribute('viewBox', '0 0 24 24'),
|
|
2486
|
+
t.setAttribute('fill', 'none'),
|
|
2487
|
+
(t.innerHTML = '<use href="#icon-chevronDown"></use>'),
|
|
2488
|
+
t
|
|
2489
|
+
);
|
|
2490
|
+
}
|
|
2491
|
+
X(re, 'a[data-toggle]');
|
|
2492
|
+
X(ie, '.tsd-accordion');
|
|
2493
|
+
X(ee, '.tsd-filter-item input[type=checkbox]');
|
|
2494
|
+
var qe = document.getElementById('tsd-theme');
|
|
2495
|
+
qe && He(qe);
|
|
2496
|
+
var yt = new Z();
|
|
2497
|
+
Object.defineProperty(window, 'app', { value: yt });
|
|
2498
|
+
_e();
|
|
2499
|
+
Ne();
|
|
2500
|
+
$e();
|
|
2501
|
+
'virtualKeyboard' in navigator &&
|
|
2502
|
+
(navigator.virtualKeyboard.overlaysContent = !0);
|
|
2503
|
+
})();
|
|
7
2504
|
/*! Bundled license information:
|
|
8
2505
|
|
|
9
2506
|
lunr/lunr.js:
|