Include jquery entwine
192327
public static function include_entwine()
    {
        if (self::$disabled || in_array('entwine', self::$included)) {
            return;
        }
        switch (self::config()->jquery_ui) {
            case self::JQUERY_FRAMEWORK:
                Requirements::javascript('framework/javascript/thirdparty/jquery-entwine/jquery.entwine-dist.js');
                Requirements::block(FORM_EXTRAS_PATH . '/javascript/entwine/jquery.entwine-dist.js');
                Requirements::block(FORM_EXTRAS_PATH . '/javascript/entwine/jquery.entwine-dist.min.js');
                break;
            default:
                Requirements::block('framework/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js');
                if (Director::isDev()) {
                    Requirements::javascript(FORM_EXTRAS_PATH . '/javascript/entwine/jquery.entwine-dist.js');
                } else {
                    Requirements::javascript(FORM_EXTRAS_PATH . '/javascript/entwine/jquery.entwine-dist.min.js');
                }
                break;
        }
        self::$included[] = 'entwine';
    }
404998
function _initDragAndDrop(tree) {
	var dnd = tree.options.dnd || null;
	// Register 'connectToFancytree' option with ui.draggable
	if( dnd ) {
		_registerDnd();
	}
	// Attach ui.draggable to this Fancytree instance
	if(dnd && dnd.dragStart ) {
		tree.widget.element.draggable($.extend({
			addClasses: false,
			appendTo: "body",
			containment: false,
			delay: 0,
			distance: 4,
			revert: false,
			scroll: true, // to disable, also set css 'position: inherit' on ul.fancytree-container
			scrollSpeed: 7,
			scrollSensitivity: 10,
			// Delegate draggable.start, drag, and stop events to our handler
			connectToFancytree: true,
			// Let source tree create the helper element
			helper: function(event) {
				var sourceNode = $.ui.fancytree.getNode(event.target);
				if(!sourceNode){ // Dynatree issue 211
					// might happen, if dragging a table *header*
					return "<div>ERROR?: helper requested but sourceNode not found</div>";
				}
				return sourceNode.tree.ext.dnd._onDragEvent("helper", sourceNode, null, event, null, null);
			},
			start: function(event, ui) {
				var sourceNode = ui.helper.data("ftSourceNode");
				return !!sourceNode; // Abort dragging if no node could be found
			}
		}, tree.options.dnd.draggable));
	}
	// Attach ui.droppable to this Fancytree instance
	if(dnd && dnd.dragDrop) {
		tree.widget.element.droppable($.extend({
			addClasses: false,
			tolerance: "intersect",
			greedy: false
/*
			activate: function(event, ui) {
				logMsg("droppable - activate", event, ui, this);
			},
			create: function(event, ui) {
				logMsg("droppable - create", event, ui);
			},
			deactivate: function(event, ui) {
				logMsg("droppable - deactivate", event, ui);
			},
			drop: function(event, ui) {
				logMsg("droppable - drop", event, ui);
			},
			out: function(event, ui) {
				logMsg("droppable - out", event, ui);
			},
			over: function(event, ui) {
				logMsg("droppable - over", event, ui);
			}
*/
		}, tree.options.dnd.droppable));
	}
}
807413
function bundleApp(codeList, ns, domload, compile, before, npmTree, o) {
  var l = []
    , usedBuiltIns = npmTree._builtIns
    , len = 0;
  delete npmTree._builtIns;

  // 1. construct the global namespace object
  l.push("window." + ns + " = {data:{}, path:{}};");

  // 2. attach path code to the namespace object so that require.js can efficiently resolve paths
  l.push('\n// include npm::path');
  var pathCode = read(join(builtInDir, 'path.posix.js'));
  l.push('(function (exports) {\n ' + pathCode + '\n}(window.' + ns + '.path));');

  // 3. pull in serialized data
  Object.keys(o.data).forEach(function (name) {
    return l.push(ns + ".data." + name + " = " + o.data[name] + ";");
  });

  // 4. attach require code
  var config = {
    namespace : ns
  , domains   : Object.keys(o.domains) // TODO: remove npm from here
  , arbiters  : o.arbiters
  , logging   : o.logLevel
  , npmTree   : npmTree
  , builtIns  : builtIns
  , slash     : '/' //TODO: figure out if different types can coexist, if so, determine in resolver, and on client
  };

  l.push(anonWrap(read(join(dir, 'require.js'))
    .replace(/VERSION/, JSON.parse(read(join(dir, '..', 'package.json'))).version)
    .replace(/REQUIRECONFIG/, JSON.stringify(config))
  ));

  // 5. include CommonJS compatible code in the order they have to be defined
  var defineWrap = function (exportName, domain, code) {
    return ns + ".define('" + exportName + "','" + domain + "',function (require, module, exports) {\n" + code + "\n});";
  };

  // 6. harvest function splits code into app and non-app code and defineWraps
  var harvest = function (onlyMain) {
    codeList.forEach(function (pair) {
      var dom = pair[0]
        , file = pair[1]
        , basename = file.split('.')[0];
      if ((dom === 'app') !== onlyMain) {
        return;
      }
      var code = before(compile(join(o.domains[dom], file)));
      l.push(defineWrap(basename, dom, code));
    });
  };

  // 7.a) include required builtIns
  l.push("\n// node builtins\n");
  len = l.length;
  usedBuiltIns.forEach(function (b) {
    if (b === 'path') { // already included
      return;
    }
    l.push(defineWrap(b, 'npm', read(join(builtInDir, b + '.js'))));
  });
  if (l.length === len) {
    l.pop();
  }

  // 7.b) include modules not on the app domain
  l.push("\n// shared code\n");
  len = l.length;
  harvest(false);
  if (l.length === len) {
    l.pop();
  }

  // 7.c) include modules on the app domain, and wait for domloader if set
  l.push("\n// app code - safety wrapped\n\n");
  domload(harvest(true));

  // 8. use a closure to encapsulate the private internal data and APIs
  return anonWrap(l.join('\n'));
}
543704
function(el, mixer, data) {
            var self = this,
                id   = '';

            self.callActions('beforeInit', arguments);

            self.mixer = mixer;

            if (!el) {
                // If no element is provided, render it

                el = self.render(data);
            }

            self.cacheDom(el);

            self.bindEvents();

            if (self.dom.el.style.display !== 'none') {
                self.isShown = true;
            }

            if (data && mixer.config.data.uidKey) {
                if (typeof (id = data[mixer.config.data.uidKey]) === 'undefined' || id.toString().length < 1) {
                    throw new TypeError(mixitup.messages.errorDatasetInvalidUidKey({
                        uidKey: mixer.config.data.uidKey
                    }));
                }

                self.id     = id;
                self.data   = data;

                mixer.cache[id] = self;
            }

            self.callActions('afterInit', arguments);
        }
