Initializes the widgets of the template after the HTML markup returned by getMarkup has been inserted in
the DOM.
@param {HTMLElement} tplDiv element in which the HTML markup has been inserted
774672
function (tplDiv) {
            var params = this._cfg;
            /* check parameter: */
            this.$assert(320, tplDiv != null);
            /* must not be already linked: */
            this.$assert(322, params.tplDiv == null);
            /* must already have a markup waiting to be linked: */
            this.$assert(324, this._mainSection != null);
            params.tplDiv = tplDiv;
            params.div = (tplDiv.parentNode) ? tplDiv.parentNode : null;
            this.__addDebugInfo(tplDiv);
            this.insertSection(this._mainSection, true);
            // getMarkup + linkToPreviousMarkup is in fact doing the first refresh
            // so we call $afterRefresh here as well
            this.afterRefresh();
            this.$raiseEvent({
                name : "SectionRefreshed",
                sectionID : null
            });
        }
766117
function () {
            aria.html.Template.superclass.initWidget.call(this);
            var tplDiv = ariaUtilsDom.getElementById(this._domId);
            this._subTplDiv = tplDiv;

            if (this._initCtxDone) {
                var tplCtxt = this.subTplCtxt;
                tplDiv.className = tplDiv.className + " " + this._cssClassNames;
                tplCtxt.linkToPreviousMarkup(tplDiv);
                tplCtxt.viewReady();
            }
        }
198389
function makeInsertMarkup(markup, afterNode, toIndex) {
  // NOTE: Null values reduce hidden classes.
  return {
    type: 'INSERT_MARKUP',
    content: markup,
    fromIndex: null,
    fromNode: null,
    toIndex: toIndex,
    afterNode: afterNode
  };
}
1279231
function (tmpCfg, callback) {
            var div = tmpCfg.div;
            // check if the div is still in the dom
            // (because it could be inside a template which was refreshed, so no longer in the dom)
            if (!ariaUtilsDom.isInDom(div)) {
                this.$callback(callback);
                return;
            }
            var tplWidget = div.__widget;
            Aria.loadTemplate(tmpCfg, function (args) {
                // remap widget content
                if (args.success && tplWidget) {
                    var tplCtxt = args.tplCtxt;
                    var tplCtxtManager = ariaTemplatesTemplateCtxtManager;
                    // TODO: find a cleaner way to do this
                    // as this template is inside a template widget, it is not a root template
                    // (even if we reloaded it with Aria.loadTemplate)
                    // This is necessary for the inspector not to display the template twice:
                    tplCtxtManager.remove(tplCtxt); // remove the template from the list of root templates
                    args.tplCtxt._cfg.isRootTemplate = false; // remove the root template flag
                    tplCtxtManager.add(tplCtxt); // add the template back to the list of templates
                    tplWidget.subTplCtxt = tplCtxt; // add the reference to the template context in the template
                    // widget
                }

                if (callback != null) {
                    this.$callback(callback);
                }
            });
        }
1253773
function () {
		//trace(this.data)
		// Create Layout
		this._el.container 				= TL.Dom.create("div", "tl-timeera");
		if (this.data.unique_id) {
			this._el.container.id 		= this.data.unique_id + "-era";
		}

		if (this.data.end_date) {
			this.has_end_date = true;
			this._el.container.className = 'tl-timeera tl-timeera-with-end';
		}

		this._el.content_container		= TL.Dom.create("div", "tl-timeera-content-container", this._el.container);

		this._el.background 			= TL.Dom.create("div", "tl-timeera-background", this._el.content_container);

		this._el.content				= TL.Dom.create("div", "tl-timeera-content", this._el.content_container);

		

		// Text
		this._el.text					= TL.Dom.create("div", "tl-timeera-text", this._el.content);
		this._text						= TL.Dom.create("h2", "tl-headline", this._el.text);
		if (this.data.text.headline && this.data.text.headline != "") {
			this._text.innerHTML		= TL.Util.unlinkify(this.data.text.headline);
		} 



		// Fire event that the slide is loaded
		this.onLoaded();

	}
1334349
function (cfg, context, lineNumber) {
            /**
             * The widget configuration, as declared in the template.
             * @protected
             * @type Object
             */
            this._cfg = cfg;

            /**
             * Template context
             * @protected
             * @type aria.templates.TemplateCtxt
             */
            this._context = context;

            /**
             * Line number for this widget
             * @protected
             * @type Number
             */
            this._lineNumber = lineNumber;

            /**
             * Array of used dynamic ids.
             * @protected
             * @type Array
             */
            this._dynamicIds = null;

            // Notify the Skin Manager that a new widget was created
            ariaTemplatesCSSMgr.loadWidgetDependencies(this.$classpath, this.$css);

            /**
             * True if the CSS is loaded, false otherwise. This is to make sure the CSS is not unloaded twice.
             * @type Boolean
             */
            this.__cssLoaded = true;
        }
1041293
function () {
        var self = this;

        self.parent()._lastRect = null;

        DomUtils.css(self.getEl(), { width: '', height: '' });

        self._layoutRect = self._lastRepaintRect = self._lastLayoutRect = null;
        self.initLayoutRect();
      }
