PageSourceSearch

https://tf.tfrrs.org/assets/Sidebar-2b8a4fb8775cad5c8f48b4e9072c520a128c93de44277a03f356ffccd442f049.js

js tfrrs.org collected 2026-10-02 02:58:50 UTC 3,780 bytes, 108 lines download raw bytes

1(function (global, factory) {
2  if (typeof define === "function" && define.amd) {
3    define('/Section/Sidebar', ['exports', 'jquery', 'Base', 'Plugin'], factory);
4  } else if (typeof exports !== "undefined") {
5    factory(exports, require('jquery'), require('Base'), require('Plugin'));
6  } else {
7    var mod = {
8      exports: {}
9    };
10    factory(mod.exports, global.jQuery, global.Base, global.Plugin);
11    global.SectionSidebar = mod.exports;
12  }
13})(this, function (exports, _jquery, _Base2, _Plugin) {
14  'use strict';
15
16  Object.defineProperty(exports, "__esModule", {
17    value: true
18  });
19
20  var _jquery2 = babelHelpers.interopRequireDefault(_jquery);
21
22  var _Base3 = babelHelpers.interopRequireDefault(_Base2);
23
24  var _class = function (_Base) {
25    babelHelpers.inherits(_class, _Base);
26
27    function _class() {
28      babelHelpers.classCallCheck(this, _class);
29      return babelHelpers.possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
30    }
31
32    babelHelpers.createClass(_class, [{
33      key: 'processed',
34      value: function processed() {
35        if (typeof _jquery2.default.slidePanel === 'undefined') {
36          return;
37        }
38        var sidebar = this;
39        (0, _jquery2.default)(document).on('click', '[data-toggle="site-sidebar"]', function () {
40          var $this = (0, _jquery2.default)(this);
41
42          var direction = 'right';
43          if ((0, _jquery2.default)('body').hasClass('site-menubar-flipped')) {
44            direction = 'left';
45          }
46
47          var options = _jquery2.default.extend({}, (0, _Plugin.getDefaults)('slidePanel'), {
48            direction: direction,
49            skin: 'site-sidebar',
50            dragTolerance: 80,
51            template: function template(options) {
52              return '<div class="' + options.classes.base + ' ' + options.classes.base + '-' + options.direction + '">\n\t    <div class="' + options.classes.content + ' site-sidebar-content"></div>\n\t    <div class="slidePanel-handler"></div>\n\t    </div>';
53            },
54            afterLoad: function afterLoad() {
55              var self = this;
56              this.$panel.find('.tab-pane').asScrollable({
57                namespace: 'scrollable',
58                contentSelector: '> div',
59                containerSelector: '> div'
60              });
61
62              sidebar.initializePlugins(self.$panel);
63
64              this.$panel.on('shown.bs.tab', function () {
65                self.$panel.find('.tab-pane.active').asScrollable('update');
66              });
67            },
68            beforeShow: function beforeShow() {
69              if (!$this.hasClass('active')) {
70                $this.addClass('active');
71              }
72            },
73            afterHide: function afterHide() {
74              if ($this.hasClass('active')) {
75                $this.removeClass('active');
76              }
77            }
78          });
79
80          if ($this.hasClass('active')) {
81            _jquery2.default.slidePanel.hide();
82          } else {
83            var url = $this.data('url');
84            if (!url) {
85              url = $this.attr('href');
86              url = url && url.replace(/.*(?=#[^\s]*$)/, '');
87            }
88
89            _jquery2.default.slidePanel.show({
90              url: url
91            }, options);
92          }
93        });
94
95        (0, _jquery2.default)(document).on('click', '[data-toggle="show-chat"]', function () {
96          (0, _jquery2.default)('#conversation').addClass('active');
97        });
98
99        (0, _jquery2.default)(document).on('click', '[data-toggle="close-chat"]', function () {
100          (0, _jquery2.default)('#conversation').removeClass('active');
101        });
102      }
103    }]);
104    return _class;
105  }(_Base3.default);
106
107  exports.default = _class;
108});

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.