281784
function (t, e) {
            var cmenu = this, x = e.pageX, y = e.pageY;

            if (cmenu._div)
                cmenu._div.css('height', 'auto').css('overflow-y', 'auto');

            cmenu.target = t; // Preserve the object that triggered this context menu so menu item click methods can see it
            cmenu._showEvent = e; // Preserve the event that triggered this context menu so menu item click methods can see it
            if (cmenu.beforeShow() !== false) {
                // If the menu content is a function, call it to populate the menu each time it is displayed
                if (cmenu.menuFunction) {
                    if (cmenu.menu) {
                        $(cmenu.menu).remove();
                    }
                    cmenu.menu = cmenu.createMenu(cmenu.menuFunction(cmenu, t), cmenu);
                    cmenu.menu.css({display: 'none'});
                    $(cmenu.appendTo).append(cmenu.menu);
                }
                var $c = cmenu.menu;
                x += cmenu.offsetX;
                y += cmenu.offsetY;
                var pos = cmenu.getPosition(x, y, cmenu, e); // Extracted to method for extensibility
                cmenu.showShadow(pos.x, pos.y, e);
                // Resize the iframe if needed
                if (cmenu.useIframe) {
                    $c.find('iframe').css({
                        width: $c.width() + cmenu.shadowOffsetX + cmenu.shadowWidthAdjust,
                        height: $c.height() + cmenu.shadowOffsetY + cmenu.shadowHeightAdjust
                    });
                }
                if (cmenu.dropDown) {
                    $c.css('visibility', 'hidden').show();

                    var bodySize = {x: $(window).width(), y: $(window).height()};

                    if ($(t).offset().top + $(t).outerHeight() + $c.height() > bodySize.y) {
                        if ($(t).offset().left + $(t).outerWidth() + $c.width() > bodySize.x)
                            $c.css({
                                top: ($(t).offset().top - $c.outerHeight()) + "px",
                                left: ($(t).offset().left - $c.outerWidth()) + "px",
                                position: "absolute",
                                zIndex: 9999
                            })[cmenu.showTransition](cmenu.showSpeed, ((cmenu.showCallback) ? function () {
                                cmenu.showCallback.call(cmenu);
                            } : null));
                        else
                            $c.css({
                                top: ($(t).offset().top - $c.outerHeight()) + "px",
                                left: ($(t).offset().left) + "px",
                                position: "absolute",
                                zIndex: 9999
                            })[cmenu.showTransition](cmenu.showSpeed, ((cmenu.showCallback) ? function () {
                                cmenu.showCallback.call(cmenu);
                            } : null));
                    }
                    else {

                        if ($(t).offset().left + $(t).outerWidth() + $c.width() > bodySize.x)
                            $c.css({
                                top: ($(t).offset().top + $(t).outerHeight()) + "px",
                                left: ($(t).offset().left - $c.outerWidth()) + "px",
                                position: "absolute",
                                zIndex: 9999
                            })[cmenu.showTransition](cmenu.showSpeed, ((cmenu.showCallback) ? function () {
                                cmenu.showCallback.call(cmenu);
                            } : null));
                        else
                            $c.css({
                                top: ($(t).offset().top + $(t).outerHeight()) + "px",
                                left: ($(t).offset().left) + "px",
                                position: "absolute",
                                zIndex: 9999
                            })[cmenu.showTransition](cmenu.showSpeed, ((cmenu.showCallback) ? function () {
                                cmenu.showCallback.call(cmenu);
                            } : null));

                    }
                    $c.css('visibility', 'visible');
                }
                else
                    $c.css({
                        top: pos.y + "px",
                        left: pos.x + "px",
                        position: "absolute",
                        zIndex: 9999
                    })[cmenu.showTransition](cmenu.showSpeed, ((cmenu.showCallback) ? function () {
                        cmenu.showCallback.call(cmenu);
                    } : null));
                cmenu.shown = true;
                $(document).one('click', null, function () {
                    cmenu.hide();
                }); // Handle a single click to the document to hide the menu
            }
        }