142253
function() {
            var element = this.element,
                template = this.template,
                offset = element.offset(),
                width = element.outerWidth(),
                height = element.outerHeight(),
                position = this.options.position,
                alignment = this.options.alignment,
                styles = {},
                self = this;

            template.show();

            // Place the template
            switch (position) {
                case 'bottom':
                    styles.top = offset.top + height;
                    break;
                case 'right':
                    styles.left = offset.left + width;
                    break;
                case 'top':
                    styles.top = offset.top - template.outerHeight();
                    break;
                case 'left':
                    styles.left = offset.left - template.outerWidth();
                    break;
            }

            // Align the template arrow
            switch (alignment) {
                case 'left':
                    styles.left = offset.left;
                    break;
                case 'right':
                    styles.left = offset.left + width - template.outerWidth();
                    break;
            }

            template.css(styles);
        }
830597
function TmplObject(markup, options) {
		// Template object constructor
		var htmlTag,
			wrapMap = $viewsSettings.wrapMap || {},
			tmpl = $extend(
				{
					markup: markup,
					tmpls: [],
					links: {},
					bnds: [],
					render: renderContent
				},
				options
			);

		if (!options.htmlTag) {
			// Set tmpl.tag to the top-level HTML tag used in the template, if any...
			htmlTag = rFirstElem.exec(markup);
			tmpl.htmlTag = htmlTag ? htmlTag[1].toLowerCase() : "";
		}
		htmlTag = wrapMap[tmpl.htmlTag];
		if (htmlTag && htmlTag !== wrapMap.div) {
			// When using JsViews, we trim templates which are inserted into HTML contexts where text nodes are not rendered (i.e. not 'Phrasing Content').
			tmpl.markup = $.trim(tmpl.markup);
			tmpl._elCnt = TRUE; // element content model (no rendered text nodes), not phrasing content model
		}

		return tmpl;
	}
1142960
public function init()
    {
        $this->attachBehavior('TbWidget', new TbWidget);
        $this->copyId();
        if (is_string($this->alerts)) {
            $colors = explode(' ', $this->alerts);
        } else {
            if (!isset($this->alerts)) {
                $colors = array(
                    TbHtml::ALERT_COLOR_SUCCESS,
                    TbHtml::ALERT_COLOR_WARNING,
                    TbHtml::ALERT_COLOR_INFO,
                    TbHtml::ALERT_COLOR_DANGER,
                ); // render all styles by default
            }
        }
        if (isset($colors)) {
            $this->alerts = array();
            foreach ($colors as $color) {
                $this->alerts[$color] = array();
            }
        }
    }
805252
function(context, parent, args, container) {
		var name = args[0],
			template = args[1],
			node = document.createElement(name);
		template.toDOM(node, context, container);
		parent.appendChild(node);
	}
45981
function initViewerHTML() {
        // create viewer HTML
        $el.html(Crocodoc.viewerTemplate);
        if (config.useWindowAsViewport) {
            config.$viewport = $(window);
            $el.addClass(CSS_CLASS_WINDOW_AS_VIEWPORT);
        } else {
            config.$viewport = $el.find('.' + CSS_CLASS_VIEWPORT);
        }
        config.$doc = $el.find('.' + CSS_CLASS_DOC);
    }
