import{render as t,nothing as e}from"../lit-html.js";import{directive as s,Directive as i}from"../directive.js";import{isTemplateResult as r,getCommittedValue as n,setCommittedValue as o,insertPart as l,clearPart as a,isCompiledTemplateResult as c}from"../directive-helpers.js";
/**
 * @license
 * Copyright 2017 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const d=t=>c(t)?t._$litType$.h:t.strings,m=s(class extends i{constructor(t){super(t),this.et=new WeakMap}render(t){return[t]}update(s,[i]){const c=r(this.it)?d(this.it):null,m=r(i)?d(i):null;if(null!==c&&(null===m||c!==m)){const i=n(s).pop();let r=this.et.get(c);if(void 0===r){const s=document.createDocumentFragment();r=t(e,s),r.setConnected(!1),this.et.set(c,r)}o(r,[i]),l(r,void 0,i)}if(null!==m){if(null===c||c!==m){const t=this.et.get(m);if(void 0!==t){const e=n(t).pop();a(s),l(s,void 0,e),o(s,[e])}}this.it=i}else this.it=void 0;return this.render(i)}});export{m as cache};