corrade-http-templates

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 61  →  ?path2? @ 62
/instantMessage/node_modules/jquery/src/css/addGetHookIf.js
@@ -0,0 +1,26 @@
define( function() {
 
"use strict";
 
function addGetHookIf( conditionFn, hookFn ) {
 
// Define the hook, we'll check on the first run if it's really needed.
return {
get: function() {
if ( conditionFn() ) {
 
// Hook not needed (or it's not possible to use it due
// to missing dependency), remove it.
delete this.get;
return;
}
 
// Hook needed; redefine it so that the support test is not executed again.
return ( this.get = hookFn ).apply( this, arguments );
}
};
}
 
return addGetHookIf;
 
} );
/instantMessage/node_modules/jquery/src/css/adjustCSS.js
@@ -0,0 +1,73 @@
define( [
"../core",
"../var/rcssNum"
], function( jQuery, rcssNum ) {
 
"use strict";
 
function adjustCSS( elem, prop, valueParts, tween ) {
var adjusted, scale,
maxIterations = 20,
currentValue = tween ?
function() {
return tween.cur();
} :
function() {
return jQuery.css( elem, prop, "" );
},
initial = currentValue(),
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
 
// Starting value computation is required for potential unit mismatches
initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
rcssNum.exec( jQuery.css( elem, prop ) );
 
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
 
// Support: Firefox <=54
// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
initial = initial / 2;
 
// Trust units reported by jQuery.css
unit = unit || initialInUnit[ 3 ];
 
// Iteratively approximate from a nonzero starting point
initialInUnit = +initial || 1;
 
while ( maxIterations-- ) {
 
// Evaluate and update our best guess (doubling guesses that zero out).
// Finish if the scale equals or crosses 1 (making the old*new product non-positive).
jQuery.style( elem, prop, initialInUnit + unit );
if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {
maxIterations = 0;
}
initialInUnit = initialInUnit / scale;
 
}
 
initialInUnit = initialInUnit * 2;
jQuery.style( elem, prop, initialInUnit + unit );
 
// Make sure we update the tween properties later on
valueParts = valueParts || [];
}
 
if ( valueParts ) {
initialInUnit = +initialInUnit || +initial || 0;
 
// Apply relative offset (+=/-=) if specified
adjusted = valueParts[ 1 ] ?
initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
+valueParts[ 2 ];
if ( tween ) {
tween.unit = unit;
tween.start = initialInUnit;
tween.end = adjusted;
}
}
return adjusted;
}
 
return adjustCSS;
} );
/instantMessage/node_modules/jquery/src/css/curCSS.js
@@ -0,0 +1,65 @@
define( [
"../core",
"./var/rboxStyle",
"./var/rnumnonpx",
"./var/getStyles",
"./support",
"../selector" // Get jQuery.contains
], function( jQuery, rboxStyle, rnumnonpx, getStyles, support ) {
 
"use strict";
 
function curCSS( elem, name, computed ) {
var width, minWidth, maxWidth, ret,
 
// Support: Firefox 51+
// Retrieving style before computed somehow
// fixes an issue with getting wrong values
// on detached elements
style = elem.style;
 
computed = computed || getStyles( elem );
 
// getPropertyValue is needed for:
// .css('filter') (IE 9 only, #12537)
// .css('--customProperty) (#3144)
if ( computed ) {
ret = computed.getPropertyValue( name ) || computed[ name ];
 
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
ret = jQuery.style( elem, name );
}
 
// A tribute to the "awesome hack by Dean Edwards"
// Android Browser returns percentage for some values,
// but width seems to be reliably pixels.
// This is against the CSSOM draft spec:
// https://drafts.csswg.org/cssom/#resolved-values
if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
 
// Remember the original values
width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;
 
// Put in the new values to get a computed value out
style.minWidth = style.maxWidth = style.width = ret;
ret = computed.width;
 
// Revert the changed values
style.width = width;
style.minWidth = minWidth;
style.maxWidth = maxWidth;
}
}
 
return ret !== undefined ?
 
// Support: IE <=9 - 11 only
// IE returns zIndex value as an integer.
ret + "" :
ret;
}
 