1052796
function initializeWhenRendered(element) {

  // If the component has been rendered, our height should be nonzero.
  if (element.clientHeight === 0) {
    // Not rendered yet: wait a bit before trying again.
    setTimeout(() => initializeWhenRendered(element), 10);
    return;
  }

  // If we reach this point, the component's elements should by styled.

  // For auto-sizing to work, we need the text copy to have the same border,
  // padding, and other relevant characteristics as the original text area.
  // Since those aspects are affected by CSS, we have to wait until the
  // element is in the document before we can update the text copy.
  const textBoxStyle = getComputedStyle(element.inner);
  const copyContainerStyle = element.$.copyContainer.style;
  copyContainerStyle.borderBottomStyle  = textBoxStyle.borderBottomStyle;
  copyContainerStyle.borderBottomWidth  = textBoxStyle.borderBottomWidth;
  copyContainerStyle.borderLeftStyle    = textBoxStyle.borderLeftStyle;
  copyContainerStyle.borderLeftWidth    = textBoxStyle.borderLeftWidth;
  copyContainerStyle.borderRightStyle   = textBoxStyle.borderRightStyle;
  copyContainerStyle.borderRightWidth   = textBoxStyle.borderRightWidth;
  copyContainerStyle.borderTopStyle     = textBoxStyle.borderTopStyle;
  copyContainerStyle.borderTopWidth     = textBoxStyle.borderTopWidth;
  copyContainerStyle.paddingBottom      = textBoxStyle.paddingBottom;
  copyContainerStyle.paddingLeft        = textBoxStyle.paddingLeft;
  copyContainerStyle.paddingRight       = textBoxStyle.paddingRight;
  copyContainerStyle.paddingTop         = textBoxStyle.paddingTop;

  // Use the extraLine member to gauge the expected height of a single line of
  // text. We can't use lineHeight, because that can be reported as "normal",
  // and we want to know the actual pixel height.
  element.$.extraLine.style.display = 'inherit';
  element[lineHeightSymbol] = element.$.extraLine.clientHeight;

  // Now that we know the line height, we can hide the extra line.
  element.$.extraLine.style.display = 'none';

  // Use the line height in conjunction with minimumRows to establish the
  // overall minimum height of the component.
  setMinimumHeight(element);
}
585556
function init() {
        _isInitialized = true;

        foldCode.init();
        foldGutter.init();

        // Many CodeMirror modes specify which fold helper should be used for that language. For a few that
        // don't, we register helpers explicitly here. We also register a global helper for generic indent-based
        // folding, which cuts across all languages if enabled via preference.
        CodeMirror.registerGlobalHelper("fold", "selectionFold", function (mode, cm) {
            return prefs.getSetting("makeSelectionsFoldable");
        }, selectionFold);
        CodeMirror.registerGlobalHelper("fold", "indent", function (mode, cm) {
            return prefs.getSetting("alwaysUseIndentFold");
        }, indentFold);

        CodeMirror.registerHelper("fold", "handlebars", handlebarsFold);
        CodeMirror.registerHelper("fold", "htmlhandlebars", handlebarsFold);
        CodeMirror.registerHelper("fold", "htmlmixed", handlebarsFold);

        EditorManager.on("activeEditorChange.CodeFolding", onActiveEditorChanged);
        DocumentManager.on("documentRefreshed.CodeFolding", function (event, doc) {
            restoreLineFolds(doc._masterEditor);
        });

        ProjectManager.on("beforeProjectClose.CodeFolding beforeAppClose.CodeFolding", saveBeforeClose);

        //create menus
        codeFoldingMenuDivider = Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).addMenuDivider();
        Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).addMenuItem(COLLAPSE_ALL);
        Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).addMenuItem(EXPAND_ALL);
        Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).addMenuItem(COLLAPSE);
        Menus.getMenu(Menus.AppMenuBar.VIEW_MENU).addMenuItem(EXPAND);

        //register keybindings
        KeyBindingManager.addBinding(COLLAPSE_ALL, [ {key: collapseAllKey}, {key: collapseAllKeyMac, platform: "mac"} ]);
        KeyBindingManager.addBinding(EXPAND_ALL, [ {key: expandAllKey}, {key: expandAllKeyMac, platform: "mac"} ]);
        KeyBindingManager.addBinding(COLLAPSE, collapseKey);
        KeyBindingManager.addBinding(EXPAND, expandKey);


        // Add gutters & restore saved expand/collapse state in all currently open editors
        Editor.registerGutter(GUTTER_NAME, CODE_FOLDING_GUTTER_PRIORITY);
        Editor.forEveryEditor(function (editor) {
            enableFoldingInEditor(editor);
        });
    }
899763
function _instantiate( Widget, group ) {
    let opts = {};

    if ( !Widget.name ) {
        return console.error( 'widget doesn\'t have a name' );
    }

    if ( Widget.helpersRequired && Widget.helpersRequired.length > 0 ) {
        opts.helpers = {};
        Widget.helpersRequired.forEach( helper => {
            opts.helpers[ helper ] = options[ helper ];
        } );
    }

    const elements = _getElements( group, Widget.selector );

    if ( !elements.length ) {
        return;
    }

    new Collection( elements ).instantiate( Widget, opts );

    _setLangChangeListener( Widget, elements );
    _setOptionChangeListener( Widget, elements );
    _setValChangeListener( Widget, elements );
}
1019525
function(element) {

		if (this._is_inDOM) Lava.t("inject: widget is already in DOM");
		if (Lava.schema.DEBUG && this._parent_view) Lava.t("Widget: only top-level widgets can be inserted into DOM");
		if (Lava.schema.DEBUG && !this._container) Lava.t("Widget: root widgets must have a container");
		if (Lava.schema.DEBUG && !this._container.isElementContainer) Lava.t("injectIntoExistingElement expects an element containers");

		Lava.ScopeManager.refresh();

		Lava.ScopeManager.lock();
		this._container.captureExistingElement(element);
		this._container.setHTML(this._renderContent());
		Lava.ScopeManager.unlock();

		// rewritten broadcastInDOM - without this._container.informInDOM()
		this._is_inDOM = true;
		this._is_dirty = false;
		this._broadcastToChildren('broadcastInDOM');

	}
1265637
function init(form_id) {
        var form = document.forms[form_id];
        if (form === undefined) {
            throw new Error('Form with ID ' + form_id + ' not found in DOM!');
        }
        if (this._collection[form_id] !== undefined) {
            throw new Error('Form with ID ' + form_id + ' already initiated!');
        }
        this._collection[form_id] = new BunnyFormData(form);
        this._attachChangeAndDefaultFileEvent(form_id);
        this._attachRadioListChangeEvent(form_id);
        this._attachDOMChangeEvent(form_id);
    }