PageSourceSearch

https://augustawinecountry.com/georgiaprintco-shop.com/components/com_sppagebuilder/assets/js/addons/image.js

js augustawinecountry.com collected 2026-10-08 11:13:37 UTC 3,139 bytes, 74 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opens = _____WB$wombat$assign$function_____("opens");
10(() => {
11    'use strict';
12
13    const processImageShapes = (currentDocument = document, isProcessOnLoad = false) => {
14        const wrapperElements = currentDocument?.querySelectorAll('.sppb-addon-image-shape');
15        
16        wrapperElements.forEach((wrapperElement) => {
17            const path = wrapperElement.querySelector('svg path');
18            const image = wrapperElement.querySelector('img');
19            
20            if (!image || !path) {
21                return;
22            }
23
24            const updateSVGStyle = (image) => {
25                const dataScale = image.getAttribute('data-scale') || 1;
26                const translateX = image.width / 2;
27                const translateY = image.height / 2;
28                path.setAttribute('transform', 'translate(' + translateX + ',' + translateY + ') scale(' + dataScale + ')');
29                image.style.visibility = null;
30            }
31            
32            if (isProcessOnLoad) {
33                image.onload = () => {
34                    updateSVGStyle(image);
35                }
36
37                return;
38            }
39            
40            updateSVGStyle(image);
41        })
42    }
43
44    document.addEventListener('DOMContentLoaded', function () {
45        processImageShapes(document, false);
46        
47        document.getElementById('sp-pagebuilder-view')?.addEventListener('load', () => {
48            const pageBuilderIframe = window.frames['sp-pagebuilder-view'];
49
50            if (!pageBuilderIframe) {
51                return;
52            }
53
54            const container = pageBuilderIframe?.window.document.getElementById('sp-pagebuilder-container');
55            if (container) {
56                processImageShapes(container, true);
57
58                const config = { attributes: true, childList: true, subtree: true };
59                const observer = new MutationObserver(function (mutations) {
60                    mutations.forEach(function (mutation) {                            
61                        if (mutation.type === 'childList' || mutation.type === 'subtree') {
62                            if (mutation.target === container || container.contains(mutation.target)) {
63                                processImageShapes(container, true);
64                            }
65                        }
66                    });
67                });
68
69                observer.observe(container, config);
70            }
71        })
72    });
73})();
74}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.