"use strict";const c=require("./query-assigned-elements-8EurZY45.js"),o=require("./directive-C7oCP5Bh.js");/**
 * @license
 * Copyright 2018 Google LLC
 * SPDX-License-Identifier: BSD-3-Clause
 */const u="important",l=" !"+u,d=o.e(class extends o.i{constructor(n){var t;if(super(n),n.type!==o.t.ATTRIBUTE||n.name!=="style"||((t=n.strings)===null||t===void 0?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((t,s)=>{const e=n[s];return e==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${e};`},"")}update(n,[t]){const{style:s}=n.element;if(this.ht===void 0){this.ht=new Set;for(const e in t)this.ht.add(e);return this.render(t)}this.ht.forEach(e=>{t[e]==null&&(this.ht.delete(e),e.includes("-")?s.removeProperty(e):s[e]="")});for(const e in t){const i=t[e];if(i!=null){this.ht.add(e);const r=typeof i=="string"&&i.endsWith(l);e.includes("-")||r?s.setProperty(e,r?i.slice(0,-11):i,r?u:""):s[e]=i}}return c.T}});exports.o=d;