1341013
function ( options ) {

		// Feature test before initializing
		if ( 'querySelector' in document && 'addEventListener' in window && Array.prototype.forEach ) {

			// Selectors and variables
			options = _mergeObjects( _defaults, options || {} ); // Merge user options with defaults
			var toggles = document.querySelectorAll('[data-scroll]'); // Get smooth scroll toggles

			// When a toggle is clicked, run the click handler
			Array.prototype.forEach.call(toggles, function (toggle, index) {
				toggle.addEventListener('click', animateScroll.bind( null, toggle, toggle.getAttribute('href'), options ), false);
			});

		}

	}
842364
function pongTree_DivHTML( divId, resourceURL, paramObj ) {
  log( "pongTree",  "divId="+divId+" resourceURL="+resourceURL );
  if ( moduleConfig[ divId ] != null ) {
    pongTree_RenderHTML( divId, resourceURL, paramObj, moduleConfig[ divId ]  );
  } else {
    $.getJSON( 
        resourceURL+"/pongTree", 
        function( pmd ) {
          pongTree_RenderHTML( divId, resourceURL, paramObj, pmd );
        }
    );					
  }	
}
707860
function _addHints() {
    var self = this;

    var oldHintsWrapper = document.querySelector('.introjs-hints');

    if (oldHintsWrapper != null) {
        hintsWrapper = oldHintsWrapper;
    } else {
        var hintsWrapper = document.createElement('div');
        hintsWrapper.className = 'introjs-hints';
    }

    for (var i = 0, l = this._introItems.length; i < l; i++) {
        var item = this._introItems[i];

        // avoid append a hint twice
        if (document.querySelector('.introjs-hint[data-step="' + i + '"]')) continue;

        var hint = document.createElement('a');
        _setAnchorAsButton(hint);

        (function(hint, item, i) {
            // when user clicks on the hint element
            hint.onclick = function(e) {
                var evt = e ? e : window.event;
                if (evt.stopPropagation) evt.stopPropagation();
                if (evt.cancelBubble != null) evt.cancelBubble = true;

                _showHintDialog.call(self, i);
            };
        })(hint, item, i);

        hint.className = 'introjs-hint';

        if (!item.hintAnimation) {
            hint.className += ' introjs-hint-no-anim';
        }

        // hint's position should be fixed if the target element's position is fixed
        if (_isFixed(item.element)) {
            hint.className += ' introjs-fixedhint';
        }

        var hintDot = document.createElement('div');
        hintDot.className = 'introjs-hint-dot';
        var hintPulse = document.createElement('div');
        hintPulse.className = 'introjs-hint-pulse';

        hint.appendChild(hintDot);
        hint.appendChild(hintPulse);
        hint.setAttribute('data-step', i);

        // we swap the hint element with target element
        // because _setHelperLayerPosition uses `element` property
        item.targetElement = item.element;
        item.element = hint;

        // align the hint position
        _alignHintPosition.call(this, item.hintPosition, hint, item.targetElement);

        hintsWrapper.appendChild(hint);
    }

    // adding the hints wrapper
    document.body.appendChild(hintsWrapper);

    // call the callback function (if any)
    if (typeof this._hintsAddedCallback !== 'undefined') {
        this._hintsAddedCallback.call(this);
    }
}
466796
def export_envar(self, key, val):
        """"""
        line = "export " + key + "=" + str(val)
        self._add(line)
