/*
 * Copyright (c) 2018, 2025, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const SLOT="slot";module.exports=function(context){var node=context.tagNode;if(!context.utils.metaLib.hasTagSlot(context.tag)){node=_checkParentElems(context)}return node};function _checkParentElems(context){var parent,isOjDefer=false,ret=null;parent=context.tagNode.parent;isOjDefer=context.tag==="oj-defer";while(parent){if(parent&&parent.name){if(parent.name==="body"){break}ret=context.utils.metaLib.hasTagSlot(parent.name);if(ret){ret=parent;break}if(isOjDefer&&parent.name==="template"||parent.name==="oj-switcher"){ret=parent;break}}parent=parent.parent}return ret};