{"version":3,"sources":["../../../src/instructions/AddStaticHTML.instruction.ts"],"names":[],"mappings":";;;;;AAUO,IAAM,wBAAA,GAAN,cAAuC,WAAA,CAAoD;AAAA,EAE9F,WAAA,CACI,QACA,KAAA,EACF;AACE,IAAA,IAAI,WAAW,KAAA,EAAO;AAClB,MAAA,KAAA,CAAM,KAAyE,CAAA;AAAA,IACnF,CAAA,MAAO;AACH,MAAA,KAAA,CAAM,mBAAA,CAAoB,aAAA,EAAe,MAAA,EAAQ,KAAK,CAAA;AAAA,IAC1D;AAAA,EACJ;AACJ;AAZa,wBAAA,GAAN,eAAA,CAAA;AAAA,EAJN,QAAQ,MAAA,CAAO;AAAA,IACZ,SAAA,EAAW,YAAA;AAAA,IACX,WAAA,EAAa;AAAA,GAChB;AAAA,CAAA,EACY,wBAAA,CAAA","file":"AddStaticHTML.instruction.mjs","sourcesContent":["import { A_Frame } from \"@adaas/a-frame/core\"\nimport { AreDeclaration, AreMutation, AreInstructionSerialized } from \"@adaas/are\";\nimport { AreHtmlAddStaticHTMLInstructionPayload } from \"./AreHTML.instructions.types\";\nimport { AreHTMLInstructions } from \"./AreHTML.instructions.constants\";\n\n\n@A_Frame.Define({\n    namespace: 'a-are-html',\n    description: 'Materialises a fully static subtree (a \"static island\") onto its parent element in a single pass via browser-parsed innerHTML / a cached <template> clone. Apply injects the markup; revert clears it. Decodes HTML entities (e.g. &nbsp;) for free.'\n})\nexport class AddStaticHTMLInstruction extends AreMutation<AreHtmlAddStaticHTMLInstructionPayload> {\n\n    constructor(\n        parent: AreDeclaration,\n        props: AreHtmlAddStaticHTMLInstructionPayload | AreInstructionSerialized<AreHtmlAddStaticHTMLInstructionPayload>\n    ) {\n        if ('aseid' in props) {\n            super(props as AreInstructionSerialized<AreHtmlAddStaticHTMLInstructionPayload>);\n        } else {\n            super(AreHTMLInstructions.AddStaticHTML, parent, props);\n        }\n    }\n}\n"]}