1217172
function install(Vue, options) {
  Vue.mixin(mixin);
  if (options && options.templates) {
    extendTemplates(options.templates);
  }
  if (options && options.mode) {
    setMode(options.mode);
  }
  if (options && options.Promise) {
    mixin.Promise = options.Promise;
  }
}
955578
function PluginList(options, parentNode) {
		objects.mixin(this, options);
		this.node = parentNode || document.createElement("div"); //$NON-NLS-0$
	}
432069
function insertAnchors(content) {
    var $ = cheerio.load(content);
    $(':header').each(function(i, elem) {
        var header = $(elem);
        var id = header.attr("id");
        if (!id) {
            id = slug(header.text());
            header.attr("id", id);
        }
        header.prepend('<a name="' + id + '" class="plugin-anchor" '
                   + 'href="#' + id + '">'
                   + '<i class="fa fa-link" aria-hidden="true"></i>'
                   + '</a>');
    });
    return $.html();
}
822781
function() {
		gui.Spirit.prototype.onconfigure.call(this);
		if (this.dom.embedded()) {
			var id, parent = this.dom.parent(gui.Spirit);
			if (parent && (id = this.scriptid)) {
				parent.script.load(gui.Object.lookup(id));
			}
		}
	}
490640
function pongSrcCodeDivRenderHTML( divId, resourceURL, params, cfg ) {
	log( "Pong-SrcCode", "load source code" );
	if ( ! cfg.type ) {  cfg.type = "plain"; }
	$.get( resourceURL, params  )
		.done( 
			function ( srcData ) {
				jQuerySyntaxInsertCode( divId, srcData, cfg.type, cfg.options||{} );	
			}
		).fail( function() { alert( "Failed to load source code." ) } ); 
}
413935
function loadIncludes() {
  for ( var module in reqModules ) {
    if ( module && module != 'pong-tableXX' ) { // just to exclude modules, for debugging it's better to include them hardcoded in index.html

      // extra CSS files
      if ( moduleMap[ module ] ) {
        if ( moduleMap[ module ].css ) {
          for ( var i = 0; i < moduleMap[ module ].css.length; i++ ) {
            log( 'loadModules', module+' add extra CSS: '+modulesPath+module+'/'+moduleMap[ module ].css[i]  );
            jQuery('head').append('<link rel="stylesheet" rel="nofollow" href="'+modulesPath+module+'/'+moduleMap[ module ].css[i] +'" type="text/css" />');
          }
        }
      
        // include files
        if ( moduleMap[ module ].include ) {
          for ( var i = 0; i < moduleMap[ module ].include.length; i++ ) {
            //for ( var includeJS in moduleMap[ module ].include ) {
            var includeJS = moduleMap[ module ].include[i];
            log( 'loadModules', module+' load include: '+modulesPath+module+'/'+includeJS );
            ajaxOngoing++;
              $.getScript( modulesPath+module+'/'+includeJS )
              .done( function( script, textStatus, jqxhr ) { 
                log( 'loadModules', this.url+' '+textStatus ); ajaxOngoing--; } )
              .fail( function( jqxhr, settings, exception ) { 
                log( 'loadModules', this.url+' '+exception ); ajaxOngoing--; }  );
          }
        }
      }
    }
  }
  ajaxOngoing--;
}
360725
async function embellish({ content, filename, packageData, basePath } /*: EmbelishOptions */) /*: Promise<string> */ {
  if (filename) {
    const packageFile = path.resolve(path.dirname(filename), 'package.json');

    return embellish({
      content: await readFileContent(filename),
      basePath: path.dirname(packageFile),
      packageData: await Package.readFromFile(packageFile)
    });
  }

  if (!content || !basePath) {
    throw new Error('Unable to embelish content unless content is provided');
  }

  const ast = parse(content);
  await insertLicense(ast, packageData, basePath);
  await insertBadges(ast, packageData, basePath);
  return Promise.resolve(toMarkdown(ast));
}
38031
def generate(env):
    """"""
    link.generate(env)

    env['FRAMEWORKPATHPREFIX'] = '-F'
    env['_FRAMEWORKPATH'] = '${_concat(FRAMEWORKPATHPREFIX, FRAMEWORKPATH, "", __env__)}'
    env['_FRAMEWORKS'] = '${_concat("-framework ", FRAMEWORKS, "", __env__)}'
    env['LINKCOM'] = env['LINKCOM'] + ' $_FRAMEWORKPATH $_FRAMEWORKS $FRAMEWORKSFLAGS'
    env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -dynamiclib')
    env['SHLINKCOM'] = env['SHLINKCOM'] + ' $_FRAMEWORKPATH $_FRAMEWORKS $FRAMEWORKSFLAGS'


    # TODO: Work needed to generate versioned shared libraries
    # Leaving this commented out, and also going to disable versioned library checking for now
    # see: http://docstore.mik.ua/orelly/unix3/mac/ch05_04.htm  for proper naming
    #link._setup_versioned_lib_variables(env, tool = 'applelink')#, use_soname = use_soname)
    #env['LINKCALLBACKS'] = link._versioned_lib_callbacks()


    # override the default for loadable modules, which are different
    # on OS X than dynamic shared libs.  echoing what XCode does for
    # pre/suffixes:
    env['LDMODULEPREFIX'] = '' 
    env['LDMODULESUFFIX'] = '' 
    env['LDMODULEFLAGS'] = SCons.Util.CLVar('$LINKFLAGS -bundle')
    env['LDMODULECOM'] = '$LDMODULE -o ${TARGET} $LDMODULEFLAGS $SOURCES $_LIBDIRFLAGS $_LIBFLAGS $_FRAMEWORKPATH $_FRAMEWORKS $FRAMEWORKSFLAGS'