Rocky_Mountain_Vending/.pnpm-store/v10/files/6a/46a7b4f4eb8ecb3e3bddc415de301d5449ec73ba9c3e7e4683d9dbd6b8a327bdb4163fbaa6d18f5b3d88e440e9558735dcde69afbe017188a6acb5ca918d95
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

66 lines
No EOL
1.8 KiB
Text

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkVisibility = void 0;
exports.pierce = pierce;
exports.pierceAll = pierceAll;
/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
const HIDDEN_VISIBILITY_VALUES = ['hidden', 'collapse'];
/**
* @internal
*/
const checkVisibility = (node, visible) => {
if (!node) {
return visible === false;
}
if (visible === undefined) {
return node;
}
const element = (node.nodeType === Node.TEXT_NODE ? node.parentElement : node);
const style = window.getComputedStyle(element);
const isVisible = style &&
!HIDDEN_VISIBILITY_VALUES.includes(style.visibility) &&
!isBoundingBoxEmpty(element);
return visible === isVisible ? node : false;
};
exports.checkVisibility = checkVisibility;
function isBoundingBoxEmpty(element) {
const rect = element.getBoundingClientRect();
return rect.width === 0 || rect.height === 0;
}
const hasShadowRoot = (node) => {
return 'shadowRoot' in node && node.shadowRoot instanceof ShadowRoot;
};
/**
* @internal
*/
function* pierce(root) {
if (hasShadowRoot(root)) {
yield root.shadowRoot;
}
else {
yield root;
}
}
/**
* @internal
*/
function* pierceAll(root) {
root = pierce(root).next().value;
yield root;
const walkers = [document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT)];
for (const walker of walkers) {
let node;
while ((node = walker.nextNode())) {
if (!node.shadowRoot) {
continue;
}
yield node.shadowRoot;
walkers.push(document.createTreeWalker(node.shadowRoot, NodeFilter.SHOW_ELEMENT));
}
}
}
//# sourceMappingURL=util.js.map