File: cache.js

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (7 lines) | stat: -rw-r--r-- 984 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
import{render as t,nothing as i}from'../lit-html.js';import{directive as s,Directive as e}from'../directive.js';import{isTemplateResult as o,getCommittedValue as n,setCommittedValue as r,insertPart as l,clearPart as c,isCompiledTemplateResult as u}from'../directive-helpers.js';
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const d=t=>u(t)?t._$litType$.h:t.strings,h=s(class extends e{constructor(t){super(t),this.tt=new WeakMap}render(t){return[t]}update(s,[e]){const u=o(this.et)?d(this.et):null,h=o(e)?d(e):null;if(null!==u&&(null===h||u!==h)){const e=n(s).pop();let o=this.tt.get(u);if(void 0===o){const s=document.createDocumentFragment();o=t(i,s),o.setConnected(!1),this.tt.set(u,o)}r(o,[e]),l(o,void 0,e)}if(null!==h){if(null===u||u!==h){const t=this.tt.get(h);if(void 0!==t){const i=n(t).pop();c(s),l(s,void 0,i),r(s,[i])}}this.et=e}else this.et=void 0;return this.render(e)}});export{h as cache};
//# sourceMappingURL=cache.js.map