return curCSS;
} );
/instantMessage/node_modules/jquery/src/css/hiddenVisibleSelectors.js
@@ -0,0 +1,15 @@
define( [
"../core",
"../selector"
], function( jQuery ) {
 
"use strict";
 
jQuery.expr.pseudos.hidden = function( elem ) {
return !jQuery.expr.pseudos.visible( elem );
};
jQuery.expr.pseudos.visible = function( elem ) {
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
};
 
} );
/instantMessage/node_modules/jquery/src/css/showHide.js
@@ -0,0 +1,105 @@
define( [
"../core",
"../data/var/dataPriv",
"../css/var/isHiddenWithinTree"
], function( jQuery, dataPriv, isHiddenWithinTree ) {
 
"use strict";
 
var defaultDisplayMap = {};
 
function getDefaultDisplay( elem ) {
var temp,
doc = elem.ownerDocument,
nodeName = elem.nodeName,
display = defaultDisplayMap[ nodeName ];
 
if ( display ) {
return display;
}
 
temp = doc.body.appendChild( doc.createElement( nodeName ) );
display = jQuery.css( temp, "display" );
 
temp.parentNode.removeChild( temp );
 
if ( display === "none" ) {
display = "block";
}
defaultDisplayMap[ nodeName ] = display;
 
return display;
}
 
function showHide( elements, show ) {
var display, elem,
values = [],
index = 0,
length = elements.length;
 
// Determine new display value for elements that need to change
for ( ; index < length; index++ ) {
elem = elements[ index ];
if ( !elem.style ) {
continue;
}
 
display = elem.style.display;
if ( show ) {
 
// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
// check is required in this first loop unless we have a nonempty display value (either
// inline or about-to-be-restored)
if ( display === "none" ) {
values[ index ] = dataPriv.get( elem, "display" ) || null;
if ( !values[ index ] ) {
elem.style.display = "";
}
}
if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
values[ index ] = getDefaultDisplay( elem );
}
} else {
if ( display !== "none" ) {
values[ index ] = "none";
 
// Remember what we're overwriting
dataPriv.set( elem, "display", display );
}
}
}
 
// Set the display of the elements in a second loop to avoid constant reflow
for ( index = 0; index < length; index++ ) {
if ( values[ index ] != null ) {
elements[ index ].style.display = values[ index ];
}
}
 
return elements;
}
 
jQuery.fn.extend( {
show: function() {
return showHide( this, true );
},
hide: function() {
return showHide( this );
},
toggle: function( state ) {
if ( typeof state === "boolean" ) {
return state ? this.show() : this.hide();
}
 
return this.each( function() {
if ( isHiddenWithinTree( this ) ) {
jQuery( this ).show();
} else {
jQuery( this ).hide();
}
} );
}
} );
 
return showHide;
} );
/instantMessage/node_modules/jquery/src/css/support.js
@@ -0,0 +1,102 @@
define( [
"../core",
"../var/document",
"../var/documentElement",
"../var/support"
], function( jQuery, document, documentElement, support ) {
 
"use strict";
 
( function() {
 
// Executing both pixelPosition & boxSizingReliable tests require only one layout
// so they're executed at the same time to save the second computation.
function computeStyleTests() {
 
// This is a singleton, we need to execute it only once
if ( !div ) {
return;
}
 
container.style.cssText = "position:absolute;left:-11111px;width:60px;" +
"margin-top:1px;padding:0;border:0";
div.style.cssText =
"position:relative;display:block;box-sizing:border-box;overflow:scroll;" +
"margin:auto;border:1px;padding:1px;" +
"width:60%;top:1%";
documentElement.appendChild( container ).appendChild( div );
 
var divStyle = window.getComputedStyle( div );
pixelPositionVal = divStyle.top !== "1%";
 
// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;
 
// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
// Some styles come back with percentage values, even though they shouldn't
div.style.right = "60%";
pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;
 
// Support: IE 9 - 11 only
// Detect misreporting of content dimensions for box-sizing:border-box elements
boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;
 
// Support: IE 9 only
// Detect overflow:scroll screwiness (gh-3699)
div.style.position = "absolute";
scrollboxSizeVal = div.offsetWidth === 36 || "absolute";
 
documentElement.removeChild( container );
 
// Nullify the div so it wouldn't be stored in the memory and
// it will also be a sign that checks already performed
div = null;
}
 
function roundPixelMeasures( measure ) {
return Math.round( parseFloat( measure ) );
}
 
var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,
reliableMarginLeftVal,
container = document.createElement( "div" ),
div = document.createElement( "div" );
 
// Finish early in limited (non-browser) environments
if ( !div.style ) {
return;
}
 
// Support: IE <=9 - 11 only
// Style of cloned element affects source element cloned (#8908)
div.style.backgroundClip = "content-box";
div.cloneNode( true ).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";
 
jQuery.extend( support, {
boxSizingReliable: function() {
computeStyleTests();
return boxSizingReliableVal;
},
pixelBoxStyles: function() {
computeStyleTests();
return pixelBoxStylesVal;
},
pixelPosition: function() {
computeStyleTests();
return pixelPositionVal;
},
reliableMarginLeft: function() {
computeStyleTests();
return reliableMarginLeftVal;
},
scrollboxSize: function() {
computeStyleTests();
return scrollboxSizeVal;
}
} );
} )();
 
return support;
 
} );
/instantMessage/node_modules/jquery/src/css/var/cssExpand.js
@@ -0,0 +1,5 @@
define( function() {
"use strict";
 
return [ "Top", "Right", "Bottom", "Left" ];
} );
/instantMessage/node_modules/jquery/src/css/var/getStyles.js
@@ -0,0 +1,17 @@
define( function() {
"use strict";
 
return function( elem ) {
 
// Support: IE <=11 only, Firefox <=30 (#15098, #14150)
// IE throws on elements created in popups
// FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
var view = elem.ownerDocument.defaultView;
 
if ( !view || !view.opener ) {
view = window;
}
 
return view.getComputedStyle( elem );
};
} );
/instantMessage/node_modules/jquery/src/css/var/isHiddenWithinTree.js
@@ -0,0 +1,34 @@
define( [
"../../core",
"../../selector"
 
// css is assumed
], function( jQuery ) {
"use strict";
 
// isHiddenWithinTree reports if an element has a non-"none" display style (inline and/or
// through the CSS cascade), which is useful in deciding whether or not to make it visible.
// It differs from the :hidden selector (jQuery.expr.pseudos.hidden) in two important ways:
// * A hidden ancestor does not force an element to be classified as hidden.
// * Being disconnected from the document does not force an element to be classified as hidden.
// These differences improve the behavior of .toggle() et al. when applied to elements that are
// detached or contained within hidden ancestors (gh-2404, gh-2863).
return function( elem, el ) {
 
// isHiddenWithinTree might be called from jQuery#filter function;
// in that case, element will be second argument
elem = el || elem;
 
// Inline style trumps all
return elem.style.display === "none" ||
elem.style.display === "" &&
 
// Otherwise, check computed style
// Support: Firefox <=43 - 45
// Disconnected elements can have computed display: none, so first confirm that elem is
// in the document.
jQuery.contains( elem.ownerDocument, elem ) &&
 
jQuery.css( elem, "display" ) === "none";
};
} );
/instantMessage/node_modules/jquery/src/css/var/rboxStyle.js
@@ -0,0 +1,7 @@
define( [
"./cssExpand"
], function( cssExpand ) {
"use strict";
 
return new RegExp( cssExpand.join( "|" ), "i" );
} );
/instantMessage/node_modules/jquery/src/css/var/rnumnonpx.js
@@ -0,0 +1,7 @@
define( [
"../../var/pnum"
], function( pnum ) {
"use strict";
 
return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
} );
/instantMessage/node_modules/jquery/src/css/var/swap.js
@@ -0,0 +1,26 @@
define( function() {
 
"use strict";
 
// A method for quickly swapping in/out CSS properties to get correct calculations.
return function( elem, options, callback, args ) {
var ret, name,
old = {};
 
// Remember the old values, and insert the new ones
for ( name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
}
 
ret = callback.apply( elem, args || [] );
 
// Revert the old values
for ( name in options ) {
elem.style[ name ] = old[ name ];
}
 
return ret;
};
 
} );