Folder reorganize 1

This commit is contained in:
Rucus
2026-02-17 12:44:37 -06:00
parent ec99d85bc2
commit f0ae0ab905
17427 changed files with 2071 additions and 1059030 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,513 @@
@charset "utf-8";
/* CSS Document */
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif;
/* 1 */
-ms-text-size-adjust: 100%;
/* 2 */
-webkit-text-size-adjust: 100%;
/* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11
* and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0;
}
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
padding: 0;
height: 1px;
border: none;
border-top: 1px solid #E6E6E6;
}
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto;
}
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold;
}
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
/*==========================================================================
========================================================================== */
@-webkit-viewport {
width: device-width;
}
@-moz-viewport {
width: device-width;
}
@-ms-viewport {
width: device-width;
}
@-o-viewport {
width: device-width;
}
@viewport {
width: device-width;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
font-size: 62.5%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
body {
margin: 0;
padding: 0;
width: 100%;
font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
color: #7f8c8d;
overflow-y: scroll;
*overflow-y: auto;
}
body p {
font-size: 14px;
font-size: 1.4rem;
line-height: 20px;
line-height: 2rem;
}
.clearfix {
*zoom: 1;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
line-height: 0;
}
.clearfix:after {
clear: both;
}
a {
text-decoration: none;
}
a.underline {
text-decoration: underline;
}
a.green-link {
color: #7bb700;
font-weight: bold;
}
a.green-link:hover {
color: #689a00;
}
a.link {
color: #0079d5;
font-weight: bold;
}
a.link:visited,
a.link:active {
color: #0079d5;
}
a.link:hover {
color: #0995ff !important;
}
h1 {
font-size: 35px;
font-size: 3.5rem;
line-height: 42px;
line-height: 4.2rem;
font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
color: #2c3e50;
}
h1 span {
font-size: 14px;
font-size: 1.4rem;
color: #9a9a9a;
}
h2 {
font-size: 18px;
font-size: 1.8rem;
line-height: 26px;
line-height: 2.6rem;
font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
color: #2c3e50;
}
h2.center-align {
font-size: 35px;
font-size: 3.5rem;
line-height: 42px;
line-height: 4.2rem;
font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
font-weight: normal;
text-align: center;
margin-top: 0;
letter-spacing: -0.05rem;
}
img.bottom-aligned {
margin-top: 62px;
float: right;
}
.btn {
display: inline-block;
*zoom: 1;
*display: inline;
width: auto;
outline: none;
padding: 14px 25px 15px;
margin: 10px 0;
color: #fff;
text-align: center;
vertical-align: middle;
background-color: #167ED7;
-webkit-border-radius: 2px;
-webkit-border-radius: .2rem;
-moz-border-radius: 2px;
-moz-border-radius: .2rem;
border-radius: 2px;
border-radius: .2rem;
text-decoration: none;
cursor: pointer;
*margin-left: .3em;
-webkit-appearance: none;
}
.btn:first-child {
*margin-left: 0;
}
.btn:focus {
outline: thin dotted #126dbb;
outline: 1px auto #126dbb;
outline-offset: -1px;
}
.btn:focus,
.btn:hover {
text-decoration: none;
background-position: 0 -25px;
text-shadow: none;
outline: none;
}
.btn:active,
.btn:visited {
color: #fff;
-webkit-box-shadow: inset 0px 3px 1px #126dbb;
-moz-box-shadow: inset 0px 3px 1px #126dbb;
box-shadow: inset 0px 3px 1px #126dbb;
outline: none;
}
/*==========================================================================
Structural Block Elements
========================================================================== */
.wrapper {
margin: 0 auto;
width: 964px;
}
.top-spacer {
padding-top: 40px;
}
.bottom-spacer {
margin-bottom: 40px;
}
.left-block,
.right-block {
display: inline-block;
*zoom: 1;
*display: inline;
}
.left-block {
float: left;
}
.right-block {
float: right;
}
.center-align {
text-align: center;
}
.block-holder {
*zoom: 1;
margin: 0 -20px;
}
.block-holder:before,
.block-holder:after {
display: table;
content: "";
line-height: 0;
}
.block-holder:after {
clear: both;
}
.block-holder .block2,
.block-holder .block3,
.block-holder .block4 {
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0 20px;
}
.block-holder .block2 {
width: 50%;
}
.block-holder .block3 {
width: 33.333333%;
}
.block-holder .block4 {
width: 25%;
}
.block4 h2{
margin-top: 0;
}
/*Header
========================================================================== */
.header-section {
margin-top: 20px;
}
.header-section .top-nav {
list-style: none;
margin: 10px 0;
padding: 0;
}
.header-section .top-nav li {
display: inline-block;
*zoom: 1;
*display: inline;
}
.header-section .top-nav li:first-child {
margin-right: 20px;
}
.header-section .top-nav li a {
display: block;
text-decoration: none;
color: #9a9a9a;
font-size: 15px;
font-size: 1.5rem;
line-height: 20px;
line-height: 2rem;
}
.header-section .top-nav li a:hover {
color: #707070;
}
/*Content Section
========================================================================== */
.banner-block {
margin: 25px 0 0;
}
.banner-block p {
font-size: 16px;
font-size: 1.6rem;
line-height: 26px;
line-height: 2.6rem;
}
.banner-block p span {
font-size: 14px;
font-size: 1.4rem;
display: block;
margin: 10px 0;
}
.banner-block p span a {
color: #666666;
}
.banner-block p span a:hover {
color: #404040;
}
.gray-bg {
background: #f2f5f8;
padding: 20px;
}
.icon {
display: block;
background: url(../img/icons.png) no-repeat 0 0;
}
.icon.usage-icon,
.icon.api-icon,
.icon.attributes-icon {
width: 50px;
height: 50px;
}
.icon.usage-icon {
background-position: -45px -11px;
}
.icon.api-icon {
background-position: -3px -11px;
width: 36px;
}
.icon.attributes-icon {
background-position: -100px -11px;
}
a .icon-holder {
display: block;
background-color: #fff;
padding: 20px;
margin-bottom: 10px;
border: 1px solid #e4e8ec;
}
a .icon-holder .icon-learn,
a .icon-holder .icon-understand,
a .icon-holder .icon-whitepaper,
a .icon-holder .icon-inspired {
display: block;
width: 75px;
height: 75px;
}
a .icon-holder .icon-learn {
background-position: 2px -80px;
margin: 0 auto;
}
a .icon-holder .icon-understand {
background-position: -83px -80px;
margin: 0 auto;
}
a .icon-holder .icon-whitepaper {
background-position: -163px -80px;
margin: 0 auto;
}
a .icon-holder .icon-inspired {
background-position: -163px -5px;
margin: 0 auto;
}
a .large {
font-weight: bold;
color: #34495e;
font-size: 14px;
font-size: 1.4rem;
line-height: 20px;
line-height: 2rem;
}
a:hover .large {
color: #233547;
}
/*Footer
========================================================================== */
.footer-section {
padding: 30px 0;
}
.footer-section .footer-logo-block,
.footer-section .copyright {
text-align: center;
}
.footer-section .copyright {
color: #b4bbc2;
}
.footer-section .copyright p {
margin-top: 5px;
line-height: 14px;
line-height: 1.4rem;
}

View File

@@ -0,0 +1,611 @@
@charset "utf-8";
/* CSS Document */
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11
* and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0;
}
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
padding:0;
height: 1px;
border: none;
border-top:1px solid #E6E6E6;
}
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto;
}
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold;
}
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
/*==========================================================================
========================================================================== */
@-webkit-viewport {
width : device-width; }
@-moz-viewport {
width : device-width; }
@-ms-viewport {
width : device-width; }
@-o-viewport {
width : device-width; }
@viewport {
width : device-width; }
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
font-size : 62.5%;
-webkit-text-size-adjust : 100%;
-ms-text-size-adjust : 100%;
}
body {
margin : 0;
padding : 0;
width : 100%;
font-family : "Lucida Grande", Helvetica, Arial, sans-serif;
color : #7f8c8d;
overflow-y: scroll;
*overflow-y: auto;
p {
font-size: 14px;
font-size: 1.4rem;
line-height: 20px;
line-height: 2rem;
}
}
//Clearfix - for clearing the float
.clearfix {
*zoom:1;
&:before,
&:after {
display: table;
content: "";
line-height: 0;
}
&:after {
clear: both;
}
}
a {
text-decoration: none;
&.underline {
text-decoration: underline;
}
&.green-link {
color: #7bb700;
font-weight: bold;
&:hover {
color: #689a00;
}
}
&.link {
color: #0079d5;
font-weight: bold;
&:visited, &:active {
color: #0079d5;
}
&:hover {
color: lighten(#0079d5, 10%) !important;
}
}
}
h1 {
font-size: 35px;
font-size: 3.5rem;
line-height: 42px;
line-height: 4.2rem;
font-family : "Lucida Grande", Helvetica, Arial, sans-serif;
color: #2c3e50;
span {
font-size: 14px;
font-size: 1.4rem;
color: #9a9a9a;
}
}
h2 {
font-size: 18px;
font-size: 1.8rem;
line-height: 26px;
line-height: 2.6rem;
font-family : "Lucida Grande", Helvetica, Arial, sans-serif;
color: #2c3e50;
&.center-align {
font-size: 35px;
font-size: 3.5rem;
line-height: 42px;
line-height: 4.2rem;
font-family : "Lucida Grande", Helvetica, Arial, sans-serif;
font-weight: normal;
text-align: center;
margin-top: 0;
letter-spacing: -.05rem;
}
}
img {
&.bottom-aligned {
margin-top: 62px;
float: right;
}
}
.btn {
display: inline-block;
*zoom:1; *display: inline;
width: auto;
outline: none;
padding : 14px 25px 15px;
margin : 10px 0;
color : #fff;
text-align : center;
vertical-align : middle;
background-color : #167ED7;
-webkit-border-radius: 2px;
-webkit-border-radius: .2rem;
-moz-border-radius: 2px;
-moz-border-radius: .2rem;
border-radius: 2px;
border-radius: .2rem;
*margin-left: .3em;
text-decoration: none;
&:first-child {
*margin-left: 0;
}
cursor : pointer;
*margin-left : .3em;
-webkit-appearance: none;
&:focus {
// Default
outline: thin dotted #126dbb;
// Webkit
outline: 1px auto #126dbb;
outline-offset: -1px;
}
&:focus,
&:hover {
text-decoration : none;
background-position: 0 -25px;
text-shadow: none;
outline: none;
}
&:active, &:visited{
color : #fff;
-webkit-box-shadow : inset 0px 3px 1px #126dbb;
-moz-box-shadow : inset 0px 3px 1px #126dbb;
box-shadow : inset 0px 3px 1px #126dbb;
outline: none;
}
}
/*==========================================================================
Structural Block Elements
========================================================================== */
.wrapper {
margin: 0 auto;
width: 964px;
}
.top-spacer {
padding-top: 30px;
}
.bottom-spacer {
margin-bottom: 30px;
}
.left-block, .right-block {
display: inline-block;
*zoom:1; *display: inline;
}
.left-block {
float: left;
}
.right-block {
float: right;
}
.center-align {
text-align: center;
}
.block-holder {
*zoom:1;
&:before,
&:after {
display: table;
content: "";
line-height: 0;
}
&:after {
clear: both;
}
margin: 0 -20px;
.block2, .block3, .block4 {
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0 20px;
}
.block2 {
width: 50%;
}
.block3 {
width: 33.333333%;
}
.block4 {
width: 25%;
}
}
/*Header
========================================================================== */
.header-section {
margin-top: 20px;
.top-nav {
list-style: none;
margin: 10px 0;
padding: 0;
li {
display: inline-block;
*zoom:1; *display: inline;
&:first-child {
margin-right: 20px;
}
a {
display: block;
text-decoration: none;
color: #9a9a9a;
font-size: 15px;
font-size: 1.5rem;
line-height: 20px;
line-height: 2rem;
&:hover {
color: #707070;
}
}
}
}
}
/*Content Section
========================================================================== */
.banner-block {
margin: 50px 0 0;
p {
font-size: 16px;
font-size: 1.6rem;
line-height: 26px;
line-height: 2.6rem;
span {
font-size: 14px;
font-size: 1.4rem;
display: block;
margin: 10px 0;
a {
color: #666666;
&:hover {
color: #404040;
}
}
}
}
}
.gray-bg {
background: #f2f5f8;
padding: 20px;
}
.icon {
display: block;
background: url(../img/icons.png) no-repeat 0 0;
&.usage-icon, &.api-icon, &.attributes-icon {
width: 50px;
height: 50px;
}
&.usage-icon {
background-position: -3px -11px;
width: 36px;
}
&.api-icon{
background-position: -45px -11px;
}
&.attributes-icon {
background-position: -100px -11px;
}
}
a {
.icon-holder {
display: block;
background-color: #fff;
padding: 20px;
margin-bottom: 10px;
border: 1px solid #e4e8ec;
.icon-learn, .icon-understand, .icon-whitepaper, .icon-inspired {
display: block;
width: 75px;
height: 75px;
}
.icon-learn {
background-position: 2px -80px;
margin: 0 auto;
}
.icon-understand {
background-position: -83px -80px;
margin: 0 auto;
}
.icon-whitepaper {
background-position: -163px -80px;
margin: 0 auto;
}
.icon-inspired {
background-position: -163px -5px;
margin: 0 auto;
}
}
.large {
font-weight: bold;
color: #34495e;
font-size: 14px;
font-size: 1.4rem;
line-height: 20px;
line-height: 2rem;
}
&:hover {
.large {
color: #233547;
}
}
}
/*Footer
========================================================================== */
.footer-section {
padding: 30px 0;
.footer-logo-block, .copyright {
text-align: center;
}
.copyright {
color: #b4bbc2;
p {
margin-top: 5px;
line-height: 14px;
line-height: 1.4rem;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

322
OLD/charts/assets/scripts/html5shiv.js vendored Normal file
View File

@@ -0,0 +1,322 @@
/**
* @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
;(function(window, document) {
/*jshint evil:true */
/** version */
var version = '3.7.2';
/** Preset options */
var options = window.html5 || {};
/** Used to skip problem elements */
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
/** Not all elements can be cloned in IE **/
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
/** Detect whether the browser supports default html5 styles */
var supportsHtml5Styles;
/** Name of the expando, to work with multiple documents or to re-shiv one document */
var expando = '_html5shiv';
/** The id for the the documents expando */
var expanID = 0;
/** Cached data for each document */
var expandoData = {};
/** Detect whether the browser supports unknown elements */
var supportsUnknownElements;
(function() {
try {
var a = document.createElement('a');
a.innerHTML = '<xyz></xyz>';
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
supportsHtml5Styles = ('hidden' in a);
supportsUnknownElements = a.childNodes.length == 1 || (function() {
// assign a false positive if unable to shiv
(document.createElement)('a');
var frag = document.createDocumentFragment();
return (
typeof frag.cloneNode == 'undefined' ||
typeof frag.createDocumentFragment == 'undefined' ||
typeof frag.createElement == 'undefined'
);
}());
} catch(e) {
// assign a false positive if detection fails => unable to shiv
supportsHtml5Styles = true;
supportsUnknownElements = true;
}
}());
/*--------------------------------------------------------------------------*/
/**
* Creates a style sheet with the given CSS text and adds it to the document.
* @private
* @param {Document} ownerDocument The document.
* @param {String} cssText The CSS text.
* @returns {StyleSheet} The style element.
*/
function addStyleSheet(ownerDocument, cssText) {
var p = ownerDocument.createElement('p'),
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
p.innerHTML = 'x<style>' + cssText + '</style>';
return parent.insertBefore(p.lastChild, parent.firstChild);
}
/**
* Returns the value of `html5.elements` as an array.
* @private
* @returns {Array} An array of shived element node names.
*/
function getElements() {
var elements = html5.elements;
return typeof elements == 'string' ? elements.split(' ') : elements;
}
/**
* Extends the built-in list of html5 elements
* @memberOf html5
* @param {String|Array} newElements whitespace separated list or array of new element names to shiv
* @param {Document} ownerDocument The context document.
*/
function addElements(newElements, ownerDocument) {
var elements = html5.elements;
if(typeof elements != 'string'){
elements = elements.join(' ');
}
if(typeof newElements != 'string'){
newElements = newElements.join(' ');
}
html5.elements = elements +' '+ newElements;
shivDocument(ownerDocument);
}
/**
* Returns the data associated to the given document
* @private
* @param {Document} ownerDocument The document.
* @returns {Object} An object of data.
*/
function getExpandoData(ownerDocument) {
var data = expandoData[ownerDocument[expando]];
if (!data) {
data = {};
expanID++;
ownerDocument[expando] = expanID;
expandoData[expanID] = data;
}
return data;
}
/**
* returns a shived element for the given nodeName and document
* @memberOf html5
* @param {String} nodeName name of the element
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived element.
*/
function createElement(nodeName, ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createElement(nodeName);
}
if (!data) {
data = getExpandoData(ownerDocument);
}
var node;
if (data.cache[nodeName]) {
node = data.cache[nodeName].cloneNode();
} else if (saveClones.test(nodeName)) {
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
} else {
node = data.createElem(nodeName);
}
// Avoid adding some elements to fragments in IE < 9 because
// * Attributes like `name` or `type` cannot be set/changed once an element
// is inserted into a document/fragment
// * Link elements with `src` attributes that are inaccessible, as with
// a 403 response, will cause the tab/window to crash
// * Script elements appended to fragments will execute when their `src`
// or `text` property is set
return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
}
/**
* returns a shived DocumentFragment for the given document
* @memberOf html5
* @param {Document} ownerDocument The context document.
* @returns {Object} The shived DocumentFragment.
*/
function createDocumentFragment(ownerDocument, data){
if (!ownerDocument) {
ownerDocument = document;
}
if(supportsUnknownElements){
return ownerDocument.createDocumentFragment();
}
data = data || getExpandoData(ownerDocument);
var clone = data.frag.cloneNode(),
i = 0,
elems = getElements(),
l = elems.length;
for(;i<l;i++){
clone.createElement(elems[i]);
}
return clone;
}
/**
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
* @private
* @param {Document|DocumentFragment} ownerDocument The document.
* @param {Object} data of the document.
*/
function shivMethods(ownerDocument, data) {
if (!data.cache) {
data.cache = {};
data.createElem = ownerDocument.createElement;
data.createFrag = ownerDocument.createDocumentFragment;
data.frag = data.createFrag();
}
ownerDocument.createElement = function(nodeName) {
//abort shiv
if (!html5.shivMethods) {
return data.createElem(nodeName);
}
return createElement(nodeName, ownerDocument, data);
};
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
'var n=f.cloneNode(),c=n.createElement;' +
'h.shivMethods&&(' +
// unroll the `createElement` calls
getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
data.createElem(nodeName);
data.frag.createElement(nodeName);
return 'c("' + nodeName + '")';
}) +
');return n}'
)(html5, data.frag);
}
/*--------------------------------------------------------------------------*/
/**
* Shivs the given document.
* @memberOf html5
* @param {Document} ownerDocument The document to shiv.
* @returns {Document} The shived document.
*/
function shivDocument(ownerDocument) {
if (!ownerDocument) {
ownerDocument = document;
}
var data = getExpandoData(ownerDocument);
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
data.hasCSS = !!addStyleSheet(ownerDocument,
// corrects block display not defined in IE6/7/8/9
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
// adds styling not present in IE6/7/8/9
'mark{background:#FF0;color:#000}' +
// hides non-rendered elements
'template{display:none}'
);
}
if (!supportsUnknownElements) {
shivMethods(ownerDocument, data);
}
return ownerDocument;
}
/*--------------------------------------------------------------------------*/
/**
* The `html5` object is exposed so that more elements can be shived and
* existing shiving can be detected on iframes.
* @type Object
* @example
*
* // options can be changed before the script is included
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
*/
var html5 = {
/**
* An array or space separated string of node names of the elements to shiv.
* @memberOf html5
* @type Array|String
*/
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
/**
* current version of html5shiv
*/
'version': version,
/**
* A flag to indicate that the HTML5 style sheet should be inserted.
* @memberOf html5
* @type Boolean
*/
'shivCSS': (options.shivCSS !== false),
/**
* Is equal to true if a browser supports creating unknown/HTML5 elements
* @memberOf html5
* @type boolean
*/
'supportsUnknownElements': supportsUnknownElements,
/**
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
* methods should be overwritten.
* @memberOf html5
* @type Boolean
*/
'shivMethods': (options.shivMethods !== false),
/**
* A string to describe the type of `html5` object ("default" or "default print").
* @memberOf html5
* @type String
*/
'type': 'default',
// shivs the document according to the specified `html5` object options
'shivDocument': shivDocument,
//creates a shived element
createElement: createElement,
//creates a shived documentFragment
createDocumentFragment: createDocumentFragment,
//extends list of elements
addElements: addElements
};
/*--------------------------------------------------------------------------*/
// expose html5
window.html5 = html5;
// shiv the document
shivDocument(document);
}(this, document));