PageSourceSearch

https://fepbrochures-bcbsa.com/assets/custom-scripts/portal/v2/documenttools.js?v=TTYJ7gUGy0OuT7tCrG0v0Q2

js fepbrochures-bcbsa.com collected 2026-10-08 08:22:03 UTC 12,172 bytes, 338 lines download raw bytes

1window.addEventListener('DOMContentLoaded', () => {
2
3    const sidebarToggle = document.querySelector('#sidebar-toggle');
4
5    if (sidebarToggle) {
6        const aside = document.querySelector('#aside');
7        const content = document.querySelector('#content');
8        const toolTip = sidebarToggle.querySelector('.tool-tip');
9        const openText = sidebarToggle.dataset.opentext;
10        const closeText = sidebarToggle.dataset.closetext;
11        const tools = document.querySelector('#tools');
12
13        const hideAside = () => {
14            aside.setAttribute('hidden', 'true');
15
16            if (tools.classList.contains('tools-right-sidebar')) {
17                tools.classList.remove('sidebar-right');
18            }
19
20            if (tools.classList.contains('tools-left-sidebar')) {
21                tools.classList.remove('sidebar-left');
22            }
23
24            if (sidebarToggle.hasAttribute("data-sidebar-right")) {
25                content.classList.remove('sidebar-right');
26            }
27            content.classList.remove('sidebar-left');
28            sidebarToggle.setAttribute('aria-expanded', 'false');
29            toolTip.textContent = openText;
30        }
31
32        const showAside = () => {
33            aside.removeAttribute('hidden');
34
35            if (tools.classList.contains('tools-right-sidebar')) {
36                tools.classList.add('sidebar-right');
37            }
38
39            if (tools.classList.contains('tools-left-sidebar')) {
40                tools.classList.add('sidebar-left');
41            }
42
43            if (sidebarToggle.hasAttribute("data-sidebar-right")) {
44                content.classList.add('sidebar-right');
45            }
46            content.classList.add('sidebar-left');
47            sidebarToggle.setAttribute('aria-expanded', 'true');
48            toolTip.textContent = closeText;
49        }
50
51        sidebarToggle.addEventListener('click', e => {
52            const expanded = sidebarToggle.getAttribute('aria-expanded') === 'true' ? true : false;
53
54            if (expanded) {
55                hideAside();
56            } else {
57                showAside();
58            }
59        });
60
61        const mobileLayout = window.matchMedia('(max-width: 1083.98px)');
62        if (mobileLayout.matches) {
63            hideAside();
64        }
65    }
66
67
68    const actionsDropdownBtn = document.querySelector('#actions-dropdown-btn');
69
70    if (actionsDropdownBtn) {
71
72        const dropdownContent = document.querySelector('#actions-dropdown div');
73        if (dropdownContent.children.length > 0) {
74
75            document.addEventListener('click', e => {
76                const dropdown = document.querySelector('#actions-dropdown');
77                const hidden = dropdown.hasAttribute('hidden');
78
79                if (e.target.matches('#actions-dropdown-btn') || e.target.matches('#actions-dropdown-btn .fa')) {
80                    if (hidden) {
81                        dropdown.removeAttribute('hidden');
82                        actionsDropdownBtn.setAttribute('aria-expanded', 'true');
83                    } else {
84                        dropdown.setAttribute('hidden', 'true');
85                        actionsDropdownBtn.setAttribute('aria-expanded', 'false');
86                    }
87                } else {
88                    if (!hidden && !e.target.classList.contains('actions-dropdown-click')) {
89                        dropdown.setAttribute('hidden', 'true');
90                        actionsDropdownBtn.setAttribute('aria-expanded', 'false');
91                    }
92                }
93            });
94
95            document.querySelectorAll('.actions-dropdown-click').forEach(el => {
96                el.addEventListener('blur', e => {
97
98                    if (e.relatedTarget?.classList.contains('actions-dropdown-click')) return;
99
100                    document.querySelector('#actions-dropdown').setAttribute('hidden', 'true');
101                    actionsDropdownBtn.setAttribute('aria-expanded', 'false');
102                });
103            });
104        } else {
105            document.querySelector('#actions-wrapper').remove();
106        }
107    }
108
109    const docVersionId = document.querySelector('#ced');
110    const editVersionLink = document.querySelector('#edit-version');
111
112    if (docVersionId) {
113        const href = `/document/editversion/${docVersionId.textContent}`;
114        if (editVersionLink)
115            editVersionLink.href = href;
116    } else {
117        if (editVersionLink)
118            editVersionLink.remove();
119    }
120
121    var inApp = false;
122    if (typeof inNativeApp !== "undefined") {
123        inApp = inNativeApp;
124    } else if (typeof ZavantaGlobalValues !== "undefined") {
125        inApp = ZavantaGlobalValues.InNativeApp;
126    }
127
128    if (inApp) {
129
130        if (window.location.href != null) {
131            var value = $.trim(window.location.href);
132            if (value.indexOf("#") >= 0) {
133                var split = value.split("#");
134                if (split.length > 0) {
135                    value = split[0];
136                }
137            }
138
139            if (value.indexOf("?") >= 0) {
140                $("#tools #printed-version") .attr("href", value + '&format=print');
141            } else {
142                $("#tools #printed-version").attr("href", value + '?format=print');
143            }
144        }
145
146        
147    }
148    else {
149        $("#tools #printed-version").click(function () {
150            if (window.location.href != null) {
151                var value = $.trim(window.location.href);
152                if (value.indexOf("#") >= 0) {
153                    var split = value.split("#");
154                    if (split.length > 0) {
155                        value = split[0];
156                    }
157                }
158
159
160                if (value.indexOf("?") >= 0) {
161                    window.open(value + '&format=print');
162                } else {
163                    window.open(value + '?format=print');
164                }
165            }
166        });
167    }
168
169    
170
171    const docHistoryLink = $(".previous-container");
172    if (docHistoryLink.length > 0) {
173        const href = `/sitehistory/${docHistoryLink.data("sid")}/${pdid}/${docHistoryLink.data("tid")}`;
174        docHistoryLink.prop('href', href);
175    }
176
177    $("#tools #change-bar-toggle").click(function () {
178        $(this).toggleClass("selected");
179        if ($(this).hasClass("selected")) {
180            $(".change-bar").show();
181            $(this).find('.fa').removeClass('fa-file-text-o').addClass('fa-file-text');
182            $(".accordian-change-bar").addClass('active');
183        }
184        else {
185            $(".change-bar").hide();
186            $(this).find('.fa').removeClass('fa-file-text').addClass('fa-file-text-o');
187            $(".accordian-change-bar").removeClass('active');
188        }
189    });
190
191    if ($(".subscribe-container,.notify-container").length > 0) {
192
193        var submitObject = {};
194        if ($(".subscribe-container").length > 0) {
195            if (typeof pdid !== 'undefined') {
196                submitObject = {
197                    type: "subscribe",
198                    did: pdid,
199                    wid: $(".subscribe-container").data("sid"),
200                    tid: $(".subscribe-container").data("tid")
201                };
202            }
203        } else {
204            submitObject = {
205                type: "subscribe",
206                wid: $(".notify-container").data("sid")
207            };
208        }
209
210
211        $.ajax({
212            context: { showSpinner: true, parent: self.window },
213            url: "/dynamicoutput/getcommand",
214            data: { json: JSON.stringify(submitObject) },
215            dataType: "json",
216            type: "POST",
217            success: function (result) {
218                if (result.notify) {
219                    $(".notify-container").css('display', 'flex');
220                }
221                if (result.success) {
222                    if (result.value) {
223                        $(".subscribe-container i").removeClass("fa-bell-o").addClass("fa-bell");
224                    }
225                }
226            },
227            error: function (requestObject, error, errorThrown) {
228            },
229        });
230        $(".subscribe-container").click(function () {
231            var state = false;
232            if ($(this).find("i").hasClass("fa-bell-o")) {
233                $(".subscribe-container i").removeClass("fa-bell-o").addClass("fa-bell");
234                state = true;
235            } else {
236                $(".subscribe-container i").removeClass("fa-bell").addClass("fa-bell-o");
237            }
238            $.ajax({
239                context: { showSpinner: true, parent: self.window },
240                url: "/dynamicoutput/sendcommand",
241                data: { json: JSON.stringify({ type: "subscribe", did: pdid, tid: $(".subscribe-container").data("tid"), wid: $(".favorite-container").data("sid"), state: state }) },
242                dataType: "json",
243                type: "POST"
244            });
245        });
246    }
247
248    PopulateSendLink();
249
250    $("#send-link").click(function () {
251        var copyTextarea = $('#send-link-url');
252        copyTextarea.show();
253        copyTextarea.focus();
254        copyTextarea.select();
255        try {
256            var successful = document.execCommand('copy');
257            copyTextarea.hide();
258            if (successful) {
259                $("#copy-status").show();
260                setTimeout(function () {
261                    $("#copy-status").hide();
262                },
263                    2000);
264            }
265        } catch (err) {
266            console.log('Unable to copy: ' + err);
267        }
268    });
269});
270
271function PopulateSendLink() {
272    var href = window.location.href;
273    var split = href.split("/");
274    var replaceName = "securitycenter";
275    var replaceKey = "Pa8Loa90P"
276    var helpSystem = false;
277    var zavanta6 = false;
278    if ($.trim(href).toLowerCase().indexOf("services.zavanta.com") >= 0) {
279        replaceName = "services";
280        replaceKey = "Ro1Aty2b"
281    }
282    else if ($.trim(href).toLowerCase().indexOf("help.zavanta.com") >= 0) {
283        helpSystem = true;
284        if ($.trim(href).toLowerCase().indexOf("z6-help.zavanta.com") >= 0) {
285            zavanta6 = true;
286        }
287    }
288    var page = "";
289    if (split.length > 1) {
290        var tempPage = $.trim(split[split.length - 1]);
291        var extensionSplit = tempPage.split(".");
292        if (extensionSplit.length > 1) {
293            tempPage = extensionSplit[0];
294        }
295        if (helpSystem) {
296            var segment = "zoh2x";
297            if (zavanta6) {
298                segment = "zoh6x";
299            }
300            if ($.trim(tempPage) !== "") {
301                page = `https://help.zavanta.com/help/${segment}/${$.trim(tempPage)}`;
302            }
303            else {
304                page = `https://help.zavanta.com/help/${segment}`;
305            }
306        }
307        else if ($.trim(tempPage) !== "") {
308            page = "https://" + $.trim(window.location.host).replace(replaceName, "help") + "/login/" + replaceName + "/" + replaceKey + "?returnUrl=/" + $.trim(tempPage) + ".html";
309        }
310    }
311    if ($.trim(page) !== "") {
312        $("#send-link-url").val(page);
313    } else {
314        if (helpSystem) {
315            var segment = "zoh2x";
316            if (zavanta6) {
317                segment = "zoh6x";
318            }
319            page = `https://help.zavanta.com/help/${segment}`;
320        }
321        else {
322            page = "https://" + $.trim(window.location.host).replace(replaceName, "help") + "/login/" + replaceName + "/" + replaceKey;
323        }
324        $("#send-link-url").val(page);
325    }
326}
327
328function ExecuteFileLink(url, otherWindow) {
329    var link = document.createElement('a');
330    if (otherWindow) {
331        $(link).attr("target", "_blank");
332    }
333    document.body.appendChild(link); // Firefox requires the link to be in the body
334    link.href = url;
335    link.click();
336    document.body.removeChild(link); // remove the link when done
337
338}

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.